Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support Scala collection types in datatable step definitions #50

@gaeljw

Description

@gaeljw

Describe the solution you'd like
I would like to be be able to write such steps definitions:

Given("the following authors as entries") { (authors: Seq[Author]) =>
  // Some code
}

Rather than having to use Java types:

Given("the following authors as entries") { (authors: java.util.List[Author]) =>
  // Some code
}

Same goes for List[List[]] or List[Map[]].

Describe alternatives you've considered
Depending on the faisability, an alternative would be to provide in Cucumer Scala, some implicit methods to convert from DataTable to Scala types. And promote this usage in the documentation.

Additional note
This must not be a breaking change, if people rely on Java Types, their code should obvisouly still continue to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions