Merge branch 'wip-dogfood-test' into pmd/5.4.x
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
*/
|
||||
package net.sourceforge.pmd;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import org.junit.Test;
|
||||
@ -29,4 +30,17 @@ public class RuleSetFactoryTest extends AbstractRuleSetFactoryTest {
|
||||
Rule rule = ruleset.getRuleByName("UselessParentheses");
|
||||
assertNull(rule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes sure that the internal dogfood.xml ruleset is valid and doesn't reference any
|
||||
* unknown rules.
|
||||
* @throws RuleSetNotFoundException if dogfood couldn't be found at all
|
||||
*/
|
||||
@Test
|
||||
public void testDogfoodRuleset() throws RuleSetNotFoundException {
|
||||
RuleSetReferenceId ref = RuleSetReferenceId.parse("rulesets/internal/dogfood.xml").get(0);
|
||||
RuleSetFactory ruleSetFactory = new RuleSetFactory();
|
||||
RuleSet ruleset = ruleSetFactory.createRuleSet(ref);
|
||||
assertNotNull(ruleset);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user