Exemplo n.º 1
0
 public void PeekEmptyStack_ReturnsException()
 {
     Stack stack = new Stack();
     stack.Peek();
 }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
        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");
        }