use of org.activityinfo.shared.command.result.Bucket in project activityinfo by bedatadriven.
the class PivotSitesHandlerLocalTest method testIndicatorOrder.
@Test
public void testIndicatorOrder() {
withIndicatorAsDimension();
filter.addRestriction(DimensionType.Indicator, 1);
filter.addRestriction(DimensionType.Indicator, 2);
execute();
assertEquals(2, buckets.size());
Bucket indicator1 = findBucketsByCategory(buckets, indicatorDim, new EntityCategory(1)).get(0);
Bucket indicator2 = findBucketsByCategory(buckets, indicatorDim, new EntityCategory(2)).get(0);
EntityCategory cat1 = (EntityCategory) indicator1.getCategory(indicatorDim);
EntityCategory cat2 = (EntityCategory) indicator2.getCategory(indicatorDim);
assertEquals(2, cat1.getSortOrder().intValue());
assertEquals(OWNER_USER_ID, cat2.getSortOrder().intValue());
}
Aggregations