Skip to content

Commit 29bf301

Browse files
committed
make setupAll at the beginning of file
1 parent c2e8810 commit 29bf301

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

packages/tfchain_client/test/balances_test.dart

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,21 @@ void main() {
99
group("Balances Tests", () {
1010
sharedSetup();
1111
late final String recipientAddress;
12+
13+
setUpAll(() async {
14+
final mnemonic = bip39.generateMnemonic();
15+
final recipientClient = Client(url, mnemonic, type);
16+
await recipientClient.connect();
17+
18+
recipientAddress = recipientClient.address;
19+
Client alice = Client(url, "//Alice", type);
20+
await alice.connect();
21+
22+
await alice.balances.transfer(address: client.address, amount: myBalance);
23+
});
1224

1325
test('Test Get Balance', () async {
14-
AccountInfo? accountInfo =
15-
await client.balances.get(address: myAddress);
26+
AccountInfo? accountInfo = await client.balances.get(address: myAddress);
1627
expect(accountInfo, isNotNull);
1728
});
1829

@@ -26,18 +37,6 @@ void main() {
2637
}
2738
});
2839

29-
setUpAll(() async {
30-
final mnemonic = bip39.generateMnemonic();
31-
final recipientClient = Client(url, mnemonic, type);
32-
await recipientClient.connect();
33-
34-
recipientAddress = recipientClient.address;
35-
Client alice = Client(url, "//Alice", type);
36-
await alice.connect();
37-
38-
await alice.balances.transfer(address: client.address, amount: myBalance);
39-
});
40-
4140
test('Test Transfer TFTs with invalid amount', () async {
4241
try {
4342
await client.balances

0 commit comments

Comments
 (0)