Brandy.Grapes.Tests.Tests.WhenRemovingGrandChild C# (CSharp) Method

WhenRemovingGrandChild() private method

private WhenRemovingGrandChild ( ) : void
return void
        public void WhenRemovingGrandChild()
        {
            var parent = new TestTreeEntry {Name = "parent"};
            var child = new TestTreeEntry {Name = "child", Parent = parent};
            var grandChild = new TestTreeEntry {Name = "grandChild", Parent = child};

            child.RemoveChild(grandChild);

            parent.IsParentOf(child);
            child.IsNotParentOf(grandChild);
            parent.IsNotAncestorOf(grandChild);
        }