Class TestContextEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.test.context.event.TestContextEvent
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AfterTestClassEvent, AfterTestExecutionEvent, AfterTestMethodEvent, BeforeTestClassEvent, BeforeTestExecutionEvent, BeforeTestMethodEvent, PrepareTestInstanceEvent
Base class for events published by the 
EventPublishingTestExecutionListener.- Since:
- 5.2
- Author:
- Frank Scheffler, Sam Brannen
- See Also:
- 
Field SummaryFields inherited from class EventObjectsource
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal TestContextGet theTestContextassociated with this event.final TestContextAlias forgetSource().Methods inherited from class ApplicationEventgetTimestampMethods inherited from class EventObjecttoString
- 
Constructor Details- 
TestContextEventCreate a newTestContextEvent.- Parameters:
- source- the- TestContextassociated with this event (must not be- null)
 
 
- 
- 
Method Details- 
getSourceGet theTestContextassociated with this event.- Overrides:
- getSourcein class- EventObject
- Returns:
- the TestContextassociated with this event (nevernull)
- See Also:
 
- 
getTestContextAlias forgetSource().This method may be favored over getSource()— for example, to improve readability in SpEL expressions for event processing conditions.- Returns:
- the TestContextassociated with this event (nevernull)
- See Also:
 
 
-