Package org.orbitmvi.orbit

Types

Link copied to clipboard
class OrbitVerification<STATE : Any, SIDE_EFFECT : Any>
Link copied to clipboard
class RegularTestContainerHost<STATE : Any, SIDE_EFFECT : Any, CONTAINER_HOST : ContainerHost<STATE, SIDE_EFFECT>>(actual: CONTAINER_HOST, initialState: STATE) : TestContainerHost<STATE, SIDE_EFFECT, CONTAINER_HOST>
Link copied to clipboard
class SuspendingTestContainerHost<STATE : Any, SIDE_EFFECT : Any, CONTAINER_HOST : ContainerHost<STATE, SIDE_EFFECT>>(actual: CONTAINER_HOST, initialState: STATE, isolateFlow: Boolean) : TestContainerHost<STATE, SIDE_EFFECT, CONTAINER_HOST>
Link copied to clipboard
sealed class TestContainerHost<STATE : Any, SIDE_EFFECT : Any, CONTAINER_HOST : ContainerHost<STATE, SIDE_EFFECT>>
Link copied to clipboard
class TestFlowObserver<T>(flow: Flow<T>)

Allows you to record all observed values of a flow for easy testing.

Functions

Link copied to clipboard
fun <STATE : Any, SIDE_EFFECT : Any, CONTAINER_HOST : ContainerHost<STATE, SIDE_EFFECT>> CONTAINER_HOST.liveTest(initialState: STATE, settings: Container.Settings = container.settings.copy(intentDispatcher = Dispatchers.Unconfined)): RegularTestContainerHost<STATE, SIDE_EFFECT, CONTAINER_HOST>

Puts your ContainerHost into live test mode. This mode uses a real Orbit container with some basic test settings.

Link copied to clipboard
fun <T> Flow<T>.test(): TestFlowObserver<T>

Allows you to put a Flow into test mode.

fun <STATE : Any, SIDE_EFFECT : Any, CONTAINER_HOST : ContainerHost<STATE, SIDE_EFFECT>> CONTAINER_HOST.test(initialState: STATE, isolateFlow: Boolean = true, settings: Container.Settings = container.settings): SuspendingTestContainerHost<STATE, SIDE_EFFECT, CONTAINER_HOST>

Puts your ContainerHost into suspending test mode. Intents are intercepted and executed as suspending functions.