Uses of Class
org.springframework.modulith.test.Scenario.When
Packages that use Scenario.When
-
Uses of Scenario.When in org.springframework.modulith.test
Methods in org.springframework.modulith.test that return Scenario.WhenModifier and TypeMethodDescriptionScenario.When.andWaitAtMost(Duration duration) Configures theScenarioto wait for at most the given duration for an event of the subsequent specification to arrive.Scenario.When.customize(Function<org.awaitility.core.ConditionFactory, org.awaitility.core.ConditionFactory> customizer) Publishes the given event.Publishes the event provided by the givenSupplier.Stimulates the system by executing the givenRunnable.Scenario.stimulate(BiConsumer<TransactionOperations, ApplicationEventPublisher> stimulus) Stimulate the system using the givenTransactionOperationsandApplicationEventPublisher.Scenario.stimulate(BiConsumer<TransactionOperations, ApplicationEventPublisher> stimulus, Runnable cleanupCallback) <S> Scenario.When<S>Scenario.stimulate(BiFunction<TransactionOperations, ApplicationEventPublisher, S> stimulus) Stimulate the system using the givenTransactionOperationsandApplicationEventPublisherand produce a result.<S> Scenario.When<S>Scenario.stimulate(BiFunction<TransactionOperations, ApplicationEventPublisher, S> stimulus, Consumer<S> cleanupCallback) Stimulate the system using the givenTransactionOperationsandApplicationEventPublisher(usually a method on some application service or event publication is triggered), produce a result and a callback to clean up after the verification has completed.<S> Scenario.When<S>Scenario.stimulate(Function<TransactionOperations, S> function) Stimulates the system using the given function providing access to theTransactionOperationsand keeping the supplied value around for later verification.<S> Scenario.When<S>Scenario.stimulate(Function<TransactionOperations, S> function, Consumer<S> cleanupCallback) Stimulates the system using the given function providing access to theTransactionOperationsand keeping the supplied value around for later verification but also registers a cleanup callback to make sure potential state changes are rolled back for the test execution.<S> Scenario.When<S>Stimulates the system using the givenSupplierand keeping the supplied value around for later verification.<S> Scenario.When<S>Stimulates the system using the givenSupplier, keeping the supplied value around for later verification but also registers a cleanup callback to make sure potential state changes are rolled back for the test execution.