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/TapGestureDetector")]
13 class PublicTapGestureDetectorTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("TapGestureDetector constructor")]
32 [Property("SPEC", "Tizen.NUI.TapGestureDetector.TapGestureDetector C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void TapGestureDetectorConstructor()
38 tlog.Debug(tag, $"TapGestureDetectorConstructor START");
40 var testingTarget = new TapGestureDetector();
41 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
42 Assert.IsInstanceOf<TapGestureDetector>(testingTarget, "Should be an instance of TapGestureDetector type.");
44 testingTarget.Dispose();
45 tlog.Debug(tag, $"TapGestureDetectorConstructor END (OK)");
46 Assert.Pass("TapGestureDetectorConstructor");
51 [Description("TapGestureDetector constructor")]
52 [Property("SPEC", "Tizen.NUI.TapGestureDetector.TapGestureDetector C")]
53 [Property("SPEC_URL", "-")]
54 [Property("CRITERIA", "CONSTR")]
55 [Property("AUTHOR", "guowei.wang@samsung.com")]
56 public void TapGestureDetectorConstructorWithTapsRequired()
58 tlog.Debug(tag, $"TapGestureDetectorConstructorWithTapsRequired START");
60 var testingTarget = new TapGestureDetector(4);
61 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
62 Assert.IsInstanceOf<TapGestureDetector>(testingTarget, "Should be an instance of TapGestureDetector type.");
64 testingTarget.Dispose();
65 tlog.Debug(tag, $"TapGestureDetectorConstructorWithTapsRequired END (OK)");
66 Assert.Pass("TapGestureDetectorConstructor");
71 [Description("TapGestureDetector constructor")]
72 [Property("SPEC", "Tizen.NUI.TapGestureDetector.TapGestureDetector C")]
73 [Property("SPEC_URL", "-")]
74 [Property("CRITERIA", "CONSTR")]
75 [Property("AUTHOR", "guowei.wang@samsung.com")]
76 public void TapGestureDetectorConstructorWithTapGestureDetector()
78 tlog.Debug(tag, $"TapGestureDetectorConstructorWithTapGestureDetector START");
80 using (TapGestureDetector detector = new TapGestureDetector(4))
82 var testingTarget = new TapGestureDetector(detector);
83 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
84 Assert.IsInstanceOf<TapGestureDetector>(testingTarget, "Should be an instance of TapGestureDetector type.");
86 testingTarget.Dispose();
89 tlog.Debug(tag, $"TapGestureDetectorConstructorWithTapGestureDetector END (OK)");
90 Assert.Pass("TapGestureDetectorConstructor");
95 [Description("TapGestureDetector Assign")]
96 [Property("SPEC", "Tizen.NUI.TapGestureDetector.Assign M")]
97 [Property("SPEC_URL", "-")]
98 [Property("CRITERIA", "MR")]
99 [Property("AUTHOR", "guowei.wang@samsung.com")]
100 public void TapGestureDetectorAssign()
102 tlog.Debug(tag, $"TapGestureDetectorAssign START");
104 using (TapGestureDetector detector = new TapGestureDetector(4))
106 var testingTarget = detector.Assign(detector);
107 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
108 Assert.IsInstanceOf<TapGestureDetector>(testingTarget, "Should be an instance of TapGestureDetector type.");
110 testingTarget.Dispose();
113 tlog.Debug(tag, $"TapGestureDetectorAssign END (OK)");
118 [Description("TapGestureDetector SetMinimumTapsRequired")]
119 [Property("SPEC", "Tizen.NUI.TapGestureDetector.SetMinimumTapsRequired M")]
120 [Property("SPEC_URL", "-")]
121 [Property("CRITERIA", "MR")]
122 [Property("AUTHOR", "guowei.wang@samsung.com")]
123 public void TapGestureDetectorSetMinimumTapsRequired()
125 tlog.Debug(tag, $"TapGestureDetectorSetMinimumTapsRequired START");
126 TapGestureDetector a1 = new TapGestureDetector();
127 a1.SetMinimumTapsRequired(2);
130 tlog.Debug(tag, $"TapGestureDetectorSetMinimumTapsRequired END (OK)");
131 Assert.Pass("TapGestureDetectorSetMinimumTapsRequired");
136 [Description("TapGestureDetector SetMaximumTapsRequired")]
137 [Property("SPEC", "Tizen.NUI.TapGestureDetector.SetMaximumTapsRequired M")]
138 [Property("SPEC_URL", "-")]
139 [Property("CRITERIA", "MR")]
140 [Property("AUTHOR", "guowei.wang@samsung.com")]
141 public void TapGestureDetectorSetMaximumTapsRequired()
143 tlog.Debug(tag, $"TapGestureDetectorSetMaximumTapsRequired START");
144 TapGestureDetector a1 = new TapGestureDetector();
145 a1.SetMaximumTapsRequired(9);
148 tlog.Debug(tag, $"TapGestureDetectorSetMaximumTapsRequired END (OK)");
149 Assert.Pass("TapGestureDetectorSetMaximumTapsRequired");
154 [Description("TapGestureDetector GetMinimumTapsRequired")]
155 [Property("SPEC", "Tizen.NUI.TapGestureDetector.GetMinimumTapsRequired M")]
156 [Property("SPEC_URL", "-")]
157 [Property("CRITERIA", "MR")]
158 [Property("AUTHOR", "guowei.wang@samsung.com")]
159 public void TapGestureDetectorGetMinimumTapsRequired()
161 tlog.Debug(tag, $"TapGestureDetectorGetMinimumTapsRequired START");
162 TapGestureDetector a1 = new TapGestureDetector();
163 a1.SetMinimumTapsRequired(2);
165 a1.GetMinimumTapsRequired();
168 tlog.Debug(tag, $"TapGestureDetectorGetMinimumTapsRequired END (OK)");
169 Assert.Pass("TapGestureDetectorGetMinimumTapsRequired");
174 [Description("TapGestureDetector GetMaximumTapsRequired")]
175 [Property("SPEC", "Tizen.NUI.TapGestureDetector.GetMaximumTapsRequired M")]
176 [Property("SPEC_URL", "-")]
177 [Property("CRITERIA", "MR")]
178 [Property("AUTHOR", "guowei.wang@samsung.com")]
179 public void TapGestureDetectorGetMaximumTapsRequired()
181 tlog.Debug(tag, $"TapGestureDetectorGetMaximumTapsRequired START");
182 TapGestureDetector a1 = new TapGestureDetector();
183 a1.SetMaximumTapsRequired(9);
185 a1.GetMaximumTapsRequired();
188 tlog.Debug(tag, $"TapGestureDetectorGetMaximumTapsRequired END (OK)");
189 Assert.Pass("TapGestureDetectorGetMaximumTapsRequired");
194 [Description("TapGestureDetector DownCast")]
195 [Property("SPEC", "Tizen.NUI.TapGestureDetector.DownCast M")]
196 [Property("SPEC_URL", "-")]
197 [Property("CRITERIA", "MR")]
198 [Property("AUTHOR", "guowei.wang@samsung.com")]
199 public void TapGestureDetectorDownCast()
201 tlog.Debug(tag, $"TapGestureDetectorDownCast START");
202 BaseHandle handle = new BaseHandle();
204 TapGestureDetector a1 = TapGestureDetector.DownCast(handle);
206 tlog.Debug(tag, $"TapGestureDetectorDownCast END (OK)");
207 Assert.Pass("TapGestureDetectorDownCast");
212 [Description("TapGestureDetector getCPtr")]
213 [Property("SPEC", "Tizen.NUI.TapGestureDetector.getCPtr M")]
214 [Property("SPEC_URL", "-")]
215 [Property("CRITERIA", "MR")]
216 [Property("AUTHOR", "guowei.wang@samsung.com")]
217 public void TapGestureDetectorgetCPtr()
219 tlog.Debug(tag, $"TapGestureDetectorgetCPtr START");
220 TapGestureDetector a1 = new TapGestureDetector();
221 global::System.Runtime.InteropServices.HandleRef p1 = TapGestureDetector.getCPtr(a1);
223 tlog.Debug(tag, $"TapGestureDetectorgetCPtr END (OK)");
224 Assert.Pass("TapGestureDetectorgetCPtr");
229 [Description("TapGestureDetector GetTapGestureDetectorFromPtr")]
230 [Property("SPEC", "Tizen.NUI.TapGestureDetector.GetTapGestureDetectorFromPtr M")]
231 [Property("SPEC_URL", "-")]
232 [Property("CRITERIA", "MR")]
233 [Property("AUTHOR", "guowei.wang@samsung.com")]
234 public void TapGestureDetectorGetTapGestureDetectorFromPtr()
236 tlog.Debug(tag, $"TapGestureDetectorGetTapGestureDetectorFromPtr START");
237 TapGestureDetector a1 = new TapGestureDetector();
239 TapGestureDetector a2 = TapGestureDetector.GetTapGestureDetectorFromPtr(TapGestureDetector.getCPtr(a1).Handle);
243 tlog.Debug(tag, $"TapGestureDetectorGetTapGestureDetectorFromPtr END (OK)");
244 Assert.Pass("TapGestureDetectorGetTapGestureDetectorFromPtr");
249 [Description("TapGestureDetector DetectedSignal")]
250 [Property("SPEC", "Tizen.NUI.TapGestureDetector.DetectedSignal M")]
251 [Property("SPEC_URL", "-")]
252 [Property("CRITERIA", "MR")]
253 [Property("AUTHOR", "guowei.wang@samsung.com")]
254 public void TapGestureDetectorDetectedSignal()
256 tlog.Debug(tag, $"TapGestureDetectorDetectedSignal START");
257 TapGestureDetector a1 = new TapGestureDetector();
258 TapGestureDetectedSignal b1 = a1.DetectedSignal();
260 tlog.Debug(tag, $"TapGestureDetectorDetectedSignal END (OK)");
261 Assert.Pass("TapGestureDetectorDetectedSignal");
266 [Description("Test Detected property.")]
267 [Property("SPEC", "Tizen.NUI.TapGestureDetector.Detected A")]
268 [Property("SPEC_URL", "-")]
269 [Property("CRITERIA", "PRW")]
270 [Property("AUTHOR", "guowei.wang@samsung.com")]
271 public void TapGestureDetectorDetected()
273 tlog.Debug(tag, $"TapGestureDetectorDetected START");
274 TapGestureDetector a1 = new TapGestureDetector();
276 a1.Detected += OnDetected;
277 a1.Detected -= OnDetected;
280 tlog.Debug(tag, $"TapGestureDetectorDetected END (OK)");
281 Assert.Pass("TapGestureDetectorDetected");
284 private void OnDetected(object obj, TapGestureDetector.DetectedEventArgs e)