|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.unitils.reflectionassert.report.impl.DefaultDifferenceView
public class DefaultDifferenceView
Formatter that will output all leaf differences in the tree and, in case of an unordered collection difference, the difference of all best matches.
Nested Class Summary | |
---|---|
protected class |
DefaultDifferenceView.DifferenceFormatterVisitor
The visitor for visiting the difference tree. |
Field Summary | |
---|---|
protected DefaultDifferenceView.DifferenceFormatterVisitor |
differenceFormatterVisitor
The visitor for visiting the difference tree |
protected ObjectFormatter |
objectFormatter
Formatter for object values. |
protected boolean |
outputtingUnorderedCollectionDifference
True when an unordered collection is being formatted. |
Constructor Summary | |
---|---|
DefaultDifferenceView()
|
Method Summary | |
---|---|
protected String |
createFieldName(String fieldName,
String innerFieldName,
boolean includePoint)
Adds the inner field name to the given field name. |
String |
createView(Difference difference)
Creates a string representation of the given difference tree. |
protected String |
formatDifference(CollectionDifference collectionDifference,
String fieldName)
Creates a string representation of a collection difference. |
protected String |
formatDifference(Difference difference,
String fieldName)
Creates a string representation of a simple difference. |
protected String |
formatDifference(MapDifference mapDifference,
String fieldName)
Creates a string representation of a map difference. |
protected String |
formatDifference(ObjectDifference objectDifference,
String fieldName)
Creates a string representation of an object difference. |
protected String |
formatDifference(UnorderedCollectionDifference unorderedCollectionDifference,
String fieldName)
Creates a string representation of an unordered collection difference. |
protected String |
formatDifferrence(ClassDifference classDifference,
String fieldName)
|
protected String |
formatObject(Object object)
|
protected String |
formatValues(String fieldName,
Object leftValue,
Object rightValue)
Formats and appends the given fieldname and object values. |
protected String |
formatValuesOnMultipleLines(String fieldName,
String leftValueFormatted,
String rightValueFormatted)
|
protected String |
formatValuesOnOneLine(String fieldName,
String leftValueFormatted,
String rightValueFormatted)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean outputtingUnorderedCollectionDifference
protected ObjectFormatter objectFormatter
protected DefaultDifferenceView.DifferenceFormatterVisitor differenceFormatterVisitor
Constructor Detail |
---|
public DefaultDifferenceView()
Method Detail |
---|
public String createView(Difference difference)
createView
in interface DifferenceView
difference
- The root difference, not null
protected String formatDifference(Difference difference, String fieldName)
difference
- The difference, not nullfieldName
- The current fieldName, null for root
protected String formatDifference(ObjectDifference objectDifference, String fieldName)
objectDifference
- The difference, not nullfieldName
- The current fieldName, null for root
protected String formatDifferrence(ClassDifference classDifference, String fieldName)
protected String formatDifference(CollectionDifference collectionDifference, String fieldName)
collectionDifference
- The difference, not nullfieldName
- The current fieldName, null for root
protected String formatDifference(MapDifference mapDifference, String fieldName)
mapDifference
- The difference, not nullfieldName
- The current fieldName, null for root
protected String formatObject(Object object)
protected String formatDifference(UnorderedCollectionDifference unorderedCollectionDifference, String fieldName)
unorderedCollectionDifference
- The difference, not nullfieldName
- The current fieldName, null for root
protected String formatValues(String fieldName, Object leftValue, Object rightValue)
fieldName
- The field name, null if there is no field nameleftValue
- The left valuerightValue
- The right value
protected String formatValuesOnOneLine(String fieldName, String leftValueFormatted, String rightValueFormatted)
protected String formatValuesOnMultipleLines(String fieldName, String leftValueFormatted, String rightValueFormatted)
protected String createFieldName(String fieldName, String innerFieldName, boolean includePoint)
fieldName
- The fieldinnerFieldName
- The field to append, not nullincludePoint
- True if a point should be added
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |