TestNavigationEventDispatcherOwner



A test implementation of NavigationEventDispatcherOwner for verifying NavigationEventDispatcher interactions.

Use this class in tests to confirm that back-press fallbacks and callback status changes are invoked as expected. It tracks the number of times these events occur via public counters.

Summary

Public constructors

Cmn

Public properties

Int

The number of times NavigationEventDispatcher.fallbackOnBackPressed has been invoked.

Cmn
open NavigationEventDispatcher

The NavigationEventDispatcher that should handle the navigation events.

Cmn

Public constructors

TestNavigationEventDispatcherOwner

TestNavigationEventDispatcherOwner(fallbackOnBackPressed: TestNavigationEventDispatcherOwner.() -> Unit = {})
Parameters
fallbackOnBackPressed: TestNavigationEventDispatcherOwner.() -> Unit = {}

A lambda invoked by the NavigationEventDispatcher when a back press occurs and no other callbacks handle it.

Public properties

fallbackOnBackPressedInvocations

val fallbackOnBackPressedInvocationsInt

The number of times NavigationEventDispatcher.fallbackOnBackPressed has been invoked.

open val navigationEventDispatcherNavigationEventDispatcher

The NavigationEventDispatcher that should handle the navigation events.