TestResult - The type of test result produced by the Whenpublic class FluentBdd<TestResult> extends org.junit.rules.TestWatcher implements FluentBddCommands<TestResult>
Rule alongside WithFluentBdd.| Modifier and Type | Field and Description |
|---|---|
Verification<TestResult> |
verification |
| Constructor and Description |
|---|
FluentBdd()
Constructs a
FluentBdd without an initial TestResult. |
FluentBdd(TestResult testResult)
Constructs a
FluentBdd with an initial TestResult. |
| Modifier and Type | Method and Description |
|---|---|
void |
given(Given given)
Prime the given immediately.
|
protected void |
succeeded(org.junit.runner.Description description) |
<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. |
apply, failed, finished, skipped, skipped, startingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, and, and, and, given, whenCallingpublic final Verification<TestResult> verification
public FluentBdd()
FluentBdd without an initial TestResult.public FluentBdd(TestResult testResult)
FluentBdd with an initial TestResult.
This is useful when used in conjunction with FluentBddCommands.whenCalling(WhenWithoutResult), for example when the
TestResult type is the test class and the WhenWithoutResult sets a field in the test.testResult - The initial TestResult.protected void succeeded(org.junit.runner.Description description)
succeeded in class org.junit.rules.TestWatcherpublic void given(Given given)
given in interface FluentBddCommands<TestResult>given - The first given in the acceptance test, which should be built up inside the bracketspublic <T extends When<TestResult>> void when(T when)
FluentBddCommandsTestResult ready for the assertions.when in interface FluentBddCommands<TestResult>T - The type of Whenwhen - The system under test, which should be built up inside the bracketspublic TestResult theResult()
FluentBddCommandstheResult in interface FluentBddCommands<TestResult>TestResult.public <Then> Then then(ThenAssertion<Then,TestResult> thenAssertion)
FluentBddCommandsthen in interface FluentBddCommands<TestResult>Then - The type of fluent assertions that will be performedthenAssertion - A ThenAssertion that will produce a Then given the stored TestResultpublic void then(ThenVerification<TestResult> thenVerification)
FluentBddCommandsthen in interface FluentBddCommands<TestResult>thenVerification - A ThenVerification, which should be built up inside the bracketsCopyright © 2016. All rights reserved.