public interface ComparisonFormatter
Comparison
Object.Modifier and Type | Method and Description |
---|---|
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.
|
String |
getDetails(Comparison.Detail details,
ComparisonType type,
boolean formatXml)
Return the xml node from
Comparison.Detail.getTarget() as formatted String. |
String getDescription(Comparison difference)
This is used for Diff.toString()
.
difference
- the comparison to describeString getDetails(Comparison.Detail details, ComparisonType type, boolean formatXml)
Comparison.Detail.getTarget()
as formatted String.
This can be used to produce a nice compare-View in your IDE (e.g. with org.junit.ComparisonFailure).
details
- The Comparison.getControlDetails()
or Comparison.getTestDetails()
.type
- the implementation can return different details depending on the ComparisonType.formatXml
- set this to true if the Comparison was generated with DiffBuilder.ignoreWhitespace()
.Copyright © 2001–2017 XMLUnit. All rights reserved.