Class ApplicationEventsTestExecutionListener

java.lang.Object
org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.test.context.event.ApplicationEventsTestExecutionListener
All Implemented Interfaces:
Ordered, TestExecutionListener

public class ApplicationEventsTestExecutionListener extends AbstractTestExecutionListener
TestExecutionListener which provides support for ApplicationEvents.

This listener manages the registration of ApplicationEvents for the current thread at various points within the test execution lifecycle and makes the current instance of ApplicationEvents available to tests via an @Autowired field in the test class.

If the test class is not annotated or meta-annotated with @RecordApplicationEvents, this listener effectively does nothing.

Since:
5.3.3
Author:
Sam Brannen
See Also: