From: Jeonghyun Yun Date: Tue, 19 Mar 2019 01:41:36 +0000 (+0900) Subject: [ElmSharp][Non-ACR] Added & fixed AnimationView TC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17fe0befe8e4656abe4e024ebeb54db8a119a997;p=test%2Ftct%2Fcsharp%2Fapi.git [ElmSharp][Non-ACR] Added & fixed AnimationView TC Change-Id: I0e9c7cb5103ab38343e26f47799f12682e534061 Signed-off-by: Jeonghyun Yun --- diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSAnimationView.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSAnimationView.cs index 57b625e..2f7129f 100644 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSAnimationView.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/testcase/TSAnimationView.cs @@ -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) => { diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs index 249cc9c..1e4faeb 100644 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs @@ -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"); + _animation.Play(true); + Assert.AreNotEqual(false, _animation.IsReversedPlaying, "Retrieved IsReversedPlaying should not be false"); + } + + [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); + Assert.AreEqual(AnimationViewState.ReversedPlay, _animation.State, "Retrieved State should be ReversedPlay"); + _animation.Stop(); + Assert.AreEqual(AnimationViewState.Stop, _animation.State, "Retrieved State should be Stop"); + _animation.Play(); + Assert.AreEqual(AnimationViewState.Play, _animation.State, "Retrieved State should be Play"); + _animation.Pause(); + Assert.AreEqual(AnimationViewState.Pause, _animation.State, "Retrieved State should be Pause"); + } } }