Search in sources :

Example 1 with TestScannerPlugin

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

the class PluginRepositoryImplTest method getScannerPluginProperties.

private Map<String, Object> getScannerPluginProperties(PluginRepository pluginRepository, Map<String, Object> properties) {
    ScannerPluginRepository scannerPluginRepository = pluginRepository.getScannerPluginRepository();
    ScannerContext scannerContext = mock(ScannerContext.class);
    Map<String, ScannerPlugin<?, ?>> scannerPlugins = scannerPluginRepository.getScannerPlugins(scannerContext, properties);
    assertThat(scannerPlugins).isNotEmpty();
    for (ScannerPlugin<?, ?> scannerPlugin : scannerPlugins.values()) {
        if (scannerPlugin instanceof TestScannerPlugin) {
            return ((TestScannerPlugin) scannerPlugin).getProperties();
        }
    }
    return null;
}
Also used : TestScannerPlugin(com.buschmais.jqassistant.core.plugin.impl.plugin.TestScannerPlugin) ScannerPluginRepository(com.buschmais.jqassistant.core.scanner.spi.ScannerPluginRepository) TestScannerPlugin(com.buschmais.jqassistant.core.plugin.impl.plugin.TestScannerPlugin) ScannerPlugin(com.buschmais.jqassistant.core.scanner.api.ScannerPlugin) ScannerContext(com.buschmais.jqassistant.core.scanner.api.ScannerContext)

Aggregations

TestScannerPlugin (com.buschmais.jqassistant.core.plugin.impl.plugin.TestScannerPlugin)1 ScannerContext (com.buschmais.jqassistant.core.scanner.api.ScannerContext)1 ScannerPlugin (com.buschmais.jqassistant.core.scanner.api.ScannerPlugin)1 ScannerPluginRepository (com.buschmais.jqassistant.core.scanner.spi.ScannerPluginRepository)1