Package org.xmlunit.diff
Class Diff
java.lang.Object
org.xmlunit.diff.Diff
The Diff-Object is the result of two comparisons.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Sourceprivate static final ComparisonFormatterprivate final Iterable<Difference> private final ComparisonFormatterprivate final Source -
Constructor Summary
ConstructorsConstructorDescriptionDiff(Source controlSource, Source testSource, Iterable<Difference> differences) Diff(Source controlSource, Source testSource, ComparisonFormatter formatter, Iterable<Difference> differences) -
Method Summary
Modifier and TypeMethodDescriptionReturns a string representation of this diff using internalComparisonFormatterorDefaultComparisonFormatterif formatter wasn't set.fullDescription(ComparisonFormatter formatter) Returns a string representation of this diff using the givenComparisonFormatterbooleantoString()Returns a string representation of first found difference in this diff using internalComparisonFormatterorDefaultComparisonFormatterif formatter wasn't settoString(ComparisonFormatter formatter) Returns a string representation of first found difference in this diff using the givenComparisonFormatter
-
Field Details
-
DEFAULT_FORMATTER
-
differences
-
controlSource
-
testSource
-
formatter
-
-
Constructor Details
-
Diff
-
Diff
public Diff(Source controlSource, Source testSource, ComparisonFormatter formatter, Iterable<Difference> differences)
-
-
Method Details
-
fullDescription
Returns a string representation of this diff using internalComparisonFormatterorDefaultComparisonFormatterif formatter wasn't set.Each comparison result separated by the end of the line.
- Returns:
- a string representation of this diff
- Since:
- 2.8.3
-
fullDescription
Returns a string representation of this diff using the givenComparisonFormatterEach comparison result separated by the end of the line.
- Parameters:
formatter- theComparisonFormatterto use- Returns:
- a string representation of this diff
- Since:
- 2.8.3
-
hasDifferences
public boolean hasDifferences()- Returns:
- true if there was at least one difference.
-
getDifferences
- Returns:
- all differences found before the comparison process stopped.
-
getControlSource
-
getTestSource
-
toString
Returns a string representation of first found difference in this diff using internalComparisonFormatterorDefaultComparisonFormatterif formatter wasn't set -
toString
Returns a string representation of first found difference in this diff using the givenComparisonFormatter- Parameters:
formatter- theComparisonFormatterto use- Returns:
- a string representation of first found difference in this diff
- See Also:
-