Class DefaultWorkflowTestFixture<T extends WorkflowContext,ACTION extends GivenWhen<ACTION,ASSERT>,ASSERT extends Then<ASSERT,ACTION>>
- Type Parameters:
T- type of the workflow contextACTION- type of the action phase used forgiven()andwhen()ASSERT- type of the assertion phase used forthen()
- All Implemented Interfaces:
WorkflowTestFixture<ACTION,ASSERT>
WorkflowTestFixture.- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Field Summary
Fields -
Method Summary
-
Field Details
-
logger
protected final org.slf4j.Logger logger
-
-
Method Details
-
given
Description copied from interface:WorkflowTestFixtureReturns the action phase in its setup role.Use this entry point for the given part of a scenario, where the test prepares workflow state before the main behavior is triggered. The returned object is the shared action phase instance used by this fixture. Failures raised while driving the fixture from this phase are reported as
WorkflowTestFixtureException.- Specified by:
givenin interfaceWorkflowTestFixture<T extends WorkflowContext,ACTION extends GivenWhen<ACTION, ASSERT>> - Returns:
- action phase for arranging workflow state
-
when
Description copied from interface:WorkflowTestFixtureReturns the action phase in its stimulus role.This method returns the same phase instance as
WorkflowTestFixture.given(). The different name exists so tests can read naturally when they move from setup to the behavior under test. Callingwhen()does not reset the fixture or change the selected workflow state. Failures raised while driving the fixture from this phase are reported asWorkflowTestFixtureException.- Specified by:
whenin interfaceWorkflowTestFixture<T extends WorkflowContext,ACTION extends GivenWhen<ACTION, ASSERT>> - Returns:
- action phase for triggering the behavior under test
-
then
Description copied from interface:WorkflowTestFixtureReturns the assertion phase.The returned phase shares the same workflow runtime and testing state as
WorkflowTestFixture.given()andWorkflowTestFixture.when(). Use it to assert executions, histories, steps, payload, and workflow state after one or more action-phase operations. Failures raised from this phase are reported asAssertionErrors.- Specified by:
thenin interfaceWorkflowTestFixture<T extends WorkflowContext,ACTION extends GivenWhen<ACTION, ASSERT>> - Returns:
- assertion phase for verifying workflow behavior
-