WorkflowTurbine

class WorkflowTurbine<RenderingT>(val firstRendering: RenderingT, receiveTurbine: ReceiveTurbine<RenderingT>)(source)

Simple wrapper around a ReceiveTurbine of RenderingT to provide convenience helper methods specific to Workflow renderings.

Constructors

Link copied to clipboard
constructor(firstRendering: RenderingT, receiveTurbine: ReceiveTurbine<RenderingT>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The first rendering of the Workflow runtime is made synchronously. This is provided separately if any assertions or operations are needed from it.

Functions

Link copied to clipboard
suspend fun <T> awaitNext(precondition: (RenderingT) -> Boolean = { true }, map: (RenderingT) -> T, satisfying: T.() -> Boolean = { true }): T

Suspend waiting for the next rendering which satisfies precondition, can successfully be mapped using map and satisfies the satisfying predicate when called on the T rendering after it has been mapped.

Link copied to clipboard

Suspend waiting for the next rendering to be produced by the Workflow runtime. Note this includes the first (synchronously made) rendering.

Link copied to clipboard

Suspend waiting for the next rendering to be produced by the Workflow runtime that satisfies the predicate.

Link copied to clipboard
suspend fun skipRenderings(count: Int)