Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mickaelw
Created August 22, 2020 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mickaelw/e4889dd6f9661afff316cbf687903ed0 to your computer and use it in GitHub Desktop.
Save mickaelw/e4889dd6f9661afff316cbf687903ed0 to your computer and use it in GitHub Desktop.
Feature: Basket price calculation
Scenario Outline: Basket without discounted price
Given A basket that not contains any book
When I add <time> times the book <book_title> into the basket
Then The price of the basket is <basket_price>
Examples:
| time | book_title | basket_price |
| 1 | 2 | 8.00 |
| 2 | 1 | 15.20 |
| 3 | 5 | 18 |
Scenario Outline: Basket with discounted price
Given A basket that not contains any book
When I add those <books> into the basket
Then The price of the basket is <basket_price>
Examples:
| books | basket_price |
| 1,2 | 16.00 |
| 1,2,3 | 24.00 |
| 1,2,3,4 | 32.00 |
| 1,2,3,4,5 | 40.00 |
| 1,1,2,2,3,3,4,5 | 61.60 |
| 1,1,2,2,2,3,3,3,3,4,5 | 73.20 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment