Пример #1
0
        public void Count_OnNewStack_Return0()
        {
            Stack testStack = new Stack();

            int expected = 0;

            int actual = testStack.Count();

            Assert.AreEqual(expected, actual);
        }
Пример #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);
        }
Пример #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);
        }