[NUI] Update NUI.Devel to fix block and crash issues.
[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 getCPtr.")]
81         [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.getCPtr M")]
82         [Property("SPEC_URL", "-")]
83         [Property("CRITERIA", "MR")]
84         [Property("AUTHOR", "guowei.wang@samsung.com")]
85         public void PageTurnLandscapeViewGetCPtr()
86         {
87             tlog.Debug(tag, $"PageTurnLandscapeViewGetCPtr 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.getCPtr(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, $"PageTurnLandscapeViewGetCPtr END (OK)");
109         }
110
111         [Test]
112         [Category("P1")]
113         [Description("PageTurnLandscapeView DownCast.")]
114         [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.DownCast M")]
115         [Property("SPEC_URL", "-")]
116         [Property("CRITERIA", "MR")]
117         [Property("AUTHOR", "guowei.wang@samsung.com")]
118         public void PageTurnLandscapeViewDownCast()
119         {
120             tlog.Debug(tag, $"PageTurnLandscapeViewDownCast 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                     PageTurnLandscapeView.DownCast(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, $"PageTurnLandscapeViewDownCast END (OK)");
142         }
143
144         [Test]
145         [Category("P1")]
146         [Description("PageTurnLandscapeView Assign.")]
147         [Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.Assign M")]
148         [Property("SPEC_URL", "-")]
149         [Property("CRITERIA", "MR")]
150         [Property("AUTHOR", "guowei.wang@samsung.com")]
151         public void PageTurnLandscapeViewAssign()
152         {
153             tlog.Debug(tag, $"PageTurnLandscapeViewAssign START");
154
155             using (View view = new View())
156             {
157                 var testingTarget = new PageTurnLandscapeView(view.SwigCPtr.Handle, false);
158                 Assert.IsNotNull(testingTarget, "Should be not null!");
159                 Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
160
161                 try
162                 {
163                     testingTarget.Assign(testingTarget);
164                 }
165                 catch (Exception e)
166                 {
167                     tlog.Debug(tag, e.Message.ToString());
168                     Assert.Fail("Caught Exception: Failed!");
169                 }
170
171                 testingTarget.Dispose();
172             }
173
174             tlog.Debug(tag, $"PageTurnLandscapeViewAssign END (OK)");
175         }
176
177         //[Test]
178         //[Category("P1")]
179         //[Description("PageTurnLandscapeView constructor.")]
180         //[Property("SPEC", "Tizen.NUI.PageTurnLandscapeView.PageTurnLandscapeView C")]
181         //[Property("SPEC_URL", "-")]
182         //[Property("CRITERIA", "CONSTR")]
183         //[Property("AUTHOR", "guowei.wang@samsung.com")]
184         //public void PageTurnLandscapeViewConstructorWith2Parameters()
185         //{
186         //    tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWith2Parameters START");
187
188         //    using (View view = new View())
189         //    {
190         //        using (PageFactory pageFactory = new PageFactory(view.SwigCPtr.Handle, true))
191         //        {
192         //            using (Vector2 pageSize = new Vector2(100, 50))
193         //            {
194         //                var testingTarget = new PageTurnLandscapeView(pageFactory, pageSize);
195         //                Assert.IsNotNull(testingTarget, "Should be not null!");
196         //                Assert.IsInstanceOf<PageTurnLandscapeView>(testingTarget, "Should be an Instance of PageTurnLandscapeView!");
197
198         //                testingTarget.Dispose();
199         //            }
200         //        }
201         //    }
202
203         //    tlog.Debug(tag, $"PageTurnLandscapeViewConstructorWith2Parameters END (OK)");
204         //}
205     }
206 }