In some cases it’s interesting to check the validity of a list returned by a test method
Tmar has four operators to compare a returned list with a table content :
in
orderedIn
match
orderedIn
In this expression , “?” is the returned list and @tableName the table content
? in @countries
? orderedIn @countries
? match @countries
? orderedIn @countries
With in and orderedIn, the result list has to be a subset of the referenced table
With match and orderedMatch, both must have the same number of lines
The “?” can also be put at the right of the expression.
In that case, with in and orderedIn operators, the referenced table has to be a subset of the result list
@countries in ?
@countries orderedIn ?
Tables & List comparison
Define, Share and Automate your tests / specifications
some cases
Example with error display
[ code | name |
| BR | Brazil |
| FR | France |
In this example the test returns the same List for each iteration
It's an unsorted subset of countries table