public void IsEmptyNewStack_ReturnsTrue() { Stack stack = new Stack(); bool expected = true; bool actual = stack.IsEmpty(); Assert.AreEqual(expected, actual, "New Stack is not empty"); }
public void IsEmptyPoppedStack_ReturnsTrue() { Stack stack = new Stack(); stack.Push("one"); stack.Pop(); bool expected = true; bool actual = stack.IsEmpty(); Assert.AreEqual(expected, actual, "The popped stack is not empty"); }
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 PushedStackIsEmpty_ReturnsFalse() { Stack stack = new Stack(); stack.Push("one"); bool expected = false; bool actual = stack.IsEmpty(); Assert.AreEqual(expected, actual, "The pushed stack is empty"); }
public void PushPop_DeletesPopValue() { Stack stack = new Stack(); String pushed = "one"; stack.Push(pushed); stack.Pop(); bool expectedBool = true; bool actualBool = stack.IsEmpty(); Assert.AreEqual(expectedBool, actualBool, "Popped value not deleted"); }