public void Can_Del_To_2() { int[] array = { 9, 5 }; var tree = new BinaryTree(); tree.Init(array); tree.Del(5); Assert.AreEqual(1, tree.Size); Assert.IsFalse(tree.Contains(5)); }
public void Can_Del_To_Many() { int[] array = { 9, 5, 1, 14, 6 }; var tree = new BinaryTree(); tree.Init(array); tree.Del(14); Assert.AreEqual(4, tree.Size); Assert.IsFalse(tree.Contains(14)); }
public void Can_Del_To_1() { var tree = new BinaryTree(); tree.Add(7); tree.Del(7); Assert.AreEqual(0, tree.Size); Assert.IsFalse(tree.Contains(7)); }