public void PeekEmptyStack_ReturnsException() { Stack stack = new Stack(); stack.Peek(); }
public void PushPeek_RetainsPeekValue() { Stack stack = new Stack(); String pushed = "one"; stack.Push(pushed); stack.Peek(); bool expectedBool = false; bool actualBool = stack.IsEmpty(); Assert.AreEqual(expectedBool, actualBool, "Peeked value not on top of stack"); }
public void PushPeek_ReturnsPushValue() { Stack stack = new Stack(); String pushed = "one"; stack.Push(pushed); String peeked = stack.Peek(); Assert.AreEqual(pushed, peeked, "Pushed value does not equal peeked value"); }