[NUI] Fix build errors of NUI.Devel based on API10.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Animation / TSAnimation.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Threading.Tasks;
7
8 namespace Tizen.NUI.Devel.Tests
9 {
10     using static Tizen.NUI.Animation;
11     using tlog = Tizen.Log;
12
13     [TestFixture]
14     [Description("public/Animation/Animation")]
15     class PublicAnimationTest
16     {
17         private const string tag = "NUITEST";
18
19         private void OnFinished(object sender, EventArgs e)
20         {
21             tlog.Debug(tag, "OnFinished : Finished!");
22         }
23
24         private void OnProgressReached(object sender, EventArgs e)
25         {
26             tlog.Debug(tag, "OnProgressReached : ProgressReached!");
27         }
28
29         [SetUp]
30         public void Init()
31         {
32             tlog.Info(tag, "Init() is called!");
33         }
34
35         [TearDown]
36         public void Destroy()
37         {
38             tlog.Info(tag, "Destroy() is called!");
39         }
40
41         [Test]
42         [Category("P1")]
43         [Description("Animation constructor")]
44         [Property("SPEC", "Tizen.NUI.Animation.Animation C")]
45         [Property("SPEC_URL", "-")]
46         [Property("CRITERIA", "CONSTR")]
47         [Property("AUTHOR", "guowei.wang@samsung.com")]
48         public void AnimationConstructor()
49         {
50             tlog.Debug(tag, $"AnimationConstructor START");
51
52             var testingTarget = new Animation(2000);
53             Assert.IsNotNull(testingTarget, "should be not null");
54             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
55
56             testingTarget.Finished += OnFinished;
57             testingTarget.Finished -= OnFinished;
58
59             testingTarget.ProgressReached += OnProgressReached;
60             testingTarget.ProgressReached -= OnProgressReached;
61
62             testingTarget.Dispose();
63             tlog.Debug(tag, $"AnimationConstructor END (OK)");
64         }
65
66         [Test]
67         [Category("P1")]
68         [Description("Animation DownCast")]
69         [Property("SPEC", "Tizen.NUI.Animation.DownCast M")]
70         [Property("SPEC_URL", "-")]
71         [Property("CRITERIA", "CONSTR")]
72         [Property("AUTHOR", "guowei.wang@samsung.com")]
73         public void AnimationDownCast()
74         {
75             tlog.Debug(tag, $"AnimationDownCast START");
76
77             using (Animation ani = new Animation(300))
78             {
79                 var testingTarget = Animation.DownCast(ani);
80                 Assert.IsNotNull(testingTarget, "should be not null");
81                 Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
82
83                 testingTarget.Dispose();
84             }
85
86             tlog.Debug(tag, $"AnimationDownCast END (OK)");
87         }
88
89         [Test]
90         [Category("P2")]
91         [Description("Animation DownCast")]
92         [Property("SPEC", "Tizen.NUI.Animation.DownCast M")]
93         [Property("SPEC_URL", "-")]
94         [Property("CRITERIA", "CONSTR")]
95         [Property("AUTHOR", "guowei.wang@samsung.com")]
96         public void AnimationDownCastWithNullHandle()
97         {
98             tlog.Debug(tag, $"AnimationDownCastWithNullHandle START");
99
100             BaseHandle handle = null;
101
102             try
103             {
104                 Animation.DownCast(handle);
105             }
106             catch (ArgumentNullException)
107             {
108                 tlog.Debug(tag, $"AnimationDownCastWithNullHandle END (OK)");
109                 Assert.Pass("Caught ArgumentNullException : Passed!");
110             }
111         }
112
113         [Test]
114         [Category("P1")]
115         [Description("Animation Duration. Get")]
116         [Property("SPEC", "Tizen.NUI.Animation.Duration A")]
117         [Property("SPEC_URL", "-")]
118         [Property("CRITERIA", "PRO")]
119         [Property("AUTHOR", "guowei.wang@samsung.com")]
120         public void AnimationDurationGet()
121         {
122             tlog.Debug(tag, $"AnimationDurationGet START");
123
124             var testingTarget = new Animation(2000);
125             Assert.IsNotNull(testingTarget, "should be not null");
126             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
127
128             var result = testingTarget.Duration;
129             Assert.AreEqual(2000, result, "should be equal.");
130
131             testingTarget.Dispose();
132             tlog.Debug(tag, $"AnimationDurationGet END (OK)");
133         }
134
135         [Test]
136         [Category("P1")]
137         [Description("Animation Duration. Set")]
138         [Property("SPEC", "Tizen.NUI.Animation.Duration A")]
139         [Property("SPEC_URL", "-")]
140         [Property("CRITERIA", "PRO")]
141         [Property("AUTHOR", "guowei.wang@samsung.com")]
142         public void AnimationDurationSet()
143         {
144             tlog.Debug(tag, $"AnimationDurationSet START");
145
146             var testingTarget = new Animation();
147             Assert.IsNotNull(testingTarget, "should be not null");
148             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
149
150             testingTarget.Duration = 2000;
151             var result = testingTarget.Duration;
152             Assert.AreEqual(2000, result, "should be equal.");
153
154             testingTarget.Dispose();
155             tlog.Debug(tag, $"AnimationDurationSet END (OK)");
156         }
157
158         [Test]
159         [Category("P1")]
160         [Description("Animation DefaultAlphaFunction. Get")]
161         [Property("SPEC", "Tizen.NUI.Animation.DefaultAlphaFunction A")]
162         [Property("SPEC_URL", "-")]
163         [Property("CRITERIA", "PRO")]
164         [Property("AUTHOR", "guowei.wang@samsung.com")]
165         public void AnimationDefaultAlphaFunctionGet()
166         {
167             tlog.Debug(tag, $"AnimationDefaultAlphaFunctionGet START");
168
169             var testingTarget = new Animation();
170             Assert.IsNotNull(testingTarget, "should be not null");
171             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
172
173             var result = testingTarget.DefaultAlphaFunction;
174             Assert.IsNotNull(result, "should be not null");
175             Assert.IsInstanceOf<AlphaFunction>(result, "should be an instance of AlphaFunction class!");
176
177             testingTarget.Dispose();
178             tlog.Debug(tag, $"AnimationDefaultAlphaFunctionGet END (OK)");
179         }
180
181         [Test]
182         [Category("P1")]
183         [Description("Animation DefaultAlphaFunction. Set")]
184         [Property("SPEC", "Tizen.NUI.Animation.DefaultAlphaFunction A")]
185         [Property("SPEC_URL", "-")]
186         [Property("CRITERIA", "PRO")]
187         [Property("AUTHOR", "guowei.wang@samsung.com")]
188         public void AnimationDefaultAlphaFunctionSet()
189         {
190             tlog.Debug(tag, $"AnimationDefaultAlphaFunctionSet START");
191
192             var testingTarget = new Animation();
193             Assert.IsNotNull(testingTarget, "should be not null");
194             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
195
196             testingTarget.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Bounce);
197             var result = testingTarget.DefaultAlphaFunction;
198             Assert.IsNotNull(result, "should be not null");
199             Assert.IsInstanceOf<AlphaFunction>(result, "should be an instance of AlphaFunction class!");
200
201             testingTarget.Dispose();
202             tlog.Debug(tag, $"AnimationDefaultAlphaFunctionSet END (OK)");
203         }
204
205         [Test]
206         [Category("P1")]
207         [Description("Animation State")]
208         [Property("SPEC", "Tizen.NUI.Animation.State A")]
209         [Property("SPEC_URL", "-")]
210         [Property("CRITERIA", "PRO")]
211         [Property("AUTHOR", "guowei.wang@samsung.com")]
212         public void AnimationState()
213         {
214             tlog.Debug(tag, $"AnimationState START");
215
216             var testingTarget = new Animation();
217             Assert.IsNotNull(testingTarget, "should be not null");
218             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
219
220             var result = testingTarget.State;
221             Assert.AreEqual("Stopped", result.ToString(), "should be equal.");
222
223             testingTarget.Dispose();
224             tlog.Debug(tag, $"AnimationState END (OK)");
225         }
226
227         [Test]
228         [Category("P1")]
229         [Description("Animation LoopCount. Get")]
230         [Property("SPEC", "Tizen.NUI.Animation.LoopCount A")]
231         [Property("SPEC_URL", "-")]
232         [Property("CRITERIA", "PRO")]
233         [Property("AUTHOR", "guowei.wang@samsung.com")]
234         public void AnimationLoopCountGet()
235         {
236             tlog.Debug(tag, $"AnimationLoopCountGet START");
237
238             var testingTarget = new Animation();
239             Assert.IsNotNull(testingTarget, "should be not null");
240             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
241
242             var result = testingTarget.LoopCount;
243             Assert.IsTrue(1 == result);
244
245             testingTarget.Dispose();
246             tlog.Debug(tag, $"AnimationLoopCountGet END (OK)");
247         }
248
249         [Test]
250         [Category("P1")]
251         [Description("Animation LoopCount. Set")]
252         [Property("SPEC", "Tizen.NUI.Animation.LoopCount A")]
253         [Property("SPEC_URL", "-")]
254         [Property("CRITERIA", "PRO")]
255         [Property("AUTHOR", "guowei.wang@samsung.com")]
256         public void AnimationLoopCountSet()
257         {
258             tlog.Debug(tag, $"AnimationLoopCountSet START");
259
260             var testingTarget = new Animation();
261             Assert.IsNotNull(testingTarget, "should be not null");
262             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
263
264             testingTarget.LoopCount = 3;
265             var result = testingTarget.LoopCount;
266             Assert.IsTrue(3 == result);
267
268             testingTarget.Dispose();
269             tlog.Debug(tag, $"AnimationLoopCountSet END (OK)");
270         }
271
272         [Test]
273         [Category("P1")]
274         [Description("Animation Looping. Get")]
275         [Property("SPEC", "Tizen.NUI.Animation.Looping A")]
276         [Property("SPEC_URL", "-")]
277         [Property("CRITERIA", "PRO")]
278         [Property("AUTHOR", "guowei.wang@samsung.com")]
279         public void AnimationLoopingGet()
280         {
281             tlog.Debug(tag, $"AnimationLoopingGet START");
282
283             var testingTarget = new Animation();
284             Assert.IsNotNull(testingTarget, "should be not null");
285             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
286
287             var result = testingTarget.Looping;
288             Assert.IsFalse(result);
289
290             testingTarget.Dispose();
291             tlog.Debug(tag, $"AnimationLoopingGet END (OK)");
292         }
293
294         [Test]
295         [Category("P1")]
296         [Description("Animation Looping. Set")]
297         [Property("SPEC", "Tizen.NUI.Animation.Looping A")]
298         [Property("SPEC_URL", "-")]
299         [Property("CRITERIA", "PRO")]
300         [Property("AUTHOR", "guowei.wang@samsung.com")]
301         public void AnimationLoopingSet()
302         {
303             tlog.Debug(tag, $"AnimationLoopingSet START");
304
305             var testingTarget = new Animation();
306             Assert.IsNotNull(testingTarget, "should be not null");
307             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
308
309             testingTarget.Looping = true;
310             var result = testingTarget.Looping;
311             Assert.IsTrue(result);
312
313             testingTarget.Dispose();
314             tlog.Debug(tag, $"AnimationLoopingSet END (OK)");
315         }
316
317         [Test]
318         [Category("P1")]
319         [Description("Animation EndAction. Get")]
320         [Property("SPEC", "Tizen.NUI.Animation.EndAction A")]
321         [Property("SPEC_URL", "-")]
322         [Property("CRITERIA", "PRO")]
323         [Property("AUTHOR", "guowei.wang@samsung.com")]
324         public void AnimationEndActionGet()
325         {
326             tlog.Debug(tag, $"AnimationEndActionGet START");
327
328             var testingTarget = new Animation();
329             Assert.IsNotNull(testingTarget, "should be not null");
330             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
331
332             var result = testingTarget.EndAction;
333             Assert.IsTrue(EndActions.Cancel == result);
334
335             testingTarget.Dispose();
336             tlog.Debug(tag, $"AnimationEndActionGet END (OK)");
337         }
338
339         [Test]
340         [Category("P1")]
341         [Description("Animation EndAction. Set")]
342         [Property("SPEC", "Tizen.NUI.Animation.EndAction A")]
343         [Property("SPEC_URL", "-")]
344         [Property("CRITERIA", "PRO")]
345         [Property("AUTHOR", "guowei.wang@samsung.com")]
346         public void AnimationEndActionSet()
347         {
348             tlog.Debug(tag, $"AnimationEndActionSet START");
349
350             var testingTarget = new Animation();
351             Assert.IsNotNull(testingTarget, "should be not null");
352             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
353
354             testingTarget.EndAction = Animation.EndActions.Discard;
355             var result = testingTarget.EndAction;
356             Assert.IsTrue(EndActions.Discard == result);
357
358             testingTarget.Dispose();
359             tlog.Debug(tag, $"AnimationEndActionSet END (OK)");
360         }
361
362         [Test]
363         [Category("P1")]
364         [Description("Animation CurrentLoop")]
365         [Property("SPEC", "Tizen.NUI.Animation.CurrentLoop A")]
366         [Property("SPEC_URL", "-")]
367         [Property("CRITERIA", "PRO")]
368         [Property("AUTHOR", "guowei.wang@samsung.com")]
369         public void AnimationCurrentLoop()
370         {
371             tlog.Debug(tag, $"AnimationCurrentLoop START");
372
373             var testingTarget = new Animation();
374             Assert.IsNotNull(testingTarget, "should be not null");
375             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
376
377             var result = testingTarget.CurrentLoop;
378             Assert.IsTrue(0 == result);
379
380             testingTarget.Dispose();
381             tlog.Debug(tag, $"AnimationCurrentLoop END (OK)");
382         }
383
384         [Test]
385         [Category("P1")]
386         [Description("Animation DisconnectAction. Get")]
387         [Property("SPEC", "Tizen.NUI.Animation.DisconnectAction A")]
388         [Property("SPEC_URL", "-")]
389         [Property("CRITERIA", "PRO")]
390         [Property("AUTHOR", "guowei.wang@samsung.com")]
391         public void AnimationDisconnectActionGet()
392         {
393             tlog.Debug(tag, $"AnimationDisconnectActionGet START");
394
395             var testingTarget = new Animation();
396             Assert.IsNotNull(testingTarget, "should be not null");
397             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
398
399             var result = testingTarget.DisconnectAction;
400             Assert.IsTrue(EndActions.StopFinal == result);
401
402             testingTarget.Dispose();
403             tlog.Debug(tag, $"AnimationDisconnectActionGet END (OK)");
404         }
405
406         [Test]
407         [Category("P1")]
408         [Description("Animation DisconnectAction. Set")]
409         [Property("SPEC", "Tizen.NUI.Animation.DisconnectAction A")]
410         [Property("SPEC_URL", "-")]
411         [Property("CRITERIA", "PRO")]
412         [Property("AUTHOR", "guowei.wang@samsung.com")]
413         public void AnimationDisconnectActionSet()
414         {
415             tlog.Debug(tag, $"AnimationDisconnectActionSet START");
416
417             var testingTarget = new Animation();
418             Assert.IsNotNull(testingTarget, "should be not null");
419             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
420
421             testingTarget.DisconnectAction = Animation.EndActions.Cancel;
422             var result = testingTarget.EndAction;
423             Assert.IsTrue(EndActions.Cancel == result);
424
425             testingTarget.Dispose();
426             tlog.Debug(tag, $"AnimationDisconnectActionSet END (OK)");
427         }
428
429         [Test]
430         [Category("P1")]
431         [Description("Animation CurrentProgress. Get")]
432         [Property("SPEC", "Tizen.NUI.Animation.CurrentProgress A")]
433         [Property("SPEC_URL", "-")]
434         [Property("CRITERIA", "PRO")]
435         [Property("AUTHOR", "guowei.wang@samsung.com")]
436         public void AnimationCurrentProgressGet()
437         {
438             tlog.Debug(tag, $"AnimationCurrentProgressGet START");
439
440             var testingTarget = new Animation();
441             Assert.IsNotNull(testingTarget, "should be not null");
442             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
443
444             var result = testingTarget.CurrentProgress;
445             Assert.IsTrue(0 == result);
446
447             testingTarget.Dispose();
448             tlog.Debug(tag, $"AnimationCurrentProgressGet END (OK)");
449         }
450
451         [Test]
452         [Category("P1")]
453         [Description("Animation CurrentProgress. Set")]
454         [Property("SPEC", "Tizen.NUI.Animation.CurrentProgress A")]
455         [Property("SPEC_URL", "-")]
456         [Property("CRITERIA", "PRO")]
457         [Property("AUTHOR", "guowei.wang@samsung.com")]
458         public void AnimationCurrentProgressSet()
459         {
460             tlog.Debug(tag, $"AnimationCurrentProgressSet START");
461
462             var testingTarget = new Animation(3000);
463             Assert.IsNotNull(testingTarget, "should be not null");
464             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
465
466             testingTarget.CurrentProgress = 0.3f;
467             float result = testingTarget.CurrentProgress;
468             Assert.IsTrue(0 == result);
469
470             testingTarget.Dispose();
471             tlog.Debug(tag, $"AnimationCurrentProgressSet END (OK)");
472         }
473
474         [Test]
475         [Category("P1")]
476         [Description("Animation SpeedFactor. Get")]
477         [Property("SPEC", "Tizen.NUI.Animation.SpeedFactor A")]
478         [Property("SPEC_URL", "-")]
479         [Property("CRITERIA", "PRO")]
480         [Property("AUTHOR", "guowei.wang@samsung.com")]
481         public void AnimationSpeedFactorGet()
482         {
483             tlog.Debug(tag, $"AnimationSpeedFactorGet START");
484
485             var testingTarget = new Animation();
486             Assert.IsNotNull(testingTarget, "should be not null");
487             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
488
489             var result = testingTarget.SpeedFactor;
490             Assert.IsTrue(1 == result);
491
492             testingTarget.Dispose();
493             tlog.Debug(tag, $"AnimationSpeedFactorGet END (OK)");
494         }
495
496         [Test]
497         [Category("P1")]
498         [Description("Animation SpeedFactor. Set")]
499         [Property("SPEC", "Tizen.NUI.Animation.SpeedFactor A")]
500         [Property("SPEC_URL", "-")]
501         [Property("CRITERIA", "PRO")]
502         [Property("AUTHOR", "guowei.wang@samsung.com")]
503         public void AnimationSpeedFactorSet()
504         {
505             tlog.Debug(tag, $"AnimationSpeedFactorSet START");
506
507             var testingTarget = new Animation(3000);
508             Assert.IsNotNull(testingTarget, "should be not null");
509             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
510
511             testingTarget.SpeedFactor = 2;
512             float result = testingTarget.SpeedFactor;
513             Assert.IsTrue(2 == result);
514
515             testingTarget.Dispose();
516             tlog.Debug(tag, $"AnimationSpeedFactorSet END (OK)");
517         }
518
519         [Test]
520         [Category("P1")]
521         [Description("Animation PlayRange. Get")]
522         [Property("SPEC", "Tizen.NUI.Animation.PlayRange A")]
523         [Property("SPEC_URL", "-")]
524         [Property("CRITERIA", "PRO")]
525         [Property("AUTHOR", "guowei.wang@samsung.com")]
526         public void AnimationPlayRangeGet()
527         {
528             tlog.Debug(tag, $"AnimationPlayRangeGet START");
529
530             var testingTarget = new Animation();
531             Assert.IsNotNull(testingTarget, "should be not null");
532             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
533
534             var result = testingTarget.PlayRange;
535             Assert.IsTrue(0 == result.X);
536             Assert.IsTrue(1 == result.Y);
537
538             testingTarget.Dispose();
539             tlog.Debug(tag, $"AnimationPlayRangeGet END (OK)");
540         }
541
542         [Test]
543         [Category("P1")]
544         [Description("Animation PlayRange. Set")]
545         [Property("SPEC", "Tizen.NUI.Animation.PlayRange A")]
546         [Property("SPEC_URL", "-")]
547         [Property("CRITERIA", "PRO")]
548         [Property("AUTHOR", "guowei.wang@samsung.com")]
549         public void AnimationPlayRangeSet()
550         {
551             tlog.Debug(tag, $"AnimationPlayRangeSet START");
552
553             var testingTarget = new Animation(3000);
554             Assert.IsNotNull(testingTarget, "should be not null");
555             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
556
557             testingTarget.PlayRange = new RelativeVector2(0.3f, 0.5f);
558             var result = testingTarget.PlayRange;
559             Assert.IsTrue(0.3f == result.X);
560             Assert.IsTrue(0.5f == result.Y);
561
562             testingTarget.Dispose();
563             tlog.Debug(tag, $"AnimationPlayRangeSet END (OK)");
564         }
565
566         [Test]
567         [Category("P1")]
568         [Description("Animation ProgressNotification. Get")]
569         [Property("SPEC", "Tizen.NUI.Animation.ProgressNotification A")]
570         [Property("SPEC_URL", "-")]
571         [Property("CRITERIA", "PRO")]
572         [Property("AUTHOR", "guowei.wang@samsung.com")]
573         public void AnimationProgressNotificationGet()
574         {
575             tlog.Debug(tag, $"AnimationProgressNotificationGet START");
576
577             var testingTarget = new Animation();
578             Assert.IsNotNull(testingTarget, "should be not null");
579             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
580
581             var result = testingTarget.ProgressNotification;
582             Assert.IsTrue(0 == result);
583
584             testingTarget.Dispose();
585             tlog.Debug(tag, $"AnimationProgressNotificationGet END (OK)");
586         }
587
588         [Test]
589         [Category("P1")]
590         [Description("Animation ProgressNotification. Set")]
591         [Property("SPEC", "Tizen.NUI.Animation.ProgressNotification A")]
592         [Property("SPEC_URL", "-")]
593         [Property("CRITERIA", "PRO")]
594         [Property("AUTHOR", "guowei.wang@samsung.com")]
595         public void AnimationProgressNotificationSet()
596         {
597             tlog.Debug(tag, $"AnimationProgressNotificationSet START");
598
599             var testingTarget = new Animation(3000);
600             Assert.IsNotNull(testingTarget, "should be not null");
601             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
602
603             testingTarget.ProgressNotification = 0.3f;
604             var result = testingTarget.ProgressNotification;
605             Assert.IsTrue(0.3f == result);
606
607             testingTarget.Dispose();
608             tlog.Debug(tag, $"AnimationProgressNotificationSet END (OK)");
609         }
610
611         [Test]
612         [Category("P1")]
613         [Description("Animation Stop. Get")]
614         [Property("SPEC", "Tizen.NUI.Animation.Stop M")]
615         [Property("SPEC_URL", "-")]
616         [Property("CRITERIA", "MR")]
617         [Property("AUTHOR", "guowei.wang@samsung.com")]
618         public void AnimationStop()
619         {
620             tlog.Debug(tag, $"AnimationStop START");
621
622             var testingTarget = new Animation();
623             Assert.IsNotNull(testingTarget, "should be not null");
624             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
625
626             testingTarget.Stop(EndActions.Discard);
627             var result = testingTarget.EndAction;
628             Assert.IsTrue(EndActions.Discard == result);
629
630             testingTarget.Dispose();
631             tlog.Debug(tag, $"AnimationStop END (OK)");
632         }
633
634         [Test]
635         [Category("P1")]
636         [Description("Animation AnimateBy")]
637         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
638         [Property("SPEC_URL", "-")]
639         [Property("CRITERIA", "MR")]
640         [Property("AUTHOR", "guowei.wang@samsung.com")]
641         public void AnimationAnimateBy()
642         {
643             tlog.Debug(tag, $"AnimationAnimateBy START");
644
645             View view = new View()
646             {
647                 Position = new Position(0, 0)
648             };
649             Window.Instance.Add(view);
650             Assert.IsTrue(0 == view.Position.X);
651             Assert.IsTrue(0 == view.Position.Y);
652
653             var testingTarget = new Animation(1500);
654             Assert.IsNotNull(testingTarget, "should be not null");
655             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
656
657             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
658             testingTarget.AnimateBy(view, "Position", new Position(100, 150));
659             testingTarget.EndAction = Animation.EndActions.StopFinal;
660             testingTarget.Play();
661
662             Assert.IsTrue(100 == view.Position.X);
663             Assert.IsTrue(150 == view.Position.Y);
664
665             view.Dispose();
666             testingTarget.Dispose();
667             tlog.Debug(tag, $"AnimationAnimateBy END (OK)");
668         }
669
670         [Test]
671         [Category("P2")]
672         [Description("Animation AnimateBy")]
673         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
674         [Property("SPEC_URL", "-")]
675         [Property("CRITERIA", "MR")]
676         [Property("AUTHOR", "guowei.wang@samsung.com")]
677         public void AnimationAnimateByWithNullView()
678         {
679             tlog.Debug(tag, $"AnimationAnimateByWithNullView START");
680
681             View view = null;
682
683             var testingTarget = new Animation(1500);
684             Assert.IsNotNull(testingTarget, "should be not null");
685             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
686
687             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
688
689             try
690             {
691                 testingTarget.AnimateBy(view, "Position", new Position(100, 150));
692             }
693             catch (ArgumentNullException)
694             {
695                 testingTarget.Dispose();
696                 tlog.Debug(tag, $"AnimationAnimateByWithNullView END (OK)");
697                 Assert.Pass("Caught ArgumentNullException : Passed!");
698             }
699         }
700
701         [Test]
702         [Category("P2")]
703         [Description("Animation AnimateBy")]
704         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
705         [Property("SPEC_URL", "-")]
706         [Property("CRITERIA", "MR")]
707         [Property("AUTHOR", "guowei.wang@samsung.com")]
708         public void AnimationAnimateByNullProperty()
709         {
710             tlog.Debug(tag, $"AnimationAnimateByNullProperty START");
711
712             View view = new View()
713             {
714                 Position = new Position(0, 0)
715             };
716             Window.Instance.Add(view);
717             Assert.IsTrue(0 == view.Position.X);
718             Assert.IsTrue(0 == view.Position.Y);
719
720             var testingTarget = new Animation(1500);
721             Assert.IsNotNull(testingTarget, "should be not null");
722             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
723
724             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
725             
726             try
727             {
728                 string property = null;
729                 testingTarget.AnimateBy(view, property, new Position(100, 150));
730             }
731             catch (ArgumentNullException)
732             {
733                 Window.Instance.Remove(view);
734                 view.Dispose();
735                 testingTarget.Dispose();
736                 tlog.Debug(tag, $"AnimationAnimateByNullProperty END (OK)");
737                 Assert.Pass("Caught ArgumentNullException : Passed!");
738             }
739         }
740
741         [Test]
742         [Category("P2")]
743         [Description("Animation AnimateBy")]
744         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
745         [Property("SPEC_URL", "-")]
746         [Property("CRITERIA", "MR")]
747         [Property("AUTHOR", "guowei.wang@samsung.com")]
748         public void AnimationAnimateByNullObject()
749         {
750             tlog.Debug(tag, $"AnimationAnimateByNullObject START");
751
752             View view = new View()
753             {
754                 Position = new Position(0, 0)
755             };
756             Window.Instance.Add(view);
757             Assert.IsTrue(0 == view.Position.X);
758             Assert.IsTrue(0 == view.Position.Y);
759
760             var testingTarget = new Animation(1500);
761             Assert.IsNotNull(testingTarget, "should be not null");
762             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
763
764             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
765
766             try
767             {
768                 testingTarget.AnimateBy(view, "Position", null);
769             }
770             catch (ArgumentNullException)
771             {
772                 Window.Instance.Remove(view);
773                 view.Dispose();
774                 testingTarget.Dispose();
775                 tlog.Debug(tag, $"AnimationAnimateByNullObject END (OK)");
776                 Assert.Pass("Caught ArgumentNullException : Passed!");
777             }
778         }
779
780         [Test]
781         [Category("P1")]
782         [Description("Animation AnimateBy. With start time and end time")]
783         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
784         [Property("SPEC_URL", "-")]
785         [Property("CRITERIA", "MR")]
786         [Property("AUTHOR", "guowei.wang@samsung.com")]
787         public void AnimationAnimateByWithStartTimeAndEndTime()
788         {
789             tlog.Debug(tag, $"AnimationAnimateByWithStartTimeAndEndTime START");
790
791             var view = new View()
792             {
793                 Position = new Position(0, 0)
794             };
795             Window.Instance.Add(view);
796             Assert.AreEqual(0, view.Position.X, "sholud be equal.");
797             Assert.AreEqual(0, view.Position.Y, "sholud be equal.");
798
799             var testingTarget = new Animation(1500);
800             Assert.IsNotNull(testingTarget, "should be not null");
801             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
802
803             testingTarget.EndAction = Animation.EndActions.StopFinal;
804             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
805             testingTarget.AnimateBy(view, "Position", new Position(100, 150), 0, 0);
806             testingTarget.AnimateBy(view, "Position", new Position(300, 200), 0, 300);
807
808             testingTarget.Play();
809             Assert.AreEqual(400, view.Position.X, "sholud be equal.");
810             Assert.AreEqual(350, view.Position.Y, "sholud be equal.");
811
812             view.Dispose();
813             testingTarget.Dispose();
814             tlog.Debug(tag, $"AnimationAnimateByWithStartTimeAndEndTime END (OK)");
815         }
816
817         [Test]
818         [Category("P2")]
819         [Description("Animation AnimateBy. With start time and end time")]
820         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
821         [Property("SPEC_URL", "-")]
822         [Property("CRITERIA", "MR")]
823         [Property("AUTHOR", "guowei.wang@samsung.com")]
824         public void AnimationAnimateByWithStartEndTimeAndNullView()
825         {
826             tlog.Debug(tag, $"AnimationAnimateByWithStartEndTimeAndNullView START");
827
828             View view = null;
829
830             var testingTarget = new Animation(1500);
831             Assert.IsNotNull(testingTarget, "should be not null");
832             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
833
834             testingTarget.EndAction = Animation.EndActions.StopFinal;
835             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
836
837             try
838             {
839                 testingTarget.AnimateBy(view, "Position", new Position(100, 150), 0, 300);
840             }
841             catch (ArgumentNullException)
842             {
843                 testingTarget.Dispose();
844                 tlog.Debug(tag, $"AnimationAnimateByWithStartEndTimeAndNullView END (OK)");
845                 Assert.Pass("Caught ArgumentNullException : Passed!");
846             }
847         }
848
849         [Test]
850         [Category("P2")]
851         [Description("Animation AnimateBy. With start time and end time")]
852         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
853         [Property("SPEC_URL", "-")]
854         [Property("CRITERIA", "MR")]
855         [Property("AUTHOR", "guowei.wang@samsung.com")]
856         public void AnimationAnimateByWithStartEndTimeAndNullString()
857         {
858             tlog.Debug(tag, $"AnimationAnimateByWithStartEndTimeAndNullString START");
859
860             var view = new View()
861             {
862                 Position = new Position(0, 0)
863             };
864             Window.Instance.Add(view);
865             Assert.AreEqual(0, view.Position.X, "sholud be equal.");
866             Assert.AreEqual(0, view.Position.Y, "sholud be equal.");
867
868             var testingTarget = new Animation(1500);
869             Assert.IsNotNull(testingTarget, "should be not null");
870             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
871
872             testingTarget.EndAction = Animation.EndActions.StopFinal;
873             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
874
875             try
876             {
877                 testingTarget.AnimateBy(view, null, new Position(100, 150), 0, 300);
878             }
879             catch (ArgumentNullException)
880             {
881                 Window.Instance.Remove(view);
882                 view.Dispose();
883                 testingTarget.Dispose();
884                 tlog.Debug(tag, $"AnimationAnimateByWithStartEndTimeAndNullString END (OK)");
885                 Assert.Pass("Caught ArgumentNullException : Passed!");
886             }
887         }
888
889         [Test]
890         [Category("P2")]
891         [Description("Animation AnimateBy. With start time and end time")]
892         [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
893         [Property("SPEC_URL", "-")]
894         [Property("CRITERIA", "MR")]
895         [Property("AUTHOR", "guowei.wang@samsung.com")]
896         public void AnimationAnimateByWithStartEndTimeAndNullObject()
897         {
898             tlog.Debug(tag, $"AnimationAnimateByWithStartEndTimeAndNullObject START");
899
900             var view = new View()
901             {
902                 Position = new Position(0, 0)
903             };
904             Window.Instance.Add(view);
905             Assert.AreEqual(0, view.Position.X, "sholud be equal.");
906             Assert.AreEqual(0, view.Position.Y, "sholud be equal.");
907
908             var testingTarget = new Animation(1500);
909             Assert.IsNotNull(testingTarget, "should be not null");
910             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
911
912             testingTarget.EndAction = Animation.EndActions.StopFinal;
913             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
914
915             try
916             {
917                 testingTarget.AnimateBy(view, "position", null, 0, 300);
918             }
919             catch (ArgumentNullException)
920             {
921                 Window.Instance.Remove(view);
922                 view.Dispose();
923                 testingTarget.Dispose();
924                 tlog.Debug(tag, $"AnimationAnimateByWithStartEndTimeAndNullObject END (OK)");
925                 Assert.Pass("Caught ArgumentNullException : Passed!");
926             }
927         }
928
929         [Test]
930         [Category("P1")]
931         [Description("Animation AnimateTo")]
932         [Property("SPEC", "Tizen.NUI.Animation.AnimateTo M")]
933         [Property("SPEC_URL", "-")]
934         [Property("CRITERIA", "MR")]
935         [Property("AUTHOR", "guowei.wang@samsung.com")]
936         public void AnimationAnimateTo()
937         {
938             tlog.Debug(tag, $"AnimationAnimateTo START");
939
940             var view = new View()
941             {
942                 Position = new Position(0, 0)
943             };
944             Window.Instance.Add(view);
945             Assert.AreEqual(0, view.Position.X, "sholud be equal.");
946             Assert.AreEqual(0, view.Position.Y, "sholud be equal.");
947
948             var testingTarget = new Animation(1500);
949             Assert.IsNotNull(testingTarget, "should be not null");
950             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
951
952             testingTarget.EndAction = Animation.EndActions.StopFinal;
953             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
954             testingTarget.AnimateTo(view, "Position", new Position(100, 150));
955             
956             testingTarget.Play();
957             Assert.AreEqual(100, view.Position.X, "sholud be equal.");
958             Assert.AreEqual(150, view.Position.Y, "sholud be equal.");
959
960             view.Dispose();
961             testingTarget.Dispose();
962             tlog.Debug(tag, $"AnimationAnimateTo END (OK)");
963         }
964
965         [Test]
966         [Category("P1")]
967         [Description("Animation AnimateTo. With start time and end time")]
968         [Property("SPEC", "Tizen.NUI.Animation.AnimateTo M")]
969         [Property("SPEC_URL", "-")]
970         [Property("CRITERIA", "MR")]
971         [Property("AUTHOR", "guowei.wang@samsung.com")]
972         public void AnimationAnimateToWithStartTimeAndEndTime()
973         {
974             tlog.Debug(tag, $"AnimationAnimateToWithStartTimeAndEndTime START");
975
976             var view = new View()
977             {
978                 Position = new Position(0, 0)
979             };
980             Window.Instance.Add(view);
981             Assert.AreEqual(0, view.Position.X, "sholud be equal.");
982             Assert.AreEqual(0, view.Position.Y, "sholud be equal.");
983
984             var testingTarget = new Animation(1500);
985             Assert.IsNotNull(testingTarget, "should be not null");
986             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
987
988             testingTarget.EndAction = Animation.EndActions.StopFinal;
989             testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
990             testingTarget.AnimateTo(view, "Position", new Position(100, 150), 0, 0);
991             testingTarget.AnimateTo(view, "Position", new Position(300, 200), 0, 300);
992
993             testingTarget.Play();
994             Assert.AreEqual(300, view.Position.X, "sholud be equal.");
995             Assert.AreEqual(200, view.Position.Y, "sholud be equal.");
996
997             view.Dispose();
998             testingTarget.Dispose();
999             tlog.Debug(tag, $"AnimationAnimateToWithStartTimeAndEndTime END (OK)");
1000         }
1001
1002         [Test]
1003         [Category("P1")]
1004         [Description("Animation PlayAnimateTo")]
1005         [Property("SPEC", "Tizen.NUI.Animation.PlayAnimateTo M")]
1006         [Property("SPEC_URL", "-")]
1007         [Property("CRITERIA", "MR")]
1008         [Property("AUTHOR", "guowei.wang@samsung.com")]
1009         public void AnimationPlayAnimateTo()
1010         {
1011             tlog.Debug(tag, $"AnimationPlayAnimateTo START");
1012
1013             var testingTarget = new Animation(1500);
1014             Assert.IsNotNull(testingTarget, "should be not null");
1015             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1016
1017             ImageView view = new ImageView()
1018             { 
1019                 Size = new Size(100, 200),
1020             };
1021
1022             try
1023             {
1024                 testingTarget.PlayAnimateTo(view);
1025             }
1026             catch (Exception e)
1027             {
1028                 tlog.Debug(tag, e.Message.ToString());
1029                 Assert.Fail("Caught Exception : Failed!");
1030             }
1031
1032             view.Dispose();
1033             testingTarget.Dispose();
1034             tlog.Debug(tag, $"AnimationPlayAnimateTo END (OK)");
1035         }
1036
1037         [Test]
1038         [Category("P2")]
1039         [Description("Animation PlayAnimateTo")]
1040         [Property("SPEC", "Tizen.NUI.Animation.PlayAnimateTo M")]
1041         [Property("SPEC_URL", "-")]
1042         [Property("CRITERIA", "MR")]
1043         [Property("AUTHOR", "guowei.wang@samsung.com")]
1044         public void AnimationPlayAnimateToNullTarget()
1045         {
1046             tlog.Debug(tag, $"AnimationPlayAnimateToNullTarget START");
1047
1048             var testingTarget = new Animation(1500);
1049             Assert.IsNotNull(testingTarget, "should be not null");
1050             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1051
1052             ImageView view = null;
1053
1054             try
1055             {
1056                 testingTarget.PlayAnimateTo(view);
1057             }
1058             catch (ArgumentNullException)
1059             {
1060                 testingTarget.Dispose();
1061                 tlog.Debug(tag, $"AnimationPlayAnimateToNullTarget END (OK)");
1062                 Assert.Pass("Caught ArgumentNullException : Passed!");
1063             }
1064         }
1065
1066         [Test]
1067         [Category("P1")]
1068         [Description("Animation AnimateBetween")]
1069         [Property("SPEC", "Tizen.NUI.Animation.AnimateBetween M")]
1070         [Property("SPEC_URL", "-")]
1071         [Property("CRITERIA", "MR")]
1072         [Property("AUTHOR", "guowei.wang@samsung.com")]
1073         public void AnimationAnimateBetween()
1074         {
1075             tlog.Debug(tag, $"AnimationAnimateBetween START");
1076
1077             View view = new View()
1078             {
1079                 Opacity = 0.0f
1080             };
1081
1082             var keyFrames = new KeyFrames();
1083             Assert.IsNotNull(keyFrames, "should be not null");
1084             Assert.IsInstanceOf<KeyFrames>(keyFrames, "should be an instance of Animation class!");
1085             keyFrames.Add(0.0f, 1.0f);
1086
1087             var testingTarget = new Animation(600);
1088             Assert.IsNotNull(testingTarget, "should be not null");
1089             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1090
1091             testingTarget.EndAction = Animation.EndActions.StopFinal;
1092             testingTarget.AnimateBetween(view, "Opacity", keyFrames);
1093
1094             testingTarget.Dispose();
1095             keyFrames.Dispose();
1096             view.Dispose();
1097             tlog.Debug(tag, $"AnimationAnimateBetween END (OK)");
1098         }
1099
1100         [Test]
1101         [Category("P1")]
1102         [Description("Animation AnimateBetween. With start time and end time")]
1103         [Property("SPEC", "Tizen.NUI.Animation.AnimateBetween M")]
1104         [Property("SPEC_URL", "-")]
1105         [Property("CRITERIA", "MR")]
1106         [Property("AUTHOR", "guowei.wang@samsung.com")]
1107         public void AnimationAnimateBetweenWithStartTimeAndEndTime()
1108         {
1109             tlog.Debug(tag, $"AnimationAnimateBetweenWithStartTimeAndEndTime START");
1110
1111             View view = new View()
1112             {
1113                 Opacity = 0.0f
1114             };
1115
1116             var keyFrames = new KeyFrames();
1117             Assert.IsNotNull(keyFrames, "should be not null");
1118             Assert.IsInstanceOf<KeyFrames>(keyFrames, "should be an instance of Animation class!");
1119             keyFrames.Add(0.0f, 1.0f);
1120
1121             var testingTarget = new Animation(600);
1122             Assert.IsNotNull(testingTarget, "should be not null");
1123             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1124
1125             testingTarget.EndAction = Animation.EndActions.StopFinal;
1126             testingTarget.AnimateBetween(view, "Opacity", keyFrames, 0, 600);
1127
1128             testingTarget.Dispose();
1129             keyFrames.Dispose();
1130             view.Dispose();
1131             tlog.Debug(tag, $"AnimationAnimateBetweenWithStartTimeAndEndTime END (OK)");
1132         }
1133
1134         [Test]
1135         [Category("P1")]
1136         [Description("Animation AnimatePath")]
1137         [Property("SPEC", "Tizen.NUI.Animation.AnimatePath M")]
1138         [Property("SPEC_URL", "-")]
1139         [Property("CRITERIA", "MR")]
1140         [Property("AUTHOR", "guowei.wang@samsung.com")]
1141         public void AnimationAnimatePath()
1142         {
1143             tlog.Debug(tag, $"AnimationAnimatePath START");
1144
1145             View view = new View()
1146             { 
1147                 Size = new Size(200, 300)
1148             };
1149
1150             Path path = new Path();
1151             PropertyArray points = new PropertyArray();
1152             points.PushBack(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
1153             points.PushBack(new PropertyValue(new Vector3(0.9f, 0.3f, 0.0f)));
1154             path.Points = points;
1155
1156             var testingTarget = new Animation(600);
1157             Assert.IsNotNull(testingTarget, "should be not null");
1158             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1159
1160             testingTarget.EndAction = Animation.EndActions.StopFinal;
1161             testingTarget.AnimatePath(view, path, new Vector3(0.0f, 0.6f, 1.2f));
1162
1163             testingTarget.Dispose();
1164             points.Dispose();
1165             path.Dispose();
1166             view.Dispose();
1167             tlog.Debug(tag, $"AnimationAnimatePath END (OK)");
1168         }
1169
1170         [Test]
1171         [Category("P1")]
1172         [Description("Animation AnimatePath. With start time and end time")]
1173         [Property("SPEC", "Tizen.NUI.Animation.AnimatePath M")]
1174         [Property("SPEC_URL", "-")]
1175         [Property("CRITERIA", "MR")]
1176         [Property("AUTHOR", "guowei.wang@samsung.com")]
1177         public void AnimationAnimatePathWithStartTimeAndEndTime()
1178         {
1179             tlog.Debug(tag, $"AnimationAnimatePathWithStartTimeAndEndTime START");
1180
1181             View view = new View()
1182             {
1183                 Size = new Size(200, 300)
1184             };
1185
1186             Path path = new Path();
1187             PropertyArray points = new PropertyArray();
1188             points.PushBack(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
1189             points.PushBack(new PropertyValue(new Vector3(0.9f, 0.3f, 0.0f)));
1190             path.Points = points;
1191
1192             var testingTarget = new Animation(600);
1193             Assert.IsNotNull(testingTarget, "should be not null");
1194             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1195
1196             testingTarget.EndAction = Animation.EndActions.StopFinal;
1197             testingTarget.AnimatePath(view, path, new Vector3(0.0f, 0.6f, 1.2f), 0, 600);
1198
1199             testingTarget.Dispose();
1200             points.Dispose();
1201             path.Dispose();
1202             view.Dispose();
1203             tlog.Debug(tag, $"AnimationAnimatePathWithStartTimeAndEndTime END (OK)");
1204         }
1205
1206         [Test]
1207         [Category("P1")]
1208         [Description("Animation Play")]
1209         [Property("SPEC", "Tizen.NUI.Animation.Play M")]
1210         [Property("SPEC_URL", "-")]
1211         [Property("CRITERIA", "MR")]
1212         [Property("AUTHOR", "guowei.wang@samsung.com")]
1213         public void AnimationPlay()
1214         {
1215             tlog.Debug(tag, $"AnimationPlay START");
1216
1217             var testingTarget = new Animation(600);
1218             Assert.IsNotNull(testingTarget, "should be not null");
1219             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1220
1221             testingTarget.EndAction = Animation.EndActions.StopFinal;
1222             try
1223             {
1224                 testingTarget.Play();
1225                 testingTarget.Stop();
1226             }
1227             catch (Exception e)
1228             {
1229                 tlog.Error(tag, "Caught Exception" + e.ToString());
1230                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
1231                 Assert.Fail("Caught Exception" + e.ToString());
1232             }
1233             
1234             testingTarget.Dispose();
1235             tlog.Debug(tag, $"AnimationPlay END (OK)");
1236         }
1237
1238         [Test]
1239         [Category("P1")]
1240         [Description("Animation PlayFrom")]
1241         [Property("SPEC", "Tizen.NUI.Animation.PlayFrom M")]
1242         [Property("SPEC_URL", "-")]
1243         [Property("CRITERIA", "MR")]
1244         [Property("AUTHOR", "guowei.wang@samsung.com")]
1245         public void AnimationPlayFrom()
1246         {
1247             tlog.Debug(tag, $"AnimationPlayFrom START");
1248
1249             var testingTarget = new Animation(600);
1250             Assert.IsNotNull(testingTarget, "should be not null");
1251             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1252
1253             testingTarget.EndAction = Animation.EndActions.StopFinal;
1254             try
1255             {
1256                 testingTarget.PlayFrom(0.3f);
1257                 testingTarget.Stop();
1258             }
1259             catch (Exception e)
1260             {
1261                 tlog.Error(tag, "Caught Exception" + e.ToString());
1262                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
1263                 Assert.Fail("Caught Exception" + e.ToString());
1264             }
1265             
1266             testingTarget.Dispose();
1267             tlog.Debug(tag, $"AnimationPlayFrom END (OK)");
1268         }
1269
1270         [Test]
1271         [Category("P1")]
1272         [Description("Animation PlayAfter")]
1273         [Property("SPEC", "Tizen.NUI.Animation.PlayAfter M")]
1274         [Property("SPEC_URL", "-")]
1275         [Property("CRITERIA", "MR")]
1276         [Property("AUTHOR", "guowei.wang@samsung.com")]
1277         public void AnimationPlayAfter()
1278         {
1279             tlog.Debug(tag, $"AnimationPlayAfter START");
1280
1281             var testingTarget = new Animation(600);
1282             Assert.IsNotNull(testingTarget, "should be not null");
1283             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1284
1285             testingTarget.EndAction = Animation.EndActions.StopFinal;
1286             try
1287             {
1288                 testingTarget.PlayAfter(300);
1289                 testingTarget.Stop();
1290             }
1291             catch (Exception e)
1292             {
1293                 tlog.Error(tag, "Caught Exception" + e.ToString());
1294                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
1295                 Assert.Fail("Caught Exception" + e.ToString());
1296             }
1297
1298             testingTarget.Dispose();
1299             tlog.Debug(tag, $"AnimationPlayAfter END (OK)");
1300         }
1301
1302         [Test]
1303         [Category("P1")]
1304         [Description("Animation Clear")]
1305         [Property("SPEC", "Tizen.NUI.Animation.Stop M")]
1306         [Property("SPEC_URL", "-")]
1307         [Property("CRITERIA", "MR")]
1308         [Property("AUTHOR", "guowei.wang@samsung.com")]
1309         public void AnimationClear()
1310         {
1311             tlog.Debug(tag, $"AnimationClear START");
1312
1313             var testingTarget = new Animation(600);
1314             Assert.IsNotNull(testingTarget, "should be not null");
1315             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1316
1317             testingTarget.EndAction = Animation.EndActions.StopFinal;
1318             testingTarget.Play();
1319
1320             try
1321             {
1322                 testingTarget.Clear();
1323             }
1324             catch (Exception e)
1325             {
1326                 tlog.Error(tag, "Caught Exception" + e.ToString());
1327                 LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
1328                 Assert.Fail("Caught Exception" + e.ToString());
1329             }
1330
1331
1332             testingTarget.Dispose();
1333             tlog.Debug(tag, $"AnimationClear END (OK)");
1334         }
1335
1336         [Test]
1337         [Category("P1")]
1338         [Description("Animation Show")]
1339         [Property("SPEC", "Tizen.NUI.Animation.Show M")]
1340         [Property("SPEC_URL", "-")]
1341         [Property("CRITERIA", "MR")]
1342         [Property("AUTHOR", "guowei.wang@samsung.com")]
1343         public void AnimationShow()
1344         {
1345             tlog.Debug(tag, $"AnimationShow START");
1346
1347             var testingTarget = new Animation(600);
1348             Assert.IsNotNull(testingTarget, "should be not null");
1349             Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
1350
1351             testingTarget.EndAction = Animation.EndActions.StopFinal;
1352
1353             using (View view = new View() { Color = Color.Cyan, })
1354             {
1355                 testingTarget.Show(view, 200);
1356                 testingTarget.Hide(view, 300);
1357             }
1358
1359             testingTarget.Play();
1360             testingTarget.Stop();
1361             
1362             testingTarget.Dispose();
1363             tlog.Debug(tag, $"AnimationShow END (OK)");
1364         }
1365     }
1366 }