org.custommonkey.xmlunit

## Class AbstractNodeTester

- java.lang.Object
- - org.custommonkey.xmlunit.AbstractNodeTester

All Implemented Interfaces:
  NodeTester

    public abstract class AbstractNodeTester
    extends java.lang.Object
    implements NodeTester

Helper class. Abstract interface implementation that performs Node-type checks and delegates testNode() processing to subclass.
Examples and more at xmlunit.sourceforge.net

See Also:
  `NodeTest`

### Constructor Summary

Constructors
Constructor and Description
`AbstractNodeTester()`

### Method Summary

Methods
`void` `noMoreNodes(NodeTest forTest)` Validate that the Nodes validated one-by-one in the `isValid` method were all the Nodes expected.
`void` `testAttribute(org.w3c.dom.Attr attribute)` Template delegator for testNode() method.
`void` `testCDATASection(org.w3c.dom.CDATASection cdata)` Template delegator for testNode() method.
`void` `testComment(org.w3c.dom.Comment comment)` Template delegator for testNode() method.
`void` `testDocumentType(org.w3c.dom.DocumentType doctype)` Template delegator for testNode() method.
`void` `testElement(org.w3c.dom.Element element)` Template delegator for testNode() method.
`void` `testEntity(org.w3c.dom.Entity entity)` Template delegator for testNode() method.
`void` `testEntityReference(org.w3c.dom.EntityReference reference)` Template delegator for testNode() method.
`void` `testNode(org.w3c.dom.Node aNode, NodeTest forTest)` Validate a single Node by delegating to node type specific methods.
`void` `testNotation(org.w3c.dom.Notation notation)` Template delegator for testNode() method.
`void` `testProcessingInstruction(org.w3c.dom.ProcessingInstruction instr)` Template delegator for testNode() method.
`void` `testText(org.w3c.dom.Text text)` Template delegator for testNode() method.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AbstractNodeTester

    public AbstractNodeTester()

### Method Detail

#### testNode

    public void testNode(org.w3c.dom.Node aNode,
                NodeTest forTest)
                  throws NodeTestException

Validate a single Node by delegating to node type specific methods.

Specified by:
  `testNode` in interface `NodeTester`
Throws:
  `NodeTestException` - if the node fails the test
See Also:
  `testAttribute(Attr)`, `testCDATASection(CDATASection)`, `testComment(Comment)`, `testDocumentType(DocumentType)`, `testElement(Element)`, `testEntity(Entity)`, `testEntityReference(EntityReference)`, `testNotation(Notation)`, `testProcessingInstruction(ProcessingInstruction)`, `testText(Text)`

#### testAttribute

    public void testAttribute(org.w3c.dom.Attr attribute)
                       throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `attribute` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testCDATASection

    public void testCDATASection(org.w3c.dom.CDATASection cdata)
                          throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `cdata` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testComment

    public void testComment(org.w3c.dom.Comment comment)
                     throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `comment` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testDocumentType

    public void testDocumentType(org.w3c.dom.DocumentType doctype)
                          throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `doctype` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testElement

    public void testElement(org.w3c.dom.Element element)
                     throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `element` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testEntity

    public void testEntity(org.w3c.dom.Entity entity)
                    throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `entity` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testEntityReference

    public void testEntityReference(org.w3c.dom.EntityReference reference)
                             throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `reference` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testNotation

    public void testNotation(org.w3c.dom.Notation notation)
                      throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `notation` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testProcessingInstruction

    public void testProcessingInstruction(org.w3c.dom.ProcessingInstruction instr)
                                   throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `instr` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### testText

    public void testText(org.w3c.dom.Text text)
                  throws NodeTestException

Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters:
  `text` -
Throws:
  `NodeTestException` - always: override if required in subclass

#### noMoreNodes

    public void noMoreNodes(NodeTest forTest)
                     throws NodeTestException

Validate that the Nodes validated one-by-one in the `isValid` method were all the Nodes expected. By default do nothing: can override to add custom logic

Specified by:
  `noMoreNodes` in interface `NodeTester`
Throws:
  `NodeTestException` - if mode Nodes were expected