Interface PublishedEvents
- All Known Subinterfaces:
AssertablePublishedEvents
- All Known Implementing Classes:
DefaultAssertablePublishedEvents,DefaultPublishedEvents
public interface PublishedEvents
All Spring application events fired during the test execution.
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAll application events of a given type that were fired during a test execution. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleaneventOfTypeWasPublished(Class<?> type) Returns whether an event of the given type was published.static PublishedEventsCreates a newPublishedEventsinstance for the given events.static PublishedEventsof(Collection<? extends Object> events) Creates a newPublishedEventsinstance for the given events.Returns all application events of the given type that were fired during the test execution.
-
Method Details
-
of
Creates a newPublishedEventsinstance for the given events.- Parameters:
events- must not be null.- Returns:
- will never be null.
-
of
Creates a newPublishedEventsinstance for the given events.- Parameters:
events- must not be null.- Returns:
-
ofType
Returns all application events of the given type that were fired during the test execution.- Type Parameters:
T- the event type- Parameters:
type- must not be null.- Returns:
-
eventOfTypeWasPublished
Returns whether an event of the given type was published.- Parameters:
type- must not be null.- Returns:
- whether an event of the given type was published.
-