From 5d2374a44f833b94ff0398b90a1f08d211b1fd85 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 3 Aug 2017 22:24:10 +0200 Subject: [PATCH 01/63] Start to develop the 0.6 version. --- pom.xml | 2 +- test-as-you-think-core/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 761e493..3aec764 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.github.xapn test-as-you-think-project - 0.5 + 0.6-SNAPSHOT pom TestAsYouThink Project The TestAsYouThink project aims to provide tooling to improve test code quality and to make testing diff --git a/test-as-you-think-core/pom.xml b/test-as-you-think-core/pom.xml index 1a00814..75e8ffe 100644 --- a/test-as-you-think-core/pom.xml +++ b/test-as-you-think-core/pom.xml @@ -5,7 +5,7 @@ com.github.xapn test-as-you-think-project - 0.5 + 0.6-SNAPSHOT test-as-you-think-core From 7d601eae0929bf9d9da06496cdc58c8b3d9f0b70 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sat, 5 Aug 2017 12:34:03 +0200 Subject: [PATCH 02/63] It should verify the actual string is equal to an expected result. --- .../java/testasyouthink/GivenWhenContext.java | 4 +- .../java/testasyouthink/GivenWhenThenDsl.java | 15 +++- .../main/java/testasyouthink/ThenStep.java | 7 ++ .../verification/FluentAssertions.java | 47 +++++++++++ .../ThenFluentAssertionsTest.java | 79 +++++++++++++++++++ 5 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java create mode 100644 test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java index af5149f..e451f1c 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java @@ -25,7 +25,7 @@ import testasyouthink.execution.Event; import testasyouthink.preparation.Preparation; -class GivenWhenContext<$SystemUnderTest, $Result> { +public class GivenWhenContext<$SystemUnderTest, $Result> { private final Preparation<$SystemUnderTest> preparation; private final Event<$SystemUnderTest, $Result> event; @@ -36,7 +36,7 @@ class GivenWhenContext<$SystemUnderTest, $Result> { this.event = event; } - $Result returnResultOrVoid() { + public $Result returnResultOrVoid() { if (result == null) { preparation.prepareFixtures(); result = event.happen(); diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java index 230ef05..a415c85 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java @@ -187,7 +187,7 @@ ThenFailure whenSutRunsOutsideOperatingConditions( interface VerificationStage { - interface Then<$SystemUnderTest, $Result> { + interface Then<$SystemUnderTest, $Result> extends FluentAssertions.ThenResult<$SystemUnderTest, $Result> { AndThen<$SystemUnderTest, $Result> then(Consumer<$Result> thenStep); @@ -272,5 +272,18 @@ interface AndThenFailure { AndThenFailure withCauseMessage(String expectedMessage); } + + interface FluentAssertions { + + interface ThenResult<$SystemUnderTest, $Result> { + + ThenFluent<$SystemUnderTest, $Result> thenResult(); + } + + interface ThenFluent<$SystemUnderTest, $Result> { + + ThenFluent<$SystemUnderTest, $Result> isEqualTo($Result expected); + } + } } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java index 3c368e4..268c7b8 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java @@ -24,9 +24,11 @@ import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThen; import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThenFailure; +import testasyouthink.GivenWhenThenDsl.VerificationStage.FluentAssertions.ThenFluent; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; import testasyouthink.verification.Assertions; +import testasyouthink.verification.FluentAssertions; import java.time.Duration; import java.util.List; @@ -180,4 +182,9 @@ public AndThenFailure withCauseMessage(String expectedMessage) { .spendsAtMost(duration); return this; } + + @Override + public ThenFluent<$SystemUnderTest, $Result> thenResult() { + return new FluentAssertions<>(context); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java new file mode 100644 index 0000000..bdf340c --- /dev/null +++ b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java @@ -0,0 +1,47 @@ +/*- + * #%L + * Test As You Think + * %% + * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + */ + +package testasyouthink.verification; + +import testasyouthink.GivenWhenContext; +import testasyouthink.GivenWhenThenDsl.VerificationStage.FluentAssertions.ThenFluent; + +import static org.assertj.core.api.Assertions.assertThat; + +public class FluentAssertions<$SystemUnderTest, $Result> implements ThenFluent<$SystemUnderTest, $Result> { + + private GivenWhenContext<$SystemUnderTest, $Result> context; + + public FluentAssertions(GivenWhenContext<$SystemUnderTest, $Result> context) { + this.context = context; + } + + private $Result actual() { + return context.returnResultOrVoid(); + } + + @Override + public ThenFluent<$SystemUnderTest, $Result> isEqualTo($Result expected) { + assertThat(actual()).isEqualTo(expected); + return this; + } +} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java new file mode 100644 index 0000000..edd6939 --- /dev/null +++ b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java @@ -0,0 +1,79 @@ +/*- + * #%L + * Test As You Think + * %% + * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + */ + +package testasyouthink; + +import org.junit.Before; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import testasyouthink.fixture.GivenWhenThenDefinition; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static testasyouthink.TestAsYouThink.when; + +public class ThenFluentAssertionsTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(ThenFluentAssertionsTest.class); + private GivenWhenThenDefinition gwtMock; + + @Before + public void prepareFixtures() { + gwtMock = mock(GivenWhenThenDefinition.class); + } + + @Test + public void should_verify_the_actual_string_is_equal_to_an_expected_result() { + // WHEN + when(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return "expected result"; + }) + .thenResult() + .isEqualTo("expected result"); + + // THEN + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } + + @Test + public void should_verify_the_actual_string_is_not_equal_to_an_expected_result() { + // WHEN + Throwable thrown = catchThrowable(() -> when(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return "actual result"; + }) + .thenResult() + .isEqualTo("expected result")); + + // THEN + LOGGER.debug("Stack trace", thrown); + assertThat(thrown).isInstanceOf(AssertionError.class); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } +} From 4ccd6c1d94a26687f400db2ec4eee3330d5b26c3 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sat, 5 Aug 2017 13:13:24 +0200 Subject: [PATCH 03/63] Refactor to simplify the generics linked to fluent assertions. --- .../java/testasyouthink/GivenWhenThenDsl.java | 10 +++++----- .../src/main/java/testasyouthink/ThenStep.java | 4 ++-- .../verification/FluentAssertions.java | 17 ++++++----------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java index a415c85..15a6ba6 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java @@ -187,7 +187,7 @@ ThenFailure whenSutRunsOutsideOperatingConditions( interface VerificationStage { - interface Then<$SystemUnderTest, $Result> extends FluentAssertions.ThenResult<$SystemUnderTest, $Result> { + interface Then<$SystemUnderTest, $Result> extends FluentAssertions.ThenResult<$Result> { AndThen<$SystemUnderTest, $Result> then(Consumer<$Result> thenStep); @@ -275,14 +275,14 @@ interface AndThenFailure { interface FluentAssertions { - interface ThenResult<$SystemUnderTest, $Result> { + interface ThenResult<$Result> { - ThenFluent<$SystemUnderTest, $Result> thenResult(); + ThenFluent<$Result> thenResult(); } - interface ThenFluent<$SystemUnderTest, $Result> { + interface ThenFluent<$Result> { - ThenFluent<$SystemUnderTest, $Result> isEqualTo($Result expected); + ThenFluent<$Result> isEqualTo($Result expected); } } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java index 268c7b8..6f7b6f6 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java @@ -184,7 +184,7 @@ public AndThenFailure withCauseMessage(String expectedMessage) { } @Override - public ThenFluent<$SystemUnderTest, $Result> thenResult() { - return new FluentAssertions<>(context); + public ThenFluent<$Result> thenResult() { + return new FluentAssertions<>(context.returnResultOrVoid()); } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java index bdf340c..8cedc41 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java @@ -22,26 +22,21 @@ package testasyouthink.verification; -import testasyouthink.GivenWhenContext; import testasyouthink.GivenWhenThenDsl.VerificationStage.FluentAssertions.ThenFluent; import static org.assertj.core.api.Assertions.assertThat; -public class FluentAssertions<$SystemUnderTest, $Result> implements ThenFluent<$SystemUnderTest, $Result> { +public class FluentAssertions<$Result> implements ThenFluent<$Result> { - private GivenWhenContext<$SystemUnderTest, $Result> context; + private final $Result actual; - public FluentAssertions(GivenWhenContext<$SystemUnderTest, $Result> context) { - this.context = context; - } - - private $Result actual() { - return context.returnResultOrVoid(); + public FluentAssertions($Result result) { + this.actual = result; } @Override - public ThenFluent<$SystemUnderTest, $Result> isEqualTo($Result expected) { - assertThat(actual()).isEqualTo(expected); + public ThenFluent<$Result> isEqualTo($Result expected) { + assertThat(actual).isEqualTo(expected); return this; } } From 1ddabbbc470b2ef151241ace88a67c6e08cd1898 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sat, 5 Aug 2017 13:49:10 +0200 Subject: [PATCH 04/63] Refactor to directly use the boilerplate code of AssertJ. --- .../java/testasyouthink/GivenWhenThenDsl.java | 15 ++++----------- .../src/main/java/testasyouthink/ThenStep.java | 3 +-- .../verification/FluentAssertions.java | 16 +++------------- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java index 15a6ba6..fd7a720 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java @@ -38,6 +38,7 @@ import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedTriConsumer; import testasyouthink.function.CheckedTriFunction; +import testasyouthink.verification.FluentAssertions; import java.time.Duration; import java.util.List; @@ -187,7 +188,7 @@ ThenFailure whenSutRunsOutsideOperatingConditions( interface VerificationStage { - interface Then<$SystemUnderTest, $Result> extends FluentAssertions.ThenResult<$Result> { + interface Then<$SystemUnderTest, $Result> extends ThenResult<$Result> { AndThen<$SystemUnderTest, $Result> then(Consumer<$Result> thenStep); @@ -273,17 +274,9 @@ interface AndThenFailure { AndThenFailure withCauseMessage(String expectedMessage); } - interface FluentAssertions { + interface ThenResult<$Result> { - interface ThenResult<$Result> { - - ThenFluent<$Result> thenResult(); - } - - interface ThenFluent<$Result> { - - ThenFluent<$Result> isEqualTo($Result expected); - } + FluentAssertions<$Result> thenResult(); } } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java index 6f7b6f6..67bca4c 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java @@ -24,7 +24,6 @@ import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThen; import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThenFailure; -import testasyouthink.GivenWhenThenDsl.VerificationStage.FluentAssertions.ThenFluent; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; import testasyouthink.verification.Assertions; @@ -184,7 +183,7 @@ public AndThenFailure withCauseMessage(String expectedMessage) { } @Override - public ThenFluent<$Result> thenResult() { + public FluentAssertions<$Result> thenResult() { return new FluentAssertions<>(context.returnResultOrVoid()); } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java index 8cedc41..ba1ed17 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java @@ -22,21 +22,11 @@ package testasyouthink.verification; -import testasyouthink.GivenWhenThenDsl.VerificationStage.FluentAssertions.ThenFluent; +import org.assertj.core.api.AbstractAssert; -import static org.assertj.core.api.Assertions.assertThat; - -public class FluentAssertions<$Result> implements ThenFluent<$Result> { - - private final $Result actual; +public class FluentAssertions<$Result> extends AbstractAssert, $Result> { public FluentAssertions($Result result) { - this.actual = result; - } - - @Override - public ThenFluent<$Result> isEqualTo($Result expected) { - assertThat(actual).isEqualTo(expected); - return this; + super(result, FluentAssertions.class); } } From 0ec4ec69961cdd690b44e3cb3dd49a35d4ca9bc8 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sat, 5 Aug 2017 16:27:02 +0200 Subject: [PATCH 05/63] It should verify the actual string contains an expected word. --- .../java/testasyouthink/GivenWhenThenDsl.java | 8 ++--- .../main/java/testasyouthink/ThenStep.java | 5 +-- .../verification/FluentAssertions.java | 12 +++++-- .../ThenFluentAssertionsTest.java | 31 ++++++++++++++++++- 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java index fd7a720..dd06316 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java @@ -22,6 +22,7 @@ package testasyouthink; +import org.assertj.core.api.AbstractAssert; import testasyouthink.GivenWhenThenDsl.ExecutionStage.When; import testasyouthink.GivenWhenThenDsl.ExecutionStage.WhenApplyingOneArgument; import testasyouthink.GivenWhenThenDsl.ExecutionStage.WhenApplyingThreeArguments; @@ -38,7 +39,6 @@ import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedTriConsumer; import testasyouthink.function.CheckedTriFunction; -import testasyouthink.verification.FluentAssertions; import java.time.Duration; import java.util.List; @@ -188,7 +188,7 @@ ThenFailure whenSutRunsOutsideOperatingConditions( interface VerificationStage { - interface Then<$SystemUnderTest, $Result> extends ThenResult<$Result> { + interface Then<$SystemUnderTest, $Result> extends ThenResult { AndThen<$SystemUnderTest, $Result> then(Consumer<$Result> thenStep); @@ -274,9 +274,9 @@ interface AndThenFailure { AndThenFailure withCauseMessage(String expectedMessage); } - interface ThenResult<$Result> { + interface ThenResult { - FluentAssertions<$Result> thenResult(); + <$ConcreteAssert extends AbstractAssert> $ConcreteAssert thenResult(); } } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java index 67bca4c..142abff 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java @@ -22,6 +22,7 @@ package testasyouthink; +import org.assertj.core.api.AbstractAssert; import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThen; import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThenFailure; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -183,7 +184,7 @@ public AndThenFailure withCauseMessage(String expectedMessage) { } @Override - public FluentAssertions<$Result> thenResult() { - return new FluentAssertions<>(context.returnResultOrVoid()); + public <$ConcreteAssert extends AbstractAssert> $ConcreteAssert thenResult() { + return FluentAssertions.toAssertj(context.returnResultOrVoid()); } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java index ba1ed17..509d9e4 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java @@ -24,9 +24,15 @@ import org.assertj.core.api.AbstractAssert; -public class FluentAssertions<$Result> extends AbstractAssert, $Result> { +import static org.assertj.core.api.Assertions.assertThat; - public FluentAssertions($Result result) { - super(result, FluentAssertions.class); +public class FluentAssertions { + + public static <$ConcreteAssert extends AbstractAssert, $Result> $ConcreteAssert toAssertj($Result result) { + if (result instanceof String) { + return ($ConcreteAssert) assertThat((String) result); + } else { + throw new UnsupportedOperationException(); + } } } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java index edd6939..e8cd0a8 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java @@ -22,6 +22,7 @@ package testasyouthink; +import org.assertj.core.api.StringAssert; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; @@ -61,7 +62,7 @@ public void should_verify_the_actual_string_is_equal_to_an_expected_result() { } @Test - public void should_verify_the_actual_string_is_not_equal_to_an_expected_result() { + public void should_fail_to_verify_the_actual_string_is_not_equal_to_an_expected_result() { // WHEN Throwable thrown = catchThrowable(() -> when(() -> { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); @@ -76,4 +77,32 @@ public void should_verify_the_actual_string_is_not_equal_to_an_expected_result() verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); verifyNoMoreInteractions(gwtMock); } + + @Test + public void should_verify_the_actual_string_contains_an_expected_word() { + // WHEN + when(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return "expected result"; + }).thenResult().contains("expected"); + + // THEN + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } + + @Test + public void should_fail_to_verify_the_actual_string_contains_an_expected_word() { + // WHEN + Throwable thrown = catchThrowable(() -> when(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return "actual"; + }).thenResult().contains("expected")); + + // THEN + LOGGER.debug("Stack trace", thrown); + assertThat(thrown).isInstanceOf(AssertionError.class); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } } From 6f0f69fcf02d692e4a8fa069d48f661ff19a4151 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sat, 5 Aug 2017 17:17:50 +0200 Subject: [PATCH 06/63] Refactor to invert the dependency between the Then and ThenResult interfaces. --- .../java/testasyouthink/GivenWhenThenDsl.java | 4 +- .../java/testasyouthink/TestAsYouThink.java | 11 ++++-- .../java/testasyouthink/ThenResultStep.java | 39 +++++++++++++++++++ .../main/java/testasyouthink/ThenStep.java | 9 +---- 4 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java index dd06316..1aa9293 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java @@ -188,7 +188,7 @@ ThenFailure whenSutRunsOutsideOperatingConditions( interface VerificationStage { - interface Then<$SystemUnderTest, $Result> extends ThenResult { + interface Then<$SystemUnderTest, $Result> { AndThen<$SystemUnderTest, $Result> then(Consumer<$Result> thenStep); @@ -274,7 +274,7 @@ interface AndThenFailure { AndThenFailure withCauseMessage(String expectedMessage); } - interface ThenResult { + interface ThenResult<$Result> extends Then { <$ConcreteAssert extends AbstractAssert> $ConcreteAssert thenResult(); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index af2872d..b09ceba 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -24,12 +24,14 @@ import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; -import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; +import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenWithoutResult; +import testasyouthink.execution.Event; import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.Functions; +import testasyouthink.preparation.Preparation; import java.util.function.Consumer; import java.util.function.Supplier; @@ -62,8 +64,11 @@ public static ThenWithoutResult when(Runnable whenStep) { return thenStepFactory.createThenStep(functions.toCheckedConsumer(whenStep)); } - public static <$Result> Then when(Supplier<$Result> whenStep) { - return thenStepFactory.createThenStep(functions.toCheckedFunction(whenStep)); + public static <$Result> ThenResult<$Result> when(Supplier<$Result> whenStep) { + Preparation nothingToPrepare = new Preparation<>(); + Event event = new Event<>(nothingToPrepare.supplySut(), functions.toCheckedFunction(whenStep)); + GivenWhenContext context = new GivenWhenContext<>(nothingToPrepare, event); + return new ThenResultStep<>(context); } public static <$SystemUnderTest, $Result> CheckedFunction<$SystemUnderTest, $Result> withReturn( diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java new file mode 100644 index 0000000..31b63d0 --- /dev/null +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java @@ -0,0 +1,39 @@ +/*- + * #%L + * Test As You Think + * %% + * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + */ + +package testasyouthink; + +import org.assertj.core.api.AbstractAssert; +import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; +import testasyouthink.verification.FluentAssertions; + +public class ThenResultStep<$Result> extends ThenStep implements ThenResult<$Result> { + + ThenResultStep(GivenWhenContext context) { + super(context); + } + + @Override + public <$ConcreteAssert extends AbstractAssert> $ConcreteAssert thenResult() { + return FluentAssertions.toAssertj(context.returnResultOrVoid()); + } +} diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java index 142abff..ba08f14 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java @@ -22,13 +22,11 @@ package testasyouthink; -import org.assertj.core.api.AbstractAssert; import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThen; import testasyouthink.GivenWhenThenDsl.VerificationStage.AndThenFailure; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; import testasyouthink.verification.Assertions; -import testasyouthink.verification.FluentAssertions; import java.time.Duration; import java.util.List; @@ -43,7 +41,7 @@ public class ThenStep<$SystemUnderTest, $Result> implements Then<$SystemUnderTes AndThen<$SystemUnderTest, $Result>, ThenFailure, AndThenFailure { private static final String MISSING_EXCEPTION = "Expecting a failure, but it was missing."; - private final GivenWhenContext<$SystemUnderTest, $Result> context; + protected final GivenWhenContext<$SystemUnderTest, $Result> context; ThenStep(GivenWhenContext<$SystemUnderTest, $Result> context) { this.context = context; @@ -182,9 +180,4 @@ public AndThenFailure withCauseMessage(String expectedMessage) { .spendsAtMost(duration); return this; } - - @Override - public <$ConcreteAssert extends AbstractAssert> $ConcreteAssert thenResult() { - return FluentAssertions.toAssertj(context.returnResultOrVoid()); - } } From 7748c086323ff2a3cceaf6bdbbcd3f2e791a053f Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 6 Aug 2017 21:29:50 +0200 Subject: [PATCH 07/63] Try to make this code compile in a test. - The code base compiles but not the test code, because of incompatible types, between an expected type and a captured type. - Some pieces of test code have been commented. --- .../java/testasyouthink/GivenWhenThenDsl.java | 4 ++-- .../java/testasyouthink/TestAsYouThink.java | 12 ++++++++-- .../java/testasyouthink/ThenResultStep.java | 13 ++++++----- .../testasyouthink/StartingWithWhenTest.java | 12 +++++----- .../ThenFluentAssertionsTest.java | 23 +++++++++++++++++-- 5 files changed, 46 insertions(+), 18 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java index 1aa9293..44e7938 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java @@ -274,9 +274,9 @@ interface AndThenFailure { AndThenFailure withCauseMessage(String expectedMessage); } - interface ThenResult<$Result> extends Then { + interface ThenResult<$Assertions extends AbstractAssert> { - <$ConcreteAssert extends AbstractAssert> $ConcreteAssert thenResult(); + $Assertions thenResult(); } } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index b09ceba..e494b28 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -22,6 +22,8 @@ package testasyouthink; +import org.assertj.core.api.AbstractAssert; +import org.assertj.core.api.StringAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; @@ -64,11 +66,17 @@ public static ThenWithoutResult when(Runnable whenStep) { return thenStepFactory.createThenStep(functions.toCheckedConsumer(whenStep)); } - public static <$Result> ThenResult<$Result> when(Supplier<$Result> whenStep) { + public static <$Result> ThenResult when(Supplier<$Result> whenStep) { Preparation nothingToPrepare = new Preparation<>(); Event event = new Event<>(nothingToPrepare.supplySut(), functions.toCheckedFunction(whenStep)); GivenWhenContext context = new GivenWhenContext<>(nothingToPrepare, event); - return new ThenResultStep<>(context); + $Result result = context.returnResultOrVoid(); + + if (result instanceof String) + return new ThenResultStep<>(new StringAssert((String) result)); + else { + throw new UnsupportedOperationException(); + } } public static <$SystemUnderTest, $Result> CheckedFunction<$SystemUnderTest, $Result> withReturn( diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java index 31b63d0..29c5d0f 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java @@ -24,16 +24,17 @@ import org.assertj.core.api.AbstractAssert; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; -import testasyouthink.verification.FluentAssertions; -public class ThenResultStep<$Result> extends ThenStep implements ThenResult<$Result> { +public class ThenResultStep<$Assertions extends AbstractAssert> implements ThenResult<$Assertions> { - ThenResultStep(GivenWhenContext context) { - super(context); + private $Assertions assertions; + + ThenResultStep($Assertions assertions) { + this.assertions = assertions; } @Override - public <$ConcreteAssert extends AbstractAssert> $ConcreteAssert thenResult() { - return FluentAssertions.toAssertj(context.returnResultOrVoid()); + public $Assertions thenResult() { + return assertions; } } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java b/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java index 9bffe97..1b8a4bf 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java @@ -72,10 +72,10 @@ public void should_start_with_when_given_a_non_void_method() { GivenWhenThenDefinition gwtMock = mock(GivenWhenThenDefinition.class); // WHEN - when(sut::nonVoidMethod).then(result -> { - assertThat(result).isEqualTo("expected result"); - gwtMock.thenTheActualResultIsInKeepingWithTheExpectedResult(); - }); + // when(sut::nonVoidMethod).then(result -> { + // assertThat(result).isEqualTo("expected result"); + // gwtMock.thenTheActualResultIsInKeepingWithTheExpectedResult(); + // }); // THEN InOrder inOrder = Mockito.inOrder(sut, gwtMock); @@ -109,8 +109,8 @@ public void should_fail_to_verify_a_failure_by_starting_by_the_when_step() throw when(systemUnderTestMock.nonVoidMethodWithThrowsClause()).thenReturn("expected result"); // WHEN - Throwable thrown = catchThrowable(() -> whenOutsideOperatingConditions( - systemUnderTestMock::nonVoidMethodWithThrowsClause).thenItFails()); + Throwable thrown = catchThrowable( + () -> whenOutsideOperatingConditions(systemUnderTestMock::nonVoidMethodWithThrowsClause).thenItFails()); // THEN LOGGER.debug("Stack trace", thrown); diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java index e8cd0a8..6ee2b45 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java @@ -22,11 +22,13 @@ package testasyouthink; +import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.StringAssert; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; import testasyouthink.fixture.GivenWhenThenDefinition; import static org.assertj.core.api.Assertions.assertThat; @@ -78,13 +80,27 @@ public void should_fail_to_verify_the_actual_string_is_not_equal_to_an_expected_ verifyNoMoreInteractions(gwtMock); } + @Test + public void should_compile_before_running() { + ThenResultStep thenResultStep = new ThenResultStep<>(new StringAssert("plein de bonnes choses")); + thenResultStep + .thenResult() + .contains("bonnes"); + ThenResult thenResult = when(() -> "expected result"); + StringAssert stringAssert = thenResult.thenResult(); + stringAssert.contains("expected result"); + } + @Test public void should_verify_the_actual_string_contains_an_expected_word() { // WHEN when(() -> { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return "expected result"; - }).thenResult().contains("expected"); + }) + .thenResult() + .isEqualTo("expected result"); + //.contains("expected"); // THEN verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); @@ -97,7 +113,10 @@ public void should_fail_to_verify_the_actual_string_contains_an_expected_word() Throwable thrown = catchThrowable(() -> when(() -> { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return "actual"; - }).thenResult().contains("expected")); + }) + .thenResult() + .isEqualTo("expected")); + //.contains("expected")); // THEN LOGGER.debug("Stack trace", thrown); From 629505bc38f45fd19f658161bc8bee41a924fa3c Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 6 Aug 2017 22:26:05 +0200 Subject: [PATCH 08/63] Try to make this code compile in a test. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 7 ++++--- .../src/main/java/testasyouthink/ThenResultStep.java | 5 +++-- .../java/testasyouthink/ThenFluentAssertionsTest.java | 8 +++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index e494b28..9c2e7d1 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -23,7 +23,7 @@ package testasyouthink; import org.assertj.core.api.AbstractAssert; -import org.assertj.core.api.StringAssert; +import org.assertj.core.api.Assertions; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; @@ -66,14 +66,15 @@ public static ThenWithoutResult when(Runnable whenStep) { return thenStepFactory.createThenStep(functions.toCheckedConsumer(whenStep)); } - public static <$Result> ThenResult when(Supplier<$Result> whenStep) { + public static <$Result, $Assertions extends AbstractAssert> ThenResult<$Assertions> when( + Supplier<$Result> whenStep) { Preparation nothingToPrepare = new Preparation<>(); Event event = new Event<>(nothingToPrepare.supplySut(), functions.toCheckedFunction(whenStep)); GivenWhenContext context = new GivenWhenContext<>(nothingToPrepare, event); $Result result = context.returnResultOrVoid(); if (result instanceof String) - return new ThenResultStep<>(new StringAssert((String) result)); + return new ThenResultStep<>(result, Assertions.assertThat((String) result)); else { throw new UnsupportedOperationException(); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java index 29c5d0f..05b0805 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java @@ -25,11 +25,12 @@ import org.assertj.core.api.AbstractAssert; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; -public class ThenResultStep<$Assertions extends AbstractAssert> implements ThenResult<$Assertions> { +public class ThenResultStep<$Result, $Assertions extends AbstractAssert> implements + ThenResult<$Assertions> { private $Assertions assertions; - ThenResultStep($Assertions assertions) { + ThenResultStep($Result result, $Assertions assertions) { this.assertions = assertions; } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java index 6ee2b45..ef123a3 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java @@ -23,6 +23,8 @@ package testasyouthink; import org.assertj.core.api.AbstractAssert; +import org.assertj.core.api.AbstractCharSequenceAssert; +import org.assertj.core.api.Assertions; import org.assertj.core.api.StringAssert; import org.junit.Before; import org.junit.Test; @@ -82,7 +84,11 @@ public void should_fail_to_verify_the_actual_string_is_not_equal_to_an_expected_ @Test public void should_compile_before_running() { - ThenResultStep thenResultStep = new ThenResultStep<>(new StringAssert("plein de bonnes choses")); + AbstractCharSequenceAssert charSequenceAssert = Assertions.assertThat("actual"); + AbstractCharSequenceAssert charSequenceAssert1 = charSequenceAssert.contains("ac"); + + ThenResultStep thenResultStep = new ThenResultStep<>("plein de bonnes choses", + new StringAssert("plein de bonnes choses")); thenResultStep .thenResult() .contains("bonnes"); From ee30f3ad8ce512066fd5cf66a9ddfdb038a3596c Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 6 Aug 2017 22:27:43 +0200 Subject: [PATCH 09/63] Revert all the commits of the feature branch. --- .../java/testasyouthink/GivenWhenContext.java | 4 +- .../java/testasyouthink/GivenWhenThenDsl.java | 6 - .../java/testasyouthink/TestAsYouThink.java | 20 +-- .../java/testasyouthink/ThenResultStep.java | 41 ------ .../main/java/testasyouthink/ThenStep.java | 2 +- .../verification/FluentAssertions.java | 38 ----- .../testasyouthink/StartingWithWhenTest.java | 12 +- .../ThenFluentAssertionsTest.java | 133 ------------------ 8 files changed, 12 insertions(+), 244 deletions(-) delete mode 100644 test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java delete mode 100644 test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java delete mode 100644 test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java index e451f1c..af5149f 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenContext.java @@ -25,7 +25,7 @@ import testasyouthink.execution.Event; import testasyouthink.preparation.Preparation; -public class GivenWhenContext<$SystemUnderTest, $Result> { +class GivenWhenContext<$SystemUnderTest, $Result> { private final Preparation<$SystemUnderTest> preparation; private final Event<$SystemUnderTest, $Result> event; @@ -36,7 +36,7 @@ public class GivenWhenContext<$SystemUnderTest, $Result> { this.event = event; } - public $Result returnResultOrVoid() { + $Result returnResultOrVoid() { if (result == null) { preparation.prepareFixtures(); result = event.happen(); diff --git a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java index 44e7938..230ef05 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/GivenWhenThenDsl.java @@ -22,7 +22,6 @@ package testasyouthink; -import org.assertj.core.api.AbstractAssert; import testasyouthink.GivenWhenThenDsl.ExecutionStage.When; import testasyouthink.GivenWhenThenDsl.ExecutionStage.WhenApplyingOneArgument; import testasyouthink.GivenWhenThenDsl.ExecutionStage.WhenApplyingThreeArguments; @@ -273,10 +272,5 @@ interface AndThenFailure { AndThenFailure withCauseMessage(String expectedMessage); } - - interface ThenResult<$Assertions extends AbstractAssert> { - - $Assertions thenResult(); - } } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 9c2e7d1..af2872d 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -22,18 +22,14 @@ package testasyouthink; -import org.assertj.core.api.AbstractAssert; -import org.assertj.core.api.Assertions; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; +import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; -import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenWithoutResult; -import testasyouthink.execution.Event; import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.Functions; -import testasyouthink.preparation.Preparation; import java.util.function.Consumer; import java.util.function.Supplier; @@ -66,18 +62,8 @@ public static ThenWithoutResult when(Runnable whenStep) { return thenStepFactory.createThenStep(functions.toCheckedConsumer(whenStep)); } - public static <$Result, $Assertions extends AbstractAssert> ThenResult<$Assertions> when( - Supplier<$Result> whenStep) { - Preparation nothingToPrepare = new Preparation<>(); - Event event = new Event<>(nothingToPrepare.supplySut(), functions.toCheckedFunction(whenStep)); - GivenWhenContext context = new GivenWhenContext<>(nothingToPrepare, event); - $Result result = context.returnResultOrVoid(); - - if (result instanceof String) - return new ThenResultStep<>(result, Assertions.assertThat((String) result)); - else { - throw new UnsupportedOperationException(); - } + public static <$Result> Then when(Supplier<$Result> whenStep) { + return thenStepFactory.createThenStep(functions.toCheckedFunction(whenStep)); } public static <$SystemUnderTest, $Result> CheckedFunction<$SystemUnderTest, $Result> withReturn( diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java deleted file mode 100644 index 05b0805..0000000 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenResultStep.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * #%L - * Test As You Think - * %% - * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * #L% - */ - -package testasyouthink; - -import org.assertj.core.api.AbstractAssert; -import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; - -public class ThenResultStep<$Result, $Assertions extends AbstractAssert> implements - ThenResult<$Assertions> { - - private $Assertions assertions; - - ThenResultStep($Result result, $Assertions assertions) { - this.assertions = assertions; - } - - @Override - public $Assertions thenResult() { - return assertions; - } -} diff --git a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java index ba08f14..3c368e4 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/ThenStep.java @@ -41,7 +41,7 @@ public class ThenStep<$SystemUnderTest, $Result> implements Then<$SystemUnderTes AndThen<$SystemUnderTest, $Result>, ThenFailure, AndThenFailure { private static final String MISSING_EXCEPTION = "Expecting a failure, but it was missing."; - protected final GivenWhenContext<$SystemUnderTest, $Result> context; + private final GivenWhenContext<$SystemUnderTest, $Result> context; ThenStep(GivenWhenContext<$SystemUnderTest, $Result> context) { this.context = context; diff --git a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java b/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java deleted file mode 100644 index 509d9e4..0000000 --- a/test-as-you-think-core/src/main/java/testasyouthink/verification/FluentAssertions.java +++ /dev/null @@ -1,38 +0,0 @@ -/*- - * #%L - * Test As You Think - * %% - * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * #L% - */ - -package testasyouthink.verification; - -import org.assertj.core.api.AbstractAssert; - -import static org.assertj.core.api.Assertions.assertThat; - -public class FluentAssertions { - - public static <$ConcreteAssert extends AbstractAssert, $Result> $ConcreteAssert toAssertj($Result result) { - if (result instanceof String) { - return ($ConcreteAssert) assertThat((String) result); - } else { - throw new UnsupportedOperationException(); - } - } -} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java b/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java index 1b8a4bf..9bffe97 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/StartingWithWhenTest.java @@ -72,10 +72,10 @@ public void should_start_with_when_given_a_non_void_method() { GivenWhenThenDefinition gwtMock = mock(GivenWhenThenDefinition.class); // WHEN - // when(sut::nonVoidMethod).then(result -> { - // assertThat(result).isEqualTo("expected result"); - // gwtMock.thenTheActualResultIsInKeepingWithTheExpectedResult(); - // }); + when(sut::nonVoidMethod).then(result -> { + assertThat(result).isEqualTo("expected result"); + gwtMock.thenTheActualResultIsInKeepingWithTheExpectedResult(); + }); // THEN InOrder inOrder = Mockito.inOrder(sut, gwtMock); @@ -109,8 +109,8 @@ public void should_fail_to_verify_a_failure_by_starting_by_the_when_step() throw when(systemUnderTestMock.nonVoidMethodWithThrowsClause()).thenReturn("expected result"); // WHEN - Throwable thrown = catchThrowable( - () -> whenOutsideOperatingConditions(systemUnderTestMock::nonVoidMethodWithThrowsClause).thenItFails()); + Throwable thrown = catchThrowable(() -> whenOutsideOperatingConditions( + systemUnderTestMock::nonVoidMethodWithThrowsClause).thenItFails()); // THEN LOGGER.debug("Stack trace", thrown); diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java deleted file mode 100644 index ef123a3..0000000 --- a/test-as-you-think-core/src/test/java/testasyouthink/ThenFluentAssertionsTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/*- - * #%L - * Test As You Think - * %% - * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * #L% - */ - -package testasyouthink; - -import org.assertj.core.api.AbstractAssert; -import org.assertj.core.api.AbstractCharSequenceAssert; -import org.assertj.core.api.Assertions; -import org.assertj.core.api.StringAssert; -import org.junit.Before; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenResult; -import testasyouthink.fixture.GivenWhenThenDefinition; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static testasyouthink.TestAsYouThink.when; - -public class ThenFluentAssertionsTest { - - private static final Logger LOGGER = LoggerFactory.getLogger(ThenFluentAssertionsTest.class); - private GivenWhenThenDefinition gwtMock; - - @Before - public void prepareFixtures() { - gwtMock = mock(GivenWhenThenDefinition.class); - } - - @Test - public void should_verify_the_actual_string_is_equal_to_an_expected_result() { - // WHEN - when(() -> { - gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); - return "expected result"; - }) - .thenResult() - .isEqualTo("expected result"); - - // THEN - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); - } - - @Test - public void should_fail_to_verify_the_actual_string_is_not_equal_to_an_expected_result() { - // WHEN - Throwable thrown = catchThrowable(() -> when(() -> { - gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); - return "actual result"; - }) - .thenResult() - .isEqualTo("expected result")); - - // THEN - LOGGER.debug("Stack trace", thrown); - assertThat(thrown).isInstanceOf(AssertionError.class); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); - } - - @Test - public void should_compile_before_running() { - AbstractCharSequenceAssert charSequenceAssert = Assertions.assertThat("actual"); - AbstractCharSequenceAssert charSequenceAssert1 = charSequenceAssert.contains("ac"); - - ThenResultStep thenResultStep = new ThenResultStep<>("plein de bonnes choses", - new StringAssert("plein de bonnes choses")); - thenResultStep - .thenResult() - .contains("bonnes"); - ThenResult thenResult = when(() -> "expected result"); - StringAssert stringAssert = thenResult.thenResult(); - stringAssert.contains("expected result"); - } - - @Test - public void should_verify_the_actual_string_contains_an_expected_word() { - // WHEN - when(() -> { - gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); - return "expected result"; - }) - .thenResult() - .isEqualTo("expected result"); - //.contains("expected"); - - // THEN - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); - } - - @Test - public void should_fail_to_verify_the_actual_string_contains_an_expected_word() { - // WHEN - Throwable thrown = catchThrowable(() -> when(() -> { - gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); - return "actual"; - }) - .thenResult() - .isEqualTo("expected")); - //.contains("expected")); - - // THEN - LOGGER.debug("Stack trace", thrown); - assertThat(thrown).isInstanceOf(AssertionError.class); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); - } -} From f5266af29245bc287bf18c83cf6933c9c7f155f9 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 6 Aug 2017 23:36:50 +0200 Subject: [PATCH 10/63] It should verify an actual string is conform to an expected result. --- .../java/testasyouthink/TestAsYouThink.java | 13 +++++ .../testasyouthink/ResultOfEventTest.java | 50 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index af2872d..7b47a73 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -22,6 +22,8 @@ package testasyouthink; +import org.assertj.core.api.AbstractCharSequenceAssert; +import org.assertj.core.api.Assertions; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -29,6 +31,7 @@ import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenWithoutResult; import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; +import testasyouthink.function.CheckedSupplier; import testasyouthink.function.Functions; import java.util.function.Consumer; @@ -74,4 +77,14 @@ public static ThenWithoutResult when(Runnable whenStep) { public static ThenFailure whenOutsideOperatingConditions(CheckedRunnable whenStep) { return thenStepFactory.createThenStep(functions.toFunctionWithThrowableAsResult(whenStep)); } + + public static AbstractCharSequenceAssert resultOf(CheckedSupplier whenStep) { + String result = null; + try { + result = whenStep.get(); + } catch (Throwable throwable) { + throw new RuntimeException("Not yet implemented!"); + } + return Assertions.assertThat(result); + } } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java new file mode 100644 index 0000000..866feda --- /dev/null +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -0,0 +1,50 @@ +package testasyouthink; + +import org.junit.Before; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import testasyouthink.fixture.GivenWhenThenDefinition; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static testasyouthink.TestAsYouThink.resultOf; + +public class ResultOfEventTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(ResultOfEventTest.class); + private GivenWhenThenDefinition gwtMock; + + @Before + public void prepareFixtures() { + gwtMock = mock(GivenWhenThenDefinition.class); + } + + @Test + public void should_verify_an_actual_string_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return "expected result"; + }) + .isEqualTo("expected result") + .contains("result")).hasSameClassAs(assertThat("")); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } + + @Test + public void should_fail_to_verify_an_actual_string_is_conform_to_an_expected_result() { + // WHEN + Throwable thrown = catchThrowable(() -> resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return "actual"; + }).isEqualTo("expected")); + + // THEN + LOGGER.debug("Stack trace", thrown); + assertThat(thrown).isInstanceOf(AssertionError.class); + } +} From 8d118b22d4cfdd57dc3300a8d32bd3b140539706 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 6 Aug 2017 23:50:33 +0200 Subject: [PATCH 11/63] It should fail to execute because of an unexpected failure. --- .../java/testasyouthink/TestAsYouThink.java | 5 ++- .../testasyouthink/ResultOfEventTest.java | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 7b47a73..5a709fe 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -29,6 +29,7 @@ import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenWithoutResult; +import testasyouthink.execution.ExecutionError; import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; @@ -39,6 +40,8 @@ public class TestAsYouThink { + private static final String EXECUTION_ERROR_MESSAGE = "Fails to execute the target method " // + + "of the system under test because of an unexpected failure!"; private static Functions functions = Functions.INSTANCE; private static ThenStepFactory thenStepFactory = ThenStepFactory.INSTANCE; @@ -83,7 +86,7 @@ public static AbstractCharSequenceAssert resultOf(CheckedSupplier. + * #L% + */ + package testasyouthink; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import testasyouthink.execution.ExecutionError; import testasyouthink.fixture.GivenWhenThenDefinition; +import testasyouthink.fixture.UnexpectedException; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -16,6 +40,8 @@ public class ResultOfEventTest { private static final Logger LOGGER = LoggerFactory.getLogger(ResultOfEventTest.class); + private static final String EXPECTED_ERROR_MESSAGE = "Fails to execute the target method " // + + "of the system under test because of an unexpected failure!"; private GivenWhenThenDefinition gwtMock; @Before @@ -47,4 +73,19 @@ public void should_fail_to_verify_an_actual_string_is_conform_to_an_expected_res LOGGER.debug("Stack trace", thrown); assertThat(thrown).isInstanceOf(AssertionError.class); } + + @Test + public void should_fail_to_execute_because_of_an_unexpected_failure() { + // WHEN + Throwable thrown = catchThrowable(() -> resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + throw new UnexpectedException(); + }).isEqualTo("expected")); + + // THEN + LOGGER.debug("Stack trace", thrown); + assertThat(thrown) + .isInstanceOf(ExecutionError.class) + .hasMessage(EXPECTED_ERROR_MESSAGE); + } } From 42071466eab4163762f2af564b9fff063e79a49b Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 00:04:57 +0200 Subject: [PATCH 12/63] Refactor to extract the execution failure messages. --- .../java/testasyouthink/TestAsYouThink.java | 6 ++-- .../java/testasyouthink/execution/Event.java | 5 +-- .../GivenArgumentsWhenFailuresTest.java | 15 ++++----- .../testasyouthink/ResultOfEventTest.java | 5 ++- .../java/testasyouthink/WhenFailuresTest.java | 7 ++-- .../fixture/Specifications.java | 32 +++++++++++++++++++ 6 files changed, 50 insertions(+), 20 deletions(-) create mode 100644 test-as-you-think-core/src/test/java/testasyouthink/fixture/Specifications.java diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 5a709fe..31c3933 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -38,10 +38,10 @@ import java.util.function.Consumer; import java.util.function.Supplier; +import static testasyouthink.execution.Event.EXECUTION_FAILURE_MESSAGE; + public class TestAsYouThink { - private static final String EXECUTION_ERROR_MESSAGE = "Fails to execute the target method " // - + "of the system under test because of an unexpected failure!"; private static Functions functions = Functions.INSTANCE; private static ThenStepFactory thenStepFactory = ThenStepFactory.INSTANCE; @@ -86,7 +86,7 @@ public static AbstractCharSequenceAssert resultOf(CheckedSupplier { + public static final String EXECUTION_FAILURE_MESSAGE = "Fails to execute the target method " // + + "of the system under test because of an unexpected failure!"; private final Functions functions = Functions.INSTANCE; private final Supplier<$SystemUnderTest> givenSutStep; private final CheckedFunction<$SystemUnderTest, $Result> whenStep; @@ -52,8 +54,7 @@ public Event(Supplier<$SystemUnderTest> givenSutStep, CheckedConsumer<$SystemUnd } catch (PreparationError preparationError) { throw preparationError; } catch (Throwable throwable) { - throw new ExecutionError("Fails to execute the target method of the system under test " // - + "because of an unexpected exception!", throwable); + throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); } return result; diff --git a/test-as-you-think-core/src/test/java/testasyouthink/GivenArgumentsWhenFailuresTest.java b/test-as-you-think-core/src/test/java/testasyouthink/GivenArgumentsWhenFailuresTest.java index 6711c32..424bcd4 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/GivenArgumentsWhenFailuresTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/GivenArgumentsWhenFailuresTest.java @@ -39,6 +39,7 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.expectLastCall; import static testasyouthink.TestAsYouThink.givenSut; +import static testasyouthink.fixture.Specifications.ExpectedMessage.EXPECTED_EXECUTION_FAILURE_MESSAGE; public class GivenArgumentsWhenFailuresTest { @@ -46,8 +47,6 @@ public class GivenArgumentsWhenFailuresTest { private static final String GIVEN_STRING = "given argument"; private static final int GIVEN_INTEGER = 201705; private static final boolean GIVEN_BOOLEAN = false; - private static final String EXPECTED_ERROR_MESSAGE = "Fails to execute the target method " // - + "of the system under test because of an unexpected exception!"; private IMocksControl mocksControl; private SystemUnderTest systemUnderTestMock; @@ -88,7 +87,7 @@ public void should_fail_to_execute_given_a_void_method_with_one_parameter() thro LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); } @@ -112,7 +111,7 @@ public void should_fail_to_execute_given_a_non_void_method_with_one_parameter() LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); } @@ -142,7 +141,7 @@ public void should_fail_to_execute_given_a_void_method_with_two_parameters() thr LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); } @@ -172,7 +171,7 @@ public void should_fail_to_execute_given_a_non_void_method_with_two_parameters() LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); } @@ -206,7 +205,7 @@ public void should_fail_to_execute_given_a_void_method_with_three_parameters() t LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); } @@ -240,7 +239,7 @@ public void should_fail_to_execute_given_a_non_void_method_with_three_parameters LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); } } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 42938fb..f7cfa5c 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -36,12 +36,11 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static testasyouthink.TestAsYouThink.resultOf; +import static testasyouthink.fixture.Specifications.ExpectedMessage.EXPECTED_EXECUTION_FAILURE_MESSAGE; public class ResultOfEventTest { private static final Logger LOGGER = LoggerFactory.getLogger(ResultOfEventTest.class); - private static final String EXPECTED_ERROR_MESSAGE = "Fails to execute the target method " // - + "of the system under test because of an unexpected failure!"; private GivenWhenThenDefinition gwtMock; @Before @@ -86,6 +85,6 @@ public void should_fail_to_execute_because_of_an_unexpected_failure() { LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE); + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE); } } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/WhenFailuresTest.java b/test-as-you-think-core/src/test/java/testasyouthink/WhenFailuresTest.java index 6ca534c..059368e 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/WhenFailuresTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/WhenFailuresTest.java @@ -40,12 +40,11 @@ import static org.easymock.EasyMock.strictMock; import static org.easymock.EasyMock.verify; import static testasyouthink.TestAsYouThink.givenSut; +import static testasyouthink.fixture.Specifications.ExpectedMessage.EXPECTED_EXECUTION_FAILURE_MESSAGE; public class WhenFailuresTest { private static final Logger LOGGER = LoggerFactory.getLogger(WhenFailuresTest.class); - private static final String EXPECTED_ERROR_MESSAGE = "Fails to execute the target method " // - + "of the system under test because of an unexpected exception!"; private SystemUnderTest systemUnderTestMock; private GivenWhenThenDefinition givenWhenThenDefinitionMock; @@ -77,7 +76,7 @@ public void should_fail_to_execute_given_a_non_void_method() throws Throwable { LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); verify(givenWhenThenDefinitionMock); } @@ -99,7 +98,7 @@ public void should_fail_to_execute_given_a_void_method() throws Throwable { LOGGER.debug("Stack trace", thrown); assertThat(thrown) .isInstanceOf(ExecutionError.class) - .hasMessage(EXPECTED_ERROR_MESSAGE) + .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE) .hasCauseInstanceOf(UnexpectedException.class); verify(givenWhenThenDefinitionMock); } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/fixture/Specifications.java b/test-as-you-think-core/src/test/java/testasyouthink/fixture/Specifications.java new file mode 100644 index 0000000..84d210e --- /dev/null +++ b/test-as-you-think-core/src/test/java/testasyouthink/fixture/Specifications.java @@ -0,0 +1,32 @@ +/*- + * #%L + * Test As You Think + * %% + * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + */ + +package testasyouthink.fixture; + +public class Specifications { + + public static class ExpectedMessage { + + public static final String EXPECTED_EXECUTION_FAILURE_MESSAGE = "Fails to execute the target method " // + + "of the system under test because of an unexpected failure!"; + } +} From 5d56c4e139f841d62b5d5ad7f633149e8e640030 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 00:18:05 +0200 Subject: [PATCH 13/63] It should verify an actual integer is conform to an expected result. --- .../java/testasyouthink/TestAsYouThink.java | 23 +++++++++--- .../function/CheckedSuppliers.java | 36 +++++++++++++++++++ .../testasyouthink/ResultOfEventTest.java | 13 ++++++- 3 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 31c3933..a46a26e 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -23,21 +23,24 @@ package testasyouthink; import org.assertj.core.api.AbstractCharSequenceAssert; -import org.assertj.core.api.Assertions; +import org.assertj.core.api.AbstractIntegerAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenWithoutResult; +import testasyouthink.execution.Event; import testasyouthink.execution.ExecutionError; import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; -import testasyouthink.function.CheckedSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; import testasyouthink.function.Functions; import java.util.function.Consumer; import java.util.function.Supplier; +import static org.assertj.core.api.Assertions.assertThat; import static testasyouthink.execution.Event.EXECUTION_FAILURE_MESSAGE; public class TestAsYouThink { @@ -81,13 +84,23 @@ public static ThenFailure whenOutsideOperatingConditions(CheckedRunnable whenSte return thenStepFactory.createThenStep(functions.toFunctionWithThrowableAsResult(whenStep)); } - public static AbstractCharSequenceAssert resultOf(CheckedSupplier whenStep) { - String result = null; + public static AbstractCharSequenceAssert resultOf(CheckedStringSupplier whenStep) { + String result; try { result = whenStep.get(); } catch (Throwable throwable) { throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); } - return Assertions.assertThat(result); + return assertThat(result); + } + + public static AbstractIntegerAssert resultOf(CheckedIntegerSupplier whenStep) { + Integer result; + try { + result = whenStep.get(); + } catch (Throwable throwable) { + throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); + } + return assertThat(result); } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java new file mode 100644 index 0000000..c8e6183 --- /dev/null +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -0,0 +1,36 @@ +/*- + * #%L + * Test As You Think + * %% + * Copyright (C) 2017 Xavier Pigeon and TestAsYouThink contributors + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * #L% + */ + +package testasyouthink.function; + +public interface CheckedSuppliers { + + interface CheckedStringSupplier { + + String get() throws Throwable; + } + + interface CheckedIntegerSupplier { + + Integer get() throws Throwable; + } +} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index f7cfa5c..349f9f9 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -29,6 +29,7 @@ import testasyouthink.execution.ExecutionError; import testasyouthink.fixture.GivenWhenThenDefinition; import testasyouthink.fixture.UnexpectedException; +import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -76,7 +77,7 @@ public void should_fail_to_verify_an_actual_string_is_conform_to_an_expected_res @Test public void should_fail_to_execute_because_of_an_unexpected_failure() { // WHEN - Throwable thrown = catchThrowable(() -> resultOf(() -> { + Throwable thrown = catchThrowable(() -> resultOf((CheckedStringSupplier) () -> { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); throw new UnexpectedException(); }).isEqualTo("expected")); @@ -87,4 +88,14 @@ public void should_fail_to_execute_because_of_an_unexpected_failure() { .isInstanceOf(ExecutionError.class) .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE); } + + @Test + public void should_verify_an_actual_integer_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return 123; + }).isEqualTo(123)).hasSameClassAs(assertThat(123)); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } } From e77b4bc194191b6a14f99cf908970b33647c794f Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 00:33:04 +0200 Subject: [PATCH 14/63] It should verify an actual long is conform to an expected result. --- .../main/java/testasyouthink/TestAsYouThink.java | 13 ++++++++++++- .../testasyouthink/function/CheckedSuppliers.java | 5 +++++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index a46a26e..6cf9e27 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -24,16 +24,17 @@ import org.assertj.core.api.AbstractCharSequenceAssert; import org.assertj.core.api.AbstractIntegerAssert; +import org.assertj.core.api.AbstractLongAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenFailure; import testasyouthink.GivenWhenThenDsl.VerificationStage.ThenWithoutResult; -import testasyouthink.execution.Event; import testasyouthink.execution.ExecutionError; import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; import testasyouthink.function.Functions; @@ -103,4 +104,14 @@ public static AbstractIntegerAssert resultOf(CheckedIntegerSupplier whenStep) } return assertThat(result); } + + public static AbstractLongAssert resultOf(CheckedLongSupplier whenStep) { + Long result; + try { + result = whenStep.get(); + } catch (Throwable throwable) { + throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); + } + return assertThat(result); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index c8e6183..b7ade7b 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -33,4 +33,9 @@ interface CheckedIntegerSupplier { Integer get() throws Throwable; } + + interface CheckedLongSupplier { + + Long get() throws Throwable; + } } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 349f9f9..1dc640a 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -98,4 +98,14 @@ public void should_verify_an_actual_integer_is_conform_to_an_expected_result() { verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); verifyNoMoreInteractions(gwtMock); } + + @Test + public void should_verify_an_actual_long_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return 123L; + }).isEqualTo(123L)).hasSameClassAs(assertThat(123L)); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } } From e9fc30c3586ccfb31dde239bba0970f969dd0b87 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 19:21:33 +0200 Subject: [PATCH 15/63] Refactor to deduplicate code. --- .../java/testasyouthink/TestAsYouThink.java | 27 +++++++------------ .../function/CheckedSuppliers.java | 15 +++-------- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 6cf9e27..eb7ff12 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -33,6 +33,7 @@ import testasyouthink.execution.ExecutionError; import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; +import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -85,33 +86,25 @@ public static ThenFailure whenOutsideOperatingConditions(CheckedRunnable whenSte return thenStepFactory.createThenStep(functions.toFunctionWithThrowableAsResult(whenStep)); } - public static AbstractCharSequenceAssert resultOf(CheckedStringSupplier whenStep) { - String result; + private static <$Result> $Result result(CheckedSupplier<$Result> whenStep) { + $Result result; try { result = whenStep.get(); } catch (Throwable throwable) { throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); } - return assertThat(result); + return result; + } + + public static AbstractCharSequenceAssert resultOf(CheckedStringSupplier whenStep) { + return assertThat(result(whenStep)); } public static AbstractIntegerAssert resultOf(CheckedIntegerSupplier whenStep) { - Integer result; - try { - result = whenStep.get(); - } catch (Throwable throwable) { - throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); - } - return assertThat(result); + return assertThat(result(whenStep)); } public static AbstractLongAssert resultOf(CheckedLongSupplier whenStep) { - Long result; - try { - result = whenStep.get(); - } catch (Throwable throwable) { - throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); - } - return assertThat(result); + return assertThat(result(whenStep)); } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index b7ade7b..46c097b 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -24,18 +24,9 @@ public interface CheckedSuppliers { - interface CheckedStringSupplier { + interface CheckedStringSupplier extends CheckedSupplier {} - String get() throws Throwable; - } + interface CheckedIntegerSupplier extends CheckedSupplier {} - interface CheckedIntegerSupplier { - - Integer get() throws Throwable; - } - - interface CheckedLongSupplier { - - Long get() throws Throwable; - } + interface CheckedLongSupplier extends CheckedSupplier {} } From b8779e4b66cd9b48048f566b8b7dfe344a086ac1 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 19:27:28 +0200 Subject: [PATCH 16/63] It should verify an actual boolean is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index eb7ff12..d3663c2 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -22,6 +22,7 @@ package testasyouthink; +import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractCharSequenceAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; @@ -34,6 +35,7 @@ import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -107,4 +109,8 @@ public static AbstractIntegerAssert resultOf(CheckedIntegerSupplier whenStep) public static AbstractLongAssert resultOf(CheckedLongSupplier whenStep) { return assertThat(result(whenStep)); } + + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 46c097b..5175371 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -29,4 +29,6 @@ interface CheckedStringSupplier extends CheckedSupplier {} interface CheckedIntegerSupplier extends CheckedSupplier {} interface CheckedLongSupplier extends CheckedSupplier {} + + interface CheckedBooleanSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 1dc640a..8b189ef 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -108,4 +108,14 @@ public void should_verify_an_actual_long_is_conform_to_an_expected_result() { verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); verifyNoMoreInteractions(gwtMock); } + + @Test + public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return false; + }).isFalse()).hasSameClassAs(assertThat(false)); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } } From 64cdc74ef13087225dbafebc051c2ca3a5012784 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 19:39:26 +0200 Subject: [PATCH 17/63] It should verify an actual byte is conform to an expected result. --- .../main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../testasyouthink/function/CheckedSuppliers.java | 2 ++ .../java/testasyouthink/ResultOfEventTest.java | 14 ++++++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index d3663c2..14f18b1 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -23,6 +23,7 @@ package testasyouthink; import org.assertj.core.api.AbstractBooleanAssert; +import org.assertj.core.api.AbstractByteAssert; import org.assertj.core.api.AbstractCharSequenceAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; @@ -36,6 +37,7 @@ import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -102,6 +104,10 @@ public static AbstractCharSequenceAssert resultOf(CheckedStringSuppli return assertThat(result(whenStep)); } + public static AbstractByteAssert resultOf(CheckedByteSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractIntegerAssert resultOf(CheckedIntegerSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 5175371..c3f2994 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -31,4 +31,6 @@ interface CheckedIntegerSupplier extends CheckedSupplier {} interface CheckedLongSupplier extends CheckedSupplier {} interface CheckedBooleanSupplier extends CheckedSupplier {} + + interface CheckedByteSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 8b189ef..4098419 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -89,12 +89,22 @@ public void should_fail_to_execute_because_of_an_unexpected_failure() { .hasMessage(EXPECTED_EXECUTION_FAILURE_MESSAGE); } + @Test + public void should_verify_an_actual_byte_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Byte.valueOf("6"); + }).isEqualTo(Byte.valueOf("6"))).hasSameClassAs(assertThat((byte) 6)); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } + @Test public void should_verify_an_actual_integer_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); - return 123; - }).isEqualTo(123)).hasSameClassAs(assertThat(123)); + return Integer.valueOf(123); + }).isEqualTo(Integer.valueOf(123))).hasSameClassAs(assertThat(123)); verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); verifyNoMoreInteractions(gwtMock); } From 9fc09a038b1ed9d98a0103ac9a804aaa229f85fc Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 19:45:01 +0200 Subject: [PATCH 18/63] It should verify an actual float is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 14f18b1..fd6dc32 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -25,6 +25,7 @@ import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractByteAssert; import org.assertj.core.api.AbstractCharSequenceAssert; +import org.assertj.core.api.AbstractFloatAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; @@ -38,6 +39,7 @@ import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -116,6 +118,10 @@ public static AbstractLongAssert resultOf(CheckedLongSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractFloatAssert resultOf(CheckedFloatSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index c3f2994..2fd5bc7 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -30,6 +30,8 @@ interface CheckedIntegerSupplier extends CheckedSupplier {} interface CheckedLongSupplier extends CheckedSupplier {} + interface CheckedFloatSupplier extends CheckedSupplier {} + interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedByteSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 4098419..1cbbed8 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -119,6 +119,16 @@ public void should_verify_an_actual_long_is_conform_to_an_expected_result() { verifyNoMoreInteractions(gwtMock); } + @Test + public void should_verify_an_actual_float_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Float.valueOf("12.34"); + }).isEqualTo(Float.valueOf("12.34"))).hasSameClassAs(assertThat(12.34f)); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 32e9e8fffb7aa7473a17af0e9ab4ce30fed65f08 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 19:48:11 +0200 Subject: [PATCH 19/63] It should verify an actual double is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index fd6dc32..7e8ef69 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -25,6 +25,7 @@ import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractByteAssert; import org.assertj.core.api.AbstractCharSequenceAssert; +import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.api.AbstractFloatAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; @@ -39,6 +40,7 @@ import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; @@ -122,6 +124,10 @@ public static AbstractFloatAssert resultOf(CheckedFloatSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractDoubleAssert resultOf(CheckedDoubleSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 2fd5bc7..25ba3bd 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -32,6 +32,8 @@ interface CheckedLongSupplier extends CheckedSupplier {} interface CheckedFloatSupplier extends CheckedSupplier {} + interface CheckedDoubleSupplier extends CheckedSupplier {} + interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedByteSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 1cbbed8..ab09196 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -129,6 +129,16 @@ public void should_verify_an_actual_float_is_conform_to_an_expected_result() { verifyNoMoreInteractions(gwtMock); } + @Test + public void should_verify_an_actual_double_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Double.valueOf("12.34"); + }).isEqualTo(Double.valueOf("12.34"))).hasSameClassAs(assertThat(12.34d)); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 7b1f53b3630501aa3eb75b89e3e8baa4ccf9a0f1 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 20:26:20 +0200 Subject: [PATCH 20/63] It should verify an actual date is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../testasyouthink/function/CheckedSuppliers.java | 6 +++++- .../test/java/testasyouthink/ResultOfEventTest.java | 12 ++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 7e8ef69..a974ec5 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -25,6 +25,7 @@ import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractByteAssert; import org.assertj.core.api.AbstractCharSequenceAssert; +import org.assertj.core.api.AbstractDateAssert; import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.api.AbstractFloatAssert; import org.assertj.core.api.AbstractIntegerAssert; @@ -40,6 +41,7 @@ import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; @@ -131,4 +133,8 @@ public static AbstractDoubleAssert resultOf(CheckedDoubleSupplier whenStep) { public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } + + public static AbstractDateAssert resultOf(CheckedDateSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 25ba3bd..1a26a8e 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -22,10 +22,14 @@ package testasyouthink.function; +import java.util.Date; + public interface CheckedSuppliers { interface CheckedStringSupplier extends CheckedSupplier {} + interface CheckedByteSupplier extends CheckedSupplier {} + interface CheckedIntegerSupplier extends CheckedSupplier {} interface CheckedLongSupplier extends CheckedSupplier {} @@ -36,5 +40,5 @@ interface CheckedDoubleSupplier extends CheckedSupplier {} interface CheckedBooleanSupplier extends CheckedSupplier {} - interface CheckedByteSupplier extends CheckedSupplier {} + interface CheckedDateSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index ab09196..ef9d402 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -31,6 +31,8 @@ import testasyouthink.fixture.UnexpectedException; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; +import java.util.Date; + import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; import static org.mockito.Mockito.mock; @@ -148,4 +150,14 @@ public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); verifyNoMoreInteractions(gwtMock); } + + @Test + public void should_verify_an_actual_date_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new Date(123456); + }).hasSameTimeAs(new Date(123456))).hasSameClassAs(assertThat(new Date(123456))); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } } From 3b9955b90a7ca46a33021bee228fd9800426cc54 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 20:42:23 +0200 Subject: [PATCH 21/63] It should verify an actual character is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index a974ec5..301f0d3 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -25,6 +25,7 @@ import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractByteAssert; import org.assertj.core.api.AbstractCharSequenceAssert; +import org.assertj.core.api.AbstractCharacterAssert; import org.assertj.core.api.AbstractDateAssert; import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.api.AbstractFloatAssert; @@ -41,6 +42,7 @@ import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedCharacterSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; @@ -106,6 +108,10 @@ public static ThenFailure whenOutsideOperatingConditions(CheckedRunnable whenSte return result; } + public static AbstractCharacterAssert resultOf(CheckedCharacterSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractCharSequenceAssert resultOf(CheckedStringSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 1a26a8e..471e0ed 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -26,6 +26,8 @@ public interface CheckedSuppliers { + interface CheckedCharacterSupplier extends CheckedSupplier {} + interface CheckedStringSupplier extends CheckedSupplier {} interface CheckedByteSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index ef9d402..cd8d21f 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -51,6 +51,16 @@ public void prepareFixtures() { gwtMock = mock(GivenWhenThenDefinition.class); } + @Test + public void should_verify_an_actual_character_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Character.valueOf('b'); + }).isBetween('a', 'c')).hasSameClassAs(assertThat('a')); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } + @Test public void should_verify_an_actual_string_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From c18b07e2abbe176d770570d694f8061d1b6fbbbc Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 20:52:13 +0200 Subject: [PATCH 22/63] It should verify an actual instant is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../testasyouthink/function/CheckedSuppliers.java | 3 +++ .../test/java/testasyouthink/ResultOfEventTest.java | 11 +++++++++++ 3 files changed, 20 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 301f0d3..d97502a 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -29,6 +29,7 @@ import org.assertj.core.api.AbstractDateAssert; import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.api.AbstractFloatAssert; +import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; @@ -46,6 +47,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -143,4 +145,8 @@ public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) public static AbstractDateAssert resultOf(CheckedDateSupplier whenStep) { return assertThat(result(whenStep)); } + + public static AbstractInstantAssert resultOf(CheckedInstantSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 471e0ed..64ce950 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -22,6 +22,7 @@ package testasyouthink.function; +import java.time.Instant; import java.util.Date; public interface CheckedSuppliers { @@ -43,4 +44,6 @@ interface CheckedDoubleSupplier extends CheckedSupplier {} interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} + + interface CheckedInstantSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index cd8d21f..c8b71e5 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -31,6 +31,7 @@ import testasyouthink.fixture.UnexpectedException; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; +import java.time.Instant; import java.util.Date; import static org.assertj.core.api.Assertions.assertThat; @@ -170,4 +171,14 @@ public void should_verify_an_actual_date_is_conform_to_an_expected_result() { verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); verifyNoMoreInteractions(gwtMock); } + + @Test + public void should_verify_an_actual_instant_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Instant.ofEpochSecond(123456); + }).isAfter(Instant.ofEpochSecond(100000))).hasSameClassAs(assertThat(Instant.ofEpochSecond(123456))); + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } } From 94d53aa76b2f0923b680b029eb341d0b15472521 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 20:54:39 +0200 Subject: [PATCH 23/63] Refactor to deduplicate test code. --- .../testasyouthink/ResultOfEventTest.java | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index c8b71e5..dc4d266 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -22,6 +22,7 @@ package testasyouthink; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; @@ -51,6 +52,13 @@ public class ResultOfEventTest { public void prepareFixtures() { gwtMock = mock(GivenWhenThenDefinition.class); } + + @After + public void verifyMocks() { + // THEN + verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); + verifyNoMoreInteractions(gwtMock); + } @Test public void should_verify_an_actual_character_is_conform_to_an_expected_result() { @@ -58,8 +66,6 @@ public void should_verify_an_actual_character_is_conform_to_an_expected_result() gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return Character.valueOf('b'); }).isBetween('a', 'c')).hasSameClassAs(assertThat('a')); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -70,8 +76,6 @@ public void should_verify_an_actual_string_is_conform_to_an_expected_result() { }) .isEqualTo("expected result") .contains("result")).hasSameClassAs(assertThat("")); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -108,8 +112,6 @@ public void should_verify_an_actual_byte_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return Byte.valueOf("6"); }).isEqualTo(Byte.valueOf("6"))).hasSameClassAs(assertThat((byte) 6)); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -118,8 +120,6 @@ public void should_verify_an_actual_integer_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return Integer.valueOf(123); }).isEqualTo(Integer.valueOf(123))).hasSameClassAs(assertThat(123)); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -128,8 +128,6 @@ public void should_verify_an_actual_long_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return 123L; }).isEqualTo(123L)).hasSameClassAs(assertThat(123L)); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -138,8 +136,6 @@ public void should_verify_an_actual_float_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return Float.valueOf("12.34"); }).isEqualTo(Float.valueOf("12.34"))).hasSameClassAs(assertThat(12.34f)); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -148,8 +144,6 @@ public void should_verify_an_actual_double_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return Double.valueOf("12.34"); }).isEqualTo(Double.valueOf("12.34"))).hasSameClassAs(assertThat(12.34d)); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -158,8 +152,6 @@ public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return false; }).isFalse()).hasSameClassAs(assertThat(false)); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -168,8 +160,6 @@ public void should_verify_an_actual_date_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return new Date(123456); }).hasSameTimeAs(new Date(123456))).hasSameClassAs(assertThat(new Date(123456))); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } @Test @@ -178,7 +168,5 @@ public void should_verify_an_actual_instant_is_conform_to_an_expected_result() { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); return Instant.ofEpochSecond(123456); }).isAfter(Instant.ofEpochSecond(100000))).hasSameClassAs(assertThat(Instant.ofEpochSecond(123456))); - verify(gwtMock).whenAnEventHappensInRelationToAnActionOfTheConsumer(); - verifyNoMoreInteractions(gwtMock); } } From 491a02ea2950075ad20499acdcb864913967869d Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 7 Aug 2017 21:14:51 +0200 Subject: [PATCH 24/63] It should verify an actual short is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 +++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index d97502a..d2b3a6b 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -32,6 +32,7 @@ import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; +import org.assertj.core.api.AbstractShortAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -50,6 +51,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; import testasyouthink.function.Functions; @@ -122,6 +124,10 @@ public static AbstractByteAssert resultOf(CheckedByteSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractShortAssert resultOf(CheckedShortSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractIntegerAssert resultOf(CheckedIntegerSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 64ce950..0c8143b 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -33,6 +33,8 @@ interface CheckedStringSupplier extends CheckedSupplier {} interface CheckedByteSupplier extends CheckedSupplier {} + interface CheckedShortSupplier extends CheckedSupplier {} + interface CheckedIntegerSupplier extends CheckedSupplier {} interface CheckedLongSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index dc4d266..224c3df 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -52,7 +52,7 @@ public class ResultOfEventTest { public void prepareFixtures() { gwtMock = mock(GivenWhenThenDefinition.class); } - + @After public void verifyMocks() { // THEN @@ -114,6 +114,14 @@ public void should_verify_an_actual_byte_is_conform_to_an_expected_result() { }).isEqualTo(Byte.valueOf("6"))).hasSameClassAs(assertThat((byte) 6)); } + @Test + public void should_verify_an_actual_short_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Short.valueOf("123"); + }).isEqualTo(Short.valueOf("123"))).hasSameClassAs(assertThat(Short.valueOf("123"))); + } + @Test public void should_verify_an_actual_integer_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From d2ab68fb91fcb5a8c3607afa504091676a8b2a5d Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Tue, 8 Aug 2017 10:07:27 +0200 Subject: [PATCH 25/63] It should verify an actual big integer is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index d2b3a6b..4744335 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -22,6 +22,7 @@ package testasyouthink; +import org.assertj.core.api.AbstractBigIntegerAssert; import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractByteAssert; import org.assertj.core.api.AbstractCharSequenceAssert; @@ -42,6 +43,7 @@ import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedBigIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCharacterSupplier; @@ -144,6 +146,10 @@ public static AbstractDoubleAssert resultOf(CheckedDoubleSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractBigIntegerAssert resultOf(CheckedBigIntegerSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 0c8143b..af6b090 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -22,6 +22,7 @@ package testasyouthink.function; +import java.math.BigInteger; import java.time.Instant; import java.util.Date; @@ -43,6 +44,8 @@ interface CheckedFloatSupplier extends CheckedSupplier {} interface CheckedDoubleSupplier extends CheckedSupplier {} + interface CheckedBigIntegerSupplier extends CheckedSupplier {} + interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 224c3df..d78208b 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -32,6 +32,7 @@ import testasyouthink.fixture.UnexpectedException; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; +import java.math.BigInteger; import java.time.Instant; import java.util.Date; @@ -154,6 +155,14 @@ public void should_verify_an_actual_double_is_conform_to_an_expected_result() { }).isEqualTo(Double.valueOf("12.34"))).hasSameClassAs(assertThat(12.34d)); } + @Test + public void should_verify_an_actual_big_integer_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return BigInteger.valueOf(1234); + }).isEqualTo(BigInteger.valueOf(1234))).hasSameClassAs(assertThat(BigInteger.valueOf(1234))); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 6f11af3e082ad71f98d45ee1299cf5d95a9f6da0 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Tue, 8 Aug 2017 10:11:12 +0200 Subject: [PATCH 26/63] It should verify an actual big decimal is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 4744335..d3564d8 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -22,6 +22,7 @@ package testasyouthink; +import org.assertj.core.api.AbstractBigDecimalAssert; import org.assertj.core.api.AbstractBigIntegerAssert; import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractByteAssert; @@ -43,6 +44,7 @@ import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedBigDecimalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; @@ -150,6 +152,10 @@ public static AbstractBigIntegerAssert resultOf(CheckedBigIntegerSupplier whe return assertThat(result(whenStep)); } + public static AbstractBigDecimalAssert resultOf(CheckedBigDecimalSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index af6b090..8b42c70 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -22,6 +22,7 @@ package testasyouthink.function; +import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.util.Date; @@ -46,6 +47,8 @@ interface CheckedDoubleSupplier extends CheckedSupplier {} interface CheckedBigIntegerSupplier extends CheckedSupplier {} + interface CheckedBigDecimalSupplier extends CheckedSupplier {} + interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index d78208b..ca97daf 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -32,6 +32,7 @@ import testasyouthink.fixture.UnexpectedException; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; +import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.util.Date; @@ -163,6 +164,14 @@ public void should_verify_an_actual_big_integer_is_conform_to_an_expected_result }).isEqualTo(BigInteger.valueOf(1234))).hasSameClassAs(assertThat(BigInteger.valueOf(1234))); } + @Test + public void should_verify_an_actual_big_decimal_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new BigDecimal("12.34"); + }).isEqualTo(new BigDecimal("12.34"))).hasSameClassAs(assertThat(BigDecimal.ONE)); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 2d185fb26029d35ebfd306fb17b83da46f6ae0a3 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Tue, 8 Aug 2017 10:21:36 +0200 Subject: [PATCH 27/63] It should verify an actual file is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index d3564d8..d152dd1 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -30,6 +30,7 @@ import org.assertj.core.api.AbstractCharacterAssert; import org.assertj.core.api.AbstractDateAssert; import org.assertj.core.api.AbstractDoubleAssert; +import org.assertj.core.api.AbstractFileAssert; import org.assertj.core.api.AbstractFloatAssert; import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; @@ -51,6 +52,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedCharacterSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedFileSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; @@ -167,4 +169,8 @@ public static AbstractDateAssert resultOf(CheckedDateSupplier whenStep) { public static AbstractInstantAssert resultOf(CheckedInstantSupplier whenStep) { return assertThat(result(whenStep)); } + + public static AbstractFileAssert resultOf(CheckedFileSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 8b42c70..c3f24a8 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -22,6 +22,7 @@ package testasyouthink.function; +import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; @@ -54,4 +55,6 @@ interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} interface CheckedInstantSupplier extends CheckedSupplier {} + + interface CheckedFileSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index ca97daf..15f54f1 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -32,6 +32,7 @@ import testasyouthink.fixture.UnexpectedException; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; +import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; @@ -195,4 +196,12 @@ public void should_verify_an_actual_instant_is_conform_to_an_expected_result() { return Instant.ofEpochSecond(123456); }).isAfter(Instant.ofEpochSecond(100000))).hasSameClassAs(assertThat(Instant.ofEpochSecond(123456))); } + + @Test + public void should_verify_an_actual_file_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new File(File.separator); + }).exists()).hasSameClassAs(assertThat(new File(File.separator))); + } } From eb118fd8ee6921c1fb8debb188dc5e0d422c5f4d Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Tue, 8 Aug 2017 19:44:05 +0200 Subject: [PATCH 28/63] It should verify an actual list is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 19 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index d152dd1..88fbafc 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -36,6 +36,7 @@ import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractShortAssert; +import org.assertj.core.api.ListAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -56,6 +57,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedListSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -173,4 +175,8 @@ public static AbstractInstantAssert resultOf(CheckedInstantSupplier whenStep) public static AbstractFileAssert resultOf(CheckedFileSupplier whenStep) { return assertThat(result(whenStep)); } + + public static <$Element> ListAssert<$Element> resultOf(CheckedListSupplier<$Element> whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index c3f24a8..5b1cc76 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -27,6 +27,7 @@ import java.math.BigInteger; import java.time.Instant; import java.util.Date; +import java.util.List; public interface CheckedSuppliers { @@ -57,4 +58,6 @@ interface CheckedDateSupplier extends CheckedSupplier {} interface CheckedInstantSupplier extends CheckedSupplier {} interface CheckedFileSupplier extends CheckedSupplier {} + + interface CheckedListSupplier extends CheckedSupplier> {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 15f54f1..094eebd 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -36,6 +36,8 @@ import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import static org.assertj.core.api.Assertions.assertThat; @@ -204,4 +206,12 @@ public void should_verify_an_actual_file_is_conform_to_an_expected_result() { return new File(File.separator); }).exists()).hasSameClassAs(assertThat(new File(File.separator))); } + + @Test + public void should_verify_an_actual_list_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Arrays.asList("one", "two", "three"); + }).hasSize(3)).hasSameClassAs(assertThat(new ArrayList<>())); + } } From baaaa5a7c9a297a61aa3f13e709d0b9e9ed2673e Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 9 Aug 2017 10:36:16 +0200 Subject: [PATCH 29/63] It should verify an actual path is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 88fbafc..d3ec9c6 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -35,6 +35,7 @@ import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLongAssert; +import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; import org.assertj.core.api.ListAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; @@ -59,6 +60,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedListSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; import testasyouthink.function.Functions; @@ -176,6 +178,10 @@ public static AbstractFileAssert resultOf(CheckedFileSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractPathAssert resultOf(CheckedPathSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static <$Element> ListAssert<$Element> resultOf(CheckedListSupplier<$Element> whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 5b1cc76..c34c43f 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -25,6 +25,7 @@ import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; +import java.nio.file.Path; import java.time.Instant; import java.util.Date; import java.util.List; @@ -59,5 +60,7 @@ interface CheckedInstantSupplier extends CheckedSupplier {} interface CheckedFileSupplier extends CheckedSupplier {} + interface CheckedPathSupplier extends CheckedSupplier {} + interface CheckedListSupplier extends CheckedSupplier> {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 094eebd..11f085e 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -207,6 +207,14 @@ public void should_verify_an_actual_file_is_conform_to_an_expected_result() { }).exists()).hasSameClassAs(assertThat(new File(File.separator))); } + @Test + public void should_verify_an_actual_path_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new File(File.separator).toPath(); + }).isAbsolute()).hasSameClassAs(assertThat(new File(File.separator).toPath())); + } + @Test public void should_verify_an_actual_list_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 9469c6c4467b527b5d35ad7da4e85dbce550d5ea Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 9 Aug 2017 10:57:39 +0200 Subject: [PATCH 30/63] It should verify an actual local date is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index d3ec9c6..5d0a1ff 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -34,6 +34,7 @@ import org.assertj.core.api.AbstractFloatAssert; import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; +import org.assertj.core.api.AbstractLocalDateAssert; import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; @@ -59,6 +60,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedListSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedLocalDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; @@ -170,6 +172,10 @@ public static AbstractDateAssert resultOf(CheckedDateSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractLocalDateAssert resultOf(CheckedLocalDateSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractInstantAssert resultOf(CheckedInstantSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index c34c43f..09f39da 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -27,6 +27,7 @@ import java.math.BigInteger; import java.nio.file.Path; import java.time.Instant; +import java.time.LocalDate; import java.util.Date; import java.util.List; @@ -56,6 +57,8 @@ interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} + interface CheckedLocalDateSupplier extends CheckedSupplier {} + interface CheckedInstantSupplier extends CheckedSupplier {} interface CheckedFileSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 11f085e..f3d12af 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -36,6 +36,7 @@ import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; +import java.time.LocalDate; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -191,6 +192,14 @@ public void should_verify_an_actual_date_is_conform_to_an_expected_result() { }).hasSameTimeAs(new Date(123456))).hasSameClassAs(assertThat(new Date(123456))); } + @Test + public void should_verify_an_actual_local_date_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return LocalDate.of(2017, 8, 9); + }).isAfter(LocalDate.of(2017, 8, 1))).hasSameClassAs(assertThat(LocalDate.of(2017, 8, 9))); + } + @Test public void should_verify_an_actual_instant_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 0f686b5cb32ce696e552446e30555e8fb6502ed8 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 9 Aug 2017 11:03:04 +0200 Subject: [PATCH 31/63] It should verify an actual local date time is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 19 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 5d0a1ff..d82e308 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -35,6 +35,7 @@ import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLocalDateAssert; +import org.assertj.core.api.AbstractLocalDateTimeAssert; import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; @@ -61,6 +62,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedListSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalDateSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedLocalDateTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; @@ -176,6 +178,10 @@ public static AbstractLocalDateAssert resultOf(CheckedLocalDateSupplier whenS return assertThat(result(whenStep)); } + public static AbstractLocalDateTimeAssert resultOf(CheckedLocalDateTimeSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractInstantAssert resultOf(CheckedInstantSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 09f39da..a782fb0 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -28,6 +28,7 @@ import java.nio.file.Path; import java.time.Instant; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.Date; import java.util.List; @@ -59,6 +60,8 @@ interface CheckedDateSupplier extends CheckedSupplier {} interface CheckedLocalDateSupplier extends CheckedSupplier {} + interface CheckedLocalDateTimeSupplier extends CheckedSupplier {} + interface CheckedInstantSupplier extends CheckedSupplier {} interface CheckedFileSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index f3d12af..c4c0cf4 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -37,6 +37,7 @@ import java.math.BigInteger; import java.time.Instant; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -200,6 +201,15 @@ public void should_verify_an_actual_local_date_is_conform_to_an_expected_result( }).isAfter(LocalDate.of(2017, 8, 1))).hasSameClassAs(assertThat(LocalDate.of(2017, 8, 9))); } + @Test + public void should_verify_an_actual_local_date_time_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return LocalDateTime.of(2017, 8, 9, 12, 30); + }).isAfter(LocalDateTime.of(2017, 8, 9, 10, 15))).hasSameClassAs( + assertThat(LocalDateTime.of(2017, 8, 9, 12, 30))); + } + @Test public void should_verify_an_actual_instant_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From a6e58a45880b0ef10b08ded1fd4b1d7c122e11f1 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 9 Aug 2017 20:30:40 +0200 Subject: [PATCH 32/63] It should verify an actual local time is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index d82e308..c4a1815 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -36,6 +36,7 @@ import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLocalDateAssert; import org.assertj.core.api.AbstractLocalDateTimeAssert; +import org.assertj.core.api.AbstractLocalTimeAssert; import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; @@ -63,6 +64,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedListSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalDateTimeSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedLocalTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; @@ -182,6 +184,10 @@ public static AbstractLocalDateTimeAssert resultOf(CheckedLocalDateTimeSuppli return assertThat(result(whenStep)); } + public static AbstractLocalTimeAssert resultOf(CheckedLocalTimeSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractInstantAssert resultOf(CheckedInstantSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index a782fb0..ef2f506 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -29,6 +29,7 @@ import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.LocalTime; import java.util.Date; import java.util.List; @@ -62,6 +63,8 @@ interface CheckedLocalDateSupplier extends CheckedSupplier {} interface CheckedLocalDateTimeSupplier extends CheckedSupplier {} + interface CheckedLocalTimeSupplier extends CheckedSupplier {} + interface CheckedInstantSupplier extends CheckedSupplier {} interface CheckedFileSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index c4c0cf4..9f727b9 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -38,6 +38,7 @@ import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.LocalTime; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -210,6 +211,14 @@ public void should_verify_an_actual_local_date_time_is_conform_to_an_expected_re assertThat(LocalDateTime.of(2017, 8, 9, 12, 30))); } + @Test + public void should_verify_an_actual_local_time_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return LocalTime.of(12, 30); + }).isAfter(LocalTime.of(10, 15))).hasSameClassAs(assertThat(LocalTime.of(12, 30))); + } + @Test public void should_verify_an_actual_instant_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From b9db76cef0c91e284119616de7c84a5cce839eb8 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 10 Aug 2017 10:18:22 +0200 Subject: [PATCH 33/63] It should verify an actual map is conform to an expected result. --- .../main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../testasyouthink/function/CheckedSuppliers.java | 5 ++++- .../test/java/testasyouthink/ResultOfEventTest.java | 13 +++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index c4a1815..515254a 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -41,6 +41,7 @@ import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; import org.assertj.core.api.ListAssert; +import org.assertj.core.api.MapAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -66,6 +67,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedLocalDateTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedMapSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -203,4 +205,8 @@ public static AbstractPathAssert resultOf(CheckedPathSupplier whenStep) { public static <$Element> ListAssert<$Element> resultOf(CheckedListSupplier<$Element> whenStep) { return assertThat(result(whenStep)); } + + public static <$Key, $Value> MapAssert<$Key, $Value> resultOf(CheckedMapSupplier<$Key, $Value> whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index ef2f506..58f86bb 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -32,6 +32,7 @@ import java.time.LocalTime; import java.util.Date; import java.util.List; +import java.util.Map; public interface CheckedSuppliers { @@ -71,5 +72,7 @@ interface CheckedFileSupplier extends CheckedSupplier {} interface CheckedPathSupplier extends CheckedSupplier {} - interface CheckedListSupplier extends CheckedSupplier> {} + interface CheckedListSupplier<$Element> extends CheckedSupplier> {} + + interface CheckedMapSupplier<$Key, $Value> extends CheckedSupplier> {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 9f727b9..19a0f44 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -42,6 +42,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Date; +import java.util.HashMap; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -250,4 +251,16 @@ public void should_verify_an_actual_list_is_conform_to_an_expected_result() { return Arrays.asList("one", "two", "three"); }).hasSize(3)).hasSameClassAs(assertThat(new ArrayList<>())); } + + @Test + public void should_verify_an_actual_map_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new HashMap() {{ + put(1, "one"); + put(2, "two"); + put(3, "three"); + }}; + }).hasSize(3)).hasSameClassAs(assertThat(new HashMap<>())); + } } From 345446d676e2bb110dd9a50dc94bc36b477ce5e8 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 10 Aug 2017 10:28:12 +0200 Subject: [PATCH 34/63] It should verify an actual iterator is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 7 +++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 515254a..80404a6 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -40,6 +40,7 @@ import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; +import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; @@ -62,6 +63,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedIteratorSupplier; import testasyouthink.function.CheckedSuppliers.CheckedListSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalDateTimeSupplier; @@ -79,6 +81,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static testasyouthink.execution.Event.EXECUTION_FAILURE_MESSAGE; +@SuppressWarnings("WeakerAccess") public class TestAsYouThink { private static Functions functions = Functions.INSTANCE; @@ -202,6 +205,10 @@ public static AbstractPathAssert resultOf(CheckedPathSupplier whenStep) { return assertThat(result(whenStep)); } + public static <$Element> IterableAssert<$Element> resultOf(CheckedIteratorSupplier<$Element> whenStep) { + return assertThat(result(whenStep)); + } + public static <$Element> ListAssert<$Element> resultOf(CheckedListSupplier<$Element> whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 58f86bb..1a07216 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -31,6 +31,7 @@ import java.time.LocalDateTime; import java.time.LocalTime; import java.util.Date; +import java.util.Iterator; import java.util.List; import java.util.Map; @@ -72,6 +73,8 @@ interface CheckedFileSupplier extends CheckedSupplier {} interface CheckedPathSupplier extends CheckedSupplier {} + interface CheckedIteratorSupplier<$Element> extends CheckedSupplier> {} + interface CheckedListSupplier<$Element> extends CheckedSupplier> {} interface CheckedMapSupplier<$Key, $Value> extends CheckedSupplier> {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 19a0f44..97fc69b 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -244,6 +244,16 @@ public void should_verify_an_actual_path_is_conform_to_an_expected_result() { }).isAbsolute()).hasSameClassAs(assertThat(new File(File.separator).toPath())); } + @Test + public void should_verify_an_actual_iterator_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Arrays + .asList("one", "two", "three") + .iterator(); + }).doesNotContain("four")).hasSameClassAs(assertThat(new ArrayList<>().iterator())); + } + @Test public void should_verify_an_actual_list_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 400bc2eb20e7c41ac4f129740364bf4d14bab4db Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 10 Aug 2017 10:53:37 +0200 Subject: [PATCH 35/63] It should verify an actual iterable is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 5 +++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 80404a6..f8c2523 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -63,6 +63,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedIterableSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIteratorSupplier; import testasyouthink.function.CheckedSuppliers.CheckedListSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalDateSupplier; @@ -205,6 +206,10 @@ public static AbstractPathAssert resultOf(CheckedPathSupplier whenStep) { return assertThat(result(whenStep)); } + public static <$Element> IterableAssert<$Element> resultOf(CheckedIterableSupplier<$Element> whenStep) { + return assertThat(result(whenStep)); + } + public static <$Element> IterableAssert<$Element> resultOf(CheckedIteratorSupplier<$Element> whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 1a07216..c9824a7 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -73,6 +73,8 @@ interface CheckedFileSupplier extends CheckedSupplier {} interface CheckedPathSupplier extends CheckedSupplier {} + interface CheckedIterableSupplier<$Element> extends CheckedSupplier> {} + interface CheckedIteratorSupplier<$Element> extends CheckedSupplier> {} interface CheckedListSupplier<$Element> extends CheckedSupplier> {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 97fc69b..f4ff768 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -244,6 +244,14 @@ public void should_verify_an_actual_path_is_conform_to_an_expected_result() { }).isAbsolute()).hasSameClassAs(assertThat(new File(File.separator).toPath())); } + @Test + public void should_verify_an_actual_iterable_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return (Iterable) Arrays.asList("one", "two", "three"); + }).contains("two")).hasSameClassAs(assertThat((Iterable) new ArrayList())); + } + @Test public void should_verify_an_actual_iterator_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 9fc248ca05e0e1ed869deb991b685d2a5627fec3 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 10 Aug 2017 19:25:09 +0200 Subject: [PATCH 36/63] It should verify an actual URI is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../test/java/testasyouthink/ResultOfEventTest.java | 10 ++++++++++ 3 files changed, 19 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index f8c2523..3db9c80 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -40,6 +40,7 @@ import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; +import org.assertj.core.api.AbstractUriAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; @@ -74,6 +75,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedUriSupplier; import testasyouthink.function.Functions; import java.util.function.Consumer; @@ -202,6 +204,10 @@ public static AbstractFileAssert resultOf(CheckedFileSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractUriAssert resultOf(CheckedUriSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractPathAssert resultOf(CheckedPathSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index c9824a7..939bb5c 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -25,6 +25,7 @@ import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; +import java.net.URI; import java.nio.file.Path; import java.time.Instant; import java.time.LocalDate; @@ -71,6 +72,8 @@ interface CheckedInstantSupplier extends CheckedSupplier {} interface CheckedFileSupplier extends CheckedSupplier {} + interface CheckedUriSupplier extends CheckedSupplier {} + interface CheckedPathSupplier extends CheckedSupplier {} interface CheckedIterableSupplier<$Element> extends CheckedSupplier> {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index f4ff768..3c9ad5f 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -35,6 +35,8 @@ import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; +import java.net.URI; +import java.net.URISyntaxException; import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; @@ -236,6 +238,14 @@ public void should_verify_an_actual_file_is_conform_to_an_expected_result() { }).exists()).hasSameClassAs(assertThat(new File(File.separator))); } + @Test + public void should_verify_an_actual_uri_is_conform_to_an_expected_result() throws URISyntaxException { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new URI("uri"); + }).hasNoParameters()).hasSameClassAs(assertThat(new URI("uri"))); + } + @Test public void should_verify_an_actual_path_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 5be38831002cc72798b696c8349c272aaa5023cc Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 10 Aug 2017 19:36:33 +0200 Subject: [PATCH 37/63] It should verify an actual URL is conform to an expected result. --- .../main/java/testasyouthink/TestAsYouThink.java | 9 +++++++-- .../function/CheckedSuppliers.java | 5 ++++- .../java/testasyouthink/ResultOfEventTest.java | 16 +++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 3db9c80..abe9a5c 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -41,6 +41,7 @@ import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; import org.assertj.core.api.AbstractUriAssert; +import org.assertj.core.api.AbstractUrlAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; @@ -76,6 +77,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; import testasyouthink.function.CheckedSuppliers.CheckedUriSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedUrlSupplier; import testasyouthink.function.Functions; import java.util.function.Consumer; @@ -84,7 +86,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static testasyouthink.execution.Event.EXECUTION_FAILURE_MESSAGE; -@SuppressWarnings("WeakerAccess") public class TestAsYouThink { private static Functions functions = Functions.INSTANCE; @@ -204,11 +205,15 @@ public static AbstractFileAssert resultOf(CheckedFileSupplier whenStep) { return assertThat(result(whenStep)); } + public static AbstractPathAssert resultOf(CheckedPathSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractUriAssert resultOf(CheckedUriSupplier whenStep) { return assertThat(result(whenStep)); } - public static AbstractPathAssert resultOf(CheckedPathSupplier whenStep) { + public static AbstractUrlAssert resultOf(CheckedUrlSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 939bb5c..c225a2f 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.math.BigInteger; import java.net.URI; +import java.net.URL; import java.nio.file.Path; import java.time.Instant; import java.time.LocalDate; @@ -72,9 +73,11 @@ interface CheckedInstantSupplier extends CheckedSupplier {} interface CheckedFileSupplier extends CheckedSupplier {} + interface CheckedPathSupplier extends CheckedSupplier {} + interface CheckedUriSupplier extends CheckedSupplier {} - interface CheckedPathSupplier extends CheckedSupplier {} + interface CheckedUrlSupplier extends CheckedSupplier {} interface CheckedIterableSupplier<$Element> extends CheckedSupplier> {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 3c9ad5f..0a2253a 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -35,8 +35,10 @@ import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; +import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; +import java.net.URL; import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; @@ -238,6 +240,14 @@ public void should_verify_an_actual_file_is_conform_to_an_expected_result() { }).exists()).hasSameClassAs(assertThat(new File(File.separator))); } + @Test + public void should_verify_an_actual_path_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new File(File.separator).toPath(); + }).isAbsolute()).hasSameClassAs(assertThat(new File(File.separator).toPath())); + } + @Test public void should_verify_an_actual_uri_is_conform_to_an_expected_result() throws URISyntaxException { assertThat(resultOf(() -> { @@ -247,11 +257,11 @@ public void should_verify_an_actual_uri_is_conform_to_an_expected_result() throw } @Test - public void should_verify_an_actual_path_is_conform_to_an_expected_result() { + public void should_verify_an_actual_url_is_conform_to_an_expected_result() throws MalformedURLException { assertThat(resultOf(() -> { gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); - return new File(File.separator).toPath(); - }).isAbsolute()).hasSameClassAs(assertThat(new File(File.separator).toPath())); + return new URL("http://uri"); + }).hasNoParameters()).hasSameClassAs(assertThat(new URL("http://uri"))); } @Test From 44d7e55b3b6d11b9ba9ea6045e8f7746c240804e Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 10 Aug 2017 19:48:44 +0200 Subject: [PATCH 38/63] It should verify an actual optional is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index abe9a5c..da35204 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -45,6 +45,7 @@ import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; +import org.assertj.core.api.OptionalAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -73,6 +74,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedLocalTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedMapSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedOptionalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; @@ -177,6 +179,10 @@ public static AbstractBigDecimalAssert resultOf(CheckedBigDecimalSupplier whe return assertThat(result(whenStep)); } + public static <$Value> OptionalAssert<$Value> resultOf(CheckedOptionalSupplier<$Value> whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index c225a2f..e32836a 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -36,6 +36,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; public interface CheckedSuppliers { @@ -59,6 +60,8 @@ interface CheckedBigIntegerSupplier extends CheckedSupplier {} interface CheckedBigDecimalSupplier extends CheckedSupplier {} + interface CheckedOptionalSupplier extends CheckedSupplier> {} + interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 0a2253a..f05ac85 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -47,6 +47,7 @@ import java.util.Arrays; import java.util.Date; import java.util.HashMap; +import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -183,6 +184,14 @@ public void should_verify_an_actual_big_decimal_is_conform_to_an_expected_result }).isEqualTo(new BigDecimal("12.34"))).hasSameClassAs(assertThat(BigDecimal.ONE)); } + @Test + public void should_verify_an_actual_optional_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return Optional.of("optional"); + }).isPresent()).hasSameClassAs(assertThat(Optional.empty())); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 2f26651d4a416aa98527d173b39e0b924af46d8a Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Fri, 11 Aug 2017 10:49:55 +0200 Subject: [PATCH 39/63] It should verify an actual optional integer is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 5 ++++- .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index da35204..38bbf2c 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -46,6 +46,7 @@ import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; import org.assertj.core.api.OptionalAssert; +import org.assertj.core.api.OptionalIntAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -74,6 +75,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedLocalTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedMapSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedOptionalIntSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; @@ -183,6 +185,10 @@ public static AbstractBigDecimalAssert resultOf(CheckedBigDecimalSupplier whe return assertThat(result(whenStep)); } + public static OptionalIntAssert resultOf(CheckedOptionalIntSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index e32836a..47e7377 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -37,6 +37,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.OptionalInt; public interface CheckedSuppliers { @@ -60,7 +61,9 @@ interface CheckedBigIntegerSupplier extends CheckedSupplier {} interface CheckedBigDecimalSupplier extends CheckedSupplier {} - interface CheckedOptionalSupplier extends CheckedSupplier> {} + interface CheckedOptionalSupplier<$Value> extends CheckedSupplier> {} + + interface CheckedOptionalIntSupplier extends CheckedSupplier {} interface CheckedBooleanSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index f05ac85..ba96ded 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -48,6 +48,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Optional; +import java.util.OptionalInt; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -192,6 +193,14 @@ public void should_verify_an_actual_optional_is_conform_to_an_expected_result() }).isPresent()).hasSameClassAs(assertThat(Optional.empty())); } + @Test + public void should_verify_an_actual_optional_int_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return OptionalInt.of(123); + }).isPresent()).hasSameClassAs(assertThat(OptionalInt.empty())); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 1a7d059abe9f5101e358a54d465118a4eaad8d8a Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Fri, 11 Aug 2017 10:54:16 +0200 Subject: [PATCH 40/63] It should verify an actual optional long is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 38bbf2c..3e0ab6a 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -47,6 +47,7 @@ import org.assertj.core.api.MapAssert; import org.assertj.core.api.OptionalAssert; import org.assertj.core.api.OptionalIntAssert; +import org.assertj.core.api.OptionalLongAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -76,6 +77,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedMapSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalIntSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedOptionalLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; @@ -189,6 +191,10 @@ public static OptionalIntAssert resultOf(CheckedOptionalIntSupplier whenStep) { return assertThat(result(whenStep)); } + public static OptionalLongAssert resultOf(CheckedOptionalLongSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 47e7377..501edea 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -38,6 +38,7 @@ import java.util.Map; import java.util.Optional; import java.util.OptionalInt; +import java.util.OptionalLong; public interface CheckedSuppliers { @@ -65,6 +66,8 @@ interface CheckedOptionalSupplier<$Value> extends CheckedSupplier {} + interface CheckedOptionalLongSupplier extends CheckedSupplier {} + interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index ba96ded..f13ac44 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -49,6 +49,7 @@ import java.util.HashMap; import java.util.Optional; import java.util.OptionalInt; +import java.util.OptionalLong; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -201,6 +202,14 @@ public void should_verify_an_actual_optional_int_is_conform_to_an_expected_resul }).isPresent()).hasSameClassAs(assertThat(OptionalInt.empty())); } + @Test + public void should_verify_an_actual_optional_long_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return OptionalLong.of(123); + }).isPresent()).hasSameClassAs(assertThat(OptionalLong.empty())); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 733c9df514b28884fa24fec69067d449a9e85ec4 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Fri, 11 Aug 2017 10:58:56 +0200 Subject: [PATCH 41/63] It should verify an actual optional double is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 3e0ab6a..259dd4d 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -46,6 +46,7 @@ import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; import org.assertj.core.api.OptionalAssert; +import org.assertj.core.api.OptionalDoubleAssert; import org.assertj.core.api.OptionalIntAssert; import org.assertj.core.api.OptionalLongAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; @@ -76,6 +77,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedLocalTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedMapSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedOptionalDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalIntSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalSupplier; @@ -195,6 +197,10 @@ public static OptionalLongAssert resultOf(CheckedOptionalLongSupplier whenStep) return assertThat(result(whenStep)); } + public static OptionalDoubleAssert resultOf(CheckedOptionalDoubleSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractBooleanAssert resultOf(CheckedBooleanSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 501edea..359f209 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -37,6 +37,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; @@ -68,6 +69,8 @@ interface CheckedOptionalIntSupplier extends CheckedSupplier {} interface CheckedOptionalLongSupplier extends CheckedSupplier {} + interface CheckedOptionalDoubleSupplier extends CheckedSupplier {} + interface CheckedBooleanSupplier extends CheckedSupplier {} interface CheckedDateSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index f13ac44..db82d19 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -48,6 +48,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Optional; +import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; @@ -210,6 +211,14 @@ public void should_verify_an_actual_optional_long_is_conform_to_an_expected_resu }).isPresent()).hasSameClassAs(assertThat(OptionalLong.empty())); } + @Test + public void should_verify_an_actual_optional_double_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return OptionalDouble.of(123); + }).isPresent()).hasSameClassAs(assertThat(OptionalDouble.empty())); + } + @Test public void should_verify_an_actual_boolean_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 75788df79381fb17e5a4f7a5189fc89a70e3e78d Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Fri, 11 Aug 2017 19:41:09 +0200 Subject: [PATCH 42/63] It should verify an actual atomic boolean is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 259dd4d..9a8fb96 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -42,6 +42,7 @@ import org.assertj.core.api.AbstractShortAssert; import org.assertj.core.api.AbstractUriAssert; import org.assertj.core.api.AbstractUrlAssert; +import org.assertj.core.api.AtomicBooleanAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; @@ -58,6 +59,7 @@ import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedAtomicBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigDecimalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; @@ -256,4 +258,8 @@ public static AbstractUrlAssert resultOf(CheckedUrlSupplier whenStep) { public static <$Key, $Value> MapAssert<$Key, $Value> resultOf(CheckedMapSupplier<$Key, $Value> whenStep) { return assertThat(result(whenStep)); } + + public static AtomicBooleanAssert resultOf(CheckedAtomicBooleanSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 359f209..c6bcf2d 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -40,6 +40,7 @@ import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; +import java.util.concurrent.atomic.AtomicBoolean; public interface CheckedSuppliers { @@ -98,4 +99,6 @@ interface CheckedIteratorSupplier<$Element> extends CheckedSupplier extends CheckedSupplier> {} interface CheckedMapSupplier<$Key, $Value> extends CheckedSupplier> {} + + interface CheckedAtomicBooleanSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index db82d19..58568d5 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -51,6 +51,7 @@ import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; +import java.util.concurrent.atomic.AtomicBoolean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -337,4 +338,12 @@ public void should_verify_an_actual_map_is_conform_to_an_expected_result() { }}; }).hasSize(3)).hasSameClassAs(assertThat(new HashMap<>())); } + + @Test + public void should_verify_an_actual_atomic_boolean_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new AtomicBoolean(true); + }).isTrue()).hasSameClassAs(assertThat(new AtomicBoolean())); + } } From 29ffd230a392ce414274b25759523c1e9712b044 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Fri, 11 Aug 2017 19:49:22 +0200 Subject: [PATCH 43/63] It should verify an actual atomic integer is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 9a8fb96..6b7561e 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -43,6 +43,7 @@ import org.assertj.core.api.AbstractUriAssert; import org.assertj.core.api.AbstractUrlAssert; import org.assertj.core.api.AtomicBooleanAssert; +import org.assertj.core.api.AtomicIntegerAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; @@ -60,6 +61,7 @@ import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicBooleanSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigDecimalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; @@ -262,4 +264,8 @@ public static AbstractUrlAssert resultOf(CheckedUrlSupplier whenStep) { public static AtomicBooleanAssert resultOf(CheckedAtomicBooleanSupplier whenStep) { return assertThat(result(whenStep)); } + + public static AtomicIntegerAssert resultOf(CheckedAtomicIntegerSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index c6bcf2d..b213f95 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -41,6 +41,7 @@ import java.util.OptionalInt; import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; public interface CheckedSuppliers { @@ -101,4 +102,6 @@ interface CheckedListSupplier<$Element> extends CheckedSupplier> interface CheckedMapSupplier<$Key, $Value> extends CheckedSupplier> {} interface CheckedAtomicBooleanSupplier extends CheckedSupplier {} + + interface CheckedAtomicIntegerSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 58568d5..bdc9245 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -52,6 +52,7 @@ import java.util.OptionalInt; import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -346,4 +347,12 @@ public void should_verify_an_actual_atomic_boolean_is_conform_to_an_expected_res return new AtomicBoolean(true); }).isTrue()).hasSameClassAs(assertThat(new AtomicBoolean())); } + + @Test + public void should_verify_an_actual_atomic_integer_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new AtomicInteger(123); + }).hasPositiveValue()).hasSameClassAs(assertThat(new AtomicInteger())); + } } From 5c7a96a780ec7c1b3d9a486abd6fc17e66cfdb49 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 13 Aug 2017 23:36:31 +0200 Subject: [PATCH 44/63] It should verify an actual atomic long is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 6b7561e..6d37cbc 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -44,6 +44,7 @@ import org.assertj.core.api.AbstractUrlAssert; import org.assertj.core.api.AtomicBooleanAssert; import org.assertj.core.api.AtomicIntegerAssert; +import org.assertj.core.api.AtomicLongAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; @@ -62,6 +63,7 @@ import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedAtomicLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigDecimalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; @@ -268,4 +270,8 @@ public static AtomicBooleanAssert resultOf(CheckedAtomicBooleanSupplier whenStep public static AtomicIntegerAssert resultOf(CheckedAtomicIntegerSupplier whenStep) { return assertThat(result(whenStep)); } + + public static AtomicLongAssert resultOf(CheckedAtomicLongSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index b213f95..b43bad0 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -42,6 +42,7 @@ import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; public interface CheckedSuppliers { @@ -104,4 +105,6 @@ interface CheckedMapSupplier<$Key, $Value> extends CheckedSupplier {} interface CheckedAtomicIntegerSupplier extends CheckedSupplier {} + + interface CheckedAtomicLongSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index bdc9245..70759cb 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -53,6 +53,7 @@ import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -355,4 +356,12 @@ public void should_verify_an_actual_atomic_integer_is_conform_to_an_expected_res return new AtomicInteger(123); }).hasPositiveValue()).hasSameClassAs(assertThat(new AtomicInteger())); } + + @Test + public void should_verify_an_actual_atomic_long_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new AtomicLong(123); + }).hasPositiveValue()).hasSameClassAs(assertThat(new AtomicLong())); + } } From 3da40662f2866014716c672f83a469a121061517 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 13 Aug 2017 23:42:42 +0200 Subject: [PATCH 45/63] It should verify an actual atomic integer array is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 6d37cbc..ceecb74 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -43,6 +43,7 @@ import org.assertj.core.api.AbstractUriAssert; import org.assertj.core.api.AbstractUrlAssert; import org.assertj.core.api.AtomicBooleanAssert; +import org.assertj.core.api.AtomicIntegerArrayAssert; import org.assertj.core.api.AtomicIntegerAssert; import org.assertj.core.api.AtomicLongAssert; import org.assertj.core.api.IterableAssert; @@ -62,6 +63,7 @@ import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicBooleanSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerArraySupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigDecimalSupplier; @@ -271,6 +273,10 @@ public static AtomicIntegerAssert resultOf(CheckedAtomicIntegerSupplier whenStep return assertThat(result(whenStep)); } + public static AtomicIntegerArrayAssert resultOf(CheckedAtomicIntegerArraySupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AtomicLongAssert resultOf(CheckedAtomicLongSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index b43bad0..824f716 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -42,6 +42,7 @@ import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; public interface CheckedSuppliers { @@ -106,5 +107,7 @@ interface CheckedAtomicBooleanSupplier extends CheckedSupplier {} interface CheckedAtomicIntegerSupplier extends CheckedSupplier {} + interface CheckedAtomicIntegerArraySupplier extends CheckedSupplier {} + interface CheckedAtomicLongSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 70759cb..e26aec2 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -53,6 +53,7 @@ import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import static org.assertj.core.api.Assertions.assertThat; @@ -357,6 +358,14 @@ public void should_verify_an_actual_atomic_integer_is_conform_to_an_expected_res }).hasPositiveValue()).hasSameClassAs(assertThat(new AtomicInteger())); } + @Test + public void should_verify_an_actual_atomic_integer_array_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new AtomicIntegerArray(3); + }).hasSize(3)).hasSameClassAs(assertThat(new AtomicIntegerArray(0))); + } + @Test public void should_verify_an_actual_atomic_long_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 5b86e7b8dc80b2005df49d37e2df0205c245c67e Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Sun, 13 Aug 2017 23:45:25 +0200 Subject: [PATCH 46/63] It should verify an actual atomic long array is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index ceecb74..3a70126 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -45,6 +45,7 @@ import org.assertj.core.api.AtomicBooleanAssert; import org.assertj.core.api.AtomicIntegerArrayAssert; import org.assertj.core.api.AtomicIntegerAssert; +import org.assertj.core.api.AtomicLongArrayAssert; import org.assertj.core.api.AtomicLongAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; @@ -65,6 +66,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedAtomicBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerArraySupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedAtomicLongArraySupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigDecimalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBigIntegerSupplier; @@ -280,4 +282,8 @@ public static AtomicIntegerArrayAssert resultOf(CheckedAtomicIntegerArraySupplie public static AtomicLongAssert resultOf(CheckedAtomicLongSupplier whenStep) { return assertThat(result(whenStep)); } + + public static AtomicLongArrayAssert resultOf(CheckedAtomicLongArraySupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 824f716..863b448 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -44,6 +44,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicLongArray; public interface CheckedSuppliers { @@ -110,4 +111,6 @@ interface CheckedAtomicIntegerSupplier extends CheckedSupplier {} interface CheckedAtomicIntegerArraySupplier extends CheckedSupplier {} interface CheckedAtomicLongSupplier extends CheckedSupplier {} + + interface CheckedAtomicLongArraySupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index e26aec2..dedd0c8 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -55,6 +55,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicLongArray; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -373,4 +374,12 @@ public void should_verify_an_actual_atomic_long_is_conform_to_an_expected_result return new AtomicLong(123); }).hasPositiveValue()).hasSameClassAs(assertThat(new AtomicLong())); } + + @Test + public void should_verify_an_actual_atomic_long_array_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new AtomicLongArray(3); + }).hasSize(3)).hasSameClassAs(assertThat(new AtomicLongArray(0))); + } } From d436dd303c835c25bd399b2da66cdcc0deb8d710 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 14 Aug 2017 00:14:42 +0200 Subject: [PATCH 47/63] It should verify an actual future is conform to an expected result. --- .../main/java/testasyouthink/TestAsYouThink.java | 8 ++++++++ .../function/CheckedSuppliers.java | 3 +++ .../java/testasyouthink/ResultOfEventTest.java | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 3a70126..380d47c 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -32,6 +32,7 @@ import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.api.AbstractFileAssert; import org.assertj.core.api.AbstractFloatAssert; +import org.assertj.core.api.AbstractFutureAssert; import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLocalDateAssert; @@ -77,6 +78,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFileSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedFutureSupplier; import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIterableSupplier; @@ -98,6 +100,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedUrlSupplier; import testasyouthink.function.Functions; +import java.util.concurrent.Future; import java.util.function.Consumer; import java.util.function.Supplier; @@ -286,4 +289,9 @@ public static AtomicLongAssert resultOf(CheckedAtomicLongSupplier whenStep) { public static AtomicLongArrayAssert resultOf(CheckedAtomicLongArraySupplier whenStep) { return assertThat(result(whenStep)); } + + public static <$Value> AbstractFutureAssert, $Value> resultOf( + CheckedFutureSupplier<$Value> whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 863b448..4e0a5fe 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -40,6 +40,7 @@ import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; +import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicIntegerArray; @@ -113,4 +114,6 @@ interface CheckedAtomicIntegerArraySupplier extends CheckedSupplier {} interface CheckedAtomicLongArraySupplier extends CheckedSupplier {} + + interface CheckedFutureSupplier<$Value> extends CheckedSupplier> {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index dedd0c8..a1cf9be 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -51,6 +51,10 @@ import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.FutureTask; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicIntegerArray; @@ -382,4 +386,16 @@ public void should_verify_an_actual_atomic_long_array_is_conform_to_an_expected_ return new AtomicLongArray(3); }).hasSize(3)).hasSameClassAs(assertThat(new AtomicLongArray(0))); } + + @Test + public void should_verify_an_actual_future_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + Future future = new FutureTask<>(() -> "result of callable"); + ExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); + executorService.execute((Runnable) future); + future.get(); + return future; + }).isDone()).hasSameClassAs(assertThat((Future) new FutureTask<>(() -> "anything"))); + } } From c9fc48ebb253e4fe0a4e3539ec78bdf35b7159cd Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Mon, 14 Aug 2017 00:37:15 +0200 Subject: [PATCH 48/63] It should verify an actual completable future is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../testasyouthink/function/CheckedSuppliers.java | 3 +++ .../test/java/testasyouthink/ResultOfEventTest.java | 11 +++++++++++ 3 files changed, 20 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 380d47c..918e0e7 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -48,6 +48,7 @@ import org.assertj.core.api.AtomicIntegerAssert; import org.assertj.core.api.AtomicLongArrayAssert; import org.assertj.core.api.AtomicLongAssert; +import org.assertj.core.api.CompletableFutureAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; @@ -74,6 +75,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCharacterSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedCompletableFutureSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFileSupplier; @@ -294,4 +296,8 @@ public static AtomicLongArrayAssert resultOf(CheckedAtomicLongArraySupplier when CheckedFutureSupplier<$Value> whenStep) { return assertThat(result(whenStep)); } + + public static <$Value> CompletableFutureAssert<$Value> resultOf(CheckedCompletableFutureSupplier<$Value> whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 4e0a5fe..8a46d84 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -40,6 +40,7 @@ import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -116,4 +117,6 @@ interface CheckedAtomicLongSupplier extends CheckedSupplier {} interface CheckedAtomicLongArraySupplier extends CheckedSupplier {} interface CheckedFutureSupplier<$Value> extends CheckedSupplier> {} + + interface CheckedCompletableFutureSupplier<$Value> extends CheckedSupplier> {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index a1cf9be..96797a0 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -51,6 +51,7 @@ import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.OptionalLong; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -398,4 +399,14 @@ public void should_verify_an_actual_future_is_conform_to_an_expected_result() { return future; }).isDone()).hasSameClassAs(assertThat((Future) new FutureTask<>(() -> "anything"))); } + + @Test + public void should_verify_an_actual_completable_future_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + CompletableFuture completableFuture = new CompletableFuture<>(); + completableFuture.complete("result"); + return completableFuture; + }).isDone()).hasSameClassAs(assertThat(new CompletableFuture())); + } } From 8e24217df7ccde300e2b5599c4979de082db3568 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 10:59:24 +0200 Subject: [PATCH 49/63] It should verify an actual char sequence is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 5 +++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 918e0e7..430a39c 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -74,6 +74,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedBigIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedCharSequenceSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCharacterSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCompletableFutureSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; @@ -164,6 +165,10 @@ public static AbstractCharacterAssert resultOf(CheckedCharacterSupplier whenS return assertThat(result(whenStep)); } + public static AbstractCharSequenceAssert resultOf(CheckedCharSequenceSupplier whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractCharSequenceAssert resultOf(CheckedStringSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 8a46d84..e84de4b 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -52,6 +52,8 @@ public interface CheckedSuppliers { interface CheckedCharacterSupplier extends CheckedSupplier {} + interface CheckedCharSequenceSupplier extends CheckedSupplier {} + interface CheckedStringSupplier extends CheckedSupplier {} interface CheckedByteSupplier extends CheckedSupplier {} diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 96797a0..4b9d3f0 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -95,6 +95,14 @@ public void should_verify_an_actual_character_is_conform_to_an_expected_result() }).isBetween('a', 'c')).hasSameClassAs(assertThat('a')); } + @Test + public void should_verify_an_actual_char_sequence_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return (CharSequence) new StringBuilder("result"); + }).hasSize(6)).hasSameClassAs(assertThat((CharSequence) new StringBuilder())); + } + @Test public void should_verify_an_actual_string_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { From 7c9a07ec9dfbc7218a89afd60523a462638f869a Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 11:15:44 +0200 Subject: [PATCH 50/63] It should verify an actual class is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 2 ++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 430a39c..9bad6b5 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -28,6 +28,7 @@ import org.assertj.core.api.AbstractByteAssert; import org.assertj.core.api.AbstractCharSequenceAssert; import org.assertj.core.api.AbstractCharacterAssert; +import org.assertj.core.api.AbstractClassAssert; import org.assertj.core.api.AbstractDateAssert; import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.api.AbstractFileAssert; @@ -76,6 +77,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedByteSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCharSequenceSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCharacterSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedClassSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCompletableFutureSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; @@ -305,4 +307,8 @@ public static AtomicLongArrayAssert resultOf(CheckedAtomicLongArraySupplier when public static <$Value> CompletableFutureAssert<$Value> resultOf(CheckedCompletableFutureSupplier<$Value> whenStep) { return assertThat(result(whenStep)); } + + public static AbstractClassAssert resultOf(CheckedClassSupplier whenStep) { + return assertThat(result(whenStep)); + } } diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index e84de4b..b695837 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -121,4 +121,6 @@ interface CheckedAtomicLongArraySupplier extends CheckedSupplier extends CheckedSupplier> {} interface CheckedCompletableFutureSupplier<$Value> extends CheckedSupplier> {} + + interface CheckedClassSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 4b9d3f0..9406270 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -417,4 +417,12 @@ public void should_verify_an_actual_completable_future_is_conform_to_an_expected return completableFuture; }).isDone()).hasSameClassAs(assertThat(new CompletableFuture())); } + + @Test + public void should_verify_an_actual_class_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return String.class; + }).isNotInterface()).hasSameClassAs(assertThat(String.class)); + } } From 36e19be18e43a9ab86841d8c742b5c7f6f0fd03f Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 16:58:43 +0200 Subject: [PATCH 51/63] It should verify an actual predicate is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 8 +++++++- .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 9bad6b5..025f6a5 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -57,6 +57,7 @@ import org.assertj.core.api.OptionalDoubleAssert; import org.assertj.core.api.OptionalIntAssert; import org.assertj.core.api.OptionalLongAssert; +import org.assertj.core.api.PredicateAssert; import testasyouthink.GivenWhenThenDsl.PreparationStage.AndGiven; import testasyouthink.GivenWhenThenDsl.PreparationStage.Given; import testasyouthink.GivenWhenThenDsl.VerificationStage.Then; @@ -99,6 +100,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedOptionalLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalSupplier; import testasyouthink.function.CheckedSuppliers.CheckedPathSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedPredicateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedShortSupplier; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; import testasyouthink.function.CheckedSuppliers.CheckedUriSupplier; @@ -311,4 +313,8 @@ public static AtomicLongArrayAssert resultOf(CheckedAtomicLongArraySupplier when public static AbstractClassAssert resultOf(CheckedClassSupplier whenStep) { return assertThat(result(whenStep)); } -} + + public static <$Value> PredicateAssert<$Value> resultOf(CheckedPredicateSupplier<$Value> whenStep) { + return assertThat(result(whenStep)); + } +} \ No newline at end of file diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index b695837..b38c7a0 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -47,6 +47,7 @@ import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; +import java.util.function.Predicate; public interface CheckedSuppliers { @@ -123,4 +124,6 @@ interface CheckedFutureSupplier<$Value> extends CheckedSupplier> interface CheckedCompletableFutureSupplier<$Value> extends CheckedSupplier> {} interface CheckedClassSupplier extends CheckedSupplier {} + + interface CheckedPredicateSupplier<$Value> extends CheckedSupplier> {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 9406270..2fed372 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -61,6 +61,7 @@ import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; +import java.util.function.Predicate; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -425,4 +426,12 @@ public void should_verify_an_actual_class_is_conform_to_an_expected_result() { return String.class; }).isNotInterface()).hasSameClassAs(assertThat(String.class)); } + + @Test + public void should_verify_an_actual_predicate_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return (Predicate) string -> string.contains("ult"); + }).accepts("result")).hasSameClassAs(assertThat((Predicate) t -> false)); + } } From 77f57abc9c89ce38d42562580c7325bb0910ddba Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 17:03:52 +0200 Subject: [PATCH 52/63] It should verify an actual int predicate is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 025f6a5..4236a4a 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -50,6 +50,7 @@ import org.assertj.core.api.AtomicLongArrayAssert; import org.assertj.core.api.AtomicLongAssert; import org.assertj.core.api.CompletableFutureAssert; +import org.assertj.core.api.IntPredicateAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; import org.assertj.core.api.MapAssert; @@ -86,6 +87,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFutureSupplier; import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedIntPredicateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIterableSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIteratorSupplier; @@ -317,4 +319,8 @@ public static AbstractClassAssert resultOf(CheckedClassSupplier whenStep) { public static <$Value> PredicateAssert<$Value> resultOf(CheckedPredicateSupplier<$Value> whenStep) { return assertThat(result(whenStep)); } + + public static IntPredicateAssert resultOf(CheckedIntPredicateSupplier whenStep) { + return assertThat(result(whenStep)); + } } \ No newline at end of file diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index b38c7a0..edb2ab5 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -47,6 +47,7 @@ import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; +import java.util.function.IntPredicate; import java.util.function.Predicate; public interface CheckedSuppliers { @@ -126,4 +127,6 @@ interface CheckedCompletableFutureSupplier<$Value> extends CheckedSupplier {} interface CheckedPredicateSupplier<$Value> extends CheckedSupplier> {} + + interface CheckedIntPredicateSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 2fed372..88f1c59 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -61,6 +61,7 @@ import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; +import java.util.function.IntPredicate; import java.util.function.Predicate; import static org.assertj.core.api.Assertions.assertThat; @@ -434,4 +435,12 @@ public void should_verify_an_actual_predicate_is_conform_to_an_expected_result() return (Predicate) string -> string.contains("ult"); }).accepts("result")).hasSameClassAs(assertThat((Predicate) t -> false)); } + + @Test + public void should_verify_an_actual_int_predicate_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return (IntPredicate) number -> number < 100; + }).accepts(99)).hasSameClassAs(assertThat((IntPredicate) t -> t == 0)); + } } From b1167462978a27280f387ae117bc31f1e3d8fa8c Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 17:08:37 +0200 Subject: [PATCH 53/63] It should verify an actual long predicate is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 4236a4a..f24dd33 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -53,6 +53,7 @@ import org.assertj.core.api.IntPredicateAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; +import org.assertj.core.api.LongPredicateAssert; import org.assertj.core.api.MapAssert; import org.assertj.core.api.OptionalAssert; import org.assertj.core.api.OptionalDoubleAssert; @@ -95,6 +96,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedLocalDateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalDateTimeSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLocalTimeSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedLongPredicateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedLongSupplier; import testasyouthink.function.CheckedSuppliers.CheckedMapSupplier; import testasyouthink.function.CheckedSuppliers.CheckedOptionalDoubleSupplier; @@ -323,4 +325,8 @@ public static AbstractClassAssert resultOf(CheckedClassSupplier whenStep) { public static IntPredicateAssert resultOf(CheckedIntPredicateSupplier whenStep) { return assertThat(result(whenStep)); } + + public static LongPredicateAssert resultOf(CheckedLongPredicateSupplier whenStep) { + return assertThat(result(whenStep)); + } } \ No newline at end of file diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index edb2ab5..b67fc94 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -48,6 +48,7 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; import java.util.function.IntPredicate; +import java.util.function.LongPredicate; import java.util.function.Predicate; public interface CheckedSuppliers { @@ -129,4 +130,6 @@ interface CheckedClassSupplier extends CheckedSupplier {} interface CheckedPredicateSupplier<$Value> extends CheckedSupplier> {} interface CheckedIntPredicateSupplier extends CheckedSupplier {} + + interface CheckedLongPredicateSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 88f1c59..bce13a5 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -62,6 +62,7 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; import java.util.function.IntPredicate; +import java.util.function.LongPredicate; import java.util.function.Predicate; import static org.assertj.core.api.Assertions.assertThat; @@ -443,4 +444,12 @@ public void should_verify_an_actual_int_predicate_is_conform_to_an_expected_resu return (IntPredicate) number -> number < 100; }).accepts(99)).hasSameClassAs(assertThat((IntPredicate) t -> t == 0)); } + + @Test + public void should_verify_an_actual_long_predicate_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return (LongPredicate) number -> number < 100; + }).accepts(99)).hasSameClassAs(assertThat((LongPredicate) t -> t == 0)); + } } From ebb5b85a6ff851f147bba48ef71a269f2e08265a Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 17:12:26 +0200 Subject: [PATCH 54/63] It should verify an actual double predicate is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 6 ++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index f24dd33..70a2e78 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -50,6 +50,7 @@ import org.assertj.core.api.AtomicLongArrayAssert; import org.assertj.core.api.AtomicLongAssert; import org.assertj.core.api.CompletableFutureAssert; +import org.assertj.core.api.DoublePredicateAssert; import org.assertj.core.api.IntPredicateAssert; import org.assertj.core.api.IterableAssert; import org.assertj.core.api.ListAssert; @@ -83,6 +84,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedClassSupplier; import testasyouthink.function.CheckedSuppliers.CheckedCompletableFutureSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDateSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedDoublePredicateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedDoubleSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFileSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; @@ -329,4 +331,8 @@ public static IntPredicateAssert resultOf(CheckedIntPredicateSupplier whenStep) public static LongPredicateAssert resultOf(CheckedLongPredicateSupplier whenStep) { return assertThat(result(whenStep)); } + + public static DoublePredicateAssert resultOf(CheckedDoublePredicateSupplier whenStep) { + return assertThat(result(whenStep)); + } } \ No newline at end of file diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index b67fc94..8499706 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -47,6 +47,7 @@ import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; +import java.util.function.DoublePredicate; import java.util.function.IntPredicate; import java.util.function.LongPredicate; import java.util.function.Predicate; @@ -132,4 +133,6 @@ interface CheckedPredicateSupplier<$Value> extends CheckedSupplier {} interface CheckedLongPredicateSupplier extends CheckedSupplier {} + + interface CheckedDoublePredicateSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index bce13a5..36ea22b 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -61,6 +61,7 @@ import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; +import java.util.function.DoublePredicate; import java.util.function.IntPredicate; import java.util.function.LongPredicate; import java.util.function.Predicate; @@ -452,4 +453,12 @@ public void should_verify_an_actual_long_predicate_is_conform_to_an_expected_res return (LongPredicate) number -> number < 100; }).accepts(99)).hasSameClassAs(assertThat((LongPredicate) t -> t == 0)); } + + @Test + public void should_verify_an_actual_double_predicate_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return (DoublePredicate) number -> number < 100; + }).accepts(99)).hasSameClassAs(assertThat((DoublePredicate) t -> t == 0)); + } } From 1f7700b0437bb66182981c3c298d46dd969867e5 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 18:08:51 +0200 Subject: [PATCH 55/63] It should verify an actual object array is conform to an expected result. --- .../main/java/testasyouthink/TestAsYouThink.java | 16 ++++++++++++++++ .../function/CheckedSuppliers.java | 5 +++++ .../java/testasyouthink/ResultOfEventTest.java | 8 ++++++++ 3 files changed, 29 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 70a2e78..a0c5347 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -40,6 +40,7 @@ import org.assertj.core.api.AbstractLocalDateTimeAssert; import org.assertj.core.api.AbstractLocalTimeAssert; import org.assertj.core.api.AbstractLongAssert; +import org.assertj.core.api.AbstractObjectArrayAssert; import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; import org.assertj.core.api.AbstractUriAssert; @@ -70,6 +71,7 @@ import testasyouthink.function.CheckedFunction; import testasyouthink.function.CheckedRunnable; import testasyouthink.function.CheckedSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedArraySupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicBooleanSupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerArraySupplier; import testasyouthink.function.CheckedSuppliers.CheckedAtomicIntegerSupplier; @@ -171,6 +173,16 @@ public static ThenFailure whenOutsideOperatingConditions(CheckedRunnable whenSte return result; } + private static <$Element> $Element[] arrayAsResult(CheckedArraySupplier<$Element> whenStep) { + $Element[] result; + try { + result = whenStep.get(); + } catch (Throwable throwable) { + throw new ExecutionError(EXECUTION_FAILURE_MESSAGE, throwable); + } + return result; + } + public static AbstractCharacterAssert resultOf(CheckedCharacterSupplier whenStep) { return assertThat(result(whenStep)); } @@ -335,4 +347,8 @@ public static LongPredicateAssert resultOf(CheckedLongPredicateSupplier whenStep public static DoublePredicateAssert resultOf(CheckedDoublePredicateSupplier whenStep) { return assertThat(result(whenStep)); } + + public static <$Element> AbstractObjectArrayAssert resultOf(CheckedArraySupplier<$Element> whenStep) { + return assertThat(arrayAsResult(whenStep)); + } } \ No newline at end of file diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index 8499706..f46bca1 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -135,4 +135,9 @@ interface CheckedIntPredicateSupplier extends CheckedSupplier {} interface CheckedLongPredicateSupplier extends CheckedSupplier {} interface CheckedDoublePredicateSupplier extends CheckedSupplier {} + + interface CheckedArraySupplier { + + R[] get() throws Throwable; + } } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 36ea22b..9fbf773 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -461,4 +461,12 @@ public void should_verify_an_actual_double_predicate_is_conform_to_an_expected_r return (DoublePredicate) number -> number < 100; }).accepts(99)).hasSameClassAs(assertThat((DoublePredicate) t -> t == 0)); } + + @Test + public void should_verify_an_actual_object_array_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new String[]{"one", "two", "three"}; + }).hasSize(3)).hasSameClassAs(assertThat(new String[]{})); + } } From 9645b2f78b8c612650a44e8518dc60e06c56ae6e Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Wed, 16 Aug 2017 18:25:18 +0200 Subject: [PATCH 56/63] It should verify an actual input stream is conform to an expected result. --- .../src/main/java/testasyouthink/TestAsYouThink.java | 7 +++++++ .../java/testasyouthink/function/CheckedSuppliers.java | 3 +++ .../src/test/java/testasyouthink/ResultOfEventTest.java | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index a0c5347..9de9cab 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -34,6 +34,7 @@ import org.assertj.core.api.AbstractFileAssert; import org.assertj.core.api.AbstractFloatAssert; import org.assertj.core.api.AbstractFutureAssert; +import org.assertj.core.api.AbstractInputStreamAssert; import org.assertj.core.api.AbstractInstantAssert; import org.assertj.core.api.AbstractIntegerAssert; import org.assertj.core.api.AbstractLocalDateAssert; @@ -91,6 +92,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedFileSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFloatSupplier; import testasyouthink.function.CheckedSuppliers.CheckedFutureSupplier; +import testasyouthink.function.CheckedSuppliers.CheckedInputStreamSupplier; import testasyouthink.function.CheckedSuppliers.CheckedInstantSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntPredicateSupplier; import testasyouthink.function.CheckedSuppliers.CheckedIntegerSupplier; @@ -115,6 +117,7 @@ import testasyouthink.function.CheckedSuppliers.CheckedUrlSupplier; import testasyouthink.function.Functions; +import java.io.InputStream; import java.util.concurrent.Future; import java.util.function.Consumer; import java.util.function.Supplier; @@ -351,4 +354,8 @@ public static DoublePredicateAssert resultOf(CheckedDoublePredicateSupplier when public static <$Element> AbstractObjectArrayAssert resultOf(CheckedArraySupplier<$Element> whenStep) { return assertThat(arrayAsResult(whenStep)); } + + public static AbstractInputStreamAssert resultOf(CheckedInputStreamSupplier whenStep) { + return assertThat(result(whenStep)); + } } \ No newline at end of file diff --git a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java index f46bca1..6729221 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/function/CheckedSuppliers.java @@ -23,6 +23,7 @@ package testasyouthink.function; import java.io.File; +import java.io.InputStream; import java.math.BigDecimal; import java.math.BigInteger; import java.net.URI; @@ -140,4 +141,6 @@ interface CheckedArraySupplier { R[] get() throws Throwable; } + + interface CheckedInputStreamSupplier extends CheckedSupplier {} } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index 9fbf773..a7968ae 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -32,6 +32,7 @@ import testasyouthink.fixture.UnexpectedException; import testasyouthink.function.CheckedSuppliers.CheckedStringSupplier; +import java.io.ByteArrayInputStream; import java.io.File; import java.math.BigDecimal; import java.math.BigInteger; @@ -469,4 +470,12 @@ public void should_verify_an_actual_object_array_is_conform_to_an_expected_resul return new String[]{"one", "two", "three"}; }).hasSize(3)).hasSameClassAs(assertThat(new String[]{})); } + + @Test + public void should_verify_an_actual_input_stream_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new ByteArrayInputStream(new byte[]{0, 1, 2}); + }).isNotNull()).hasSameClassAs(assertThat(new ByteArrayInputStream(new byte[]{0}))); + } } From 3d75a96daa4cf453b5d97235b93d89d7721b51f9 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Fri, 18 Aug 2017 21:41:10 +0200 Subject: [PATCH 57/63] It should verify an actual object is conform to an expected result. --- .../java/testasyouthink/TestAsYouThink.java | 6 +++ .../testasyouthink/ResultOfEventTest.java | 40 +++++++++++++++---- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java index 9de9cab..40007a8 100644 --- a/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java +++ b/test-as-you-think-core/src/main/java/testasyouthink/TestAsYouThink.java @@ -42,6 +42,7 @@ import org.assertj.core.api.AbstractLocalTimeAssert; import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractObjectArrayAssert; +import org.assertj.core.api.AbstractObjectAssert; import org.assertj.core.api.AbstractPathAssert; import org.assertj.core.api.AbstractShortAssert; import org.assertj.core.api.AbstractUriAssert; @@ -186,6 +187,11 @@ public static ThenFailure whenOutsideOperatingConditions(CheckedRunnable whenSte return result; } + public static <$ActualResult> AbstractObjectAssert resultOf( + CheckedSupplier<$ActualResult> whenStep) { + return assertThat(result(whenStep)); + } + public static AbstractCharacterAssert resultOf(CheckedCharacterSupplier whenStep) { return assertThat(result(whenStep)); } diff --git a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java index a7968ae..db2f5c5 100644 --- a/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java +++ b/test-as-you-think-core/src/test/java/testasyouthink/ResultOfEventTest.java @@ -27,6 +27,8 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import testasyouthink.ResultOfEventTest.Results.ActualResult; +import testasyouthink.ResultOfEventTest.Results.ExpectedResult; import testasyouthink.execution.ExecutionError; import testasyouthink.fixture.GivenWhenThenDefinition; import testasyouthink.fixture.UnexpectedException; @@ -92,6 +94,23 @@ public void verifyMocks() { verifyNoMoreInteractions(gwtMock); } + @Test + public void should_verify_an_actual_object_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new ActualResult(); + }).isEqualTo(new ExpectedResult())).hasSameClassAs(assertThat(new ActualResult())); + } + + @Test + public void should_verify_an_actual_object_array_is_conform_to_an_expected_result() { + assertThat(resultOf(() -> { + gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); + return new ActualResult[]{new ActualResult(), new ActualResult()}; + }).isEqualTo(new ExpectedResult[]{new ExpectedResult(), new ExpectedResult()})).hasSameClassAs( + assertThat(new ActualResult[]{})); + } + @Test public void should_verify_an_actual_character_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { @@ -463,14 +482,6 @@ public void should_verify_an_actual_double_predicate_is_conform_to_an_expected_r }).accepts(99)).hasSameClassAs(assertThat((DoublePredicate) t -> t == 0)); } - @Test - public void should_verify_an_actual_object_array_is_conform_to_an_expected_result() { - assertThat(resultOf(() -> { - gwtMock.whenAnEventHappensInRelationToAnActionOfTheConsumer(); - return new String[]{"one", "two", "three"}; - }).hasSize(3)).hasSameClassAs(assertThat(new String[]{})); - } - @Test public void should_verify_an_actual_input_stream_is_conform_to_an_expected_result() { assertThat(resultOf(() -> { @@ -478,4 +489,17 @@ public void should_verify_an_actual_input_stream_is_conform_to_an_expected_resul return new ByteArrayInputStream(new byte[]{0, 1, 2}); }).isNotNull()).hasSameClassAs(assertThat(new ByteArrayInputStream(new byte[]{0}))); } + + static class Results { + + static class ActualResult { + + @Override + public boolean equals(Object other) { + return other instanceof ExpectedResult; + } + } + + static class ExpectedResult {} + } } From dbf5e8db02dac42aadbe9b026eba5094e2652d36 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 3 Aug 2017 23:16:26 +0200 Subject: [PATCH 58/63] Release the Maven artifacts. --- README.md | 2 +- pom.xml | 2 +- test-as-you-think-core/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18ecc42..8b2f529 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Add *TestAsYouThink* as a dependency to your project with Maven, or download it com.github.xapn test-as-you-think-core - 0.5 + 0.6 ``` diff --git a/pom.xml b/pom.xml index 3aec764..3e47bf6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.github.xapn test-as-you-think-project - 0.6-SNAPSHOT + 0.6 pom TestAsYouThink Project The TestAsYouThink project aims to provide tooling to improve test code quality and to make testing diff --git a/test-as-you-think-core/pom.xml b/test-as-you-think-core/pom.xml index 75e8ffe..6171920 100644 --- a/test-as-you-think-core/pom.xml +++ b/test-as-you-think-core/pom.xml @@ -5,7 +5,7 @@ com.github.xapn test-as-you-think-project - 0.6-SNAPSHOT + 0.6 test-as-you-think-core From 6afefb0b0976a73705a5efeef546350a22d57770 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 3 Aug 2017 22:39:56 +0200 Subject: [PATCH 59/63] Write the release note. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8b2f529..18e955e 100644 --- a/README.md +++ b/README.md @@ -398,6 +398,10 @@ To understand how version numbers change, please read the [Semantic Versioning]( ## Release Notes +### 0.6 version: Fluent assertions as if you meant AssertJ + +- Use the [AssertJ](http://joel-costigliola.github.io/assertj) assertions like an extension of the *TestAsYouThink* API with its `resultOf()` end point. + ### 0.5 version: System under test as a test fixture - Prepare the system under test as any other test fixture. From 57e80e12b9f4b90467dc0c13acef576d3498a263 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 3 Aug 2017 23:11:46 +0200 Subject: [PATCH 60/63] Update the user guide. - Explain how and when to use fluent assertions as an extension of the API. --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 18e955e..9f91b4b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Please use this [permalink](https://goo.gl/XqS4Zf) (goo.gl/XqS4Zf) to share this *TestAsYouThink* is an open source software library in Java for testing purposes. It is designed as a **fluent API** that will change the way development teams write their unit and integration tests. It aims to take control over the coding practices as **executable guidelines**, from beginners to experts, to get **high-quality tests**. Why should you adopt *TestAsYouThink*? - It promotes good coding practices for testing, on writing tests rather than before it with training or after it with code reviews. -- It enables to give a better structure based on compilable code rather than textual comments to the test code. +- It makes the testing language ubiquitous to give a better structure based on compilable code rather than textual comments to the test code. - It improves test code readability and may bring more conciseness. - It brings a functional programming approach to testing that makes reusing test code easier and more natural. - It is designed to be easy to use thanks to code completion. @@ -62,13 +62,13 @@ Please use this [permalink](https://goo.gl/XqS4Zf) (goo.gl/XqS4Zf) to share this Why to name this API *TestAsYouThink*? The goal of *TestAsYouThink* is to map out the road from a new software functionality idea to its contractualized achievement as an executable test, while preserving product developers against known pitfalls. According to this perspective, any pitfall is likely to extend the developer's journey and to put him off his target. By anticipating such pitfalls, *TestAsYouThink* will be the best way to reduce the distance to proper, durable testing. -Moreover *TestAsYouThink* uses the [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) canvas as a formal guide to compose tests. This canvas originally comes from [Gherkin](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) that is a grammatical protocol used in the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) method to write test scenarii in a business human-readable way by specifying a software behavior basing on concrete examples. [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) serves to divide any test into the three eponym steps. This canvas is implemented by the *TestAsYouThink* project to deliver a [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) style fluent API. +Moreover *TestAsYouThink* uses the [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) canvas as a formal guide to compose tests. This canvas originally comes from [Gherkin](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) that is a grammatical protocol used in the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) method to write test scenarii in a business human-readable way by specifying a software behavior basing on concrete examples. [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) serves to divide any test into the three eponym steps. This canvas is implemented by the *TestAsYouThink* project to deliver a [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) style [fluent API](https://en.wikipedia.org/wiki/Fluent_interface). # Getting Started ## Installation -Add *TestAsYouThink* as a dependency to your project with Maven, or download it from [Maven Central](https://search.maven.org/#search%7Cga%7C1%7Ctest%20as%20you%20think). +Add *TestAsYouThink* as a dependency to your project with [Maven](https://maven.apache.org), or download it from [Maven Central](https://search.maven.org/#search%7Cga%7C1%7Ctest%20as%20you%20think). ```xml com.github.xapn @@ -245,6 +245,8 @@ import static testasyouthink.TestAsYouThink.when; when(() -> systemUnderTest.targetMethod(oneOrMoreArguments)).then(...); // or... when(systemUnderTest::targetMethod).then(...); // without arguments to be passed to the target method + +resultOf(SystemUnderTest::targetMethod).satisfies(requirements); // to chain fluent assertions as explained below ``` ### Avoid ambiguous method calls @@ -377,11 +379,46 @@ givenSutClass(SystemUnderTest.class) The advantage of *TestAsYouThink* is that the time limit is only applied to the tested event, while [JUnit](https://github.com/junit-team/junit4/wiki/timeout-for-tests) applies its `timeout` to the whole test method with its `@Test` annotation. [JUnit 5](http://junit.org/junit5/docs/snapshot/user-guide/) will propose an `assertTimeout(duration, lambda)` method that returns the lamba result, but such a syntax amalgamates irremediably the expectations and the event. +### Fluent assertions as a chained extension + +You never write your assertions without adding [AssertJ](http://joel-costigliola.github.io/assertj) to your projects, don't you? If you have written your test on starting by the event, like this for example... +```java +when(SystemUnderTest::targetMethod) +.then(fellowshipOfTheRing -> + assertThat(fellowshipOfTheRing) + .hasSize(9) + .contains(frodo, sam) + .doesNotContain(sauron) +); +``` +...maybe you would like to use AssertJ as if it was an extension of *TestAsYouThink*. It is the reason why you can do. It is really useful if the SUT is implicit, when the target method is static for example, and if the assertion scope is narrow. In this case, do not stage your test and write it just as following. +```java +import static testasyouthink.TestAsYouThink.resultOf; +... + +resultOf(SystemUnderTest::buildFellowshipOfTheRing) + .hasSize(9) + .contains(frodo, sam) + .doesNotContain(sauron); +``` + +This usage is foreseen for very simple tests only. On the contrary, if a test scenario consists of the *Given-When-Then* steps, you should structure the whole test by pointing out each step and wrap the assertions in at least one well identified *Then* step, and maybe different ones according to their matters. + +Why use `resultOf()` rather than `assertThat()`? Here the goal is to identify the actual result against the expected result at a glance. According to the assertion API, whether it be [JUnit](http://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Assertions.html) or be [AssertJ](http://joel-costigliola.github.io/assertj/core-8/api/org/assertj/core/api/Assertions.html) or be anything else, the order between the actual and expected results is never the same. +```java +assert expectedOrActual.equals(actualOrExpected); // expected or actual at first with the Java assert keyword +org.junit.Assert.assertEquals(expected, actual); // expected at first with JUnit 4 +org.junit.jupiter.api.Assertions.assertEquals(expected, actual); // expected at first with JUnit 5 +org.testng.AssertJUnit.assertEquals(expected, actual); // expected at first with TestNG +org.assertj.core.api.Assertions.assertThat(actual).isEqualTo(expected); // actual at first with AssertJ +``` +As a consequence, if both are inverted, the error message will be wrong and will mislead developers before fixing a failing test. The *TestAsYouThink* `resultOf()` leaves no doubt about which is what by making the testing language ubiquitous. + # Functional approach of testing The functional programming approach of *TestAsYouThink* applied to testing is a very important advantage for software developers. As the API is designed to receive the test steps as functions, it makes you free to factorize many little pieces of code and to assembly them again as new test scenarii. Whereas the granularity of reuse of most of testing frameworks is based on classes, you will take advantage of the ability of *TestAsYouThink* to play with more and more bricks of code to expand the covered business cases. -You are even able to begin to code a new component behavior directly in a statement lambda as a *When* step inside a test method. If you are already a [Test-Driven Development](https://en.wikipedia.org/wiki/Test-driven_development) aficionado, be aware it might be a second stage on the [TDD](https://en.wikipedia.org/wiki/Test-driven_development) road to improve and expand your practices. +You are even able to begin to code a new component behavior directly in a statement lambda as a *When* step inside a test method. If you are already a [Test-Driven Development](https://en.wikipedia.org/wiki/Test-driven_development) aficionado, be aware it might be a second stage on the [TDD](https://en.wikipedia.org/wiki/Test-driven_development) road to improve and expand your practices. Make the test pass by writing the least implementation code you can in the test method comes from [TDD as if you meant it](https://cumulative-hypotheses.org/2011/08/30/tdd-as-if-you-meant-it). > *TestAsYouThink* is the first and only testing API that naturally supports the "TDD as if you meant it" practice. # Code Examples From 05fea53234274b12fffc3e36398fc996584823d8 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 3 Aug 2017 23:18:29 +0200 Subject: [PATCH 61/63] Update the table of content of the documentation. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9f91b4b..3985d50 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,13 @@ Please use this [permalink](https://goo.gl/XqS4Zf) (goo.gl/XqS4Zf) to share this - [Expected failures](#expected-failures) - [Unexpected failures](#unexpected-failures) + [Time limit](#time-limit) + + [Fluent assertions as a chained extension](#fluent-assertions-as-a-chained-extension) - [Functional approach of testing](#functional-approach-of-testing) - [Code Examples](#code-examples) - [Releases](#releases) * [Versioning](#versioning) * [Release Notes](#release-notes) + + [0.6 version: Fluent assertions as if you meant AssertJ](#06-version-fluent-assertions-as-if-you-meant-assertj) + [0.5 version: System under test as a test fixture](#05-version-system-under-test-as-a-test-fixture) + [0.4.2 version: Cobertura as a code coverage analyzer](#042-version-cobertura-as-a-code-coverage-analyzer) + [0.4.1 version: Travis CI as a continuous integration platform](#041-version-travis-ci-as-a-continuous-integration-platform) From 485240f715362407711dbc14daf5a6dfcc472537 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Thu, 3 Aug 2017 23:28:24 +0200 Subject: [PATCH 62/63] Update the mind map of the TestAsYouThink releases. --- assets/images/TestAsYouThink.png | Bin 30379 -> 36769 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/images/TestAsYouThink.png b/assets/images/TestAsYouThink.png index 6622caeb21e8fd87df74885be1c3bcc8500893ff..57851948a30ccff30de01f9355170c91a892ff01 100755 GIT binary patch literal 36769 zcmbTdWmKF?vj#d5LWtlY!GpV7aCb}44DJx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pfTE($Yw!^5g3@C95O-SYB`u>+VcvN@m zVE!n%)5EUk6{VwGGi!Fhpa^g%F||y64Rk|kq^^JRyB!Cfmx}j}J3vB`$(nsu=qVu$3)lvi_5A<2?xz9rW*vwW8HTvlcEa=-OFs z-)YX3J-aZpE9PZ||fT{nc^uu8xj#TLY(XrEd9g_XiM#BQ7C#y=Ex!X1KN#_`!u{t3Idu9o|HqD5?q9q*L0n|#108@@i=L*-*EURf^rgzd&gKQpmn z1*M+D@lnL?WwtaEIk%GY=I{qQD{Oya0Zn1XB|Dy~e~drKy00K~@|6SJszdd!Lo`=3 zd29xoyEt-_nXQ$G&WY8zoVpRV6>uc?ZI!^hJEunno$Xh2!iA`XY-V%-NzPSt)0KXA ziedWOza|qy*G=uuj@jHRKNcFk!LtBz*R9bAIjZ#rRu6og#PNZ7Y}Z^Y$(mBNm9WY2 z*Bo(_8J@EdGKAiDqOW@i#Iq#*HIfCsnUl&p0~%WDmqL#elkG3?yG8!%WEJfgy|um7 z@v#M2>B&>~X}eNj*zscY;HUh9ofFrB;9SHX3|D0qm2% ztz8fnb6+^B&~C=0G&HrjEw;poIN@u=qdAD^IQAJdEInm7nhU6z{&_FFG77sx_4(i^ zmVshh0FM&JeNvC=;la_m1V1?yA^rNZ2hF-F zVGoLD_r2mw$DOwt#wsRJ^bh6y_FDIsU`|Ekof8~~^|$)pcD1|Fsxay2q-xpM2$buq zgLO`X0f|5(d02CLeGE<TrqW@!nez0GRT*A^n4PPlxAApLFZh@@M_78m`wqw-mRJ)!OA`m&Uszx$Zj0g<0d z9@>qX3-)D}1D|{oq_IA#on1d1QdvRc3G%V|+y4h1YQhr$ From 6c0187dadf49a3d77b0329f67ad6aff1d4b6e741 Mon Sep 17 00:00:00 2001 From: Xavier Pigeon Date: Fri, 18 Aug 2017 23:05:03 +0200 Subject: [PATCH 63/63] Use a mind map to show the ubiquitous language for automated testing. --- README.md | 2 ++ ...biquitous_language_for_automated_testing.png | Bin 0 -> 28305 bytes 2 files changed, 2 insertions(+) create mode 100755 assets/images/ubiquitous_language_for_automated_testing.png diff --git a/README.md b/README.md index 3985d50..7e0e2b8 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ Please use this [permalink](https://goo.gl/XqS4Zf) (goo.gl/XqS4Zf) to share this - It is designed to be easy to use thanks to code completion. - It builds new original features to test execution from version to version. +![Ubiquitous language for automated testing](assets/images/ubiquitous_language_for_automated_testing.png) + Why to name this API *TestAsYouThink*? The goal of *TestAsYouThink* is to map out the road from a new software functionality idea to its contractualized achievement as an executable test, while preserving product developers against known pitfalls. According to this perspective, any pitfall is likely to extend the developer's journey and to put him off his target. By anticipating such pitfalls, *TestAsYouThink* will be the best way to reduce the distance to proper, durable testing. Moreover *TestAsYouThink* uses the [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) canvas as a formal guide to compose tests. This canvas originally comes from [Gherkin](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) that is a grammatical protocol used in the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) method to write test scenarii in a business human-readable way by specifying a software behavior basing on concrete examples. [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) serves to divide any test into the three eponym steps. This canvas is implemented by the *TestAsYouThink* project to deliver a [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) style [fluent API](https://en.wikipedia.org/wiki/Fluent_interface). diff --git a/assets/images/ubiquitous_language_for_automated_testing.png b/assets/images/ubiquitous_language_for_automated_testing.png new file mode 100755 index 0000000000000000000000000000000000000000..347118db367239733a98f0e3e3b0ae640f146c70 GIT binary patch literal 28305 zcmd42^+Qzc);|oQQW8T*gA5W%Nef7ggwmmOC<+WQbV!Q~APq`LGfGH<3^{~?gyhgN zlyo-(Qp3B^`<&;T=llEt?=NoIv-h>ub*;5ND|fiIrV1GeBMBZJ9@*nZin@4s*KXqB z;l~qQ0q$fye073{=V=N`FqT4A%DJU|9TBDfa@`Z?kb-JVR)eQC3u82{+&?bf6 zAbWJ{Hf8ln5+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