whenEvent

abstract fun whenEvent(event: Any, state: Any? = null, ownerId: String = OwnerId.Companion.DEFAULT_OWNER_ID): ExpectStage<T>

Triggers saga processing with a domain event and optional parameters.

This method is the core function for initiating saga testing by providing an event and optional state/owner information.

Return

An expectation stage to define assertions on the saga results.

Parameters

event

The domain event that triggers the saga.

state

Optional state to provide to the saga processing.

ownerId

The owner ID for the event processing.