Beispiel #1
0
 public void TestDelete()
 {
     Assert.IsFalse(tree.Present(94));
     tree.Insert(94);
     Assert.IsTrue(tree.Present(94));
     tree.Delete(94);
     Assert.IsFalse(tree.Present(94));
 }
Beispiel #2
0
 public void Setup()
 {
     tree = new BinarySortedGenericTree <int>(15);
     foreach (int n in new List <int> {
         8, 7, 23, 15, 5, 9, -1, 27, 18, 15, 14, 12, 14, 27, 10, 32, 18, 42, -4, 8, 12, 9, 2, 0
     })
     {
         tree.Insert(n);
     }
 }