public class DefaultComparisonFormatter extends Object implements ComparisonFormatter
Comparison Object.| Constructor and Description |
|---|
DefaultComparisonFormatter() |
| 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 difference,
ComparisonType type,
boolean formatXml)
Return the xml node from
Comparison.Detail.getTarget() as formatted String. |
public String getDescription(Comparison difference)
ComparisonFormatter
This is used for Diff.toString().
getDescription in interface ComparisonFormatterpublic String getDetails(Comparison.Detail difference, ComparisonType type, boolean formatXml)
ComparisonFormatterComparison.Detail.getTarget() as formatted String.
This can be used to produce a nice compare-View in your IDE (e.g. with org.junit.ComparisonFailure).
getDetails in interface ComparisonFormatterdifference - 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–2016 XMLUnit. All rights reserved.