public class Comparison extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Comparison.Detail
The details of a target (usually some representation of an XML
Node) that took part in the comparison.
|
| Constructor and Description |
|---|
Comparison(ComparisonType t,
Node controlTarget,
String controlXPath,
Object controlValue,
String controlParentXPath,
Node testTarget,
String testXPath,
Object testValue,
String testParentXPath)
Creates a new comparison.
|
Comparison(ComparisonType t,
XPathContext controlContext,
Node controlTarget,
Object controlValue,
XPathContext testContext,
Node testTarget,
Object testValue)
Creates a new comparison.
|
| Modifier and Type | Method and Description |
|---|---|
Comparison.Detail |
getControlDetails()
Details of the control target.
|
Comparison.Detail |
getTestDetails()
Details of the test target.
|
ComparisonType |
getType()
The kind of comparison performed.
|
String |
toString()
Returns a string representation of this comparison using
DefaultComparisonFormatter |
String |
toString(ComparisonFormatter formatter)
Returns a string representation of this comparison using the
given
ComparisonFormatter |
public Comparison(ComparisonType t, Node controlTarget, String controlXPath, Object controlValue, String controlParentXPath, Node testTarget, String testXPath, Object testValue, String testParentXPath)
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' parentpublic Comparison(ComparisonType t, XPathContext controlContext, Node controlTarget, Object controlValue, XPathContext testContext, Node testTarget, Object testValue)
t - the type of comparisoncontrolContext - xpathContext object contains the current and parent XPathcontrolTarget - the control node the comparison applies tocontrolValue - value from the control node used during comparisontestContext - xpathContext object contains the current and parent XPathtestTarget - the test node the comparison applies totestValue - value from the test node used during comparisonpublic ComparisonType getType()
public Comparison.Detail getControlDetails()
public Comparison.Detail getTestDetails()
public String toString(ComparisonFormatter formatter)
ComparisonFormatterformatter - the ComparisonFormatter to usepublic String toString()
DefaultComparisonFormatterCopyright © 2001–2025 XMLUnit. All rights reserved.