Esempio n. 1
0
    def test_get_letter_at(self):
        word = Word("noon")
        palindrome = Palindrome(word)

        assert_that(palindrome.get_letter_at(0), is_("n"))
Esempio n. 2
0
 def test_palindrome_word_with_odd_number_letters(self):
     word = Word("racecar")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(True))
Esempio n. 3
0
 def test_returns_false_when_given_a_none_palindrom(self):
     word = Word("dented")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(False))
Esempio n. 4
0
 def test_false_if_word_not_palindrome(self):
     word = Word("Boss")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(False))
Esempio n. 5
0
 def test_get_last_index(self):
     word = Word("Boss")
     palindrome = Palindrome(word)
     assert_that(palindrome.get_last_index(), is_(3))
Esempio n. 6
0
 def test_returns_legth_of_another_word(self):
     word = Word("Very Long word")
     palindrome = Palindrome(word)
     assert_that(palindrome.get_letter_at(13), is_("d"))
Esempio n. 7
0
 def test_is_palindrome(self):
     word = Word("noon")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(True))
Esempio n. 8
0
 def test_returns_false_when_given_a_none_palindrom(self):
     word = Word("dented")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(False))
Esempio n. 9
0
    def test_get_letter_at(self):
        word = Word("noon")
        palindrome = Palindrome(word)

        assert_that(palindrome.get_letter_at(0), is_("n"))
Esempio n. 10
0
 def test_palindrome_word_with_odd_number_letters(self):
     word = Word("racecar")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(True))
Esempio n. 11
0
 def test_get_last_index(self):
     word = Word("Boss")
     palindrome = Palindrome(word)
     assert_that(palindrome.get_last_index(), is_(3))
Esempio n. 12
0
 def test_false_if_word_not_palindrome(self):
     word = Word("Boss")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(False))
Esempio n. 13
0
 def test_is_palindrome(self):
     word = Word("noon")
     palindrome = Palindrome(word)
     assert_that(palindrome.is_palindrome(), is_(True))
Esempio n. 14
0
 def test_returns_legth_of_another_word(self):
     word = Word("Very Long word")
     palindrome = Palindrome(word)
     assert_that(palindrome.get_letter_at(13), is_("d"))