Add CTS coverage for TetheringInterface with SoftApConfiguration
Cover TetheringInterface constructor with SoftApConfiguration and
TetheringInterface#getSoftApConfiguration.
Bug: 394510260
Test: atest TetheringManagerTest
Change-Id: I61d111bdea72b911b85e129ded93cfc02ce6ef2f
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java
index ac60b0f..a1cf968 100644
--- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java
+++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java
@@ -16,6 +16,8 @@
package com.android.cts.net.hostside;
+import static android.net.TetheringManager.TETHERING_WIFI;
+
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static org.junit.Assert.assertEquals;
@@ -71,6 +73,9 @@
mCtsTetheringUtils.startWifiTethering(mTetheringEventCallback, softApConfig);
assertNotNull(tetheringInterface);
assertEquals(softApConfig, tetheringInterface.getSoftApConfiguration());
+ assertEquals(new TetheringInterface(
+ TETHERING_WIFI, tetheringInterface.getInterface(), softApConfig),
+ tetheringInterface);
TetheringInterface tetheringInterfaceForApp2 =
mTetheringHelperClient.getTetheredWifiInterface();
assertNotNull(tetheringInterfaceForApp2);