Search in sources :

Example 1 with GetReports

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());
}
Also used : GetReports(org.activityinfo.shared.command.GetReports) ReportsResult(org.activityinfo.shared.command.result.ReportsResult) Test(org.junit.Test)

Example 2 with GetReports

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());
}
Also used : GetReports(org.activityinfo.shared.command.GetReports) ReportsResult(org.activityinfo.shared.command.result.ReportsResult) Test(org.junit.Test)

Aggregations

GetReports (org.activityinfo.shared.command.GetReports)2 ReportsResult (org.activityinfo.shared.command.result.ReportsResult)2 Test (org.junit.Test)2