androidx.navigationevent.testing


Classes

TestNavigationEventCallback

A test implementation of NavigationEventCallback that records received events and invocation counts.

Cmn
TestNavigationEventDispatcherOwner

A test implementation of NavigationEventDispatcherOwner for verifying NavigationEventDispatcher interactions.

Cmn

Top-level functions summary

TestNavigationEventCallback<*>
TestNavigationEventCallback(
    isEnabled: Boolean,
    onEventStarted: TestNavigationEventCallback<*>.(event: NavigationEvent) -> Unit,
    onEventProgressed: TestNavigationEventCallback<*>.(event: NavigationEvent) -> Unit,
    onEventCancelled: TestNavigationEventCallback<*>.() -> Unit,
    onEventCompleted: TestNavigationEventCallback<*>.() -> Unit
)

Creates an instance of TestNavigationEventCallback without requiring an explicit generic type.

Cmn

Top-level functions

TestNavigationEventCallback

fun TestNavigationEventCallback(
    isEnabled: Boolean = true,
    onEventStarted: TestNavigationEventCallback<*>.(event: NavigationEvent) -> Unit = {},
    onEventProgressed: TestNavigationEventCallback<*>.(event: NavigationEvent) -> Unit = {},
    onEventCancelled: TestNavigationEventCallback<*>.() -> Unit = {},
    onEventCompleted: TestNavigationEventCallback<*>.() -> Unit = {}
): TestNavigationEventCallback<*>

Creates an instance of TestNavigationEventCallback without requiring an explicit generic type.

This function is a convenience wrapper around the TestNavigationEventCallback constructor that defaults its info type to *. Use this in tests where the specific type of NavigationEventInfo is not relevant.