Skip to content

Commit 0092433

Browse files
authored
Add detail to DataTable hint in JavaSnippet and update test (#1298)
* Add details to DataTable hint in JavaSnippet and update unit test
1 parent 179ba77 commit 0092433

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

java/src/main/java/cucumber/runtime/java/AbstractJavaSnippet.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public String arguments(List<Class<?>> argumentTypes) {
2424
public String tableHint() {
2525
return " // For automatic transformation, change DataTable to one of\n" +
2626
" // List<YourType>, List<List<E>>, List<Map<K,V>> or Map<K,V>.\n" +
27-
" // E,K,V must be a scalar (String, Integer, Date, enum etc)\n";
27+
" // E,K,V must be a scalar (String, Integer, Date, enum etc).\n" +
28+
" // Field names for YourType must match the column names in \n" +
29+
" // your feature file (except for spaces and capitalization).\n";
2830
}
2931

3032
@Override

java/src/test/java/cucumber/runtime/java/JavaSnippetTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ public void generatesSnippetWithDataTable() {
153153
" // Write code here that turns the phrase above into concrete actions\n" +
154154
" // For automatic transformation, change DataTable to one of\n" +
155155
" // List<YourType>, List<List<E>>, List<Map<K,V>> or Map<K,V>.\n" +
156-
" // E,K,V must be a scalar (String, Integer, Date, enum etc)\n" +
156+
" // E,K,V must be a scalar (String, Integer, Date, enum etc).\n" +
157+
" // Field names for YourType must match the column names in \n" +
158+
" // your feature file (except for spaces and capitalization).\n" +
157159
" throw new PendingException();\n" +
158160
"}\n";
159161
PickleTable dataTable = new PickleTable(asList(new PickleRow(asList(new PickleCell(null, "col1")))));

0 commit comments

Comments
 (0)