Examples of parameter and datatable conversion for Cucumber-JVM 2
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cuke2-parameter-datatable
README.md

README.md

PARAMETER feature & PARAMETER StepDefinition


Scenario: Delimiter annotation scenario

Step: the user names are jane,john,colin,alice --> Convert to List.

Step: the users are jane,john,colin,alice --> Convert to List< dataobject.User>. User has a single argument constructor.


Scenario: Format annotation scenario

Step: the date is 2017-11-05T09:54:13 --> Convert to java.util.Date.


Scenario: Transformer annotation scenario

Step: the name is 'John Mich Arthur Doe' --> Convert to custom dataobject.FullName. FullName does NOT have a single argument constructor.

Step: the amount is $91.63 --> Convert to custom dataobject.Money. Money does NOT have a single argument constructor.


Scenario: Single argument constructor scenario

Step: the user name is John Doe --> Convert to custom dataobject.User.


Scenario: NO single argument constructor scenario

Step: the professor is John Doe --> Convert to custom dataobject.Professor. Professor does NOT have a single argument constructor.


Scenario: Enum scenario

Step: the professor level is ASSOCIATE --> Convert to custom dataobject.ProfLevels enum.


DATATABLE feature & DATATABLE StepDefinition


Scenario: List of primitive --> Step Convert to List<List>.


Scenario: List of object containing primitive fields --> Step Convert to List.


Scenario: List of object containing primitive & enum fields --> Step Convert to List.


Scenario: List of object containing object fields --> Step Convert to List.


Scenario: Transpose List of object containing object fields --> Step Convert to List with Transpose annotation.


Scenario: List of object containing object fields with no table header --> Step Convert to List.


Scenario: Map of primitive key and value --> Step Convert to Map<String,String>.


Scenario: Map of object key and enum value --> Step Convert to Map<Professor,ProfLevels>.


Scenario: Map of primitive key and object value --> Step Convert to Map<String, Lecture>.


Scenario: Map of object key and value --> Step Convert to Map<Lectureid, Lecture>.


Scenario: Transpose Map of object key and value --> Step Convert to Map<Lectureid, Lecture> with Transpose annotation.


Scenario: Whole table to single object Lectures --> Step Convert to object Lectures.