1 using NUnit.Framework;
2 using NUnit.Framework.TUnit;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("public/Events/Wheel")]
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
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()
38 tlog.Debug(tag, $"WheelConstructor START");
40 var testingTarget = new Wheel();
41 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
42 Assert.IsInstanceOf<Wheel>(testingTarget, "Should be an instance of Wheel type.");
44 testingTarget.Dispose();
45 tlog.Debug(tag, $"WheelConstructor END (OK)");
46 Assert.Pass("WheelConstructor");
51 [Description("Wheel constructor")]
52 [Property("SPEC", "Tizen.NUI.Wheel.Wheel C")]
53 [Property("SPEC_URL", "-")]
54 [Property("CRITERIA", "CONSTR")]
55 [Property("AUTHOR", "guowei.wang@samsung.com")]
56 public void WheelConstructorWithWheelType()
58 tlog.Debug(tag, $"WheelConstructorWithWheelType START");
60 using (Vector2 vector = new Vector2(0.0f, 0.0f))
62 var testingTarget = new Wheel(Wheel.WheelType.MouseWheel, 0, 0, vector, 0, 123);
63 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
64 Assert.IsInstanceOf<Wheel>(testingTarget, "Should be an instance of Wheel type.");
66 testingTarget.Dispose();
69 tlog.Debug(tag, $"WheelConstructorWithWheelType END (OK)");
70 Assert.Pass("WheelConstructor");
75 [Description("Test Type property.")]
76 [Property("SPEC", "Tizen.NUI.Wheel.Type A")]
77 [Property("SPEC_URL", "-")]
78 [Property("CRITERIA", "PRW")]
79 [Property("AUTHOR", "guowei.wang@samsung.com")]
80 public void WheelType()
82 tlog.Debug(tag, $"WheelType START");
83 Wheel a1 = new Wheel();
85 Wheel.WheelType b1 = a1.Type;
87 tlog.Debug(tag, $"WheelType END (OK)");
88 Assert.Pass("WheelType");
93 [Description("Test Direction property.")]
94 [Property("SPEC", "Tizen.NUI.Wheel.Direction A")]
95 [Property("SPEC_URL", "-")]
96 [Property("CRITERIA", "PRW")]
97 [Property("AUTHOR", "guowei.wang@samsung.com")]
98 public void WheelDirection()
100 tlog.Debug(tag, $"WheelDirection START");
101 Wheel a1 = new Wheel();
103 int b1 = a1.Direction;
105 tlog.Debug(tag, $"WheelDirection END (OK)");
106 Assert.Pass("WheelDirection");
111 [Description("Test Modifiers property.")]
112 [Property("SPEC", "Tizen.NUI.Wheel.Modifiers A")]
113 [Property("SPEC_URL", "-")]
114 [Property("CRITERIA", "PRW")]
115 [Property("AUTHOR", "guowei.wang@samsung.com")]
116 public void WheelModifiers()
118 tlog.Debug(tag, $"WheelModifiers START");
119 Wheel a1 = new Wheel();
121 uint b1 = a1.Modifiers;
123 tlog.Debug(tag, $"WheelModifiers END (OK)");
124 Assert.Pass("WheelModifiers");
129 [Description("Test Point property.")]
130 [Property("SPEC", "Tizen.NUI.Wheel.Point A")]
131 [Property("SPEC_URL", "-")]
132 [Property("CRITERIA", "PRW")]
133 [Property("AUTHOR", "guowei.wang@samsung.com")]
134 public void WheelPoint()
136 tlog.Debug(tag, $"WheelPoint START");
137 Wheel a1 = new Wheel();
139 Vector2 v1 = a1.Point;
141 tlog.Debug(tag, $"WheelPoint END (OK)");
142 Assert.Pass("WheelPoint");
147 [Description("Test Z property.")]
148 [Property("SPEC", "Tizen.NUI.Wheel.Z A")]
149 [Property("SPEC_URL", "-")]
150 [Property("CRITERIA", "PRW")]
151 [Property("AUTHOR", "guowei.wang@samsung.com")]
154 tlog.Debug(tag, $"WheelZ START");
155 Wheel a1 = new Wheel();
159 tlog.Debug(tag, $"WheelZ END (OK)");
160 Assert.Pass("WheelZ");
165 [Description("Test TimeStamp property.")]
166 [Property("SPEC", "Tizen.NUI.Wheel.TimeStamp A")]
167 [Property("SPEC_URL", "-")]
168 [Property("CRITERIA", "PRW")]
169 [Property("AUTHOR", "guowei.wang@samsung.com")]
170 public void WheelTimeStamp()
172 tlog.Debug(tag, $"WheelTimeStamp START");
173 Wheel a1 = new Wheel();
175 uint b1 = a1.TimeStamp;
177 tlog.Debug(tag, $"WheelTimeStamp END (OK)");
178 Assert.Pass("WheelTimeStamp");
183 [Description("Wheel IsShiftModifier")]
184 [Property("SPEC", "Tizen.NUI.Wheel.IsShiftModifier M")]
185 [Property("SPEC_URL", "-")]
186 [Property("CRITERIA", "MR")]
187 [Property("AUTHOR", "guowei.wang@samsung.com")]
188 public void WheelIsShiftModifier()
190 tlog.Debug(tag, $"WheelIsShiftModifier START");
191 Wheel a1 = new Wheel();
192 bool b1 = a1.IsShiftModifier();
194 tlog.Debug(tag, $"WheelIsShiftModifier END (OK)");
195 Assert.Pass("WheelIsShiftModifier");
200 [Description("Wheel IsCtrlModifier")]
201 [Property("SPEC", "Tizen.NUI.Wheel.IsCtrlModifier M")]
202 [Property("SPEC_URL", "-")]
203 [Property("CRITERIA", "MR")]
204 [Property("AUTHOR", "guowei.wang@samsung.com")]
205 public void WheelIsCtrlModifier()
207 tlog.Debug(tag, $"WheelIsCtrlModifier START");
208 Wheel a1 = new Wheel();
209 bool b1 = a1.IsCtrlModifier();
211 tlog.Debug(tag, $"WheelIsCtrlModifier END (OK)");
212 Assert.Pass("WheelIsCtrlModifier");
217 [Description("Wheel IsAltModifier")]
218 [Property("SPEC", "Tizen.NUI.Wheel.IsAltModifier M")]
219 [Property("SPEC_URL", "-")]
220 [Property("CRITERIA", "MR")]
221 [Property("AUTHOR", "guowei.wang@samsung.com")]
222 public void WheelIsAltModifier()
224 tlog.Debug(tag, $"WheelIsAltModifier START");
225 Wheel a1 = new Wheel();
226 bool b1 = a1.IsAltModifier();
228 tlog.Debug(tag, $"WheelIsAltModifier END (OK)");
229 Assert.Pass("WheelIsAltModifier");
234 [Description("Wheel getCPtr")]
235 [Property("SPEC", "Tizen.NUI.Wheel.getCPtr M")]
236 [Property("SPEC_URL", "-")]
237 [Property("CRITERIA", "MR")]
238 [Property("AUTHOR", "guowei.wang@samsung.com")]
239 public void WheelgetCPtr()
241 tlog.Debug(tag, $"WheelgetCPtr START");
242 Wheel a1 = new Wheel();
243 global::System.Runtime.InteropServices.HandleRef b1 = Wheel.getCPtr(a1);
245 tlog.Debug(tag, $"WheelgetCPtr END (OK)");
246 Assert.Pass("WheelgetCPtr");
251 [Description("Wheel GetWheelFromPtr")]
252 [Property("SPEC", "Tizen.NUI.Wheel.GetWheelFromPtr M")]
253 [Property("SPEC_URL", "-")]
254 [Property("CRITERIA", "MR")]
255 [Property("AUTHOR", "guowei.wang@samsung.com")]
256 public void WheelGetWheelFromPtr()
258 tlog.Debug(tag, $"WheelGetWheelFromPtr START");
259 Wheel a1 = new Wheel();
261 Wheel a2 = Wheel.GetWheelFromPtr(Wheel.getCPtr(a1).Handle);
265 tlog.Debug(tag, $"WheelGetWheelFromPtr END (OK)");
266 Assert.Pass("WheelGetWheelFromPtr");