Converted some more rules over to XPath
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1529 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -1,9 +1,6 @@
|
||||
package test.net.sourceforge.pmd.rules;
|
||||
import net.sourceforge.pmd.rules.XPathRule;
|
||||
import org.apache.xpath.XPathAPI;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import javax.xml.transform.TransformerException;
|
||||
import net.sourceforge.pmd.rules.XPathRule;
|
||||
|
||||
/**
|
||||
* @author daniels
|
||||
@ -162,11 +159,4 @@ public class XPathRuleTest extends RuleTst {
|
||||
//runTest("DuplicateImports3.java", 1, rule);
|
||||
runTest("DuplicateImports4.java", 0, rule);
|
||||
}
|
||||
|
||||
public Node assertNodeName(Node root, String path, String name) throws TransformerException {
|
||||
Node node = XPathAPI.selectSingleNode(root, path);
|
||||
assertNotNull("Node is null", node);
|
||||
assertEquals(name, node.getNodeName());
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user