Search in sources :

Example 1 with PluginConfigurationReaderImpl

use of com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl 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());
}
Also used : ReportPlugin(com.buschmais.jqassistant.core.report.api.ReportPlugin) TestReportPlugin(com.buschmais.jqassistant.plugin.impl.plugin.TestReportPlugin) ScannerPlugin(com.buschmais.jqassistant.core.scanner.api.ScannerPlugin) TestScannerPlugin(com.buschmais.jqassistant.plugin.impl.plugin.TestScannerPlugin) PluginConfigurationReaderImpl(com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl) ScannerContext(com.buschmais.jqassistant.core.scanner.api.ScannerContext) PluginRepositoryImpl(com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl) Test(org.junit.Test)

Example 2 with PluginConfigurationReaderImpl

use of com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl in project jqa-core-framework by buschmais.

the class ScopePluginRepositoryTest method scopes.

@Test
public void scopes() throws PluginRepositoryException {
    PluginConfigurationReader pluginConfigurationReader = new PluginConfigurationReaderImpl();
    ScopePluginRepository repository = new ScopePluginRepositoryImpl(pluginConfigurationReader);
    assertThat(repository.getScope("test:foo"), Matchers.<Scope>equalTo(TestScope.FOO));
    assertThat(repository.getScope("Test:foo"), Matchers.<Scope>equalTo(TestScope.FOO));
    assertThat(repository.getScope("test:Foo"), Matchers.<Scope>equalTo(TestScope.FOO));
}
Also used : ScopePluginRepositoryImpl(com.buschmais.jqassistant.core.plugin.impl.ScopePluginRepositoryImpl) PluginConfigurationReader(com.buschmais.jqassistant.core.plugin.api.PluginConfigurationReader) ScopePluginRepository(com.buschmais.jqassistant.core.plugin.api.ScopePluginRepository) PluginConfigurationReaderImpl(com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl) Test(org.junit.Test)

Aggregations

PluginConfigurationReaderImpl (com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl)2 Test (org.junit.Test)2 PluginConfigurationReader (com.buschmais.jqassistant.core.plugin.api.PluginConfigurationReader)1 ScopePluginRepository (com.buschmais.jqassistant.core.plugin.api.ScopePluginRepository)1 PluginRepositoryImpl (com.buschmais.jqassistant.core.plugin.impl.PluginRepositoryImpl)1 ScopePluginRepositoryImpl (com.buschmais.jqassistant.core.plugin.impl.ScopePluginRepositoryImpl)1 ReportPlugin (com.buschmais.jqassistant.core.report.api.ReportPlugin)1 ScannerContext (com.buschmais.jqassistant.core.scanner.api.ScannerContext)1 ScannerPlugin (com.buschmais.jqassistant.core.scanner.api.ScannerPlugin)1 TestReportPlugin (com.buschmais.jqassistant.plugin.impl.plugin.TestReportPlugin)1 TestScannerPlugin (com.buschmais.jqassistant.plugin.impl.plugin.TestScannerPlugin)1