use of net.sourceforge.pmd.testframework.TestDescriptor in project pmd by pmd.
the class ExcludeLinesTest method testAcceptance.
@Test
public void testAcceptance() {
runTest(new TestDescriptor(TEST1, "NOPMD should work", 0, rule));
runTest(new TestDescriptor(TEST2, "Should fail without exclude marker", 1, rule));
}
use of net.sourceforge.pmd.testframework.TestDescriptor in project pmd by pmd.
the class RegexpAcceptanceTest method testSimple.
@Test
public void testSimple() {
Rule r = new XPathRule(XPATH);
r.setLanguage(LanguageRegistry.getLanguage(JavaLanguageModule.NAME));
r.setMessage("");
TestDescriptor[] testDescriptors = extractTestsFromXml(r, "RegexpAcceptance");
for (TestDescriptor testDescriptor : testDescriptors) {
testDescriptor.setReinitializeRule(false);
}
runTests(testDescriptors);
}
Aggregations