summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigStoreDataTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreDataTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreDataTest.java
index a718c33bb..f16c0748a 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreDataTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreDataTest.java
@@ -20,6 +20,7 @@ import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiEnterpriseConfig;
import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
import android.test.suitebuilder.annotation.SmallTest;
@@ -29,6 +30,7 @@ import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
@@ -191,6 +193,20 @@ public class WifiConfigStoreDataTest {
}
/**
+ * Verify that a network with invalid entepriseConfig data is serialized/deserialized
+ * correctly.
+ */
+ @Test
+ public void testInvalidEnterpriseConfig()
+ throws XmlPullParserException, IOException {
+ WifiConfiguration eapNetwork = WifiConfigurationTestUtil.createEapNetwork();
+ eapNetwork.enterpriseConfig = new WifiEnterpriseConfig();
+ List<WifiConfiguration> configurations = Arrays.asList(eapNetwork);
+ serializeDeserializeConfigStoreData(
+ new ArrayList<WifiConfiguration>(), configurations, false, false);
+ }
+
+ /**
* Verify that the manually populated xml string for is deserialized/serialized correctly.
* This generates a store data corresponding to the XML string and verifies that the string
* is indeed parsed correctly to the store data.