use of org.activityinfo.legacy.shared.command.result.PartnerResult in project activityinfo by bedatadriven.
the class GetPartnersDimensionHandlerTest method testIndicatorValues.
@Test
@OnDataSet("/dbunit/sites-simple1.db.xml")
public void testIndicatorValues() throws CommandException {
// NRC, Solidarites
PartnerResult result = execute(DimensionType.Indicator, 1, 2);
assertThat(result.getData().size(), equalTo(2));
assertThat(result.getData().get(0).getName(), equalTo("NRC"));
assertThat(result.getData().get(1).getName(), equalTo("Solidarites"));
}
use of org.activityinfo.legacy.shared.command.result.PartnerResult in project activityinfo by bedatadriven.
the class GetPartnersDimensionHandlerTest method testIndicatorLinked1.
@Test
@OnDataSet("/dbunit/sites-linked.db.xml")
public void testIndicatorLinked1() throws CommandException {
// NRC, NRC2
PartnerResult result = execute(DimensionType.Indicator, 1);
assertThat(result.getData().size(), equalTo(2));
assertThat(result.getData().get(0).getName(), equalTo("NRC"));
assertThat(result.getData().get(1).getName(), equalTo("NRC2"));
}
use of org.activityinfo.legacy.shared.command.result.PartnerResult in project activityinfo by bedatadriven.
the class GetPartnersDimensionHandlerTest method testIndicatorLinked100.
@Test
@OnDataSet("/dbunit/sites-linked.db.xml")
public void testIndicatorLinked100() throws CommandException {
// empty
PartnerResult result = execute(DimensionType.Indicator, 100);
assertThat(result.getData().size(), equalTo(0));
}
use of org.activityinfo.legacy.shared.command.result.PartnerResult in project activityinfo by bedatadriven.
the class GetPartnersDimensionHandlerTest method execute.
private PartnerResult execute(DimensionType type, Integer... params) {
setUser(1);
Filter filter = new Filter();
if (type != null) {
filter.addRestriction(type, Arrays.asList(params));
}
PartnerResult results = execute(filter);
System.out.println(results.getData());
return results;
}
use of org.activityinfo.legacy.shared.command.result.PartnerResult in project activityinfo by bedatadriven.
the class GetPartnersDimensionHandlerTest method testEmptyFilter.
// empty
@Test
@OnDataSet("/dbunit/sites-simple1.db.xml")
public void testEmptyFilter() throws CommandException {
PartnerResult result = this.execute();
assertThat(result.getData().size(), equalTo(0));
}
Aggregations