Package org.xmlunit.diff
Class Difference
java.lang.Object
org.xmlunit.diff.Difference
Combines a
Comparison
and its result
.
As the name implies, the implicit assumption is that the result
is not ComparisonResult.EQUAL
-
Constructor Summary
ConstructorDescriptionDifference
(Comparison comparison, ComparisonResult result) Combines comparison and result. -
Method Summary
Modifier and TypeMethodDescriptionThe details of the comparison.The result of the difference.void
setComparisonFormatter
(ComparisonFormatter formatter) Sets the default formatter to use withtoString(org.xmlunit.diff.ComparisonFormatter)
.toString()
Returns a string representation of this difference usingDefaultComparisonFormatter
toString
(ComparisonFormatter formatter) Returns a string representation of this difference using the givenComparisonFormatter
-
Constructor Details
-
Difference
Combines comparison and result.- Parameters:
comparison
- the comparisonresult
- the result of the comparison
-
-
Method Details
-
getResult
The result of the difference.- Returns:
- result of the difference
-
getComparison
The details of the comparison.- Returns:
- details of the comparison
-
setComparisonFormatter
Sets the default formatter to use withtoString(org.xmlunit.diff.ComparisonFormatter)
.- Parameters:
formatter
- the ComparisonFormatter to use- Since:
- XMLUnit 2.1.0
-
toString
Returns a string representation of this difference using the givenComparisonFormatter
- Parameters:
formatter
- the ComparisonFormatter to use- Returns:
- a string representation of this difference
-
toString
Returns a string representation of this difference usingDefaultComparisonFormatter
-