update test and mocks

This commit is contained in:
julian 2023-05-16 15:59:33 -06:00
parent ab78e3fbca
commit 57b7327287
10 changed files with 31 additions and 31 deletions

View file

@ -175,7 +175,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
_i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i9.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i9.Future<Map<String, dynamic>>); ) as _i9.Future<Map<String, dynamic>>);
@override @override
_i9.Future<List<dynamic>> getUsedCoinSerials({ _i9.Future<List<String>> getUsedCoinSerials({
required _i10.Coin? coin, required _i10.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
@ -188,8 +188,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i9.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i9.Future<List<String>>.value(<String>[]),
) as _i9.Future<List<dynamic>>); ) as _i9.Future<List<String>>);
@override @override
_i9.Future<void> clearSharedTransactionCache({required _i10.Coin? coin}) => _i9.Future<void> clearSharedTransactionCache({required _i10.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(

View file

@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i5.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<dynamic>> getUsedCoinSerials({ _i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i7.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<dynamic>>); ) as _i5.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(

View file

@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i5.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<dynamic>> getUsedCoinSerials({ _i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i7.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<dynamic>>); ) as _i5.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(

View file

@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i5.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<dynamic>> getUsedCoinSerials({ _i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i7.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<dynamic>>); ) as _i5.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(

View file

@ -70,7 +70,7 @@ void main() {
Coin.firo, Coin.firo,
1, 1,
setData, setData,
usedSerials, List<String>.from(usedSerials),
firoNetwork, firoNetwork,
); );
const currentHeight = 100000000000; const currentHeight = 100000000000;
@ -130,7 +130,7 @@ void main() {
Coin.firo, Coin.firo,
1, 1,
setData, setData,
usedSerials, List<String>.from(usedSerials),
firoNetwork, firoNetwork,
), ),
throwsA(isA<Error>())); throwsA(isA<Error>()));
@ -2277,8 +2277,8 @@ void main() {
groupId: "1", blockhash: "", coin: Coin.firo)) groupId: "1", blockhash: "", coin: Coin.firo))
.thenAnswer((_) async => GetAnonymitySetSampleData.data); .thenAnswer((_) async => GetAnonymitySetSampleData.data);
when(cachedClient.getUsedCoinSerials(startNumber: 0, coin: Coin.firo)) when(cachedClient.getUsedCoinSerials(startNumber: 0, coin: Coin.firo))
.thenAnswer( .thenAnswer((_) async => List<String>.from(
(_) async => GetUsedSerialsSampleData.serials['serials'] as List); GetUsedSerialsSampleData.serials['serials'] as List));
final firo = FiroWallet( final firo = FiroWallet(
walletId: "${testWalletId}getUsedCoinSerials", walletId: "${testWalletId}getUsedCoinSerials",

View file

@ -514,7 +514,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i6.Future<Map<String, dynamic>>); ) as _i6.Future<Map<String, dynamic>>);
@override @override
_i6.Future<List<dynamic>> getUsedCoinSerials({ _i6.Future<List<String>> getUsedCoinSerials({
required _i8.Coin? coin, required _i8.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
@ -527,8 +527,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i6.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<dynamic>>); ) as _i6.Future<List<String>>);
@override @override
_i6.Future<void> clearSharedTransactionCache({required _i8.Coin? coin}) => _i6.Future<void> clearSharedTransactionCache({required _i8.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(

View file

@ -734,13 +734,13 @@ class MockFiroWallet extends _i1.Mock implements _i10.FiroWallet {
returnValue: _i11.Future<int>.value(0), returnValue: _i11.Future<int>.value(0),
) as _i11.Future<int>); ) as _i11.Future<int>);
@override @override
_i11.Future<List<dynamic>> getUsedCoinSerials() => (super.noSuchMethod( _i11.Future<List<String>> getUsedCoinSerials() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getUsedCoinSerials, #getUsedCoinSerials,
[], [],
), ),
returnValue: _i11.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i11.Future<List<String>>.value(<String>[]),
) as _i11.Future<List<dynamic>>); ) as _i11.Future<List<String>>);
@override @override
_i11.Future<void> exit() => (super.noSuchMethod( _i11.Future<void> exit() => (super.noSuchMethod(
Invocation.method( Invocation.method(

View file

@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i5.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<dynamic>> getUsedCoinSerials({ _i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i7.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<dynamic>>); ) as _i5.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(

View file

@ -487,7 +487,7 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
_i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}), _i5.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i5.Future<Map<String, dynamic>>); ) as _i5.Future<Map<String, dynamic>>);
@override @override
_i5.Future<List<dynamic>> getUsedCoinSerials({ _i5.Future<List<String>> getUsedCoinSerials({
required _i7.Coin? coin, required _i7.Coin? coin,
int? startNumber = 0, int? startNumber = 0,
}) => }) =>
@ -500,8 +500,8 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX {
#startNumber: startNumber, #startNumber: startNumber,
}, },
), ),
returnValue: _i5.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<dynamic>>); ) as _i5.Future<List<String>>);
@override @override
_i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) => _i5.Future<void> clearSharedTransactionCache({required _i7.Coin? coin}) =>
(super.noSuchMethod( (super.noSuchMethod(

View file

@ -1723,13 +1723,13 @@ class MockFiroWallet extends _i1.Mock implements _i22.FiroWallet {
returnValue: _i18.Future<int>.value(0), returnValue: _i18.Future<int>.value(0),
) as _i18.Future<int>); ) as _i18.Future<int>);
@override @override
_i18.Future<List<dynamic>> getUsedCoinSerials() => (super.noSuchMethod( _i18.Future<List<String>> getUsedCoinSerials() => (super.noSuchMethod(
Invocation.method( Invocation.method(
#getUsedCoinSerials, #getUsedCoinSerials,
[], [],
), ),
returnValue: _i18.Future<List<dynamic>>.value(<dynamic>[]), returnValue: _i18.Future<List<String>>.value(<String>[]),
) as _i18.Future<List<dynamic>>); ) as _i18.Future<List<String>>);
@override @override
_i18.Future<void> exit() => (super.noSuchMethod( _i18.Future<void> exit() => (super.noSuchMethod(
Invocation.method( Invocation.method(