|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.custommonkey.xmlunit.examples.CountingNodeTester
public class CountingNodeTester
Counts the number of nodes in a document to allow assertions to be made
using a NodeTest.
Examples and more at xmlunit.sourceforge.net
NodeTest
Constructor Summary | |
---|---|
CountingNodeTester(int expectedNumNodes)
|
Method Summary | |
---|---|
void |
noMoreNodes(NodeTest forTest)
Called by NodeTest when all nodes have been iterated over: time to see if all the nodes that were expected were found. |
void |
resetCounter()
Reset the counter so that an instance can be reused for another NodeTest |
void |
testNode(org.w3c.dom.Node aNode,
NodeTest forTest)
A single Node is always valid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CountingNodeTester(int expectedNumNodes)
Method Detail |
---|
public void testNode(org.w3c.dom.Node aNode, NodeTest forTest)
testNode
in interface NodeTester
aNode
- forTest
- public void noMoreNodes(NodeTest forTest) throws NodeTestException
resetCounter
so that the instance can be reused.
noMoreNodes
in interface NodeTester
true
- if expected num nodes == actual num nodes,
false otherwise
NodeTestException
- if this instance was expecting more nodespublic void resetCounter()
NodeTest
|
XMLUnit is hosted by sourceforge.net |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |