public interface ApplicationEvents
ApplicationEventsencapsulates all application events that were fired during the execution of a single test method.
ApplicationEvents in your tests, do the following.
ApplicationEventsTestExecutionListeneris registered. Note, however, that it is registered by default and only needs to be manually registered if you have custom configuration via
@TestExecutionListenersthat does not include the default listeners.
@Autowiredand use that instance of
ApplicationEventsin your test and lifecycle methods.
ApplicationEventsin a test or lifecycle method as an alternative to an
@Autowiredfield in the test class.
|Modifier and Type||Method and Description|
Clear all application events recorded by this
Stream all application events that were fired during test execution.
Stream all application events or event payloads of the given type that were fired during test execution.