Skip to content

Commit 8e12f4a

Browse files
committed
fixed lint errors
1 parent 269f7b5 commit 8e12f4a

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

libnavigation-core/src/androidTest/java/com/mapbox/navigation/core/trip/service/ArtificialDriverTest.kt

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,21 @@ class ArtificialDriverTest {
6464
}
6565
val notTrackingStates = states.filter { it.routeState != RouteState.TRACKING }
6666
assertTrue(
67-
"not all states are tracking, see history file $historyFile: $notTrackingStates",
67+
"not all states are tracking, " +
68+
"see history file $historyFile: $notTrackingStates",
6869
notTrackingStates.isEmpty()
6970
)
7071
}
7172
}
73+
}
7274

73-
private fun createArtificialLocationUpdates(testRoute: NavigationRoute): List<ReplayEventUpdateLocation> {
74-
val replayRouteMapper = ReplayRouteMapper()
75-
return replayRouteMapper
76-
.mapDirectionsRouteGeometry(testRoute.directionsRoute)
77-
.filterIsInstance<ReplayEventUpdateLocation>()
78-
}
75+
private fun createArtificialLocationUpdates(
76+
testRoute: NavigationRoute
77+
): List<ReplayEventUpdateLocation> {
78+
val replayRouteMapper = ReplayRouteMapper()
79+
return replayRouteMapper
80+
.mapDirectionsRouteGeometry(testRoute.directionsRoute)
81+
.filterIsInstance<ReplayEventUpdateLocation>()
7982
}
8083

8184
private suspend fun MapboxNativeNavigator.collectStatuses(
@@ -107,7 +110,9 @@ fun MapboxNativeNavigator.statusUpdates(): Flow<OnStatusUpdateParameters> {
107110
}
108111
}
109112

110-
private suspend fun withNavigators(block: suspend (MapboxNavigation, MapboxNativeNavigator) -> Unit) {
113+
private suspend fun withNavigators(
114+
block: suspend (MapboxNavigation, MapboxNativeNavigator) -> Unit
115+
) {
111116
val context = InstrumentationRegistry.getInstrumentation().targetContext
112117
val mapboxNavigation = MapboxNavigationProvider.create(
113118
NavigationOptions.Builder(context)
@@ -123,7 +128,14 @@ private fun getTestRoute(): NavigationRoute {
123128
return NavigationRoute.create(
124129
directionsResponseJson = context.resources.openRawResource(R.raw.test_long_route)
125130
.readBytes().decodeToString(),
126-
routeRequestUrl = "https://api.mapbox.com/directions/v5/mapbox/driving/11.566744%2C48.143769%3B8.675521%2C50.119087?alternatives=false&geometries=polyline6&language=en&overview=full&steps=true&access_token=YOUR_MAPBOX_ACCESS_TOKEN",
131+
routeRequestUrl = "https://api.mapbox.com/directions/v5/mapbox/driving/" +
132+
"11.566744%2C48.143769%3B8.675521%2C50.119087" +
133+
"?alternatives=false" +
134+
"&geometries=polyline6" +
135+
"&language=en" +
136+
"&overview=full" +
137+
"&steps=true" +
138+
"&access_token=YOUR_MAPBOX_ACCESS_TOKEN",
127139
routerOrigin = RouterOrigin.Custom()
128140
).first()
129141
}

libnavigation-core/src/test/java/com/mapbox/navigation/core/replay/history/ReplayEventLocationMapperTest.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ class ReplayEventLocationMapperTest {
4848

4949
assertEquals(3000, androidLocation.time)
5050
assertEquals(3000000000, androidLocation.elapsedRealtimeNanos)
51-
5251
}
53-
54-
5552
}
5653

5754
private fun createTestEventLocation(
@@ -65,4 +62,4 @@ private fun createTestEventLocation(
6562
accuracyHorizontal = 4.288000106811523,
6663
bearing = 243.31265258789063,
6764
speed = 0.5585000514984131
68-
)
65+
)

0 commit comments

Comments
 (0)