public void TestStackAddElements() { Stack testStack = new Stack(); testStack.Push(10); testStack.Push(10); testStack.Push(10); testStack.Push(10); Assert.AreEqual(4, testStack.Size(), "The size is not calculated correctly"); }
public void TestStackResize() { Stack testStack = new Stack(); int numberOfAddedElements = 12; for (int i = 0; i < numberOfAddedElements; i++) { testStack.Push(10); } Assert.AreEqual(numberOfAddedElements, testStack.Size(), "The size is not calculated correctly"); }
public void TestStackSizeNoElements() { Stack testStack = new Stack(); Assert.AreEqual(0, testStack.Size(), "The size is not calculated correctly"); }