Example #1
0
        public void TestSingleCharacterPalindrome()
        {
            string s   = "a";
            bool   ret = PalindromeRecognizer.IsPalindrome(s);

            Assert.True(ret);
        }
Example #2
0
        public void TestNonPalindrome()
        {
            string s   = "abxvba";
            bool   ret = PalindromeRecognizer.IsPalindrome(s);

            Assert.False(ret);
        }
Example #3
0
        public void TestOddLengthPalindrome()
        {
            string s   = "abxba";
            bool   ret = PalindromeRecognizer.IsPalindrome(s);

            Assert.True(ret);
        }
Example #4
0
        public void TestEmptyStringPalindrome()
        {
            string s   = string.Empty;
            bool   ret = PalindromeRecognizer.IsPalindrome(s);

            Assert.True(ret);
        }
Example #5
0
 public void TestNullStringPalindromException()
 {
     string    s  = null;
     Exception ex = Assert.Throws <ArgumentNullException>(() => PalindromeRecognizer.IsPalindrome(s));
 }