VerifiedStage

Defines the stage after command execution and expectation verification in aggregate testing.

This interface extends both GivenStage and AggregateExpecter, allowing for additional command executions or further expectations on the verified results.

Type Parameters

S

the type of the aggregate state

Properties

Link copied to clipboard

The state aggregate after command execution.

Link copied to clipboard
open val stateRoot: S

The root state object from the aggregate.

Link copied to clipboard

The verified result of the command execution.

Functions

Link copied to clipboard
open override fun expect(expected: ExpectedResult<S>.() -> Unit): VerifiedStage<S>

Applies additional expectations to the verified result.

Link copied to clipboard
abstract fun fork(verifyError: Boolean = false): VerifiedStage<S>

Creates a completely independent test branch context from the current state.

open fun fork(verifyError: Boolean = false, handle: VerifiedStage<S>.() -> Unit): VerifiedStage<S>

Creates a test branch and executes a handler function on it.

Link copied to clipboard
abstract fun then(verifyError: Boolean = false): VerifiedStage<S>

Continues to the next stage, optionally verifying error conditions.