Class StringBasedDifferenceViewer
- java.lang.Object
-
- org.eclipse.epsilon.internal.eunit.dt.diff.StringBasedDifferenceViewer
-
- All Implemented Interfaces:
IDifferenceViewer
public class StringBasedDifferenceViewer extends Object implements IDifferenceViewer
Fallback difference viewer which converts both arguments to strings and then compares them. If thedelta
is not null, this viewer will be disabled.- Author:
- Antonio Garcia-Dominguez
-
-
Field Summary
-
Fields inherited from interface org.eclipse.epsilon.eunit.dt.diff.IDifferenceViewer
EXTENSION_POINT_ID
-
-
Constructor Summary
Constructors Constructor Description StringBasedDifferenceViewer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCompare(Object expected, Object actual, Object delta)
Returnstrue
if this viewer can show the differences between the expected and the actual results.void
compare(Object expected, Object actual, Object delta)
Shows the differences between the expected and actual values, which might have been precomputed or not.
-
-
-
Method Detail
-
canCompare
public boolean canCompare(Object expected, Object actual, Object delta)
Description copied from interface:IDifferenceViewer
Returnstrue
if this viewer can show the differences between the expected and the actual results. This method will be called from the SWT thread.- Specified by:
canCompare
in interfaceIDifferenceViewer
- Parameters:
expected
- Expected value.actual
- Actual value.delta
- Precomputed differences, if available. Otherwise,null
.- Returns:
true
if this instance can either:- compute and show the differences between
expected
andactual
- , or b) show the precomputed differences in
delta
.
Otherwise, returns
false
.- compute and show the differences between
-
compare
public void compare(Object expected, Object actual, Object delta)
Description copied from interface:IDifferenceViewer
Shows the differences between the expected and actual values, which might have been precomputed or not. This method will be called from the SWT thread. This method should only be called ifIDifferenceViewer.canCompare(java.lang.Object, java.lang.Object, java.lang.Object)
returned true with the same parameters.- Specified by:
compare
in interfaceIDifferenceViewer
- Parameters:
expected
- Expected value.actual
- Actual value.delta
- Precomputed difference, if available. Otherwise,null
.
-
-