org.custommonkey.xmlunit

Interface DifferenceListener

public interface DifferenceListener

Listener for callbacks from a {@link DifferenceEngine#compare DifferenceEngine comparison}.
Examples and more at xmlunit.sourceforge.net
Field Summary
intRETURN_ACCEPT_DIFFERENCE
Standard return value for the differenceFound method.
intRETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL
Override return value for the differenceFound method.
intRETURN_IGNORE_DIFFERENCE_NODES_SIMILAR
Override return value for the differenceFound method.
Method Summary
intdifferenceFound(Difference difference)
Receive notification that 2 nodes are different.
voidskippedComparison(Node control, Node test)
Receive notification that a comparison between 2 nodes has been skipped because the node types are not comparable by the DifferenceEngine

Field Detail

RETURN_ACCEPT_DIFFERENCE

public final int RETURN_ACCEPT_DIFFERENCE
Standard return value for the differenceFound method. Indicates that the Difference is interpreted as defined in {@link DifferenceConstants DifferenceConstants}.

RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL

public final int RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL
Override return value for the differenceFound method. Indicates that the nodes identified as being different should be interpreted as being identical.

RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR

public final int RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR
Override return value for the differenceFound method. Indicates that the nodes identified as being different should be interpreted as being similar.

Method Detail

differenceFound

public int differenceFound(Difference difference)
Receive notification that 2 nodes are different.

Parameters: difference a Difference instance as defined in {@link DifferenceConstants DifferenceConstants} describing the cause of the difference and containing the detail of the nodes that differ

Returns: int one of the RETURN_... constants describing how this difference was interpreted

skippedComparison

public void skippedComparison(Node control, Node test)
Receive notification that a comparison between 2 nodes has been skipped because the node types are not comparable by the DifferenceEngine

Parameters: control the control node being compared test the test node being compared

See Also: DifferenceEngine