public void Stack_IsEmpty_ReturnsFalseOnNonEmptyStackAfterMultiplePops() { Stack stack = new Stack(); bool expectedIsEmptyReturnValue = false; stack.Push("Hello worldz"); stack.Push("Hi again"); stack.Push("Hi again, again"); stack.Push("Hi again, but I'll be popped soon :("); stack.Pop(); stack.Pop(); bool actualIsEmptyReturnValue = stack.IsEmpty(); Assert.AreEqual(expectedIsEmptyReturnValue, actualIsEmptyReturnValue); }
public void Stack_IsEmpty_ReturnsTrueOnPreviouslyPopulatedEmptyStack() { Stack stack = new Stack(); bool expectedIsEmptyReturnValue = true; stack.Push("Dataz"); stack.Push("More dataz"); stack.Pop(); stack.Pop(); bool actualIsEmptyReturnValue = stack.IsEmpty(); Assert.AreEqual(actualIsEmptyReturnValue, expectedIsEmptyReturnValue); }
public void Stack_IsEmpty_ReturnsFalseOnNonEmptyStack() { Stack stack = new Stack(); bool expectedIsEmptyReturnValue = false; stack.Push("Hello worldz"); stack.Push("Hi again"); bool actualIsEmptyReturnValue = stack.IsEmpty(); Assert.AreEqual(expectedIsEmptyReturnValue, actualIsEmptyReturnValue); }
public void Stack_IsEmpty_ReturnsTrueOnNewlyCreatedStack() { Stack stack = new Stack(); bool expectedIsEmptyReturnValue = true; bool actualIsEmptyReturnValue = stack.IsEmpty(); Assert.AreEqual(expectedIsEmptyReturnValue, actualIsEmptyReturnValue); }