use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class UserAssignmentTests method beforeAll.
@BeforeAll
public void beforeAll() {
programActions = new ProgramActions();
metadataActions = new MetadataActions();
loginActions.loginAsSuperUser();
metadataActions.importAndValidateMetadata(new File("src/test/resources/tracker/eventProgram.json"));
}
use of org.hisp.dhis.actions.metadata.ProgramActions 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);
}
use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class EventImportDataValueValidationTests method beforeAll.
@BeforeAll
public void beforeAll() throws Exception {
programActions = new ProgramActions();
eventActions = new EventActions();
dataElementActions = new DataElementActions();
new LoginActions().loginAsAdmin();
setupData();
}
use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class EventIdSchemeTests method beforeAll.
@BeforeAll
public void beforeAll() {
orgUnitActions = new OrgUnitActions();
programActions = new ProgramActions();
attributeActions = new AttributeActions();
loginActions.loginAsSuperUser();
setupData();
}
use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class PotentialDuplicatesAttributeMergeTests method beforeEach.
@BeforeEach
public void beforeEach() {
loginActions.loginAsAdmin();
attributes = new ProgramActions().get(program, new QueryParamsBuilder().addAll("filter=programTrackedEntityAttributes.valueType:eq:TEXT")).extractList("programTrackedEntityAttributes.trackedEntityAttribute.id", String.class);
}
Aggregations