//workflow/com.squareup.workflow1.testing/WorkflowTestRuntime
WorkflowTestRuntime¶
[jvm] class WorkflowTestRuntime<PropsT, OutputT, RenderingT>
Runs a Workflow and provides access to its renderings, outputs, and snapshots.
For each of renderings, outputs, and snapshots, this class gives you a few ways to access information about them:
- [awaitNextRendering](await-next-rendering.md), [awaitNextOutput](await-next-output.md), [awaitNextSnapshot](await-next-snapshot.md)
- Block until something becomes available, and then return it.
- [hasRendering](has-rendering.md), [hasOutput](has-output.md), [hasSnapshot](has-snapshot.md)
- Return true if the previous methods won't block.
- [sendProps](send-props.md)
- Send a new [PropsT](index.md) to the root workflow.
Types¶
Name | Summary |
---|---|
Companion | [jvm] Content object Companion |
Functions¶
Name | Summary |
---|---|
awaitNextOutput | [jvm] Content fun awaitNextOutput(timeoutMs: Long? = null): OutputT More info Blocks until the workflow emits an output, then returns it. |
awaitNextRendering | [jvm] Content fun awaitNextRendering(timeoutMs: Long? = null, skipIntermediate: Boolean = true): RenderingT More info Blocks until the workflow emits a rendering, then returns it. |
awaitNextSnapshot | [jvm] Content fun awaitNextSnapshot(timeoutMs: Long? = null, skipIntermediate: Boolean = true): TreeSnapshot More info Blocks until the workflow emits a snapshot, then returns it. |
sendProps | [jvm] Content fun sendProps(input: PropsT) More info Sends input to the workflow. |
Properties¶
Name | Summary |
---|---|
hasOutput | [jvm] val hasOutput: BooleanTrue if the workflow has emitted a new output that is ready to be consumed. |
hasRendering | [jvm] val hasRendering: BooleanTrue if the workflow has emitted a new rendering that is ready to be consumed. |
hasSnapshot | [jvm] val hasSnapshot: BooleanTrue if the workflow has emitted a new snapshot that is ready to be consumed. |