Beispiel #1
0
 public void TestRemove()
 {
     TreeTask.Tree tre = new TreeTask.Tree();
     tre.Push(3);
     tre.Push(5);
     tre.Push(9);
     Assert.IsTrue(tre.Contains(3));
     Assert.IsTrue(tre.Remove(3));
 }
Beispiel #2
0
 public void TestContains()
 {
     TreeTask.Tree tre = new TreeTask.Tree();
     tre.Push(5);
     tre.Push(3);
     tre.Push(9);
     tre.Push(1);
     tre.Push(2);
     tre.Push(11);
     Assert.IsTrue(tre.Contains(11));
 }
Beispiel #3
0
 public void TestPush()
 {
     TreeTask.Tree tre = new TreeTask.Tree();
     tre.Push(3);
     Assert.AreEqual(3, tre.headNode.element);
 }