public void IsEmpty_OnStackWithTwoStrings_ReturnFalse() { Node testNode = new Node("Test"); Node testNode2 = new Node("Test2"); Stack testStack = new Stack(); testStack.Push(testNode); testStack.Push(testNode2); bool expected = false; bool actual = testStack.IsEmpty(); Assert.AreEqual(expected, actual); }
public void Peek_OnPopulatedStack_ReturnString() { Node testNode = new Node("test"); Stack testStack = new Stack(); testStack.Push(testNode); string expected = "test"; string actual = testStack.Peek(); Assert.AreEqual(expected, actual); }
public void IsEmpty_OnNewlyEmptyStack_ReturnTrue() { Node testNode = new Node("Test"); Stack testStack = new Stack(); testStack.Push(testNode); testStack.Pop(); bool expected = true; bool actual = testStack.IsEmpty(); Assert.AreEqual(expected, actual); }