Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract suspend fun awaitItem(): Item<STATE, SIDE_EFFECT>

Return the next item received. This function will suspend if no items have been received.

Link copied to clipboard
abstract suspend fun awaitSideEffect(): SIDE_EFFECT

Return the next side effect received. This function will suspend if no side effects have been received.

Link copied to clipboard
abstract suspend fun awaitState(): STATE

Return the next state received. This function will suspend if no states have been received.

Link copied to clipboard
abstract suspend fun cancelAndIgnoreRemainingItems()

Finish this test and ignore any events which have already been received. This also cancels any in-progress intents.

Link copied to clipboard
abstract suspend fun expectInitialState()

Sanity check assertion. Checks if the initial state is emitted and matches the initial state defined for the production container (or the one specified in the test).

Link copied to clipboard
abstract suspend fun expectNoItems()

Assert there are no unconsumed items

Link copied to clipboard
abstract suspend fun expectSideEffect(expected: SIDE_EFFECT)

Awaits for a side effect and checks if it matches the expected side effect

Link copied to clipboard
abstract suspend fun expectState(expected: STATE)

Awaits for a state and checks if it matches the expected state.

abstract suspend fun expectState(expectedChange: STATE.() -> STATE)

Awaits for a state and checks if it matches the expected state change from the previous state.

Link copied to clipboard
abstract fun runOnCreate(): Job

Invoke onCreate lambda for the ContainerHost.

Link copied to clipboard
abstract suspend fun skipItems(count: Int)

Assert that count items were received and ignore them. This function will suspend if no items have been received.