ExpectedResult

data class ExpectedResult<T : Any>(val exchange: DomainEventExchange<*>, val processor: T, val commandStream: CommandStream?, val error: Throwable? = null) : StatelessSagaExpecter<T, ExpectedResult<T>>

Represents the expected result of a stateless saga processing operation.

This data class encapsulates the outcome of processing a domain event through a stateless saga, including the event exchange, processor, generated commands, and any errors that occurred.

Type Parameters

T

The type of the saga processor.

Constructors

Link copied to clipboard
constructor(exchange: DomainEventExchange<*>, processor: T, commandStream: CommandStream?, error: Throwable? = null)

Properties

Link copied to clipboard

The stream of commands generated by the saga, or null if none.

Link copied to clipboard

Any error that occurred during processing, or null if successful.

Link copied to clipboard

The domain event exchange that triggered the saga processing.

Link copied to clipboard

Indicates whether an error occurred during saga processing.

Link copied to clipboard

The saga processor instance that handled the event.

Functions

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

Sets expectations on the expected result using a lambda.