-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use native router * fix RouteRefreshTest * fix alternatives parsing
- Loading branch information
Showing
36 changed files
with
1,400 additions
and
3,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...x/navigation/instrumentation_tests/utils/http/MockAvailableTilesVersionsRequestHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.mapbox.navigation.instrumentation_tests.utils.http | ||
|
||
import com.mapbox.navigation.testing.ui.http.MockRequestHandler | ||
import okhttp3.mockwebserver.MockResponse | ||
import okhttp3.mockwebserver.RecordedRequest | ||
|
||
/** | ||
* Mocks NN available tiles versions request. | ||
* | ||
* @param jsonResponse the full JSON response | ||
*/ | ||
class MockAvailableTilesVersionsRequestHandler( | ||
private val jsonResponse: String | ||
) : MockRequestHandler { | ||
override fun handle(request: RecordedRequest): MockResponse? { | ||
val prefix = """/route-tiles/v2/mapbox/driving-traffic/versions""" | ||
return if (request.path!!.startsWith(prefix)) { | ||
MockResponse().setBody(jsonResponse) | ||
} else { | ||
null | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
instrumentation-tests/src/main/res/raw/nn_response_available_versions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"availableVersions":["2021_10_15-03_00_00","2021_10_09-03_00_00","2021_10_03-03_00_00","2021_09_17-03_00_00","2021_09_12-03_00_00","2021_09_05-03_00_00","2021_09_04-03_00_00","2021_08_23-14_04_46","2021_08_23-03_00_00","2021_08_21-03_00_00","2021_08_16-03_00_00","2021_08_08-03_00_00","2021_07_31-03_00_00","2021_07_25-03_00_00","2021_07_17-03_00_00","2021_07_10-03_00_00","2021_07_04-03_00_00","2021_06_27-03_00_00","2021_06_20-03_00_00","2021_06_13-03_00_00","2021_06_06-03_00_00","2021_06_05-03_00_00","2021_05_30-03_00_00","2021_05_23-03_00_00","2021_05_16-03_00_00","2021_05_09-03_00_00","2021_05_01-03_00_00","2021_04_26-03_00_00","2021_04_25-03_00_00","2021_04_18-03_00_00"],"metadata":{"2021_10_15-03_00_00":{"map":{"tileset_version":"2021_10_15-03_00_00"}},"2021_10_09-03_00_00":{"map":{"tileset_version":"2021_10_09-03_00_00"}},"2021_10_03-03_00_00":{"map":{"tileset_version":"2021_10_03-03_00_00"}},"2021_09_17-03_00_00":{"map":{"tileset_version":"2021_09_17-03_00_00"}},"2021_09_12-03_00_00":{"map":{"tileset_version":"2021_09_12-03_00_00"}},"2021_09_05-03_00_00":{"map":{"tileset_version":"2021_09_05-03_00_00"}},"2021_09_04-03_00_00":{"map":{"tileset_version":"2021_09_04-03_00_00"}},"2021_08_23-14_04_46":{"map":{}},"2021_08_23-03_00_00":{"map":{}},"2021_08_21-03_00_00":{"map":{}},"2021_08_16-03_00_00":{"map":{}},"2021_08_08-03_00_00":{"map":{}},"2021_07_31-03_00_00":{"map":{}},"2021_07_25-03_00_00":{"map":{}},"2021_07_17-03_00_00":{"map":{}},"2021_07_10-03_00_00":{"map":{}},"2021_07_04-03_00_00":{"map":{}},"2021_06_27-03_00_00":{"map":{}},"2021_06_20-03_00_00":{"map":{}},"2021_06_13-03_00_00":{"map":{}},"2021_06_06-03_00_00":{"map":{}},"2021_06_05-03_00_00":{"map":{}},"2021_05_30-03_00_00":{"map":{}},"2021_05_23-03_00_00":{"map":{}},"2021_05_16-03_00_00":{"map":{}},"2021_05_09-03_00_00":{"map":{}},"2021_05_01-03_00_00":{"map":{}},"2021_04_26-03_00_00":{"map":{}},"2021_04_25-03_00_00":{"map":{}},"2021_04_18-03_00_00":{"map":{}}}} |
Oops, something went wrong.