summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-03-31 22:47:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-03-31 22:47:37 +0000
commit40eaab440de6210a857dac19d89bee244db9ced6 (patch)
tree2542d16233f9ab6ce691e73e331f63c625ed79ce /tests
parente3cd4cb3f6d6429ebf34d0817f467dc6cbf3d7ea (diff)
parent2078ffdef94c81f7808b56b87e8087bead8a2e09 (diff)
Merge "Make WifiStateTrackerTest work with Mockito2.0" into oc-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiStateTrackerTest.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiStateTrackerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiStateTrackerTest.java
index 1f2af10ab..b6c8b8d5c 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiStateTrackerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiStateTrackerTest.java
@@ -18,8 +18,8 @@ package com.android.server.wifi;
import com.android.internal.app.IBatteryStats;
+import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -53,7 +53,6 @@ public class WifiStateTrackerTest {
* Ensure BatteryStats's noteWifiState() is called when the method
* updateState() is invoked on WifiStateTracker for relevant states.
*/
- @DisabledForUpdateToAnyMatcher
@Test
public void testBatteryStatsUpdated() throws Exception {
int[] relevantStates = new int[] { WifiStateTracker.SCAN_MODE,
@@ -62,7 +61,7 @@ public class WifiStateTrackerTest {
for (int i = 0; i < relevantStates.length; i++) {
mWifiStateTracker.updateState(relevantStates[i]);
}
- verify(mBatteryStats, times(relevantStates.length)).noteWifiState(anyInt(), anyString());
+ verify(mBatteryStats, times(relevantStates.length)).noteWifiState(anyInt(), any());
}
/**
@@ -76,6 +75,6 @@ public class WifiStateTrackerTest {
for (int i = 0; i < irrelevantStates.length; i++) {
mWifiStateTracker.updateState(irrelevantStates[i]);
}
- verify(mBatteryStats, times(0)).noteWifiState(anyInt(), anyString());
+ verify(mBatteryStats, times(0)).noteWifiState(anyInt(), any());
}
}