summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-03-23 22:25:38 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-03-23 22:25:40 +0000
commita7de2b43f64463282a07dfa9377e8292e4491d86 (patch)
treeadf591025b16dbb8ff479f43cfe287973811b0c9
parent1316bfba023da3371bbc590ab2edee19c9475c03 (diff)
parent24367605737f34ba941aac315d3da210c5805921 (diff)
Merge "Fix WificondPnoScannerTest and WificondScannnerTest"
-rw-r--r--tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java14
-rw-r--r--tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java4
-rw-r--r--tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java12
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java
index bdc4242b4..8b92ca1c1 100644
--- a/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java
@@ -225,7 +225,7 @@ public abstract class BaseWifiScannerImplTest {
WifiNative.ScanEventHandler eventHandler2 = mock(WifiNative.ScanEventHandler.class);
// scan start succeeds
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
assertTrue(mScanner.startSingleScan(settings, eventHandler));
assertFalse("second scan while first scan running should fail immediately",
@@ -248,7 +248,7 @@ public abstract class BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// scan fails
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(false);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(false);
// start scan
assertTrue(mScanner.startSingleScan(settings, eventHandler));
@@ -278,7 +278,7 @@ public abstract class BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// scan succeeds
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// start scan
assertTrue(mScanner.startSingleScan(settings, eventHandler));
@@ -312,7 +312,7 @@ public abstract class BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// scan succeeds
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// start scan
assertTrue(mScanner.startSingleScan(settings, eventHandler));
@@ -366,7 +366,7 @@ public abstract class BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// scans succeed
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// start first scan
assertTrue(mScanner.startSingleScan(settings, eventHandler));
@@ -439,7 +439,7 @@ public abstract class BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// scan succeeds
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// start scan
assertTrue(mScanner.startSingleScan(settings, eventHandler));
@@ -491,7 +491,7 @@ public abstract class BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// scan succeeds
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// start scan
assertTrue(mScanner.startSingleScan(settings, eventHandler));
diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java
index 24bcae296..dde727f47 100644
--- a/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java
@@ -389,7 +389,7 @@ public class WificondPnoScannerTest {
WifiNative.PnoEventHandler pnoEventHandler) {
reset(mWifiNative);
// Scans succeed
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
when(mWifiNative.startPnoScan(any(WifiNative.PnoSettings.class))).thenReturn(true);
when(mWifiNative.stopPnoScan()).thenReturn(true);
@@ -471,7 +471,7 @@ public class WificondPnoScannerTest {
WifiNative.ScanEventHandler eventHandler, ScanResults scanResults) {
// Verify scan started
- order.verify(mWifiNative).scan(any(Set.class), any(Set.class));
+ order.verify(mWifiNative).scan(any(), any(Set.class));
// Make sure that HW PNO scan was not started
verify(mWifiNative, never()).startPnoScan(any(WifiNative.PnoSettings.class));
diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
index 68a147c00..3a5f6b973 100644
--- a/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
@@ -318,7 +318,7 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// All scans fail
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(false);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(false);
// Start scan
mScanner.startBatchedScan(settings, eventHandler);
@@ -353,7 +353,7 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// All scan starts succeed
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// Start scan
mScanner.startBatchedScan(settings, eventHandler);
@@ -400,7 +400,7 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// All scan starts succeed
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// Start scan
mScanner.startBatchedScan(settings, eventHandler);
@@ -454,7 +454,7 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// All scan starts succeed
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// Start scan
mScanner.startBatchedScan(settings, eventHandler);
@@ -527,7 +527,7 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// All scan starts succeed
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// Start scan
mScanner.startBatchedScan(settings, eventHandler);
@@ -565,7 +565,7 @@ public class WificondScannerTest extends BaseWifiScannerImplTest {
InOrder order = inOrder(eventHandler, mWifiNative);
// All scans succeed
- when(mWifiNative.scan(any(Set.class), any(Set.class))).thenReturn(true);
+ when(mWifiNative.scan(any(), any(Set.class))).thenReturn(true);
// Start scan
mScanner.startBatchedScan(settings, eventHandler);