//workflow/com.squareup.workflow1.testing/launchForTestingFromStartWith
launchForTestingFromStartWith¶
[jvm]
Content
@TestOnly()
fun <T, PropsT, OutputT, RenderingT> Workflow<PropsT, OutputT, RenderingT>.launchForTestingFromStartWith(props: PropsT, testParams: WorkflowTestParams<Nothing> = WorkflowTestParams(), context: CoroutineContext = EmptyCoroutineContext, block: WorkflowTestRuntime<PropsT, OutputT, RenderingT>.() -> T): T
@TestOnly()
fun <T, OutputT, RenderingT> Workflow<Unit, OutputT, RenderingT>.launchForTestingFromStartWith(testParams: WorkflowTestParams<Nothing> = WorkflowTestParams(), context: CoroutineContext = EmptyCoroutineContext, block: WorkflowTestRuntime<Unit, OutputT, RenderingT>.() -> T): T
More info
Creates a WorkflowTestRuntime to run this workflow for unit testing.
All workflow-related coroutines are cancelled when the block exits.