From: DoHyun Pyun Date: Tue, 26 Jan 2021 04:28:15 +0000 (+0900) Subject: [Bluetooth][Manual][Non-ACR] Modify String comparision function X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=709fbb03e6649e95e6ece092d13cec3bc13ca81a;p=test%2Ftct%2Fcsharp%2Fapi.git [Bluetooth][Manual][Non-ACR] Modify String comparision function UUID strings are case-sensitive. Because of this if we use Equals function, the comparision statement returns false for the same UUID. So this patchset modifies the comparision function to Compare. Change-Id: Ic3a77843436ca389c954aa11b12f3e9e97a7e525 Signed-off-by: DoHyun Pyun --- diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/BluetoothSetup.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/BluetoothSetup.cs index f27fc09..8c52ece 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/BluetoothSetup.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/BluetoothSetup.cs @@ -336,7 +336,9 @@ namespace BluetoothNetworkUtils { foreach (string s in item.ServiceUuidList) { - if (s.Equals(HspHsUuid) || s.Equals(HfpHsUuid) || s.Equals(A2dpSnkUuid)) + if (string.Compare(s, HspHsUuid, true) == 0 || + string.Compare(s, HfpHsUuid, true) == 0 || + string.Compare(s, A2dpSnkUuid, true) == 0) { audioDevice = item; break; @@ -357,7 +359,8 @@ namespace BluetoothNetworkUtils { foreach (string s in audioDevice.ServiceUuidList) { - if (s.Equals(HspHsUuid) || s.Equals(HfpHsUuid)) + if (string.Compare(s, HspHsUuid, true) == 0 || + string.Compare(s, HfpHsUuid, true) == 0) { IsProfileSupported = true; break; @@ -368,7 +371,7 @@ namespace BluetoothNetworkUtils { foreach (string s in audioDevice.ServiceUuidList) { - if (s.Equals(A2dpSnkUuid)) + if (string.Compare(s, A2dpSnkUuid, true) == 0) { IsProfileSupported = true; break; @@ -379,7 +382,7 @@ namespace BluetoothNetworkUtils { foreach (string s in audioDevice.ServiceUuidList) { - if (s.Equals(A2dpSrcUuid)) + if (string.Compare(s, A2dpSrcUuid, true) == 0) { IsProfileSupported = true; break; @@ -390,7 +393,8 @@ namespace BluetoothNetworkUtils { foreach (string s in audioDevice.ServiceUuidList) { - if (s.Equals(HspAgUuid) || s.Equals(HfpAgUuid)) + if (string.Compare(s, HspAgUuid, true) == 0 || + string.Compare(s, HfpAgUuid, true) == 0) { IsProfileSupported = true; break; @@ -421,7 +425,7 @@ namespace BluetoothNetworkUtils { foreach (string s in item.ServiceUuidList) { - if (s.Equals(A2dpSnkUuid)) + if (string.Compare(s, A2dpSnkUuid, true) == 0) { avrcpDevice = item; break; @@ -458,7 +462,7 @@ namespace BluetoothNetworkUtils { foreach (string s in item.ServiceUuidList) { - if (s.Equals(A2dpSrcUuid)) + if (string.Compare(s, A2dpSrcUuid, true) == 0) { avrcpTargetDevice = item; break; @@ -539,7 +543,9 @@ namespace BluetoothNetworkUtils { foreach (string s in item.ServiceUuidList) { - if (s.Equals(HspHsUuid) || s.Equals(HfpHsUuid) || s.Equals(A2dpSnkUuid)) + if (string.Compare(s, HspHsUuid, true) == 0 || + string.Compare(s, HfpHsUuid, true) == 0 || + string.Compare(s, A2dpSnkUuid, true) == 0) { audioDevice = item; break; diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs index 2ce34b9..d802a1c 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs @@ -498,19 +498,21 @@ namespace Tizen.Network.Bluetooth.Tests { foreach (string s in item.ServiceUuidList) { - if (audioDevice == null && (s.Equals(HspHsUuid) || s.Equals(HfpHsUuid))) + if (audioDevice == null && + (string.Compare(s, HspHsUuid, true) == 0 || + string.Compare(s, HfpHsUuid, true) == 0)) { audioDevice = item; LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Found audio Device"); break; } - if (avrcpDevice == null && s.Equals(A2dpSnkUuid)) + if (avrcpDevice == null && string.Compare(s, A2dpSnkUuid, true) == 0) { avrcpDevice = item; LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Found AVRCP Device"); break; } - if (hidDevice == null &&s.Equals(HidUuid)) + if (hidDevice == null && string.Compare(s, HidUuid, true) == 0) { hidDevice = item; LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Found HID Device");