public void Test_RefreshObject_NonRoot_AfterRemoveChild()
        {
            this.olv.ClearObjects();
            Assert.AreEqual(0, this.olv.GetItemCount());

            Person root       = new Person("root");
            Person child      = new Person("child");
            Person grandchild = new Person("grandchild");

            root.AddChild(child);
            child.AddChild(grandchild);
            grandchild.AddChild(new Person("ggrandchild1"));
            grandchild.AddChild(new Person("ggrandchild2"));
            grandchild.AddChild(new Person("ggrandchild3"));

            this.olv.Roots = new ArrayList(new object[] { root });
            this.olv.ExpandAll();

            Assert.AreEqual(3, ObjectListView.EnumerableCount(this.olv.GetChildren(grandchild)));

            child.Children.RemoveAt(0);

            this.olv.RefreshObject(child);
            Assert.AreEqual(2, this.olv.GetItemCount());
        }
        public void Test_RefreshObject_NonRoot_AfterRemoveChild() {
            this.olv.ClearObjects();
            Assert.AreEqual(0, this.olv.GetItemCount());

            Person root = new Person("root");
            Person child = new Person("child");
            Person grandchild = new Person("grandchild");

            root.AddChild(child);
            child.AddChild(grandchild);
            grandchild.AddChild(new Person("ggrandchild1"));
            grandchild.AddChild(new Person("ggrandchild2"));
            grandchild.AddChild(new Person("ggrandchild3"));

            this.olv.Roots = new ArrayList(new object[] {root});
            this.olv.ExpandAll();

            Assert.AreEqual(3, ObjectListView.EnumerableCount(this.olv.GetChildren(grandchild)));

            child.Children.RemoveAt(0);

            this.olv.RefreshObject(child);
            Assert.AreEqual(2, this.olv.GetItemCount());
        }