Skip to content

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

RenderTestResult

[jvm] interface RenderTestResult<PropsT, StateT, OutputT, RenderingT>

Result of a RenderTester.render call that can be used to verify that a WorkflowAction was processed and perform assertions on that action.

See also

jvm

com.squareup.workflow1.testing.RenderTestResult

Functions

Name Summary
testNextRender [jvm]
Content
abstract fun testNextRender(): RenderTester<PropsT, StateT, OutputT, RenderingT>
More info
Starts a new RenderTester session using the same props as the previous session started by testRender or testNextRenderWithProps, and the state that is a result of the latest render pass (the same one you could run assertions on in verifyActionResult).


testNextRenderWithProps [jvm]
Content
abstract fun testNextRenderWithProps(newProps: PropsT): RenderTester<PropsT, StateT, OutputT, RenderingT>
More info
Starts a new RenderTester session using newProps props, and the state that is a result of the latest render pass (the same one you could run assertions on in verifyActionResult).


verifyAction [jvm]
Content
abstract fun verifyAction(block: (WorkflowAction<PropsT, StateT, OutputT>) -> Unit): RenderTestResult<PropsT, StateT, OutputT, RenderingT>
More info
Asserts that the render pass handled either a workflow/worker output or a rendering event, and passes the resulting WorkflowAction to block for asserting.


verifyActionResult [jvm]
Content
abstract fun verifyActionResult(block: (StateT, output: WorkflowOutput<OutputT>?) -> Unit): RenderTestResult<PropsT, StateT, OutputT, RenderingT>
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.