示例#1
0
        public void Stack_IsEmpty_Pop_Until_Empty_ReturnsTrue()
        {
            Stack stack = new Stack();
            stack.Push("Testing");

            while (!stack.isEmpty())
            {
                stack.Pop();
            }

            bool expected = true;
            bool actual = stack.isEmpty();

            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void Stack_IsEmpty_New_Stack_ReturnsTrue()
        {
            Stack stack = new Stack();
            bool expected = true;
            bool actual = stack.isEmpty();

            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void Stack_Pop_IsEmpty_Stack_ReturnsFalse()
        {
            Stack stack = new Stack();
            stack.Push("Testing");

            bool expected = false;
            bool actual = stack.isEmpty();

            Assert.AreEqual(expected, actual);
        }