Bluetooth][Non-ACR][Correct PASS condition for discovery started] 60/232960/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 11 May 2020 02:20:03 +0000 (11:20 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 11 May 2020 02:20:03 +0000 (11:20 +0900)
Change-Id: I57e0df4877edf9e2b39ef599f81f9a455c536b30

tct-suite-vs/Tizen.Bluetooth.Tests/testcase/TSBluetoothAdapter.cs

index 38bf343..80967f5 100644 (file)
@@ -14,6 +14,7 @@ namespace Tizen.Network.Bluetooth.Tests
         static string _address = null;
         static bool _flagNameChanged = false;
         static bool _flagDiscovery = false;
+        static bool _flagDiscoveryStarted = false;
         static bool _flagDiscoveryFinished = false;
         static bool _isBluetoothSupported = false;
         static bool _isBluetoothLeSupported = false;
@@ -96,7 +97,9 @@ namespace Tizen.Network.Bluetooth.Tests
                 if (!String.IsNullOrEmpty(e.DeviceFound.Address))
                     _flagDiscovery = true;
             }
-            if (e.DiscoveryState == BluetoothDeviceDiscoveryState.Finished)
+            if (e.DiscoveryState == BluetoothDeviceDiscoveryState.Started)
+                _flagDiscoveryStarted = true;
+            else if (e.DiscoveryState == BluetoothDeviceDiscoveryState.Finished)
                 _flagDiscoveryFinished = true;
         }
 
@@ -342,7 +345,7 @@ namespace Tizen.Network.Bluetooth.Tests
 
                 /* TEST CODE */
                 await DiscoverySetup();
-                Assert.IsTrue(_flagDiscovery, "Start Device discovery changed callback is not invoked");
+                Assert.IsTrue(_flagDiscoveryStarted, "Start Device discovery changed callback is not invoked");
             }
             catch (Exception ex)
             {
@@ -663,7 +666,7 @@ namespace Tizen.Network.Bluetooth.Tests
 
                 /* TEST CODE */
                 await DiscoverySetup();
-                Assert.IsTrue(_flagDiscovery, "Start Device discovery changed callback is not invoked");
+                Assert.IsTrue(_flagDiscoveryStarted, "Start Device discovery changed callback is not invoked");
             }
             catch (Exception ex)
             {