Search in sources :

Example 1 with TrackerActions

use of org.hisp.dhis.actions.tracker.importer.TrackerActions in project dhis2-core by dhis2.

the class TrackerNtiApiTest method beforeTrackerNti.

@BeforeAll
public void beforeTrackerNti() {
    trackerActions = new TrackerActions();
    loginActions = new LoginActions();
    programActions = new ProgramActions();
}
Also used : ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) TrackerActions(org.hisp.dhis.actions.tracker.importer.TrackerActions) LoginActions(org.hisp.dhis.actions.LoginActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with TrackerActions

use of org.hisp.dhis.actions.tracker.importer.TrackerActions in project dhis2-core by dhis2.

the class PotentialDuplicatesApiTest method beforeEachPotentialDuplicateTest.

@BeforeEach
public void beforeEachPotentialDuplicateTest() {
    trackerActions = new TrackerActions();
    userActions = new UserActions();
    loginActions = new LoginActions();
    potentialDuplicatesActions = new PotentialDuplicatesActions();
}
Also used : TrackerActions(org.hisp.dhis.actions.tracker.importer.TrackerActions) UserActions(org.hisp.dhis.actions.UserActions) LoginActions(org.hisp.dhis.actions.LoginActions) PotentialDuplicatesActions(org.hisp.dhis.actions.tracker.PotentialDuplicatesActions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with TrackerActions

use of org.hisp.dhis.actions.tracker.importer.TrackerActions in project dhis2-core by dhis2.

the class EventExportTests method setupTrackerEvents.

private void setupTrackerEvents() {
    Arrays.asList(captureOu, dataReadOu, searchOu, rootOu).forEach(ou -> {
        JsonObject object = new TeiDataBuilder().buildWithEnrollmentAndEvent(Constants.TRACKED_ENTITY_TYPE, ou, withRegistrationProgram, withRegistrationProgramStage);
        String eventId = new TrackerActions().postAndGetJobReport(object).validateSuccessfulImport().extractImportedEvents().get(0);
        trackerEvents.put(ou, eventId);
        // closed program events
        object = new TeiDataBuilder().buildWithEnrollmentAndEvent(Constants.TRACKED_ENTITY_TYPE, ou, closedProgramId, closedProgramProgramStageId);
        eventId = new TrackerActions().postAndGetJobReport(object, new QueryParamsBuilder().add("async", "false")).validateSuccessfulImport().extractImportedEvents().get(0);
        closedProgramEvents.put(ou, eventId);
    });
}
Also used : TeiDataBuilder(org.hisp.dhis.tracker.importer.databuilder.TeiDataBuilder) TrackerActions(org.hisp.dhis.actions.tracker.importer.TrackerActions) QueryParamsBuilder(org.hisp.dhis.helpers.QueryParamsBuilder) JsonObject(com.google.gson.JsonObject) Matchers.containsString(org.hamcrest.Matchers.containsString)

Aggregations

TrackerActions (org.hisp.dhis.actions.tracker.importer.TrackerActions)3 LoginActions (org.hisp.dhis.actions.LoginActions)2 JsonObject (com.google.gson.JsonObject)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1 UserActions (org.hisp.dhis.actions.UserActions)1 ProgramActions (org.hisp.dhis.actions.metadata.ProgramActions)1 PotentialDuplicatesActions (org.hisp.dhis.actions.tracker.PotentialDuplicatesActions)1 QueryParamsBuilder (org.hisp.dhis.helpers.QueryParamsBuilder)1 TeiDataBuilder (org.hisp.dhis.tracker.importer.databuilder.TeiDataBuilder)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1