net.sourceforge.pmd.testframework

## Class TestDescriptor

- java.lang.Object
- - net.sourceforge.pmd.testframework.TestDescriptor

    public class TestDescriptor
    extends Object

Stores the information required to run a complete test.

### Constructor Summary

Constructors
Constructor and Description
`TestDescriptor()`
`TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule)`
`TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule, LanguageVersion languageVersion)`

### Method Summary

Methods
`String` `getCode()`
`String` `getDescription()`
`LanguageVersion` `getLanguageVersion()`
`int` `getNumberOfProblemsExpected()`
`Properties` `getProperties()`
`boolean` `getReinitializeRule()`
`Rule` `getRule()`
`static boolean` `inRegressionTestMode()` Checks whether we are testing for regression problems only.
`boolean` `isRegressionTest()`
`void` `setProperties(Properties properties)`
`void` `setRegressionTest(boolean isRegressionTest)`
`void` `setReinitializeRule(boolean reinitializeRule)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TestDescriptor

    public TestDescriptor()

#### TestDescriptor

    public TestDescriptor(String code,
                  String description,
                  int numberOfProblemsExpected,
                  Rule rule)

#### TestDescriptor

    public TestDescriptor(String code,
                  String description,
                  int numberOfProblemsExpected,
                  Rule rule,
                  LanguageVersion languageVersion)

### Method Detail

#### setProperties

    public void setProperties(Properties properties)

#### getProperties

    public Properties getProperties()

#### getCode

    public String getCode()

#### getLanguageVersion

    public LanguageVersion getLanguageVersion()

#### getDescription

    public String getDescription()

#### getNumberOfProblemsExpected

    public int getNumberOfProblemsExpected()

#### getRule

    public Rule getRule()

#### getReinitializeRule

    public boolean getReinitializeRule()

#### setReinitializeRule

    public void setReinitializeRule(boolean reinitializeRule)

#### inRegressionTestMode

    public static boolean inRegressionTestMode()

Checks whether we are testing for regression problems only. Return value is based on the system property "pmd.regress".

Returns:
  `false` if system property "pmd.regress" is set to `false`, `true` otherwise

#### isRegressionTest

    public boolean isRegressionTest()

#### setRegressionTest

    public void setRegressionTest(boolean isRegressionTest)