cucumber/cucumber-jvm — pull request #385 by mbusik (2012-09-01 23:59:26+00:00)
Title: TableDiff with list of pojos: camelcase convert of column names to field names

Example:

@Given("pattern$")
public void given_method(List input) {
...
}

List calculated;

@Then("^phrase...:$")
public void then_phrase(DataTable expected) throws Throwable {
expected.diff(calculated);
}

Diff fails, if column headers in the expected table are not written exactly the same as the field members of the pojo (even if expected and calculated are equal).

In contrast, in the @Given implementation cucumber does convert column headings to field names (camelCase).

It would be more consistent, if the same mapping rules were applied to the conversion DataDable <-> list of pojos

The present pull request contains a column header -> fieldname mapping in the ComplexTypeWriter used in the diff method.