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

            int expected = 0;

            int actual = testStack.Count();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void Count_PushnItems_Returnsn()
        {
            Stack testStack = new Stack();

            testStack.Push("Bob");
            testStack.Push("Fred");

            int expected = 2;

            int actual = testStack.Count();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 3
0
        public void Pop_DeleteTest_ReturnCountAfterPop()
        {
            Stack testStack = new Stack();
            testStack.Push("Fred");
            testStack.Pop();

            int expected = 0;

            int actual = testStack.Count();

            Assert.AreEqual(expected, actual);
        }