Search in sources :

Example 21 with FooRule

use of net.sourceforge.pmd.FooRule in project pmd by pmd.

the class AbstractRendererTst method testConfigError.

@Test
public void testConfigError() throws Exception {
    Report rep = new Report();
    Report.ConfigurationError err = new Report.ConfigurationError(new FooRule(), "a configuration error");
    rep.addConfigError(err);
    String actual = ReportTest.render(getRenderer(), rep);
    assertEquals(filter(getExpectedError(err)), filter(actual));
}
Also used : ConfigurationError(net.sourceforge.pmd.Report.ConfigurationError) FooRule(net.sourceforge.pmd.FooRule) Report(net.sourceforge.pmd.Report) ConfigurationError(net.sourceforge.pmd.Report.ConfigurationError) Test(org.junit.Test) ReportTest(net.sourceforge.pmd.ReportTest)

Aggregations

FooRule (net.sourceforge.pmd.FooRule)21 Report (net.sourceforge.pmd.Report)19 Test (org.junit.Test)18 RuleContext (net.sourceforge.pmd.RuleContext)4 ParametricRuleViolation (net.sourceforge.pmd.lang.rule.ParametricRuleViolation)4 DummyNode (net.sourceforge.pmd.lang.ast.DummyNode)3 ReportTest (net.sourceforge.pmd.ReportTest)2 HashMap (java.util.HashMap)1 ConfigurationError (net.sourceforge.pmd.Report.ConfigurationError)1 RuleViolation (net.sourceforge.pmd.RuleViolation)1 Node (net.sourceforge.pmd.lang.ast.Node)1