예제 #1
0
        public void DeleteTest()
        {
            BaseNode parent      = new BaseNode();
            BaseNode child00     = new BaseNode();
            BaseNode child0000   = new BaseNode();
            BaseNode child0001   = new BaseNode();
            BaseNode child000000 = new BaseNode();

            parent.AddChild(child00);
            child00.AddChild(child0000);
            child00.AddChild(child0001);
            child0000.AddChild(child000000);

            child00.Delete(false);
            Assert.AreEqual(2, parent.Children.Count);
            Assert.AreEqual("a00", child0000.Name);
            Assert.AreEqual("a01", child0001.Name);
            Assert.AreEqual("a0000", child000000.Name);

            child0001.Delete(true);
            Assert.AreEqual(1, parent.Children.Count);
            child0000.Delete(true);
            Assert.AreEqual(0, parent.Children.Count);
        }
예제 #2
0
 public void Delete(ref TransactionFramework.TransactionChain chain)
 {
     BaseNode.Delete(ref chain);
 }