def assert_apn_identifiers_equal(apn, other_apn, test_case):
    test_case.assertEqual(apn.county, other_apn.county)
    test_case.assertEqual(apn.block_number, other_apn.block_number)
    test_case.assertEqual(apn.lot_number, other_apn.lot_number)


def assert_apns_equal(apn, other_apn, test_case):
    test_case.assertEqual(apn.county, other_apn.county)
    test_case.assertEqual(apn.block_number, other_apn.block_number)
    test_case.assertEqual(apn.lot_number, other_apn.lot_number)
    test_case.assertEqual(apn.address, other_apn.address)


def assert_apn_lists_equal(apn_list, other_apn_list, test_case):
    test_case.assertEqual(len(apn_list), len(other_apn_list))
    for index, apn in enumerate(apn_list):
        other_apn = other_apn_list[index]
        assert_apns_equal(apn, other_apn, test_case)


def assert_searches_equal(search, other_search, test_case):
    test_case.assertEqual(search.address, other_search.address)
    test_case.assertEqual(search.county, other_search.county)


def participants_should_be_equal(participant, other_participant, test_case):
    test_case.assertEqual(participant.name, other_participant.name)
    test_case.assertEqual(participant.role, other_participant.role)


def participant_lists_should_be_equal(participant_list, other_participant_list, test_case):
    for index, participant in enumerate(participant_list):
        other_participant = other_participant_list[index]
        participants_should_be_equal(participant, other_participant, test_case)


def recorded_documents_should_be_equal(document, other_document, test_case):
    test_case.assertEqual(document.recorded_date, other_document.recorded_date)
    test_case.assertEqual(document.document_identifier, other_document.document_identifier)
    test_case.assertEqual(document.document_type, other_document.document_type)
    test_case.assertEqual(document.document_url, other_document.document_url)


def recorded_document_lists_should_be_equal(document_list, other_document_list, test_case):
    for index, participant in enumerate(document_list):
        other_document = other_document_list[index]
        recorded_documents_should_be_equal(participant, other_document, test_case)