3 using NUnit.Framework.TUnit;
5 using Tizen.NUI.Components;
6 using Tizen.NUI.BaseComponents;
8 namespace Tizen.NUI.Components.Devel.Tests
10 internal sealed class CustomGroupItemSource : IGroupableItemSource
12 public CustomGroupItemSource(object parent)
14 this.parent = parent as CollectionView;
17 public int Count => 0;
19 public bool HasHeader { get; set; } = true;
20 public bool HasFooter { get; set; } = true;
27 public bool IsHeader(int index)
29 return HasHeader && index == 0;
32 public bool IsFooter(int index)
47 public int GetPosition(object item)
58 public object GetItem(int position)
60 throw new IndexOutOfRangeException("IItemSource is empty");
63 public bool IsGroupHeader(int position)
65 return null != parent.Header;
68 public bool IsGroupFooter(int position)
70 return position == FooterIndex;
73 internal int FooterIndex
79 public object GetGroupParent(int position)
84 private CollectionView parent;
87 internal sealed class CustomEmptySource : IItemSource
89 public int Count => 0;
91 public bool HasHeader { get; set; }
92 public bool HasFooter { get; set; }
99 public bool IsHeader(int index)
101 return HasHeader && index == 0;
104 public bool IsFooter(int index)
119 public int GetPosition(object item)
124 public object GetItem(int position)
126 throw new IndexOutOfRangeException("IItemSource is empty");