Class AbstractRuleSetFactoryTest


  • public abstract class AbstractRuleSetFactoryTest
    extends Object
    Base test class to verify the language's rulesets. This class should be subclassed for each language.
    • Field Detail

      • validXPathClassNames

        protected Set<String> validXPathClassNames
    • Constructor Detail

      • AbstractRuleSetFactoryTest

        public AbstractRuleSetFactoryTest()
    • Method Detail

      • init

        public static void init()
                         throws Exception
        Setups the XML parser with validation.
        Throws:
        Exception - any error
      • testAllPMDBuiltInRulesMeetConventions

        public void testAllPMDBuiltInRulesMeetConventions()
                                                   throws Exception
        Checks all rulesets of all languages on the classpath and verifies that all required attributes for all rules are specified.
        Throws:
        Exception - any error
      • testXmlSchema

        public void testXmlSchema()
                           throws Exception
        Verifies that all rulesets are valid XML according to the xsd schema.
        Throws:
        Exception - any error
      • testDtd

        public void testDtd()
                     throws Exception
        Verifies that all rulesets are valid XML according to the DTD.
        Throws:
        Exception - any error
      • testReadWriteRoundTrip

        public void testReadWriteRoundTrip()
                                    throws Exception
        Reads and writes the rulesets to make sure, that no data is lost if the rulests are processed.
        Throws:
        Exception - any error