예제 #1
0
        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));
        }
예제 #2
0
        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));
        }