Search in sources :

Example 1 with SharingActions

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

the class MetadataPatchTests method before.

@BeforeAll
public void before() {
    dataElementActions = new DataElementActions();
    loginActions = new LoginActions();
    dataElementGroupActions = new RestApiActions("/dataElementGroups");
    sharingActions = new SharingActions();
    loginActions.loginAsAdmin();
    dataElementId = dataElementActions.create(dataElementActions.body("SUM", "AGGREGATE", "TEXT"));
    dataElementGroupId = dataElementGroupActions.create(new JsonObjectBuilder().addProperty("name", DataGenerator.randomString()).addArray("dataElements", new JsonObjectBuilder().addProperty("id", dataElementId).build()).build());
}
Also used : RestApiActions(org.hisp.dhis.actions.RestApiActions) SharingActions(org.hisp.dhis.actions.metadata.SharingActions) DataElementActions(org.hisp.dhis.actions.metadata.DataElementActions) LoginActions(org.hisp.dhis.actions.LoginActions) JsonObjectBuilder(org.hisp.dhis.helpers.JsonObjectBuilder) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with SharingActions

use of org.hisp.dhis.actions.metadata.SharingActions 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();
}
Also used : SharingActions(org.hisp.dhis.actions.metadata.SharingActions) ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) DataElementActions(org.hisp.dhis.actions.metadata.DataElementActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

DataElementActions (org.hisp.dhis.actions.metadata.DataElementActions)2 SharingActions (org.hisp.dhis.actions.metadata.SharingActions)2 BeforeAll (org.junit.jupiter.api.BeforeAll)2 LoginActions (org.hisp.dhis.actions.LoginActions)1 RestApiActions (org.hisp.dhis.actions.RestApiActions)1 ProgramActions (org.hisp.dhis.actions.metadata.ProgramActions)1 JsonObjectBuilder (org.hisp.dhis.helpers.JsonObjectBuilder)1