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 Description TestDescriptor()TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule)TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule, LanguageVersion languageVersion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCode()StringgetDescription()List<Integer>getExpectedLineNumbers()List<String>getExpectedMessages()LanguageVersiongetLanguageVersion()intgetNumberInDocument()intgetNumberOfProblemsExpected()PropertiesgetProperties()booleangetReinitializeRule()RulegetRule()StringgetTestMethodName()static booleaninRegressionTestMode()Checks whether we are testing for regression problems only.booleanisRegressionTest()booleanisUseAuxClasspath()voidsetExpectedLineNumbers(List<Integer> expectedLineNumbers)voidsetExpectedMessages(List<String> messages)voidsetNumberInDocument(int numberInDocument)voidsetProperties(Properties properties)voidsetRegressionTest(boolean isRegressionTest)voidsetReinitializeRule(boolean reinitializeRule)voidsetUseAuxClasspath(boolean useAuxClasspath)
-
-
-
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
-
getNumberInDocument
public int getNumberInDocument()
-
setNumberInDocument
public void setNumberInDocument(int numberInDocument)
-
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:
falseif system property "pmd.regress" is set tofalse,trueotherwise
-
isRegressionTest
public boolean isRegressionTest()
-
setRegressionTest
public void setRegressionTest(boolean isRegressionTest)
-
setUseAuxClasspath
public void setUseAuxClasspath(boolean useAuxClasspath)
-
isUseAuxClasspath
public boolean isUseAuxClasspath()
-
getTestMethodName
public String getTestMethodName()
-
-