@@ -4,69 +4,66 @@ Following we have a sequence of request the will be used to test the Api
4
4
5
5
6
6
7
- # Reset state before starting tests
7
+ ## Reset state before starting tests
8
8
9
9
```
10
10
POST /reset
11
11
12
12
200 OK
13
13
```
14
14
15
- --
16
- # Get balance for non-existing account
15
+ ## Get balance for non-existing account
17
16
```
18
17
GET /balance?account_id=1234
19
18
20
19
404 0
21
20
```
22
21
23
- --
24
- # Create account with initial balance
22
+ ## Create account with initial balance
25
23
```
26
24
POST /event {"type":"deposit", "destination":"100", "amount":10}
27
25
28
26
201 {"destination": {"id":"100", "balance":10}}
29
27
```
30
28
31
- --
32
- # Deposit into existing account
29
+
30
+ ## Deposit into existing account
33
31
```
34
32
POST /event {"type":"deposit", "destination":"100", "amount":10}
35
33
36
34
201 {"destination": {"id":"100", "balance":20}}
37
35
```
38
36
39
- --
40
- # Get balance for existing account
37
+
38
+ ## Get balance for existing account
41
39
```
42
40
GET /balance?account_id=100
43
41
44
42
200 20
45
43
```
46
- --
47
- # Withdraw from non-existing account
44
+
45
+ ## Withdraw from non-existing account
48
46
```
49
47
POST /event {"type":"withdraw", "origin":"200", "amount":10}
50
48
51
49
404 0
52
50
```
53
51
54
- --
55
- # Withdraw from existing account
52
+ ## Withdraw from existing account
56
53
```
57
54
POST /event {"type":"withdraw", "origin":"100", "amount":5}
58
55
59
56
201 {"origin": {"id":"100", "balance":15}}
60
57
```
61
- --
62
- # Transfer from existing account
58
+
59
+ ## Transfer from existing account
63
60
```
64
61
POST /event {"type":"transfer", "origin":"100", "amount":15, "destination":"300"}
65
62
66
63
201 {"origin": {"id":"100", "balance":0}, "destination": {"id":"300", "balance":15}}
67
64
```
68
- --
69
- # Transfer from non-existing account
65
+
66
+ ## Transfer from non-existing account
70
67
```
71
68
POST /event {"type":"transfer", "origin":"200", "amount":15, "destination":"300"}
72
69
0 commit comments