Search in sources :

Example 6 with TrackerIdentifierParams

use of org.hisp.dhis.tracker.TrackerIdentifierParams in project dhis2-core by dhis2.

the class TrackerImportParamsBuilderTest method assertDefaultParams.

private void assertDefaultParams(TrackerImportParams params) {
    assertThat(params.getValidationMode(), is(ValidationMode.FULL));
    assertThat(params.getImportMode(), is(TrackerBundleMode.COMMIT));
    assertThat(params.getImportStrategy(), is(TrackerImportStrategy.CREATE_AND_UPDATE));
    assertThat(params.getAtomicMode(), is(AtomicMode.ALL));
    assertThat(params.getFlushMode(), is(FlushMode.AUTO));
    TrackerIdentifierParams identifiers = params.getIdentifiers();
    assertThat(identifiers.getOrgUnitIdScheme(), is(TrackerIdentifier.UID));
    assertThat(identifiers.getProgramIdScheme(), is(TrackerIdentifier.UID));
    assertThat(identifiers.getCategoryOptionComboIdScheme(), is(TrackerIdentifier.UID));
    assertThat(identifiers.getCategoryOptionIdScheme(), is(TrackerIdentifier.UID));
    assertThat(identifiers.getDataElementIdScheme(), is(TrackerIdentifier.UID));
    assertThat(identifiers.getProgramStageIdScheme(), is(TrackerIdentifier.UID));
    assertThat(identifiers.getIdScheme(), is(TrackerIdentifier.UID));
}
Also used : TrackerIdentifierParams(org.hisp.dhis.tracker.TrackerIdentifierParams)

Aggregations

TrackerIdentifierParams (org.hisp.dhis.tracker.TrackerIdentifierParams)6 Test (org.junit.jupiter.api.Test)4 DataElement (org.hisp.dhis.dataelement.DataElement)2 ProgramStage (org.hisp.dhis.program.ProgramStage)2 ProgramStageDataElement (org.hisp.dhis.program.ProgramStageDataElement)2 TrackerImportParams (org.hisp.dhis.tracker.TrackerImportParams)2 TrackerTest (org.hisp.dhis.tracker.TrackerTest)2 DataValue (org.hisp.dhis.tracker.domain.DataValue)2 Event (org.hisp.dhis.tracker.domain.Event)2 ValidationErrorReporter (org.hisp.dhis.tracker.report.ValidationErrorReporter)2