assertNotNull( "RuleSet has not been found",
ruleSetUrl.toURI().getPath() );
final File outputDirectory = new File( OUTPUT_DIRECTORY_URL );
final File ruleSetFile = new File( ruleSetUrl.toURI().getPath() );
final FlexPmdXmlEngine engine = new FlexPmdXmlEngine( new FlexPmdParameters( "",
outputDirectory,
ruleSetFile,
sourceDirectory ) );
final FlexPmdViolations flexPmdViolations = new FlexPmdViolations();
engine.executeReport( flexPmdViolations );
assertEquals( "Number of rules found is not correct",
getRulesNb(),
engine.getRuleSet().size() );
assertEquals( getViolatedFilesNb(),
flexPmdViolations.getViolations().size() );
}