org.custommonkey.xmlunit

Class AbstractNodeTester

public abstract class AbstractNodeTester extends 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

Method Summary
voidnoMoreNodes(NodeTest forTest)
Validate that the Nodes validated one-by-one in the isValid method 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.
voidtestNode(Node aNode, NodeTest forTest)
Validate a single Node by delegating to node type specific methods.
voidtestNotation(Notation notation)
Template delegator for testNode() method.
voidtestProcessingInstruction(ProcessingInstruction instr)
Template delegator for testNode() method.
voidtestText(Text text)
Template delegator for testNode() method.

Method Detail

noMoreNodes

public void noMoreNodes(NodeTest forTest)
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

Throws: NodeTestException if mode Nodes were expected

testAttribute

public void testAttribute(Attr attribute)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: attribute

Throws: NodeTestException always: override if required in subclass

testCDATASection

public void testCDATASection(CDATASection cdata)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: cdata

Throws: NodeTestException always: override if required in subclass

testComment

public void testComment(Comment comment)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: comment

Throws: NodeTestException always: override if required in subclass

testDocumentType

public void testDocumentType(DocumentType doctype)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: doctype

Throws: NodeTestException always: override if required in subclass

testElement

public void testElement(Element element)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: element

Throws: NodeTestException always: override if required in subclass

testEntity

public void testEntity(Entity entity)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: entity

Throws: NodeTestException always: override if required in subclass

testEntityReference

public void testEntityReference(EntityReference reference)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: reference

Throws: NodeTestException always: override if required in subclass

testNode

public void testNode(Node aNode, NodeTest forTest)
Validate a single Node by delegating to node type specific methods.

See Also: testAttribute testCDATASection testComment testDocumentType testElement testEntity testEntityReference testNotation testProcessingInstruction testText

testNotation

public void testNotation(Notation notation)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: notation

Throws: NodeTestException always: override if required in subclass

testProcessingInstruction

public void testProcessingInstruction(ProcessingInstruction instr)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: instr

Throws: NodeTestException always: override if required in subclass

testText

public void testText(Text text)
Template delegator for testNode() method. OVERRIDE to add custom logic

Parameters: text

Throws: NodeTestException always: override if required in subclass