2016-09-15 10 views
0

오늘은 SpecFlow + Selenium을 사용하여 BDD를 연구하기 시작했으며 1을 표시하는 몇 가지 예제가 있는데 이는입니다.BDD SpecFlow 시나리오

두 개 이상의 항목을 반환하는 시나리오는 어떻게 작성합니까? 예를 들어 다음의 2 개 행을 반환 받아?,이 경우

name | last name 
test | fulano 
test | siclano 

, 나는 다음 쓰기 어떻게 :

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

이 결과는 아래 표와 동일합니다 테이블에 나타 났습니까?

답변

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 
}