use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class EventsDataValueValidationTests method beforeAll.
@BeforeAll
public void beforeAll() {
programActions = new ProgramActions();
sharingActions = new SharingActions();
dataElementActions = new DataElementActions();
loginActions.loginAsSuperUser();
setupData();
}
use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class TrackerNtiApiTest method beforeTrackerNti.
@BeforeAll
public void beforeTrackerNti() {
trackerActions = new TrackerActions();
loginActions = new LoginActions();
programActions = new ProgramActions();
}
use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class EnrollmentsUpdateTests method shouldNotUpdateImmutableProperties.
@Test
public void shouldNotUpdateImmutableProperties() throws Exception {
String enrollmentId = importEnrollment();
String program = new ProgramActions().createProgram("WITH_REGISTRATION").extractUid();
JsonObject body = trackerActions.get("/enrollments/" + enrollmentId).getBody();
body = JsonObjectBuilder.jsonObject(body).addProperty("enrollment", enrollmentId).addProperty("trackedEntity", importTei()).addProperty("program", program).wrapIntoArray("enrollments");
trackerActions.postAndGetJobReport(body, new QueryParamsBuilder().add("importStrategy=UPDATE")).validateErrorReport().body("", hasSize(Matchers.greaterThanOrEqualTo(2))).body("errorCode", hasItems("E1127", "E1127")).body("message", Matchers.hasItem(Matchers.containsString("trackedEntity"))).body("message", Matchers.hasItem(Matchers.containsString("program")));
}
use of org.hisp.dhis.actions.metadata.ProgramActions in project dhis2-core by dhis2.
the class EventValidationTests method beforeAll.
@BeforeAll
public void beforeAll() {
programActions = new ProgramActions();
eventActions = new EventActions();
loginActions.loginAsSuperUser();
setupData();
}
use of org.hisp.dhis.actions.metadata.ProgramActions 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();
}
Aggregations