[NUI] Update NUI.Devel to fix block and crash issues.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Transition / TSFade.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.Collections.Generic;
7 using System.Threading.Tasks;
8
9 namespace Tizen.NUI.Devel.Tests
10 {
11     using tlog = Tizen.Log;
12
13     [TestFixture]
14     [Description("public/Transition/Fade.cs")]
15     public class PublicFadeTest
16     {
17         private const string tag = "NUITEST";
18
19         [SetUp]
20         public void Init()
21         {
22             tlog.Info(tag, "Init() is called!");
23         }
24
25         [TearDown]
26         public void Destroy()
27         {
28             tlog.Info(tag, "Destroy() is called!");
29         }
30
31         [Test]
32         [Category("P1")]
33         [Description("Fade constructor.")]
34         [Property("SPEC", "Tizen.NUI.Fade.Fade C")]
35         [Property("SPEC_URL", "-")]
36         [Property("CRITERIA", "CONSTR")]
37         [Property("AUTHOR", "guowei.wang@samsung.com")]
38         public void FadeConstructor()
39         {
40             tlog.Debug(tag, $"FadeConstructor START");
41
42             var testingTarget = new Fade();
43             Assert.IsNotNull(testingTarget, "Can't create success object Fade");
44             Assert.IsInstanceOf<Fade>(testingTarget, "Should be an instance of Fade type.");
45
46             testingTarget.Dispose();
47
48             tlog.Debug(tag, $"FadeConstructor END (OK)");
49         }
50
51         [Test]
52         [Category("P1")]
53         [Description("Fade Opacity.")]
54         [Property("SPEC", "Tizen.NUI.Fade.Opacity A")]
55         [Property("SPEC_URL", "-")]
56         [Property("CRITERIA", "PRW")]
57         [Property("AUTHOR", "guowei.wang@samsung.com")]
58         public void FadeOpacity()
59         {
60             tlog.Debug(tag, $"FadeOpacity START");
61
62             var testingTarget = new Fade();
63             Assert.IsNotNull(testingTarget, "Can't create success object Fade");
64             Assert.IsInstanceOf<Fade>(testingTarget, "Should be an instance of Fade type.");
65
66             testingTarget.Opacity = 0.3f;
67             tlog.Debug(tag, testingTarget.Opacity.ToString());
68
69             testingTarget.Dispose();
70             tlog.Debug(tag, $"FadeOpacity END (OK)");
71         }
72
73         [Test]
74         [Category("P1")]
75         [Description("Fade CreateTransition.")]
76         [Property("SPEC", "Tizen.NUI.Fade.CreateTransition M")]
77         [Property("SPEC_URL", "-")]
78         [Property("CRITERIA", "MR")]
79         [Property("AUTHOR", "guowei.wang@samsung.com")]
80         public void FadeCreateTransition()
81         {
82             tlog.Debug(tag, $"FadeCreateTransition START");
83
84             var testingTarget = new Fade();
85             Assert.IsNotNull(testingTarget, "Can't create success object Fade");
86             Assert.IsInstanceOf<Fade>(testingTarget, "Should be an instance of Fade type.");
87
88             using (View view = new View())
89             {
90                 try
91                 {
92                     testingTarget.CreateTransition(view, false);
93                 }
94                 catch (Exception e)
95                 {
96                     tlog.Debug(tag, e.Message.ToString());
97                     Assert.Fail("Caught Exception : Falied!");
98                 }
99             }
100
101             testingTarget.Dispose();
102             tlog.Debug(tag, $"FadeCreateTransition END (OK)");
103         }
104     }
105 }