Interface PublishedEvents.TypedPublishedEvents<T>
- Type Parameters:
T- the event type
- All Superinterfaces:
Iterable<T>
- Enclosing interface:
- PublishedEvents
All application events of a given type that were fired during a test execution.
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionReturns allPublishedEvents.TypedPublishedEventsthat match the given predicate after applying the given mapping step.Returns allPublishedEvents.TypedPublishedEventsthat match the given value after applying the given mapping step.Returns allPublishedEvents.TypedPublishedEventsthat match the given predicate.default <S> PublishedEvents.TypedPublishedEvents<T>matchingMapped(Function<T, S> mapper, Predicate<? super S> predicate) Deprecated, for removal: This API element is subject to removal in a future version.<S extends T>
PublishedEvents.TypedPublishedEvents<S>Further constrain the event type for downstream assertions.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
ofSubType
Further constrain the event type for downstream assertions.- Type Parameters:
S-- Parameters:
subType- the sub type- Returns:
- will never be null.
-
matching
Returns allPublishedEvents.TypedPublishedEventsthat match the given predicate.- Parameters:
predicate- must not be null.- Returns:
- will never be null.
-
matching
<S> PublishedEvents.TypedPublishedEvents<T> matching(Function<T, S> mapper, Predicate<? super S> predicate) Returns allPublishedEvents.TypedPublishedEventsthat match the given predicate after applying the given mapping step.- Type Parameters:
S- the intermediate type to apply thePredicateon- Parameters:
mapper- the mapping step to extract a part of the original event subject to test for thePredicate. Must not be null.predicate- thePredicateto apply on the value extracted. Must not be null.- Returns:
- will never be null.
-
matching
Returns allPublishedEvents.TypedPublishedEventsthat match the given value after applying the given mapping step.- Type Parameters:
S- the intermediate type to apply thePredicateon- Parameters:
mapper- the mapping step to extract a part of the original event subject to verify against the given value, must not be null.value- the value expected as outcome of the mapping step, can be null.- Returns:
- will never be null.
-
matchingMapped
@Deprecated(forRemoval=true, since="0.3") default <S> PublishedEvents.TypedPublishedEvents<T> matchingMapped(Function<T, S> mapper, Predicate<? super S> predicate) Deprecated, for removal: This API element is subject to removal in a future version.since 0.3, usematching(Function, Predicate)instead.Returns allPublishedEvents.TypedPublishedEventsthat match the given predicate after applying the given mapping step.
-
matching(Function, Predicate)instead.