public void peekValue() { Problem2 p2 = new Problem2(); p2.Push(3); int expected = 3; Object actual = p2.Peek(); Assert.AreEqual(expected, actual, "Wrong output from peeking list"); }
public void peekEmptyList() { //arange Problem2 p2 = new Problem2(); Object expected = null; //act Object actual = p2.Peek(); //assert Assert.AreEqual(expected, actual, "Wrong output from peeking empty list"); }
public void valueStillTopAfterPeek() { Problem2 p2 = new Problem2(); p2.Push(3); p2.Push(2); int expected = 2; p2.Peek(); Object actual = p2.Pop(); Assert.AreEqual(expected, actual, "Wrong output from popping list after peek"); }