def test_merge_sll__when_one_of_lists_is_empty(self): first_sll = self.payload.get('first_sll') empty_sll = self.payload.get('empty_sll') compare_classes_instance = InteractSingleLinkedLists(first_single_linked_list=first_sll, second_single_linked_list=empty_sll) resulted_sll = compare_classes_instance.merge() self.assertEqual(resulted_sll.get_length(), first_sll.get_length()) self.assertEqual(resulted_sll.get_string_of_values(), first_sll.get_string_of_values())
def test_merge_sll(self): first_sll = self.payload.get('first_sll') second_sll = self.payload.get('second_sll') compare_classes_instance = InteractSingleLinkedLists(first_single_linked_list=first_sll, second_single_linked_list=second_sll) resulted_sll = compare_classes_instance.merge() self.assertEqual(resulted_sll.get_length(), 14) self.assertEqual(resulted_sll.get_string_of_values(), self.payload.get('resulted_sll_string'))