CustomRouterRule

interface CustomRouterRule : TestRule

The rule intercepts online route requests from Navigation Core Framework. Use createNavigationRouterRule to create an instance of the rule.

The local web server forwards requests from Navigation SDK to MapboxNavigationTestRouter and MapboxNavigationTestRouteRefresher provided by the SDK's user. When a user provided components returns a route or an error, the rule converts it to a response for Nav SDK.

Functions

Link copied to clipboard
abstract fun apply(p0: Statement, p1: Description): Statement
Link copied to clipboard
abstract fun setRouter(router: MapboxNavigationTestRouter)

Use this method to set handler of route requests sent by the Nav SDK.

Link copied to clipboard
abstract fun setRouteRefresher(refresher: MapboxNavigationTestRouteRefresher)

Use this method to set handler of route refresh requests sent by the Nav SDK.