net.sourceforge.pmd.testframework

## Class SimpleAggregatorTst

- java.lang.Object
- - net.sourceforge.pmd.testframework.RuleTst
  - - net.sourceforge.pmd.testframework.SimpleAggregatorTst

- Direct Known Subclasses:
    AndroidRulesTest, AvoidDuplicateLiteralsRuleTest, BasicJsfRulesTest, BasicRulesTest, BasicRulesTest, BasicRulesTest, BasicRulesTest, BracesRulesTest, BracesRulesTest, CloneMethodMustImplementCloneableTest, CloneRulesTest, CodesizeRulesTest, CommentRulesTest, ConfusingTernaryRuleTest, ConstructorCallsOverridableMethodTest, ControversialRulesTest, CouplingRulesTest, DesignRulesTest, EmptyRulesTest, FinalizersRulesTest, ImportsRulesTest, J2EERulesTest, JavabeansRulesTest, JunitRulesTest, LoggingJakartaCommonsRulesTest, LoggingJavaRulesTest, LooseCouplingTest, MigratingRulesTest, NamingRulesTest, OptimizationsRulesTest, PropertyAccessorTest, RegexpAcceptanceTest, SignatureDeclareThrowsExceptionTest, StrictExceptionRulesTest, StringsRulesTest, SunSecureRulesTest, TooManyHttpFilterTest, UncommentedEmptyConstructorRuleTest, UncommentedEmptyMethodRuleTest, UnnecessaryRulesTest, UnnecessaryRulesTest, UnusedCodeRulesTest, UnusedImportsTest, XPathRulesTest

      public abstract class SimpleAggregatorTst
      extends RuleTst

  Standard methods for (simple) testcases.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SimpleAggregatorTst.CustomXmlTestClassMethodsRunner`

  - ### Field Summary

    - ### Fields inherited from class net.sourceforge.pmd.testframework.RuleTst

      `DEFAULT_LANGUAGE, DEFAULT_LANGUAGE_VERSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleAggregatorTst()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addRule(String ruleSet, String ruleName)` Add new XML tests associated with the rule to the test suite.
    `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.
    `void` | `testAll()` Run a set of tests for all rules added in the setup method.

    - ### Methods inherited from class net.sourceforge.pmd.testframework.RuleTst

      `extractTestsFromXml, extractTestsFromXml, extractTestsFromXml, findRule, getCleanRuleName, runTest, 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

    - #### 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.

    - #### testAll

          public void testAll()

      Run a set of tests for all rules added in the setup method.

Copyright © 2002-2013 InfoEther. All Rights Reserved.