net.sourceforge.pmd.testframework
Class SimpleAggregatorTst

java.lang.Object
  extended by net.sourceforge.pmd.testframework.RuleTst
      extended by net.sourceforge.pmd.testframework.SimpleAggregatorTst

public abstract class SimpleAggregatorTst
extends RuleTst

Standard methods for (simple) testcases.


Constructor Summary
SimpleAggregatorTst()
           
 
Method Summary
protected  void addRule(String ruleSet, String ruleName)
          Add new XML tests associated with the rule to the test suite.
protected  List<Rule> getRules()
          Gets all configured rules.
 void runTests(Rule rule)
          Run a set of tests defined in an XML test-data file for a rule.
 void runTests(Rule rule, String testsFileName)
          Run a set of tests defined in a XML test-data file.
 void runTests(TestDescriptor[] tests)
          Run a set of tests of a certain sourceType.
protected  void setUp()
          Configure the rule tests to be executed.
 
Methods inherited from class net.sourceforge.pmd.testframework.RuleTst
extractTestsFromXml, extractTestsFromXml, extractTestsFromXml, findRule, getCleanRuleName, runTest, runTestFromString, runTestFromString, runTestFromString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAggregatorTst

public SimpleAggregatorTst()
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(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(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.


runTests

public void runTests(TestDescriptor[] tests)
Run a set of tests of a certain sourceType.


addRule

protected void addRule(String ruleSet,
                       String ruleName)
Add new XML tests associated with the rule to the test suite. This should be called from the setup method.


getRules

protected List<Rule> getRules()
Gets all configured rules.

Returns:
all configured rules.


Copyright © 2002-2015 InfoEther. All Rights Reserved.