Feature: Withdraw cash
Customers take money out of their accounts.
- Given the customer has an account
- Given the customer has an account
From the scenario
- Given the balance is 100
- When the customer withdraws 40
banknote count 20 2 - Then the receipt says
Dispensed: 40
- Given the customer has an account
From the scenario
- When the customer withdraws <amount>
- Then the balance is <balance>
Runs once for each row of these examples:
-
amount balance 10 90 - When the customer withdraws 10
- Then the balance is 90
-
amount balance 90 10 - When the customer withdraws 90
- Then the balance is 10
- Given the daily limit is 500
- Given the customer has an account
- Given the daily limit is 500
From the scenario
- When the customer withdraws 600
- Then the withdrawal is refused
- Given the customer has an account
- Given the daily limit is 500
From the scenario
- When the customer withdraws 500
- Then the withdrawal is accepted