use of org.sonatype.aether.resolution.ArtifactDescriptorRequest in project sonatype-aether by sonatype.
the class IniArtifactDescriptorReaderTest method testLookup.
@Test
public void testLookup() throws ArtifactDescriptorException {
StubArtifact art = new StubArtifact("gid:aid:ext:ver");
ArtifactDescriptorRequest request = new ArtifactDescriptorRequest(art, null, "");
ArtifactDescriptorResult description = reader.readArtifactDescriptor(session, request);
assertEquals(request, description.getRequest());
assertEquals(art, description.getArtifact());
assertEquals(1, description.getRelocations().size());
Artifact artifact = description.getRelocations().get(0);
assertEquals("gid", artifact.getGroupId());
assertEquals("aid", artifact.getArtifactId());
assertEquals("ver", artifact.getVersion());
assertEquals("ext", artifact.getExtension());
assertEquals(1, description.getRepositories().size());
RemoteRepository repo = description.getRepositories().get(0);
assertEquals("id", repo.getId());
assertEquals("type", repo.getContentType());
assertEquals("protocol://some/url?for=testing", repo.getUrl());
assertDependencies(description.getDependencies());
assertDependencies(description.getManagedDependencies());
}
Aggregations