Package net.sourceforge.pmd.test
Class RuleTst
- java.lang.Object
-
- net.sourceforge.pmd.test.RuleTst
-
- Direct Known Subclasses:
PmdRuleTst
,SimpleAggregatorTst
public abstract class RuleTst extends Object
Advanced methods for test cases
-
-
Constructor Summary
Constructors Constructor Description RuleTst()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static net.sourceforge.pmd.lang.rule.Rule
findRule(String ruleSet, String ruleName)
Find a rule in a certain ruleset by name.protected List<net.sourceforge.pmd.lang.rule.Rule>
getRules()
void
runTests(net.sourceforge.pmd.lang.rule.Rule rule)
Run a set of tests defined in an XML test-data file for a rule.void
runTests(net.sourceforge.pmd.lang.rule.Rule rule, String testsFileName)
Run a set of tests defined in a XML test-data file.protected void
setUp()
-
-
-
Method Detail
-
setUp
protected void setUp()
-
getRules
protected List<net.sourceforge.pmd.lang.rule.Rule> getRules()
-
findRule
public static net.sourceforge.pmd.lang.rule.Rule findRule(String ruleSet, String ruleName)
Find a rule in a certain ruleset by name.
-
runTests
public void runTests(net.sourceforge.pmd.lang.rule.Rule rule)
Run a set of tests defined in an XML test-data file for a rule. The file should be ./xml/RuleName.xml relative to the test-class. The format is defined in test-data.xsd.
-
runTests
public void runTests(net.sourceforge.pmd.lang.rule.Rule rule, String testsFileName)
Run a set of tests defined in a XML test-data file. The file should be ./xml/[testsFileName].xml relative to the test-class. The format is defined in test-data.xsd.
-
-