2016-10-28 4 views
0

私は、次のBDDのいずれかに合致したいと思います:私のキュウリBDDステップ定義で "the"オプションを作る方法?

Then the response status should be "200" 
Then response status should be "200" 

私は「」オプションを作りたいです。私はこれらの2つのルールを同じステップにマッピングしたい。

はここに私の試みですが、それは動作しません:

@Then("^(?:the |)response status should be \"([^\"]*)\"$") 
public void the_response_status_should_be(String arg1) { 
    ... 
} 

答えて

1

これはうまくいくかもしれない... "^(?:the)*response status should be \"([^\"]*)\"$"

+1

動作しなかったことが、追加 '?'やりました!あなたの答えを編集します; D – Kayvar

関連する問題