WhenStage

interface WhenStage<S : Any>

Defines the stage for specifying commands to execute in aggregate testing.

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

Parameters

S

the type of the aggregate state

Functions

Link copied to clipboard
open fun whenCommand(command: Any): ExpectStage<S>

abstract fun whenCommand(command: Any, header: Header = DefaultHeader.empty(), ownerId: String = OwnerId.DEFAULT_OWNER_ID, spaceId: SpaceId = SpaceIdCapable.DEFAULT_SPACE_ID): ExpectStage<S>

Executes a command with full parameter control.