use of org.hisp.dhis.actions.dataitem.DataItemActions in project dhis2-core by dhis2.
the class DataItemQueryTests method before.
@BeforeAll
public void before() {
dataItemActions = new DataItemActions();
login();
}
use of org.hisp.dhis.actions.dataitem.DataItemActions in project dhis2-core by dhis2.
the class OrgUnitProfileTests method shouldApplyDataItems.
@Test
public void shouldApplyDataItems() {
List<String> datItems = new DataItemActions().get("", new QueryParamsBuilder().add("filter=dimensionItemType:in:[DATA_ELEMENT,PROGRAM_INDICATOR]")).extractList("dataItems.id");
JsonArray array = new JsonArray();
datItems.forEach(p -> array.add(p));
orgUnitProfileActions.post(new JsonObjectBuilder().addArray("dataItems", array).build()).validate().statusCode(200);
orgUnitProfileActions.get().validate().body("dataItems", hasSize(greaterThanOrEqualTo(1)));
// todo add validation for organisationUnitProfile/id/data
}
Aggregations