Search in sources :

Example 21 with BaseDimensionalObject

use of org.hisp.dhis.common.BaseDimensionalObject in project dhis2-core by dhis2.

the class QueryPlannerTest method validateFailureValueType.

@Test(expected = IllegalQueryException.class)
public void validateFailureValueType() {
    deB.setValueType(ValueType.FILE_RESOURCE);
    DataQueryParams params = DataQueryParams.newBuilder().addDimension(new BaseDimensionalObject(DATA_X_DIM_ID, DimensionType.DATA_X, getList(deA, deB))).addDimension(new BaseDimensionalObject(ORGUNIT_DIM_ID, DimensionType.ORGANISATION_UNIT, getList(ouA, ouB))).addDimension(new BaseDimensionalObject(PERIOD_DIM_ID, DimensionType.PERIOD, getList(peA, peB))).build();
    queryPlanner.validate(params);
}
Also used : DataQueryParams(org.hisp.dhis.analytics.DataQueryParams) BaseDimensionalObject(org.hisp.dhis.common.BaseDimensionalObject) Test(org.junit.Test) DhisSpringTest(org.hisp.dhis.DhisSpringTest)

Aggregations

BaseDimensionalObject (org.hisp.dhis.common.BaseDimensionalObject)21 DataQueryParams (org.hisp.dhis.analytics.DataQueryParams)16 Test (org.junit.Test)13 DhisSpringTest (org.hisp.dhis.DhisSpringTest)11 DimensionalItemObject (org.hisp.dhis.common.DimensionalItemObject)8 DimensionalObject (org.hisp.dhis.common.DimensionalObject)7 ArrayList (java.util.ArrayList)5 Map (java.util.Map)2 DhisConvenienceTest (org.hisp.dhis.DhisConvenienceTest)2 Grid (org.hisp.dhis.common.Grid)2 IllegalQueryException (org.hisp.dhis.common.IllegalQueryException)2 ListMap (org.hisp.dhis.common.ListMap)2 PeriodType.getPeriodTypeFromIsoString (org.hisp.dhis.period.PeriodType.getPeriodTypeFromIsoString)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 HashMap (java.util.HashMap)1 List (java.util.List)1 EventQueryParams (org.hisp.dhis.analytics.event.EventQueryParams)1 AnalyticalObject (org.hisp.dhis.common.AnalyticalObject)1 QueryFilter (org.hisp.dhis.common.QueryFilter)1 QueryItem (org.hisp.dhis.common.QueryItem)1