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/PanGesture")]
13 public class PublicPanGestureTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("Create a PanGesture object.")]
32 [Property("SPEC", "Tizen.NUI.PanGesture.PanGesture C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("COVPARAM", "")]
36 [Property("AUTHOR", "guowei.wang@samsung.com")]
37 public void PanGestureConstructor()
39 tlog.Debug(tag, $"PanGestureConstructor START");
40 PanGesture a1 = new PanGesture();
42 Gesture.StateType state = Gesture.StateType.Finished;
43 PanGesture a2 = new PanGesture(state);
47 tlog.Debug(tag, $"PanGestureConstructor END (OK)");
48 Assert.Pass("PanGestureConstructor");
53 [Description("Test Velocity property.")]
54 [Property("SPEC", "Tizen.NUI.PanGesture.Velocity A")]
55 [Property("SPEC_URL", "-")]
56 [Property("CRITERIA", "PRW")]
57 [Property("AUTHOR", "guowei.wang@samsung.com")]
58 public void PanGestureVelocity()
60 tlog.Debug(tag, $"PanGestureVelocity START");
61 PanGesture a1 = new PanGesture();
62 Vector2 v1 = a1.Velocity;
66 tlog.Debug(tag, $"PanGestureVelocity END (OK)");
67 Assert.Pass("PanGestureVelocity");
72 [Description("Test Displacement property.")]
73 [Property("SPEC", "Tizen.NUI.PanGesture.Displacement A")]
74 [Property("SPEC_URL", "-")]
75 [Property("CRITERIA", "PRW")]
76 [Property("AUTHOR", "guowei.wang@samsung.com")]
77 public void PanGestureDisplacement()
79 tlog.Debug(tag, $"PanGestureDisplacement START");
80 PanGesture a1 = new PanGesture();
81 Vector2 v1 = a1.Displacement;
85 tlog.Debug(tag, $"PanGestureDisplacement END (OK)");
86 Assert.Pass("PanGestureDisplacement");
91 [Description("Test Position property.")]
92 [Property("SPEC", "Tizen.NUI.PanGesture.Position A")]
93 [Property("SPEC_URL", "-")]
94 [Property("CRITERIA", "PRW")]
95 [Property("AUTHOR", "guowei.wang@samsung.com")]
96 public void PanGesturePosition()
98 tlog.Debug(tag, $"PanGesturePosition START");
99 PanGesture a1 = new PanGesture();
100 Vector2 v1 = a1.Position;
104 tlog.Debug(tag, $"PanGesturePosition END (OK)");
105 Assert.Pass("PanGesturePosition");
110 [Description("Test ScreenVelocity property.")]
111 [Property("SPEC", "Tizen.NUI.PanGesture.ScreenVelocity A")]
112 [Property("SPEC_URL", "-")]
113 [Property("CRITERIA", "PRW")]
114 [Property("AUTHOR", "guowei.wang@samsung.com")]
115 public void PanGestureScreenVelocity()
117 tlog.Debug(tag, $"PanGestureScreenVelocity START");
118 PanGesture a1 = new PanGesture();
119 Vector2 v1 = a1.ScreenVelocity;
123 tlog.Debug(tag, $"PanGestureScreenVelocity END (OK)");
124 Assert.Pass("PanGestureScreenVelocity");
129 [Description("Test ScreenDisplacement property.")]
130 [Property("SPEC", "Tizen.NUI.PanGesture.ScreenDisplacement A")]
131 [Property("SPEC_URL", "-")]
132 [Property("CRITERIA", "PRW")]
133 [Property("AUTHOR", "guowei.wang@samsung.com")]
134 public void PanGestureScreenDisplacement()
136 tlog.Debug(tag, $"PanGestureScreenDisplacement START");
137 PanGesture a1 = new PanGesture();
138 Vector2 v1 = a1.ScreenDisplacement;
142 tlog.Debug(tag, $"PanGestureScreenDisplacement END (OK)");
143 Assert.Pass("PanGestureScreenDisplacement");
148 [Description("Test ScreenPosition property.")]
149 [Property("SPEC", "Tizen.NUI.PanGesture.ScreenPosition A")]
150 [Property("SPEC_URL", "-")]
151 [Property("CRITERIA", "PRW")]
152 [Property("AUTHOR", "guowei.wang@samsung.com")]
153 public void PanGestureScreenPosition()
155 tlog.Debug(tag, $"PanGestureScreenPosition START");
156 PanGesture a1 = new PanGesture();
157 Vector2 v1 = a1.ScreenPosition;
161 tlog.Debug(tag, $"PanGestureScreenPosition END (OK)");
162 Assert.Pass("PanGestureScreenPosition");
167 [Description("Test NumberOfTouches property.")]
168 [Property("SPEC", "Tizen.NUI.PanGesture.NumberOfTouches A")]
169 [Property("SPEC_URL", "-")]
170 [Property("CRITERIA", "PRW")]
171 [Property("AUTHOR", "guowei.wang@samsung.com")]
172 public void PanGestureNumberOfTouches()
174 tlog.Debug(tag, $"PanGestureNumberOfTouches START");
175 PanGesture a1 = new PanGesture();
176 uint b1 = a1.NumberOfTouches;
180 tlog.Debug(tag, $"PanGestureNumberOfTouches END (OK)");
181 Assert.Pass("PanGestureNumberOfTouches");
186 [Description("Test GetSpeed property.")]
187 [Property("SPEC", "Tizen.NUI.PanGesture.GetSpeed M")]
188 [Property("SPEC_URL", "-")]
189 [Property("CRITERIA", "MR")]
190 [Property("AUTHOR", "guowei.wang@samsung.com")]
191 public void PanGestureGetSpeed()
193 tlog.Debug(tag, $"PanGestureGetSpeed START");
194 PanGesture a1 = new PanGesture();
195 float f1 = a1.GetSpeed();
199 tlog.Debug(tag, $"PanGestureGetSpeed END (OK)");
200 Assert.Pass("PanGestureGetSpeed");
205 [Description("Test GetDistance property.")]
206 [Property("SPEC", "Tizen.NUI.PanGesture.GetDistance M")]
207 [Property("SPEC_URL", "-")]
208 [Property("CRITERIA", "MR")]
209 [Property("AUTHOR", "guowei.wang@samsung.com")]
210 public void PanGestureGetDistance()
212 tlog.Debug(tag, $"PanGestureGetDistance START");
213 PanGesture a1 = new PanGesture();
214 float f1 = a1.GetDistance();
218 tlog.Debug(tag, $"PanGestureGetDistance END (OK)");
219 Assert.Pass("PanGestureGetDistance");
224 [Description("Test GetScreenSpeed property.")]
225 [Property("SPEC", "Tizen.NUI.PanGesture.GetScreenSpeed M")]
226 [Property("SPEC_URL", "-")]
227 [Property("CRITERIA", "MR")]
228 [Property("AUTHOR", "guowei.wang@samsung.com")]
229 public void PanGestureGetScreenSpeed()
231 tlog.Debug(tag, $"PanGestureGetScreenSpeed START");
232 PanGesture a1 = new PanGesture();
233 float f1 = a1.GetScreenSpeed();
237 tlog.Debug(tag, $"PanGestureGetScreenSpeed END (OK)");
238 Assert.Pass("PanGestureGetScreenSpeed");
243 [Description("Test GetScreenDistance property.")]
244 [Property("SPEC", "Tizen.NUI.PanGesture.GetScreenDistance M")]
245 [Property("SPEC_URL", "-")]
246 [Property("CRITERIA", "MR")]
247 [Property("AUTHOR", "guowei.wang@samsung.com")]
248 public void PanGestureGetScreenDistance()
250 tlog.Debug(tag, $"PanGestureGetScreenDistance START");
251 PanGesture a1 = new PanGesture();
252 float f1 = a1.GetScreenDistance();
256 tlog.Debug(tag, $"PanGestureGetScreenDistance END (OK)");
257 Assert.Pass("PanGestureGetScreenDistance");
262 [Description("Test getCPtr property.")]
263 [Property("SPEC", "Tizen.NUI.PanGesture.getCPtr M")]
264 [Property("SPEC_URL", "-")]
265 [Property("CRITERIA", "MR")]
266 [Property("AUTHOR", "guowei.wang@samsung.com")]
267 public void PanGesturegetCPtr()
269 tlog.Debug(tag, $"PanGesturegetCPtr START");
270 PanGesture a1 = new PanGesture();
271 global::System.Runtime.InteropServices.HandleRef ptr = PanGesture.getCPtr(a1);
275 tlog.Debug(tag, $"PanGesturegetCPtr END (OK)");
276 Assert.Pass("PanGestureCPtr");
281 [Description("Test GetPanGestureFromPtr property.")]
282 [Property("SPEC", "Tizen.NUI.PanGesture.GetPanGestureFromPtr M")]
283 [Property("SPEC_URL", "-")]
284 [Property("CRITERIA", "MR")]
285 [Property("AUTHOR", "guowei.wang@samsung.com")]
286 public void PanGestureGetPanGestureFromPtr()
288 tlog.Debug(tag, $"PanGestureGetPanGestureFromPtr START");
289 PanGesture a1 = new PanGesture();
290 PanGesture a2 = PanGesture.GetPanGestureFromPtr(PanGesture.getCPtr(a1).Handle);
292 tlog.Debug(tag, $"PanGestureGetPanGestureFromPtr END (OK)");
293 Assert.Pass("PanGestureGetPanGestureFromPtr");