[MediaCodec][TCSACR-256] Modify feature description and tag in EventArgs class 58/211458/5
authorHaesu Gwon <haesu.gwon@samsung.com>
Mon, 5 Aug 2019 08:04:07 +0000 (17:04 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Wed, 28 Aug 2019 05:10:57 +0000 (14:10 +0900)
Change-Id: Iadcf9389a36c5afefea3164d0100c0b0dba2fd18

tct-suite-vs/Tizen.MediaCodec.Tests/testcase/TSBufferStatusChangedEventArgs.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaCodec.Tests/testcase/TSInputProcessedEventArgs.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaCodec.Tests/testcase/TSMediaCodec.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaCodec.Tests/testcase/TSMediaCodecErrorOccurredEventArgs.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaCodec.Tests/testcase/TSOutputAvailableEventArgs.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaCodec.Tests/testcase/support/TestBase.cs [new file with mode: 0644]

old mode 100755 (executable)
new mode 100644 (file)
index 2383b14..15cf0ac
@@ -5,7 +5,7 @@ namespace Tizen.Multimedia.MediaCodec.Tests
 {
     [TestFixture]
     [Description("Tizen.Multimedia.MediaCodec.BufferStatusChangedEventArgs Tests")]
-    public class BufferStatusChangedEventArgsTests
+    public class BufferStatusChangedEventArgsTests : TestBase
     {
         [Test]
         [Category("P1")]
@@ -16,35 +16,12 @@ namespace Tizen.Multimedia.MediaCodec.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public void BufferStatusChangedEventArgs_CHECK()
         {
-            if (FeatureChecker.IsSupported(Constants.Feature) == false)
-            {
-                Assert.Pass("The MediaCodec is not supported.");
-            }
-
             Assert.That(() => new BufferStatusChangedEventArgs(MediaCodecStatus.EnoughData),
                 Throws.Nothing);
         }
 
         [Test]
         [Category("P1")]
-        [Description("Constructor test")]
-        [Property("SPEC", "Tizen.Multimedia.MediaCodec.BufferStatusChangedEventArgs.BufferStatusChangedEventArgs C")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "CONSTX")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public void BufferStatusChangedEventArgs_NOT_SUPPORTED()
-        {
-            if (FeatureChecker.IsSupported(Constants.Feature))
-            {
-                Assert.Pass("The MediaCodec is supported. This TC can be tested only if MediaCodec is not supported.");
-            }
-
-            Assert.That(() => new BufferStatusChangedEventArgs(MediaCodecStatus.EnoughData),
-                Throws.InstanceOf<NotSupportedException>());
-        }
-
-        [Test]
-        [Category("P1")]
         [Description("Status test")]
         [Property("SPEC", "Tizen.Multimedia.MediaCodec.BufferStatusChangedEventArgs.Status A")]
         [Property("SPEC_URL", "-")]
@@ -52,16 +29,9 @@ namespace Tizen.Multimedia.MediaCodec.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public void Status_CHECK()
         {
-            if (FeatureChecker.IsSupported(Constants.Feature))
-            {
-                const MediaCodecStatus status = MediaCodecStatus.LackOfData;
+            const MediaCodecStatus status = MediaCodecStatus.LackOfData;
 
-                Assert.That(new BufferStatusChangedEventArgs(status).Status, Is.EqualTo(status));
-            }
-            else
-            {
-                Assert.Pass("The MediaCodec is not supported.");
-            }
+            Assert.That(new BufferStatusChangedEventArgs(status).Status, Is.EqualTo(status));
         }
     }
 }
old mode 100755 (executable)
new mode 100644 (file)
index da171c9..6376564
@@ -5,7 +5,7 @@ namespace Tizen.Multimedia.MediaCodec.Tests
 
     [TestFixture]
     [Description("Tizen.Multimedia.MediaCodec.InputProcessedEventArgs Tests")]
-    public class InputProcessedEventArgsTests
+    public class InputProcessedEventArgsTests : TestBase
     {
         [Test]
         [Category("P1")]
@@ -16,13 +16,7 @@ namespace Tizen.Multimedia.MediaCodec.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public void Packet_CHECK()
         {
-            if (FeatureChecker.IsSupported(Constants.Feature) == false)
-            {
-                Assert.Pass("The MediaCodec is not supported.");
-            }
-
             AssertHelper.PropertyReadOnly<InputProcessedEventArgs>(nameof(InputProcessedEventArgs.Packet));
         }
-
     }
 }
old mode 100755 (executable)
new mode 100644 (file)
index 53082a0..329b361
@@ -7,34 +7,13 @@ namespace Tizen.Multimedia.MediaCodec.Tests
 {
     [TestFixture]
     [Description("Testing Tizen.Multimedia.MediaCodec.MediaCodec class")]
-    public class MediaCodecTests
+    public class MediaCodecTests : TestBase
     {
         private const string VideoFilePath = "/opt/usr/home/owner/share/res/test.h264";
 
         private readonly MediaFormat SimpleFormat =
             new VideoMediaFormat(MediaFormatVideoMimeType.Mpeg4SP, 640, 480);
 
-        private MediaCodec _codec;
-
-        [SetUp]
-        public void SetUp()
-        {
-            try
-            {
-                _codec = new MediaCodec();
-            }
-            catch (NotSupportedException) when (FeatureChecker.IsSupported(Constants.Feature) == false)
-            {
-                Assert.Pass("The MediaCodec is not supported.");
-            }
-        }
-
-        [TearDown]
-        public void TearDown()
-        {
-            _codec?.Dispose();
-        }
-
         [Test]
         [Category("P1")]
         [Description("Check if the MediaCodec constructor can be invoked without any exception")]
@@ -142,9 +121,10 @@ namespace Tizen.Multimedia.MediaCodec.Tests
         [Test]
         [Category("P1")]
         [Description("GetCodecType returns zero if the specified type is not supported")]
-        [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.Prepare M")]
+        [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodec.GetCodecType M")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "MR")]
+        [Property("COVPARAM", "bool, MediaFormatVideoMimeType")]
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public void GetCodecType_ERROR_IF_NOT_SUPPORTED()
         {
old mode 100755 (executable)
new mode 100644 (file)
index c5c31af..bd01c84
@@ -5,7 +5,7 @@ namespace Tizen.Multimedia.MediaCodec.Tests
 {
     [TestFixture]
     [Description("Tizen.Multimedia.MediaCodec.MediaCodecErrorOccurredEventArgs Tests")]
-    public class MediaCodecErrorOccurredEventArgsTests
+    public class MediaCodecErrorOccurredEventArgsTests : TestBase
     {
         [Test]
         [Category("P1")]
@@ -16,35 +16,12 @@ namespace Tizen.Multimedia.MediaCodec.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public void MediaCodecErrorOccurredEventArgs_CHECK()
         {
-            if (FeatureChecker.IsSupported(Constants.Feature) == false)
-            {
-                Assert.Pass("The MediaCodec is not supported.");
-            }
-
             Assert.That(() => new MediaCodecErrorOccurredEventArgs(MediaCodecError.InternalError),
                 Throws.Nothing);
         }
 
         [Test]
         [Category("P1")]
-        [Description("Constructor test")]
-        [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodecErrorOccurredEventArgs.MediaCodecErrorOccurredEventArgs C")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "CONSTX")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public void MediaCodecErrorOccurredEventArgs_NOT_SUPPORTED()
-        {
-            if (FeatureChecker.IsSupported(Constants.Feature))
-            {
-                Assert.Pass("The MediaCodec is supported. This TC can be tested only if MediaCodec is not supported.");
-            }
-
-            Assert.That(() => new MediaCodecErrorOccurredEventArgs(MediaCodecError.InternalError),
-                Throws.InstanceOf<NotSupportedException>());
-        }
-
-        [Test]
-        [Category("P1")]
         [Description("Error test")]
         [Property("SPEC", "Tizen.Multimedia.MediaCodec.MediaCodecErrorOccurredEventArgs.Error A")]
         [Property("SPEC_URL", "-")]
@@ -52,16 +29,9 @@ namespace Tizen.Multimedia.MediaCodec.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public void Error_CHECK()
         {
-            if (FeatureChecker.IsSupported(Constants.Feature))
-            {
-                const MediaCodecError error = MediaCodecError.InvalidStream;
+            const MediaCodecError error = MediaCodecError.InvalidStream;
 
-                Assert.That(new MediaCodecErrorOccurredEventArgs(error).Error, Is.EqualTo(error));
-            }
-            else
-            {
-                Assert.Pass("The MediaCodec is not supported.");
-            }
+            Assert.That(new MediaCodecErrorOccurredEventArgs(error).Error, Is.EqualTo(error));
         }
     }
 }
old mode 100755 (executable)
new mode 100644 (file)
index 8d05eba..2866f0d
@@ -5,7 +5,7 @@ namespace Tizen.Multimedia.MediaCodec.Tests
 
     [TestFixture]
     [Description("Tizen.Multimedia.MediaCodec.OutputAvailableEventArgs Tests")]
-    public class OutputAvailableEventArgsTests
+    public class OutputAvailableEventArgsTests : TestBase
     {
         [Test]
         [Category("P1")]
@@ -16,13 +16,7 @@ namespace Tizen.Multimedia.MediaCodec.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public void Packet_READONLY()
         {
-            if (FeatureChecker.IsSupported(Constants.Feature) == false)
-            {
-                Assert.Pass("The MediaCodec is not supported.");
-            }
-
             AssertHelper.PropertyReadOnly<OutputAvailableEventArgs>(nameof(OutputAvailableEventArgs.Packet));
         }
-
     }
 }
diff --git a/tct-suite-vs/Tizen.MediaCodec.Tests/testcase/support/TestBase.cs b/tct-suite-vs/Tizen.MediaCodec.Tests/testcase/support/TestBase.cs
new file mode 100644 (file)
index 0000000..d1ea241
--- /dev/null
@@ -0,0 +1,29 @@
+using NUnit.Framework;
+using System;
+
+namespace Tizen.Multimedia.MediaCodec.Tests
+{
+    public class TestBase
+    {
+        protected MediaCodec _codec;
+
+        [SetUp]
+        public void SetUpBase()
+        {
+            try
+            {
+                _codec = new MediaCodec();
+            }
+            catch (NotSupportedException) when (FeatureChecker.IsSupported(Constants.Feature) == false)
+            {
+                Assert.Pass("The MediaCodec is not supported.");
+            }
+        }
+
+        [TearDown]
+        public void TearDownBase()
+        {
+            _codec?.Dispose();
+        }
+    }
+}