}
@Test
public void testAppWithGlobalRepositoryBundle() throws Exception
{
AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test2.eba")));
IsolationTestUtils.prepareSampleBundleV2(bundleContext,
context().getService(RepositoryGenerator.class),
context().getService(RepositoryAdmin.class),
context().getService(ModellingManager.class));
AriesApplication newApp = manager.resolve(app, new ResolveConstraint() {
@Override
public String getBundleName() {
return "org.apache.aries.isolated.sample";
}
@Override
public VersionRange getVersionRange() {
return ManifestHeaderProcessor.parseVersionRange("[2.0.0,2.0.0]", true);
}
});
AriesApplicationContext ctx = manager.install(newApp);
ctx.start();
assertHelloWorldService("org.apache.aries.sample2", "hello brave new world");
manager.uninstall(ctx);
}