From e7c56270859fb8c891251142a0ec75a9e02cf1ce Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Wed, 21 Sep 2022 10:51:47 +0900 Subject: [PATCH] [WebRTC][Non-ACR] Remove ErrorOccurred TCs Change-Id: I6e7ba202339332721be2a5a33de0106be087c89f --- .../testcase/TSWebRTC.Events.ErrorOccurred.cs | 64 --------- .../testcase/TSWebRTCErrorOccurredEventArgs.cs | 144 --------------------- 2 files changed, 208 deletions(-) delete mode 100755 tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTC.Events.ErrorOccurred.cs delete mode 100755 tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTCErrorOccurredEventArgs.cs diff --git a/tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTC.Events.ErrorOccurred.cs b/tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTC.Events.ErrorOccurred.cs deleted file mode 100755 index 99cd6ce..0000000 --- a/tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTC.Events.ErrorOccurred.cs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -using NUnit.Framework; -using System; -using System.Threading.Tasks; - -namespace Tizen.Multimedia.Remoting.Tests -{ - [TestFixture] - [Description("Tizen.Multimedia.Remoting.ErrorOccurred Tests")] - public class ErrorOccurredEventTests : TestBase - { - [Test] - [Category("P1")] - [Description("Check whether ErrorOccurred event is invoked or not.")] - [Property("SPEC", "Tizen.Multimedia.Remoting.WebRTC.ErrorOccurred E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task ErrorOccurred_CHECK_EVENT() - { - using (var webRtc = new WebRTC()) - using (var eventAwaiter = EventAwaiter.Create()) - { - var tcs = new TaskCompletionSource(); - - var cameraSource = new MediaCameraSource(); - - try - { - webRtc.AddSource(cameraSource); - } - catch (NotSupportedException e) - { - Log.Info(WebRTCTestLog.Tag, e.ToString()); - Assert.Pass("CameraSource is not supported"); - } - - cameraSource.VideoFrameRate = 10000; - - webRtc.ErrorOccurred += eventAwaiter; - - webRtc.Start(); - - Assert.That(await eventAwaiter.IsRaisedAsync(), Is.EqualTo(true), - "Should return InvalidOperation"); - } - } - } -} diff --git a/tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTCErrorOccurredEventArgs.cs b/tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTCErrorOccurredEventArgs.cs deleted file mode 100755 index 625372f..0000000 --- a/tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTCErrorOccurredEventArgs.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -using NUnit.Framework; -using System; -using System.Threading.Tasks; - -namespace Tizen.Multimedia.Remoting.Tests -{ - [TestFixture] - [Description("Tizen.Multimedia.Remoting.WebRTCErrorOccurredEventArgs Test class")] - public class WebRTCErrorOccurredEventArgsTests - { - [Test] - [Category("P1")] - [Description("Check whether WebRTCErrorOccurredEventArgs.Error returns valid value or not.")] - [Property("SPEC", "Tizen.Multimedia.Remoting.WebRTCErrorOccurredEventArgs.Error A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task Error_READ_ONLY() - { - using (var webRtc = new WebRTC()) - using (var eventAwaiter = EventAwaiter.Create()) - { - var tcs = new TaskCompletionSource(); - - var cameraSource = new MediaCameraSource(); - - try - { - webRtc.AddSource(cameraSource); - } - catch (NotSupportedException e) - { - Log.Info(WebRTCTestLog.Tag, e.ToString()); - Assert.Pass("CameraSource is not supported"); - } - - cameraSource.VideoFrameRate = 10000; - - webRtc.ErrorOccurred += eventAwaiter; - - webRtc.Start(); - - var args = await eventAwaiter.GetResultAsync(); - - Assert.IsNotNull(args.Error, "Error should not be null."); - Assert.IsInstanceOf(args.Error, "Should be same type"); - } - } - - [Test] - [Category("P1")] - [Description("Check whether WebRTCErrorOccurredEventArgs.State returns valid value or not.")] - [Property("SPEC", "Tizen.Multimedia.Remoting.WebRTCErrorOccurredEventArgs.State A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task State_READ_ONLY() - { - using (var webRtc = new WebRTC()) - using (var eventAwaiter = EventAwaiter.Create()) - { - var tcs = new TaskCompletionSource(); - - var cameraSource = new MediaCameraSource(); - - try - { - webRtc.AddSource(cameraSource); - } - catch (NotSupportedException e) - { - Log.Info(WebRTCTestLog.Tag, e.ToString()); - Assert.Pass("CameraSource is not supported"); - } - - cameraSource.VideoFrameRate = 10000; - - webRtc.ErrorOccurred += eventAwaiter; - - webRtc.Start(); - - var args = await eventAwaiter.GetResultAsync(); - - Assert.IsNotNull(args.State, "State should not be null."); - Assert.IsInstanceOf(args.State, "Should be same type"); - } - } - - [Test] - [Category("P1")] - [Description("Check whether ToString returns expected value or not.")] - [Property("SPEC", "Tizen.Multimedia.Remoting.WebRTCErrorOccurredEventArgs.ToString M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] - public async Task ToString_CHECK_VALUE() - { - using (var webRtc = new WebRTC()) - using (var eventAwaiter = EventAwaiter.Create()) - { - var tcs = new TaskCompletionSource(); - - var cameraSource = new MediaCameraSource(); - - try - { - webRtc.AddSource(cameraSource); - } - catch (NotSupportedException e) - { - Log.Info(WebRTCTestLog.Tag, e.ToString()); - Assert.Pass("CameraSource is not supported"); - } - - cameraSource.VideoFrameRate = 10000; - - webRtc.ErrorOccurred += eventAwaiter; - - webRtc.Start(); - - var args = await eventAwaiter.GetResultAsync(); - - Assert.AreEqual($"Error={args.Error}, State={args.State}", args.ToString(), - "Should be the same string"); - } - } - } -} -- 2.7.4