use of org.sonatype.aether.test.impl.TestRepositorySystemSession in project sonatype-aether by sonatype.
the class SimpleLocalRepositoryManagerTest method setup.
@Before
public void setup() throws IOException {
basedir = TestFileUtils.createTempDir("simple-repo");
manager = new SimpleLocalRepositoryManager(basedir);
session = new TestRepositorySystemSession();
}
use of org.sonatype.aether.test.impl.TestRepositorySystemSession in project sonatype-aether by sonatype.
the class ConnectorTestSuiteSetup method before.
/**
* If called for the first time, calls
* {@link ConnectorTestSetup#beforeClass(org.sonatype.aether.RepositorySystemSession)}. Always calls
* {@link ConnectorTestSetup#before(org.sonatype.aether.RepositorySystemSession, Map)}.
*/
@Before
public void before() throws Exception {
session = new TestRepositorySystemSession();
repository = connectorSetup.before(session, context);
}
use of org.sonatype.aether.test.impl.TestRepositorySystemSession in project sonatype-aether by sonatype.
the class IniArtifactDescriptorReaderTest method setup.
@Before
public void setup() throws IOException {
reader = new IniArtifactDescriptorReader("org/sonatype/aether/test/util/");
session = new TestRepositorySystemSession();
}
use of org.sonatype.aether.test.impl.TestRepositorySystemSession in project sonatype-aether by sonatype.
the class DefaultDeployerTest method setup.
@Before
public void setup() throws IOException {
artifact = new DefaultArtifact("gid", "aid", "jar", "ver");
artifact = artifact.setFile(TestFileUtils.createTempFile("artifact"));
metadata = new DefaultMetadata("gid", "aid", "ver", "type", Nature.RELEASE_OR_SNAPSHOT, TestFileUtils.createTempFile("metadata"));
session = new TestRepositorySystemSession();
manager = new StubRemoteRepositoryManager();
deployer = new DefaultDeployer();
deployer.setRemoteRepositoryManager(manager);
deployer.setRepositoryEventDispatcher(new StubRepositoryEventDispatcher());
UpdateCheckManager updateCheckManager = new StaticUpdateCheckManager(true);
deployer.setUpdateCheckManager(updateCheckManager);
deployer.setFileProcessor(TestFileProcessor.INSTANCE);
deployer.setSyncContextFactory(new StubSyncContextFactory());
request = new DeployRequest();
request.setRepository(new RemoteRepository("id", "default", "file:///"));
connector = new RecordingRepositoryConnector();
manager.setConnector(connector);
listener = new RecordingRepositoryListener();
session.setRepositoryListener(listener);
}
use of org.sonatype.aether.test.impl.TestRepositorySystemSession in project sonatype-aether by sonatype.
the class DefaultInstallerTest method setup.
@Before
public void setup() throws IOException {
artifact = new DefaultArtifact("gid", "aid", "jar", "ver");
artifact = artifact.setFile(TestFileUtils.createTempFile("artifact".getBytes(), 1));
metadata = new DefaultMetadata("gid", "aid", "ver", "type", Nature.RELEASE_OR_SNAPSHOT, TestFileUtils.createTempFile("metadata".getBytes(), 1));
session = new TestRepositorySystemSession();
localArtifactPath = session.getLocalRepositoryManager().getPathForLocalArtifact(artifact);
localMetadataPath = session.getLocalRepositoryManager().getPathForLocalMetadata(metadata);
localArtifactFile = new File(session.getLocalRepository().getBasedir(), localArtifactPath);
installer = new DefaultInstaller();
installer.setFileProcessor(TestFileProcessor.INSTANCE);
installer.setRepositoryEventDispatcher(new StubRepositoryEventDispatcher());
installer.setSyncContextFactory(new StubSyncContextFactory());
request = new InstallRequest();
listener = new RecordingRepositoryListener();
session.setRepositoryListener(listener);
lrm = (TestLocalRepositoryManager) session.getLocalRepositoryManager();
TestFileUtils.delete(session.getLocalRepository().getBasedir());
}
Aggregations