Package org.xmlunit.diff
Class Comparison
- java.lang.Object
-
- org.xmlunit.diff.Comparison
-
public class Comparison extends java.lang.Object
Details of a single comparison XMLUnit has performed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Comparison.Detail
The 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.Detail
control
private Comparison.Detail
test
private ComparisonType
type
-
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.Detail
getControlDetails()
Details of the control target.Comparison.Detail
getTestDetails()
Details of the test target.ComparisonType
getType()
The kind of comparison performed.java.lang.String
toString()
Returns a string representation of this comparison usingDefaultComparisonFormatter
java.lang.String
toString(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:
toString
in classjava.lang.Object
- Returns:
- a string representation of this comparison
-
-