ttutisani/Xunit.Gherkin.Quick

'And' step keyword add to more constraint

midoriiro opened this issue · 4 comments

The following feature tests does not works as expected:

Feature: HostName
  
  Scenario: Non wild carded Localhost hostname 
    Given a hostname with name 'localhost'
    And its not wild carded
    When I verify if its equals to localhost
    Then name should be equals to localhost  
    And representation string should be 'localhost'
    
  Scenario: Wild carded localhost hostname 
    Given a hostname with name 'localhost'
    And its wild carded 
    Then representation string should be '*.localhost'

The issue is with the step And its not wild carded if I decorated it with 'Given' attribute the test runner will not recognized it as is. I should be able to define all my 'Given/And' steps with the 'Given' attribute in my C# code. I'm using pytest-bdd for other projects and the 'And' step does not exists as is. You can define any 'Given' step you want and the two below scenario will work as expected.

EDIT: Just adding that step 'representation string should be 'localhost'' related C# method need to be decorated with 'Then' and 'And' attribute, I should be able to decorate that method once with 'Then' attribute.

Do I missing something with this library ?