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, net.sourceforge.pmd.Rule rule)
TestDescriptor(String code, String description, int numberOfProblemsExpected, net.sourceforge.pmd.Rule rule, net.sourceforge.pmd.lang.LanguageVersion languageVersion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCode()
String
getDescription()
List<Integer>
getExpectedLineNumbers()
List<String>
getExpectedMessages()
net.sourceforge.pmd.lang.LanguageVersion
getLanguageVersion()
int
getNumberInDocument()
int
getNumberOfProblemsExpected()
Properties
getProperties()
boolean
getReinitializeRule()
net.sourceforge.pmd.Rule
getRule()
static boolean
inRegressionTestMode()
Checks whether we are testing for regression problems only.boolean
isRegressionTest()
boolean
isUseAuxClasspath()
void
setExpectedLineNumbers(List<Integer> expectedLineNumbers)
void
setExpectedMessages(List<String> messages)
void
setNumberInDocument(int numberInDocument)
void
setProperties(Properties properties)
void
setRegressionTest(boolean isRegressionTest)
void
setReinitializeRule(boolean reinitializeRule)
void
setUseAuxClasspath(boolean useAuxClasspath)
-
-
-
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 net.sourceforge.pmd.lang.LanguageVersion getLanguageVersion()
-
getDescription
public String getDescription()
-
getNumberOfProblemsExpected
public int getNumberOfProblemsExpected()
-
getRule
public net.sourceforge.pmd.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 tofalse
,true
otherwise
-
isRegressionTest
public boolean isRegressionTest()
-
setRegressionTest
public void setRegressionTest(boolean isRegressionTest)
-
setUseAuxClasspath
public void setUseAuxClasspath(boolean useAuxClasspath)
-
isUseAuxClasspath
public boolean isUseAuxClasspath()
-
-