Delimiter //
/**
 * Test suite for Contact domain
 * @test
 */
Drop Procedure if exists TEST_SUITE_CONTACTS//
Create Procedure TEST_SUITE_CONTACTS()
Begin

    -- Main functions
    CALL TEST_LOADER_CONTACTS_CHECK_NULL();
    CALL TEST_LOADER_CONTACTS_CHECK_LENGTH();

    -- Reference
    CALL TEST_LOADER_CONTACTS_NORMALIZE_CONTACTS_REF_LENGTH();
    CALL TEST_LOADER_CONTACTS_MAP_ACCOUNT_REF_PROVIDED();
    CALL TEST_LOADER_CONTACTS_MAP_CONTACT_CREATE_OR_UPDATE();

    -- Address
    CALL TEST_LOADER_CONTACTS_CHECK_ADDRESS_LINE1_MAX_LENGTH();
    CALL TEST_LOADER_CONTACTS_CHECK_ZIP_CODE_MAX_LENGTH();
    CALL TEST_LOADER_CONTACTS_CHECK_CITY_MAX_LENGTH();
    CALL TEST_LOADER_CONTACTS_MAP_COUNTRY_NOT_PROVIDED();

    -- Name
    CALL TEST_LOADER_CONTACTS_CHECK_FIRST_NAME_MAX_LENGTH();
    CALL TEST_LOADER_CONTACTS_CHECK_LAST_NAME_MAX_LENGTH();
    CALL TEST_LOADER_CONTACTS_LAST_NAME_UPPERCASE();
    CALL TEST_LOADER_CONTACTS_NORMALIZE_MAP_LAST_NAME_PROVIDED();

    -- Title
    CALL TEST_LOADER_CONTACTS_SHORT_TITLE_PROVIDED_OR_NOT();

    -- FORMS
    CAll TEST_LOADER_CONTACTS_SHORT_FORM_PROVIDED_OR_NOT();

	-- Function
    CALL TEST_LOADER_CONTACTS_MAP_FUNCTION_PROVIDED_OR_NOT();

    -- Language
    CALL TEST_LOADER_CONTACTS_MAP_LANGUAGE_PROVIDED_OR_NOT();
    
    -- Email
    CALL TEST_LOADER_CONTACTS_EMAIL_VALID();
    CALL TEST_LOADER_CONTACTS_MAP_EMAIL_PROVIDED();

    -- Phones
    CALL TEST_LOADER_CONTACTS_PHONE_PROVIDED_OR_NOT();

    -- Main contact
    Call TEST_LOADER_CONTACTS_NORMALIZE_MAP_MAIN_FROMACCOUNT_NOTPROVIDED();
    Call TEST_LOADER_CONTACTS_NORMALIZE_MAP_MAIN_FROMACCOUNT_PROVIDED();
    Call TEST_LOADER_CONTACTS_NORMALIZE_MAP_MAIN_FROMCONTACT_NOTPROVIDED();
    Call TEST_LOADER_CONTACTS_NORMALIZE_MAP_MAIN_FROMCONTACT_PROVIDED();

    -- copy
    call TEST_LOADER_CONTACTS_COPY_CONTACTS_PHONES;
    call TEST_LOADER_CONTACTS_COPY_CONTACTS_INDIVIDUAL;
    call TEST_LOADER_CONTACTS_COPY_CONTACTS_EMAILS;
    call TEST_LOADER_CONTACTS_COPY_CONTACTS_BUSINESS;
--     call TEST_LOADER_CONTACTS_COPY_CONTACTS_ADRESSES;
    call TEST_LOADER_CONTACTS_COPY_CONTACTS;


End //
Delimiter ;
