You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Since version 6.x, we can benefit of extension methods to the Datatable class to map them to Scala collection types easily. But it assumes that we are converting only to basic types and always wrap the values in an Option.
This is not necessary for custom types registered with a DataTableType as we can assume that a scala DataTableType never returns null.
Describe the solution you'd like
We should be able to do map a Datatable to a list of custom types not wrapped in Option.
DataTableType { map: Map[String,String] =>// map to CustomType
}
Given("the following table as Scala List of custom type") { (table: DataTable) =>// We want this:valdata:Seq[CustomType] = table.asScalaRawList[CustomType]
// Instead of:valdata:Seq[Option[CustomType]] = table.asScalaList[CustomType]
// ...
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Since version 6.x, we can benefit of extension methods to the
Datatable
class to map them to Scala collection types easily. But it assumes that we are converting only to basic types and always wrap the values in anOption
.This is not necessary for custom types registered with a
DataTableType
as we can assume that a scalaDataTableType
never returnsnull
.Describe the solution you'd like
We should be able to do map a
Datatable
to a list of custom types not wrapped inOption
.The text was updated successfully, but these errors were encountered: