Search in sources :

Example 6 with AttributeGroupResult

use of org.activityinfo.shared.command.result.AttributeGroupResult in project activityinfo by bedatadriven.

the class GetAttributeGroupsDimensionHandlerTest method testIndicatorEmpty.

// report filter population queries
@Test
@OnDataSet("/dbunit/sites-simple1.db.xml")
public void testIndicatorEmpty() throws CommandException {
    // empty
    AttributeGroupResult result = execute(DimensionType.Indicator, 103, 675, 5, 6);
    assertThat(result.getData().size(), equalTo(0));
}
Also used : AttributeGroupResult(org.activityinfo.shared.command.result.AttributeGroupResult) OnDataSet(org.activityinfo.server.database.OnDataSet) Test(org.junit.Test)

Example 7 with AttributeGroupResult

use of org.activityinfo.shared.command.result.AttributeGroupResult in project activityinfo by bedatadriven.

the class GetAttributeGroupsDimensionHandlerTest method testIndicatorLinked100.

@Test
@OnDataSet("/dbunit/sites-linked.db.xml")
public void testIndicatorLinked100() throws CommandException {
    // empty
    AttributeGroupResult result = execute(DimensionType.Indicator, 100);
    assertThat(result.getData().size(), equalTo(0));
}
Also used : AttributeGroupResult(org.activityinfo.shared.command.result.AttributeGroupResult) OnDataSet(org.activityinfo.server.database.OnDataSet) Test(org.junit.Test)

Example 8 with AttributeGroupResult

use of org.activityinfo.shared.command.result.AttributeGroupResult in project activityinfo by bedatadriven.

the class GetAttributeGroupsDimensionHandlerTest method testActivity.

// data entry filter population query
@Test
@OnDataSet("/dbunit/sites-simple1.db.xml")
public void testActivity() throws CommandException {
    AttributeGroupResult result = execute(DimensionType.Activity, 1);
    assertThat(result.getData().size(), equalTo(1));
    assertThat(result.getData().get(0).getName(), equalTo("cause"));
}
Also used : AttributeGroupResult(org.activityinfo.shared.command.result.AttributeGroupResult) OnDataSet(org.activityinfo.server.database.OnDataSet) Test(org.junit.Test)

Example 9 with AttributeGroupResult

use of org.activityinfo.shared.command.result.AttributeGroupResult in project activityinfo by bedatadriven.

the class GetAttributeGroupsDimensionHandlerTest method testIndicatorLinked2.

@Test
@OnDataSet("/dbunit/sites-linked.db.xml")
public void testIndicatorLinked2() throws CommandException {
    // cause
    AttributeGroupResult result = execute(DimensionType.Indicator, 2);
    assertThat(result.getData().size(), equalTo(1));
    assertThat(result.getData().get(0).getName(), equalTo("cause"));
}
Also used : AttributeGroupResult(org.activityinfo.shared.command.result.AttributeGroupResult) OnDataSet(org.activityinfo.server.database.OnDataSet) Test(org.junit.Test)

Example 10 with AttributeGroupResult

use of org.activityinfo.shared.command.result.AttributeGroupResult in project activityinfo by bedatadriven.

the class GetAttributeGroupsDimensionHandlerTest method testIndicatorValue.

@Test
@OnDataSet("/dbunit/sites-simple1.db.xml")
public void testIndicatorValue() throws CommandException {
    // cause
    AttributeGroupResult result = execute(DimensionType.Indicator, 1, 2);
    assertThat(result.getData().size(), equalTo(1));
    assertThat(result.getData().get(0).getName(), equalTo("cause"));
}
Also used : AttributeGroupResult(org.activityinfo.shared.command.result.AttributeGroupResult) OnDataSet(org.activityinfo.server.database.OnDataSet) Test(org.junit.Test)

Aggregations

AttributeGroupResult (org.activityinfo.shared.command.result.AttributeGroupResult)10 OnDataSet (org.activityinfo.server.database.OnDataSet)8 Test (org.junit.Test)8 GetAttributeGroupsDimension (org.activityinfo.shared.command.GetAttributeGroupsDimension)2 AttributeGroupDTO (org.activityinfo.shared.dto.AttributeGroupDTO)2 AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)1 ArrayList (java.util.ArrayList)1 Comparator (java.util.Comparator)1 List (java.util.List)1 Filter (org.activityinfo.shared.command.Filter)1 GetSchema (org.activityinfo.shared.command.GetSchema)1 PivotSites (org.activityinfo.shared.command.PivotSites)1 Bucket (org.activityinfo.shared.command.result.Bucket)1 SchemaDTO (org.activityinfo.shared.dto.SchemaDTO)1 EntityCategory (org.activityinfo.shared.report.content.EntityCategory)1 Dimension (org.activityinfo.shared.report.model.Dimension)1