Skip to content

Commit ce136f9

Browse files
committed
stop using deprecated assertIsEmpty()
1 parent 09a8430 commit ce136f9

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

app/src/testDebug/kotlin/org/cru/godtools/ui/languages/app/AppLanguagePresenterTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ class AppLanguagePresenterTest {
5757
fun cleanup() {
5858
AndroidUiDispatcherUtil.runScheduledDispatches()
5959
unmockkObject(LocaleConfigCompat)
60+
61+
navigator.assertGoToIsEmpty()
62+
navigator.assertPopIsEmpty()
63+
navigator.assertResetRootIsEmpty()
6064
}
6165

6266
// region State.languages
@@ -68,7 +72,6 @@ class AppLanguagePresenterTest {
6872
assertEquals(listOf(Locale.ENGLISH), awaitItem().languages)
6973
}
7074
verifyAll { LocaleConfigCompat.getSupportedLocales(any()) }
71-
navigator.assertIsEmpty()
7275
}
7376

7477
@Test
@@ -83,7 +86,6 @@ class AppLanguagePresenterTest {
8386
appLocaleState.value = Locale("es")
8487
assertEquals(listOf(Locale("es"), Locale.FRENCH), expectMostRecentItem().languages)
8588
}
86-
navigator.assertIsEmpty()
8789
}
8890

8991
@Test
@@ -101,7 +103,6 @@ class AppLanguagePresenterTest {
101103
eventSink(AppLanguageScreen.Event.UpdateLanguageQuery(""))
102104
assertEquals(listOf(Locale.ENGLISH, Locale("es")), expectMostRecentItem().languages)
103105
}
104-
navigator.assertIsEmpty()
105106
}
106107
// endregion State.languages
107108

@@ -122,7 +123,6 @@ class AppLanguagePresenterTest {
122123
awaitItem().eventSink(AppLanguageScreen.Event.SelectLanguage(Locale.FRENCH))
123124

124125
assertEquals(Locale.FRENCH, awaitItem().selectedLanguage)
125-
navigator.assertIsEmpty()
126126
}
127127
}
128128

@@ -169,7 +169,7 @@ class AppLanguagePresenterTest {
169169
}
170170

171171
assertNotEquals(Locale.FRENCH, appLocaleState.value)
172-
navigator.assertIsEmpty()
172+
navigator.assertPopIsEmpty()
173173
}
174174
// endregion Event.DismissConfirmDialog
175175
}

app/src/testDebug/kotlin/org/cru/godtools/ui/tooldetails/ToolDetailsPresenterTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ class ToolDetailsPresenterTest {
164164
fun cleanup() {
165165
unmockkStatic("org.cru.godtools.downloadmanager.compose.DownloadLatestTranslationKt")
166166
AndroidUiDispatcherUtil.runScheduledDispatches()
167+
168+
navigator.assertGoToIsEmpty()
169+
navigator.assertPopIsEmpty()
170+
navigator.assertResetRootIsEmpty()
167171
}
168172

169173
// region State.tool
@@ -335,7 +339,6 @@ class ToolDetailsPresenterTest {
335339
assertTrue(expected equalsIntent intent)
336340
}
337341

338-
navigator.assertIsEmpty()
339342
verifyAll {
340343
eventBus.post(OpenAnalyticsActionEvent(ACTION_OPEN_TOOL, TOOL, SOURCE_TOOL_DETAILS))
341344
}
@@ -365,7 +368,6 @@ class ToolDetailsPresenterTest {
365368
assertTrue(expected equalsIntent intent)
366369
}
367370

368-
navigator.assertIsEmpty()
369371
verifyAll {
370372
eventBus.post(OpenAnalyticsActionEvent(ACTION_OPEN_TOOL, TOOL, SOURCE_TOOL_DETAILS))
371373
}
@@ -390,8 +392,6 @@ class ToolDetailsPresenterTest {
390392
assertEquals(Tool.Type.TRACT, type)
391393
assertEquals(Locale.ENGLISH, locale)
392394
}
393-
394-
navigator.assertIsEmpty()
395395
}
396396
// endregion Event.OpenToolTraining
397397

0 commit comments

Comments
 (0)