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 RulefindRule(String ruleSet, String ruleName)Find a rule in a certain ruleset by name.protected Collection<? extends Rule>getExtraRules()Return extra rules that will be run while running the tests.protected List<Rule>getRules()Return the rules that will be tested.voidrunTests(Rule rule)Run a set of tests defined in an XML test-data file for a rule.voidrunTests(Rule rule, String testsFileName)Run a set of tests defined in a XML test-data file.protected voidsetUp() 
 - 
 
- 
- 
Method Detail
- 
setUp
protected void setUp()
 
- 
getRules
protected List<Rule> getRules()
Return the rules that will be tested. Each rule must have a corresponding XML file containing a test collection. Test collections for all these rules are run separately. 
- 
getExtraRules
protected Collection<? extends Rule> getExtraRules()
Return extra rules that will be run while running the tests. 
- 
findRule
public static Rule findRule(String ruleSet, String ruleName)
Find a rule in a certain ruleset by name. 
- 
runTests
public void runTests(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. 
 - 
 
 -