[Bluetooth][Non-ACR] Add the visiable API testcase 72/193072/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 14 Nov 2018 08:38:18 +0000 (17:38 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 15 Nov 2018 04:14:41 +0000 (13:14 +0900)
Change-Id: I9e54994790920154154602a309988b63e2fa2fea
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index c488814..38bf343
@@ -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<VisibilityMode>(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<int>(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", "-")]