Class Scenario.When.StateChangeResult<S>
java.lang.Object
org.springframework.modulith.test.Scenario.When.StateChangeResult<S>
- Enclosing class:
- Scenario.When<T>
The result of an expected state change.
- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionStateChangeResult(org.springframework.modulith.test.Scenario.When.ExecutionResult<S, T> result) -
Method Summary
Modifier and TypeMethodDescription<E> Scenario.When<T>.EventResult<E>Expects an event of the given type to arrive eventually.voidandVerify(BiConsumer<S, T> consumer) Verifies the state change result and stimulus result using the givenBiConsumer.voidVerifies the state change result using the givenConsumer.voidVerifies the underlyingAssertablePublishedEvents.
-
Constructor Details
-
StateChangeResult
-
-
Method Details
-
andVerify
Verifies the state change result using the givenConsumer.- Parameters:
consumer- must not be null.
-
andVerify
Verifies the state change result and stimulus result using the givenBiConsumer.- Parameters:
consumer- must not be null.
-
andVerifyEvents
Verifies the underlyingAssertablePublishedEvents.- Parameters:
events- must not be null.
-
andExpect
Expects an event of the given type to arrive eventually. Use API on the returnedScenario.When.EventResultto specify more detailed expectations and conclude those with a call a flavor ofScenario.When.EventResult.toArrive().- Type Parameters:
E- the type of the event- Parameters:
eventType- must not be null.- Returns:
- will never be null.
-