WhenDsl

Defines the "When" phase of aggregate testing where commands are executed.

This interface provides methods to execute commands on aggregates that have been set up in the Given phase, transitioning to the Expect phase for result validation.

Parameters

S

the type of the aggregate state

Inheritors

Properties

Link copied to clipboard

The aggregate DSL context for managing shared test state.

Functions

Link copied to clipboard
abstract fun name(name: String)

Sets the name for this test element.

Link copied to clipboard
abstract fun whenCommand(command: Any, header: Header = DefaultHeader.empty(), ownerId: String = OwnerId.DEFAULT_OWNER_ID, block: ExpectDsl<S>.() -> Unit)

Executes a command on the aggregate and validates the results.