# TestNavigationEventHandlerKt

Added in 1.0.0

*** ** * ** ***


```
public final class TestNavigationEventHandlerKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandlerKt#TestNavigationEventHandler(kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1,kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1)( boolean isForwardEnabled, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onForwardStarted, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onForwardProgressed, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onForwardCancelled, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onForwardCompleted, boolean isBackEnabled, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onBackStarted, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onBackProgressed, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onBackCancelled, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/testing/TestNavigationEventHandler<@https://developer.android.com/reference/androidx/annotation/NonNull ?>, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> onBackCompleted )` Creates an instance of `https://developer.android.com/reference/androidx/navigationevent/testing/package-summary#TestNavigationEventHandler(kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1,kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1)` without requiring an explicit generic type. |

## Public methods

### TestNavigationEventHandler

Artifact: [androidx.navigationevent:navigationevent-testing](https://developer.android.com/jetpack/androidx/releases/navigationevent) [View Source](https://cs.android.com/search?q=file:androidx/navigationevent/testing/TestNavigationEventHandler.kt+function:TestNavigationEventHandler) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
public static final @NonNull TestNavigationEventHandler<@NonNull ?> TestNavigationEventHandler(
    boolean isForwardEnabled,
    @NonNull Function2<@NonNull TestNavigationEventHandler<@NonNull ?>, @NonNull NavigationEvent, Unit> onForwardStarted,
    @NonNull Function2<@NonNull TestNavigationEventHandler<@NonNull ?>, @NonNull NavigationEvent, Unit> onForwardProgressed,
    @NonNull Function1<@NonNull TestNavigationEventHandler<@NonNull ?>, Unit> onForwardCancelled,
    @NonNull Function1<@NonNull TestNavigationEventHandler<@NonNull ?>, Unit> onForwardCompleted,
    boolean isBackEnabled,
    @NonNull Function2<@NonNull TestNavigationEventHandler<@NonNull ?>, @NonNull NavigationEvent, Unit> onBackStarted,
    @NonNull Function2<@NonNull TestNavigationEventHandler<@NonNull ?>, @NonNull NavigationEvent, Unit> onBackProgressed,
    @NonNull Function1<@NonNull TestNavigationEventHandler<@NonNull ?>, Unit> onBackCancelled,
    @NonNull Function1<@NonNull TestNavigationEventHandler<@NonNull ?>, Unit> onBackCompleted
)
```

Creates an instance of `https://developer.android.com/reference/androidx/navigationevent/testing/package-summary#TestNavigationEventHandler(kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1,kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1)` without requiring an explicit generic type.

This function is a convenience wrapper around the `https://developer.android.com/reference/androidx/navigationevent/testing/package-summary#TestNavigationEventHandler(kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1,kotlin.Boolean,kotlin.Function2,kotlin.Function2,kotlin.Function1,kotlin.Function1)` constructor that defaults its info type to `*`. Use this in tests where the specific type of `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInfo` is not relevant.