В моем файле SpecFlow .feature
есть следующее.
Scenario: Signout
Given I am signed in with an <userAccountType> account
When I sign out
Then I should see the signin page
Examples:
| userAccountType |
| AAD |
| MSA |
Это код в моем определении шага:
[Given(@"I am signed in with an (.*) account")]
public async Task GivenIAmSignedInWithAnAccount(string userAccountType)
{
// ...
}
Когда он запускается, я получаю строку<userAccountType>
передается в параметр в моем методе вместо AAD
или MSA
.