Search in sources :

Example 16 with StubArtifact

use of org.sonatype.aether.test.util.impl.StubArtifact in project sonatype-aether by sonatype.

the class ResumeGetTest method before.

@Before
public void before() throws Exception {
    factory = new AsyncRepositoryConnectorFactory(new SysoutLogger(), new TestFileProcessor());
    session = new TestRepositorySystemSession();
    artifact = new StubArtifact("gid", "aid", "classifier", "extension", "version");
    server = new Server(0);
}
Also used : TestRepositorySystemSession(org.sonatype.aether.test.impl.TestRepositorySystemSession) TestFileProcessor(org.sonatype.aether.test.impl.TestFileProcessor) Server(org.eclipse.jetty.server.Server) SysoutLogger(org.sonatype.aether.test.impl.SysoutLogger) StubArtifact(org.sonatype.aether.test.util.impl.StubArtifact) Before(org.junit.Before)

Example 17 with StubArtifact

use of org.sonatype.aether.test.util.impl.StubArtifact in project sonatype-aether by sonatype.

the class DefaultArtifactResolverTest method setup.

@Before
public void setup() throws IOException {
    UpdateCheckManager updateCheckManager = new StaticUpdateCheckManager(true);
    remoteRepositoryManager = new StubRemoteRepositoryManager();
    VersionResolver versionResolver = new StubVersionResolver();
    session = new TestRepositorySystemSession();
    lrm = (TestLocalRepositoryManager) session.getLocalRepositoryManager();
    resolver = new DefaultArtifactResolver(NullLogger.INSTANCE, TestFileProcessor.INSTANCE, new StubRepositoryEventDispatcher(), versionResolver, updateCheckManager, remoteRepositoryManager, new StubSyncContextFactory());
    artifact = new StubArtifact("gid", "aid", "", "ext", "ver");
    connector = new RecordingRepositoryConnector();
    remoteRepositoryManager.setConnector(connector);
}
Also used : TestRepositorySystemSession(org.sonatype.aether.test.impl.TestRepositorySystemSession) VersionResolver(org.sonatype.aether.impl.VersionResolver) UpdateCheckManager(org.sonatype.aether.impl.UpdateCheckManager) StubArtifact(org.sonatype.aether.test.util.impl.StubArtifact) Before(org.junit.Before)

Aggregations

StubArtifact (org.sonatype.aether.test.util.impl.StubArtifact)17 Test (org.junit.Test)8 Artifact (org.sonatype.aether.artifact.Artifact)8 StubMetadata (org.sonatype.aether.test.util.impl.StubMetadata)7 File (java.io.File)6 ArtifactDownload (org.sonatype.aether.spi.connector.ArtifactDownload)6 ArtifactUpload (org.sonatype.aether.spi.connector.ArtifactUpload)6 MetadataDownload (org.sonatype.aether.spi.connector.MetadataDownload)5 MetadataUpload (org.sonatype.aether.spi.connector.MetadataUpload)5 Before (org.junit.Before)4 RemoteRepository (org.sonatype.aether.repository.RemoteRepository)4 RepositoryConnector (org.sonatype.aether.spi.connector.RepositoryConnector)4 TestRepositorySystemSession (org.sonatype.aether.test.impl.TestRepositorySystemSession)4 ArrayList (java.util.ArrayList)3 Metadata (org.sonatype.aether.metadata.Metadata)3 TestFileProcessor (org.sonatype.aether.test.impl.TestFileProcessor)3 Dependency (org.sonatype.aether.graph.Dependency)2 ArtifactDescriptorRequest (org.sonatype.aether.resolution.ArtifactDescriptorRequest)2 SysoutLogger (org.sonatype.aether.test.impl.SysoutLogger)2 IOException (java.io.IOException)1