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/LongPressGestureDetector")]
13 internal class PublicLongPressGestureDetectorTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
32 [Description("Create a LongPressGestureDetector object. Check whether LongPressGestureDetector is successfully created or not.")]
33 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.LongPressGestureDetector C")]
34 [Property("SPEC_URL", "-")]
35 [Property("CRITERIA", "CONSTR")]
36 [Property("COVPARAM", "")]
37 [Property("AUTHOR", "guowei.wang@samsung.com")]
38 public void LongPressGestureDetectorConstructor()
40 tlog.Debug(tag, $"LongPressGestureDetectorConstructor START");
41 LongPressGestureDetector a1 = new LongPressGestureDetector();
42 LongPressGestureDetector a2 = new LongPressGestureDetector(7);
43 LongPressGestureDetector a3 = new LongPressGestureDetector(3, 7);
44 LongPressGestureDetector a4 = new LongPressGestureDetector(a3);
50 tlog.Debug(tag, $"LongPressGestureDetectorConstructor END (OK)");
51 Assert.Pass("LongPressGestureDetectorConstructor");
56 [Description("LongPressGestureDetector SetTouchesRequired")]
57 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.SetTouchesRequired M")]
58 [Property("SPEC_URL", "-")]
59 [Property("CRITERIA", "MR")]
60 [Property("AUTHOR", "guowei.wang@samsung.com")]
61 public void LongPressGestureDetectorSetTouchesRequired()
63 tlog.Debug(tag, $"LongPressGestureDetectorSetTouchesRequired START");
64 LongPressGestureDetector a1 = new LongPressGestureDetector(7);
66 a1.SetTouchesRequired(3);
67 a1.SetTouchesRequired(1, 5);
71 tlog.Debug(tag, $"LongPressGestureDetectorSetTouchesRequired END (OK)");
72 Assert.Pass("SetTouchesRequired");
77 [Description("LongPressGestureDetector GetMinimumTouchesRequired")]
78 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.GetMinimumTouchesRequired M")]
79 [Property("SPEC_URL", "-")]
80 [Property("CRITERIA", "MR")]
81 [Property("AUTHOR", "guowei.wang@samsung.com")]
82 public void LongPressGestureDetectorGetMinimumTouchesRequired()
84 tlog.Debug(tag, $"LongPressGestureDetectorGetMinimumTouchesRequired START");
85 LongPressGestureDetector a1 = new LongPressGestureDetector(3, 7);
86 uint b1 = a1.GetMinimumTouchesRequired();
90 tlog.Debug(tag, $"LongPressGestureDetectorGetMinimumTouchesRequired END (OK)");
91 Assert.Pass("GetMinimumTouchesRequired");
96 [Description("LongPressGestureDetector GetMaximumTouchesRequired")]
97 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.GetMaximumTouchesRequired M")]
98 [Property("SPEC_URL", "-")]
99 [Property("CRITERIA", "MR")]
100 [Property("AUTHOR", "guowei.wang@samsung.com")]
101 public void LongPressGestureDetectorGetMaximumTouchesRequired()
103 tlog.Debug(tag, $"LongPressGestureDetectorGetMaximumTouchesRequired START");
104 LongPressGestureDetector a1 = new LongPressGestureDetector(3, 7);
105 uint b1 = a1.GetMaximumTouchesRequired();
109 tlog.Debug(tag, $"LongPressGestureDetectorGetMaximumTouchesRequired END (OK)");
110 Assert.Pass("GetMaximumTouchesRequired");
115 [Description("LongPressGestureDetector GetLongPressGestureDetectorFromPtr")]
116 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.GetLongPressGestureDetectorFromPtr M")]
117 [Property("SPEC_URL", "-")]
118 [Property("CRITERIA", "MR")]
119 [Property("AUTHOR", "guowei.wang@samsung.com")]
120 public void LongPressGestureDetectorGetLongPressGestureDetectorFromPtr()
122 tlog.Debug(tag, $"LongPressGestureDetectorGetLongPressGestureDetectorFromPtr START");
123 LongPressGestureDetector a1 = new LongPressGestureDetector();
124 LongPressGestureDetector a2 = LongPressGestureDetector.GetLongPressGestureDetectorFromPtr(LongPressGestureDetector.getCPtr(a1).Handle);
128 tlog.Debug(tag, $"LongPressGestureDetectorGetLongPressGestureDetectorFromPtr END (OK)");
129 Assert.Pass("GetLongPressGestureDetectorFromPtr");
134 [Description("LongPressGestureDetector DownCast")]
135 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.DownCast M")]
136 [Property("SPEC_URL", "-")]
137 [Property("CRITERIA", "MR")]
138 [Property("AUTHOR", "guowei.wang@samsung.com")]
139 public void LongPressGestureDetectorDownCast()
141 tlog.Debug(tag, $"LongPressGestureDetectorDownCast START");
142 BaseHandle handle = new BaseHandle();
143 LongPressGestureDetector a1 = LongPressGestureDetector.DownCast(handle);
145 tlog.Debug(tag, $"LongPressGestureDetectorDownCast END (OK)");
146 Assert.Pass("LongPressGestureDetectorDownCast");
151 [Description("LongPressGestureDetector DetectedSignal")]
152 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.DetectedSignal M")]
153 [Property("SPEC_URL", "-")]
154 [Property("CRITERIA", "MR")]
155 [Property("AUTHOR", "guowei.wang@samsung.com")]
156 public void LongPressGestureDetectorDetectedSignal()
158 tlog.Debug(tag, $"LongPressGestureDetectorDetectedSignal START");
159 LongPressGestureDetector a1 = new LongPressGestureDetector();
160 LongPressGestureDetectedSignal b1 = a1.DetectedSignal();
164 tlog.Debug(tag, $"LongPressGestureDetectorDetectedSignal END (OK)");
165 Assert.Pass("LongPressGestureDetectorDetectedSignal");
170 [Description("LongPressGestureDetector getCPtr")]
171 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.getCPtr M")]
172 [Property("SPEC_URL", "-")]
173 [Property("CRITERIA", "MR")]
174 [Property("AUTHOR", "guowei.wang@samsung.com")]
175 public void LongPressGestureDetectorgetCPtr()
177 tlog.Debug(tag, $"LongPressGestureDetectorgetCPtr START");
178 LongPressGestureDetector a1 = new LongPressGestureDetector();
179 global::System.Runtime.InteropServices.HandleRef c1 = LongPressGestureDetector.getCPtr(a1);
184 tlog.Debug(tag, $"LongPressGestureDetectorgetCPtr END (OK)");
185 Assert.Pass("LongPressGestureDetectorgetCPtr");
190 [Description("Test Detected property.")]
191 [Property("SPEC", "Tizen.NUI.LongPressGestureDetector.Detected A")]
192 [Property("SPEC_URL", "-")]
193 [Property("CRITERIA", "PRW")]
194 [Property("AUTHOR", "guowei.wang@samsung.com")]
195 public void LongPressGestureDetectorDetected()
197 tlog.Debug(tag, $"LongPressGestureDetectorDetected START");
198 LongPressGestureDetector a1 = new LongPressGestureDetector();
200 a1.Detected += OnDetected;
201 a1.Detected -= OnDetected;
203 LongPressGestureDetector.DetectedEventArgs e = new LongPressGestureDetector.DetectedEventArgs();
204 object o = new object();
210 tlog.Debug(tag, $"LongPressGestureDetectorDetected END (OK)");
211 Assert.Pass("LongPressGestureDetectorDetected");
214 private void OnDetected(object obj, LongPressGestureDetector.DetectedEventArgs e)
219 LongPressGesture p1 = e.LongPressGesture;
220 e.LongPressGesture = p1;