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/RotationGestureDetector")]
13 class PublicRotationGestureDetectorTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("RotationGestureDetector constructor")]
32 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.RotationGestureDetector C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void RotationGestureDetectorConstructor()
38 tlog.Debug(tag, $"RotationGestureDetectorConstructor START");
39 RotationGestureDetector a1 = new RotationGestureDetector();
42 tlog.Debug(tag, $"RotationGestureDetectorConstructor END (OK)");
43 Assert.Pass("RotationGestureDetectorConstructor");
48 [Description("RotationGestureDetector constructor")]
49 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.RotationGestureDetector C")]
50 [Property("SPEC_URL", "-")]
51 [Property("CRITERIA", "CONSTR")]
52 [Property("AUTHOR", "guowei.wang@samsung.com")]
53 public void RotationGestureDetectorConstructorWithRotationGestureDetector()
55 tlog.Debug(tag, $"RotationGestureDetectorConstructorWithRotationGestureDetector START");
57 using (RotationGestureDetector detector = new RotationGestureDetector())
59 var testingTarget = new RotationGestureDetector(detector);
60 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
61 Assert.IsInstanceOf<RotationGestureDetector>(testingTarget, "Should be an instance of RotationGestureDetector type.");
63 testingTarget.Dispose();
66 tlog.Debug(tag, $"RotationGestureDetectorConstructorWithRotationGestureDetector END (OK)");
67 Assert.Pass("RotationGestureDetectorConstructor");
72 [Description("RotationGestureDetector GetRotationGestureDetectorFromPtr")]
73 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.GetRotationGestureDetectorFromPtr M")]
74 [Property("SPEC_URL", "-")]
75 [Property("CRITERIA", "MR")]
76 [Property("AUTHOR", "guowei.wang@samsung.com")]
77 public void RotationGestureDetectorGetRotationGestureDetectorFromPtr()
79 tlog.Debug(tag, $"RotationGestureDetectorGetRotationGestureDetectorFromPtr START");
80 RotationGestureDetector a1 = new RotationGestureDetector();
82 RotationGestureDetector a2 = RotationGestureDetector.GetRotationGestureDetectorFromPtr(RotationGestureDetector.getCPtr(a1).Handle);
85 tlog.Debug(tag, $"RotationGestureDetectorGetRotationGestureDetectorFromPtr END (OK)");
86 Assert.Pass("RotationGestureDetectorGetRotationGestureDetectorFromPtr");
91 [Description("RotationGestureDetector DownCast")]
92 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.DownCast M")]
93 [Property("SPEC_URL", "-")]
94 [Property("CRITERIA", "MR")]
95 [Property("AUTHOR", "guowei.wang@samsung.com")]
96 public void RotationGestureDetectorDownCast()
98 tlog.Debug(tag, $"RotationGestureDetectorDownCast START");
100 using (RotationGestureDetector detector = new RotationGestureDetector())
102 var testingTarget = RotationGestureDetector.DownCast(detector);
103 Assert.IsNotNull(testingTarget, "Can't create success object RotationGestureDetector");
104 Assert.IsInstanceOf<RotationGestureDetector>(testingTarget, "Should be an instance of RotationGestureDetector type.");
106 testingTarget.Dispose();
109 tlog.Debug(tag, $"RotationGestureDetectorDownCast END (OK)");
114 [Description("RotationGestureDetector getCPtr")]
115 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.getCPtr M")]
116 [Property("SPEC_URL", "-")]
117 [Property("CRITERIA", "MR")]
118 [Property("AUTHOR", "guowei.wang@samsung.com")]
119 public void RotationGestureDetectorgetCPtr()
121 tlog.Debug(tag, $"RotationGestureDetectorgetCPtr START");
122 RotationGestureDetector a1 = new RotationGestureDetector();
123 global::System.Runtime.InteropServices.HandleRef b1 = RotationGestureDetector.getCPtr(a1);
127 tlog.Debug(tag, $"RotationGestureDetectorgetCPtr END (OK)");
128 Assert.Pass("RotationGestureDetectorgetCPtr");
133 [Description("RotationGestureDetector Assign")]
134 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.Assign M")]
135 [Property("SPEC_URL", "-")]
136 [Property("CRITERIA", "MR")]
137 [Property("AUTHOR", "guowei.wang@samsung.com")]
138 public void RotationGestureDetectorAssign()
140 tlog.Debug(tag, $"RotationGestureDetectorAssign START");
141 RotationGestureDetector a1 = new RotationGestureDetector();
143 RotationGestureDetector b1 = a1;
148 tlog.Debug(tag, $"RotationGestureDetectorAssign END (OK)");
149 Assert.Pass("RotationGestureDetectorAssign");
154 [Description("RotationGestureDetector DetectedSignal")]
155 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.DetectedSignal M")]
156 [Property("SPEC_URL", "-")]
157 [Property("CRITERIA", "MR")]
158 [Property("AUTHOR", "guowei.wang@samsung.com")]
159 public void RotationGestureDetectorDetectedSignal()
161 tlog.Debug(tag, $"RotationGestureDetectorDetectedSignal START");
162 RotationGestureDetector a1 = new RotationGestureDetector();
164 RotationGestureDetectedSignal b1 = a1.DetectedSignal();
168 tlog.Debug(tag, $"RotationGestureDetectorDetectedSignal END (OK)");
169 Assert.Pass("RotationGestureDetectorDetectedSignal");
174 [Description("Test Detected property.")]
175 [Property("SPEC", "Tizen.NUI.RotationGestureDetector.Detected A")]
176 [Property("SPEC_URL", "-")]
177 [Property("CRITERIA", "PRW")]
178 [Property("AUTHOR", "guowei.wang@samsung.com")]
179 public void RotationGestureDetectorDetected()
181 tlog.Debug(tag, $"RotationGestureDetectorDetected START");
182 RotationGestureDetector a1 = new RotationGestureDetector();
184 a1.Detected += OnDetected;
185 a1.Detected -= OnDetected;
187 RotationGestureDetector.DetectedEventArgs e = new RotationGestureDetector.DetectedEventArgs();
188 object o = new object();
194 tlog.Debug(tag, $"RotationGestureDetectorDetected END (OK)");
195 Assert.Pass("RotationGestureDetectorDetected");
198 private void OnDetected(object obj, RotationGestureDetector.DetectedEventArgs e)
203 RotationGesture p1 = e.RotationGesture;
204 e.RotationGesture = p1;