mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
update test and mocks
This commit is contained in:
parent
ab78e3fbca
commit
57b7327287
10 changed files with 31 additions and 31 deletions
|
@ -175,7 +175,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i9.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i9.Future<List<dynamic>> getUsedCoinSerials({
|
||||
_i9.Future<List<String>> getUsedCoinSerials({
|
||||
required _i10.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
|
@ -188,8 +188,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i9.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i9.Future<List<dynamic>>);
|
||||
returnValue: _i9.Future<List<String>>.value(<String>[]),
|
||||
) as _i9.Future<List<String>>);
|
||||
@override
|
||||
_i9.Future<void> clearSharedTransactionCache({required _i10.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> getUsedCoinSerials({
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
|
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> getUsedCoinSerials({
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
|
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> getUsedCoinSerials({
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
|
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -70,7 +70,7 @@ void main() {
|
|||
Coin.firo,
|
||||
1,
|
||||
setData,
|
||||
usedSerials,
|
||||
List<String>.from(usedSerials),
|
||||
firoNetwork,
|
||||
);
|
||||
const currentHeight = 100000000000;
|
||||
|
@ -130,7 +130,7 @@ void main() {
|
|||
Coin.firo,
|
||||
1,
|
||||
setData,
|
||||
usedSerials,
|
||||
List<String>.from(usedSerials),
|
||||
firoNetwork,
|
||||
),
|
||||
throwsA(isA<Error>()));
|
||||
|
@ -2277,8 +2277,8 @@ void main() {
|
|||
groupId: "1", blockhash: "", coin: Coin.firo))
|
||||
.thenAnswer((_) async => GetAnonymitySetSampleData.data);
|
||||
when(cachedClient.getUsedCoinSerials(startNumber: 0, coin: Coin.firo))
|
||||
.thenAnswer(
|
||||
(_) async => GetUsedSerialsSampleData.serials['serials'] as List);
|
||||
.thenAnswer((_) async => List<String>.from(
|
||||
GetUsedSerialsSampleData.serials['serials'] as List));
|
||||
|
||||
final firo = FiroWallet(
|
||||
walletId: "${testWalletId}getUsedCoinSerials",
|
||||
|
|
|
@ -514,7 +514,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<List<dynamic>> getUsedCoinSerials({
|
||||
_i6.Future<List<String>> getUsedCoinSerials({
|
||||
required _i8.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
|
@ -527,8 +527,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i6.Future<List<dynamic>>);
|
||||
returnValue: _i6.Future<List<String>>.value(<String>[]),
|
||||
) as _i6.Future<List<String>>);
|
||||
@override
|
||||
_i6.Future<void> clearSharedTransactionCache({required _i8.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -734,13 +734,13 @@ class MockFiroWallet extends _i1.Mock implements _i10.FiroWallet {
|
|||
returnValue: _i11.Future<int>.value(0),
|
||||
) as _i11.Future<int>);
|
||||
@override
|
||||
_i11.Future<List<dynamic>> getUsedCoinSerials() => (super.noSuchMethod(
|
||||
_i11.Future<List<String>> getUsedCoinSerials() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getUsedCoinSerials,
|
||||
[],
|
||||
),
|
||||
returnValue: _i11.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i11.Future<List<dynamic>>);
|
||||
returnValue: _i11.Future<List<String>>.value(<String>[]),
|
||||
) as _i11.Future<List<String>>);
|
||||
@override
|
||||
_i11.Future<void> exit() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
|
@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> getUsedCoinSerials({
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
|
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i5.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i5.Future<List<dynamic>> getUsedCoinSerials({
|
||||
_i5.Future<List<String>> getUsedCoinSerials({
|
||||
required _i7.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
|
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
|
|||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i5.Future<List<dynamic>>);
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
|
|
|
@ -1723,13 +1723,13 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
|
|||
returnValue: _i18.Future<int>.value(0),
|
||||
) as _i18.Future<int>);
|
||||
@override
|
||||
_i18.Future<List<dynamic>> getUsedCoinSerials() => (super.noSuchMethod(
|
||||
_i18.Future<List<String>> getUsedCoinSerials() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getUsedCoinSerials,
|
||||
[],
|
||||
),
|
||||
returnValue: _i18.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i18.Future<List<dynamic>>);
|
||||
returnValue: _i18.Future<List<String>>.value(<String>[]),
|
||||
) as _i18.Future<List<String>>);
|
||||
@override
|
||||
_i18.Future<void> exit() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
|
|
Loading…
Reference in a new issue