[ElmSharp][Non-ACR][Added AnimationView TC for new animation_view APIs] 14/201514/2
authorJeonghyun Yun <jh0506.yun@samsung.com>
Fri, 15 Mar 2019 06:21:06 +0000 (15:21 +0900)
committerJeonghyun Yun <jh0506.yun@samsung.com>
Fri, 15 Mar 2019 06:24:07 +0000 (15:24 +0900)
Change-Id: I0f5988e64d0bfdf43b80e51c90c3d21db4f87ff8
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs

index b387faf..249cc9c 100644 (file)
@@ -39,6 +39,8 @@ namespace ElmSharp.Tests {
         public void Destroy()
         {
             LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST");
+
+            _animation.Unrealize();
             _animation = null;
         }
 
@@ -120,16 +122,92 @@ namespace ElmSharp.Tests {
 
         [Test]
         [Category("P1")]
-        [Description("Check whether get value of KeyFrame are identical with the set value or not.")]
-        [Property("SPEC", "ElmSharp.AnimationView.KeyFrame A")]
+        [Description("Check whether get value of Progress are identical with the set value or not.")]
+        [Property("SPEC", "ElmSharp.AnimationView.Progress A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRW")]
         [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
-        public void KeyFrame_PROPERTY_SET_GET()
+        public void Progress_PROPERTY_SET_GET()
         {
-            double frame = 0.5;
-            _animation.KeyFrame = frame;
-            Assert.AreEqual(frame, _animation.KeyFrame, "Retrieved KeyFrame should be equal to set value");
+            double progress = 0.5;
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.Progress = progress;
+            Assert.AreEqual(progress, _animation.Progress, "Retrieved Progress should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether get value of Frame are identical with the set value or not.")]
+        [Property("SPEC", "ElmSharp.AnimationView.Frame A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void Frame_PROPERTY_SET_GET()
+        {
+            int frame = 5;
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.Frame = frame;
+            Assert.AreEqual(frame, _animation.Frame, "Retrieved Frame should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether get value of MinProgress are identical with the set value or not.")]
+        [Property("SPEC", "ElmSharp.AnimationView.MinProgress A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void MinProgress_PROPERTY_SET_GET()
+        {
+            double progress = 0.2;
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.MinProgress = progress;
+            Assert.AreEqual(progress, _animation.MinProgress, "Retrieved MinProgress should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether get value of MaxProgress are identical with the set value or not.")]
+        [Property("SPEC", "ElmSharp.AnimationView.MaxProgress A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void MaxProgress_PROPERTY_SET_GET()
+        {
+            double progress = 0.8;
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.MaxProgress = progress;
+            Assert.AreEqual(progress, _animation.MaxProgress, "Retrieved MaxProgress should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether get value of MinFrame are identical with the set value or not.")]
+        [Property("SPEC", "ElmSharp.AnimationView.MinFrame A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void MinFrame_PROPERTY_SET_GET()
+        {
+            int frame = 5;
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.MinFrame = frame;
+            Assert.AreEqual(frame, _animation.MinFrame, "Retrieved MinFrame should be equal to set value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether get value of MaxFrame are identical with the set value or not.")]
+        [Property("SPEC", "ElmSharp.AnimationView.MaxFrame A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void MaxFrame_PROPERTY_SET_GET()
+        {
+            int frame = 30;
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.MaxFrame = frame;
+            Assert.AreEqual(frame, _animation.MaxFrame, "Retrieved MaxFrame should be equal to set value");
         }
 
         [Test]
@@ -144,5 +222,33 @@ namespace ElmSharp.Tests {
             _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
             Assert.AreNotEqual(0.0, _animation.DurationTime, "Retrieved DurationTime should not be 0");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Get FrameCount value")]
+        [Property("SPEC", "ElmSharp.AnimationView.FrameCount A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void FrameCount_PROPERTY_GET()
+        {
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            Assert.AreNotEqual(0, _animation.FrameCount, "Retrieved FrameCount should not be 0");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Get DefaultSize value")]
+        [Property("SPEC", "ElmSharp.AnimationView.DefaultSize A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void DefaultSize_PROPERTY_GET()
+        {
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            Size size = _animation.DefaultSize;
+            Assert.AreNotEqual(0, size.Width, "Retrieved DefaultSize Width should not be 0");
+            Assert.AreNotEqual(0, size.Height, "Retrieved DefaultSize Height should not be 0");
+        }
     }
 }