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/Utility/ItemIdCollection")]
13 public class InternalItemIdCollectionTest
15 private const string tag = "NUITEST";
17 internal class MyItemIdCollection : ItemIdCollection
19 public MyItemIdCollection() : base()
26 tlog.Info(tag, "Init() is called!");
32 tlog.Info(tag, "Destroy() is called!");
37 [Description("ItemIdCollection constructor.")]
38 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
39 [Property("SPEC_URL", "-")]
40 [Property("CRITERIA", "CONSTR")]
41 [Property("AUTHOR", "guowei.wang@samsung.com")]
42 public void ItemIdCollectionConstructor()
44 tlog.Debug(tag, $"ItemIdCollectionConstructor START");
46 uint[] itemId = new uint[] { 1, 2, 3, 4 };
47 global::System.Collections.ICollection c = itemId;
49 var testingTarget = new ItemIdCollection(c);
50 Assert.IsNotNull(testingTarget, "Should be not null!");
51 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
53 Assert.IsFalse(testingTarget.IsFixedSize);
54 Assert.IsFalse(testingTarget.IsReadOnly);
55 Assert.IsFalse(testingTarget.IsSynchronized);
57 testingTarget.Dispose();
58 tlog.Debug(tag, $"ItemIdCollectionConstructor END (OK)");
63 [Description("ItemIdCollection constructor. With ItemIdCollection.")]
64 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
65 [Property("SPEC_URL", "-")]
66 [Property("CRITERIA", "CONSTR")]
67 [Property("AUTHOR", "guowei.wang@samsung.com")]
68 public void ItemIdCollectionConstructorWithItemIdCollection()
70 tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection START");
72 uint[] itemId = new uint[] { 1, 2, 3, 4 };
73 global::System.Collections.ICollection c = itemId;
75 var itemIdCollection = new ItemIdCollection(c);
76 Assert.IsNotNull(itemIdCollection, "Should be not null!");
77 Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
79 var testingTarget = new ItemIdCollection(itemIdCollection);
80 Assert.IsNotNull(testingTarget, "Should be not null!");
81 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
83 itemIdCollection.Dispose();
84 testingTarget.Dispose();
85 tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection END (OK)");
90 [Description("ItemIdCollection constructor. With capacity.")]
91 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
92 [Property("SPEC_URL", "-")]
93 [Property("CRITERIA", "CONSTR")]
94 [Property("AUTHOR", "guowei.wang@samsung.com")]
95 public void ItemIdCollectionConstructorWithCapacity()
97 tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity START");
99 var testingTarget = new ItemIdCollection(5);
100 Assert.IsNotNull(testingTarget, "Should be not null!");
101 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
103 testingTarget.Dispose();
104 tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity END (OK)");
109 [Description("ItemIdCollection constructor. Null ICollection.")]
110 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollection C")]
111 [Property("SPEC_URL", "-")]
112 [Property("CRITERIA", "CONSTR")]
113 [Property("AUTHOR", "guowei.wang@samsung.com")]
114 public void ItemIdCollectionConstructorWithNullICollection()
116 tlog.Debug(tag, $"ItemIdCollectionConstructorWithNullICollection START");
118 global::System.Collections.ICollection c = null;
122 new ItemIdCollection(c);
124 catch (ArgumentNullException e)
126 tlog.Debug(tag, e.Message.ToString());
127 tlog.Debug(tag, $"ItemIdCollectionConstructorWithNullICollection END (OK)");
128 Assert.Pass("Caught ArgumentNullException : passed!");
134 [Description("ItemIdCollection getCPtr.")]
135 [Property("SPEC", "Tizen.NUI.ItemIdCollection.getCPtr M")]
136 [Property("SPEC_URL", "-")]
137 [Property("CRITERIA", "MR")]
138 [Property("AUTHOR", "guowei.wang@samsung.com")]
139 public void ItemIdCollectiongetCPtr()
141 tlog.Debug(tag, $"ItemIdCollectiongetCPtr START");
143 uint[] itemId = new uint[] { 1, 2, 3, 4 };
144 global::System.Collections.ICollection c = itemId;
146 var testingTarget = new ItemIdCollection(c);
147 Assert.IsNotNull(testingTarget, "Should be not null!");
148 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
152 ItemIdCollection.getCPtr(testingTarget);
156 tlog.Debug(tag, e.Message.ToString());
157 Assert.Fail("Caught Exception: Failed!");
160 testingTarget.Dispose();
161 tlog.Debug(tag, $"ItemIdCollectiongetCPtr END (OK)");
166 [Description("ItemIdCollection this.")]
167 [Property("SPEC", "Tizen.NUI.ItemIdCollection.this A")]
168 [Property("SPEC_URL", "-")]
169 [Property("CRITERIA", "PRW")]
170 [Property("AUTHOR", "guowei.wang@samsung.com")]
171 public void ItemIdCollectionThis()
173 tlog.Debug(tag, $"ItemIdCollectionThis START");
175 uint[] itemId = new uint[] { 1, 2, 3, 4 };
176 global::System.Collections.ICollection c = itemId;
178 var testingTarget = new ItemIdCollection(c);
179 Assert.IsNotNull(testingTarget, "Should be not null!");
180 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
182 tlog.Debug(tag, testingTarget[1].ToString());
184 testingTarget[2] = 5;
185 tlog.Debug(tag, testingTarget[2].ToString());
187 testingTarget.Dispose();
188 tlog.Debug(tag, $"ItemIdCollectionThis END (OK)");
193 [Description("ItemIdCollection Capacity.")]
194 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Capacity A")]
195 [Property("SPEC_URL", "-")]
196 [Property("CRITERIA", "PRW")]
197 [Property("AUTHOR", "guowei.wang@samsung.com")]
198 public void ItemIdCollectionCapacity()
200 tlog.Debug(tag, $"ItemIdCollectionCapacity START");
202 uint[] itemId = new uint[] { 1, 2, 3, 4 };
203 global::System.Collections.ICollection c = itemId;
205 var testingTarget = new ItemIdCollection(c);
206 Assert.IsNotNull(testingTarget, "Should be not null!");
207 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
209 tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
211 testingTarget.Capacity = 5;
212 tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
214 testingTarget.Dispose();
215 tlog.Debug(tag, $"ItemIdCollectionCapacity END (OK)");
220 [Description("ItemIdCollection Capacity. Set value < size.")]
221 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Capacity A")]
222 [Property("SPEC_URL", "-")]
223 [Property("CRITERIA", "PRW")]
224 [Property("AUTHOR", "guowei.wang@samsung.com")]
225 public void ItemIdCollectionCapacitySetValueLessThanSize()
227 tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize START");
229 uint[] itemId = new uint[] { 1, 2, 3, 4 };
230 global::System.Collections.ICollection c = itemId;
232 var testingTarget = new ItemIdCollection(c);
233 Assert.IsNotNull(testingTarget, "Should be not null!");
234 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
236 tlog.Debug(tag, "Count : " + testingTarget.Count);
237 tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString());
241 testingTarget.Capacity = 3;
243 catch (ArgumentOutOfRangeException e)
245 tlog.Debug(tag, e.Message.ToString());
246 testingTarget.Dispose();
247 tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize END (OK)");
248 Assert.Pass("Caught ArgumentOutOfRangeException : Passed!");
254 [Description("ItemIdCollection CopyTo.")]
255 [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
256 [Property("SPEC_URL", "-")]
257 [Property("CRITERIA", "MR")]
258 [Property("AUTHOR", "guowei.wang@samsung.com")]
259 public void ItemIdCollectionCopyTo()
261 tlog.Debug(tag, $"ItemIdCollectionCopyTo START");
263 uint[] itemId = new uint[] { 1, 2, 3, 4 };
264 global::System.Collections.ICollection c = itemId;
266 var testingTarget = new ItemIdCollection(c);
267 Assert.IsNotNull(testingTarget, "Should be not null!");
268 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
270 uint[] array = new uint[4];
274 testingTarget.CopyTo(array);
278 tlog.Debug(tag, e.Message.ToString());
279 Assert.Fail("Caught Exception : Failed!");
282 tlog.Debug(tag, $"ItemIdCollectionCopyTo END (OK)");
287 [Description("ItemIdCollection CopyTo. With arrayIndex.")]
288 [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
289 [Property("SPEC_URL", "-")]
290 [Property("CRITERIA", "MR")]
291 [Property("AUTHOR", "guowei.wang@samsung.com")]
292 public void ItemIdCollectionCopyToWithArrayIndex()
294 tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndex START");
296 uint[] itemId = new uint[] { 1, 2, 3, 4 };
297 global::System.Collections.ICollection c = itemId;
299 var testingTarget = new ItemIdCollection(c);
300 Assert.IsNotNull(testingTarget, "Should be not null!");
301 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
303 uint[] array = new uint[4];
307 testingTarget.CopyTo(array, 0);
311 tlog.Debug(tag, e.Message.ToString());
312 Assert.Fail("Caught Exception : Failed!");
315 tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndex END (OK)");
320 [Description("ItemIdCollection CopyTo. With null array.")]
321 [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
322 [Property("SPEC_URL", "-")]
323 [Property("CRITERIA", "MR")]
324 [Property("AUTHOR", "guowei.wang@samsung.com")]
325 public void ItemIdCollectionCopyToWithNullArray()
327 tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray START");
329 uint[] itemId = new uint[] { 1, 2, 3, 4 };
330 global::System.Collections.ICollection c = itemId;
332 var testingTarget = new ItemIdCollection(c);
333 Assert.IsNotNull(testingTarget, "Should be not null!");
334 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
338 testingTarget.CopyTo(null);
340 catch (ArgumentNullException e)
342 tlog.Debug(tag, e.Message.ToString());
343 testingTarget.Dispose();
344 tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray END (OK)");
345 Assert.Fail("Caught ArgumentNullException : Failed!");
351 [Description("ItemIdCollection CopyTo. index < 0.")]
352 [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
353 [Property("SPEC_URL", "-")]
354 [Property("CRITERIA", "MR")]
355 [Property("AUTHOR", "guowei.wang@samsung.com")]
356 public void ItemIdCollectionCopyToWithIndexLessThan0()
358 tlog.Debug(tag, $"ItemIdCollectionCopyToWithIndexLessThan0 START");
360 uint[] itemId = new uint[] { 1, 2, 3, 4 };
361 global::System.Collections.ICollection c = itemId;
363 var testingTarget = new ItemIdCollection(c);
364 Assert.IsNotNull(testingTarget, "Should be not null!");
365 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
369 uint[] array = new uint[4];
370 testingTarget.CopyTo(-1, array, 0, testingTarget.Count);
372 catch (ArgumentOutOfRangeException e)
374 tlog.Debug(tag, e.Message.ToString());
375 testingTarget.Dispose();
376 tlog.Debug(tag, $"ItemIdCollectionCopyToWithIndexLessThan0 END (OK)");
377 Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
383 [Description("ItemIdCollection CopyTo. arrayIndex < 0.")]
384 [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
385 [Property("SPEC_URL", "-")]
386 [Property("CRITERIA", "MR")]
387 [Property("AUTHOR", "guowei.wang@samsung.com")]
388 public void ItemIdCollectionCopyToWithArrayIndexLessThan0()
390 tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndexLessThan0 START");
392 uint[] itemId = new uint[] { 1, 2, 3, 4 };
393 global::System.Collections.ICollection c = itemId;
395 var testingTarget = new ItemIdCollection(c);
396 Assert.IsNotNull(testingTarget, "Should be not null!");
397 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
401 uint[] array = new uint[4];
402 testingTarget.CopyTo(0, array, -1, testingTarget.Count);
404 catch (ArgumentOutOfRangeException e)
406 tlog.Debug(tag, e.Message.ToString());
407 testingTarget.Dispose();
408 tlog.Debug(tag, $"ItemIdCollectionCopyToWithArrayIndexLessThan0 END (OK)");
409 Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
415 [Description("ItemIdCollection CopyTo. count < 0.")]
416 [Property("SPEC", "Tizen.NUI.ItemIdCollection.CopyTo M")]
417 [Property("SPEC_URL", "-")]
418 [Property("CRITERIA", "MR")]
419 [Property("AUTHOR", "guowei.wang@samsung.com")]
420 public void ItemIdCollectionCopyToWithCountLessThan0()
422 tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 START");
424 uint[] itemId = new uint[] { 1, 2, 3, 4 };
425 global::System.Collections.ICollection c = itemId;
427 var testingTarget = new ItemIdCollection(c);
428 Assert.IsNotNull(testingTarget, "Should be not null!");
429 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
433 uint[] array = new uint[4];
434 testingTarget.CopyTo(0, array, 0, -1);
436 catch (ArgumentOutOfRangeException e)
438 tlog.Debug(tag, e.Message.ToString());
439 testingTarget.Dispose();
440 tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 END (OK)");
441 Assert.Fail("Caught ArgumentOutOfRangeException : Failed!");
447 [Description("ItemIdCollection GetEnumerator.")]
448 [Property("SPEC", "Tizen.NUI.ItemIdCollection.GetEnumerator M")]
449 [Property("SPEC_URL", "-")]
450 [Property("CRITERIA", "MR")]
451 [Property("AUTHOR", "guowei.wang@samsung.com")]
452 public void ItemIdCollectionGetEnumerator()
454 tlog.Debug(tag, $"ItemIdCollectionGetEnumerator START");
456 uint[] itemId = new uint[] { 1, 2, 3, 4 };
457 global::System.Collections.ICollection c = itemId;
459 var testingTarget = new ItemIdCollection(c);
460 Assert.IsNotNull(testingTarget, "Should be not null!");
461 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
463 var result = testingTarget.GetEnumerator();
464 Assert.IsNotNull(result, "Should be not null!");
465 Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(result, "Should be an Instance of ItemIdCollectionEnumerator!");
467 tlog.Debug(tag, $"ItemIdCollectionGetEnumerator END (OK)");
472 [Description("ItemIdCollection.ItemIdCollectionEnumerator constructor.")]
473 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.ItemIdCollectionEnumerator C")]
474 [Property("SPEC_URL", "-")]
475 [Property("CRITERIA", "CONTSTR")]
476 [Property("AUTHOR", "guowei.wang@samsung.com")]
477 public void ItemIdCollectionEnumeratorConstructor()
479 tlog.Debug(tag, $"ItemIdCollectionEnumeratorConstructor START");
481 using (ItemIdCollection itemIdCollection = new ItemIdCollection())
483 var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
484 Assert.IsNotNull(testingTarget, "Should be not null!");
485 Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
487 testingTarget.Dispose();
490 tlog.Debug(tag, $"ItemIdCollectionEnumeratorConstructor END (OK)");
495 [Description("ItemIdCollection.ItemIdCollectionEnumerator Current. currentIndex == -1.")]
496 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.Current A")]
497 [Property("SPEC_URL", "-")]
498 [Property("CRITERIA", "PRO")]
499 [Property("AUTHOR", "guowei.wang@samsung.com")]
500 public void ItemIdCollectionEnumeratorCurrent()
502 tlog.Debug(tag, $"ItemIdCollectionEnumeratorCurrent START");
504 using (ItemIdCollection itemCollection = new ItemIdCollection())
506 var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemCollection);
507 Assert.IsNotNull(testingTarget, "Should be not null!");
508 Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
512 tlog.Debug(tag, "Current : " + testingTarget.Current);
514 catch (InvalidOperationException e)
516 tlog.Debug(tag, e.Message.ToString());
517 testingTarget.Dispose();
518 tlog.Debug(tag, $"ItemIdCollectionEnumeratorCurrent END (OK)");
519 Assert.Pass("Caught InvalidOperationException : passed!");
526 [Description("ItemIdCollection.ItemIdCollectionEnumerator MoveNext.")]
527 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.MoveNext M")]
528 [Property("SPEC_URL", "-")]
529 [Property("CRITERIA", "MR")]
530 [Property("AUTHOR", "guowei.wang@samsung.com")]
531 public void ItemIdCollectionEnumeratorMoveNext()
533 tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNext START");
535 uint[] itemId = new uint[] { 1, 2, 3, 4 };
536 global::System.Collections.ICollection c = itemId;
538 var itemIdCollection = new ItemIdCollection(c);
539 Assert.IsNotNull(itemIdCollection, "Should be not null!");
540 Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
542 var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
543 Assert.IsNotNull(testingTarget, "Should be not null!");
544 Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
548 testingTarget.MoveNext();
549 var result = testingTarget.Current;
550 Assert.IsNotNull(result, "Should be not null!");
551 Assert.IsInstanceOf<uint>(result, "Should be an Instance of uint!");
555 tlog.Debug(tag, e.Message.ToString());
556 Assert.Fail("Caught Exception: Failed!");
559 tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNext END (OK)");
564 [Description("ItemIdCollection.ItemIdCollectionEnumerator MoveNext. Object is null.")]
565 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.MoveNext M")]
566 [Property("SPEC_URL", "-")]
567 [Property("CRITERIA", "MR")]
568 [Property("AUTHOR", "guowei.wang@samsung.com")]
569 public void ItemIdCollectionEnumeratorMoveNextNullObject()
571 tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNextNullObject START");
573 uint[] itemId = new uint[] { 1, 2, 3, 4 };
574 global::System.Collections.ICollection c = itemId;
576 var itemIdCollection = new ItemIdCollection(c);
577 Assert.IsNotNull(itemIdCollection, "Should be not null!");
578 Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
580 var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
581 Assert.IsNotNull(testingTarget, "Should be not null!");
582 Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
586 testingTarget.MoveNext();
587 testingTarget.MoveNext();
588 testingTarget.MoveNext();
589 testingTarget.MoveNext();
590 testingTarget.MoveNext();
591 var result = testingTarget.Current;
593 catch (InvalidOperationException e)
595 tlog.Debug(tag, e.Message.ToString());
596 testingTarget.Dispose();
597 tlog.Debug(tag, $"ItemIdCollectionEnumeratorMoveNextNullObject END (OK)");
598 Assert.Pass("Caught InvalidOperationException: Passed!");
604 [Description("ItemIdCollection.ItemIdCollectionEnumerator Reset.")]
605 [Property("SPEC", "Tizen.NUI.ItemIdCollection.ItemIdCollectionEnumerator.Reset M")]
606 [Property("SPEC_URL", "-")]
607 [Property("CRITERIA", "MR")]
608 [Property("AUTHOR", "guowei.wang@samsung.com")]
609 public void ItemIdCollectionEnumeratorReset()
611 tlog.Debug(tag, $"ItemIdCollectionEnumeratorReset START");
613 uint[] itemId = new uint[] { 1, 2, 3, 4 };
614 global::System.Collections.ICollection c = itemId;
616 var itemIdCollection = new ItemIdCollection(c);
617 Assert.IsNotNull(itemIdCollection, "Should be not null!");
618 Assert.IsInstanceOf<ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!");
620 var testingTarget = new ItemIdCollection.ItemIdCollectionEnumerator(itemIdCollection);
621 Assert.IsNotNull(testingTarget, "Should be not null!");
622 Assert.IsInstanceOf<ItemIdCollection.ItemIdCollectionEnumerator>(testingTarget, "Should be an Instance of ItemIdCollectionEnumerator!");
624 testingTarget.MoveNext();
628 testingTarget.Reset();
632 tlog.Debug(tag, e.Message.ToString());
633 Assert.Fail("Caught Exception: Failed!");
636 tlog.Debug(tag, $"ItemIdCollectionEnumeratorReset END (OK)");
641 [Description("ItemIdCollection Clear.")]
642 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Clear M")]
643 [Property("SPEC_URL", "-")]
644 [Property("CRITERIA", "MR")]
645 [Property("AUTHOR", "guowei.wang@samsung.com")]
646 public void ItemIdCollectionClear()
648 tlog.Debug(tag, $"ItemIdCollectionClear START");
650 uint[] itemId = new uint[] { 1, 2, 3, 4 };
651 global::System.Collections.ICollection c = itemId;
653 var testingTarget = new ItemIdCollection(c);
654 Assert.IsNotNull(testingTarget, "Should be not null!");
655 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
656 tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
660 testingTarget.Clear();
661 tlog.Debug(tag, "Count : " + testingTarget.Count.ToString());
665 tlog.Debug(tag, e.Message.ToString());
666 Assert.Fail("Caught Exception: Failed!");
669 testingTarget.Dispose();
670 tlog.Debug(tag, $"ItemIdCollectionClear END (OK)");
675 [Description("ItemIdCollection AddRange.")]
676 [Property("SPEC", "Tizen.NUI.ItemIdCollection.AddRange M")]
677 [Property("SPEC_URL", "-")]
678 [Property("CRITERIA", "MR")]
679 [Property("AUTHOR", "guowei.wang@samsung.com")]
680 public void ItemIdCollectionAddRange()
682 tlog.Debug(tag, $"ItemIdCollectionAddRange START");
684 using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
686 var testingTarget = new ItemIdCollection();
687 Assert.IsNotNull(testingTarget, "Should be not null!");
688 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
692 testingTarget.AddRange(itemIdCollection);
696 tlog.Debug(tag, e.Message.ToString());
697 Assert.Fail("Caught Exception: Failed!");
700 testingTarget.Dispose();
703 tlog.Debug(tag, $"ItemIdCollectionAddRange END (OK)");
708 [Description("ItemIdCollection GetRange.")]
709 [Property("SPEC", "Tizen.NUI.ItemIdCollection.GetRange M")]
710 [Property("SPEC_URL", "-")]
711 [Property("CRITERIA", "MR")]
712 [Property("AUTHOR", "guowei.wang@samsung.com")]
713 public void ItemIdCollectionGetRange()
715 tlog.Debug(tag, $"ItemIdCollectionGetRange START");
717 using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
719 var testingTarget = new ItemIdCollection();
720 Assert.IsNotNull(testingTarget, "Should be not null!");
721 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
723 testingTarget.AddRange(itemIdCollection);
727 var result = testingTarget.GetRange(0, 0);
728 Assert.IsInstanceOf<ItemIdCollection>(result, "Should be an Instance of ItemIdCollection!");
732 tlog.Debug(tag, e.Message.ToString());
733 Assert.Fail("Caught Exception: Failed!");
736 testingTarget.Dispose();
739 tlog.Debug(tag, $"ItemIdCollectionGetRange END (OK)");
744 [Description("ItemIdCollection Insert.")]
745 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Insert M")]
746 [Property("SPEC_URL", "-")]
747 [Property("CRITERIA", "MR")]
748 [Property("AUTHOR", "guowei.wang@samsung.com")]
749 public void ItemIdCollectionInsert()
751 tlog.Debug(tag, $"ItemIdCollectionInsert START");
753 uint[] itemId = new uint[] { 1, 2, 3, 4 };
754 global::System.Collections.ICollection c = itemId;
756 var testingTarget = new ItemIdCollection(c);
757 Assert.IsNotNull(testingTarget, "Should be not null!");
758 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
760 testingTarget.Capacity = 5;
764 testingTarget.Insert(4, 5);
768 tlog.Debug(tag, e.Message.ToString());
769 Assert.Fail("Caught Exception: Failed!");
772 testingTarget.Dispose();
774 tlog.Debug(tag, $"ItemIdCollectionInsert END (OK)");
779 [Description("ItemIdCollection InsertRange.")]
780 [Property("SPEC", "Tizen.NUI.ItemIdCollection.InsertRange M")]
781 [Property("SPEC_URL", "-")]
782 [Property("CRITERIA", "MR")]
783 [Property("AUTHOR", "guowei.wang@samsung.com")]
784 public void ItemIdCollectionInsertRange()
786 tlog.Debug(tag, $"ItemIdCollectionInsertRange START");
788 using (ItemIdCollection value = new ItemIdCollection(3))
791 uint[] itemId = new uint[] { 1, 2, 3, 4 };
792 global::System.Collections.ICollection c = itemId;
794 var testingTarget = new ItemIdCollection(c);
795 Assert.IsNotNull(testingTarget, "Should be not null!");
796 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
798 testingTarget.Capacity = 10;
802 testingTarget.InsertRange(3, value);
806 tlog.Debug(tag, e.Message.ToString());
807 Assert.Fail("Caught Exception: Failed!");
810 testingTarget.Dispose();
813 tlog.Debug(tag, $"ItemIdCollectionInsertRange END (OK)");
818 [Description("ItemIdCollection RemoveAt.")]
819 [Property("SPEC", "Tizen.NUI.ItemIdCollection.RemoveAt M")]
820 [Property("SPEC_URL", "-")]
821 [Property("CRITERIA", "MR")]
822 [Property("AUTHOR", "guowei.wang@samsung.com")]
823 public void ItemIdCollectionRemoveAt()
825 tlog.Debug(tag, $"ItemIdCollectionRemoveAt START");
827 uint[] itemId = new uint[] { 1, 2, 3, 4 };
828 global::System.Collections.ICollection c = itemId;
830 var testingTarget = new ItemIdCollection(c);
831 Assert.IsNotNull(testingTarget, "Should be not null!");
832 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
834 testingTarget.Capacity = 5;
838 testingTarget.RemoveAt(3);
842 tlog.Debug(tag, e.Message.ToString());
843 Assert.Fail("Caught Exception: Failed!");
846 testingTarget.Dispose();
848 tlog.Debug(tag, $"ItemIdCollectionRemoveAt END (OK)");
853 [Description("ItemIdCollection RemoveRange.")]
854 [Property("SPEC", "Tizen.NUI.ItemIdCollection.RemoveRange M")]
855 [Property("SPEC_URL", "-")]
856 [Property("CRITERIA", "MR")]
857 [Property("AUTHOR", "guowei.wang@samsung.com")]
858 public void ItemIdCollectionRemoveRange()
860 tlog.Debug(tag, $"ItemIdCollectionRemoveRange START");
862 uint[] itemId = new uint[] { 1, 2, 3, 4 };
863 global::System.Collections.ICollection c = itemId;
865 var testingTarget = new ItemIdCollection(c);
866 Assert.IsNotNull(testingTarget, "Should be not null!");
867 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
869 testingTarget.Capacity = 5;
873 testingTarget.RemoveRange(1, 2);
877 tlog.Debug(tag, e.Message.ToString());
878 Assert.Fail("Caught Exception: Failed!");
881 testingTarget.Dispose();
883 tlog.Debug(tag, $"ItemIdCollectionRemoveRange END (OK)");
888 [Description("ItemIdCollection Repeat.")]
889 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Repeat M")]
890 [Property("SPEC_URL", "-")]
891 [Property("CRITERIA", "MR")]
892 [Property("AUTHOR", "guowei.wang@samsung.com")]
893 public void ItemIdCollectionRepeat()
895 tlog.Debug(tag, $"ItemIdCollectionRepeat START");
897 var testingTarget = ItemIdCollection.Repeat(6, 4);
898 Assert.IsNotNull(testingTarget, "Should be not null!");
899 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
901 Assert.AreEqual(4, testingTarget.Capacity, "Should be equal!");
903 testingTarget.Dispose();
904 tlog.Debug(tag, $"ItemIdCollectionRepeat END (OK)");
909 [Description("ItemIdCollection SetRange.")]
910 [Property("SPEC", "Tizen.NUI.ItemIdCollection.SetRange M")]
911 [Property("SPEC_URL", "-")]
912 [Property("CRITERIA", "MR")]
913 [Property("AUTHOR", "guowei.wang@samsung.com")]
914 public void ItemIdCollectionSetRange()
916 tlog.Debug(tag, $"ItemIdCollectionSetRange START");
918 using (ItemIdCollection itemIdCollection = new ItemIdCollection(5))
920 uint[] itemId = new uint[] { 1, 2, 3, 4 };
921 global::System.Collections.ICollection c = itemId;
923 var testingTarget = new ItemIdCollection(c);
924 Assert.IsNotNull(testingTarget, "Should be not null!");
925 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
929 testingTarget.SetRange(1, itemIdCollection);
933 tlog.Debug(tag, e.Message.ToString());
934 Assert.Fail("Caught Exception: Failed!");
937 testingTarget.Dispose();
940 tlog.Debug(tag, $"ItemIdCollectionSetRange END (OK)");
945 [Description("ItemIdCollection Reverse.")]
946 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Reverse M")]
947 [Property("SPEC_URL", "-")]
948 [Property("CRITERIA", "MR")]
949 [Property("AUTHOR", "guowei.wang@samsung.com")]
950 public void ItemIdCollectionReverse()
952 tlog.Debug(tag, $"ItemIdCollectionReverse START");
954 uint[] itemId = new uint[] { 1, 2, 3, 4 };
955 global::System.Collections.ICollection c = itemId;
957 var testingTarget = new ItemIdCollection(c);
958 Assert.IsNotNull(testingTarget, "Should be not null!");
959 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
961 testingTarget.Capacity = 5;
965 testingTarget.Reverse();
969 tlog.Debug(tag, e.Message.ToString());
970 Assert.Fail("Caught Exception: Failed!");
973 testingTarget.Dispose();
975 tlog.Debug(tag, $"ItemIdCollectionReverse END (OK)");
980 [Description("ItemIdCollection Reverse. With parameters.")]
981 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Reverse M")]
982 [Property("SPEC_URL", "-")]
983 [Property("CRITERIA", "MR")]
984 [Property("AUTHOR", "guowei.wang@samsung.com")]
985 public void ItemIdCollectionReverseWithParameters()
987 tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters START");
989 uint[] itemId = new uint[] { 1, 2, 3, 4 };
990 global::System.Collections.ICollection c = itemId;
992 var testingTarget = new ItemIdCollection(c);
993 Assert.IsNotNull(testingTarget, "Should be not null!");
994 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
996 testingTarget.Capacity = 5;
1000 testingTarget.Reverse(1, 2);
1004 tlog.Debug(tag, e.Message.ToString());
1005 Assert.Fail("Caught Exception: Failed!");
1008 testingTarget.Dispose();
1010 tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters END (OK)");
1015 [Description("ItemIdCollection Contains.")]
1016 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Contains M")]
1017 [Property("SPEC_URL", "-")]
1018 [Property("CRITERIA", "MR")]
1019 [Property("AUTHOR", "guowei.wang@samsung.com")]
1020 public void ItemIdCollectionContains()
1022 tlog.Debug(tag, $"ItemIdCollectionContains START");
1024 uint[] itemId = new uint[] { 1, 2, 3, 4 };
1025 global::System.Collections.ICollection c = itemId;
1027 var testingTarget = new ItemIdCollection(c);
1028 Assert.IsNotNull(testingTarget, "Should be not null!");
1029 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
1031 testingTarget.Capacity = 5;
1033 Assert.IsTrue(testingTarget.Contains(2));
1035 testingTarget.Dispose();
1036 tlog.Debug(tag, $"ItemIdCollectionContains END (OK)");
1041 [Description("ItemIdCollection IndexOf.")]
1042 [Property("SPEC", "Tizen.NUI.ItemIdCollection.IndexOf M")]
1043 [Property("SPEC_URL", "-")]
1044 [Property("CRITERIA", "MR")]
1045 [Property("AUTHOR", "guowei.wang@samsung.com")]
1046 public void ItemIdCollectionIndexOf()
1048 tlog.Debug(tag, $"ItemIdCollectionIndexOf START");
1050 uint[] itemId = new uint[] { 1, 2, 3, 4 };
1051 global::System.Collections.ICollection c = itemId;
1053 var testingTarget = new ItemIdCollection(c);
1054 Assert.IsNotNull(testingTarget, "Should be not null!");
1055 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
1057 testingTarget.Capacity = 5;
1059 Assert.AreEqual(2, testingTarget.IndexOf(3), "Should be equal!");
1061 testingTarget.Dispose();
1062 tlog.Debug(tag, $"ItemIdCollectionIndexOf END (OK)");
1067 [Description("ItemIdCollection LastIndexOf.")]
1068 [Property("SPEC", "Tizen.NUI.ItemIdCollection.LastIndexOf M")]
1069 [Property("SPEC_URL", "-")]
1070 [Property("CRITERIA", "MR")]
1071 [Property("AUTHOR", "guowei.wang@samsung.com")]
1072 public void ItemIdCollectionLastIndexOf()
1074 tlog.Debug(tag, $"ItemIdCollectionLastIndexOf START");
1076 uint[] itemId = new uint[] { 1, 2, 3, 4, 3 };
1077 global::System.Collections.ICollection c = itemId;
1079 var testingTarget = new ItemIdCollection(c);
1080 Assert.IsNotNull(testingTarget, "Should be not null!");
1081 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
1083 testingTarget.Capacity = 5;
1085 Assert.AreEqual(4, testingTarget.LastIndexOf(3), "Should be equal!");
1087 testingTarget.Dispose();
1088 tlog.Debug(tag, $"ItemIdCollectionLastIndexOf END (OK)");
1093 [Description("ItemIdCollection Remove.")]
1094 [Property("SPEC", "Tizen.NUI.ItemIdCollection.Remove M")]
1095 [Property("SPEC_URL", "-")]
1096 [Property("CRITERIA", "MR")]
1097 [Property("AUTHOR", "guowei.wang@samsung.com")]
1098 public void ItemIdCollectionRemove()
1100 tlog.Debug(tag, $"ItemIdCollectionRemove START");
1102 uint[] itemId = new uint[] { 1, 2, 3, 4, 3 };
1103 global::System.Collections.ICollection c = itemId;
1105 var testingTarget = new ItemIdCollection(c);
1106 Assert.IsNotNull(testingTarget, "Should be not null!");
1107 Assert.IsInstanceOf<ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!");
1109 testingTarget.Capacity = 5;
1111 Assert.AreEqual(true, testingTarget.Remove(3), "Should be equal!");
1113 testingTarget.Dispose();
1114 tlog.Debug(tag, $"ItemIdCollectionRemove END (OK)");