expectStateAggregate

open fun expectStateAggregate(expected: StateAggregate<S>.() -> Unit): AE

Expects specific conditions on the aggregate state and metadata.

This method provides access to the complete StateAggregate object, allowing assertions on aggregate metadata, version, initialization status, and other aggregate-level properties.

Return

the current expecter instance for method chaining

Parameters

expected

a lambda function that receives the StateAggregate and performs assertions