diff options
author | Michael Plass <mplass@google.com> | 2018-02-20 14:16:09 -0800 |
---|---|---|
committer | Michael Plass <mplass@google.com> | 2018-02-26 09:47:36 -0800 |
commit | ed3ac0246473f24cfd48248d930a05196bca1049 (patch) | |
tree | e7861fb62218902461ea3ec7079f358be50e6825 /tests | |
parent | 836a66aaa196390e5d142fa40adbea295182ac61 (diff) |
[WifiScoreReport] Retire LegacyConnectedScore
Bug: 73127862
Test: Unit tests
Change-Id: Ie44030f0f9cd01a25b9277c67c3cd9c94e15adb0
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java index 029d87a13..cabece18a 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java @@ -42,7 +42,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import java.io.PrintWriter; -import java.util.Arrays; /** * Unit tests for {@link com.android.server.wifi.WifiScoreReport}. @@ -70,7 +69,6 @@ public class WifiScoreReportTest { @Mock Context mContext; @Mock NetworkAgent mNetworkAgent; @Mock Resources mResources; - @Mock WifiConfigManager mWifiConfigManager; @Mock WifiMetrics mWifiMetrics; @Mock PrintWriter mPrintWriter; @@ -119,24 +117,13 @@ public class WifiScoreReportTest { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); setUpResources(mResources); - WifiConfiguration config = new WifiConfiguration(); - config.SSID = "nooooooooooo"; - config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); - config.hiddenSSID = false; mWifiInfo = new WifiInfo(); mWifiInfo.setFrequency(2412); - when(mWifiConfigManager.getSavedNetworks()).thenReturn(Arrays.asList(config)); - when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(config); - mWifiConfiguration = config; int maxSize = 10; int trimSize = 5; - mScanDetailCache = new ScanDetailCache(config, maxSize, trimSize); - // TODO: populate the cache, but probably in the test cases, not here. - when(mWifiConfigManager.getScanDetailCacheForNetwork(anyInt())) - .thenReturn(mScanDetailCache); when(mContext.getResources()).thenReturn(mResources); mClock = new FakeClock(); - mWifiScoreReport = new WifiScoreReport(mContext, mWifiConfigManager, mClock); + mWifiScoreReport = new WifiScoreReport(mContext, mClock); } /** @@ -146,7 +133,6 @@ public class WifiScoreReportTest { public void tearDown() throws Exception { mResources = null; mWifiScoreReport = null; - mWifiConfigManager = null; mWifiMetrics = null; } |