summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNingyuan Wang <nywang@google.com>2017-03-23 16:16:00 -0700
committerNingyuan Wang <nywang@google.com>2017-03-23 16:18:43 -0700
commitfee1cae825bad9459edcefb67fa600874d875816 (patch)
treea4e05f629e4787dd265754866e92bffc384703f9
parenta7de2b43f64463282a07dfa9377e8292e4491d86 (diff)
Fix WifiScanningServiceTest
This fixes WifiScanningServiceTest by replacing any(Foo.class) with any(). any() is able to match null. Bug: 36407367 Test: compile, unit tests Change-Id: I04adfea054086f38a9d8a03f800f9436d6ad1d78
-rw-r--r--tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
index 02cb633d0..e38a3897a 100644
--- a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
@@ -33,7 +33,6 @@ import android.net.wifi.WifiScanner;
import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
-import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
import android.os.UserHandle;
@@ -115,7 +114,7 @@ public class WifiScanningServiceTest {
mLooper = new TestLooper();
when(mWifiScannerImplFactory
- .create(any(Context.class), any(Looper.class), any(Clock.class)))
+ .create(any(), any(), any()))
.thenReturn(mWifiScannerImpl);
when(mWifiScannerImpl.getChannelHelper()).thenReturn(channelHelper);
when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics);
@@ -436,7 +435,7 @@ public class WifiScanningServiceTest {
startServiceAndLoadDriver();
mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
verify(mWifiScannerImplFactory, times(1))
- .create(any(Context.class), any(Looper.class), any(Clock.class));
+ .create(any(), any(), any());
Handler handler = mock(Handler.class);
BidirectionalAsyncChannel controlChannel = connectChannel(handler);