Skip to content

Commit 73f0ea7

Browse files
committed
remove unnecessary comments from test
1 parent 44daeb0 commit 73f0ea7

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

instrumentation-tests/src/androidTest/java/com/mapbox/navigation/instrumentation_tests/core/HistoryRecordingStateChangeObserverTest.kt

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ class HistoryRecordingStateChangeObserverTest :
7676
.toNavigationRoutes()
7777

7878
checkHasNoNextElement(eventsChannel)
79-
// start free drive
8079
mapboxNavigation.startTripSession()
8180
assertEquals(
8281
HistoryRecordingStateChangeEvent(
@@ -85,7 +84,6 @@ class HistoryRecordingStateChangeObserverTest :
8584
),
8685
eventsChannel.receive()
8786
)
88-
// stop free drive + start active guidance
8987
mapboxNavigation.setNavigationRoutes(nonEmptyRoutes)
9088
assertEquals(
9189
listOf(
@@ -100,7 +98,7 @@ class HistoryRecordingStateChangeObserverTest :
10098
),
10199
eventsChannel.receive(2)
102100
)
103-
// do nothing
101+
// set other non-empty routes - no state transitions - do nothing
104102
mapboxNavigation.setNavigationRoutesAndWaitForUpdate(otherNonEmptyRoutes)
105103
checkHasNoNextElement(eventsChannel)
106104
// set invalid routes, but has other non-empty routes - do nothing
@@ -111,7 +109,6 @@ class HistoryRecordingStateChangeObserverTest :
111109
otherNonEmptyRoutes + nonEmptyRoutes
112110
)
113111
checkHasNoNextElement(eventsChannel)
114-
// stop active guidance + start free drive
115112
mapboxNavigation.setNavigationRoutes(emptyList())
116113
assertEquals(
117114
listOf(
@@ -126,7 +123,6 @@ class HistoryRecordingStateChangeObserverTest :
126123
),
127124
eventsChannel.receive(2)
128125
)
129-
// stop free drive
130126
mapboxNavigation.stopTripSession()
131127
assertEquals(
132128
HistoryRecordingStateChangeEvent(
@@ -135,10 +131,9 @@ class HistoryRecordingStateChangeObserverTest :
135131
),
136132
eventsChannel.receive()
137133
)
138-
// do nothing
134+
// trip session is stopped - still Idle - do nothing
139135
mapboxNavigation.setNavigationRoutesAndWaitForUpdate(nonEmptyRoutes)
140136
checkHasNoNextElement(eventsChannel)
141-
// start active guidance
142137
mapboxNavigation.startTripSession()
143138
assertEquals(
144139
HistoryRecordingStateChangeEvent(
@@ -147,7 +142,6 @@ class HistoryRecordingStateChangeObserverTest :
147142
),
148143
eventsChannel.receive()
149144
)
150-
// stop active guidance
151145
mapboxNavigation.stopTripSession()
152146
assertEquals(
153147
HistoryRecordingStateChangeEvent(
@@ -156,10 +150,9 @@ class HistoryRecordingStateChangeObserverTest :
156150
),
157151
eventsChannel.receive()
158152
)
159-
// do nothing
153+
// trip session stopped - still Idle - do nothing
160154
mapboxNavigation.clearNavigationRoutesAndWaitForUpdate()
161155
checkHasNoNextElement(eventsChannel)
162-
// start free drive
163156
mapboxNavigation.startTripSession()
164157
assertEquals(
165158
HistoryRecordingStateChangeEvent(
@@ -168,9 +161,7 @@ class HistoryRecordingStateChangeObserverTest :
168161
),
169162
eventsChannel.receive()
170163
)
171-
// stop free drive + start active guidance +
172-
// + cancel active guidance + start free drive
173-
// because of the invalid route
164+
// immediately cancel active guidance because of the invalid route
174165
mapboxNavigation.setNavigationRoutes(otherNonEmptyRoutes, initialLegIndex = 16)
175166
assertEquals(
176167
listOf(
@@ -193,7 +184,6 @@ class HistoryRecordingStateChangeObserverTest :
193184
),
194185
eventsChannel.receive(4)
195186
)
196-
// stop free drive
197187
mapboxNavigation.stopTripSession()
198188
assertEquals(
199189
HistoryRecordingStateChangeEvent(
@@ -247,7 +237,6 @@ class HistoryRecordingStateChangeObserverTest :
247237
),
248238
eventsChannel.receive(3)
249239
)
250-
// wait for refresh
251240
mapboxNavigation.routesUpdates()
252241
.filter { it.reason == RoutesExtra.ROUTES_UPDATE_REASON_REFRESH }
253242
.first()
@@ -296,7 +285,6 @@ class HistoryRecordingStateChangeObserverTest :
296285
),
297286
eventsChannel.receive(3)
298287
)
299-
// wait for reroute
300288
mockLocationReplayerRule.loopUpdate(offRouteLocationUpdate, times = 5)
301289
mapboxNavigation.routesUpdates()
302290
.filter { it.reason == RoutesExtra.ROUTES_UPDATE_REASON_REROUTE }

0 commit comments

Comments
 (0)