RulePluginRepositoryImpl extends AbstractPluginRepository implements RulePluginRepository { @Override public Collection<RuleParserPlugin> getRuleParserPlugins(RuleConfiguration ruleConfiguration) throws RuleException { for (RuleParserPlugin ruleParserPlugin : ruleParserPlugins) { ruleParserPlugin.configure(ruleConfiguration); } return ruleParserPlugins; } RulePluginRepositoryImpl(PluginConfigurationReader pluginConfigurationReader); @Override List<RuleSource> getRuleSources(); @Override Collection<RuleParserPlugin> getRuleParserPlugins(RuleConfiguration ruleConfiguration); @Override void initialize(); @Override void destroy();  }
@Test void yamlRuleReaderIsAvailable() throws RuleException { Collection<RuleParserPlugin> plugins = ruleParserPluginRepository.getRuleParserPlugins(DEFAULT); assertThat(plugins).anySatisfy(ruleParserPlugin -> { assertThat(ruleParserPlugin).isExactlyInstanceOf(YamlRuleParserPlugin.class); }); }
@Test void xmlRuleReaderIsAvailable() throws RuleException { Collection<RuleParserPlugin> plugins = ruleParserPluginRepository.getRuleParserPlugins(DEFAULT); assertThat(plugins).anySatisfy(ruleParserPlugin -> { assertThat(ruleParserPlugin).isExactlyInstanceOf(XmlRuleParserPlugin.class); }); }
@Test void asciidoctorRuleReaderIsAvailable() throws RuleException { Collection<RuleParserPlugin> plugins = ruleParserPluginRepository.getRuleParserPlugins(DEFAULT); assertThat(plugins).anySatisfy(ruleParserPlugin -> { assertThat(ruleParserPlugin).isExactlyInstanceOf(AsciidocRuleParserPlugin.class); }); }