diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java | 2 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index 0badc6fbd..c4cbc6e50 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -234,7 +234,7 @@ public class WifiConfigManagerTest { .spyStatic(WifiConfigurationUtil.class) .strictness(Strictness.LENIENT) .startMocking(); - when(WifiConfigStore.createUserFiles(anyInt())).thenReturn(mock(List.class)); + when(WifiConfigStore.createUserFiles(anyInt(), anyBoolean())).thenReturn(mock(List.class)); when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mDataTelephonyManager); when(WifiConfigurationUtil.calculatePersistentMacForConfiguration(any(), any())) .thenReturn(TEST_RANDOMIZED_MAC); diff --git a/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java index 66534d247..8f96bc106 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java @@ -37,8 +37,6 @@ import com.android.server.wifi.util.XmlUtil.WifiEnterpriseConfigXmlUtil; import org.junit.Before; import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -77,7 +75,7 @@ public class XmlUtilTest { private static final int TEST_PHASE2_METHOD = WifiEnterpriseConfig.Phase2.MSCHAPV2; private final String mXmlDocHeader = "XmlUtilTest"; - @Mock private WifiConfigStoreEncryptionUtil mWifiConfigStoreEncryptionUtil; + private WifiConfigStoreEncryptionUtil mWifiConfigStoreEncryptionUtil = null; @Before public void setUp() throws Exception { @@ -117,6 +115,7 @@ public class XmlUtilTest { @Test public void testPskWifiConfigurationSerializeDeserializeWithEncryption() throws IOException, XmlPullParserException { + mWifiConfigStoreEncryptionUtil = mock(WifiConfigStoreEncryptionUtil.class); WifiConfiguration pskNetwork = WifiConfigurationTestUtil.createPskNetwork(); EncryptedData encryptedData = new EncryptedData(new byte[0], new byte[0]); when(mWifiConfigStoreEncryptionUtil.encrypt(pskNetwork.preSharedKey.getBytes())) @@ -429,6 +428,7 @@ public class XmlUtilTest { config.setEapMethod(TEST_EAP_METHOD); config.setPhase2Method(TEST_PHASE2_METHOD); + mWifiConfigStoreEncryptionUtil = mock(WifiConfigStoreEncryptionUtil.class); EncryptedData encryptedData = new EncryptedData(new byte[0], new byte[0]); when(mWifiConfigStoreEncryptionUtil.encrypt(TEST_PASSWORD.getBytes())) .thenReturn(encryptedData); |