[Test]
[Category("P1")]
- [Description("Test AddRoute Method")]
+ [Description("Test AddRoute Method throws UnauthorizedAccessException")]
[Property("SPEC", "Tizen.Network.Connection.ConnectionManager.AddRoute M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Cheoleun Moon, chleun.moon@samsung.com")]
- public async Task AddRoute_WiFi()
+ public async Task AddRoute_WiFi_UNAUTHORIZED_ACCESS_EXCEPTION()
{
try
{
var hostAddress = IPAddress.Parse("1.1.1.1");
var gateway = IPAddress.Parse("192.168.0.1");
ConnectionManager.AddRoute(AddressFamily.IPv4, "wlan0", hostAddress, gateway);
- Assert.True(true, "AddRoute");
+ Assert.IsTrue(false, "AddRoute");
}
catch (NotSupportedException)
{
{
Assert.IsTrue(isWiFiSupported == false && e.InnerException.GetType() == typeof(NotSupportedException), "Invalid NotSupportedException or TypeInitializationException");
}
+ catch (UnauthorizedAccessException)
+ {
+ Assert.IsTrue(true, "AddRoute");
+ }
catch (Exception ex)
{
Assert.IsTrue(false, "Exception occurs. Msg : " + ex.ToString());
[Test]
[Category("P1")]
- [Description("Test RemoveRoute Method")]
+ [Description("Test RemoveRoute Method throws UnauthorizedAccessException")]
[Property("SPEC", "Tizen.Network.Connection.ConnectionManager.RemoveRoute M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Cheoleun Moon, chleun.moon@samsung.com")]
- public async Task RemoveRoute_WiFi()
+ public async Task RemoveRoute_WiFi_UNAUTHORIZED_ACCESS_EXCEPTION()
{
try
{
var gateway = IPAddress.Parse("192.168.0.1");
ConnectionManager.AddRoute(AddressFamily.IPv4, "wlan0", hostAddress, gateway);
ConnectionManager.RemoveRoute(AddressFamily.IPv4, "wlan0", hostAddress, gateway);
- Assert.True(true, "RemoveRoute");
+ Assert.IsTrue(false, "RemoveRoute");
}
catch (NotSupportedException)
{
{
Assert.IsTrue(isWiFiSupported == false && e.InnerException.GetType() == typeof(NotSupportedException), "Invalid NotSupportedException or TypeInitializationException");
}
+ catch (UnauthorizedAccessException)
+ {
+ Assert.IsTrue(true, "RemoveRoute");
+ }
catch (Exception ex)
{
Assert.IsTrue(false, "Exception occurs. Msg : " + ex.ToString());
await setUp();
var hostAddress = IPAddress.Parse("1.1.1.1");
var gateway = IPAddress.Parse("192.168.0.1");
- ConnectionManager.AddRoute(AddressFamily.IPv4, "wlan0", hostAddress, gateway);
ConnectionManager.RemoveRoute(AddressFamily.IPv4, "wlan0", null, null);
Assert.True(false, "Should throw ArgumentNullException");
}