예제 #1
0
 public void Should_return_true_when_empty_string()
 {
     Assert.That(Palindrome.IsPalindrome(string.Empty), Is.EqualTo(true));
     Assert.That(Palindrome.IsPalindromeInRecursive(string.Empty), Is.EqualTo(true));
 }
예제 #2
0
 public void Should_return_false_when_two_characters()
 {
     Assert.That(Palindrome.IsPalindrome("ab"), Is.EqualTo(false));
     Assert.That(Palindrome.IsPalindromeInRecursive("ab"), Is.EqualTo(false));
 }
예제 #3
0
 public void Should_return_false_when_string_read_from_left_to_right_not_equal_to_string_read_from_right_to_left(string input)
 {
     Assert.That(Palindrome.IsPalindrome(input), Is.EqualTo(false));
     Assert.That(Palindrome.IsPalindromeInRecursive(input), Is.EqualTo(false));
 }
예제 #4
0
 public void Should_return_true_when_one_character()
 {
     Assert.That(Palindrome.IsPalindrome("a"), Is.EqualTo(true));
     Assert.That(Palindrome.IsPalindromeInRecursive("a"), Is.EqualTo(true));
 }