public void TestDifferentTypeValidParentheses()
        {
            //Given
            string input    = "[()()]";
            bool   expected = true;

            //When
            ValidParentheses valid  = new ValidParentheses();
            bool             actual = valid.IsInputValid(input);

            //Then
            Assert.AreEqual(expected, actual);
        }
        public void TestInvalidParentheses()
        {
            //Given
            string input    = "[({)}()]";
            bool   expected = false;

            //When
            ValidParentheses valid  = new ValidParentheses();
            bool             actual = valid.IsInputValid(input);

            //Then
            Assert.AreEqual(expected, actual);
        }
Example #3
0
        static void Main(string[] args)
        {
            ValidParentheses valid = new ValidParentheses();

            valid.IsInputValid(valid.AskTheString());
        }