public void AddQuote_Supported()
        {
            var validator = new QuoteBracketsValidator();

            validator.AddQuote('\'');
            validator.AddQuote('"');
        }
        public void AdvancedValidator_MultipleValidCases()
        {
            var validator = new QuoteBracketsValidator();

            validator.AddQuote('"');
            validator.AddOrUpdateBracketPair('[', ']');
            Assert.IsTrue(validator.Validate("()[]"));
            Assert.IsTrue(validator.Validate("([])"));
            Assert.IsTrue(validator.Validate("'\"\"\"\"'"));
            Assert.IsTrue(validator.Validate("'\"[\"[\"[\"[]\"]\"]\"]\"'"));
            Assert.IsTrue(validator.Validate("\"\"''([])"));
            Assert.IsTrue(validator.Validate("([[\"\"]('')]([]))"));
            Assert.IsTrue(validator.Validate("'\"\"[(\"\")]'"));
            Assert.IsTrue(validator.Validate("'\"\"[(\"\")]\"\"'"));
        }
        public void AdvancedValidator_MultipleInValidCases()
        {
            var validator = new QuoteBracketsValidator();

            validator.AddQuote('"');
            validator.AddOrUpdateBracketPair('[', ']');
            Assert.IsFalse(validator.Validate("(()"));
            Assert.IsFalse(validator.Validate("()())"));
            Assert.IsFalse(validator.Validate("(()"));
            Assert.IsFalse(validator.Validate("()())"));
            Assert.IsFalse(validator.Validate("\"'\"'"));
            Assert.IsFalse(validator.Validate("(')[']"));
            Assert.IsFalse(validator.Validate("\"[\"]\"\"'"));
            Assert.IsFalse(validator.Validate("('\"\"\"\"'"));
            Assert.IsFalse(validator.Validate("'\"[\"[\"[\"[]\"]\"]\"]\"')"));
            Assert.IsFalse(validator.Validate("(\"\"''([])"));
            Assert.IsFalse(validator.Validate("([[\"\"]('')]([]))["));
            Assert.IsFalse(validator.Validate("'\"\"[(\"\")]['"));
            Assert.IsFalse(validator.Validate("'\"\"[(\"\")]\"\"']"));
        }
        public void AddQuote_NotSupported_ThrowArgumentException()
        {
            var validator = new QuoteBracketsValidator();

            validator.AddQuote('?');
        }