1 4 package test.net.sourceforge.pmd.testframework; 5 6 import java.util.Properties ; 7 8 import net.sourceforge.pmd.Rule; 9 import net.sourceforge.pmd.SourceType; 10 11 14 public class TestDescriptor { 15 private Rule rule; 16 private Properties properties; 17 private String description; 18 private int numberOfProblemsExpected; 19 private String code; 20 private SourceType sourceType; 21 private boolean reinitializeRule = false; 23 public TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule) { 24 this(code, description, numberOfProblemsExpected, rule, RuleTst.DEFAULT_SOURCE_TYPE); 25 } 26 27 public TestDescriptor(String code, String description, int numberOfProblemsExpected, Rule rule, SourceType sourceType) { 28 this.rule = rule; 29 this.code = code; 30 this.description = description; 31 this.numberOfProblemsExpected = numberOfProblemsExpected; 32 this.sourceType = sourceType; 33 } 34 35 public void setProperties(Properties properties) { 36 this.properties = properties; 37 } 38 39 public Properties getProperties() { 40 return properties; 41 } 42 43 public String getCode() { 44 return code; 45 } 46 47 public SourceType getSourceType() { 48 return sourceType; 49 } 50 51 public String getDescription() { 52 return description; 53 } 54 55 public int getNumberOfProblemsExpected() { 56 return numberOfProblemsExpected; 57 } 58 59 public Rule getRule() { 60 return rule; 61 } 62 63 public boolean getReinitializeRule() { 64 return reinitializeRule; 65 } 66 67 public void setReinitializeRule(boolean reinitializeRule) { 68 this.reinitializeRule = reinitializeRule; 69 } 70 } 71 | Popular Tags |