diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-03-15 01:45:50 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-15 01:45:51 +0000 |
commit | 7c4e3b39a5fba0749cab3c244dcda45a1ff3c35b (patch) | |
tree | 48a373677a1b3613fa31c8257aefc3246795fc27 /tests | |
parent | a4d316f8e789bc1aa6645235f139e48636fe1f2d (diff) | |
parent | 67a4541372684c5d0a3f834f8be76bd8d29ca7ac (diff) |
Merge "hotspot2: ignore Passpoint networks in SavedNetworkEvaluator"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java index 7312b3334..616e2161a 100644 --- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java +++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkEvaluatorTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.any; import static org.mockito.Mockito.anyInt; +import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; @@ -195,6 +196,11 @@ public class PasspointNetworkEvaluatorTest { verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt()); assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID); assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN); + verify(mWifiConfigManager).enableNetwork(eq(TEST_NETWORK_ID), eq(false), anyInt()); + verify(mWifiConfigManager).setNetworkCandidateScanResult( + eq(TEST_NETWORK_ID), any(ScanResult.class), anyInt()); + verify(mWifiConfigManager).updateScanDetailForNetwork( + eq(TEST_NETWORK_ID), any(ScanDetail.class)); } /** @@ -233,6 +239,11 @@ public class PasspointNetworkEvaluatorTest { verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt()); assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID); assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN); + verify(mWifiConfigManager).enableNetwork(eq(TEST_NETWORK_ID), eq(false), anyInt()); + verify(mWifiConfigManager).setNetworkCandidateScanResult( + eq(TEST_NETWORK_ID), any(ScanResult.class), anyInt()); + verify(mWifiConfigManager).updateScanDetailForNetwork( + eq(TEST_NETWORK_ID), any(ScanDetail.class)); } /** @@ -275,6 +286,11 @@ public class PasspointNetworkEvaluatorTest { verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt()); assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID); assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN); + verify(mWifiConfigManager).enableNetwork(eq(TEST_NETWORK_ID), eq(false), anyInt()); + verify(mWifiConfigManager).setNetworkCandidateScanResult( + eq(TEST_NETWORK_ID), any(ScanResult.class), anyInt()); + verify(mWifiConfigManager).updateScanDetailForNetwork( + eq(TEST_NETWORK_ID), any(ScanDetail.class)); } /** |