Skip to content

Commit

Permalink
OptIn ExperimentalPreviewMapboxNavigationAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
kmadsen authored and dzinad committed Dec 13, 2023
1 parent a60da18 commit 494ef9a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.mapbox.api.directions.v5.DirectionsCriteria
import com.mapbox.api.directions.v5.models.DirectionsRoute
import com.mapbox.api.directions.v5.models.RouteOptions
import com.mapbox.geojson.Point
import com.mapbox.navigation.base.ExperimentalPreviewMapboxNavigationAPI
import com.mapbox.navigation.base.extensions.applyDefaultNavigationOptions
import com.mapbox.navigation.base.extensions.applyLanguageAndVoiceUnitOptions
import com.mapbox.navigation.base.options.HistoryRecorderOptions
Expand Down Expand Up @@ -77,6 +78,7 @@ import org.junit.Test
import java.net.URI
import java.util.concurrent.TimeUnit

@OptIn(ExperimentalPreviewMapboxNavigationAPI::class)
class CoreRerouteTest : BaseCoreNoCleanUpTest() {

@get:Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import java.net.URL
* This test ensures that alternative route recommendations
* are given during active guidance.
*/
@OptIn(ExperimentalPreviewMapboxNavigationAPI::class)
class RouteAlternativesTest : BaseCoreNoCleanUpTest() {

@get:Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.mapbox.navigation.instrumentation_tests.core
import android.location.Location
import com.mapbox.api.directions.v5.models.RouteOptions
import com.mapbox.geojson.Point
import com.mapbox.navigation.base.ExperimentalPreviewMapboxNavigationAPI
import com.mapbox.navigation.base.extensions.applyDefaultNavigationOptions
import com.mapbox.navigation.base.route.isRetryable
import com.mapbox.navigation.instrumentation_tests.R
Expand All @@ -25,6 +26,7 @@ import org.junit.Test
* See https://docs.mapbox.com/api/navigation/directions/#directions-api-errors for info
* about different Directions API failures
*/
@OptIn(ExperimentalPreviewMapboxNavigationAPI::class)
class RouteRequestTests : BaseCoreNoCleanUpTest() {

@get:Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import java.util.concurrent.CountDownLatch
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine

@OptIn(ExperimentalPreviewMapboxNavigationAPI::class)
class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
BasicNavigationViewActivity::class.java
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.mapbox.navigation.instrumentation_tests.utils.tiles
import android.util.Log
import com.mapbox.common.TileRegionLoadOptions
import com.mapbox.geojson.Geometry
import com.mapbox.navigation.base.ExperimentalPreviewMapboxNavigationAPI
import com.mapbox.navigation.base.route.RouteRefreshOptions
import com.mapbox.navigation.core.MapboxNavigation
import com.mapbox.navigation.instrumentation_tests.utils.createTileStore
Expand Down Expand Up @@ -48,6 +49,7 @@ suspend fun loadRegion(navigation: MapboxNavigation, region: OfflineRegion) {
}
}

@OptIn(ExperimentalPreviewMapboxNavigationAPI::class)
suspend inline fun BaseCoreNoCleanUpTest.withMapboxNavigationAndOfflineTilesForRegion(
region: OfflineRegion,
historyRecorderRule: MapboxHistoryTestRule? = null,
Expand Down

0 comments on commit 494ef9a

Please sign in to comment.