}
}
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test DhcpLeaseDuration property of IAddressInformation")]
+ [Property("SPEC", "Tizen.Network.Connection.IAddressInformation.DhcpLeaseDuration A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Seonah Moon, seonah1.moon@samsung.com")]
+ public static async Task DhcpLeaseDuration_PROPERTY()
+ {
+ Log.Info(Globals.LogTag, "DhcpLeaseDuration_PROPERTY start");
+ ConnectionProfile _connectionProfile = null;
+ try
+ {
+ /** PRECONDITION
+ * turn on a Public WiFi
+ **/
+ await setUp();
+
+ /* TEST CODE */
+ _connectionProfile = ConnectionProfileManager.GetCurrentProfile();
+ Assert.IsNotNull(_connectionProfile);
+ var iAddressInformation = _connectionProfile.IPv4Settings;
+ Assert.IsNotNull(iAddressInformation, "IAddressInformation is NULL");
+
+ var duration = iAddressInformation.DhcpLeaseDuration;
+ Assert.IsTrue(duration >= 0, "Invalid dhcp lease duration");
+ }
+ 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 (_connectionProfile != null)
+ {
+ _connectionProfile.Dispose();
+ }
+ }
+
+ }
}
}