//workflow/com.squareup.workflow1.testing/RenderIdempotencyChecker
RenderIdempotencyChecker¶
[jvm] object RenderIdempotencyChecker : WorkflowInterceptor
Intercepts the render pass of the root workflow and runs it twice to ensure that well-written unit tests catch side effects being incorrectly performed directly in the render method.
The first render pass is the real one, the second one is a no-op and child workflow renderings will be played back, in order, to their renderChild calls.
Functions¶
Name | Summary |
---|---|
onInitialState | [jvm] Content open fun <P, S> onInitialState(props: P, snapshot: Snapshot?, proceed: (P, Snapshot?) -> S, session: WorkflowInterceptor.WorkflowSession): S |
onPropsChanged | [jvm] Content open fun <P, S> onPropsChanged(old: P, new: P, state: S, proceed: (P, P, S) -> S, session: WorkflowInterceptor.WorkflowSession): S |
onRender | [jvm] Content open override fun <P, S, O, R> onRender(renderProps: P, renderState: S, context: BaseRenderContext<P, S, O>, proceed: (P, S, WorkflowInterceptor.RenderContextInterceptor<P, S, O>?) -> R, session: WorkflowInterceptor.WorkflowSession): R |
onSessionStarted | [jvm] Content open fun onSessionStarted(workflowScope: CoroutineScope, session: WorkflowInterceptor.WorkflowSession) |
onSnapshotState | [jvm] Content open fun <S> onSnapshotState(state: S, proceed: (S) -> Snapshot?, session: WorkflowInterceptor.WorkflowSession): Snapshot? |