Bank Scenario
The main purpose of this example is to show you :
- How to handle business flows using the 'Scenario' Interpreter
Account Management Example
Scenario |
Bank |
---|---|
I have a checking account 12345-67890 under the name of Bart Simpson |
|
The balance of account 12345-67890 is $0.00 |
|
I deposit $100.00 in account 12345-67890 |
|
The balance of account 12345-67890 is $100.00 |
|
I withdraw $50.00 from account 12345-67890 |
|
The balance of account 12345-67890 is $50.00 |
|
I can't withdraw $75.00 from account 12345-67890 |
|
The balance of account 12345-67890 is $50.00 |
|
I can withdraw $25.00 from account 12345-67890 |
|
Show the balance of account 12345-67890 |
end |
Opening different account type
Scenario |
Bank |
---|---|
I have a checking account 12345-67890 under the name of Bart Simpson |
|
I have a savings account 54321-09876 under the name of Lisa Simpson |
set of |
opened accounts |
|
---|---|---|
number |
type |
owner name |
12345-67890 |
checking |
Bart Simpson |
54321-09876 |
savings |
Lisa Simpson |
end |
Freezing an Account
Scenario |
Bank |
---|---|
I have a savings account 11111-22222 for Homer Simpson with balance of $1546.23 |
|
I can withdraw $100.00 from account 11111-22222 using ATM |
|
Freeze account 11111-22222 |
|
I can't witdraw $100.25 from account 11111-22222 using ATM |
|
I can deposit $200.00 in account 11111-22222 |
end |
Source Code
BankFixture.java
OwnerTypeConverter.java
See Bank for other source.