TestResult - The type of test result produced by the Whenpublic interface FluentBddCommands<TestResult>
| Modifier and Type | Method and Description |
|---|---|
default void |
and(Given given)
Same as
given(Given). |
default <Then> Then |
and(ThenAssertion<Then,TestResult> thenAssertion)
Same as
then(ThenAssertion). |
default void |
and(ThenVerification<TestResult> thenVerification)
Same as
then(ThenVerification). |
default void |
and(When<TestResult> when)
Same as
given(When). |
void |
given(Given given)
Prime the given immediately.
|
default void |
given(When<TestResult> when)
Adapt the 'when' to a 'given'.
|
<Then> Then |
then(ThenAssertion<Then,TestResult> thenAssertion)
Perform an assertion.
|
void |
then(ThenVerification<TestResult> thenVerification)
Perform a verification, which should be built up inside the brackets.
|
TestResult |
theResult()
Fetch the result, if it has been computed yet.
|
<T extends When<TestResult>> |
when(T when)
Invoke the system under test and store the
TestResult ready for the assertions. |
default void |
whenCalling(WhenWithoutResult whenWithoutResult)
Invoke the system under test.
|
void given(Given given)
given - The first given in the acceptance test, which should be built up inside the bracketsdefault void and(Given given)
given(Given).
Prime the given immediately.
given - The first given in the acceptance test, which should be built up inside the brackets<T extends When<TestResult>> void when(T when)
TestResult ready for the assertions.T - The type of Whenwhen - The system under test, which should be built up inside the bracketsdefault void whenCalling(WhenWithoutResult whenWithoutResult)
TestResult is assumed to have been passed in already in the
FluentBdd constructor, which is useful to use the test class instance as the TestResult.
That way, many Test methods can have different results and store them in the test class.
whenWithoutResult - The system under test, which should be built up inside the bracketsTestResult theResult()
TestResult.default void given(When<TestResult> when)
given(Given).when - The 'when' to adapt to a 'given'default void and(When<TestResult> when)
given(When).
Adapt the 'when' to a 'given'. This is a common pattern when e.g. calling an endpoint that changes some state in the database.
This is the equivalent of given(Given).
when - The 'when' to adapt to a 'given'<Then> Then then(ThenAssertion<Then,TestResult> thenAssertion)
Then - The type of fluent assertions that will be performedthenAssertion - A ThenAssertion that will produce a Then given the stored TestResultdefault <Then> Then and(ThenAssertion<Then,TestResult> thenAssertion)
then(ThenAssertion).
Perform an assertion. Assertions should be chained outside the brackets.
Then - The type of fluent assertions that will be performedthenAssertion - A ThenAssertion that will produce a Then given the stored TestResultvoid then(ThenVerification<TestResult> thenVerification)
thenVerification - A ThenVerification, which should be built up inside the bracketsdefault void and(ThenVerification<TestResult> thenVerification)
then(ThenVerification).
Perform a verification, which should be built up inside the brackets.
thenVerification - A ThenVerification, which should be built up inside the bracketsCopyright © 2016. All rights reserved.