973944bb248ba95fd97d18fcda557971a4be459f
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Events / TSWheel.cs
1 using NUnit.Framework;
2 using NUnit.Framework.TUnit;
3 using System;
4 using Tizen.NUI;
5 using Tizen.NUI.BaseComponents;
6
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("public/Events/Wheel")]
13     class PublicWheelTest
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("Wheel constructor")]
32         [Property("SPEC", "Tizen.NUI.Wheel.Wheel C")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "CONSTR")]
35         [Property("AUTHOR", "guowei.wang@samsung.com")]
36         public void WheelConstructor()
37         {
38             tlog.Debug(tag, $"WheelConstructor START");
39                                     
40             Wheel a1 = new Wheel();
41             Wheel.WheelType type = Wheel.WheelType.MouseWheel;
42             Vector2 v = new Vector2(0.0f, 0.0f);
43             Wheel a2 = new Wheel(type, 0, 0, v, 0, 123);
44             
45             a2.Dispose();
46             a1.Dispose();
47             
48             tlog.Debug(tag, $"WheelConstructor END (OK)");
49             Assert.Pass("WheelConstructor");
50         }
51
52         [Test]
53         [Category("P1")]
54         [Description("Test Type property.")]
55         [Property("SPEC", "Tizen.NUI.Wheel.Type A")]
56         [Property("SPEC_URL", "-")]
57         [Property("CRITERIA", "PRW")]
58         [Property("AUTHOR", "guowei.wang@samsung.com")]
59         public void WheelType()
60         {
61             tlog.Debug(tag, $"WheelType START");
62             Wheel a1 = new Wheel();
63
64             Wheel.WheelType b1 = a1.Type;
65             
66             tlog.Debug(tag, $"WheelType END (OK)");
67             Assert.Pass("WheelType");
68         }
69
70         [Test]
71         [Category("P1")]
72         [Description("Test Direction property.")]
73         [Property("SPEC", "Tizen.NUI.Wheel.Direction A")]
74         [Property("SPEC_URL", "-")]
75         [Property("CRITERIA", "PRW")]
76         [Property("AUTHOR", "guowei.wang@samsung.com")]
77         public void WheelDirection()
78         {
79             tlog.Debug(tag, $"WheelDirection START");
80             Wheel a1 = new Wheel();
81
82             int b1 = a1.Direction;
83             
84             tlog.Debug(tag, $"WheelDirection END (OK)");
85             Assert.Pass("WheelDirection");
86         }
87
88         [Test]
89         [Category("P1")]
90         [Description("Test Modifiers property.")]
91         [Property("SPEC", "Tizen.NUI.Wheel.Modifiers A")]
92         [Property("SPEC_URL", "-")]
93         [Property("CRITERIA", "PRW")]
94         [Property("AUTHOR", "guowei.wang@samsung.com")]
95         public void WheelModifiers()
96         {
97             tlog.Debug(tag, $"WheelModifiers START");
98             Wheel a1 = new Wheel();
99
100             uint b1 = a1.Modifiers;
101             
102             tlog.Debug(tag, $"WheelModifiers END (OK)");
103             Assert.Pass("WheelModifiers");
104         }
105
106         [Test]
107         [Category("P1")]
108         [Description("Test Point property.")]
109         [Property("SPEC", "Tizen.NUI.Wheel.Point A")]
110         [Property("SPEC_URL", "-")]
111         [Property("CRITERIA", "PRW")]
112         [Property("AUTHOR", "guowei.wang@samsung.com")]
113         public void WheelPoint()
114         {
115             tlog.Debug(tag, $"WheelPoint START");
116             Wheel a1 = new Wheel();
117
118             Vector2 v1 = a1.Point;
119             
120             tlog.Debug(tag, $"WheelPoint END (OK)");
121             Assert.Pass("WheelPoint");
122         }
123
124         [Test]
125         [Category("P1")]
126         [Description("Test Z property.")]
127         [Property("SPEC", "Tizen.NUI.Wheel.Z A")]
128         [Property("SPEC_URL", "-")]
129         [Property("CRITERIA", "PRW")]
130         [Property("AUTHOR", "guowei.wang@samsung.com")]
131         public void WheelZ()
132         {
133             tlog.Debug(tag, $"WheelZ START");
134             Wheel a1 = new Wheel();
135
136             int b1 = a1.Z;
137             
138             tlog.Debug(tag, $"WheelZ END (OK)");
139             Assert.Pass("WheelZ");
140         }
141
142         [Test]
143         [Category("P1")]
144         [Description("Test TimeStamp property.")]
145         [Property("SPEC", "Tizen.NUI.Wheel.TimeStamp A")]
146         [Property("SPEC_URL", "-")]
147         [Property("CRITERIA", "PRW")]
148         [Property("AUTHOR", "guowei.wang@samsung.com")]
149         public void WheelTimeStamp()
150         {
151             tlog.Debug(tag, $"WheelTimeStamp START");
152             Wheel a1 = new Wheel();
153
154             uint b1 = a1.TimeStamp;
155             
156             tlog.Debug(tag, $"WheelTimeStamp END (OK)");
157             Assert.Pass("WheelTimeStamp");
158         }
159
160         [Test]
161         [Category("P1")]
162         [Description("Wheel IsShiftModifier")]
163         [Property("SPEC", "Tizen.NUI.Wheel.IsShiftModifier M")]
164         [Property("SPEC_URL", "-")]
165         [Property("CRITERIA", "MR")]
166         [Property("AUTHOR", "guowei.wang@samsung.com")]
167         public void WheelIsShiftModifier()
168         {
169             tlog.Debug(tag, $"WheelIsShiftModifier START");
170             Wheel a1 = new Wheel();
171             bool b1 = a1.IsShiftModifier();
172             
173             tlog.Debug(tag, $"WheelIsShiftModifier END (OK)");
174             Assert.Pass("WheelIsShiftModifier");
175         }
176
177         [Test]
178         [Category("P1")]
179         [Description("Wheel IsCtrlModifier")]
180         [Property("SPEC", "Tizen.NUI.Wheel.IsCtrlModifier M")]
181         [Property("SPEC_URL", "-")]
182         [Property("CRITERIA", "MR")]
183         [Property("AUTHOR", "guowei.wang@samsung.com")]
184         public void WheelIsCtrlModifier()
185         {
186             tlog.Debug(tag, $"WheelIsCtrlModifier START");
187             Wheel a1 = new Wheel();
188             bool b1 = a1.IsCtrlModifier();
189             
190             tlog.Debug(tag, $"WheelIsCtrlModifier END (OK)");
191             Assert.Pass("WheelIsCtrlModifier");
192         }
193
194         [Test]
195         [Category("P1")]
196         [Description("Wheel IsAltModifier")]
197         [Property("SPEC", "Tizen.NUI.Wheel.IsAltModifier M")]
198         [Property("SPEC_URL", "-")]
199         [Property("CRITERIA", "MR")]
200         [Property("AUTHOR", "guowei.wang@samsung.com")]
201         public void WheelIsAltModifier()
202         {
203             tlog.Debug(tag, $"WheelIsAltModifier START");
204             Wheel a1 = new Wheel();
205             bool b1 = a1.IsAltModifier();
206             
207             tlog.Debug(tag, $"WheelIsAltModifier END (OK)");
208             Assert.Pass("WheelIsAltModifier");
209         }
210
211         [Test]
212         [Category("P1")]
213         [Description("Wheel getCPtr")]
214         [Property("SPEC", "Tizen.NUI.Wheel.getCPtr M")]
215         [Property("SPEC_URL", "-")]
216         [Property("CRITERIA", "MR")]
217         [Property("AUTHOR", "guowei.wang@samsung.com")]
218         public void WheelgetCPtr()
219         {
220             tlog.Debug(tag, $"WheelgetCPtr START");
221             Wheel a1 = new Wheel();
222             global::System.Runtime.InteropServices.HandleRef b1 = Wheel.getCPtr(a1);
223             
224             tlog.Debug(tag, $"WheelgetCPtr END (OK)");
225             Assert.Pass("WheelgetCPtr");
226         }
227
228         [Test]
229         [Category("P1")]
230         [Description("Wheel GetWheelFromPtr")]
231         [Property("SPEC", "Tizen.NUI.Wheel.GetWheelFromPtr M")]
232         [Property("SPEC_URL", "-")]
233         [Property("CRITERIA", "MR")]
234         [Property("AUTHOR", "guowei.wang@samsung.com")]
235         public void WheelGetWheelFromPtr()
236         {
237             tlog.Debug(tag, $"WheelGetWheelFromPtr START");
238             Wheel a1 = new Wheel();
239
240             Wheel a2 = Wheel.GetWheelFromPtr(Wheel.getCPtr(a1).Handle);
241
242             a1.Dispose();
243             
244             tlog.Debug(tag, $"WheelGetWheelFromPtr END (OK)");
245             Assert.Pass("WheelGetWheelFromPtr");
246         }
247     }
248
249 }