Esempio n. 1
0
  @Test
  public void testGetAll() throws DAOException {

    boolean memberExist = false;
    List<Project> projectsTest = projectService.getAll();

    assertNotNull(projectsTest);
    assertTrue(projectsTest.size() > 0);

    for (Project project : projectsTest) {
      if ((project.getMembers() != null) && (project.getMembers().size() > 0)) {
        memberExist = true;
        break;
      }
    }

    assertTrue(memberExist);
  }
 @GET()
 @Produces(MediaType.APPLICATION_JSON)
 public Response getAll() {
   return Response.ok(service.getAll()).build();
 }