org.custommonkey.xmlunit

Class DetailedDiff

public class DetailedDiff extends Diff

Compares and describes all the differences between two XML documents. The document comparison does not stop once the first unrecoverable difference is found, unlike the Diff class. Note that because the differences are described relative to some control XML the list of all differences when A is compared to B will not necessarily be the same as when B is compared to A.
Examples and more at xmlunit.sourceforge.net
Constructor Summary
DetailedDiff(Diff prototype)
Create a new instance based on a prototypical Diff instance
Method Summary
intdifferenceFound(Difference difference)
DifferenceListener implementation.
ListgetAllDifferences()
Obtain all the differences found by this instance
booleanhaltComparison(Difference afterDifference)
ComparisonController implementation.

Constructor Detail

DetailedDiff

public DetailedDiff(Diff prototype)
Create a new instance based on a prototypical Diff instance

Parameters: prototype the Diff instance for which more detailed difference information is required

Method Detail

differenceFound

public int differenceFound(Difference difference)
DifferenceListener implementation. Add the difference to the list of all differences

Parameters: expected actual control test comparingWhat

Returns: the value supplied by the superclass implementation

getAllDifferences

public List getAllDifferences()
Obtain all the differences found by this instance

Returns: a list of {@link Difference differences}

haltComparison

public boolean haltComparison(Difference afterDifference)
ComparisonController implementation.

Parameters: afterDifference

Returns: false always as this class wants to see all differences