public class ComparisonResult
extends java.lang.Object
Instance of this class represents single result of performed comparison for two objects.
Result tracks 'actual' object, 'expected' object, instance of a ComparisonPerformer used to compare those
objects, and a single boolean flag as a result of comparison - objects either equal, or not.
So short and uninformative result can be created for two peimitive objects, when there's nothing to compare
except for value itself. Or for two objects when they are not null-consistent. For more complex comparison
see ComplexComparisonResult
| Constructor and Description |
|---|
ComparisonResult(java.lang.Object actual,
java.lang.Object expected,
ComparisonPerformer<?> comparisonPerformer,
boolean success) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
java.lang.Object |
getActual() |
ComparisonPerformer<?> |
getComparisonPerformer() |
java.lang.Object |
getExpected() |
int |
hashCode() |
boolean |
isSuccess() |
java.lang.String |
toString() |
public ComparisonResult(java.lang.Object actual,
java.lang.Object expected,
ComparisonPerformer<?> comparisonPerformer,
boolean success)
actual - - actual compared valueexpected - - expected compared valuecomparisonPerformer - - the performer that performed the comparisonsuccess - - indicator whether values are equalpublic java.lang.Object getActual()
public java.lang.Object getExpected()
public ComparisonPerformer<?> getComparisonPerformer()
public boolean isSuccess()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Object