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/GestureDetector")]
13 class PublicGestureDetectorTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("GestureDetector constructor")]
32 [Property("SPEC", "Tizen.NUI.GestureDetector.GestureDetector C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void GestureDetectorConstructor()
38 tlog.Debug(tag, $"GestureDetectorConstructor START");
40 GestureDetector ret = new GestureDetector();
41 Assert.IsNotNull(ret, "should be not null");
42 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
44 GestureDetector newOne = new GestureDetector(ret);
45 Assert.IsNotNull(newOne, "should be not null");
46 Assert.IsInstanceOf<GestureDetector>(newOne, "should be an instance of testing target class!");
48 GestureDetector newTwo = new GestureDetector(GestureDetector.getCPtr(ret).Handle, true);
49 Assert.IsNotNull(newTwo, "should be not null");
50 Assert.IsInstanceOf<GestureDetector>(newTwo, "should be an instance of testing target class!");
55 tlog.Debug(tag, $"GestureDetectorConstructor END (OK)");
56 Assert.Pass("GestureDetectorConstructor");
61 [Description("GestureDetector Attach")]
62 [Property("SPEC", "Tizen.NUI.GestureDetector.Attach M")]
63 [Property("SPEC_URL", "-")]
64 [Property("CRITERIA", "MR")]
65 [Property("AUTHOR", "guowei.wang@samsung.com")]
66 public void GestureDetectorAttach()
68 tlog.Debug(tag, $"GestureDetectorAttach START");
70 LongPressGestureDetector ret = new LongPressGestureDetector();
71 Assert.IsNotNull(ret, "should be not null");
72 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
74 View view = new View();
80 tlog.Debug(tag, $"GestureDetectorAttach END (OK)");
81 Assert.Pass("GestureDetectorAttach");
86 [Description("GestureDetector Detach")]
87 [Property("SPEC", "Tizen.NUI.GestureDetector.Detach M")]
88 [Property("SPEC_URL", "-")]
89 [Property("CRITERIA", "MR")]
90 [Property("AUTHOR", "guowei.wang@samsung.com")]
91 public void GestureDetectorDetach()
93 tlog.Debug(tag, $"GestureDetectorDetach START");
94 LongPressGestureDetector ret = new LongPressGestureDetector();
96 Assert.IsNotNull(ret, "should be not null");
97 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
99 View view = new View();
105 tlog.Debug(tag, $"GestureDetectorDetach END (OK)");
106 Assert.Pass("GestureDetectorDetach");
111 [Description("GestureDetector DetachAll")]
112 [Property("SPEC", "Tizen.NUI.GestureDetector.DetachAll M")]
113 [Property("SPEC_URL", "-")]
114 [Property("CRITERIA", "MR")]
115 [Property("AUTHOR", "guowei.wang@samsung.com")]
116 public void GestureDetectorDetachAll()
118 tlog.Debug(tag, $"GestureDetectorDetachAll START");
119 LongPressGestureDetector ret = new LongPressGestureDetector();
120 Assert.IsNotNull(ret, "should be not null");
121 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
123 View view = new View();
129 tlog.Debug(tag, $"GestureDetectorDetachAll END (OK)");
130 Assert.Pass("GestureDetectorDetachAll");
135 [Description("GestureDetector GetAttachedViewCount")]
136 [Property("SPEC", "Tizen.NUI.GestureDetector.GetAttachedViewCount M")]
137 [Property("SPEC_URL", "-")]
138 [Property("CRITERIA", "MR")]
139 [Property("AUTHOR", "guowei.wang@samsung.com")]
140 public void GestureDetectorGetAttachedViewCount()
142 tlog.Debug(tag, $"GestureDetectorGetAttachedViewCount START");
143 LongPressGestureDetector ret = new LongPressGestureDetector();
144 Assert.IsNotNull(ret, "should be not null");
145 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
147 View view = new View();
150 ret.GetAttachedViewCount();
155 tlog.Debug(tag, $"GestureDetectorGetAttachedViewCount END (OK)");
156 Assert.Pass("GestureDetectorGetAttachedViewCount");
161 [Description("GestureDetector GetAttachedView")]
162 [Property("SPEC", "Tizen.NUI.GestureDetector.GetAttachedView M")]
163 [Property("SPEC_URL", "-")]
164 [Property("CRITERIA", "MR")]
165 [Property("AUTHOR", "guowei.wang@samsung.com")]
166 public void GestureDetectorGetAttachedView()
168 tlog.Debug(tag, $"GestureDetectorGetAttachedView START");
169 LongPressGestureDetector ret = new LongPressGestureDetector();
170 Assert.IsNotNull(ret, "should be not null");
171 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
173 View view = new View();
176 ret.GetAttachedView(0);
181 tlog.Debug(tag, $"GestureDetectorGetAttachedView END (OK)");
182 Assert.Pass("GestureDetectorGetAttachedView");
187 [Description("GestureDetector Assign")]
188 [Property("SPEC", "Tizen.NUI.GestureDetector.Assign M")]
189 [Property("SPEC_URL", "-")]
190 [Property("CRITERIA", "MR")]
191 [Property("AUTHOR", "guowei.wang@samsung.com")]
192 public void GestureDetectorAssign()
194 tlog.Debug(tag, $"GestureDetectorAssign START");
195 GestureDetector ret = new GestureDetector();
196 GestureDetector newOne = new GestureDetector();
201 tlog.Debug(tag, $"GestureDetectorAssign END (OK)");
202 Assert.Pass("GestureDetectorAssign");
207 [Description("GestureDetector DownCast")]
208 [Property("SPEC", "Tizen.NUI.GestureDetector.DownCast M")]
209 [Property("SPEC_URL", "-")]
210 [Property("CRITERIA", "MR")]
211 [Property("AUTHOR", "guowei.wang@samsung.com")]
212 public void GestureDetectorDownCast()
214 tlog.Debug(tag, $"GestureDetectorDownCast START");
215 BaseHandle handle = new BaseHandle();
216 GestureDetector ret = GestureDetector.DownCast(handle);
218 Assert.IsNotNull(ret, "should be not null");
219 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
220 tlog.Debug(tag, $"GestureDetectorDownCast END (OK)");
221 Assert.Pass("GestureDetectorDownCast");
226 [Description("GestureDetector getCPtr")]
227 [Property("SPEC", "Tizen.NUI.GestureDetector.getCPtr M")]
228 [Property("SPEC_URL", "-")]
229 [Property("CRITERIA", "MR")]
230 [Property("AUTHOR", "guowei.wang@samsung.com")]
231 public void GestureDetectorgetCPtr()
233 tlog.Debug(tag, $"GestureDetectorgetCPtr START");
234 GestureDetector ret = new GestureDetector();
235 Assert.IsNotNull(ret, "should be not null");
236 Assert.IsInstanceOf<GestureDetector>(ret, "should be an instance of testing target class!");
238 global::System.Runtime.InteropServices.HandleRef ptr = GestureDetector.getCPtr(ret);
240 GestureDetector newOne = null;
241 ptr = GestureDetector.getCPtr(newOne);
245 tlog.Debug(tag, $"GestureDetectorgetCPtr END (OK)");
246 Assert.Pass("GestureDetectorgetCPtr");