use of test.lib.MockRegistry in project bnd by bndtools.
the class TestLocalIndexGeneration method testNonGeneratingProvider.
public void testNonGeneratingProvider() throws Exception {
MockRegistry registry = new MockRegistry();
registry.addPlugin(new NonGeneratingProvider());
LocalIndexedRepo repo = new LocalIndexedRepo();
repo.setRegistry(registry);
repo.setReporter(reporter);
Map<String, String> config = new HashMap<String, String>();
config.put("local", outputDir.getAbsolutePath());
config.put("type", "Nongenerating");
repo.setProperties(config);
repo.put(new BufferedInputStream(new FileInputStream("testdata/bundles/name.njbartlett.osgi.emf.minimal-2.6.1.jar")), new RepositoryPlugin.PutOptions());
assertEquals(0, reporter.getErrors().size());
assertTrue(reporter.getWarnings().size() > 0);
reporter.clear();
}
Aggregations