Skip to main content
Quick navigation

Check Operators

Depending on the type of the data you are testing, there are a range of different operators available for checks. Below details the operators for each distinct data type.

String

OperatorDescription
matchesReturns true if the string matches the provided regular expression pattern. Note this uses the Java 8 regex flavor.
does not matchReturns true if the the string does not match the provided regular expression pattern. Note this uses the Java 8 regex flavor.
is nullReturns true if the string is null
is not nullReturns true if the string is not null
equalsReturns true if the string equals a provided value
does not equalReturns true if the string does not equal a provided value
containsReturns true if the string contains the provided value
does not containReturns true if the string does not contain the provided value
ends withReturns true if the string ends with the provided value
does not end withReturns true if the string does not end with the provided value
has lengthReturns true if the string has length of the specified value
does not have lengthReturns true if the string does not have length of the specified value
starts withReturns true if the string starts with the specified value
does not start withReturns true if the string does not start with the specified value

Number

OperatorDescription
is nullReturns true if the number is null
is not nullReturns true if the number is not null
is greater thanReturns true if the number is greater than the specified value
is greater than or equalReturns true if the number is greater than or equal to the specified value
is less thanReturns true if the number is less than the specified value
is less than or equalReturns true if the number is less than or equal to the specified value
equalsReturns true if the number equals the specified value
doest not equalReturns true if the number does not equal the specified value

Date/Time

OperatorDescription
is nullReturns true if the date is null
is not nullReturns true if the date is not null
is beforeReturns true if the date is before the specified date/time
is before or equalReturns true if the date is before or equal to the specified date/time
is afterReturns true if the date is after the specified date/time
is after or equalReturns true if the date is after or equal to the specified date/time
equalsReturns true if the date equals the specified date/time
does not equalReturns true if the date does not equals the specified date/time

List

OperatorDescription
is nullReturns true if the list is null
is not nullReturns true if the list is not null
existsReturns true if the specified value exists in the list
does not existReturns true if the specified value does not exist in the list
for allReturns true if each element in the list passes the provided test
not allReturns true if each element in the list does not pass the provided test
has same elementsReturns true if the list has the same elements as the provided list
not same elementsReturns true if the list does not have the same elements as the provided list
has subsetReturns true if the list has a subset of the provided list items
does not have subsetReturns true if the list does not have a subset of the provided list items
containsReturns true if the list contains the provided value
does not containReturns true if the list does not contain the provided value
has lengthReturns true if the list has length of the specified value
does not have lengthReturns true if the list does not have length of the specified value
equalsReturns true if the list equals the specified value
does not equalReturns true if the list does not equal the specified value

Map/Object

OperatorDescription
is nullReturns true if the map/object is null
is not nullReturns true if the map/object is not null
containsReturns true if the map/object contains the specified value
does not containReturns true if the map/object does not contain the specified value
has keyReturns true if the map/object has the key that's specified
does not have keyReturns true if the map/object does not have the key that's specified
has valueReturns true if the map/object has the value that's specified
does not have valueReturns true if the map/object does not have the value that's specified
equalsReturns true if the map/object equals the specified value
does not equalReturns true if the map/object does not equal the specified value

Boolean

OperatorDescription
is trueReturns true if the boolean value is true
is falseReturns true if the boolean value is false