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

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

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

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

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