public void TestCanExpandDelegateWorks() { Generator.GenerateColumns(this.tolv, typeof(ClassWithChildren), true); ClassWithChildren parent = new ClassWithChildren(); parent.MyChildren = new List <ClassWithChildren>(); parent.MyChildren.Add(new ClassWithChildren()); List <ClassWithChildren> roots = new List <ClassWithChildren>(); roots.Add(parent); this.tolv.Objects = roots; Assert.IsTrue(this.tolv.CanExpand(parent)); }
public void TestGetChildrenDelegateWorks() { Generator.GenerateColumns(this.tolv, typeof(ClassWithChildren), true); ClassWithChildren parent = new ClassWithChildren(); parent.MyChildren = new List <ClassWithChildren>(); parent.MyChildren.Add(new ClassWithChildren()); List <ClassWithChildren> roots = new List <ClassWithChildren>(); roots.Add(parent); this.tolv.Objects = roots; this.tolv.ExpandAll(); Assert.AreEqual(2, this.tolv.GetItemCount()); }
public void TestGetChildrenDelegateWorks() { Generator.GenerateColumns(this.tolv, typeof(ClassWithChildren), true); ClassWithChildren parent = new ClassWithChildren(); parent.MyChildren = new List<ClassWithChildren>(); parent.MyChildren.Add(new ClassWithChildren()); List<ClassWithChildren> roots = new List<ClassWithChildren>(); roots.Add(parent); this.tolv.Objects = roots; this.tolv.ExpandAll(); Assert.AreEqual(2, this.tolv.GetItemCount()); }
public void TestCanExpandDelegateWorks() { Generator.GenerateColumns(this.tolv, typeof(ClassWithChildren), true); ClassWithChildren parent = new ClassWithChildren(); parent.MyChildren = new List<ClassWithChildren>(); parent.MyChildren.Add(new ClassWithChildren()); List<ClassWithChildren> roots = new List<ClassWithChildren>(); roots.Add(parent); this.tolv.Objects = roots; Assert.IsTrue(this.tolv.CanExpand(parent)); }