Esempio n. 1
0
 public void CountAfterRemove()
 {
     var birch = new Tree<int>(new int[] { 10, 8, 7, 15, 9 });
     birch.Remove(7);
     var result = birch.Count;
     Assert.AreEqual(4, result);
 }
Esempio n. 2
0
 public void RemoveNon_existentNode()
 {
     var birch = new Tree<int>(new int[] { 10, 17, 23 });
     birch.Remove(33);
 }
Esempio n. 3
0
 public void RemoveNodeWithoutChildren()
 {
     var birch = new Tree<int>(new int[] { 10, 8, 7, 15, 9 });
     birch.Remove(7);
 }
Esempio n. 4
0
 public void RemoveNodeInTheThickOfThings()
 {
     var birch = new Tree<int>(new int[] { 30, 40, 20, 25, 26, 10, 11, 3 });
     birch.Remove(20);
 }
Esempio n. 5
0
 public void RemoveHeadNode()
 {
     var birch = new Tree<int>(new int[] { 10,17,23 });
     birch.Remove(10);
 }