Package net.sourceforge.pmd
Class AbstractRuleSetFactoryTest
- java.lang.Object
- 
- net.sourceforge.pmd.AbstractRuleSetFactoryTest
 
- 
 public abstract class AbstractRuleSetFactoryTest extends java.lang.ObjectBase test class to verify the language's rulesets. This class should be subclassed for each language.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Set<java.lang.String>validXPathClassNames
 - 
Constructor SummaryConstructors Constructor Description AbstractRuleSetFactoryTest()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static net.sourceforge.pmd.RuleSetReferenceIdcreateRuleSetReferenceId(java.lang.String ruleSetXml)Create aRuleSetReferenceIdby the given XML string.static voidinit()Setups the XML parser with validation.voidtestAllPMDBuiltInRulesMeetConventions()Checks all rulesets of all languages on the classpath and verifies that all required attributes for all rules are specified.voidtestDtd()Verifies that all rulesets are valid XML according to the DTD.voidtestReadWriteRoundTrip()Reads and writes the rulesets to make sure, that no data is lost if the rulests are processed.voidtestXmlSchema()Verifies that all rulesets are valid XML according to the xsd schema.
 
- 
- 
- 
Method Detail- 
initpublic static void init() throws java.lang.ExceptionSetups the XML parser with validation.- Throws:
- java.lang.Exception- any error
 
 - 
testAllPMDBuiltInRulesMeetConventionspublic void testAllPMDBuiltInRulesMeetConventions() throws java.lang.ExceptionChecks all rulesets of all languages on the classpath and verifies that all required attributes for all rules are specified.- Throws:
- java.lang.Exception- any error
 
 - 
testXmlSchemapublic void testXmlSchema() throws java.lang.ExceptionVerifies that all rulesets are valid XML according to the xsd schema.- Throws:
- java.lang.Exception- any error
 
 - 
testDtdpublic void testDtd() throws java.lang.ExceptionVerifies that all rulesets are valid XML according to the DTD.- Throws:
- java.lang.Exception- any error
 
 - 
testReadWriteRoundTrippublic void testReadWriteRoundTrip() throws java.lang.ExceptionReads and writes the rulesets to make sure, that no data is lost if the rulests are processed.- Throws:
- java.lang.Exception- any error
 
 - 
createRuleSetReferenceIdprotected static net.sourceforge.pmd.RuleSetReferenceId createRuleSetReferenceId(java.lang.String ruleSetXml) Create aRuleSetReferenceIdby the given XML string.- Parameters:
- ruleSetXml- the ruleset file content as string
- Returns:
- the RuleSetReferenceId
 
 
- 
 
-