From: DoHyun Pyun Date: Wed, 14 Nov 2018 08:38:18 +0000 (+0900) Subject: [Bluetooth][Non-ACR] Add the visiable API testcase X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F72%2F193072%2F2;p=test%2Ftct%2Fcsharp%2Fapi.git [Bluetooth][Non-ACR] Add the visiable API testcase Change-Id: I9e54994790920154154602a309988b63e2fa2fea Signed-off-by: DoHyun Pyun --- diff --git a/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs b/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs old mode 100755 new mode 100644 index c488814..38bf343 --- a/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs @@ -174,6 +174,62 @@ namespace Tizen.Network.Bluetooth.Tests [Test] [Category("P1")] + [Description("Get Visibility property of BtAdapter")] + [Property("SPEC", "Tizen.Network.Bluetooth.BluetoothAdapter.Visibility A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] + public static void Visibility_PROPERTY_READ_ONLY() + { + try + { + VisibilityMode mode = BluetoothAdapter.Visibility; + Assert.IsInstanceOf(mode); + Assert.IsTrue((mode == VisibilityMode.NonDiscoverable) || (mode == VisibilityMode.Discoverable) || (mode == VisibilityMode.TimeLimitedDiscoverable), "Visibility mode is not correct"); + } + catch (Exception ex) + { + if (ex is NotSupportedException) + { + Assert.IsTrue(_isBluetoothSupported == false, "Invalid NotSupportedException"); + } + else + { + Assert.Fail("Throwing exception " + ex.ToString()); + } + } + } + + [Test] + [Category("P1")] + [Description("Get RemainingTimeAsVisible property of BtAdapter")] + [Property("SPEC", "Tizen.Network.Bluetooth.BluetoothAdapter.RemainingTimeAsVisible A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] + public static void RemainingTimeAsVisible_READ_ONLY() + { + try + { + int time = BluetoothAdapter.RemainingTimeAsVisible; + Assert.IsInstanceOf(time); + Assert.IsTrue(time >= 0); + } + catch (Exception ex) + { + if (ex is NotSupportedException) + { + Assert.IsTrue(_isBluetoothSupported == false, "Invalid NotSupportedException"); + } + else + { + Assert.Fail("Throwing exception " + ex.ToString()); + } + } + } + + [Test] + [Category("P1")] [Description("Check the Name property of BtAdapter is readable and writable.")] [Property("SPEC", "Tizen.Network.Bluetooth.BluetoothAdapter.Name A")] [Property("SPEC_URL", "-")]