-
Notifications
You must be signed in to change notification settings - Fork 35
/
assets.feature
188 lines (172 loc) · 8.19 KB
/
assets.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
@assets
Feature: Assets
Background:
Given an algod v2 client connected to "localhost" port 60000 with token "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
And a kmd client
And wallet information
And asset test fixture
Scenario Outline: Asset creation
Given default asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
And I get the asset info
Then the asset info should match the expected asset info
Examples:
| total |
| 1 |
Scenario Outline: Asset reconfigure
Given default asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
And I get the asset info
Then the asset info should match the expected asset info
When I create a no-managers asset reconfigure transaction
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I get the asset info
Then the asset info should match the expected asset info
Examples:
| total |
| 1 |
Scenario Outline: Asset destroy
Given default asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
And I get the asset info
And I create an asset destroy transaction
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
And I should be unable to get the asset info
Examples:
| total |
| 1 |
Scenario Outline: Asset acceptance
Given default asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
And I create a transaction for a second account, signalling asset acceptance
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction transferring <amount> assets from creator to a second account
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
And the creator should have <expected balance> assets remaining
Examples:
| total | amount | expected balance |
| 100 | 50 | 50 |
Scenario Outline: Asset non-acceptance
Given default asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
When I create a transaction transferring <amount> assets from creator to a second account
And I sign the transaction with kmd
And I send the bogus kmd-signed transaction
Then the transaction should not go through
And the creator should have <expected balance> assets remaining
Examples:
| total | amount | expected balance |
| 100 | 50 | 100 |
Scenario Outline: Asset freeze and unfreeze
Given default asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
And I create a transaction for a second account, signalling asset acceptance
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction transferring <amount> assets from creator to a second account
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
And the creator should have <expected balance> assets remaining
When I create a freeze transaction targeting the second account
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction transferring <amount> assets from creator to a second account
And I sign the transaction with kmd
And I send the bogus kmd-signed transaction
Then the transaction should not go through
And the creator should have <expected balance> assets remaining
When I create a transaction transferring <amount> assets from a second account to creator
And I renew the wallet handle
And I sign the transaction with kmd
And I send the bogus kmd-signed transaction
Then the transaction should not go through
And the creator should have <expected balance> assets remaining
When I create an un-freeze transaction targeting the second account
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction transferring <amount> assets from a second account to creator
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
And the creator should have <final expected balance> assets remaining
Examples:
| total | amount | expected balance | final expected balance |
| 100 | 50 | 50 | 100 |
Scenario Outline: Frozen by default
Given default-frozen asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
When I create a transaction for a second account, signalling asset acceptance
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction transferring <amount> assets from creator to a second account
And I send the bogus kmd-signed transaction
Then the transaction should not go through
And the creator should have <expected balance> assets remaining
When I create an un-freeze transaction targeting the second account
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction transferring <amount> assets from creator to a second account
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
And the creator should have <final expected balance> assets remaining
Examples:
| total | amount | expected balance | final expected balance |
| 100 | 50 | 100 | 50 |
Scenario Outline: Asset revocation
Given default asset creation transaction with total issuance <total>
When I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I update the asset index
And I create a transaction for a second account, signalling asset acceptance
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction transferring <amount> assets from creator to a second account
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
When I create a transaction revoking <amount> assets from a second account to creator
And I sign the transaction with kmd
And I send the kmd-signed transaction
Then I wait for the transaction to be confirmed.
And the creator should have <expected balance> assets remaining
Examples:
| total | amount | expected balance |
| 100 | 50 | 100 |