use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testNoOverrides.
@Test
public void testNoOverrides() throws Exception {
RepositoryManager manager = getRepositoryManager();
ArtifactResult result = manager.getArtifactResult(null, "moduletest", "0.1");
Assert.assertNotNull(result);
Assert.assertEquals(2, result.dependencies().size());
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testPut.
@Test
public void testPut() throws Exception {
RepositoryManager manager = getRepositoryManager();
ByteArrayInputStream baos = new ByteArrayInputStream("qwerty".getBytes());
String name = "org.eclipse.foobar1";
String version = "1.0.0.Alpha1";
try {
manager.putArtifact(null, name, version, baos);
File file = manager.getArtifact(null, name, version);
Assert.assertNotNull("Failed to put or 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 testInnerProperties.
@Test
public void testInnerProperties() throws Exception {
RepositoryManager manager = getRepositoryManager();
ArtifactContext context = new ArtifactContext(null, "org.mood.lw", "1.0", ArtifactContext.JAR);
try {
manager.putArtifact(context, mockJar("META-INF/jbossmodules/org/mood/lw/1.0/module.properties", "moduletest=0.1\n".getBytes()));
File file = manager.getArtifact(context);
Assert.assertNotNull(file);
} finally {
manager.removeArtifact(context);
}
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testCompleteHe.
@Test
public void testCompleteHe() throws Exception {
RepositoryManager manager = getRepositoryManager();
ModuleDetails[] expected = new ModuleDetails[] { hello, hello2_jvm };
testComplete("he", expected, manager);
}
use of org.eclipse.ceylon.cmr.api.RepositoryManager in project ceylon by eclipse.
the class SmokeTestCase method testOverridesReplace.
@Test
public void testOverridesReplace() throws Exception {
RepositoryManager manager = getRepositoryManager("testsuite/src/test/resources/overridesReplace.xml");
ArtifactResult result = manager.getArtifactResult(null, "moduletest", "0.1");
Assert.assertNotNull(result);
Assert.assertEquals("com.acme.helloworld", result.name());
Assert.assertEquals("1.0.0", result.version());
Assert.assertEquals(1, result.dependencies().size());
}
Aggregations