public void CheckStackIsEmpty() { Stack stack = new Stack(); int myFirstElement = 70; int mySecondElement = 30; int myThirdElement = 56; stack.Push(myFirstElement); stack.Push(mySecondElement); stack.Push(myThirdElement); stack.EmptyingTheStack(); bool result = stack.IsEmpty(); Assert.IsTrue(result); }
public void EmptyingTheStack() { Stack stack = new Stack(); int myFirstElement = 70; int mySecondElement = 30; int myThirdElement = 56; stack.Push(myFirstElement); stack.Push(mySecondElement); stack.Push(myThirdElement); stack.EmptyingTheStack(); int size = stack.Size(); Assert.AreEqual(0, size); }