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
Modifier and TypeInterfaceDescriptionstatic interface
All application events of a given type that were fired during a test execution. -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
eventOfTypeWasPublished
(Class<?> type) Returns whether an event of the given type was published.static PublishedEvents
Creates a newPublishedEvents
instance for the given events.static PublishedEvents
of
(Collection<? extends Object> events) Creates a newPublishedEvents
instance for the given events.Returns all application events of the given type that were fired during the test execution.
-
Method Details
-
of
Creates a newPublishedEvents
instance for the given events.- Parameters:
events
- must not be null.- Returns:
- will never be null.
-
of
Creates a newPublishedEvents
instance 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.
-