public void DoesPeekShowTopElementWhenStackIsNotEmpty() { ArrayTypedStack stack = new ArrayTypedStack(3); stack.Push(2); stack.Push(3); int actual = (int)stack.Peek(); int expected = 3; Assert.AreEqual(expected, actual); int actualSize = stack.Size; int expectedSize = 2; Assert.AreEqual(expectedSize, actualSize); }
public void DoesPeekShowAnythingWhenStackIsEmpty() { ArrayTypedStack stack = new ArrayTypedStack(3); stack.Peek(); }