@@ -3,6 +3,7 @@ package tests.datatables
33import io .cucumber .scala .{EN , ScalaDsl }
44import java .util .{List => JList , Map => JMap }
55
6+ import io .cucumber .scala .Implicits ._
67import io .cucumber .datatable .DataTable
78
89import scala .jdk .CollectionConverters ._
@@ -90,9 +91,7 @@ class DataTableTypeSteps extends ScalaDsl with EN {
9091
9192 Given (" the following authors as entries with empty, as table" ) { (authors : DataTable ) =>
9293 _authors = authors
93- .asList[AuthorWithEmpty ](classOf [AuthorWithEmpty ])
94- .asScala
95- .toSeq
94+ .asScalaRawList[AuthorWithEmpty ]
9695 .map(_.toAuthor)
9796 }
9897
@@ -112,9 +111,7 @@ class DataTableTypeSteps extends ScalaDsl with EN {
112111
113112 Given (" the following authors as rows with empty, as table" ) { (authors : DataTable ) =>
114113 _authors = authors
115- .asList[AuthorRowWithEmpty ](classOf [AuthorRowWithEmpty ])
116- .asScala
117- .toSeq
114+ .asScalaRawList[AuthorRowWithEmpty ]
118115 .map(_.toAuthor)
119116 }
120117
@@ -144,19 +141,13 @@ class DataTableTypeSteps extends ScalaDsl with EN {
144141
145142 Given (" the following authors as cells with empty, as table as map" ) { (authors : DataTable ) =>
146143 _authors = authors
147- .asMaps[String , AuthorCellWithEmpty ](classOf [String ], classOf [AuthorCellWithEmpty ])
148- .asScala
149- .toSeq
150- .map(_.asScala)
144+ .asScalaRawMaps[String , AuthorCellWithEmpty ]
151145 .map(line => Author (line(" name" ).cell, line(" surname" ).cell, line(" famousBook" ).cell))
152146 }
153147
154148 Given (" the following authors as cells with empty, as table as list" ) { (authors : DataTable ) =>
155149 _authors = authors
156- .asLists[AuthorCellWithEmpty ](classOf [AuthorCellWithEmpty ])
157- .asScala
158- .toSeq
159- .map(_.asScala)
150+ .asScalaRawLists[AuthorCellWithEmpty ]
160151 .map(line => Author (line(0 ).cell, line(1 ).cell, line(2 ).cell))
161152 }
162153
0 commit comments