expectState

fun expectState(expected: S)

The aggregate's state after the command is expected, field by field as Wow writes it to JSON: a mismatch lists each difference by its path. As expectState of a check, after a command that committed nothing the state is the one the aggregate is in.


fun expectState(check: S.() -> Unit)

Checks the state after the committed events; after a command that committed nothing (it changed nothing, was rejected, or its decide function threw), the state the aggregate is in.