Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
}
}
+
+ [Test]
+ [Category("P2")]
+ [Description("Check a connection to a WiFi AP by Wps")]
+ [Property("SPEC", "Tizen.Network.WiFi.WiFiAP.ConnectWpsWithoutSsidAsync M ")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Cheoleun Moon chleun.moon@samsung.com")]
+ [Precondition(1, "Activate WiFi")]
+ [Precondition(2, "Check if the device already connect to an AP. If so, forget it. There should not be any connected AP")]
+ [Step(1, "Tap the Run button")]
+ [Step(2, "Wait for TimeoutException (At most 3 minutes)")]
+ [Step(3, "Testcase will pass automatically if TimeoutException is successfully delivered")]
+ [Postcondition(1, "Forget the connected AP")]
+ [Postcondition(2, "Deactivate WiFi")]
+ public async Task ConnectWpsWithoutSsidAsync_TIMEOUT_EXCEPTION()
+ {
+ try
+ {
+ Log.Info(Globals.LogTag, "ConnectWpsWithoutSsidAsync_TIMEOUT_EXCEPTION");
+
+ WpsInfo info = new WpsPbcInfo();
+ await WiFiAP.ConnectWpsWithoutSsidAsync(info);
+
+ Assert.IsTrue(false, "TimeoutException 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 (TimeoutException ex)
+ {
+ Assert.IsTrue(true, "Exception occurs. Msg: " + ex.ToString());
+ }
+ catch (Exception ex)
+ {
+ Assert.IsTrue(false, "Exception occurs. Msg: " + ex.ToString());
+ }
+ }
}
}