use of test.repository.FailingGeneratingProvider in project bnd by bndtools.
the class TestLocalIndexGeneration method testFailToGenerate.
public void testFailToGenerate() throws Exception {
MockRegistry registry = new MockRegistry();
registry.addPlugin(new FailingGeneratingProvider());
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", "Fail");
repo.setProperties(config);
repo.put(new BufferedInputStream(new FileInputStream("testdata/bundles/name.njbartlett.osgi.emf.minimal-2.6.1.jar")), new RepositoryPlugin.PutOptions());
assertTrue(reporter.getErrors().size() > 0);
assertEquals(0, reporter.getWarnings().size());
reporter.clear();
}
Aggregations