Skip to content

Commit ebd655e

Browse files
committed
Add detail to DataTable hint in JavaSnippet and update test
1 parent 4be971a commit ebd655e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
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+
" // Make sure the variable names for YourType match the column names\n" +
29+
" // in your feature file.\n";
2830
}
2931

3032
@Override

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

+2
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ public void generatesSnippetWithDataTable() {
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" +
156156
" // E,K,V must be a scalar (String, Integer, Date, enum etc)\n" +
157+
" // Make sure the variable names for YourType match the column names\n" +
158+
" // in your feature file.\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)