public void Peek_nonString_ReturnException() { Stack testStack = new Stack(); testStack.Peek(); }
public void Peek_PushItemx_Returnsx() { Stack testStack = new Stack(); testStack.Push("Bob"); testStack.Push("Fred"); string expected = "Fred"; string actual = testStack.Peek(); Assert.AreEqual(expected, actual); }
public void Peek_PushManyItems_ReturnLastItemPushed() { Stack testStack = new Stack(); testStack.Push("Fred"); testStack.Push("Max"); testStack.Push("Jim"); testStack.Push("Tom"); string expected = "Tom"; string actual = testStack.Peek(); Assert.AreEqual(expected, actual); }