public void CountNewStack_ReturnsZero() { Stack stack = new Stack(); int expected = 0; int actual = stack.Count(); Assert.AreEqual(expected, actual, "Count of new stack does not equal 0"); }
public void PushCount_ReturnsCountOfPushed() { Stack stack = new Stack(); String pushed1 = null; String pushed2 = ""; String pushed3 = "three"; stack.Push(pushed1); stack.Push(pushed2); stack.Push(pushed3); int expected = 3; int actual = stack.Count(); Assert.AreEqual(expected, actual, "Number of items pushed does not equal number of items counted"); }
public void PushPopCount_ReturnsZero() { Stack stack = new Stack(); String pushed1 = "one"; stack.Push(pushed1); stack.Pop(); int expected = 0; int actual = stack.Count(); Assert.AreEqual(expected, actual, "Popped stack not empty"); }