use of org.activityinfo.shared.command.GetReports in project activityinfo by bedatadriven.
the class GetReportsTest method selectByUser2.
@Test
public void selectByUser2() {
setUser(2);
ReportsResult result = execute(new GetReports());
assertNotNull(result);
assertThat(result.getData().size(), equalTo(1));
assertEquals(2, result.getData().get(0).getId());
assertEquals("Report 1", result.getData().get(0).getTitle());
assertEquals("Bavon", result.getData().get(0).getOwnerName());
}
use of org.activityinfo.shared.command.GetReports in project activityinfo by bedatadriven.
the class GetReportsTest method selectByUser1.
@Test
public void selectByUser1() {
setUser(1);
ReportsResult result = execute(new GetReports());
assertNotNull(result);
assertTrue(result.getData().size() == 2);
assertEquals(1, result.getData().get(0).getId());
assertEquals("Report 1", result.getData().get(0).getTitle());
assertEquals("Alex", result.getData().get(0).getOwnerName());
assertEquals(3, result.getData().get(1).getId());
assertEquals("Report 3", result.getData().get(1).getTitle());
assertEquals("Alex", result.getData().get(1).getOwnerName());
}
Aggregations