2016-09-15 16 views
0

今日、私はSpecFlow + Seleniumを使用してBDDを研究し始めました。を返すだけの例がいくつか見つかりました。です。BDD SpecFlowシナリオ

を返すシナリオをどのように記述しますか。たとえば:

Given a name "test" 
I click on the SEARCH button 

すると結果は下記の表に等しくなります。

name | last name 
test | fulano 
test | siclano 

この場合は、どのように私はの2行を返す受諾?THEN書くのですかテーブルが示された?

答えて

1

シナリオ:

Given a name "test" 
When I click on the SEARCH button 
Then the result will be 
| name | last name 
| test | fulano 
| test | siclano 

コード:

[Then("The result will be")] 
public void ThenTheResultWillBe(Table table) 
{ 
    //check that the result contains all the values in the table 
} 
関連する問題