org.custommonkey.xmlunit
public class NodeTest extends Object
NodeFilter
to pass the DOM Nodes
to a NodeTester instance that performs the acual Node validation.
See Also: NodeTester
Constructor Summary | |
---|---|
NodeTest(String xmlString)
Construct a NodeTest for the DOM built using the String and JAXP | |
NodeTest(Reader reader)
Construct a NodeTest for the DOM built using the Reader and JAXP | |
NodeTest(Document document)
Construct a NodeTest for the specified Document | |
NodeTest(DocumentTraversal documentTraversal, Node rootNode)
Construct a NodeTest using the specified DocumentTraversal, starting at
the specified root node |
Method Summary | |
---|---|
void | performTest(NodeTester tester, short singleNodeType)
Does this NodeTest pass using the specified NodeTester instance? |
void | performTest(NodeTester tester, short[] nodeTypes)
Does this NodeTest pass using the specified NodeTester instance? |
Throws: IllegalArgumentException if the Document does not support the DOM DocumentTraversal interface (most DOM implementations should provide this support)
Parameters: tester singleNodeType note Node.ATTRIBUTE_NODE
is not
exposed by the DocumentTraversal node iterator unless the root node
is itself an attribute - so a NodeTester that needs to test attributes
should obtain those attributes from Node.ELEMENT_NODE
nodes
Throws: NodeTestException if test fails
Parameters: tester nodeTypes note Node.ATTRIBUTE_NODE
is not
exposed by the DocumentTraversal node iterator unless the root node
is itself an attribute - so a NodeTester that needs to test attributes
should obtain those attributes from Node.ELEMENT_NODE
nodes instead
Throws: NodeTestException if test fails