WhenDsl

DSL interface for defining the "when" conditions in saga testing.

This interface allows specifying which events trigger the saga and configuring the test environment.

Parameters

T

The type of the saga being tested.

Inheritors

Functions

Link copied to clipboard
abstract fun functionFilter(filter: (MessageFunction<*, *, *>) -> Boolean)

Sets a filter for message functions to be considered during testing.

Link copied to clipboard
open fun functionName(functionName: String)

Filters message functions by name.

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

Injects services into the test context using the provided configuration block.

Link copied to clipboard
abstract fun name(name: String)

Sets the name for this test element.

Link copied to clipboard
abstract fun whenEvent(event: Any, state: Any? = null, ownerId: String = OwnerId.DEFAULT_OWNER_ID, block: ExpectDsl<T>.() -> Unit)

Defines an event that triggers the saga and sets expectations on the result.