Skip to content

Commit 39c704f

Browse files
committed
remove tests for shared preference change handling in MainActivityTest
1 parent 01cc6b5 commit 39c704f

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

app/src/test/kotlin/com/vrem/wifianalyzer/MainActivityTest.kt

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -272,38 +272,6 @@ class MainActivityTest {
272272
assertThat(AppCompatDelegate.getApplicationLocales().isEmpty).isTrue
273273
}
274274

275-
@Test
276-
fun onSharedPreferenceChangedWithThemeReloadRequiredShouldStopScannerAndRecreate() {
277-
// setup
278-
val scannerService = MainContextHelper.INSTANCE.scannerService
279-
val settings = MainContextHelper.INSTANCE.settings
280-
whenever(settings.themeStyle()).thenReturn(ThemeStyle.BLACK)
281-
whenever(settings.connectionViewType()).thenReturn(fixture.mainReload.connectionViewType)
282-
val sharedPreferences: SharedPreferences = mock()
283-
val spyFixture = spy(fixture)
284-
// execute
285-
spyFixture.onSharedPreferenceChanged(sharedPreferences, "some_key")
286-
// validate
287-
verify(scannerService).stop()
288-
verify(spyFixture).recreate()
289-
}
290-
291-
@Test
292-
fun onSharedPreferenceChangedWithConnectionViewTypeReloadRequiredShouldStopScannerAndRecreate() {
293-
// setup
294-
val scannerService = MainContextHelper.INSTANCE.scannerService
295-
val settings = MainContextHelper.INSTANCE.settings
296-
whenever(settings.themeStyle()).thenReturn(fixture.mainReload.themeStyle)
297-
whenever(settings.connectionViewType()).thenReturn(ConnectionViewType.HIDE)
298-
val sharedPreferences: SharedPreferences = mock()
299-
val spyFixture = spy(fixture)
300-
// execute
301-
spyFixture.onSharedPreferenceChanged(sharedPreferences, "some_key")
302-
// validate
303-
verify(scannerService).stop()
304-
verify(spyFixture).recreate()
305-
}
306-
307275
@Test
308276
fun optionMenu() {
309277
// execute

0 commit comments

Comments
 (0)