Search in sources :

Example 1 with TrackedEntityAttributeActions

use of org.hisp.dhis.actions.metadata.TrackedEntityAttributeActions in project dhis2-core by dhis2.

the class AnalyticsDimensionsTest method beforeAll.

@BeforeAll
public void beforeAll() {
    trackedEntityAttributeActions = new TrackedEntityAttributeActions();
    programActions = new ProgramActions();
    analyticsEnrollmentsActions = new AnalyticsEnrollmentsActions();
    analyticsEventActions = new AnalyticsEventActions();
}
Also used : AnalyticsEventActions(org.hisp.dhis.actions.analytics.AnalyticsEventActions) ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) AnalyticsEnrollmentsActions(org.hisp.dhis.actions.analytics.AnalyticsEnrollmentsActions) TrackedEntityAttributeActions(org.hisp.dhis.actions.metadata.TrackedEntityAttributeActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with TrackedEntityAttributeActions

use of org.hisp.dhis.actions.metadata.TrackedEntityAttributeActions in project dhis2-core by dhis2.

the class EnrollmentAttributeTests method beforeEach.

@BeforeEach
public void beforeEach() {
    teaAttributeActions = new TrackedEntityAttributeActions();
    programActions = new ProgramActions();
    loginActions.loginAsAdmin();
    programId = programActions.createTrackerProgram(Constants.TRACKED_ENTITY_TYPE, Constants.ORG_UNIT_IDS).extractUid();
    setupAttributes();
}
Also used : ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) TrackedEntityAttributeActions(org.hisp.dhis.actions.metadata.TrackedEntityAttributeActions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with TrackedEntityAttributeActions

use of org.hisp.dhis.actions.metadata.TrackedEntityAttributeActions in project dhis2-core by dhis2.

the class TeiValidationTests method setupData.

private void setupData() {
    TrackedEntityAttributeActions trackedEntityAttributeActions = new TrackedEntityAttributeActions();
    ProgramActions programActions = new ProgramActions();
    TrackedEntityTypeActions trackedEntityTypeActions = new TrackedEntityTypeActions();
    trackedEntityType = trackedEntityTypeActions.create();
    // create attributes
    uniqueTetAttribute = trackedEntityAttributeActions.create("TEXT", true);
    mandatoryTetAttribute = trackedEntityAttributeActions.create("TEXT");
    mandatoryProgramAttribute = trackedEntityAttributeActions.create("TEXT");
    attributeWithOptionSet = trackedEntityAttributeActions.createOptionSetAttribute("ZGkmoWb77MW");
    trackedEntityTypeActions.addAttribute(trackedEntityType, mandatoryTetAttribute, true);
    trackedEntityTypeActions.addAttribute(trackedEntityType, attributeWithOptionSet, false);
    trackedEntityTypeActions.addAttribute(trackedEntityType, uniqueTetAttribute, false);
    // create a program
    program = programActions.createTrackerProgram(trackedEntityType, Constants.ORG_UNIT_IDS).extractUid();
    programActions.addAttribute(program, mandatoryProgramAttribute, true);
}
Also used : TrackedEntityTypeActions(org.hisp.dhis.actions.metadata.TrackedEntityTypeActions) ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) TrackedEntityAttributeActions(org.hisp.dhis.actions.metadata.TrackedEntityAttributeActions)

Aggregations

ProgramActions (org.hisp.dhis.actions.metadata.ProgramActions)3 TrackedEntityAttributeActions (org.hisp.dhis.actions.metadata.TrackedEntityAttributeActions)3 AnalyticsEnrollmentsActions (org.hisp.dhis.actions.analytics.AnalyticsEnrollmentsActions)1 AnalyticsEventActions (org.hisp.dhis.actions.analytics.AnalyticsEventActions)1 TrackedEntityTypeActions (org.hisp.dhis.actions.metadata.TrackedEntityTypeActions)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1