public abstract class RuleTst extends Object
Constructor and Description |
---|
RuleTst() |
Modifier and Type | Method and Description |
---|---|
TestDescriptor[] |
extractTestsFromXml(Rule rule)
Extract a set of tests from an XML file.
|
TestDescriptor[] |
extractTestsFromXml(Rule rule,
String testsFileName) |
TestDescriptor[] |
extractTestsFromXml(Rule rule,
String testsFileName,
String baseDirectory)
Extract a set of tests from an XML file with the given name.
|
Rule |
findRule(String ruleSet,
String ruleName)
Find a rule in a certain ruleset by name
|
protected String |
getCleanRuleName(Rule rule)
getResourceAsStream tries to find the XML file in weird locations if the
ruleName includes the package, so we strip it here.
|
void |
runTest(TestDescriptor test)
Run the rule on the given code, and check the expected number of violations.
|
void |
runTestFromString(String code,
Rule rule,
Report report,
LanguageVersion languageVersion)
Run the rule on the given code and put the violations in the report.
|
void |
runTestFromString(String code,
Rule rule,
Report report,
LanguageVersion languageVersion,
boolean isUseAuxClasspath) |
void |
runTestFromString(TestDescriptor test,
Rule rule,
Report report) |
public Rule findRule(String ruleSet, String ruleName)
public void runTest(TestDescriptor test)
public void runTestFromString(String code, Rule rule, Report report, LanguageVersion languageVersion)
public void runTestFromString(String code, Rule rule, Report report, LanguageVersion languageVersion, boolean isUseAuxClasspath)
public void runTestFromString(TestDescriptor test, Rule rule, Report report)
protected String getCleanRuleName(Rule rule)
public TestDescriptor[] extractTestsFromXml(Rule rule)
public TestDescriptor[] extractTestsFromXml(Rule rule, String testsFileName)
public TestDescriptor[] extractTestsFromXml(Rule rule, String testsFileName, String baseDirectory)
Copyright © 2002-2016 InfoEther. All Rights Reserved.