Class SimpleAggregatorTst
- java.lang.Object
-
- net.sourceforge.pmd.testframework.RuleTst
-
- net.sourceforge.pmd.testframework.SimpleAggregatorTst
-
public abstract class SimpleAggregatorTst extends RuleTst
Standard methods for (simple) testcases.
-
-
Constructor Summary
Constructors Constructor Description SimpleAggregatorTst()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRule(java.lang.String ruleSet, java.lang.String ruleName)Add new XML tests associated with the rule to the test suite.protected java.util.List<net.sourceforge.pmd.Rule>getRules()Gets all configured rules.voidrunTests(net.sourceforge.pmd.Rule rule)Run a set of tests defined in an XML test-data file for a rule.voidrunTests(net.sourceforge.pmd.Rule rule, java.lang.String testsFileName)Run a set of tests defined in a XML test-data file.voidrunTests(TestDescriptor[] tests)Run a set of tests of a certain sourceType.protected voidsetUp()Configure the rule tests to be executed.-
Methods inherited from class net.sourceforge.pmd.testframework.RuleTst
extractTestsFromXml, extractTestsFromXml, extractTestsFromXml, findRule, getCleanRuleName, reinitializeRule, runTest, runTestFromString, runTestFromString, runTestFromString
-
-
-
-
Method Detail
-
setUp
protected void setUp()
Configure the rule tests to be executed. Implement this method in subclasses by calling adRule.- See Also:
addRule(String, String)
-
runTests
public void runTests(net.sourceforge.pmd.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.Rule rule, java.lang.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.
-
runTests
public void runTests(TestDescriptor[] tests)
Run a set of tests of a certain sourceType.
-
addRule
protected void addRule(java.lang.String ruleSet, java.lang.String ruleName)Add new XML tests associated with the rule to the test suite. This should be called from the setup method.
-
getRules
protected java.util.List<net.sourceforge.pmd.Rule> getRules()
Gets all configured rules.- Returns:
- all configured rules.
-
-