ttutisani/Xunit.Gherkin.Quick

Scenario outlines don't push values into Data Table objects

csurfleet opened this issue ยท 3 comments

If you use a scenario:

Scenario Outline: Register fails for under 18s
Given 'Sue Smith' registers with the site
        | Age     |
        | <Age> |
When she registers
Then the registration fails
Examples:
    | Age |
    | 17   |

With c#:

[Given(@"'(\w+ \w+)' registers with the site")]
 public void Given_Registration(string name, DataTable data)
 {}

I would expect data to include '17' rather than '<Age>'

I'm happy to do the work for this if you agree with the way it should work @ttutisani ?

Good catch!
Yes, I agree that it should work this way.
Thanks for your help!

Awesome, expect a PR over the weekend

Sounds good. Just one note - do not replace the placeholders in the first row because it is a header row by convention (as documented here too https://github.com/ttutisani/Xunit.Gherkin.Quick/blob/master/docs/datatable-argument.md).