Skip to content
Discussion options

You must be logged in to vote

Tables may contain null values and nullable keys follows from that. Unfortunately you picked the one example where that isn't apparent. For example by leaving two cells blank:

Given a table
  | a |   |
  |   | d |

Then we have a table with [[a, null], [null, d]]. Then using DataTable.asMap() yields {a=null, null=d}.

The exception you're seeing is thrown because there are a few different ways to transform datatables. The empty first header cell helps Cucumber choose the method for creating the values in the map. Either all elements after the first cell in each row are transformed. Or all elements after the first cell are paired with their header into a map and then transformed. For the lat…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mpkorstanje
Comment options

Answer selected by toellrich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants