Class SimpleAggregatorTst


  • public abstract class SimpleAggregatorTst
    extends RuleTst
    Standard methods for (simple) testcases.
    • 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​(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.