Exemplo n.º 1
0
        public void I_can_validate_brackets(string input, bool expected)
        {
            // Arrange
            // from data

            // Act
            bool actual = BracketValidation.MultiBracketValidation(input);

            //Assert

            Assert.Equal(expected, actual);
        }
Exemplo n.º 2
0
        public void ReturnsFalseUnbalancedStringTest()
        {
            BracketValidation bracketValidation = new BracketValidation();

            Assert.False(bracketValidation.MultiBracketValidation("[({}]"));
        }
Exemplo n.º 3
0
        public void ReturnsFalseIfOnlyOneBracketInStringTest()
        {
            BracketValidation bracketValidation = new BracketValidation();

            Assert.False(bracketValidation.MultiBracketValidation("["));
        }
Exemplo n.º 4
0
        public void CanValidateBalancedStringTest()
        {
            BracketValidation bracketValidation = new BracketValidation();

            Assert.True(bracketValidation.MultiBracketValidation("(){}[[]]"));
        }