public void Peek_PushSevenPeekAndCount_ReturnSeven() { Stack target = new Stack(); target.Push("a"); target.Push("b"); target.Push("c"); target.Push("d"); target.Push("e"); target.Push("f"); target.Push("h"); target.Peek(); int expected = 7; int actual = target.Count(); Assert.AreEqual(expected, actual); }
public void Push_OneItemOnNewStackCallPeek_ReturnItem() { Stack target = new Stack(); String testItem = "MyApplesAreBad"; target.Push(testItem); String expected = testItem; String actual = target.Peek(); Assert.AreEqual(expected, actual); }
public void Peek_CalledOnNewStack_ReturnException() { Stack target = new Stack(); target.Peek(); Assert.Fail(); }