Search in sources :

Example 1 with CodeGeneratorImpl

use of org.hisp.dhis.android.core.utils.CodeGeneratorImpl in project dhis2-android-sdk by dhis2.

the class TrackedEntityInstancePostCallRealIntegrationShould method setUp.

@Before
@Override
public void setUp() throws IOException {
    super.setUp();
    d2 = D2Factory.create("https://play.dhis2.org/android-current/api/", databaseAdapter());
    trackedEntityInstanceStore = new TrackedEntityInstanceStoreImpl(databaseAdapter());
    enrollmentStore = new EnrollmentStoreImpl(databaseAdapter());
    eventStore = new EventStoreImpl(databaseAdapter());
    trackedEntityAttributeValueStore = new TrackedEntityAttributeValueStoreImpl(databaseAdapter());
    trackedEntityDataValueStore = new TrackedEntityDataValueStoreImpl(databaseAdapter());
    codeGenerator = new CodeGeneratorImpl();
    orgUnitUid = "DiszpKrYNg8";
    programUid = "IpHINAT79UW";
    programStageUid = "A03MvHHogjR";
    dataElementUid = "a3kGcGDCuk6";
    trackedEntityUid = "nEenWmSyUEp";
    trackedEntityAttributeUid = "w75KJ2mc4zz";
    coordinates = "[9,9]";
    featureType = FeatureType.POINT;
    categoryOptionUid = "CW81uF03hvV";
    categoryComboOptionUid = "l5QR5hJ4u44";
    eventUid = codeGenerator.generate();
    enrollmentUid = codeGenerator.generate();
    trackedEntityInstanceUid = codeGenerator.generate();
    event1Uid = codeGenerator.generate();
    enrollment1Uid = codeGenerator.generate();
    trackedEntityInstance1Uid = codeGenerator.generate();
}
Also used : CodeGeneratorImpl(org.hisp.dhis.android.core.utils.CodeGeneratorImpl) EventStoreImpl(org.hisp.dhis.android.core.event.EventStoreImpl) EnrollmentStoreImpl(org.hisp.dhis.android.core.enrollment.EnrollmentStoreImpl) Before(org.junit.Before)

Example 2 with CodeGeneratorImpl

use of org.hisp.dhis.android.core.utils.CodeGeneratorImpl in project dhis2-android-sdk by dhis2.

the class EventPostCallRealIntegrationShould method setUp.

@Override
@Before
public void setUp() throws IOException {
    super.setUp();
    d2 = D2Factory.create(RealServerMother.url, databaseAdapter());
    eventStore = new EventStoreImpl(databaseAdapter());
    trackedEntityDataValueStore = new TrackedEntityDataValueStoreImpl(databaseAdapter());
    orgUnitUid = "ImspTQPwCqd";
    programUid = "kla3mAPgvCH";
    programStageUid = "aNLq9ZYoy9W";
    dataElementUid = "b6dOUjAarHD";
    attributeCategoryOption = "C6nZpLKjEJr";
    attributeOptionCombo = "nvLjum6Xbv5";
    categoryComboUID = "nM3u9s5a52V";
    codeGenerator = new CodeGeneratorImpl();
    eventUid = codeGenerator.generate();
}
Also used : CodeGeneratorImpl(org.hisp.dhis.android.core.utils.CodeGeneratorImpl) TrackedEntityDataValueStoreImpl(org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueStoreImpl) Before(org.junit.Before)

Aggregations

CodeGeneratorImpl (org.hisp.dhis.android.core.utils.CodeGeneratorImpl)2 Before (org.junit.Before)2 EnrollmentStoreImpl (org.hisp.dhis.android.core.enrollment.EnrollmentStoreImpl)1 EventStoreImpl (org.hisp.dhis.android.core.event.EventStoreImpl)1 TrackedEntityDataValueStoreImpl (org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueStoreImpl)1