expectEventIterator

open fun expectEventIterator(expected: EventIterator.() -> Unit): AE

Expects specific conditions on an event iterator for the domain event stream.

This method provides an EventIterator wrapper around the event stream, offering convenient methods for iterating through events with type-safe access.

Return

the current expecter instance for method chaining

Parameters

expected

a lambda function that receives the EventIterator and performs assertions


Expects specific conditions on an event iterator using a Consumer.

Java-friendly overload for expectEventIterator that accepts a Consumer instead of a lambda.

Return

the current expecter instance for method chaining

Parameters

expected

a Consumer that receives the EventIterator and performs assertions