ProjectHandler implements ProjectService.Iface { @Override public Project getProjectById(String id, User user) throws TException { assertUser(user); assertId(id); Project project = handler.getProjectById(id, user); assertNotNull(project); return project; } ProjectHandler(); @Override List<Project> refineSearch(String text, Map<String, Set<String>> subQueryRestrictions, User user); @Override List<Project> getMyProjects(String user); @Override List<Project> getAccessibleProjectsSummary(User user); @Override Set<Project> getAccessibleProjects(User user); @Override List<Project> searchByName(String name, User user); @Override Set<Project> searchByReleaseId(String id, User user); @Override Set<Project> searchByReleaseIds(Set<String> ids, User user); @Override Set<Project> searchLinkingProjects(String id, User user); @Override Project getProjectById(String id, User user); @Override List<Project> getProjectsById(List<String> id, User user); @Override Project getProjectByIdForEdit(String id, User user); @Override int getCountByReleaseIds(Set<String> ids); @Override int getCountByProjectId(String id); @Override AddDocumentRequestSummary addProject(Project project, User user); @Override RequestStatus updateProject(Project project, User user); RequestStatus updateProjectFromModerationRequest(Project projectAdditions, Project projectDeletions, User user); @Override RequestStatus deleteProject(String id, User user); @Override List<ProjectLink> getLinkedProjectsOfProject(Project project, boolean deep, User user); @Override List<ProjectLink> getLinkedProjectsById(String id, boolean deep, User user); @Override List<ProjectLink> getLinkedProjects(Map<String, ProjectRelationship> relations, User user); @Override Map<String, List<String>> getDuplicateProjects(); @Override List<Project> fillClearingStateSummary(List<Project> projects, User user); @Override List<Project> fillClearingStateSummaryIncludingSubprojects(List<Project> projects, User user); @Override List<ReleaseClearingStatusData> getReleaseClearingStatuses(String projectId, User user); @Override RequestStatus removeAttachmentFromProject(String projectId, User user, String attachmentContentId); @Override boolean projectIsUsed(String projectId);  }
@Test(expected = SW360Exception.class) public void testGetProjectByIdUser1_2() throws Exception { handler.getProjectById("P1", user2); }
@Test public void testGetProjectByIdUser1_3() throws Exception { Project project1 = handler.getProjectById("P1", user3); assertEquals("P1", project1.getId()); }
@Test public void testGetProjectByIdUser2_1() throws Exception { Project project2 = handler.getProjectById("P2", user1); assertEquals("P2", project2.getId()); }
@Test public void testGetProjectByIdUser2_2() throws Exception { Project project2 = handler.getProjectById("P2", user2); assertEquals("P2", project2.getId()); }
@Test(expected = SW360Exception.class) public void testGetProjectByIdUser2_3() throws Exception { handler.getProjectById("P2", user3); }
@Test public void testGetProjectByIdUser3_1() throws Exception { Project project3 = handler.getProjectById("P3", user1); assertEquals("P3", project3.getId()); }
@Test(expected = SW360Exception.class) public void testGetProjectByIdUser3_2() throws Exception { handler.getProjectById("P3", user2); }
@Test public void testGetProjectByIdUser3_3() throws Exception { Project project3 = handler.getProjectById("P3", user3); assertEquals("P3", project3.getId()); }
@Test public void testGetProjectByIdUser1_1() throws Exception { Project project1 = handler.getProjectById("P1", user1); assertEquals("P1", project1.getId()); }