test

fun <STATE : Any, SIDE_EFFECT : Any, CONTAINER_HOST : ContainerHost<STATE, SIDE_EFFECT>> CONTAINER_HOST.test(initialState: STATE? = null, isolateFlow: Boolean = true, buildSettings: TestSettingsBuilder.() -> Unit = {}): SuspendingTestContainerHost<STATE, SIDE_EFFECT, CONTAINER_HOST>(source)

Deprecated

Use org.orbitmvi.orbit.test.test instead. This will be removed in the future.

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

Allows you to test your intents in isolation. Only the intent called will actually run. Method calls on the ContainerHost beyond the first will be registered but not actually execute. This allows you to test your intents in isolation, disabling loopbacks that might make your tests too complex.

Return

A suspending test wrapper around ContainerHost.

Parameters

initialState

The state to initialize the test container with. Omit this parameter to use the real initial state of the container.

isolateFlow

Whether the intent should be isolated

buildSettings

Builds the RealSettings for this test


Deprecated

Use org.orbitmvi.orbit.test.test instead. This will be removed in the future.

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

Allows you to test your intents in isolation. Only the intent called will actually run. Method calls on the ContainerHost beyond the first will be registered but not actually execute. This allows you to test your intents in isolation, disabling loopbacks that might make your tests too complex.

Return

A suspending test wrapper around ContainerHost.

Parameters

initialState

The state to initialize the test container with. Omit this parameter to use the real initial state of the container.

buildSettings

Builds the RealSettings for this test