test wifi SSID with space
This commit is contained in:
parent
b244d174fa
commit
06ece9747c
|
@ -55,13 +55,13 @@ class ReceiverDelegateTest : TestBase() {
|
||||||
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "<unknown ssid>", mobileConnected = false, wifiConnected = true)))
|
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "<unknown ssid>", mobileConnected = false, wifiConnected = true)))
|
||||||
Assertions.assertFalse(sut.calculateStatus(EventNetworkChange()))
|
Assertions.assertFalse(sut.calculateStatus(EventNetworkChange()))
|
||||||
|
|
||||||
`when`(sp.getString(R.string.key_ns_wifi_ssids, "")).thenReturn("test")
|
`when`(sp.getString(R.string.key_ns_wifi_ssids, "")).thenReturn("test 1")
|
||||||
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(mobileConnected = true, wifiConnected = false, roaming = true)))
|
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(mobileConnected = true, wifiConnected = false, roaming = true)))
|
||||||
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(mobileConnected = true, wifiConnected = false, roaming = false)))
|
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(mobileConnected = true, wifiConnected = false, roaming = false)))
|
||||||
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "<unknown ssid>", mobileConnected = true, wifiConnected = true)))
|
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "<unknown ssid>", mobileConnected = true, wifiConnected = true)))
|
||||||
Assertions.assertFalse(sut.calculateStatus(EventNetworkChange(ssid = "<unknown ssid>", mobileConnected = false, wifiConnected = true)))
|
Assertions.assertFalse(sut.calculateStatus(EventNetworkChange(ssid = "<unknown ssid>", mobileConnected = false, wifiConnected = true)))
|
||||||
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "test", mobileConnected = true, wifiConnected = true)))
|
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "test 1", mobileConnected = true, wifiConnected = true)))
|
||||||
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "test", mobileConnected = false, wifiConnected = true)))
|
Assertions.assertTrue(sut.calculateStatus(EventNetworkChange(ssid = "test 1", mobileConnected = false, wifiConnected = true)))
|
||||||
Assertions.assertFalse(sut.calculateStatus(EventNetworkChange()))
|
Assertions.assertFalse(sut.calculateStatus(EventNetworkChange()))
|
||||||
|
|
||||||
`when`(sp.getBoolean(R.string.key_ns_cellular, true)).thenReturn(false)
|
`when`(sp.getBoolean(R.string.key_ns_cellular, true)).thenReturn(false)
|
||||||
|
|
Loading…
Reference in a new issue