public void ArrayPopTest()
 {
     ArrayStack stack = new ArrayStack();
     stack.Push(10);
     stack.Push(9);
     stack.Pop();
     Assert.IsTrue(stack.Top() == 10);
 }
 public void ArrayPushTest()
 {
     ArrayStack stack = new ArrayStack();
     stack.Push(1);
     stack.Push(2);
     stack.Push(3);
     Assert.IsTrue(stack.Top() == 3);
 }
Exemple #3
0
 static void Main(string[] args)
 {
     ArrayStack stack = new ArrayStack();
     stack.Push(10);
     stack.Push(0);
     stack.Push(100);
     Console.WriteLine(" Enter");
 }
 public void ArrayWriteTest()
 {
     ArrayStack stack = new ArrayStack();
     stack.Push(10);
     stack.Push(0);
     stack.Push(100);
     string test = "100 0 10 ";
     Assert.AreEqual(stack.Write(), test);
 }
 public void ArrayWriteTest()
 {
     ArrayStack stack = new ArrayStack();
     stack.Push(10);
     stack.Push(0);
     stack.Push(100);
     string test = "100 0 10 ";
     Assert.IsTrue(stack.Write() == test);
 }
 public void ArrayClearTest()
 {
     ArrayStack stack = new ArrayStack();
     stack.Push(10);
     stack.Clear();
     Assert.IsTrue(stack.Size() == 0);
 }
 public void ArrayPushTest()
 {
     ArrayStack stack = new ArrayStack();
     stack.Push(1);
     Assert.IsTrue(stack.Size() == 1);
 }