use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testResolver.
@Test
public void testResolver() throws Exception {
RepositoryManager manager = getRepositoryManager();
File file = manager.getArtifact(null, "moduletest", "0.1");
Assert.assertNotNull(file);
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testMavenLocal.
@Test
// this test should work, if you have org.slf4j.slf4j-api 1.5.10 present
@Ignore
public void testMavenLocal() throws Exception {
RepositoryManager manager = new SimpleRepositoryManager(MavenRepositoryHelper.getMavenRepository(), log);
ArtifactContext ac = new ArtifactContext(null, "org.slf4j.slf4j-api", "1.5.10");
File file = manager.getArtifact(ac);
Assert.assertNotNull(file);
// No remove, as we don't wanna delete from mvn manager
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testExternalNodes.
@Test
public void testExternalNodes() throws Exception {
RepositoryManagerBuilder builder = getRepositoryManagerBuilder(false, 60000, java.net.Proxy.NO_PROXY);
InMemoryContentStore imcs = new InMemoryContentStore();
OpenNode root = imcs.createRoot();
CmrRepository repo = new DefaultRepository(root);
RepositoryManager manager = builder.addRepository(repo).buildRepository();
// a few impl details, feel free to remove/ignore this test
String name = "org.eclipse.acme";
String version = "1.0.0.CR1";
ArtifactContext context = new ArtifactContext(null, name, version);
// ignore with in-memory
context.setIgnoreSHA(true);
OpenNode parent = repo.createParent(context);
parent.addContent(name + "-" + version + ArtifactContext.CAR, new ByteArrayInputStream("qwerty".getBytes()), context);
try {
File file = manager.getArtifact(context);
Assert.assertNotNull("Failed to retrieve after put", file);
} finally {
manager.removeArtifact(null, name, version);
}
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testOverridesOptionalImport.
@Test
public void testOverridesOptionalImport() throws Exception {
RepositoryManager manager = getRepositoryManager("testsuite/src/test/resources/overridesOptionalImport.xml");
ArtifactResult result = manager.getArtifactResult(null, "moduletest", "0.1");
Assert.assertNotNull(result);
Assert.assertEquals(2, result.dependencies().size());
ArtifactResult dep = result.dependencies().get(1);
Assert.assertEquals("hello", dep.name());
Assert.assertEquals("1.2.1", dep.version());
Assert.assertTrue(dep.optional());
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testCompleteComDot.
@Test
public void testCompleteComDot() throws Exception {
RepositoryManager manager = getRepositoryManager();
ModuleDetails[] expected = new ModuleDetails[] { com_acme_helloworld };
testComplete("com.", expected, manager);
}
Aggregations