Merge remote-tracking branch 'origin/master' into tizen
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / Utility / TSItemView.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6
7 namespace Tizen.NUI.Devel.Tests
8 {
9     using tlog = Tizen.Log;
10
11     [TestFixture]
12     [Description("Internal/Utility/ItemView")]
13     public class InternalItemViewTest
14     {
15         private const string tag = "NUITEST";
16
17         [SetUp]
18         public void Init()
19         {
20             tlog.Info(tag, "Init() is called!");
21         }
22
23         [TearDown]
24         public void Destroy()
25         {
26             tlog.Info(tag, "Destroy() is called!");
27         }
28
29         [Test]
30         [Category("P1")]
31         [Description("ItemView constructor.")]
32         [Property("SPEC", "Tizen.NUI.ItemView.ItemView C")]
33         [Property("SPEC_URL", "-")]
34         [Property("CRITERIA", "CONSTR")]
35         [Property("AUTHOR", "guowei.wang@samsung.com")]
36         public void ItemViewConstructor()
37         {
38             tlog.Debug(tag, $"ItemViewConstructor START");
39
40             using (View view = new View())
41             {
42                 var testingTarget = new ItemView(view.SwigCPtr.Handle, false);
43                 Assert.IsNotNull(testingTarget, "Should be not null!");
44                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
45
46                 tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
47
48                 testingTarget.Dispose();
49             }
50
51             tlog.Debug(tag, $"ItemViewConstructor END (OK)");
52         }
53
54         [Test]
55         [Category("P1")]
56         [Description("ItemView constructor. With ItemFactory.")]
57         [Property("SPEC", "Tizen.NUI.ItemView.Layout C")]
58         [Property("SPEC_URL", "-")]
59         [Property("CRITERIA", "PRW")]
60         [Property("AUTHOR", "guowei.wang@samsung.com")]
61         public void ItemViewConstructorWithItemFactory()
62         {
63             tlog.Debug(tag, $"ItemViewConstructorWithItemFactory START");
64
65             using (ItemFactory factory = new ItemFactory())
66             {
67                 var testingTarget = new ItemView(factory);
68                 Assert.IsNotNull(testingTarget, "Should be not null!");
69                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
70
71                 testingTarget.Dispose();
72             }
73
74             tlog.Debug(tag, $"ItemViewConstructorWithItemFactory END (OK)");
75         }
76
77         [Test]
78         [Category("P1")]
79         [Description("ItemView Layout.")]
80         [Property("SPEC", "Tizen.NUI.ItemView.Layout A")]
81         [Property("SPEC_URL", "-")]
82         [Property("CRITERIA", "PRW")]
83         [Property("AUTHOR", "guowei.wang@samsung.com")]
84         public void ItemViewLayout()
85         {
86             tlog.Debug(tag, $"ItemViewLayout START");
87
88             using (ItemFactory factory = new ItemFactory())
89             {
90                 var testingTarget = new ItemView(factory);
91                 Assert.IsNotNull(testingTarget, "Should be not null!");
92                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
93
94                 using (PropertyArray propertyArray = new PropertyArray())
95                 {
96                     propertyArray.Add(new PropertyValue(new Size2D(100, 80)));
97                     testingTarget.Layout = propertyArray;
98
99                     try
100                     {
101                         testingTarget.Layout = propertyArray;
102                         tlog.Debug(tag, "Layout : " + testingTarget.Layout);
103                     }
104                     catch (Exception e)
105                     {
106                         tlog.Debug(tag, e.Message.ToString());
107                         Assert.Fail("Caught Exception: Failed!");
108                     }
109                 }
110
111                 testingTarget.Dispose();
112             }
113
114             tlog.Debug(tag, $"ItemViewLayout END (OK)");
115         }
116
117         [Test]
118         [Category("P1")]
119         [Description("ItemView AddLayout.")]
120         [Property("SPEC", "Tizen.NUI.ItemView.AddLayout M")]
121         [Property("SPEC_URL", "-")]
122         [Property("CRITERIA", "MR")]
123         [Property("AUTHOR", "guowei.wang@samsung.com")]
124         public void ItemViewAddLayout()
125         {
126             tlog.Debug(tag, $"ItemViewAddLayout START");
127
128             using (ItemFactory factory = new ItemFactory())
129             {
130                 var testingTarget = new ItemView(factory);
131                 Assert.IsNotNull(testingTarget, "Should be not null!");
132                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
133
134                 testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
135
136                 testingTarget.Dispose();
137             }
138
139             tlog.Debug(tag, $"ItemViewAddLayout END (OK)");
140         }
141
142         [Test]
143         [Category("P1")]
144         [Description("ItemView RemoveLayout.")]
145         [Property("SPEC", "Tizen.NUI.ItemView.RemoveLayout M")]
146         [Property("SPEC_URL", "-")]
147         [Property("CRITERIA", "MR")]
148         [Property("AUTHOR", "guowei.wang@samsung.com")]
149         public void ItemViewRemoveLayout()
150         {
151             tlog.Debug(tag, $"ItemViewRemoveLayout START");
152
153             using (ItemFactory factory = new ItemFactory())
154             {
155                 var testingTarget = new ItemView(factory);
156                 Assert.IsNotNull(testingTarget, "Should be not null!");
157                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
158
159                 testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
160                 tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
161
162                 try
163                 {
164                     testingTarget.RemoveLayout((uint)testingTarget.LayoutPosition);
165                     tlog.Debug(tag, " LayoutCount : " + testingTarget.GetLayoutCount());
166                 }
167                 catch (Exception e)
168                 {
169                     tlog.Debug(tag, e.Message.ToString());
170                     Assert.Fail("Caught Exception: Failed!");
171                 }
172
173                 testingTarget.Dispose();
174             }
175
176             tlog.Debug(tag, $"ItemViewRemoveLayout END (OK)");
177         }
178
179         [Test]
180         [Category("P1")]
181         [Description("ItemView DownCast.")]
182         [Property("SPEC", "Tizen.NUI.ItemView.Layout M")]
183         [Property("SPEC_URL", "-")]
184         [Property("CRITERIA", "MR")]
185         [Property("AUTHOR", "guowei.wang@samsung.com")]
186         public void ItemViewDownCast()
187         {
188             tlog.Debug(tag, $"ItemViewDownCast START");
189
190             using (ItemFactory factory = new ItemFactory())
191             {
192                 using (ItemView view = new ItemView(factory))
193                 {
194                     var testingTarget = ItemView.DownCast(view);
195                     Assert.IsNotNull(testingTarget, "Should be not null!");
196                     Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
197
198                     testingTarget.Dispose();
199                 }
200             }
201
202             tlog.Debug(tag, $"ItemViewDownCast END (OK)");
203         }
204
205         [Test]
206         [Category("P1")]
207         [Description("ItemView GetLayout.")]
208         [Property("SPEC", "Tizen.NUI.ItemView.GetLayout M")]
209         [Property("SPEC_URL", "-")]
210         [Property("CRITERIA", "MR")]
211         [Property("AUTHOR", "guowei.wang@samsung.com")]
212         public void ItemViewGetLayout()
213         {
214             tlog.Debug(tag, $"ItemViewGetLayout START");
215
216             using (ItemFactory factory = new ItemFactory())
217             {
218                 var testingTarget = new ItemView(factory);
219                 Assert.IsNotNull(testingTarget, "Should be not null!");
220                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
221
222                 testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
223
224                 try
225                 {
226                     testingTarget.GetLayout((uint)testingTarget.LayoutPosition);
227                 }
228                 catch (Exception e)
229                 {
230                     tlog.Debug(tag, e.Message.ToString());
231                     Assert.Fail("Caught Exception: Failed!");
232                 }
233
234                 testingTarget.Dispose();
235             }
236
237             tlog.Debug(tag, $"ItemViewGetLayout END (OK)");
238         }
239
240         [Test]
241         [Category("P1")]
242         [Description("ItemView GetActiveLayout.")]
243         [Property("SPEC", "Tizen.NUI.ItemView.GetActiveLayout M")]
244         [Property("SPEC_URL", "-")]
245         [Property("CRITERIA", "MR")]
246         [Property("AUTHOR", "guowei.wang@samsung.com")]
247         public void ItemViewGetActiveLayout()
248         {
249             tlog.Debug(tag, $"ItemViewGetActiveLayout START");
250
251             using (ItemFactory factory = new ItemFactory())
252             {
253                 var testingTarget = new ItemView(factory);
254                 Assert.IsNotNull(testingTarget, "Should be not null!");
255                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
256
257                 testingTarget.AddLayout(new ItemLayout(testingTarget.SwigCPtr.Handle, true));
258
259                 try
260                 {
261                     testingTarget.GetActiveLayout();
262                 }
263                 catch (Exception e)
264                 {
265                     tlog.Debug(tag, e.Message.ToString());
266                     Assert.Fail("Caught Exception: Failed!");
267                 }
268
269                 testingTarget.Dispose();
270             }
271
272             tlog.Debug(tag, $"ItemViewGetActiveLayout END (OK)");
273         }
274
275         [Test]
276         [Category("P1")]
277         [Description("ItemView InsertItem.")]
278         [Property("SPEC", "Tizen.NUI.ItemView.InsertItem M")]
279         [Property("SPEC_URL", "-")]
280         [Property("CRITERIA", "MR")]
281         [Property("AUTHOR", "guowei.wang@samsung.com")]
282         public void ItemViewInsertItem()
283         {
284             tlog.Debug(tag, $"ItemViewInsertItem START");
285
286             using (ItemFactory factory = new ItemFactory())
287             {
288                 var testingTarget = new ItemView(factory);
289                 Assert.IsNotNull(testingTarget, "Should be not null!");
290                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
291
292                 try
293                 {
294                     using (Item item = new Item())
295                     {
296                         testingTarget.InsertItem(new Item(), 30.0f);
297                     }
298                 }
299                 catch (Exception e)
300                 {
301                     tlog.Debug(tag, e.Message.ToString());
302                     Assert.Fail("Caught Exception: Failed!");
303                 }
304
305                 testingTarget.Dispose();
306             }
307
308             tlog.Debug(tag, $"ItemViewInsertItem END (OK)");
309         }
310
311         [Test]
312         [Category("P1")]
313         [Description("ItemView RemoveItem.")]
314         [Property("SPEC", "Tizen.NUI.ItemView.RemoveItem M")]
315         [Property("SPEC_URL", "-")]
316         [Property("CRITERIA", "MR")]
317         [Property("AUTHOR", "guowei.wang@samsung.com")]
318         public void ItemViewRemoveItem()
319         {
320             tlog.Debug(tag, $"ItemViewRemoveItem START");
321
322             using (ItemFactory factory = new ItemFactory())
323             {
324                 var testingTarget = new ItemView(factory);
325                 Assert.IsNotNull(testingTarget, "Should be not null!");
326                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
327
328                 using (Item item = new Item())
329                 {
330                     testingTarget.InsertItem(item, 30.0f);
331
332                     var id = testingTarget.GetLayoutCount() - 1;
333                     testingTarget.RemoveItem(id, 0.5f);
334                 }
335
336                 testingTarget.Dispose();
337             }
338
339             tlog.Debug(tag, $"ItemViewRemoveItem END (OK)");
340         }
341
342         [Test]
343         [Category("P1")]
344         [Description("ItemView SetItemsAnchorPoint.")]
345         [Property("SPEC", "Tizen.NUI.ItemView.SetItemsAnchorPoint M")]
346         [Property("SPEC_URL", "-")]
347         [Property("CRITERIA", "MR")]
348         [Property("AUTHOR", "guowei.wang@samsung.com")]
349         public void ItemViewSetItemsAnchorPoint()
350         {
351             tlog.Debug(tag, $"ItemViewSetItemsAnchorPoint START");
352
353             using (ItemFactory factory = new ItemFactory())
354             {
355                 var testingTarget = new ItemView(factory);
356                 Assert.IsNotNull(testingTarget, "Should be not null!");
357                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
358
359                 using (Vector3 vector = new Vector3(100.0f, 30.0f, 200.0f))
360                 {
361                     testingTarget.SetItemsAnchorPoint(vector);
362                     Assert.AreEqual(100.0f, testingTarget.GetItemsAnchorPoint().X, "Should be equal!");
363                     Assert.AreEqual(30.0f, testingTarget.GetItemsAnchorPoint().Y, "Should be equal!");
364                     Assert.AreEqual(200.0f, testingTarget.GetItemsAnchorPoint().Z, "Should be equal!");
365                 }
366
367                 testingTarget.Dispose();
368             }
369
370             tlog.Debug(tag, $"ItemViewSetItemsAnchorPoint END (OK)");
371         }
372
373         [Test]
374         [Category("P1")]
375         [Description("ItemView GetItemsRange.")]
376         [Property("SPEC", "Tizen.NUI.ItemView.GetItemsRange M")]
377         [Property("SPEC_URL", "-")]
378         [Property("CRITERIA", "MR")]
379         [Property("AUTHOR", "guowei.wang@samsung.com")]
380         public void ItemViewGetItemsRange()
381         {
382             tlog.Debug(tag, $"ItemViewGetItemsRange START");
383
384             using (ItemFactory factory = new ItemFactory())
385             {
386                 var testingTarget = new ItemView(factory);
387                 Assert.IsNotNull(testingTarget, "Should be not null!");
388                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
389
390                 try
391                 {
392                     using (ItemRange range = new ItemRange(0, 300))
393                     {
394                         testingTarget.GetItemsRange(range);
395                     }
396                 }
397                 catch (Exception e)
398                 {
399                     tlog.Debug(tag, e.Message.ToString());
400                     Assert.Fail("Caught Exception: Failed!");
401                 }
402
403                 testingTarget.Dispose();
404             }
405
406             tlog.Debug(tag, $"ItemViewGetItemsRange END (OK)");
407         }
408
409         [Test]
410         [Category("P1")]
411         [Description("ItemView SetAnchoring.")]
412         [Property("SPEC", "Tizen.NUI.ItemView.SetAnchoring M")]
413         [Property("SPEC_URL", "-")]
414         [Property("CRITERIA", "MR")]
415         [Property("AUTHOR", "guowei.wang@samsung.com")]
416         public void ItemViewSetAnchoring()
417         {
418             tlog.Debug(tag, $"ItemViewSetAnchoring START");
419
420             using (ItemFactory factory = new ItemFactory())
421             {
422                 using (ItemView itemView = new ItemView(factory))
423                 {
424                     itemView.SetAnchoring(true);
425                     Assert.AreEqual(true, itemView.GetAnchoring(), "Should be equal!");
426
427                     itemView.SetAnchoring(false);
428                     Assert.AreEqual(false, itemView.GetAnchoring(), "Should be equal!");
429                 }
430             }
431
432             tlog.Debug(tag, $"ItemViewSetAnchoring END (OK)");
433         }
434
435         [Test]
436         [Category("P1")]
437         [Description("ItemView SetAnchoringDuration.")]
438         [Property("SPEC", "Tizen.NUI.ItemView.SetAnchoringDuration M")]
439         [Property("SPEC_URL", "-")]
440         [Property("CRITERIA", "MR")]
441         [Property("AUTHOR", "guowei.wang@samsung.com")]
442         public void ItemViewSetAnchoringDuration()
443         {
444             tlog.Debug(tag, $"ItemViewSetAnchoringDuration START");
445
446             using (ItemFactory factory = new ItemFactory())
447             {
448                 using (ItemView itemView = new ItemView(factory))
449                 {
450                     itemView.SetAnchoringDuration(30.0f);
451                     Assert.AreEqual(30.0f, itemView.GetAnchoringDuration(), "Should be equal!");
452                 }
453             }
454
455             tlog.Debug(tag, $"ItemViewSetAnchoringDuration END (OK)");
456         }
457
458         [Test]
459         [Category("P1")]
460         [Description("ItemView Refresh.")]
461         [Property("SPEC", "Tizen.NUI.ItemView.Refresh M")]
462         [Property("SPEC_URL", "-")]
463         [Property("CRITERIA", "MR")]
464         [Property("AUTHOR", "guowei.wang@samsung.com")]
465         public void ItemViewRefresh()
466         {
467             tlog.Debug(tag, $"ItemViewRefresh START");
468
469             using (ItemFactory factory = new ItemFactory())
470             {
471                 var testingTarget = new ItemView(factory);
472                 Assert.IsNotNull(testingTarget, "Should be not null!");
473                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
474
475                 testingTarget.AddLayout(new ItemLayout(factory.SwigCPtr.Handle, true));
476
477                 try
478                 {
479                     testingTarget.Refresh();
480                 }
481                 catch (Exception e)
482                 {
483                     tlog.Debug(tag, e.Message.ToString());
484                     Assert.Fail("Caught Exception : Failed!");
485                 }
486             }
487
488             tlog.Debug(tag, $"ItemViewRefresh END (OK)");
489         }
490
491         [Test]
492         [Category("P1")]
493         [Description("ItemView GetItemId.")]
494         [Property("SPEC", "Tizen.NUI.ItemView.GetItemId M")]
495         [Property("SPEC_URL", "-")]
496         [Property("CRITERIA", "MR")]
497         [Property("AUTHOR", "guowei.wang@samsung.com")]
498         public void ItemViewGetItemId()
499         {
500             tlog.Debug(tag, $"ItemViewGetItemId START");
501
502             using (ItemFactory factory = new ItemFactory())
503             {
504                 var testingTarget = new ItemView(factory);
505                 Assert.IsNotNull(testingTarget, "Should be not null!");
506                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
507
508                 View view = new View()
509                 {
510                     Size = new Size(100, 80)
511                 };
512
513                 testingTarget.AddLayout(new ItemLayout(view.SwigCPtr.Handle, true));
514
515                 try
516                 {
517                     var result = testingTarget.GetItemId(view);
518                     tlog.Debug(tag, "ItemId : " + result);
519                 }
520                 catch (Exception e)
521                 {
522                     tlog.Debug(tag, e.Message.ToString());
523                     Assert.Fail("Caught Exception : Failed!");
524                 }
525             }
526
527             tlog.Debug(tag, $"ItemViewGetItemId END (OK)");
528         }
529
530         [Test]
531         [Category("P1")]
532         [Description("ItemView SetItemsParentOrigin.")]
533         [Property("SPEC", "Tizen.NUI.ItemView.SetItemsParentOrigin M")]
534         [Property("SPEC_URL", "-")]
535         [Property("CRITERIA", "MR")]
536         [Property("AUTHOR", "guowei.wang@samsung.com")]
537         public void ItemViewSetItemsParentOrigin()
538         {
539             tlog.Debug(tag, $"ItemViewSetItemsParentOrigin START");
540
541             using (ItemFactory factory = new ItemFactory())
542             {
543                 using (ItemView itemView = new ItemView(factory))
544                 {
545                     using (Vector3 vector = new Vector3(0.0f, 1.0f, 3.0f))
546                     {
547                         itemView.SetItemsParentOrigin(vector);
548                         Assert.AreEqual(0.0f, itemView.GetItemsParentOrigin().X, "Should be equal!");
549                         Assert.AreEqual(1.0f, itemView.GetItemsParentOrigin().Y, "Should be equal!");
550                         Assert.AreEqual(3.0f, itemView.GetItemsParentOrigin().Z, "Should be equal!");
551                     }
552                 }
553             }
554
555             tlog.Debug(tag, $"ItemViewSetItemsParentOrigin END (OK)");
556         }
557
558         [Test]
559         [Category("P1")]
560         [Description("ItemView LayoutActivatedSignal.")]
561         [Property("SPEC", "Tizen.NUI.ItemView.LayoutActivatedSignal M")]
562         [Property("SPEC_URL", "-")]
563         [Property("CRITERIA", "MR")]
564         [Property("AUTHOR", "guowei.wang@samsung.com")]
565         public void ItemViewLayoutActivatedSignal()
566         {
567             tlog.Debug(tag, $"ItemViewLayoutActivatedSignal START");
568
569             using (ItemFactory factory = new ItemFactory())
570             {
571                 using (ItemView itemView = new ItemView(factory))
572                 {
573                     var testingTarget = itemView.LayoutActivatedSignal();
574                     Assert.IsNotNull(testingTarget, "Should be not null!");
575                     Assert.IsInstanceOf<VoidSignal>(testingTarget, "Should be an Instance of VoidSignal!");
576
577                     testingTarget.Dispose();
578                 }
579             }
580
581             tlog.Debug(tag, $"ItemViewLayoutActivatedSignal END (OK)");
582         }
583
584         [Test]
585         [Category("P1")]
586         [Description("ItemView MinimumSwipeDistance.")]
587         [Property("SPEC", "Tizen.NUI.ItemView.MinimumSwipeDistance A")]
588         [Property("SPEC_URL", "-")]
589         [Property("CRITERIA", "PRW")]
590         [Property("AUTHOR", "guowei.wang@samsung.com")]
591         public void ItemViewMinimumSwipeDistance()
592         {
593             tlog.Debug(tag, $"ItemViewMinimumSwipeDistance START");
594
595             using (ItemFactory factory = new ItemFactory())
596             {
597                 var testingTarget = new ItemView(factory);
598                 Assert.IsNotNull(testingTarget, "Should be not null!");
599                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
600
601                 testingTarget.MinimumSwipeDistance = 10.0f;
602                 Assert.AreEqual(10.0f, testingTarget.MinimumSwipeDistance, "Should be equal");
603
604                 testingTarget.Dispose();
605             }
606
607             tlog.Debug(tag, $"ItemViewMinimumSwipeDistance END (OK)");
608         }
609
610         [Test]
611         [Category("P1")]
612         [Description("ItemView MinimumSwipeSpeed.")]
613         [Property("SPEC", "Tizen.NUI.ItemView.MinimumSwipeSpeed A")]
614         [Property("SPEC_URL", "-")]
615         [Property("CRITERIA", "PRW")]
616         [Property("AUTHOR", "guowei.wang@samsung.com")]
617         public void ItemViewMinimumSwipeSpeed()
618         {
619             tlog.Debug(tag, $"ItemViewMinimumSwipeSpeed START");
620
621             using (ItemFactory factory = new ItemFactory())
622             {
623                 var testingTarget = new ItemView(factory);
624                 Assert.IsNotNull(testingTarget, "Should be not null!");
625                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
626
627                 testingTarget.MinimumSwipeSpeed = 1.0f;
628                 Assert.AreEqual(1.0f, testingTarget.MinimumSwipeSpeed, "Should be equal");
629
630                 testingTarget.Dispose();
631             }
632
633             tlog.Debug(tag, $"ItemViewMinimumSwipeSpeed END (OK)");
634         }
635
636         [Test]
637         [Category("P1")]
638         [Description("ItemView WheelScrollDistanceStep.")]
639         [Property("SPEC", "Tizen.NUI.ItemView.WheelScrollDistanceStep A")]
640         [Property("SPEC_URL", "-")]
641         [Property("CRITERIA", "PRW")]
642         [Property("AUTHOR", "guowei.wang@samsung.com")]
643         public void ItemViewWheelScrollDistanceStep()
644         {
645             tlog.Debug(tag, $"ItemViewWheelScrollDistanceStep START");
646
647             using (ItemFactory factory = new ItemFactory())
648             {
649                 var testingTarget = new ItemView(factory);
650                 Assert.IsNotNull(testingTarget, "Should be not null!");
651                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
652
653                 testingTarget.WheelScrollDistanceStep = 1.0f;
654                 Assert.AreEqual(1.0f, testingTarget.WheelScrollDistanceStep, "Should be equal");
655
656                 testingTarget.Dispose();
657             }
658
659             tlog.Debug(tag, $"ItemViewWheelScrollDistanceStep END (OK)");
660         }
661
662         [Test]
663         [Category("P1")]
664         [Description("ItemView SnapToItemEnabled.")]
665         [Property("SPEC", "Tizen.NUI.ItemView.SnapToItemEnabled A")]
666         [Property("SPEC_URL", "-")]
667         [Property("CRITERIA", "PRW")]
668         [Property("AUTHOR", "guowei.wang@samsung.com")]
669         public void ItemViewSnapToItemEnabled()
670         {
671             tlog.Debug(tag, $"ItemViewSnapToItemEnabled START");
672
673             using (ItemFactory factory = new ItemFactory())
674             {
675                 var testingTarget = new ItemView(factory);
676                 Assert.IsNotNull(testingTarget, "Should be not null!");
677                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
678
679                 testingTarget.SnapToItemEnabled = true;
680                 Assert.AreEqual(true, testingTarget.SnapToItemEnabled, "Should be equal");
681
682                 testingTarget.SnapToItemEnabled = false;
683                 Assert.AreEqual(false, testingTarget.SnapToItemEnabled, "Should be equal");
684
685                 testingTarget.Dispose();
686             }
687
688             tlog.Debug(tag, $"ItemViewSnapToItemEnabled END (OK)");
689         }
690
691         [Test]
692         [Category("P1")]
693         [Description("ItemView RefreshInterval.")]
694         [Property("SPEC", "Tizen.NUI.ItemView.RefreshInterval A")]
695         [Property("SPEC_URL", "-")]
696         [Property("CRITERIA", "PRW")]
697         [Property("AUTHOR", "guowei.wang@samsung.com")]
698         public void ItemViewRefreshInterval()
699         {
700             tlog.Debug(tag, $"ItemViewRefreshInterval START");
701
702             using (ItemFactory factory = new ItemFactory())
703             {
704                 var testingTarget = new ItemView(factory);
705                 Assert.IsNotNull(testingTarget, "Should be not null!");
706                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
707
708                 testingTarget.RefreshInterval = 0.3f;
709                 Assert.AreEqual(0.3f, testingTarget.RefreshInterval, "Should be equal");
710
711                 testingTarget.Dispose();
712             }
713
714             tlog.Debug(tag, $"ItemViewRefreshInterval END (OK)");
715         }
716
717         [Test]
718         [Category("P1")]
719         [Description("ItemView LayoutPosition.")]
720         [Property("SPEC", "Tizen.NUI.ItemView.LayoutPosition A")]
721         [Property("SPEC_URL", "-")]
722         [Property("CRITERIA", "PRW")]
723         [Property("AUTHOR", "guowei.wang@samsung.com")]
724         public void ItemViewLayoutPosition()
725         {
726             tlog.Debug(tag, $"ItemViewLayoutPosition START");
727
728             using (ItemFactory factory = new ItemFactory())
729             {
730                 var testingTarget = new ItemView(factory);
731                 Assert.IsNotNull(testingTarget, "Should be not null!");
732                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
733
734                 testingTarget.LayoutPosition = 15.0f;
735                 Assert.AreEqual(15.0f, testingTarget.LayoutPosition, "Should be equal");
736
737                 testingTarget.Dispose();
738             }
739
740             tlog.Debug(tag, $"ItemViewLayoutPosition END (OK)");
741         }
742
743         [Test]
744         [Category("P1")]
745         [Description("ItemView ScrollSpeed.")]
746         [Property("SPEC", "Tizen.NUI.ItemView.ScrollSpeed A")]
747         [Property("SPEC_URL", "-")]
748         [Property("CRITERIA", "PRW")]
749         [Property("AUTHOR", "guowei.wang@samsung.com")]
750         public void ItemViewScrollSpeed()
751         {
752             tlog.Debug(tag, $"ItemViewScrollSpeed START");
753
754             using (ItemFactory factory = new ItemFactory())
755             {
756                 var testingTarget = new ItemView(factory);
757                 Assert.IsNotNull(testingTarget, "Should be not null!");
758                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
759
760                 testingTarget.ScrollSpeed = 15.0f;
761                 Assert.AreEqual(15.0f, testingTarget.ScrollSpeed, "Should be equal");
762
763                 testingTarget.Dispose();
764             }
765
766             tlog.Debug(tag, $"ItemViewScrollSpeed END (OK)");
767         }
768
769         [Test]
770         [Category("P1")]
771         [Description("ItemView Overshoot.")]
772         [Property("SPEC", "Tizen.NUI.ItemView.Overshoot A")]
773         [Property("SPEC_URL", "-")]
774         [Property("CRITERIA", "PRW")]
775         [Property("AUTHOR", "guowei.wang@samsung.com")]
776         public void ItemViewOvershoot()
777         {
778             tlog.Debug(tag, $"ItemViewOvershoot START");
779
780             using (ItemFactory factory = new ItemFactory())
781             {
782                 var testingTarget = new ItemView(factory);
783                 Assert.IsNotNull(testingTarget, "Should be not null!");
784                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
785
786                 testingTarget.Overshoot = 15.0f;
787                 Assert.AreEqual(15.0f, testingTarget.Overshoot, "Should be equal");
788
789                 testingTarget.Dispose();
790             }
791
792             tlog.Debug(tag, $"ItemViewOvershoot END (OK)");
793         }
794
795         [Test]
796         [Category("P1")]
797         [Description("ItemView ScrollDirection.")]
798         [Property("SPEC", "Tizen.NUI.ItemView.ScrollDirection A")]
799         [Property("SPEC_URL", "-")]
800         [Property("CRITERIA", "PRW")]
801         [Property("AUTHOR", "guowei.wang@samsung.com")]
802         public void ItemViewScrollDirection()
803         {
804             tlog.Debug(tag, $"ItemViewScrollDirection START");
805
806             using (ItemFactory factory = new ItemFactory())
807             {
808                 var testingTarget = new ItemView(factory);
809                 Assert.IsNotNull(testingTarget, "Should be not null!");
810                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
811
812                 testingTarget.ScrollDirection = new Vector2(0.0f, 90.0f);
813                 Assert.AreEqual(0.0f, testingTarget.ScrollDirection.X, "Should be equal");
814                 Assert.AreEqual(90.0f, testingTarget.ScrollDirection.Y, "Should be equal");
815
816                 testingTarget.Dispose();
817             }
818
819             tlog.Debug(tag, $"ItemViewScrollDirection END (OK)");
820         }
821
822         [Test]
823         [Category("P1")]
824         [Description("ItemView LayoutOrientation.")]
825         [Property("SPEC", "Tizen.NUI.ItemView.LayoutOrientation A")]
826         [Property("SPEC_URL", "-")]
827         [Property("CRITERIA", "PRW")]
828         [Property("AUTHOR", "guowei.wang@samsung.com")]
829         public void ItemViewLayoutOrientation()
830         {
831             tlog.Debug(tag, $"ItemViewLayoutOrientation START");
832
833             using (ItemFactory factory = new ItemFactory())
834             {
835                 var testingTarget = new ItemView(factory);
836                 Assert.IsNotNull(testingTarget, "Should be not null!");
837                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
838
839                 testingTarget.LayoutOrientation = 1;
840                 Assert.AreEqual(1, testingTarget.LayoutOrientation, "Should be equal");
841
842                 testingTarget.Dispose();
843             }
844
845             tlog.Debug(tag, $"ItemViewLayoutOrientation END (OK)");
846         }
847
848         [Test]
849         [Category("P1")]
850         [Description("ItemView ScrollContentSize.")]
851         [Property("SPEC", "Tizen.NUI.ItemView.ScrollContentSize A")]
852         [Property("SPEC_URL", "-")]
853         [Property("CRITERIA", "PRW")]
854         [Property("AUTHOR", "guowei.wang@samsung.com")]
855         public void ItemViewScrollContentSize()
856         {
857             tlog.Debug(tag, $"ItemViewScrollContentSize START");
858
859             using (ItemFactory factory = new ItemFactory())
860             {
861                 var testingTarget = new ItemView(factory);
862                 Assert.IsNotNull(testingTarget, "Should be not null!");
863                 Assert.IsInstanceOf<ItemView>(testingTarget, "Should be an Instance of ItemView!");
864
865                 testingTarget.ScrollContentSize = 15.0f;
866                 Assert.AreEqual(15.0f, testingTarget.ScrollContentSize, "Should be equal");
867
868                 testingTarget.Dispose();
869             }
870
871             tlog.Debug(tag, $"ItemViewScrollContentSize END (OK)");
872         }
873     }
874 }