Class PublishedEventsAssert.PublishedEventAssert<T>
java.lang.Object
org.springframework.modulith.test.PublishedEventsAssert.PublishedEventAssert<T>
- Enclosing class:
- PublishedEventsAssert
Assertions further qualifying the expected events.
- Author:
- Oliver Drotbohm
- 
Method Summary
- 
Method Details- 
matchingAsserts that at least one event matches the given predicate.- Parameters:
- predicate- must not be null.
- Returns:
- will never be null.
 
- 
matchingpublic <S> PublishedEventsAssert.PublishedEventAssert<T> matching(Function<T, S> function, Predicate<? super S> predicate) Asserts that at least one event exists for which the value extracted by the givenFunctionmatches the givenPredicate.- Type Parameters:
- S- the type of the value to be matched.
- Parameters:
- function- the extractor function, must not be null.
- predicate- the- Predicatethe extracted value is supposed to match. Must not be null.
- Returns:
- will never be null.
 
- 
matchingpublic <S> PublishedEventsAssert.PublishedEventAssert<T> matching(Function<T, S> function, @Nullable S value) Asserts that at least one event exists for which the value extracted by the givenFunctionmatches the given one.- Type Parameters:
- S- the type of the value to be matched
- Parameters:
- function- the extractor function, must not be null.
- value- the expected value, can be null.
- Returns:
- will never be null.
 
- 
andSyntactic sugar to start a new assertion on a different type of event.- Returns:
- will never be null.
 
 
-