def test_comparar_string(self): anagrama = Anagrama('a', 'a') self.assertTrue(anagrama.comparar_string()) anagrama = Anagrama('ab', 'ab') self.assertTrue(anagrama.comparar_string()) anagrama = Anagrama('roma', 'amor') self.assertTrue(anagrama.comparar_string()) anagrama = Anagrama('ba', 'ab') self.assertTrue(anagrama.comparar_string()) anagrama = Anagrama('b', 'ab') self.assertFalse( anagrama.comparar_string()) anagrama = Anagrama('ba', 'a') self.assertFalse(anagrama.comparar_string())
def test_espaco(self): anagrama = Anagrama(' ', '') self.assertTrue(anagrama.comparar_string()) anagrama = Anagrama('a', 'a ') self.assertTrue(anagrama.comparar_string())
def test_string_vazio(self): anagrama = Anagrama('', '') self.assertTrue(anagrama.comparar_string())