public class Diff extends Object
DiffBuilder| Constructor and Description |
|---|
Diff(Source controlSource,
Source testSource,
ComparisonFormatter formatter,
Iterable<Difference> differences)
Encapsulates the compared sources and the differences found.
|
Diff(Source controlSource,
Source testSource,
Iterable<Difference> differences)
Encapsulates the compared sources and the differences found.
|
| Modifier and Type | Method and Description |
|---|---|
String |
fullDescription()
Returns a string representation of this diff
using internal
ComparisonFormatter or
DefaultComparisonFormatter if formatter wasn't set. |
String |
fullDescription(ComparisonFormatter formatter)
Returns a string representation of this diff
using the given
ComparisonFormatter
Each comparison result separated by the end of the line. |
Source |
getControlSource() |
Iterable<Difference> |
getDifferences() |
Source |
getTestSource() |
boolean |
hasDifferences() |
String |
toString()
Returns a string representation of first found difference in this diff
using internal
ComparisonFormatter or
DefaultComparisonFormatter if formatter wasn't set |
String |
toString(ComparisonFormatter formatter)
Returns a string representation of first found difference in this diff
using the given
ComparisonFormatter |
public Diff(Source controlSource, Source testSource, Iterable<Difference> differences)
controlSource - the control XML sourcetestSource - the test XML sourcedifferences - the differences foundpublic Diff(Source controlSource, Source testSource, ComparisonFormatter formatter, Iterable<Difference> differences)
controlSource - the control XML sourcetestSource - the test XML sourcedifferences - the differences foundformatter - formatter to use when displaying the differencespublic String fullDescription()
ComparisonFormatter or
DefaultComparisonFormatter if formatter wasn't set.
Each comparison result separated by the end of the line.
public String fullDescription(ComparisonFormatter formatter)
ComparisonFormatter
Each comparison result separated by the end of the line.
formatter - the ComparisonFormatter to usepublic boolean hasDifferences()
public Iterable<Difference> getDifferences()
public Source getControlSource()
public Source getTestSource()
public String toString()
ComparisonFormatter or
DefaultComparisonFormatter if formatter wasn't settoString in class ObjectfullDescription()public String toString(ComparisonFormatter formatter)
ComparisonFormatterformatter - the ComparisonFormatter to usefullDescription(ComparisonFormatter)Copyright © 2001–2025 XMLUnit. All rights reserved.