@Test public void testSearchByGavc() throws IOException { List<RepoPath> results = artifactory.searches().artifactsByGavc() .groupId("com.example") .artifactId(artifactId) .version("1.0.0") .classifier("zip") .doSearch(); assertEquals(results.size(), 1); assertTrue(results.get(0).getItemPath().contains(artifactId + "-1.0.0-zip.jar")); }
@Test public void testSearchByGavcAndRepository() throws IOException { List<RepoPath> results = artifactory.searches().artifactsByGavc() .groupId("com.example") .artifactId(artifactId) .version("1.0.0") .classifier("zip") .repositories(localRepository.getKey()) .doSearch(); assertEquals(results.size(), 1); assertTrue(results.get(0).getItemPath().contains(artifactId + "-1.0.0-zip.jar")); }