DefaultWhenDsl

Default implementation of the WhenDsl interface for defining command execution in tests.

This class provides functionality to specify commands to be executed against an aggregate and define expectations for the results. It manages test naming and coordinates the transition from command execution to expectation verification.

Parameters

delegate

the underlying WhenStage that handles command execution

Type Parameters

S

the state type of the aggregate

Constructors

Link copied to clipboard
constructor(context: AggregateDslContext<S>, delegate: WhenStage<S>)

Properties

Link copied to clipboard
open override val context: AggregateDslContext<S>

shared aggregate DSL context

Link copied to clipboard
open override val dynamicNodes: MutableList<DynamicNode>

Mutable dynamic test nodes that subclasses can append to.

Link copied to clipboard
open override var name: String

The name identifier for this test scenario. Used in test reporting and dynamic test naming.

Functions

Link copied to clipboard
open override fun name(name: String)

Sets the name for this test scenario.

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

Executes a command and defines expectations for the result.