Exemplo n.º 1
0
// Test Data - Fill the object with test values in every field.
MediationProcess *MediationProcess::SampleData()
{
    MediationProcess *result = new MediationProcess();

    // unique string to append to fields
    static int _SAMPLE_INDEX = 0;
    std::stringstream ss;
    ss << ++_SAMPLE_INDEX;
    std::string strId = ss.str();
    result->GetParties()->clear();
    for(int i=0; i < rand() % 4 + 1; ++i)
        result->AddParty(Party::SampleData());

    result->_countyOfMediation = (CountyIds)(rand() % 3 + 1);
    result->_disputeType = (DisputeTypes)(rand() % 7 + 1);
    result->_requiresSpanish = rand() % 2;
    result->_processInternalState = (DisputeProcessInternalStates)( rand() % 5 + 1 );
    result->_referalSource = (ReferralTypes)(rand() % 8 + 1);
    result->_sessionType = (SessionTypes) (rand() % 3 + 1);

    MediationSessionVector *temp = new MediationSessionVector;
    for(int i = 0; i< rand() % 5 + 1; i++)
        temp->push_back(MediationSession::SampleData());
    result->setMediationSessionVector(temp);
    for(int i=0; i < 5; ++i)
        result->GetNotes()->push_back(new Note("Some more mediation notes " + QString::number(i)));

    return result;
}
Exemplo n.º 2
0
MediationProcess* DB_TEST_BASE::InitializeEntireMediationProcess()
{
    MediationProcess* object = InitializeProcessObject(full_process_values);
    object->AddParty(InitializeClientObject(InitializePersonObject(full_person_values)));
    //object->AddParty(InitializeClientObject(InitializePersonObject(empty_person_values)));

    MediationSessionVector* sessions = new MediationSessionVector;
    MediationSession *pointer = InitializeSessionObject(full_session_values);
    pointer->addClientSessionData(InitializeClientSessionObject(full_client_session_values));

    sessions->push_back(pointer);

    object->setMediationSessionVector(sessions);

    return object;
}