DefaultStatelessSagaDsl

Default implementation of StatelessSagaDsl for creating dynamic saga tests.

This class provides the entry point for configuring and executing stateless saga tests with customizable service providers, command gateways, and message factories. It creates dynamic test nodes that can be executed by JUnit 5.

Parameters

processorType

The class of the saga processor.

Type Parameters

T

The type of the saga being tested.

Constructors

Link copied to clipboard
constructor(processorType: Class<T>)

Properties

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

Mutable dynamic test nodes that subclasses can append to.

Link copied to clipboard

Public services copied into each saga test context.

Functions

Link copied to clipboard
open override fun inject(inject: ServiceProvider.() -> Unit)

Injects services into the public service provider.

Link copied to clipboard
open override fun on(serviceProvider: ServiceProvider = SimpleServiceProvider(), commandGateway: CommandGateway = defaultCommandGateway(), commandMessageFactory: CommandMessageFactory = SimpleCommandMessageFactory( validator = TestValidator, commandBuilderRewriterRegistry = SimpleCommandBuilderRewriterRegistry(), ), block: WhenDsl<T>.() -> Unit)

Configures and executes a test scenario with the provided components.