From 4d5b3542c05a9caf08eacfdbf8fbdc370854a15d Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Wed, 14 Nov 2018 17:38:18 +0900 Subject: [PATCH] [Bluetooth][Non-ACR] Add the visiable API testcase Change-Id: I9e54994790920154154602a309988b63e2fa2fea Signed-off-by: DoHyun Pyun --- .../testcase/TSBluetoothAdapter.cs | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) mode change 100755 => 100644 tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs 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", "-")] -- 2.7.4