assertFalse
Validates an expression to be of type boolean
false
. An optional failureMessage
can be given for displaying should the validation fails.
assertFalse(expression)
# Or
assertFalse(expression, failureMessage)
#
Parametersexpression
: An expression that must evaluate to aboolean
failureMessage
: An optionalstring
message to show when validation fails
#
Returns- No value
#
ExampleassertFalse(false && length([]) == 0 && containsKey({name: 'Bo'}, 'age'))
assertFalse(nonEmpty('Hello World'), 'Given string is not empty')