Test Host Navigator
Functions
Link copied to clipboard
Link copied to clipboard
open override fun <O : Parcelable> deliverNavigationResult(key: NavigationResultRequest.Key<O>, result: O)
Link copied to clipboard
Causes an emission to the current TestHostNavigator.backPresses collector to make it possible to simulate a back press in tests that check custom back press logic.
Link copied to clipboard
open override fun handleDeepLink(intent: Intent, deepLinkHandlers: ImmutableSet<DeepLinkHandler>, deepLinkPrefixes: ImmutableSet<DeepLinkHandler.Prefix>): Boolean
The fake implementation will call navigateTo with handleDeepLinkRoute if the latter is not null
. Otherwise it will just return false.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun <T : BaseRoute, O : Parcelable> registerForNavigationResultInternal(id: DestinationId<T>, resultType: String): NavigationResultRequest<O>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun TestHostNavigator.test(timeout: Duration? = null, name: String? = null, validate: suspend NavigatorTurbine.() -> Unit)
Collects events from TestHostNavigator and allows the validate lambda to consume and assert properties on them in order. If any exception occurs during validation the exception is rethrown from this method.
Link copied to clipboard
fun TestHostNavigator.testIn(scope: CoroutineScope, timeout: Duration? = null, name: String? = null): NavigatorTurbine
Collects events from TestHostNavigator and returns a NavigatorTurbine for consuming and asserting properties on them in order. If any exception occurs during validation the exception is rethrown from this method.