Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Story 1: Items should be added to stock
- As a store owner, new items added to the stock should be kept track of.
- Scenario 1: Add items to empty stock
- When the stock is empty, if 3 Books are added to the stock, then the stock should contain 3 books
- Scenario 2: Add items to non-empty stock
- When the stock has 4 boxes of cheese and 2 apples are added, then the stock should contain a total of 6 items.
- --------------------------------------------------------------------------------------------------------------
- Story 2: Customers buy items
- When a customer buys an item, as a store owner, the sold item should be removed from stock.
- Scenario 1: Selling items in stock
- When the stock has 5 guitars, and someone buys 2, then the stock should have 3 guitars.
- Scenario 2: Selling items partially when not in stock
- When the stock has 1 guitar, and someone tries to buy 2, only one should be sold.
- ---------------------------------------------------------------------------------------------------------------
- Story 3: Returns go to stock
- In order to keep track of stock
- As a store owner
- I want to add items back to stock when they're returned
- Scenario 1: Refunded items should be returned to stock
- Given a customer previously bought a black sweater from me
- And I currently have three black sweaters left in stock
- When he returns the sweater for a refund
- Then I should have four black sweaters in stock
- Scenario 2: Replaced items should be returned to stock
- Given that a customer buys a blue garment
- And I have two blue garments in stock
- And three black garments in stock.
- When he returns the garment for a replacement in black,
- Then I should have three blue garments in stock
- And two black garments in stock
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement