launchForTestingWith

@TestOnly
fun <T, PropsT, StateT, OutputT, RenderingT> StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>.launchForTestingWith(props: PropsT, testParams: WorkflowTestParams<StateT> = WorkflowTestParams(), context: CoroutineContext = EmptyCoroutineContext, block: WorkflowTestRuntime<PropsT, OutputT, RenderingT>.() -> T): T(source)

Creates a WorkflowTestRuntime to run this workflow for unit testing.

All workflow-related coroutines are cancelled when the block exits.