expectEventStream

open fun expectEventStream(expected: DomainEventStream.() -> Unit): AE

Expects specific conditions on the domain event stream.

This method validates the entire event stream produced by command execution, including event count, ordering, and stream metadata.

Return

the current expecter instance for method chaining

Parameters

expected

a lambda function that receives the DomainEventStream and performs assertions

Throws

if the domain event stream is null or assertions fail


Expects specific conditions on the domain event stream using a Consumer.

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

Return

the current expecter instance for method chaining

Parameters

expected

a Consumer that receives the DomainEventStream and performs assertions