Define, Share and Automate your tests / specifications

Table & List comparison, returned list format

Tmar has operators to compare a returned list with a table content
For maximum flexibility, Tmar allows for three multi-dimensional formats as return value
  • List of List, with header columns name in the first list and lines values in the following  
tmar.result =
[['code','name'],
 ['FR','France'],
 ['US','United States'],
 ['BR','Brazil']]
  • List of Map, with a Map of fields name and value for each line 
tmar.result =
[['code':'FR','name':'France',
 ['code':'US','name':'United States'],
 ['code':'BR','name':'Brazil']]                            
 
  • Map of List with a Map of columns with the list of all the column’s values 
tmar.result =
['code':['FR','US','BR'],
 'name':['France','United States','Brazil']]
If the table is a single column table, with the in operator, Tmar will also accept a single value as result value from the test class. In that case, Tmar will consider this value as a List with only one element