Example #1
0
 public void PopGoodTest()
 {
     Stack stack = new Stack();
     stack.Push(10);
     stack.Push(9);
     stack.Pop();
     Assert.IsTrue(stack.Top() == 10);
 }
Example #2
0
 public void WriteTest()
 {
     Stack stack = new Stack();
     stack.Push(10);
     stack.Push(0);
     stack.Push(100);
     string test = "100 0 10 ";
     Assert.IsTrue(stack.Write() == test);
 }
Example #3
0
 public void ClearTest()
 {
     Stack stack = new Stack();
     stack.Push(10);
     stack.Clear();
     Assert.IsTrue(stack.Size() == 0);
 }
Example #4
0
 public void PushTest()
 {
     Stack stack = new Stack();
     stack.Push(1);
     Assert.IsTrue(stack.Size() == 1);
 }