Ejemplo n.º 1
0
        public void CountTestOnEmptyStack()
        {
            Stack testStack = new Stack();

            int expected = 0;

            int actual = testStack.Count();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void CountTestOnPreviouslyPoplulatedStack()
        {
            Stack testStack = new Stack();
            StringNode testString1 = new StringNode();
            StringNode testString2 = new StringNode();
            testString1.Value = "Test String 1";
            testString2.Value = "Test String 2";

            int expected = 0;

            testStack.Push(testString1);
            testStack.Push(testString2);
            testStack.Pop();
            testStack.Pop();

            int actual = testStack.Count();

            Assert.AreEqual(expected, actual);
        }