use of net.sourceforge.pmd.lang.rule.stat.StatisticalRule in project pmd by pmd.
the class StatisticalRuleTest method testSingleDatapoint.
// Test Single Datapoint
@Test
public void testSingleDatapoint() {
StatisticalRule rule = new MockStatisticalRule();
DataPoint point = new DataPoint();
point.setScore(POINTS + 1.0);
DummyNode s = new DummyNode(1);
s.testingOnlySetBeginLine(POINTS + 1);
s.testingOnlySetBeginColumn(1);
point.setNode(s);
point.setMessage("SingleDataPoint");
rule.setProperty(MINIMUM_DESCRIPTOR, (double) POINTS);
rule.addDataPoint(point);
Report report = makeReport(rule);
assertEquals("Expecting only one result", 1, report.size());
}
Aggregations