use of hudson.plugins.violations.model.FullBuildModel in project violations-plugin by jenkinsci.
the class GendarmeParserTest method assertThatMultipleDefectsInATargetIsCollected.
@Issue("JENKINS-11227")
@Test
public void assertThatMultipleDefectsInATargetIsCollected() throws IOException {
FullBuildModel model = getFullBuildModel("gendarme-2" + (File.separatorChar == '/' ? "_unix" : "") + ".xml");
assertEquals("Number of violations is incorrect", 12, model.getCountNumber(GendarmeParser.TYPE_NAME));
}
use of hudson.plugins.violations.model.FullBuildModel in project violations-plugin by jenkinsci.
the class GendarmeParserTest method testParseViolationData.
@Test
public void testParseViolationData() throws IOException {
FullBuildModel model = getFullBuildModel("Gendarme" + (File.separatorChar == '/' ? "_unix" : "") + ".xml");
assertEquals("Number of violations is incorrect", 3, model.getCountNumber(GendarmeParser.TYPE_NAME));
for (String fileModelKey : model.getFileModelMap().keySet()) {
FullFileModel ffmodel = model.getFileModelMap().get(fileModelKey);
logger.info(fileModelKey + ".displayName=" + ffmodel.getDisplayName());
logger.info(fileModelKey + ".path=" + (ffmodel.getSourceFile() == null ? "null" : ffmodel.getSourceFile().getAbsolutePath()));
}
assertEquals("Number of files is incorrect", 2, model.getFileModelMap().size());
}
use of hudson.plugins.violations.model.FullBuildModel in project violations-plugin by jenkinsci.
the class JsLintParserTest method testParseWithSingleFile.
@Test
public void testParseWithSingleFile() throws Exception {
FullBuildModel model = getFullBuildModel("single.xml");
// check number of violations and number of files
assertEquals(51, model.getCountNumber(JsLintParser.TYPE_NAME));
assertEquals(1, model.getFileModelMap().size());
assertPrototype(model);
}
use of hudson.plugins.violations.model.FullBuildModel in project violations-plugin by jenkinsci.
the class SimianParserTest method testTwoFileParsing.
@Test
public void testTwoFileParsing() throws Exception {
FullBuildModel model = getFullBuildModel("twofile.xml");
assertEquals("Number of violations is incorrect", 2, model.getCountNumber(SimianParser.TYPE_NAME));
assertEquals("Number of files is incorrect", 2, model.getFileModelMap().size());
}
use of hudson.plugins.violations.model.FullBuildModel in project violations-plugin by jenkinsci.
the class SimianParserTest method testOneFileParsing.
@Test
public void testOneFileParsing() throws Exception {
FullBuildModel model = getFullBuildModel("onefile.xml");
assertEquals("Number of violations is incorrect", 2, model.getCountNumber(SimianParser.TYPE_NAME));
assertEquals("Number of files is incorrect", 1, model.getFileModelMap().size());
}
Aggregations