@@ -3,6 +3,7 @@ package tests.datatables
3
3
import io .cucumber .scala .{EN , ScalaDsl }
4
4
import java .util .{List => JList , Map => JMap }
5
5
6
+ import io .cucumber .scala .Implicits ._
6
7
import io .cucumber .datatable .DataTable
7
8
8
9
import scala .jdk .CollectionConverters ._
@@ -90,9 +91,7 @@ class DataTableTypeSteps extends ScalaDsl with EN {
90
91
91
92
Given (" the following authors as entries with empty, as table" ) { (authors : DataTable ) =>
92
93
_authors = authors
93
- .asList[AuthorWithEmpty ](classOf [AuthorWithEmpty ])
94
- .asScala
95
- .toSeq
94
+ .asScalaRawList[AuthorWithEmpty ]
96
95
.map(_.toAuthor)
97
96
}
98
97
@@ -112,9 +111,7 @@ class DataTableTypeSteps extends ScalaDsl with EN {
112
111
113
112
Given (" the following authors as rows with empty, as table" ) { (authors : DataTable ) =>
114
113
_authors = authors
115
- .asList[AuthorRowWithEmpty ](classOf [AuthorRowWithEmpty ])
116
- .asScala
117
- .toSeq
114
+ .asScalaRawList[AuthorRowWithEmpty ]
118
115
.map(_.toAuthor)
119
116
}
120
117
@@ -144,19 +141,13 @@ class DataTableTypeSteps extends ScalaDsl with EN {
144
141
145
142
Given (" the following authors as cells with empty, as table as map" ) { (authors : DataTable ) =>
146
143
_authors = authors
147
- .asMaps[String , AuthorCellWithEmpty ](classOf [String ], classOf [AuthorCellWithEmpty ])
148
- .asScala
149
- .toSeq
150
- .map(_.asScala)
144
+ .asScalaRawMaps[String , AuthorCellWithEmpty ]
151
145
.map(line => Author (line(" name" ).cell, line(" surname" ).cell, line(" famousBook" ).cell))
152
146
}
153
147
154
148
Given (" the following authors as cells with empty, as table as list" ) { (authors : DataTable ) =>
155
149
_authors = authors
156
- .asLists[AuthorCellWithEmpty ](classOf [AuthorCellWithEmpty ])
157
- .asScala
158
- .toSeq
159
- .map(_.asScala)
150
+ .asScalaRawLists[AuthorCellWithEmpty ]
160
151
.map(line => Author (line(0 ).cell, line(1 ).cell, line(2 ).cell))
161
152
}
162
153
0 commit comments