Package org.xmlunit.diff
Class Comparison
java.lang.Object
org.xmlunit.diff.Comparison
Details of a single comparison XMLUnit has performed.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The details of a target (usually some representation of an XML Node) that took part in the comparison. -
Constructor Summary
ConstructorDescriptionComparison
(ComparisonType t, Node controlTarget, String controlXPath, Object controlValue, String controlParentXPath, Node testTarget, String testXPath, Object testValue, String testParentXPath) Creates a new comparison. -
Method Summary
Modifier and TypeMethodDescriptionDetails of the control target.Details of the test target.getType()
The kind of comparison performed.toString()
Returns a string representation of this comparison usingDefaultComparisonFormatter
toString
(ComparisonFormatter formatter) Returns a string representation of this comparison using the givenComparisonFormatter
-
Constructor Details
-
Comparison
public Comparison(ComparisonType t, Node controlTarget, String controlXPath, Object controlValue, String controlParentXPath, Node testTarget, String testXPath, Object testValue, String testParentXPath) Creates a new comparison.- Parameters:
t
- the type of comparisoncontrolTarget
- the control node the comparison applies tocontrolXPath
- xpath of the control node the comparison applies tocontrolValue
- value from the control node used during comparisoncontrolParentXPath
- xpath of the control node' parenttestTarget
- the test node the comparison applies totestXPath
- xpath of the test node the comparison applies totestValue
- value from the test node used during comparisontestParentXPath
- xpath of the test node' parent
-
-
Method Details
-
getType
The kind of comparison performed.- Returns:
- the type of comparison
-
getControlDetails
Details of the control target.- Returns:
- details of the control target
-
getTestDetails
Details of the test target.- Returns:
- details of the test target
-
toString
Returns a string representation of this comparison using the givenComparisonFormatter
- Parameters:
formatter
- the ComparisonFormatter to use- Returns:
- a string representation of this comparison
-
toString
Returns a string representation of this comparison usingDefaultComparisonFormatter
-