Package org.custommonkey.xmlunit
Class AbstractNodeTester
java.lang.Object
org.custommonkey.xmlunit.AbstractNodeTester
- All Implemented Interfaces:
NodeTester
Helper class.
Abstract interface implementation that performs Node-type checks and
delegates testNode() processing to subclass.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidnoMoreNodes(NodeTest forTest) Validate that the Nodes validated one-by-one in theisValidmethod were all the Nodes expected.voidtestAttribute(Attr attribute) Template delegator for testNode() method.voidtestCDATASection(CDATASection cdata) Template delegator for testNode() method.voidtestComment(Comment comment) Template delegator for testNode() method.voidtestDocumentType(DocumentType doctype) Template delegator for testNode() method.voidtestElement(Element element) Template delegator for testNode() method.voidtestEntity(Entity entity) Template delegator for testNode() method.voidtestEntityReference(EntityReference reference) Template delegator for testNode() method.voidValidate a single Node by delegating to node type specific methods.voidtestNotation(Notation notation) Template delegator for testNode() method.voidTemplate delegator for testNode() method.voidTemplate delegator for testNode() method.
-
Constructor Details
-
AbstractNodeTester
public AbstractNodeTester()
-
-
Method Details
-
testNode
Validate a single Node by delegating to node type specific methods.- Specified by:
testNodein interfaceNodeTester- Parameters:
aNode- the node to testforTest- the test to perform- Throws:
NodeTestException- if the node fails the test- See Also:
-
testAttribute
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
attribute- the attribute to test- Throws:
NodeTestException- always: override if required in subclass
-
testCDATASection
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
cdata- the CDATA section to test- Throws:
NodeTestException- always: override if required in subclass
-
testComment
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
comment- the comment to test- Throws:
NodeTestException- always: override if required in subclass
-
testDocumentType
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
doctype- the cofument type to test- Throws:
NodeTestException- always: override if required in subclass
-
testElement
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
element- the element to test- Throws:
NodeTestException- always: override if required in subclass
-
testEntity
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
entity- the entity to test- Throws:
NodeTestException- always: override if required in subclass
-
testEntityReference
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
reference- the reference to test- Throws:
NodeTestException- always: override if required in subclass
-
testNotation
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
notation- the notation to test- Throws:
NodeTestException- always: override if required in subclass
-
testProcessingInstruction
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
instr- the processing instruction to test- Throws:
NodeTestException- always: override if required in subclass
-
testText
Template delegator for testNode() method. OVERRIDE to add custom logic- Parameters:
text- the text to test- Throws:
NodeTestException- always: override if required in subclass
-
noMoreNodes
Validate that the Nodes validated one-by-one in theisValidmethod were all the Nodes expected. By default do nothing: can override to add custom logic- Specified by:
noMoreNodesin interfaceNodeTester- Parameters:
forTest- the test to perform- Throws:
NodeTestException- if mode Nodes were expected
-