From: Jeonghyun Yun Date: Fri, 15 Mar 2019 06:21:06 +0000 (+0900) Subject: [ElmSharp][Non-ACR][Added AnimationView TC for new animation_view APIs] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F201514%2F2;p=test%2Ftct%2Fcsharp%2Fapi.git [ElmSharp][Non-ACR][Added AnimationView TC for new animation_view APIs] Change-Id: I0f5988e64d0bfdf43b80e51c90c3d21db4f87ff8 Signed-off-by: Jeonghyun Yun --- diff --git a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs index b387fafa6..249cc9c43 100644 --- a/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Tests/testcase/TSAnimationView.cs @@ -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"); + } } }