You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The not qualifier in the predicate negates most of the time the predicate result.
But there are a few cases, for which it does not invert a predicate failure.
Hurl detects some inconsistencies between the predicate and the value to which it is applied and prefer to make the assert fail.
Example 1 - the value (returned by the query) is 1 (integer)
All the following predicates fail:
equals 2
equals null
contains "toto"
Negating the predicate does not necessarily make the predicate succeeds.
not equals 2
not equals null
not contains "toto" => failure
The last one fails because the contains predicate only apply to String value, and thus it does not make sense to apply it to a integer value.
This is equivalent to a type error.
Example 2 - the value is not found
All the following predicates fail:
exist
equals 1
contains "toto"
all these predicates will success if there are negated
not exist
not equals 1
not contains "toto"
There can't be any "type checking" when no value is returned.
Example 3 - the value is present but does not have a value
for example, the Secure cookie attribute, it is present or not
but it does not have a value
All the following predicates fail:
equals true
equals false
equals 1
contains "toto"
All these predicates will fail even if they are negated.
not equals true
not equals false
not equals 1
not contains "toto"
They must be applied to a value. exist is the only predicate that can be applied.
The text was updated successfully, but these errors were encountered:
The
not
qualifier in the predicate negates most of the time the predicate result.But there are a few cases, for which it does not invert a predicate failure.
Hurl detects some inconsistencies between the predicate and the value to which it is applied and prefer to make the assert fail.
Example 1 - the value (returned by the query) is 1 (integer)
All the following predicates fail:
Negating the predicate does not necessarily make the predicate succeeds.
The last one fails because the contains predicate only apply to String value, and thus it does not make sense to apply it to a integer value.
This is equivalent to a type error.
Example 2 - the value is not found
All the following predicates fail:
all these predicates will success if there are negated
There can't be any "type checking" when no value is returned.
Example 3 - the value is present but does not have a value
for example, the Secure cookie attribute, it is present or not
but it does not have a value
All the following predicates fail:
All these predicates will fail even if they are negated.
They must be applied to a value.
exist
is the only predicate that can be applied.The text was updated successfully, but these errors were encountered: