I'm updating my cucumber version from old info.cukes to latest io.cucumber (v6.8.1) and some of my tests are failing due to change of transformer behavior.
Passing empty strings used to be possible but now they are transformed to null
. How can I pass empty string to DataTable argument?
Scenario: Testing datatable with empty string
When Passing empty string as second parameter
| first | second |
| simple | |
@When("Passing empty string as second parameter")
public void test_definition(DataTable dataTable) {
List<Map<String, String>> maps = dataTable.asMaps(String.class, String.class);
System.out.println(maps);
// this results in [{first=simple, second=null}]
// is there a way to pass empty string and achieve [{first=simple, second=}]?
}