Package org.xmlunit.diff
Interface ComparisonFormatter
-
- All Known Implementing Classes:
DefaultComparisonFormatter
public interface ComparisonFormatterFormatter methods for aComparisonObject.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDescription(Comparison difference)Return a short String of the Comparison including the XPath and the shorten value of the effected control and test Node.StringgetDetails(Comparison.Detail details, ComparisonType type, boolean formatXml)Return the xml node fromComparison.Detail.getTarget()as formatted String.
-
-
-
Method Detail
-
getDescription
String getDescription(Comparison difference)
Return a short String of the Comparison including the XPath and the shorten value of the effected control and test Node.This is used for
Diff.toString().- Parameters:
difference- the comparison to describe- Returns:
- a short description of the comparison
-
getDetails
String getDetails(Comparison.Detail details, ComparisonType type, boolean formatXml)
Return the xml node fromComparison.Detail.getTarget()as formatted String.This can be used to produce a nice compare-View in your IDE (e.g. with org.junit.ComparisonFailure).
- Parameters:
details- TheComparison.getControlDetails()orComparison.getTestDetails().type- the implementation can return different details depending on the ComparisonType.formatXml- set this to true if the Comparison was generated withDiffBuilder.ignoreWhitespace().- Returns:
- the full xml node.
-
-