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/PinchGestureDetector")]
13 class PublicPinchGestureDetectorTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("PinchGestureDetector constructor")]
32 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.PinchGestureDetector C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void PinchGestureDetectorConstructor()
38 tlog.Debug(tag, $"PinchGestureDetectorConstructor START");
39 PinchGestureDetector a1 = new PinchGestureDetector();
42 tlog.Debug(tag, $"PinchGestureDetectorConstructor END (OK)");
43 Assert.Pass("PinchGestureDetectorConstructor");
48 [Description("PinchGestureDetector constructor")]
49 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.PinchGestureDetector C")]
50 [Property("SPEC_URL", "-")]
51 [Property("CRITERIA", "CONSTR")]
52 [Property("AUTHOR", "guowei.wang@samsung.com")]
53 public void PinchGestureDetectorConstructorWithPinchGestureDetector()
55 tlog.Debug(tag, $"PinchGestureDetectorConstructor START");
57 using (PinchGestureDetector detector = new PinchGestureDetector())
59 var testingTarget = new PinchGestureDetector(detector);
60 Assert.IsNotNull(testingTarget, "Can't create success object Hover");
61 Assert.IsInstanceOf<PinchGestureDetector>(testingTarget, "Should be an instance of PinchGestureDetector type.");
63 testingTarget.Dispose();
66 tlog.Debug(tag, $"PinchGestureDetectorConstructor END (OK)");
67 Assert.Pass("PinchGestureDetectorConstructor");
72 [Description("PinchGestureDetector GetPinchGestureDetectorFromPtr")]
73 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.GetPinchGestureDetectorFromPtr M")]
74 [Property("SPEC_URL", "-")]
75 [Property("CRITERIA", "MR")]
76 [Property("AUTHOR", "guowei.wang@samsung.com")]
77 public void PinchGestureDetectorGetPinchGestureDetectorFromPtr()
79 tlog.Debug(tag, $"PinchGestureDetectorGetPinchGestureDetectorFromPtr START");
80 PinchGestureDetector a1 = new PinchGestureDetector();
82 PinchGestureDetector a2 = PinchGestureDetector.GetPinchGestureDetectorFromPtr(PinchGestureDetector.getCPtr(a1).Handle);
86 tlog.Debug(tag, $"PinchGestureDetectorGetPinchGestureDetectorFromPtr END (OK)");
87 Assert.Pass("PinchGestureDetectorGetPinchGestureDetectorFromPtr");
92 [Description("PinchGestureDetector DownCast")]
93 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.DownCast M")]
94 [Property("SPEC_URL", "-")]
95 [Property("CRITERIA", "MR")]
96 [Property("AUTHOR", "guowei.wang@samsung.com")]
97 public void PinchGestureDetectorDownCast()
99 tlog.Debug(tag, $"PinchGestureDetectorDownCast START");
101 using (PinchGestureDetector detector = new PinchGestureDetector())
103 var testingTarget = PinchGestureDetector.DownCast(detector);
104 Assert.IsInstanceOf<PinchGestureDetector>(testingTarget, "Should be an instance of PinchGestureDetector type.");
106 testingTarget.Dispose();
109 tlog.Debug(tag, $"PinchGestureDetectorDownCast END (OK)");
114 [Description("PinchGestureDetector getCPtr")]
115 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.getCPtr M")]
116 [Property("SPEC_URL", "-")]
117 [Property("CRITERIA", "MR")]
118 [Property("AUTHOR", "guowei.wang@samsung.com")]
119 public void PinchGestureDetectorgetCPtr()
121 tlog.Debug(tag, $"PinchGestureDetectorgetCPtr START");
122 PinchGestureDetector a1 = new PinchGestureDetector();
124 global::System.Runtime.InteropServices.HandleRef b1 = PinchGestureDetector.getCPtr(a1);
128 tlog.Debug(tag, $"PinchGestureDetectorgetCPtr END (OK)");
129 Assert.Pass("PinchGestureDetectorgetCPtr");
134 [Description("PinchGestureDetector Assign")]
135 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.Assign M")]
136 [Property("SPEC_URL", "-")]
137 [Property("CRITERIA", "MR")]
138 [Property("AUTHOR", "guowei.wang@samsung.com")]
139 public void PinchGestureDetectorAssign()
141 tlog.Debug(tag, $"PinchGestureDetectorAssign START");
142 PinchGestureDetector a1 = new PinchGestureDetector();
144 PinchGestureDetector b1 = a1;
149 tlog.Debug(tag, $"PinchGestureDetectorAssign END (OK)");
150 Assert.Pass("PinchGestureDetectorAssign");
155 [Description("PinchGestureDetector DetectedSignal")]
156 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.DetectedSignal M")]
157 [Property("SPEC_URL", "-")]
158 [Property("CRITERIA", "MR")]
159 [Property("AUTHOR", "guowei.wang@samsung.com")]
160 public void PinchGestureDetectorDetectedSignal()
162 tlog.Debug(tag, $"PinchGestureDetectorDetectedSignal START");
163 PinchGestureDetector a1 = new PinchGestureDetector();
165 PinchGestureDetectedSignal b1 = a1.DetectedSignal();
169 tlog.Debug(tag, $"PinchGestureDetectorDetectedSignal END (OK)");
170 Assert.Pass("PinchGestureDetectorDetectedSignal");
175 [Description("Test Detected property.")]
176 [Property("SPEC", "Tizen.NUI.PinchGestureDetector.Detected A")]
177 [Property("SPEC_URL", "-")]
178 [Property("CRITERIA", "PRW")]
179 [Property("AUTHOR", "guowei.wang@samsung.com")]
180 public void PinchGestureDetectorDetected()
182 tlog.Debug(tag, $"PinchGestureDetectorDetected START");
183 PinchGestureDetector a1 = new PinchGestureDetector();
185 a1.Detected += OnDetected;
186 a1.Detected -= OnDetected;
189 tlog.Debug(tag, $"PinchGestureDetectorDetected END (OK)");
190 Assert.Pass("PinchGestureDetectorDetected");
193 private void OnDetected(object obj, PinchGestureDetector.DetectedEventArgs e)