@Test public void should_select_ghosts_projects_by_qualifiers() { setupData("fixture-including-ghost-projects-and-technical-project"); List<Component> components = dao.selectGhostsProjects(newArrayList("TRK")); assertThat(components).hasSize(1); assertThat(getKeys(components)).containsOnly("org.apache.shindig"); assertThat(dao.selectGhostsProjects(newArrayList("unknown"))).isEmpty(); assertThat(dao.selectGhostsProjects(Collections.<String>emptyList())).isEmpty(); }
public DefaultComponentQueryResult findGhostsProjects(Map<String, Object> params) { ComponentQuery query = toQuery(params); List<Component> components = resourceDao.selectGhostsProjects(query.qualifiers()); return finder.find(query, components); }