expectEventCount

open fun expectEventCount(expected: Int): AE

Expects a specific number of events in the domain event stream.

This method validates that the command execution produced exactly the expected number of domain events.

Return

the current expecter instance for method chaining

Parameters

expected

the expected number of events in the stream

Throws

if the event count doesn't match the expected value