1
我有SpecFlow場景,我想指定一個可能的值範圍作爲輸入。如何實現SpecFlow輸入屬性的解析器
Scenario: Search completed successfully
Given I am on the application screen
And I enter an number of AA191DD
When I press the search button and wait till search will be completed
Then I should see *AtLeastOne* number of cars available for given number
實際上,我正試圖實現某種Times結構。 要求是要能夠進入某些範圍,如:
- AtLeastOnce
- 無
- 精確({數})
當前的實現是:我有編號枚舉:
public enum Number
{
AtLeastOnce,
None
}
並且Specflow綁定方法的輸入爲這個枚舉。
public void ThenIShouldSeeNumberOfCarsAvailable(Number numberEnum)
{
}
但現在我不知道如何實現Numbers.Exact(45)。 有什麼建議嗎?