Testing

object Testing

Methods for testing purpose

Functions

Link copied to clipboard
suspend fun StateMachine.startFrom(stateName: String, argument: Any? = null)
suspend fun <D : Any> StateMachine.startFrom(state: DataState<D>, data: D, argument: Any? = null)

suspend fun StateMachine.startFrom(states: Set<IState>, argument: Any? = null)

Allows to target multiple states (they must be parallel state sub-children). Implemented by targetParallelStates

suspend fun StateMachine.startFrom(state: IState, argument: Any? = null)

Starts machine from particular state

suspend fun StateMachine.startFrom(state1: IState, state2: IState, vararg states: IState, argument: Any? = null)

Vararg overload for targeting multiple states

Link copied to clipboard
fun StateMachine.startFromBlocking(stateName: String, argument: Any? = null)
fun StateMachine.startFromBlocking(states: Set<IState>, argument: Any? = null)
fun StateMachine.startFromBlocking(state: IState, argument: Any? = null)
fun <D : Any> StateMachine.startFromBlocking(state: DataState<D>, data: D, argument: Any? = null)
fun StateMachine.startFromBlocking(state1: IState, state2: IState, vararg states: IState, argument: Any? = null)