use of org.eclipse.ceylon.test.smoke.support.InMemoryContentStore 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);
}
}
Aggregations