@Test public void testGetIssues() throws Exception { RestInvocations.loadMetadata(handler, "defect"); RestInvocations.loadMetadata(handler, "release-backlog-item"); RestInvocations.loadMetadata(handler, "requirement"); handler.addRequest(false, "GET", "/qcbin/rest/domains/domain/projects/project/defects?fields=&query={name['*what*']}&order-by={}", 200) .content("entityServiceTest_entity.xml"); handler.addRequest(false, "GET", "/qcbin/rest/domains/domain/projects/project/requirements?fields=&query={name['*what*']}&order-by={}", 200) .content("no_entities.xml"); HpAlmRepository repository = new HpAlmRepository(getProject().getName(), 1); repository._assignProject(); Task[] list = repository.getIssues("what", 5, 100); Assert.assertEquals(1, list.length); checkTask(list[0]); }
public Task[] getIssues(String query, int max, long since) throws Exception { if(!_assignProject()) { return new Task[0]; } List<HpAlmTask> list = new LinkedList<HpAlmTask>(); loadTasks(query, defect, "defect", list); loadTasks(query, requirement, "requirement", list); return list.toArray(new Task[list.size()]); }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task[] getIssues(String query, int max, long since) throws Exception { if(!_assignProject()) { return new Task[0]; } List<HpAlmTask> list = new LinkedList<HpAlmTask>(); loadTasks(query, defect, "defect", list); loadTasks(query, requirement, "requirement", list); return list.toArray(new Task[list.size()]); } }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task[] getIssues(String query, int max, long since) throws Exception { if(!_assignProject()) { return new Task[0]; } List<HpAlmTask> list = new LinkedList<HpAlmTask>(); loadTasks(query, defect, "defect", list); loadTasks(query, requirement, "requirement", list); return list.toArray(new Task[list.size()]); } HpAlmRepository();  HpAlmRepository(String url, long id); }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task[] getIssues(String query, int max, long since) throws Exception { if(!_assignProject()) { return new Task[0]; } List<HpAlmTask> list = new LinkedList<HpAlmTask>(); loadTasks(query, defect, "defect", list); loadTasks(query, requirement, "requirement", list); return list.toArray(new Task[list.size()]); } HpAlmRepository();  HpAlmRepository(String url, long id); void setId(long id); @Tag("defect") TaskConfig getDefect(); void setDefect(TaskConfig defect); @Tag("requirement") TaskConfig getRequirement(); void setRequirement(TaskConfig requirement); @Attribute("id") long getId(); String getPresentableName(); boolean isConfigured(); Task[] getIssues(String query, int max, long since); @Override void setPreferredOpenTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredOpenTaskState(); @Override void setPreferredCloseTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredCloseTaskState(); Task findTask(String taskName); String extractId(String taskName); HpAlmRepository clone(); boolean equals(Object o); int hashCode(); int compareTo(HpAlmRepository other); }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task[] getIssues(String query, int max, long since) throws Exception { if(!_assignProject()) { return new Task[0]; } List<HpAlmTask> list = new LinkedList<HpAlmTask>(); loadTasks(query, defect, "defect", list); loadTasks(query, requirement, "requirement", list); return list.toArray(new Task[list.size()]); } HpAlmRepository();  HpAlmRepository(String url, long id); void setId(long id); @Tag("defect") TaskConfig getDefect(); void setDefect(TaskConfig defect); @Tag("requirement") TaskConfig getRequirement(); void setRequirement(TaskConfig requirement); @Attribute("id") long getId(); String getPresentableName(); boolean isConfigured(); Task[] getIssues(String query, int max, long since); @Override void setPreferredOpenTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredOpenTaskState(); @Override void setPreferredCloseTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredCloseTaskState(); Task findTask(String taskName); String extractId(String taskName); HpAlmRepository clone(); boolean equals(Object o); int hashCode(); int compareTo(HpAlmRepository other);  }