[NUI][NUI.Devel] Update nui line coverage TCs.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Transition / TSTransitionSetSignal.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
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("Internal/Transition/TransitionSetSignal")]
13     public class InternalTransitionSetSignalTest
14     {
15         private const string tag = "NUITEST";
16
17         [SetUp]
18         public void Init()
19         {
20             tlog.Info(tag, "Init() is called!");
21         }
22
23         [TearDown]
24         public void Destroy()
25         {
26             tlog.Info(tag, "Destroy() is called!");
27         }
28
29         [Test]
30         [Category("P1")]
31         [Description("TransitionSetSignal constructor.")]
32         [Property("SPEC", "Tizen.NUI.TransitionSetSignal.TransitionSetSignal M")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "MR")]
35         [Property("AUTHOR", "guowei.wang@samsung.com")]
36         public void TransitionSetSignalConstructor()
37         {
38             tlog.Debug(tag, $"TransitionSetSignalConstructor START");
39
40             using (View view = new View())
41             {
42                 var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
43                 Assert.IsNotNull(testingTarget, "Should be not null!");
44                 Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
45
46                 testingTarget.Dispose();
47             }
48
49             tlog.Debug(tag, $"TransitionSetSignalConstructor END (OK)");
50         }
51
52         [Test]
53         [Category("P1")]
54         [Description("TransitionSetSignal Empty.")]
55         [Property("SPEC", "Tizen.NUI.TransitionSetSignal.Empty M")]
56         [Property("SPEC_URL", "-")]
57         [Property("CRITERIA", "MR")]
58         [Property("AUTHOR", "guowei.wang@samsung.com")]
59         public void TransitionSetSignalEmpty()
60         {
61             tlog.Debug(tag, $"TransitionSetSignalEmpty START");
62
63             using (View view = new View())
64             {
65                 var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
66                 Assert.IsNotNull(testingTarget, "Should be not null!");
67                 Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
68
69                 try
70                 {
71                     tlog.Debug(tag, "Empty : " + testingTarget.Empty());
72                 }
73                 catch (Exception e)
74                 {
75                     tlog.Debug(tag, e.Message.ToString());
76                     Assert.Fail("Caught Exception : Failed!");
77                 }
78
79                 testingTarget.Dispose();
80             }
81
82             tlog.Debug(tag, $"TransitionSetSignalEmpty END (OK)");
83         }
84
85         [Test]
86         [Category("P1")]
87         [Description("TransitionSetSignal GetConnectionCount.")]
88         [Property("SPEC", "Tizen.NUI.TransitionSetSignal.GetConnectionCount M")]
89         [Property("SPEC_URL", "-")]
90         [Property("CRITERIA", "MR")]
91         [Property("AUTHOR", "guowei.wang@samsung.com")]
92         public void TransitionSetSignalGetConnectionCount()
93         {
94             tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount START");
95
96             using (View view = new View())
97             {
98                 var testingTarget = new TransitionSetFinishedSignal(view.SwigCPtr.Handle, false);
99                 Assert.IsNotNull(testingTarget, "Should be not null!");
100                 Assert.IsInstanceOf<TransitionSetFinishedSignal>(testingTarget, "Should be an Instance of TransitionSetFinishedSignal!");
101
102                 try
103                 {
104                     tlog.Debug(tag, "ConnectionCount : " + testingTarget.GetConnectionCount());
105                 }
106                 catch (Exception e)
107                 {
108                     tlog.Debug(tag, e.Message.ToString());
109                     Assert.Fail("Caught Exception : Failed!");
110                 }
111
112                 testingTarget.Dispose();
113             }
114
115             tlog.Debug(tag, $"TransitionSetSignalGetConnectionCount END (OK)");
116         }
117     }
118 }