public void ArrayClearTest() { ArrayStack stack = new ArrayStack(); stack.Push(10); stack.Clear(); Assert.IsTrue(stack.Size() == 0); }
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); }
static void Main(string[] args) { ArrayStack stack = new ArrayStack(); stack.Push(10); stack.Push(0); stack.Push(100); Console.WriteLine(" Enter"); }
public void SimpleIncreaseTest() { IStack stack = new ArrayStack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(10); calculator.Push(2); calculator.Increase(); Assert.AreEqual(20, calculator.Result()); }
public void SimpleDeductTest() { IStack stack = new ArrayStack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(10); calculator.Push(2); calculator.Deduct(); Assert.AreEqual(8, calculator.Result()); }
public void SimpleAddTest() { IStack stack = new ArrayStack(); StackCalculator calculator = new StackCalculator(stack); calculator.Push(1); calculator.Push(2); calculator.Add(); Assert.AreEqual(3, calculator.Result()); }
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 ArraySizeTest() { ArrayStack stack = new ArrayStack(); Assert.AreEqual(0, stack.Size()); }
public void ArrayPushTest() { ArrayStack stack = new ArrayStack(); stack.Push(1); Assert.IsTrue(stack.Size() == 1); }