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

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>

The aggregate DSL context for managing shared test state.

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

A mutable list of dynamic test nodes that can be modified by subclasses.

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, ownerId: String, block: ExpectDsl<S>.() -> Unit)

Executes a command and defines expectations for the result.