A series of fixtures that interact with a running Banking system and observe the enforcement of various business rules.
- Setup the system
fit.ActionFixture |
start |
TestBank |
- Create a customer with a checking account
fit.ActionFixture |
start |
CustomerBankingActions |
enter |
customer |
Sam Walton |
enter |
account |
checking |
enter |
starting balance |
$100.00 |
press |
create account |
- List all accounts in the bank
CustomersAccountList |
id |
customer |
balance |
checking |
Sam Walton |
$100.00 |
- Check rules that prevent zero-value deposits
Deposit |
customer |
account |
amount |
deposit successful() |
balance() |
Sam Walton |
checking |
$10.00 |
true |
$110.00 |
|
|
$0.00 |
false |
$110.00 |
- Create a savings account, then transfer money from checking to savings
fit.ActionFixture |
enter |
account |
savings |
enter |
starting balance |
$200.00 |
press |
create account |
enter |
transfer from |
checking |
enter |
transfer to |
savings |
enter |
transfer amount |
$50.00 |
press |
transact transfer |
check |
customer total balance |
$310.00 |
- View all account details for Sam Walton
CustomerNameAccountList |
Sam Walton |
id |
balance |
checking |
$60.00 |
savings |
$250.00 |
- Check rules that prevent withdrawal of more funds than appear in the account
Withdrawal |
customer |
account |
amount |
withdrawal successful() |
balance() |
Sam Walton |
checking |
$10.00 |
true |
$50.00 |
|
|
$60.00 |
false |
$50.00 |
|
|
$50.00 |
true |
$0.00 |
- Create a second customer and confirm that transfering money between accounts from different customers is not allowed
fit.ActionFixture |
enter |
customer |
Warren Buffet |
enter |
account |
money market |
enter |
starting balance |
$100.00 |
press |
create account |
enter |
transfer from |
money market |
enter |
customer |
Sam Walton |
enter |
transfer to |
checking |
enter |
transfer amount |
$50.00 |
press |
transact transfer |
CustomersAccountList |
id |
customer |
balance |
checking |
Sam Walton |
$0.00 |
savings |
Sam Walton |
$250.00 |
money market |
Warren Buffet |
$100.00 |