use of org.hisp.dhis.tracker.TrackerImportParams in project dhis2-core by dhis2.
the class TrackerImportParamsBuilderTest method testDataElementIdentifier.
@Test
void testDataElementIdentifier() {
Arrays.stream(TrackerIdScheme.values()).forEach(e -> {
paramMap.put("dataElementIdScheme", Collections.singletonList(e.name()));
TrackerImportParams params = TrackerImportParamsBuilder.build(paramMap);
assertThat(params.getIdentifiers().getDataElementIdScheme().getIdScheme(), is(e));
});
}
use of org.hisp.dhis.tracker.TrackerImportParams in project dhis2-core by dhis2.
the class TrackerImportParamsBuilderTest method testAtomicMode.
@Test
void testAtomicMode() {
Arrays.stream(AtomicMode.values()).forEach(e -> {
paramMap.put(ATOMIC_MODE_KEY.getKey(), Collections.singletonList(e.name()));
TrackerImportParams params = TrackerImportParamsBuilder.build(paramMap);
assertThat(params.getAtomicMode(), is(e));
});
}
use of org.hisp.dhis.tracker.TrackerImportParams in project dhis2-core by dhis2.
the class TrackerImportParamsBuilderTest method testImportStrategy.
@Test
void testImportStrategy() {
Arrays.stream(TrackerImportStrategy.values()).forEach(e -> {
paramMap.put(IMPORT_STRATEGY_KEY.getKey(), Collections.singletonList(e.name()));
TrackerImportParams params = TrackerImportParamsBuilder.build(paramMap);
assertThat(params.getImportStrategy(), is(e));
});
}
use of org.hisp.dhis.tracker.TrackerImportParams in project dhis2-core by dhis2.
the class TrackerImportParamsBuilderTest method testCategoryOptionComboIdentifier.
@Test
void testCategoryOptionComboIdentifier() {
Arrays.stream(TrackerIdScheme.values()).forEach(e -> {
paramMap.put("categoryOptionComboIdScheme", Collections.singletonList(e.name()));
TrackerImportParams params = TrackerImportParamsBuilder.build(paramMap);
assertThat(params.getIdentifiers().getCategoryOptionComboIdScheme().getIdScheme(), is(e));
});
}
use of org.hisp.dhis.tracker.TrackerImportParams in project dhis2-core by dhis2.
the class TrackerImportParamsBuilderTest method testValidationMode.
@Test
void testValidationMode() {
Arrays.stream(ValidationMode.values()).forEach(e -> {
paramMap.put(VALIDATION_MODE_KEY.getKey(), Collections.singletonList(e.name()));
TrackerImportParams params = TrackerImportParamsBuilder.build(paramMap);
assertThat(params.getValidationMode(), is(e));
});
}
Aggregations