コード例 #1
0
        public void ReturnFAILWhenSentALongStringWithoutBalancedBrackets()
        {
            string input      = "[[[]]][]";
            string expected   = "FAIL";
            var    initialize = new BalancedBracket();
            string result     = initialize.RunBalancedBracket(input);

            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void ReturnFAILWhenSentAnUnbalancedBracket()
        {
            string input      = "][";
            string expected   = "FAIL";
            var    initialize = new BalancedBracket();
            string result     = initialize.RunBalancedBracket(input);

            Assert.AreEqual(expected, result);
        }
コード例 #3
0
        public void ReturnOKWhenSentAStringWithEvenLength()
        {
            string input      = "[[]]";
            string expected   = "OK";
            var    initialize = new BalancedBracket();
            string result     = initialize.RunBalancedBracket(input);

            Assert.AreEqual(expected, result);
        }
コード例 #4
0
        public void ReturnEmptyString()
        {
            string input      = "";
            string expected   = "";
            var    initialize = new BalancedBracket();
            string result     = initialize.RunBalancedBracket(input);

            Assert.AreEqual(expected, result);
        }