use of org.hisp.dhis.tracker.TrackerIdentifier in project dhis2-core by dhis2.
the class TrackerPreheatIdentifiersTest method testProgramStageIdentifiers.
@Test
void testProgramStageIdentifiers() {
List<Pair<String, TrackerIdentifier>> data = buildDataSet("NpsdDv6kKSO", "PRGA", "ProgramA");
for (Pair<String, TrackerIdentifier> pair : data) {
Event event = new Event();
event.setProgramStage(pair.getLeft());
TrackerImportParams params = buildParams(event, builder().programStageIdScheme(pair.getRight()).build());
TrackerPreheat preheat = trackerPreheatService.preheat(params);
assertPreheatedObjectExists(preheat, ProgramStage.class, pair.getRight(), pair.getLeft());
}
}
use of org.hisp.dhis.tracker.TrackerIdentifier in project dhis2-core by dhis2.
the class TrackerPreheatIdentifiersTest method testCategoryOptionComboIdentifiers.
@Test
void testCategoryOptionComboIdentifiers() {
List<Pair<String, TrackerIdentifier>> data = buildDataSet("XXXvX50cXC0", "COCA", "COCAname");
for (Pair<String, TrackerIdentifier> pair : data) {
Event event = new Event();
event.setAttributeOptionCombo(pair.getLeft());
TrackerImportParams params = buildParams(event, builder().categoryOptionComboIdScheme(pair.getRight()).build());
TrackerPreheat preheat = trackerPreheatService.preheat(params);
assertPreheatedObjectExists(preheat, CategoryOptionCombo.class, pair.getRight(), pair.getLeft());
}
}
Aggregations