Skip to content

Commit c5a26f0

Browse files
authored
improve tests (#6505)
1 parent c4b39fa commit c5a26f0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libnavui-dropin/src/test/java/com/mapbox/navigation/dropin/navigationview/MapboxNavigationViewApiTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ class MapboxNavigationViewApiTest {
358358
val player: MapboxVoiceInstructionsPlayer = mockk()
359359
every { audioGuidance.getCurrentVoiceInstructionsPlayer() } returns player
360360
assertEquals(player, sut.getCurrentVoiceInstructionsPlayer())
361+
362+
every { audioGuidance.getCurrentVoiceInstructionsPlayer() } returns null
363+
assertNull(sut.getCurrentVoiceInstructionsPlayer())
361364
}
362365

363366
private fun navigationRoute(vararg waypoints: Point): NavigationRoute {

libnavui-voice/src/test/java/com/mapbox/navigation/ui/voice/api/MapboxAudioGuidanceTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,8 @@ class MapboxAudioGuidanceTest {
223223
val player: MapboxVoiceInstructionsPlayer = mockk()
224224
every { mapboxAudioGuidanceServices.voiceInstructionsPlayer } returns player
225225
assertEquals(player, carAppAudioGuidance.getCurrentVoiceInstructionsPlayer())
226+
227+
every { mapboxAudioGuidanceServices.voiceInstructionsPlayer } returns null
228+
assertNull(carAppAudioGuidance.getCurrentVoiceInstructionsPlayer())
226229
}
227230
}

0 commit comments

Comments
 (0)