[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Utility / TSPageTurnLandscapeView.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/Utility/PageTurnLandscapeView")]
13     public class InternalPageTurnLandscapeViewTest
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("PageTurnLandscapeView constructor.")]
32         [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "CONSTR")]
35         [Property("AUTHOR", "guowei.wang@samsung.com")]
36         public void PageTurnLandscapeViewConstructor()
37         {
38             tlog.Debug(tag, $"PageTurnLandscapeViewConstructor START");
39
40             using (View view = new View())
41             {
42                 var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
43                 Assert.IsNotNull(testingTarget, "Should be not null!");
44                 Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
45
46                 testingTarget.Dispose();
47             }
48
49             tlog.Debug(tag, $"PageTurnLandscapeViewConstructor END (OK)");
50         }
51
52         [Test]
53         [Category("P1")]
54         [Description("PageTurnLandscapeView constructor. With PageTurnLandscapeView.")]
55         [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
56         [Property("SPEC_URL", "-")]
57         [Property("CRITERIA", "CONSTR")]
58         [Property("AUTHOR", "guowei.wang@samsung.com")]
59         public void PageTurnLandscapeViewConstructorWithPageTurnLandscapeView()
60         {
61             tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWithPageTurnLandscapeView START");
62
63             using (View view = new View())
64             {
65                 using (PageTurnLandscapeView landscapeView = new PageTurnLandscapeView(view.SwigCPtr.Handle, false))
66                 {
67                     var testingTarget = new PageTurnLandscapeView(landscapeView);
68                     Assert.IsNotNull(testingTarget, "Should be not null!");
69                     Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
70
71                     testingTarget.Dispose();
72                 }
73             }
74
75             tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWithPageTurnLandscapeView END (OK)");
76         }
77
78         [Test]
79         [Category("P1")]
80         [Description("PageTurnLandscapeView DownCast.")]
81         [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.DownCast M")]
82         [Property("SPEC_URL", "-")]
83         [Property("CRITERIA", "MR")]
84         [Property("AUTHOR", "guowei.wang@samsung.com")]
85         public void PageTurnLandscapeViewDownCast()
86         {
87             tlog.Debug(tag, $"PageTurnLandscapeViewDownCast START");
88
89             using (View view = new View())
90             {
91                 var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
92                 Assert.IsNotNull(testingTarget, "Should be not null!");
93                 Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
94
95                 try
96                 {
97                     PageTurnLandscapeView.DownCast(testingTarget);
98                 }
99                 catch (Exception e)
100                 {
101                     tlog.Debug(tag, e.Message.ToString());
102                     Assert.Fail("Caught Exception: Failed!");
103                 }
104
105                 testingTarget.Dispose();
106             }
107
108             tlog.Debug(tag, $"PageTurnLandscapeViewDownCast END (OK)");
109         }
110
111         [Test]
112         [Category("P1")]
113         [Description("PageTurnLandscapeView Assign.")]
114         [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.Assign M")]
115         [Property("SPEC_URL", "-")]
116         [Property("CRITERIA", "MR")]
117         [Property("AUTHOR", "guowei.wang@samsung.com")]
118         public void PageTurnLandscapeViewAssign()
119         {
120             tlog.Debug(tag, $"PageTurnLandscapeViewAssign START");
121
122             using (View view = new View())
123             {
124                 var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
125                 Assert.IsNotNull(testingTarget, "Should be not null!");
126                 Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
127
128                 try
129                 {
130                     testingTarget.Assign(testingTarget);
131                 }
132                 catch (Exception e)
133                 {
134                     tlog.Debug(tag, e.Message.ToString());
135                     Assert.Fail("Caught Exception: Failed!");
136                 }
137
138                 testingTarget.Dispose();
139             }
140
141             tlog.Debug(tag, $"PageTurnLandscapeViewAssign END (OK)");
142         }
143     }
144 }