@@ -5,11 +5,9 @@ use test_utils::*;
55fn fixed_fails_without_balance ( ) {
66 new_test_ext ( ) . execute_with ( || {
77 zero_min_burn ( ) ;
8- let agent_0 = 0 ;
9- register_empty_agent ( agent_0) ;
108
11- let agent_1 = 1 ;
12- register_empty_agent ( agent_1) ;
9+ let agent_0 = account ! ( id = 0 , agent = "alice" ) ;
10+ let agent_1 = account ! ( id = 1 , agent = "bob" ) ;
1311
1412 assert_err ! (
1513 delegate_stream_permission(
@@ -30,13 +28,9 @@ fn fixed_fails_without_balance() {
3028fn fixed_creates ( ) {
3129 new_test_ext ( ) . execute_with ( || {
3230 zero_min_burn ( ) ;
33- let agent_0 = 0 ;
34- register_empty_agent ( agent_0) ;
3531
36- let agent_1 = 1 ;
37- register_empty_agent ( agent_1) ;
38-
39- add_balance ( agent_0, as_tors ( 10 ) + 1 ) ;
32+ let agent_0 = account ! ( id = 0 , agent = "alice" , bal = as_tors( 10 ) + 1 ) ;
33+ let agent_1 = account ! ( id = 1 , agent = "bob" ) ;
4034
4135 let permission_id = assert_ok ! ( delegate_stream_permission(
4236 agent_0,
@@ -58,13 +52,9 @@ fn fixed_creates() {
5852fn fixed_reserves ( ) {
5953 new_test_ext ( ) . execute_with ( || {
6054 zero_min_burn ( ) ;
61- let agent_0 = 0 ;
62- register_empty_agent ( agent_0) ;
63-
64- let agent_1 = 1 ;
65- register_empty_agent ( agent_1) ;
6655
67- add_balance ( agent_0, as_tors ( 10 ) + 1 ) ;
56+ let agent_0 = account ! ( id = 0 , agent = "alice" , bal = as_tors( 10 ) + 1 ) ;
57+ let agent_1 = account ! ( id = 1 , agent = "bob" ) ;
6858
6959 let permission_id = assert_ok ! ( delegate_stream_permission(
7060 agent_0,
@@ -88,16 +78,10 @@ fn fixed_reserves() {
8878fn fixed_manual_executes ( ) {
8979 new_test_ext ( ) . execute_with ( || {
9080 zero_min_burn ( ) ;
91- let agent_0 = 0 ;
92- register_empty_agent ( agent_0) ;
93-
94- let agent_1 = 1 ;
95- register_empty_agent ( agent_1) ;
96-
97- let agent_2 = 2 ;
98- register_empty_agent ( agent_2) ;
9981
100- add_balance ( agent_0, as_tors ( 10 ) + 1 ) ;
82+ let agent_0 = account ! ( id = 0 , agent = "alice" , bal = as_tors( 10 ) + 1 ) ;
83+ let agent_1 = account ! ( id = 1 , agent = "bob" ) ;
84+ let agent_2 = account ! ( id = 2 , agent = "charlie" ) ;
10185
10286 let permission_id = assert_ok ! ( delegate_stream_permission(
10387 agent_0,
@@ -133,16 +117,10 @@ fn fixed_manual_executes() {
133117fn fixed_manual_executes_only_once ( ) {
134118 new_test_ext ( ) . execute_with ( || {
135119 zero_min_burn ( ) ;
136- let agent_0 = 0 ;
137- register_empty_agent ( agent_0) ;
138120
139- let agent_1 = 1 ;
140- register_empty_agent ( agent_1) ;
141-
142- let agent_2 = 2 ;
143- register_empty_agent ( agent_2) ;
144-
145- add_balance ( agent_0, as_tors ( 10 ) + 1 ) ;
121+ let agent_0 = account ! ( id = 0 , agent = "alice" , bal = as_tors( 10 ) + 1 ) ;
122+ let agent_1 = account ! ( id = 1 , agent = "bob" ) ;
123+ let agent_2 = account ! ( id = 2 , agent = "charlie" ) ;
146124
147125 let permission_id = assert_ok ! ( delegate_stream_permission(
148126 agent_0,
@@ -182,16 +160,10 @@ fn fixed_manual_executes_only_once() {
182160fn fixed_at_block_executes ( ) {
183161 new_test_ext ( ) . execute_with ( || {
184162 zero_min_burn ( ) ;
185- let agent_0 = 0 ;
186- register_empty_agent ( agent_0) ;
187-
188- let agent_1 = 1 ;
189- register_empty_agent ( agent_1) ;
190-
191- let agent_2 = 2 ;
192- register_empty_agent ( agent_2) ;
193163
194- add_balance ( agent_0, as_tors ( 10 ) + 1 ) ;
164+ let agent_0 = account ! ( id = 0 , agent = "alice" , bal = as_tors( 10 ) + 1 ) ;
165+ let agent_1 = account ! ( id = 1 , agent = "bob" ) ;
166+ let agent_2 = account ! ( id = 2 , agent = "charlie" ) ;
195167
196168 let _ = assert_ok ! ( delegate_stream_permission(
197169 agent_0,
0 commit comments