Polish annotation-driven event listener support
This commit is contained in:
@@ -50,8 +50,8 @@ public abstract class TestContextEvent extends ApplicationEvent {
|
||||
|
||||
/**
|
||||
* Alias for {@link #getSource()}.
|
||||
* <p>This method may be favored over {@code getSource()} to improve readability
|
||||
* in SpEL expressions for event processing
|
||||
* <p>This method may be favored over {@code getSource()} — for example,
|
||||
* to improve readability in SpEL expressions for event processing
|
||||
* {@linkplain org.springframework.context.event.EventListener#condition conditions}.
|
||||
* @return the {@code TestContext} associated with this event (never {@code null})
|
||||
* @see #getSource()
|
||||
|
||||
@@ -272,12 +272,12 @@ public class EventPublishingTestExecutionListenerIntegrationTests {
|
||||
throw new RuntimeException("Boom!");
|
||||
}
|
||||
|
||||
@BeforeTestExecution
|
||||
@BeforeTestExecution("'yes'")
|
||||
public void beforeTestExecution(BeforeTestExecutionEvent e) throws Exception {
|
||||
listener().beforeTestExecution(e.getSource());
|
||||
}
|
||||
|
||||
@AfterTestExecution
|
||||
@AfterTestExecution("'1'")
|
||||
public void afterTestExecution(AfterTestExecutionEvent e) throws Exception {
|
||||
listener().afterTestExecution(e.getSource());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user