Concordion > Commands > assertEquals > Non-String Results >

assertEquals with boolean result

For boolean expression results, the assertEquals command evaluates element text of "true", "yes" or "y" to true, and "false", "no" or "n" to false (all case insensitive).

Example

Given this instrumentation:

<span concordion:assertEquals="myMethod()">value</span>

We get the following outcomes depending on the evaluation result of the method myMethod() and the value value:

myMethod returns (boolean) value Outcome
true true SUCCESS
true Yes SUCCESS
true y SUCCESS
false fAlsE SUCCESS
false No SUCCESS
false n SUCCESS
true false FAILURE
false yes FAILURE