TestStore

Properties

Link copied to clipboard
abstract val isActive: Boolean
Link copied to clipboard
abstract val isStarted: Boolean
Link copied to clipboard
abstract val name: String?
Link copied to clipboard
abstract override val states: StateFlow<S>
Link copied to clipboard
abstract val subscriberCount: StateFlow<Int>

Functions

Link copied to clipboard
abstract suspend fun awaitStartup()
Link copied to clipboard
abstract suspend fun awaitUntilClosed()
Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract suspend fun closeAndWait()
Link copied to clipboard
abstract suspend fun emit(intent: I)
Link copied to clipboard
Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean
Link copied to clipboard
abstract override fun hashCode(): Int
Link copied to clipboard
abstract fun intent(intent: I)
Link copied to clipboard
abstract override fun start(scope: CoroutineScope): StoreLifecycle
Link copied to clipboard
abstract fun CoroutineScope.subscribe(block: suspend Provider<S, I, A>.() -> Unit): Job
Link copied to clipboard
inline suspend fun <S : MVIState, I : MVIIntent, A : MVIAction> Store<S, I, A>.subscribeAndTest(crossinline block: suspend StoreTestScope<S, I, A>.() -> Unit)

Call Store.start, then call Store.subscribe and execute block inside that scope. Unsubscribe and stop the store afterwards

Link copied to clipboard
inline suspend fun <S : MVIState, I : MVIIntent, A : MVIAction> Store<S, I, A>.test(crossinline block: suspend TestStore<S, I, A>.() -> Unit)

Call Store.start and then execute block, cancelling the store afterwards