|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.custommonkey.xmlunit.examples.TextDifferenceListenerBase
public abstract class TextDifferenceListenerBase
Base class that delegates all differences to another DifferenceListener.
Subclasses get a chance to hook into special methods that will be invoked for differences in textual values of attributes, CDATA sections, Text or comment nodes.
Field Summary |
---|
Fields inherited from interface org.custommonkey.xmlunit.DifferenceListener |
---|
RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT |
Constructor Summary | |
---|---|
protected |
TextDifferenceListenerBase(DifferenceListener delegateTo)
|
Method Summary | |
---|---|
protected int |
attributeDifference(Difference d)
Delegates to textualDifference . |
protected int |
cdataDifference(Difference d)
Delegates to textualDifference . |
protected int |
commentDifference(Difference d)
Delegates to textualDifference . |
int |
differenceFound(Difference difference)
Delegates to the nested DifferenceListener unless the Difference is of type ATTR_VALUE_ID , CDATA_VALUE_ID , COMMENT_VALUE_ID or TEXT_VALUE_ID - for those special differences attributeDifference , cdataDifference , commentDifference or textDifference
are invoked respectively. |
void |
skippedComparison(org.w3c.dom.Node control,
org.w3c.dom.Node test)
Receive notification that a comparison between 2 nodes has been skipped because the node types are not comparable by the DifferenceEngine |
protected int |
textDifference(Difference d)
Delegates to textualDifference . |
protected int |
textualDifference(Difference d)
Delegates to the nested DifferenceListener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TextDifferenceListenerBase(DifferenceListener delegateTo)
Method Detail |
---|
public int differenceFound(Difference difference)
ATTR_VALUE_ID
, CDATA_VALUE_ID
, COMMENT_VALUE_ID
or TEXT_VALUE_ID
- for those special differences attributeDifference
, cdataDifference
, commentDifference
or textDifference
are invoked respectively.
differenceFound
in interface DifferenceListener
difference
- a Difference instance as defined in DifferenceConstants
describing the cause
of the difference and containing the detail of the nodes that
differ
protected int attributeDifference(Difference d)
textualDifference
.
protected int cdataDifference(Difference d)
textualDifference
.
protected int commentDifference(Difference d)
textualDifference
.
protected int textDifference(Difference d)
textualDifference
.
protected int textualDifference(Difference d)
public void skippedComparison(org.w3c.dom.Node control, org.w3c.dom.Node test)
DifferenceListener
skippedComparison
in interface DifferenceListener
control
- the control node being comparedtest
- the test node being comparedDifferenceEngine
|
XMLUnit is hosted by sourceforge.net |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |