@Test public void testGetMultipleTeams() { handler.addRequest("GET", "/qcbin/rest/domains/domain/projects/project/teams?fields=id,release-id,name&query={name['The Others']}&order-by={}", 200) .content("teamServiceTest_teams2.xml"); EntityList list = teamService.getMultipleTeams(Arrays.asList("The Team", "The Others")); Assert.assertEquals(3, list.size()); Assert.assertEquals(101, list.get(0).getId()); Assert.assertEquals("1000", list.get(0).getPropertyValue("release-id")); Assert.assertEquals(101, list.get(1).getId()); Assert.assertEquals("1001", list.get(1).getPropertyValue("release-id")); Assert.assertEquals(102, list.get(2).getId()); Assert.assertEquals("1001", list.get(2).getPropertyValue("release-id")); teamService.getMultipleTeams(Arrays.asList("The Team", "The Others")); }
public EntityList getMultipleTeams(List<String> teamNames) { EntityList entities = EntityList.empty(); for(String teamName: teamNames) { entities.addAll(getTeams(teamName)); } return entities; }
TeamService extends AbstractCachingEntityService<String> { public EntityList getMultipleTeams(List<String> teamNames) { EntityList entities = EntityList.empty(); for(String teamName: teamNames) { entities.addAll(getTeams(teamName)); } return entities; } }
TeamService extends AbstractCachingEntityService<String> { public EntityList getMultipleTeams(List<String> teamNames) { EntityList entities = EntityList.empty(); for(String teamName: teamNames) { entities.addAll(getTeams(teamName)); } return entities; } TeamService(Project project, EntityService entityService); }
TeamService extends AbstractCachingEntityService<String> { public EntityList getMultipleTeams(List<String> teamNames) { EntityList entities = EntityList.empty(); for(String teamName: teamNames) { entities.addAll(getTeams(teamName)); } return entities; } TeamService(Project project, EntityService entityService); Entity getTeam(String teamName, int releaseId); List<Entity> getTeams(String teamName); EntityList getMultipleTeams(List<String> teamNames); }
TeamService extends AbstractCachingEntityService<String> { public EntityList getMultipleTeams(List<String> teamNames) { EntityList entities = EntityList.empty(); for(String teamName: teamNames) { entities.addAll(getTeams(teamName)); } return entities; } TeamService(Project project, EntityService entityService); Entity getTeam(String teamName, int releaseId); List<Entity> getTeams(String teamName); EntityList getMultipleTeams(List<String> teamNames);  }