jhonygo / bluebank-atm-server

0 stars 0 forks source link

Implement a feature #13

Open jhonygo opened 8 years ago

jhonygo commented 8 years ago

Based on the toolset and practices, implement the following controls:

Prevent negative accounts (refuse withdraw if > balance) Define the BDD scenario, the tests to perform, the code to implement

Use the software factory to validate everything

Package and deploy on public registry and on cloud

jhonygo commented 8 years ago

The BDD scenario should be something like this: No negative account Given the account balance is 100 dollars And the valid pin number has been entered When a withdraw of 120.00 dollars is made Then the ATM rejects the withdraw And the balance is 100 dollars And the card is returned And a receipt is printed

| LOCATION: 100 Main Street, NewYork 12345,USA | | CARD NO: 123456 | | DATE 01/07/2015 TIME 17:05:00 | | TERMINAL 47 | | TRANSACTION#00000000-0000-0001-0000-000000000002 | | WITHDRAW OF $120.00 | | --------- REJECTED : ONLY 100 USD LEFT --------- | No negative account Given the account balance is 100 dollars And the valid pin number has been entered When a withdraw of 120.00 dollars is made Then the ATM rejects the withdraw And the balance is 100 dollars And the card is returned And a receipt is printed

| LOCATION: 100 Main Street, NewYork 12345,USA | | CARD NO: 123456 | | DATE 01/07/2015 TIME 17:05:00 | | TERMINAL 47 | | TRANSACTION#00000000-0000-0001-0000-000000000002 | | WITHDRAW OF $120.00 | | --------- REJECTED : ONLY 100 USD LEFT --------- |