GH-185 - Allow verification of events after method invocation stimulus.

This commit is contained in:
Oliver Drotbohm
2023-04-24 17:31:21 +02:00
parent b834c255ec
commit 3a923519f2
2 changed files with 26 additions and 0 deletions

View File

@@ -433,6 +433,18 @@ public class Scenario {
consumer.accept(result.first(), result.second());
}
/**
* Verifies the underlying {@link AssertablePublishedEvents}.
*
* @param events must not be {@literal null}.
*/
public void andVerifyEvents(Consumer<AssertablePublishedEvents> events) {
Assert.notNull(events, "Consumer must not be null!");
events.accept(Scenario.this.events);
}
}
public class EventResult<E> {