Search in sources :

Example 1 with DefaultServiceLocator

use of org.sonatype.aether.impl.internal.DefaultServiceLocator in project sonatype-aether by sonatype.

the class DefaultServiceLocatorTest method testGetRepositorySystem.

@Test
public void testGetRepositorySystem() {
    DefaultServiceLocator locator = new DefaultServiceLocator();
    locator.addService(ArtifactDescriptorReader.class, StubArtifactDescriptorReader.class);
    locator.addService(VersionResolver.class, StubVersionResolver.class);
    locator.addService(VersionRangeResolver.class, StubVersionRangeResolver.class);
    RepositorySystem repoSys = locator.getService(RepositorySystem.class);
    assertNotNull(repoSys);
}
Also used : RepositorySystem(org.sonatype.aether.RepositorySystem) DefaultServiceLocator(org.sonatype.aether.impl.internal.DefaultServiceLocator) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 RepositorySystem (org.sonatype.aether.RepositorySystem)1 DefaultServiceLocator (org.sonatype.aether.impl.internal.DefaultServiceLocator)1