Merge "WifiMigrationTest: Add test for WifiMigration.loadFromSettings" into rvc-dev am: 978768d7be

Change-Id: Ie6c50dea02d36f32a34c4f3a3fb7d9d02e99da7e
This commit is contained in:
Roshan Pius
2020-03-19 13:09:30 +00:00
committed by Automerger Merge Worker

View File

@@ -16,16 +16,9 @@
package android.net.wifi.cts;
import static org.junit.Assert.assertNotNull;
import android.net.wifi.SoftApConfiguration;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiMigration;
import android.test.AndroidTestCase;
import java.util.Arrays;
import java.util.List;
public class WifiMigrationTest extends AndroidTestCase {
private static final String TEST_SSID_UNQUOTED = "testSsid1";
@@ -49,7 +42,7 @@ public class WifiMigrationTest extends AndroidTestCase {
}
/**
* Tests {@link android.net.wifi.WifiMigration.ConfigStoreMigrationData} class.
* Tests {@link android.net.wifi.WifiMigration.SettingsMigrationData.Builder} class.
*/
public void testWifiMigrationSettingsDataBuilder() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
@@ -76,4 +69,15 @@ public class WifiMigrationTest extends AndroidTestCase {
assertTrue(migrationData.isVerboseLoggingEnabled());
assertEquals(TEST_SSID_UNQUOTED, migrationData.getP2pDeviceName());
}
/**
* Tests {@link android.net.wifi.WifiMigration.SettingsMigrationData} class.
*/
public void testWifiMigrationSettings() throws Exception {
try {
// ensure that this does not crash.
WifiMigration.loadFromSettings(getContext());
} catch (Exception ignore) {
}
}
}