use of org.hisp.dhis.rules.models.RuleEnrollment in project dhis2-core by dhis2.
the class ProgramRuleEntityMapperServiceTest method testMappedEnrollment.
@Test
void testMappedEnrollment() {
RuleEnrollment ruleEnrollment = subject.toMappedRuleEnrollment(programInstance, Collections.emptyList());
assertEquals(ruleEnrollment.enrollment(), programInstance.getUid());
assertEquals(ruleEnrollment.organisationUnit(), programInstance.getOrganisationUnit().getUid());
assertEquals(ruleEnrollment.attributeValues().size(), 1);
assertEquals(ruleEnrollment.attributeValues().get(0).value(), SAMPLE_VALUE_A);
}
Aggregations