[MultimediaUtil][TCSACR-358] Supports WebP encoder and decoder 18/241118/1
authorHaesu Gwon <haesu.gwon@samsung.com>
Mon, 17 Aug 2020 08:14:12 +0000 (17:14 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Mon, 17 Aug 2020 08:14:12 +0000 (17:14 +0900)
Change-Id: I320f6a0e48f47b828be704567bec10216bd646b0

tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSWebPDecoder.cs [new file with mode: 0644]
tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSWebPEncoder.cs [new file with mode: 0644]

diff --git a/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSWebPDecoder.cs b/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSWebPDecoder.cs
new file mode 100644 (file)
index 0000000..bd1d581
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2020 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using NUnit.Framework;
+
+namespace Tizen.Multimedia.Util.Tests
+{
+    [TestFixture]
+    [Description("Tests Tizen.Multimedia.Util.WebPDecoder class")]
+    public class WebPDecoderTests
+    {
+        [Test]
+        [Category("P1")]
+        [Description("Test: Constructor for decoding WebP image - object should not be null after intializing")]
+        [Property("SPEC", "Tizen.Multimedia.Util.WebPDecoder.WebPDecoder C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void WebPDecoder_INIT()
+        {
+            using (var decoder = new WebPDecoder())
+            {
+                Assert.IsNotNull(decoder, "Should not null.");
+                Assert.IsInstanceOf<WebPDecoder>(decoder, "Should return WebPDecoder instance.");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSWebPEncoder.cs b/tct-suite-vs/Tizen.MultimediaUtil.Tests/testcase/ImageUtil/TSWebPEncoder.cs
new file mode 100644 (file)
index 0000000..18bd008
--- /dev/null
@@ -0,0 +1,83 @@
+// Copyright 2020 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using NUnit.Framework;
+
+namespace Tizen.Multimedia.Util.Tests
+{
+    [TestFixture]
+    [Description("Tests Tizen.Multimedia.Util.WebPEncoder class")]
+    public class WebPEncoderTests
+    {
+        [Test]
+        [Category("P1")]
+        [Description("Test: Constructor for encoding WebP image - object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Multimedia.Util.WebPEncoder.WebPEncoder C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void WebPEncoder_INIT()
+        {
+            using (var encoder = new WebPEncoder())
+            {
+                Assert.IsNotNull(encoder, "Should not null.");
+                Assert.IsInstanceOf<WebPEncoder>(encoder, "Should return WebPEncoder instance.");
+                Assert.AreEqual(encoder.Lossless, false, "The default lossless value Should be false.");
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test: Constructor for encoding WebP image with lossless- object should not be null after initializing")]
+        [Property("SPEC", "Tizen.Multimedia.Util.WebPEncoder.WebPEncoder C")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "CONSTR")]
+        [Property("COVPARAM", "bool")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void WebPEncoder_INIT_WITH_Lossless()
+        {
+            using (var encoder = new WebPEncoder(true))
+            {
+                Assert.IsNotNull(encoder, "Should not null.");
+                Assert.IsInstanceOf<WebPEncoder>(encoder, "Should return WebPEncoder instance.");
+                Assert.AreEqual(encoder.Lossless, true, "Should be same value.");
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether Lossless property is readable and writable.")]
+        [Property("SPEC", "Tizen.Multimedia.Util.WebPEncoder.Lossless A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void Lossless_READ_WRITE()
+        {
+            using (var encoder = new WebPEncoder())
+            {
+                encoder.Lossless = true;
+                Assert.AreEqual(encoder.Lossless, true, "Should be same value.");
+
+                encoder.Lossless = false;
+                Assert.AreEqual(encoder.Lossless, false, "Should be same value.");
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether the default value of Lossless property is false.")]
+        [Property("SPEC", "Tizen.Multimedia.Util.WebPEncoder.Lossless A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PDV")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void Lossless_CHECK_DEFAULT_VALUE()
+        {
+            Assert.AreEqual(new WebPEncoder().Lossless, false, "The default value should be false.");
+        }
+    }
+}