Search in sources :

Example 1 with NonGeneratingProvider

use of test.repository.NonGeneratingProvider 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();
}
Also used : NonGeneratingProvider(test.repository.NonGeneratingProvider) HashMap(java.util.HashMap) BufferedInputStream(java.io.BufferedInputStream) MockRegistry(test.lib.MockRegistry) RepositoryPlugin(aQute.bnd.service.RepositoryPlugin) FileInputStream(java.io.FileInputStream)

Aggregations

RepositoryPlugin (aQute.bnd.service.RepositoryPlugin)1 BufferedInputStream (java.io.BufferedInputStream)1 FileInputStream (java.io.FileInputStream)1 HashMap (java.util.HashMap)1 MockRegistry (test.lib.MockRegistry)1 NonGeneratingProvider (test.repository.NonGeneratingProvider)1