3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("internal/Common/VectorUint16Pair")]
13 public class InternalVectorUint16PairTest
15 private const string tag = "NUITEST";
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("VectorUint16Pair contructor.")]
32 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.VectorUint16Pair C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("AUTHOR", "guowei.wang@samsung.com")]
36 public void VectorUint16PairContructor()
38 tlog.Debug(tag, $"VectorUint16PairContructor START");
40 var testingTarget = new VectorUint16Pair();
41 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
42 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
44 testingTarget.Dispose();
45 tlog.Debug(tag, $"VectorUint16PairContructor END (OK)");
50 [Description("VectorUint16Pair contructor. With VectorUint16Pair.")]
51 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.VectorUint16Pair C")]
52 [Property("SPEC_URL", "-")]
53 [Property("CRITERIA", "CONSTR")]
54 [Property("AUTHOR", "guowei.wang@samsung.com")]
55 public void VectorUint16PairContructorWithVectorUint16Pair()
57 tlog.Debug(tag, $"VectorUint16PairContructorWithVectorUint16Pair START");
59 using (VectorUint16Pair vector = new VectorUint16Pair())
61 var testingTarget = new VectorUint16Pair(vector);
62 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
63 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
65 testingTarget.Dispose();
68 tlog.Debug(tag, $"VectorUint16PairContructorWithVectorUint16Pair END (OK)");
73 [Description("VectorUint16Pair Assign.")]
74 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Assign M")]
75 [Property("SPEC_URL", "-")]
76 [Property("CRITERIA", "MR")]
77 [Property("AUTHOR", "guowei.wang@samsung.com")]
78 public void VectorUint16PairAssign()
80 tlog.Debug(tag, $"VectorUint16PairAssign START");
82 using (VectorUint16Pair vector = new VectorUint16Pair())
84 var testingTarget = vector.Assign(vector);
85 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
86 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
88 testingTarget.Dispose();
91 tlog.Debug(tag, $"VectorUint16PairAssign END (OK)");
96 [Description("VectorUint16Pair Begin.")]
97 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Begin M")]
98 [Property("SPEC_URL", "-")]
99 [Property("CRITERIA", "MR")]
100 [Property("AUTHOR", "guowei.wang@samsung.com")]
101 public void VectorUint16PairBegin()
103 tlog.Debug(tag, $"VectorUint16PairBegin START");
105 var testingTarget = new VectorUint16Pair();
106 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
107 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
109 var result = testingTarget.Begin();
110 tlog.Debug(tag, "Begin :" + result);
112 testingTarget.Dispose();
113 tlog.Debug(tag, $"VectorUint16PairBegin END (OK)");
118 [Description("VectorUint16Pair End.")]
119 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.End M")]
120 [Property("SPEC_URL", "-")]
121 [Property("CRITERIA", "MR")]
122 [Property("AUTHOR", "guowei.wang@samsung.com")]
123 public void VectorUint16PairEnd()
125 tlog.Debug(tag, $"VectorUint16PairEnd START");
127 var testingTarget = new VectorUint16Pair();
128 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
129 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
131 var result = testingTarget.End();
132 tlog.Debug(tag, "End :" + result);
134 testingTarget.Dispose();
135 tlog.Debug(tag, $"VectorUint16PairEnd END (OK)");
140 [Description("VectorUint16Pair PushBack.")]
141 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.PushBack M")]
142 [Property("SPEC_URL", "-")]
143 [Property("CRITERIA", "MR")]
144 [Property("AUTHOR", "guowei.wang@samsung.com")]
145 public void VectorUint16PushBack()
147 tlog.Debug(tag, $"VectorUint16PairPushBack START");
149 var testingTarget = new VectorUint16Pair();
150 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
151 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
155 testingTarget.PushBack(new Uint16Pair());
156 var result = testingTarget.ValueOfIndex(0);
157 tlog.Debug(tag, "ValueOfIndex :" + result);
161 tlog.Debug(tag, e.Message.ToString());
162 Assert.Fail("Caught Exception : Failed!");
165 testingTarget.Dispose();
166 tlog.Debug(tag, $"VectorUint16PairPushBack END (OK)");
171 [Description("VectorUint16Pair Insert.")]
172 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Insert M")]
173 [Property("SPEC_URL", "-")]
174 [Property("CRITERIA", "MR")]
175 [Property("AUTHOR", "guowei.wang@samsung.com")]
176 public void VectorUint16Insert()
178 tlog.Debug(tag, $"VectorUint16Insert START");
180 var testingTarget = new VectorUint16Pair();
181 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
182 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
186 testingTarget.Insert(testingTarget.Begin(), new Uint16Pair(30, 40));
190 tlog.Debug(tag, e.Message.ToString());
191 Assert.Fail("Caught Exception : Failed!");
194 testingTarget.Dispose();
195 tlog.Debug(tag, $"VectorUint16Insert END (OK)");
200 [Description("VectorUint16Pair Insert. 3 parameters.")]
201 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Insert M")]
202 [Property("SPEC_URL", "-")]
203 [Property("CRITERIA", "MR")]
204 [Property("AUTHOR", "guowei.wang@samsung.com")]
205 public void VectorUint16InsertWith3Parameters()
207 tlog.Debug(tag, $"VectorUint16InsertWith3Parameters START");
209 var testingTarget = new VectorUint16Pair();
210 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
211 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
215 testingTarget.Insert(new Uint16Pair(0, 0), testingTarget.Begin(), testingTarget.End());
219 tlog.Debug(tag, e.Message.ToString());
220 Assert.Fail("Caught Exception : Failed!");
223 testingTarget.Dispose();
224 tlog.Debug(tag, $"VectorUint16InsertWith3Parameters END (OK)");
229 [Description("VectorUint16Pair Reserve.")]
230 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Reserve M")]
231 [Property("SPEC_URL", "-")]
232 [Property("CRITERIA", "MR")]
233 [Property("AUTHOR", "guowei.wang@samsung.com")]
234 public void VectorUint16Reserve()
236 tlog.Debug(tag, $"VectorUint16Reverse START");
238 var testingTarget = new VectorUint16Pair();
239 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
240 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
244 testingTarget.Reserve(1);
248 tlog.Debug(tag, e.Message.ToString());
249 Assert.Fail("Caught Exception : Failed!");
252 testingTarget.Dispose();
253 tlog.Debug(tag, $"VectorUint16Reserve END (OK)");
258 [Description("VectorUint16Pair Resize.")]
259 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Resize M")]
260 [Property("SPEC_URL", "-")]
261 [Property("CRITERIA", "MR")]
262 [Property("AUTHOR", "guowei.wang@samsung.com")]
263 public void VectorUint16Resize()
265 tlog.Debug(tag, $"VectorUint16Resize START");
267 var testingTarget = new VectorUint16Pair();
268 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
269 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
273 testingTarget.Resize(1);
277 tlog.Debug(tag, e.Message.ToString());
278 Assert.Fail("Caught Exception : Failed!");
281 testingTarget.Dispose();
282 tlog.Debug(tag, $"VectorUint16Resize END (OK)");
287 [Description("VectorUint16Pair Resize. With Uint16Pair.")]
288 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Resize M")]
289 [Property("SPEC_URL", "-")]
290 [Property("CRITERIA", "MR")]
291 [Property("AUTHOR", "guowei.wang@samsung.com")]
292 public void VectorUint16ResizeWithUint16Pair()
294 tlog.Debug(tag, $"VectorUint16ResizeWithUint16Pair START");
296 var testingTarget = new VectorUint16Pair();
297 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
298 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
302 testingTarget.Resize(1, new Uint16Pair());
306 tlog.Debug(tag, e.Message.ToString());
307 Assert.Fail("Caught Exception : Failed!");
310 testingTarget.Dispose();
311 tlog.Debug(tag, $"VectorUint16ResizeWithUint16Pair END (OK)");
316 [Description("VectorUint16Pair Erase.")]
317 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Erase M")]
318 [Property("SPEC_URL", "-")]
319 [Property("CRITERIA", "MR")]
320 [Property("AUTHOR", "guowei.wang@samsung.com")]
321 public void VectorUint16Erase()
323 tlog.Debug(tag, $"VectorUint16Erase START");
325 var testingTarget = new VectorUint16Pair();
326 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
327 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
331 testingTarget.Erase(new Uint16Pair());
335 tlog.Debug(tag, e.Message.ToString());
336 Assert.Fail("Caught Exception : Failed!");
339 testingTarget.Dispose();
340 tlog.Debug(tag, $"VectorUint16Erase END (OK)");
345 [Description("VectorUint16Pair Erase. With 2 Uint16Pair.")]
346 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Erase M")]
347 [Property("SPEC_URL", "-")]
348 [Property("CRITERIA", "MR")]
349 [Property("AUTHOR", "guowei.wang@samsung.com")]
350 public void VectorUint16EraseWith2Uint16Pair()
352 tlog.Debug(tag, $"VectorUint16EraseWith2Uint16Pair START");
354 var testingTarget = new VectorUint16Pair();
355 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
356 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
360 testingTarget.Erase(new Uint16Pair(), new Uint16Pair());
364 tlog.Debug(tag, e.Message.ToString());
365 Assert.Fail("Caught Exception : Failed!");
368 testingTarget.Dispose();
369 tlog.Debug(tag, $"VectorUint16EraseWith2Uint16Pair END (OK)");
374 [Description("VectorUint16Pair Remove.")]
375 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Remove M")]
376 [Property("SPEC_URL", "-")]
377 [Property("CRITERIA", "MR")]
378 [Property("AUTHOR", "guowei.wang@samsung.com")]
379 public void VectorUint16Remove()
381 tlog.Debug(tag, $"VectorUint16Remove START");
383 var testingTarget = new VectorUint16Pair();
384 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
385 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
389 using (Uint16Pair pair = new Uint16Pair(30, 40))
391 testingTarget.PushBack(pair);
392 testingTarget.Remove(pair);
397 tlog.Debug(tag, e.Message.ToString());
398 Assert.Fail("Caught Exception : Failed!");
401 testingTarget.Dispose();
402 tlog.Debug(tag, $"VectorUint16Remove END (OK)");
407 [Description("VectorUint16Pair Swap.")]
408 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.Swap M")]
409 [Property("SPEC_URL", "-")]
410 [Property("CRITERIA", "MR")]
411 [Property("AUTHOR", "guowei.wang@samsung.com")]
412 public void VectorUint16Swap()
414 tlog.Debug(tag, $"VectorUint16Swap START");
416 var testingTarget = new VectorUint16Pair();
417 Assert.IsNotNull(testingTarget, "Can't create success object VectorUint16Pair.");
418 Assert.IsInstanceOf<VectorUint16Pair>(testingTarget, "Should return VectorUint16Pair instance.");
422 using (VectorUint16Pair vector = new VectorUint16Pair())
424 testingTarget.Swap(vector);
429 tlog.Debug(tag, e.Message.ToString());
430 Assert.Fail("Caught Exception : Failed!");
433 testingTarget.Clear();
434 testingTarget.Release();
435 tlog.Debug(tag, $"VectorUint16Swap END (OK)");
440 [Description("VectorUint16Pair BaseType.")]
441 [Property("SPEC", "Tizen.NUI.VectorUint16Pair.BaseType A")]
442 [Property("SPEC_URL", "-")]
443 [Property("CRITERIA", "PRO")]
444 [Property("AUTHOR", "guowei.wang@samsung.com")]
445 public void VectorUint16BaseType()
447 tlog.Debug(tag, $"VectorUint16BaseType START");
451 var result = VectorUint16Pair.BaseType;
452 tlog.Debug(tag, "BaseType : " + result);
456 tlog.Debug(tag, e.Message.ToString());
457 Assert.Fail("Caught Exception : Failed!");
460 tlog.Debug(tag, $"VectorUint16BaseType END (OK)");