executeRuleAndCheckReport(true);
}
private void addPlugin(boolean withVersion, boolean withConfiguration, boolean withDependencies) {
PluginModel plugin = mock(PluginModel.class);
when(plugin.getGroupId()).thenReturn("a.b.c");
when(plugin.getArtifactId()).thenReturn("a");
if (withVersion) {
when(plugin.getVersion()).thenReturn("1.0");
}
if (withConfiguration) {
when(plugin.isConfigured()).thenReturn(true);
}
if (withDependencies) {
when(plugin.getDependencies()).thenReturn(
Arrays.asList(new DependencyModel("x.y.z", "z", "1.0", null, null, null)));
}
this.testRule.getProjectModel().getPlugins().add(plugin);
}