mvrx-mocking / com.airbnb.mvrx.mocking / SynchronousMavericksStateStore

SynchronousMavericksStateStore

class SynchronousMavericksStateStore<S : Any> : MavericksStateStore<S>

This acts as a functional state store, but all updates happen synchronously. The intention of this is to allow state changes in tests to be tracked synchronously.

Constructors

<init>

SynchronousMavericksStateStore(initialState: S, coroutineScope: CoroutineScope)

This acts as a functional state store, but all updates happen synchronously. The intention of this is to allow state changes in tests to be tracked synchronously.

Properties

flow

val flow: Flow<S>

state

var state: S

Functions

get

fun get(block: (S) -> Unit): Unit

set

fun set(stateReducer: S.() -> S): Unit