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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
noMoreNodes
(NodeTest forTest) Validate that the Nodes validated one-by-one in theisValid
method were all the Nodes expected.void
testAttribute
(Attr attribute) Template delegator for testNode() method.void
testCDATASection
(CDATASection cdata) Template delegator for testNode() method.void
testComment
(Comment comment) Template delegator for testNode() method.void
testDocumentType
(DocumentType doctype) Template delegator for testNode() method.void
testElement
(Element element) Template delegator for testNode() method.void
testEntity
(Entity entity) Template delegator for testNode() method.void
testEntityReference
(EntityReference reference) Template delegator for testNode() method.void
Validate a single Node by delegating to node type specific methods.void
testNotation
(Notation notation) Template delegator for testNode() method.void
Template delegator for testNode() method.void
Template 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:
testNode
in 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 theisValid
method were all the Nodes expected. By default do nothing: can override to add custom logic- Specified by:
noMoreNodes
in interfaceNodeTester
- Parameters:
forTest
- the test to perform- Throws:
NodeTestException
- if mode Nodes were expected
-