Search in sources :

Example 1 with DataSetContextBuilder

use of org.hisp.dhis.dxf2.datavalueset.ImportContext.DataSetContext.DataSetContextBuilder in project dhis2-core by dhis2.

the class DataValueSetImportValidatorTest method createMinimalDataSetContext.

private DataSetContextBuilder createMinimalDataSetContext(DataValueSet dataValueSet) {
    DataSetContextBuilder builder = DataSetContext.builder();
    if (dataValueSet != null) {
        String dsId = dataValueSet.getDataSet();
        if (dsId != null) {
            DataSet ds = new DataSet();
            ds.setUid(dsId);
            builder.dataSet(ds);
        }
    }
    return builder;
}
Also used : DataSet(org.hisp.dhis.dataset.DataSet) DataSetContextBuilder(org.hisp.dhis.dxf2.datavalueset.ImportContext.DataSetContext.DataSetContextBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString)

Aggregations

DataSet (org.hisp.dhis.dataset.DataSet)1 DataSetContextBuilder (org.hisp.dhis.dxf2.datavalueset.ImportContext.DataSetContext.DataSetContextBuilder)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1