Ejemplo n.º 1
0
        public void ReturnFalseWhenInputIsNotPalindrome()
        {
            RecursivePalindromeStrategy strategy = new RecursivePalindromeStrategy();
            string input = "ab";

            bool isInputPalindrome = strategy.CheckIfInputIsPalindrome(input);

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

            bool isInputPalindrome = strategy.CheckIfInputIsPalindrome(input);

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

            bool isInputPalindrome = strategy.CheckIfInputIsPalindrome(input);

            Assert.True(isInputPalindrome);
        }