TestApplicationListener Class — spring-boot Architecture
Architecture documentation for the TestApplicationListener class in EventPublishingRunListenerTests.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/event/EventPublishingRunListenerTests.java lines 90–111
static class TestApplicationListener implements ApplicationListener<ApplicationEvent> {
private final Deque<ApplicationEvent> events = new ArrayDeque<>();
@Override
public void onApplicationEvent(ApplicationEvent event) {
this.events.add(event);
}
void assertReceivedNoEvents() {
assertThat(this.events).isEmpty();
}
void assertReceivedEvent(Class<?>... eventClasses) {
List<ApplicationEvent> receivedEvents = new ArrayList<>();
while (!this.events.isEmpty()) {
receivedEvents.add(this.events.pollFirst());
}
assertThat(receivedEvents).extracting("class").contains((Object[]) eventClasses);
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free