Skip to content

Commit e62eb8c

Browse files
committed
update: updated README.md
1 parent 175ce0f commit e62eb8c

File tree

7 files changed

+127
-5
lines changed

7 files changed

+127
-5
lines changed

Banking.postman_collection.json

Lines changed: 97 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"info": {
3-
"_postman_id": "527d1a6d-ae07-4484-947b-e7f5501c1c6b",
3+
"_postman_id": "485cda16-0d43-4aa6-ac55-116fb41d8f17",
44
"name": "Banking",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
77
"item": [
88
{
9-
"name": "Account Balance",
9+
"name": "Create Account",
1010
"request": {
11-
"method": "POST",
11+
"method": "PUT",
1212
"header": [
1313
{
1414
"key": "Content-Type",
@@ -19,7 +19,7 @@
1919
],
2020
"body": {
2121
"mode": "raw",
22-
"raw": "{\n\t\"sortCode\": \"53-68-92\",\n\t\"accountNumber\": \"73084635\"\n}\n\n"
22+
"raw": "{\n\t\"bankName\": \"Bank of Ceyloan\",\n\t\"ownerName\": \"Nayananga Muhandiram\"\n}\n"
2323
},
2424
"url": {
2525
"raw": "localhost:8080/api/v1/accounts",
@@ -66,6 +66,99 @@
6666
}
6767
},
6868
"response": []
69+
},
70+
{
71+
"name": "Check Balance",
72+
"request": {
73+
"method": "POST",
74+
"header": [
75+
{
76+
"key": "Content-Type",
77+
"name": "Content-Type",
78+
"value": "application/json",
79+
"type": "text"
80+
}
81+
],
82+
"body": {
83+
"mode": "raw",
84+
"raw": "{\n\t\"sortCode\": \"35-16-67\",\n\t\"accountNumber\": \"95753174\"\n}\n"
85+
},
86+
"url": {
87+
"raw": "localhost:8080/api/v1/accounts",
88+
"host": [
89+
"localhost"
90+
],
91+
"port": "8080",
92+
"path": [
93+
"api",
94+
"v1",
95+
"accounts"
96+
]
97+
}
98+
},
99+
"response": []
100+
},
101+
{
102+
"name": "Withdraw",
103+
"request": {
104+
"method": "POST",
105+
"header": [
106+
{
107+
"key": "Content-Type",
108+
"name": "Content-Type",
109+
"type": "text",
110+
"value": "application/json"
111+
}
112+
],
113+
"body": {
114+
"mode": "raw",
115+
"raw": "{\n\t\"sortCode\": \"35-16-67\",\n\t\"accountNumber\": \"95753174\",\n \"amount\": 100.00\n}\n"
116+
},
117+
"url": {
118+
"raw": "localhost:8080/api/v1/withdraw",
119+
"host": [
120+
"localhost"
121+
],
122+
"port": "8080",
123+
"path": [
124+
"api",
125+
"v1",
126+
"withdraw"
127+
]
128+
}
129+
},
130+
"response": []
131+
},
132+
{
133+
"name": "Deposit",
134+
"request": {
135+
"method": "POST",
136+
"header": [
137+
{
138+
"key": "Content-Type",
139+
"name": "Content-Type",
140+
"type": "text",
141+
"value": "application/json"
142+
}
143+
],
144+
"body": {
145+
"mode": "raw",
146+
"raw": "{\n\t\"targetAccountNo\": \"95753174\",\n \"amount\": 1000.00\n}\n"
147+
},
148+
"url": {
149+
"raw": "localhost:8080/api/v1/deposit",
150+
"host": [
151+
"localhost"
152+
],
153+
"port": "8080",
154+
"path": [
155+
"api",
156+
"v1",
157+
"deposit"
158+
]
159+
}
160+
},
161+
"response": []
69162
}
70163
]
71164
}

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,36 @@ docker run -p 8080:8080 spring-boot:banking
1414
```
1515

1616
## Testing
17-
1. Import the Postman collection file into the application or copy the request body from there
17+
Import the Postman collection file into the application or copy the request body from there
18+
19+
### How to test
20+
1. Create account
21+
> Use create account API to create an account by providing a `bankName` and `ownerName`
22+
>
23+
![Create Account](screenshots/create_account.png)
24+
25+
> Make sure to write down the `sortCode` and the `accountNumber` to proceed with other APIs
26+
27+
2. Deposit Cash
28+
>Use noted `accountNumber` as `targetAccountNo` and provide amount greater than zero to deposit cash into an account
29+
30+
![Deposit cash](screenshots/deposit.png)
31+
32+
3. Check Balance
33+
>Use noted `accountNumber` and `sortCode` to check account balance
34+
35+
![Check Balance](screenshots/check_balance.png)
36+
37+
4. Withdraw Cash
38+
>Use noted `accountNumber` and `sortCode` and `amount` grater than zero to withdraw cash from an account
39+
40+
![Withdraw cash](screenshots/withdraw.png)
41+
42+
5. Check Balance again to verify withdrawal
43+
44+
![Check Balance](screenshots/check_balance_2.png)
45+
46+
1847

1948
### Extensions
2049
1. Use of persisted database

screenshots/check_balance.png

118 KB
Loading

screenshots/check_balance_2.png

118 KB
Loading

screenshots/create_account.png

117 KB
Loading

screenshots/deposit.png

102 KB
Loading

screenshots/withdraw.png

104 KB
Loading

0 commit comments

Comments
 (0)