use of com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl in project jqa-core-framework by buschmais.
the class PluginRepositoryTest method repositories.
@Test
public void repositories() throws PluginRepositoryException {
PluginConfigurationReader pluginConfigurationReader = new PluginConfigurationReaderImpl(PluginRepositoryTest.class.getClassLoader());
PluginRepository pluginRepository = new PluginRepositoryImpl(pluginConfigurationReader);
// Scanner plugins
ScannerContext scannerContext = mock(ScannerContext.class);
Map<String, ScannerPlugin<?, ?>> scannerPlugins = pluginRepository.getScannerPluginRepository().getScannerPlugins(scannerContext, Collections.<String, Object>emptyMap());
assertThat(scannerPlugins.size(), equalTo(2));
assertThat(scannerPlugins.get(TestScannerPlugin.class.getSimpleName()), notNullValue());
assertThat(scannerPlugins.get("testScanner"), notNullValue());
// Report plugins
Map<String, ReportPlugin> reportPlugins = pluginRepository.getReportPluginRepository().getReportPlugins(Collections.<String, Object>emptyMap());
assertThat(reportPlugins.size(), equalTo(2));
assertThat(reportPlugins.get(TestReportPlugin.class.getSimpleName()), notNullValue());
assertThat(reportPlugins.get("testReport"), notNullValue());
}
Aggregations