Allow the assertEquals command to match "Yes/No" "True/False" "Y/N" "Yes/-" with a Boolean returned from the system under test.
To indicate an expected value of "true" any of the following strings can be used:
To indicate an expected value of "false" any of the following strings can be used:
The strings are compared in a non case sensitive way. Thus, all combination of upper and lower case are allowed in the previous list of allowed stings (e.g. tRUe).
Given this instrumentation:
<span concordion:assertEquals="#GetBooleanValue()">(some boolean string)</span>
We get the following outcomes depending on the bool result of the method "GetBooleanValue" and the value
replaced instead of "Boolean String":
GetBooleanValue() | Boolean String | Outcome ? |
---|---|---|
true | true | SUCCESS |
true | True | SUCCESS |
true | TRUE | SUCCESS |
true | tRuE | SUCCESS |
true | Yes | SUCCESS |
true | Y | SUCCESS |
true | FALSE | FAILURE |
true | no | FAILURE |
true | - | FAILURE |
true | SomeString | FAILURE |
false | False | SUCCESS |
false | No | SUCCESS |
false | N | SUCCESS |
false | - | FAILURE |
false | _ | FAILURE |
false | True | FAILURE |
false | OtherString | FAILURE |
false | StringContainingFalse | FAILURE |