Define, Share and Automate your tests / specifications

Tables & List comparison

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 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 ?
some cases
Example with error display
In this example the test returns the same List for each iteration 
[ code | name   |
|  BR  | Brazil |
|  FR  | France |
It's an unsorted subset of countries table

 Jspresso Tmar © 2013 - 2015