use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testCompleteEmptyJS.
@Test
public void testCompleteEmptyJS() throws Exception {
RepositoryManager manager = getRepositoryManager();
ModuleDetails[] expected = new ModuleDetails[] { com_acme_helloworld_js, hello_js, hello2_js, jsonly, moduletest_js };
testComplete("", expected, manager, ModuleQuery.Type.JS);
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testXmlResolver.
@Test
public void testXmlResolver() throws Exception {
RepositoryManager manager = getRepositoryManager();
ArtifactContext context = new ArtifactContext(null, "older-jar", "12-b3", ArtifactContext.JAR);
File file = manager.getArtifact(context);
Assert.assertNotNull(file);
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testOverridesReplaceGlobalNoVersion.
@Test
public void testOverridesReplaceGlobalNoVersion() throws Exception {
RepositoryManager manager = getRepositoryManager("testsuite/src/test/resources/overridesReplaceGlobalNoVersion.xml");
ArtifactResult result = manager.getArtifactResult(null, "com.acme.helloworld", "1.0.0");
Assert.assertNotNull(result);
Assert.assertEquals("hello", result.name());
Assert.assertEquals("1.2.1", result.version());
Assert.assertEquals(1, result.dependencies().size());
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testFolderPut.
@Test
public void testFolderPut() throws Exception {
RepositoryManager manager = getRepositoryManager();
File docs = new File(getFolders(), "docs");
String name = "org.eclipse.docs";
String version = "1.0.0.CR3";
ArtifactContext template = new ArtifactContext();
template.setName(name);
template.setVersion(version);
ArtifactContext context = template.getDocsContext();
manager.putArtifact(context, docs);
try {
File copy = manager.getArtifact(context);
File x = new File(copy, "x.txt");
Assert.assertTrue(x.exists());
File y = new File(copy, "sub/y.txt");
Assert.assertTrue(y.exists());
} finally {
manager.removeArtifact(context);
}
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testOverridesShareImport.
@Test
public void testOverridesShareImport() throws Exception {
RepositoryManager manager = getRepositoryManager("testsuite/src/test/resources/overridesShareImport.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.exported());
}
Aggregations