Exemple #1
0
        public void ReturnFalseWhenInputIsNotPalindrome()
        {
            RecursivePalindromeStrategy strategy = new RecursivePalindromeStrategy();
            string input = "ab";

            bool isInputPalindrome = strategy.CheckIfInputIsPalindrome(input);

            Assert.False(isInputPalindrome);
        }
Exemple #2
0
        public void ReturnTrueWhenInputIsPalindrome()
        {
            RecursivePalindromeStrategy strategy = new RecursivePalindromeStrategy();
            string input = "Madam";

            bool isInputPalindrome = strategy.CheckIfInputIsPalindrome(input);

            Assert.True(isInputPalindrome);
        }
Exemple #3
0
        public void ReturnTrueWhenInputIsPalindromeAndContainsPunctuations()
        {
            RecursivePalindromeStrategy strategy = new RecursivePalindromeStrategy();
            string input = "to!p sp#ot";

            bool isInputPalindrome = strategy.CheckIfInputIsPalindrome(input);

            Assert.True(isInputPalindrome);
        }