Skip to content

//workflow/com.squareup.workflow1.testing/RenderTestResult/verifyActionResult

verifyActionResult

[jvm]
Content
abstract fun verifyActionResult(block: (StateT, output: WorkflowOutput<OutputT>?) -> Unit)
More info

Asserts that the render pass handled either a workflow/worker output or a rendering event, “executes” the action with the state passed to testRender, then invokes block with the resulting state and output values.

If the workflow didn’t process any actions, newState will be the initial state and output will be null.

Note that by using this method, you’re also testing the implementation of your action. This can be useful if your actions are anonymous. If they are a sealed class or enum, use verifyAction instead and write separate unit tests for your action implementations.