diff options
author | Rebecca Silberstein <silberst@google.com> | 2016-09-09 15:59:55 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-09-09 15:59:55 +0000 |
commit | 90e57d9537773f86e76cde86b2bee875521a03aa (patch) | |
tree | 622d2edc1d40f2f10b469becb96d95a37670dac0 /tests | |
parent | 0ce3ad57f3ce7fcfab17930e8cd48e6da57006fb (diff) | |
parent | dc93140010ce36189b29fd58bc8f25d7636101f5 (diff) |
Merge "WifiInjector: Move WifiScanner to WifiInjector"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java index d8b12a00a..3ed98fac7 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java @@ -17,7 +17,6 @@ package com.android.server.wifi; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.*; @@ -61,7 +60,6 @@ import android.os.UserManager; import android.os.test.TestLooper; import android.provider.Settings; import android.security.KeyStore; -import android.telephony.TelephonyManager; import android.test.suitebuilder.annotation.SmallTest; import android.util.Log; @@ -71,7 +69,6 @@ import com.android.internal.util.AsyncChannel; import com.android.internal.util.IState; import com.android.internal.util.StateMachine; import com.android.server.wifi.hotspot2.NetworkDetail; -import com.android.server.wifi.hotspot2.Utils; import com.android.server.wifi.p2p.WifiP2pServiceImpl; import org.junit.After; @@ -88,12 +85,10 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; -import java.util.concurrent.CountDownLatch; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; +import java.util.concurrent.CountDownLatch; /** * Unit tests for {@link com.android.server.wifi.WifiStateMachine}. @@ -158,8 +153,6 @@ public class WifiStateMachineTest { private FrameworkFacade getFrameworkFacade() throws Exception { FrameworkFacade facade = mock(FrameworkFacade.class); - when(facade.makeWifiScanner(any(Context.class), any(Looper.class))) - .thenReturn(mWifiScanner); when(facade.getService(Context.NETWORKMANAGEMENT_SERVICE)).thenReturn( mockWithInterfaces(IBinder.class, INetworkManagementService.class)); @@ -346,6 +339,7 @@ public class WifiStateMachineTest { when(mWifiInjector.makeWificond()).thenReturn(mWificond); when(mWifiInjector.getWifiConfigManager()).thenReturn(mWifiConfigManager); when(mWifiInjector.getWifiSupplicantControl()).thenReturn(mWifiSupplicantControl); + when(mWifiInjector.getWifiScanner()).thenReturn(mWifiScanner); when(mWifiNative.getInterfaceName()).thenReturn("mockWlan"); when(mWifiSupplicantControl.getFrameworkNetworkId(anyInt())).thenReturn(0); |