[TCSACR-546][MediaVision] Add Timestamp API for MediaVisionSource 07/296907/1
authorHaesu Gwon <haesu.gwon@samsung.com>
Mon, 7 Aug 2023 06:22:29 +0000 (15:22 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Mon, 7 Aug 2023 06:22:29 +0000 (15:22 +0900)
Change-Id: I250727aaafa1103870fe983125636ed6a7c9288d

tct-suite-vs/Tizen.MediaVision.Tests/testcase/TSMediaVisionSource.cs

index 92d90d2..8184d57 100755 (executable)
@@ -184,6 +184,40 @@ namespace Tizen.Multimedia.Vision.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Check whether Timestamp returns expected value or not.")]
+        [Property("SPEC", "Tizen.Multimedia.Vision.MediaVisionSource.Timestamp A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void Timestamp_READ_WRITE()
+        {
+            Assert.That(() => _bufferSource.Timestamp = 10000UL, Throws.Nothing,
+                "Should not throws exception");
+
+            Assert.That(_bufferSource.Timestamp, Is.EqualTo(10000UL),
+                "Should return same value");
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("Check whether Timestamp throws ObjectDisposedException if source is already disposed.")]
+        [Property("SPEC", "Tizen.Multimedia.Vision.MediaVisionSource.Timestamp A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PEX")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void Timestamp_THROWS_IF_ALREADY_DISPOSED()
+        {
+            _bufferSource.Dispose();
+
+            Assert.That(() => _bufferSource.Timestamp = 10000UL, Throws.TypeOf<ObjectDisposedException>(),
+                "Should throw ObjectDisposedException");
+
+            Assert.That(() => _bufferSource.Timestamp, Throws.TypeOf<ObjectDisposedException>(),
+                "Should throw ObjectDisposedException");
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Check return value of IsSupportedColorSpace")]
         [Property("SPEC", "Tizen.Multimedia.Vision.MediaVisionSource.IsSupportedColorSpace M")]
         [Property("SPEC_URL", "-")]