Espionage means spy. Espionage class provides a shortcut to evaluate a ImageDifference or a ComparisonResult, and depending on the evaluation result, dispatch to "then closure" and "else closure".
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.Object |
ternary(ImageDifference imageDifference, groovy.lang.Closure actionWhenIdentical, groovy.lang.Closure actionWhenDifferent)'ternary' is a term of Mathmatics, meaning 'composed of three parts' |
|
static java.lang.Object |
ternary(ComparisonResult comparisonResult, groovy.lang.Closure actionThen, groovy.lang.Closure actionElse)Evaluate if comparisonResult.imagesAreSimilar() == true or not. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
'ternary' is a term of Mathmatics, meaning 'composed of three parts' Evaluate if imageDifference.getRatio() == 0 or not. If true, call the actionWhenIdentical closure, otherwise call the actionWhenDifferent closure.
Evaluate if comparisonResult.imagesAreSimilar() == true or not. If true, call actionThen closure, otherwise, call actionElse closure.