[Non-ACR][Bluetooth][Manual][Disconnect BT headset after running each TC] 77/199377/3
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 11 Feb 2019 04:57:44 +0000 (13:57 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 11 Feb 2019 08:48:07 +0000 (17:48 +0900)
Change-Id: I3b364939e2edbfc48b1e9b068a67c960d75e3faa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSAudioConnectionStateChangedEventArgs.cs
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothAudio.cs
tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothAvrcp.cs

index 2e84d2f..8ce092d 100644 (file)
@@ -221,8 +221,8 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioMediaSupported == false && isBluetoothAudioCallSupported == false
-                                    && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                     && e.InnerException.GetType() == typeof(NotSupportedException))
+                {
                     BluetoothHelper.DisplayLabel("Address_READ_ONLY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -231,6 +231,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
          }
 
         [Test]
@@ -286,8 +294,8 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioMediaSupported == false && isBluetoothAudioCallSupported == false
-                                    && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                     && e.InnerException.GetType() == typeof(NotSupportedException))
+                {
                     BluetoothHelper.DisplayLabel("IsConnected_READ_ONLY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -296,6 +304,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -351,8 +367,8 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioMediaSupported == false && isBluetoothAudioCallSupported == false
-                                    && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                     && e.InnerException.GetType() == typeof(NotSupportedException))
+                {
                     BluetoothHelper.DisplayLabel("ProfileType_READ_ONLY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -361,6 +377,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -416,8 +440,8 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioMediaSupported == false && isBluetoothAudioCallSupported == false
-                                    && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                     && e.InnerException.GetType() == typeof(NotSupportedException))
+                {
                     BluetoothHelper.DisplayLabel("Result_READ_ONLY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -426,6 +450,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
     }
 }
index e35d00d..551363a 100644 (file)
@@ -126,8 +126,8 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioMediaSupported == false && isBluetoothAudioCallSupported == false
-                                    && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                     && e.InnerException.GetType() == typeof(NotSupportedException))
+                {
                     BluetoothHelper.DisplayLabel("Connect_RETURN_CONNECT_PROFILE_ENUM_ALL");
                     await ManualTest.WaitForConfirm();
                 }
@@ -136,6 +136,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -190,8 +198,8 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioMediaSupported == false && isBluetoothAudioCallSupported == false
-                                    && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                     && e.InnerException.GetType() == typeof(NotSupportedException))
+                {
                     BluetoothHelper.DisplayLabel("Disconnect_RETURN_DISCONNECT_PROFILES_ENUM_ALL");
                     await ManualTest.WaitForConfirm();
                 }
@@ -259,8 +267,8 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioMediaSupported == false && isBluetoothAudioCallSupported == false
-                                    && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                     && e.InnerException.GetType() == typeof(NotSupportedException))
+                {
                     BluetoothHelper.DisplayLabel("AudioConnectionStateChanged_CHECK_EVENT_ENUM_ALL");
                     await ManualTest.WaitForConfirm();
                 }
@@ -269,6 +277,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
 //        [Test]
index 2a9d013..b3153d8 100644 (file)
@@ -107,7 +107,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("TargetConnectionStateChanged_CHECK_EVENT");
                     await ManualTest.WaitForConfirm();
                 }
@@ -116,6 +116,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -179,7 +187,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("ShuffleModeChanged_CHECK_EVENT");
                     await ManualTest.WaitForConfirm();
                 }
@@ -188,6 +196,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -264,6 +280,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -336,6 +360,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -412,6 +444,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -484,6 +524,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -560,6 +608,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -632,6 +688,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -699,7 +763,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("RepeatModeChanged_CHECK_EVENT");
                     await ManualTest.WaitForConfirm();
                 }
@@ -708,6 +772,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -765,7 +837,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("NotifyEqualizerState_RETURN_VALUE_NOTIFY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -774,6 +846,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -830,7 +910,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("NotifyRepeatMode_RETURN_VALUE_NOTIFY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -839,6 +919,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -895,7 +983,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("NotifyShuffleMode_RETURN_VALUE_NOTIFY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -904,6 +992,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -960,7 +1056,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("NotifyScanMode_RETURN_VALUE_NOTIFY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -969,6 +1065,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -1025,7 +1129,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("NotifyPlayerState_RETURN_VALUE_NOTIFY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -1034,6 +1138,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -1091,7 +1203,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("NotifyCurrentPosition_RETURN_VALUE_NOTIFY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -1100,6 +1212,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
 
         [Test]
@@ -1165,7 +1285,7 @@ namespace Tizen.Network.Bluetooth.Tests
             catch (TypeInitializationException e)
             {
                 if (isBluetoothAudioControlSupported == false && e.InnerException.GetType() == typeof(NotSupportedException))
-                               {
+                {
                     BluetoothHelper.DisplayLabel("NotifyTrack_RETURN_VALUE_NOTIFY");
                     await ManualTest.WaitForConfirm();
                 }
@@ -1174,6 +1294,14 @@ namespace Tizen.Network.Bluetooth.Tests
             {
                 Assert.True(false, "Exception occurs. Msg : " + ex.ToString());
             }
+            finally
+            {
+                if (audioProfile != null)
+                {
+                    audioProfile.Disconnect(BluetoothAudioProfileType.All);
+                    await Task.Delay(3000);
+                }
+            }
         }
     }
 }