Package org.xmlunit.diff
Class Comparison
- java.lang.Object
-
- org.xmlunit.diff.Comparison
-
public class Comparison extends java.lang.ObjectDetails of a single comparison XMLUnit has performed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classComparison.DetailThe details of a target (usually some representation of an XML Node) that took part in the comparison.
-
Field Summary
Fields Modifier and Type Field Description private Comparison.Detailcontrolprivate Comparison.Detailtestprivate ComparisonTypetype
-
Constructor Summary
Constructors Constructor Description Comparison(ComparisonType t, org.w3c.dom.Node controlTarget, java.lang.String controlXPath, java.lang.Object controlValue, java.lang.String controlParentXPath, org.w3c.dom.Node testTarget, java.lang.String testXPath, java.lang.Object testValue, java.lang.String testParentXPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Comparison.DetailgetControlDetails()Details of the control target.Comparison.DetailgetTestDetails()Details of the test target.ComparisonTypegetType()The kind of comparison performed.java.lang.StringtoString()Returns a string representation of this comparison usingDefaultComparisonFormatterjava.lang.StringtoString(ComparisonFormatter formatter)Returns a string representation of this comparison using the givenComparisonFormatter
-
-
-
Field Detail
-
control
private final Comparison.Detail control
-
test
private final Comparison.Detail test
-
type
private final ComparisonType type
-
-
Constructor Detail
-
Comparison
public Comparison(ComparisonType t, org.w3c.dom.Node controlTarget, java.lang.String controlXPath, java.lang.Object controlValue, java.lang.String controlParentXPath, org.w3c.dom.Node testTarget, java.lang.String testXPath, java.lang.Object testValue, java.lang.String testParentXPath)
-
-
Method Detail
-
getType
public ComparisonType getType()
The kind of comparison performed.
-
getControlDetails
public Comparison.Detail getControlDetails()
Details of the control target.
-
getTestDetails
public Comparison.Detail getTestDetails()
Details of the test target.
-
toString
public java.lang.String toString(ComparisonFormatter formatter)
Returns a string representation of this comparison using the givenComparisonFormatter- Parameters:
formatter- the ComparisonFormatter to use- Returns:
- a string representation of this comparison
-
toString
public java.lang.String toString()
Returns a string representation of this comparison usingDefaultComparisonFormatter- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this comparison
-
-