public void testPluginPackaging() throws Exception { Query query = new TermQuery(new Term(ArtifactInfo.PACKAGING, "maven-plugin")); FlatSearchResponse response = nexusIndexer.searchFlat(new FlatSearchRequest(query)); // repo contains 3 artifacts with packaging "maven-plugin", but one of the is actually an // archetype! assertEquals(response.getResults().toString(), 2, response.getTotalHits()); }
public void testArchetypePackaging() throws Exception { Query query = new TermQuery(new Term(ArtifactInfo.PACKAGING, "maven-archetype")); FlatSearchResponse response = nexusIndexer.searchFlat(new FlatSearchRequest(query)); assertEquals(response.getResults().toString(), 4, response.getTotalHits()); }