データベースに追加されるステーションの有効性をチェックするテストシナリオの作成に問題があります。誰かがそれを正しく書く方法を示す例を私に提供できますか?どういうわけか、「シナリオの概要」は正しい方法ではないと感じています...
「stations」と「new_stations」は複雑なタイプです。「stations」をすでに定義して、それぞれに「new_stations」を追加できるかどうかを確認します。
Scenario Outline:
Given We have <stations>
And We are trying to add a station of the <new_stations> having the same id, the same name or the same code
Then we should not be able to add it
# <stations>
| Id | Code | Name | Validity |
| 1 | 1 | City 1 | from 2013-01-01 to 2013-04-01 |
| 2 | 2 | City 2 | from 2013-03-15 to 2013-05-01 |
# <new_stations>
| Id | Code | Name | Validity |
| 1 | 234 | City 4 | from 2013-03-01 to 2013-07-01 |
| 3 | 5 | City 1 | from 2013-03-01 to 2013-07-01 |
| 4 | 2 | City 3 | from 2012-03-15 to 2013-07-15 |
したがって、「new_stations」は追加しないでください
- Id 1は、そのIDが一意ではないため
- 名前が一意ではないため、ID 3
- コードが一意ではないため、ID 4