use of org.apache.maven.plugins.checkstyle.CheckstyleViolationCheckMojo in project maven-plugins by apache.
the class CheckstyleViolationCheckMojoTest method testDefaultConfig.
public void testDefaultConfig() throws Exception {
File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/check-plugin-config.xml");
CheckstyleViolationCheckMojo mojo = (CheckstyleViolationCheckMojo) lookupMojo("check", pluginXmlFile);
mojoSetup(mojo);
assertNotNull("Mojo found.", mojo);
assertNotNull("project null.", mojo.project);
try {
mojo.execute();
fail("Must throw an exception on violations");
} catch (MojoFailureException e) {
// expected
}
}
Aggregations