예제 #1
0
        public void BracketChecker1_1_EmptyString()
        {
            // Arrange
            string str      = "";
            bool   expected = true;

            // Act
            bool actual = BracketChecker.CheckBrackets(str);

            // Assert
            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void BracketChecker1_5_TooManyClosingParentheses()
        {
            // Arrange
            string str      = "((())()))";
            bool   expected = false;

            // Act
            bool actual = BracketChecker.CheckBrackets(str);

            // Assert
            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void BracketChecker1_6_NumbersOkButTooManyClosing()
        {
            // Arrange
            string str      = "(()))(";
            bool   expected = false;

            // Act
            bool actual = BracketChecker.CheckBrackets(str);

            // Assert
            Assert.AreEqual(expected, actual);
        }
예제 #4
0
        public void BracketChecker1_3_MultipleParentheses()
        {
            // Arrange
            string str      = "((())())";
            bool   expected = true;

            // Act
            bool actual = BracketChecker.CheckBrackets(str);

            // Assert
            Assert.AreEqual(expected, actual);
        }