[Test]
[Category("P1")]
+ [Description("Forget AP. Check some information and state of this access point.")]
+ [Property("SPEC", "Tizen.Network.WiFi.WiFiAP.ForgetAPAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Cheoleun Moon, chleun.moon@samsung.com")]
+ public static async Task ForgetAPAsync_FORGET_AP()
+ {
+ WiFiAP _wifiAP = null;
+ try
+ {
+ // PRECONDITION
+ await SetUp();
+
+ // TEST CODE
+ _wifiAP = WiFiManager.GetConnectedAP();
+ Assert.IsNotNull(_wifiAP, "No WiFi connection");
+ await _wifiAP.ForgetAPAsync();
+ Task.Delay(2000);
+ Assert.AreEqual(WiFiConnectionState.Disconnected.ToString(), WiFiManager.ConnectionState.ToString(), "ConnectionState of removed AP should be is DISCONNECT");
+
+ Log.Info(Globals.LogTag, "Successfully done");
+
+ // POSTCONDITION
+ await SetUp();
+ }
+ catch (NotSupportedException)
+ {
+ Assert.IsTrue(isWiFiSupported == false, "Invalid NotSupportedException");
+ }
+ catch (TypeInitializationException e)
+ {
+ Assert.IsTrue(isWiFiSupported == false && e.InnerException.GetType() == typeof(NotSupportedException), "Invalid NotSupportedException or TypeInitializationException");
+ }
+ catch (Exception ex)
+ {
+ Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
+ }
+ finally
+ {
+ if (_wifiAP != null)
+ {
+ _wifiAP.Dispose();
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Forget AP. Check some information and state of this access point.")]
+ [Property("SPEC", "Tizen.Network.WiFi.WiFiAP.ForgetAPAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Cheoleun Moon, chleun.moon@samsung.com")]
+ public static async Task ForgetAPAsync_OBJECT_DISPOSED_EXCEPTION()
+ {
+ WiFiAP _wifiAP = null;
+ try
+ {
+ // PRECONDITION
+ await SetUp();
+
+ // TEST CODE
+ _wifiAP = WiFiManager.GetConnectedAP();
+ Assert.IsNotNull(_wifiAP, "No WiFi connection");
+ _wifiAP.Dispose();
+ await _wifiAP.ForgetAPAsync();
+ Task.Delay(2000);
+ Assert.IsTrue(false, "ObjectDisposedException should be thrown");
+ }
+ catch (NotSupportedException)
+ {
+ Assert.IsTrue(isWiFiSupported == false, "Invalid NotSupportedException");
+ }
+ catch (TypeInitializationException e)
+ {
+ Assert.IsTrue(isWiFiSupported == false && e.InnerException.GetType() == typeof(NotSupportedException), "Invalid NotSupportedException or TypeInitializationException");
+ }
+ catch (ObjectDisposedException ex)
+ {
+ Assert.IsTrue(true, "Exception occurs. Msg: " + ex.ToString());
+ }
+ catch (Exception ex)
+ {
+ Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
+ }
+ finally
+ {
+ if (_wifiAP != null)
+ {
+ _wifiAP.Dispose();
+ }
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Forget AP. Check some information and state of this access point.")]
+ [Property("SPEC", "Tizen.Network.WiFi.WiFiAP.ForgetAPAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Cheoleun Moon, chleun.moon@samsung.com")]
+ public static async Task ForgetAPAsync_INVALID_OPERATION_EXCEPTION()
+ {
+ WiFiAP _wifiAP = null;
+ try
+ {
+ // PRECONDITION
+ await SetUp();
+
+ // TEST CODE
+ _wifiAP = WiFiManager.GetConnectedAP();
+ Assert.IsNotNull(_wifiAP, "No WiFi connection");
+
+ await TearDown();
+ Task.Delay(2000);
+ await _wifiAP.ForgetAPAsync();
+ Task.Delay(2000);
+ Assert.IsTrue(false, "InvalidOperationException should be thrown");
+ }
+ catch (NotSupportedException)
+ {
+ Assert.IsTrue(isWiFiSupported == false, "Invalid NotSupportedException");
+ }
+ catch (TypeInitializationException e)
+ {
+ Assert.IsTrue(isWiFiSupported == false && e.InnerException.GetType() == typeof(NotSupportedException), "Invalid NotSupportedException or TypeInitializationException");
+ }
+ catch (InvalidOperationException ex)
+ {
+ Assert.IsTrue(true, "Exception occurs. Msg: " + ex.ToString());
+ }
+ catch (Exception ex)
+ {
+ Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
+ }
+ finally
+ {
+ if (_wifiAP != null)
+ {
+ _wifiAP.Dispose();
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Update a WiFiAP")]
[Property("SPEC", "Tizen.Network.WiFi.WiFiAP.Update M")]
[Property("SPEC_URL", "-")]