[ElmSharp][Non-ACR] Added & fixed AnimationView TC 81/201681/1
authorJeonghyun Yun <jh0506.yun@samsung.com>
Tue, 19 Mar 2019 01:41:36 +0000 (10:41 +0900)
committerJeonghyun Yun <jh0506.yun@samsung.com>
Tue, 19 Mar 2019 01:42:27 +0000 (10:42 +0900)
Change-Id: I0e9c7cb5103ab38343e26f47799f12682e534061
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSAnimationView.cs
tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs

index 57b625e..2f7129f 100644 (file)
@@ -120,7 +120,7 @@ namespace ElmSharp.Tests
 
             _animation.Updated += (s, e) =>
             {
-                _label.Text = "Progress : " + ((int)(Math.Round(_animation.KeyFrame, 2) * 100)).ToString() + "/100";
+                _label.Text = "Progress : " + ((int)(Math.Round(_animation.Progress, 2) * 100)).ToString() + "/100";
             };
             _animation.Stopped += (s, e) =>
             {
index 249cc9c..1e4faeb 100644 (file)
@@ -159,7 +159,7 @@ namespace ElmSharp.Tests {
         [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
         public void MinProgress_PROPERTY_SET_GET()
         {
-            double progress = 0.2;
+            double progress = 0.5;
             _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
             _animation.MinProgress = progress;
             Assert.AreEqual(progress, _animation.MinProgress, "Retrieved MinProgress should be equal to set value");
@@ -174,7 +174,7 @@ namespace ElmSharp.Tests {
         [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
         public void MaxProgress_PROPERTY_SET_GET()
         {
-            double progress = 0.8;
+            double progress = 0.5;
             _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
             _animation.MaxProgress = progress;
             Assert.AreEqual(progress, _animation.MaxProgress, "Retrieved MaxProgress should be equal to set value");
@@ -189,7 +189,7 @@ namespace ElmSharp.Tests {
         [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
         public void MinFrame_PROPERTY_SET_GET()
         {
-            int frame = 5;
+            int frame = 11;
             _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
             _animation.MinFrame = frame;
             Assert.AreEqual(frame, _animation.MinFrame, "Retrieved MinFrame should be equal to set value");
@@ -204,7 +204,7 @@ namespace ElmSharp.Tests {
         [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
         public void MaxFrame_PROPERTY_SET_GET()
         {
-            int frame = 30;
+            int frame = 11;
             _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
             _animation.MaxFrame = frame;
             Assert.AreEqual(frame, _animation.MaxFrame, "Retrieved MaxFrame should be equal to set value");
@@ -250,5 +250,48 @@ namespace ElmSharp.Tests {
             Assert.AreNotEqual(0, size.Width, "Retrieved DefaultSize Width should not be 0");
             Assert.AreNotEqual(0, size.Height, "Retrieved DefaultSize Height should not be 0");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Get IsReversedPlaying value")]
+        [Property("SPEC", "ElmSharp.AnimationView.IsReversedPlaying A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void IsReversedPlaying_PROPERTY_GET()
+        {
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.Resize(360, 360);
+            _animation.Move(0, 0);
+            _animation.Show();
+            _animation.Play();
+            Assert.AreNotEqual(true, _animation.IsReversedPlaying, "Retrieved IsReversedPlaying should not be true");\r
+            _animation.Play(true);\r
+            Assert.AreNotEqual(false, _animation.IsReversedPlaying, "Retrieved IsReversedPlaying should not be false");\r
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Get State value")]
+        [Property("SPEC", "ElmSharp.AnimationView.State A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Jeonghyun Yun, jh0506.yun@samsung.com")]
+        public void State_PROPERTY_GET()
+        {
+            Assert.AreEqual(AnimationViewState.NotReady, _animation.State, "Retrieved State should be NotReady");
+            _animation.SetAnimation(Program.Current.DirectoryInfo.Resource + "running.json");
+            _animation.Resize(360, 360);
+            _animation.Move(0, 0);
+            _animation.Show();
+            _animation.Play(true);\r
+            Assert.AreEqual(AnimationViewState.ReversedPlay, _animation.State, "Retrieved State should be ReversedPlay");
+            _animation.Stop();\r
+            Assert.AreEqual(AnimationViewState.Stop, _animation.State, "Retrieved State should be Stop");
+            _animation.Play();
+            Assert.AreEqual(AnimationViewState.Play, _animation.State, "Retrieved State should be Play");\r
+            _animation.Pause();\r
+            Assert.AreEqual(AnimationViewState.Pause, _animation.State, "Retrieved State should be Pause");\r
+        }
     }
 }