2023-07-27 21:08:43 +00:00
|
|
|
// Mocks generated by Mockito 5.4.2 from annotations
|
2022-10-13 18:40:19 +00:00
|
|
|
// in stackwallet/test/widget_tests/wallet_card_test.dart.
|
|
|
|
// Do not manually edit this file.
|
|
|
|
|
2022-10-16 06:50:10 +00:00
|
|
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
2023-11-16 16:59:09 +00:00
|
|
|
import 'dart:async' as _i8;
|
|
|
|
import 'dart:typed_data' as _i15;
|
|
|
|
import 'dart:ui' as _i12;
|
2022-10-13 18:40:19 +00:00
|
|
|
|
|
|
|
import 'package:mockito/mockito.dart' as _i1;
|
2023-11-06 17:00:39 +00:00
|
|
|
import 'package:stackwallet/db/isar/main_db.dart' as _i3;
|
2023-11-16 16:59:09 +00:00
|
|
|
import 'package:stackwallet/models/isar/stack_theme.dart' as _i14;
|
2023-11-09 18:21:04 +00:00
|
|
|
import 'package:stackwallet/networking/http.dart' as _i6;
|
2023-11-16 16:59:09 +00:00
|
|
|
import 'package:stackwallet/services/locale_service.dart' as _i11;
|
2023-11-06 17:00:39 +00:00
|
|
|
import 'package:stackwallet/services/node_service.dart' as _i2;
|
2023-11-09 18:21:04 +00:00
|
|
|
import 'package:stackwallet/services/wallets.dart' as _i7;
|
2023-11-16 16:59:09 +00:00
|
|
|
import 'package:stackwallet/themes/theme_service.dart' as _i13;
|
2023-02-05 20:32:39 +00:00
|
|
|
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
2023-11-16 16:59:09 +00:00
|
|
|
as _i9;
|
|
|
|
import 'package:stackwallet/utilities/prefs.dart' as _i10;
|
2023-11-06 17:00:39 +00:00
|
|
|
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart'
|
|
|
|
as _i4;
|
|
|
|
import 'package:stackwallet/wallets/wallet/wallet.dart' as _i5;
|
2022-10-13 18:40:19 +00:00
|
|
|
|
|
|
|
// ignore_for_file: type=lint
|
|
|
|
// ignore_for_file: avoid_redundant_argument_values
|
|
|
|
// ignore_for_file: avoid_setters_without_getters
|
|
|
|
// ignore_for_file: comment_references
|
|
|
|
// ignore_for_file: implementation_imports
|
|
|
|
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
|
|
|
// ignore_for_file: prefer_const_constructors
|
|
|
|
// ignore_for_file: unnecessary_parenthesis
|
|
|
|
// ignore_for_file: camel_case_types
|
2022-10-16 06:50:10 +00:00
|
|
|
// ignore_for_file: subtype_of_sealed_class
|
2022-10-13 18:40:19 +00:00
|
|
|
|
2023-11-06 17:00:39 +00:00
|
|
|
class _FakeNodeService_0 extends _i1.SmartFake implements _i2.NodeService {
|
|
|
|
_FakeNodeService_0(
|
2022-10-16 06:50:10 +00:00
|
|
|
Object parent,
|
|
|
|
Invocation parentInvocation,
|
|
|
|
) : super(
|
|
|
|
parent,
|
|
|
|
parentInvocation,
|
|
|
|
);
|
|
|
|
}
|
2022-10-13 18:40:19 +00:00
|
|
|
|
2023-11-06 17:00:39 +00:00
|
|
|
class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB {
|
|
|
|
_FakeMainDB_1(
|
2022-10-16 06:50:10 +00:00
|
|
|
Object parent,
|
|
|
|
Invocation parentInvocation,
|
|
|
|
) : super(
|
|
|
|
parent,
|
|
|
|
parentInvocation,
|
|
|
|
);
|
|
|
|
}
|
2022-10-13 18:40:19 +00:00
|
|
|
|
2023-11-06 17:00:39 +00:00
|
|
|
class _FakeWallet_2<T extends _i4.CryptoCurrency> extends _i1.SmartFake
|
|
|
|
implements _i5.Wallet<T> {
|
|
|
|
_FakeWallet_2(
|
2022-10-16 06:50:10 +00:00
|
|
|
Object parent,
|
|
|
|
Invocation parentInvocation,
|
|
|
|
) : super(
|
|
|
|
parent,
|
|
|
|
parentInvocation,
|
|
|
|
);
|
|
|
|
}
|
2022-10-13 18:40:19 +00:00
|
|
|
|
2023-11-09 18:21:04 +00:00
|
|
|
class _FakeHTTP_3 extends _i1.SmartFake implements _i6.HTTP {
|
|
|
|
_FakeHTTP_3(
|
2023-09-13 16:58:02 +00:00
|
|
|
Object parent,
|
|
|
|
Invocation parentInvocation,
|
|
|
|
) : super(
|
|
|
|
parent,
|
|
|
|
parentInvocation,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-10-13 18:40:19 +00:00
|
|
|
/// A class which mocks [Wallets].
|
|
|
|
///
|
|
|
|
/// See the documentation for Mockito's code generation for more information.
|
2023-11-09 18:21:04 +00:00
|
|
|
class MockWallets extends _i1.Mock implements _i7.Wallets {
|
2022-10-13 18:40:19 +00:00
|
|
|
MockWallets() {
|
|
|
|
_i1.throwOnMissingStub(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
_i2.NodeService get nodeService => (super.noSuchMethod(
|
|
|
|
Invocation.getter(#nodeService),
|
|
|
|
returnValue: _FakeNodeService_0(
|
2022-10-16 06:50:10 +00:00
|
|
|
this,
|
2023-11-06 17:00:39 +00:00
|
|
|
Invocation.getter(#nodeService),
|
2022-10-16 06:50:10 +00:00
|
|
|
),
|
2023-11-06 17:00:39 +00:00
|
|
|
) as _i2.NodeService);
|
2022-10-16 06:50:10 +00:00
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
set nodeService(_i2.NodeService? _nodeService) => super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.setter(
|
2023-11-06 17:00:39 +00:00
|
|
|
#nodeService,
|
|
|
|
_nodeService,
|
2022-10-16 06:50:10 +00:00
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
_i3.MainDB get mainDB => (super.noSuchMethod(
|
|
|
|
Invocation.getter(#mainDB),
|
|
|
|
returnValue: _FakeMainDB_1(
|
2022-10-16 06:50:10 +00:00
|
|
|
this,
|
2023-11-06 17:00:39 +00:00
|
|
|
Invocation.getter(#mainDB),
|
2022-10-16 06:50:10 +00:00
|
|
|
),
|
2023-11-06 17:00:39 +00:00
|
|
|
) as _i3.MainDB);
|
2022-10-16 06:50:10 +00:00
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
set mainDB(_i3.MainDB? _mainDB) => super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.setter(
|
2023-11-06 17:00:39 +00:00
|
|
|
#mainDB,
|
|
|
|
_mainDB,
|
2022-10-16 06:50:10 +00:00
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
|
|
|
@override
|
|
|
|
bool get hasWallets => (super.noSuchMethod(
|
|
|
|
Invocation.getter(#hasWallets),
|
|
|
|
returnValue: false,
|
|
|
|
) as bool);
|
2022-10-13 18:40:19 +00:00
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
List<_i5.Wallet<_i4.CryptoCurrency>> get wallets => (super.noSuchMethod(
|
|
|
|
Invocation.getter(#wallets),
|
|
|
|
returnValue: <_i5.Wallet<_i4.CryptoCurrency>>[],
|
|
|
|
) as List<_i5.Wallet<_i4.CryptoCurrency>>);
|
|
|
|
@override
|
|
|
|
_i5.Wallet<_i4.CryptoCurrency> getWallet(String? walletId) =>
|
2022-10-16 06:50:10 +00:00
|
|
|
(super.noSuchMethod(
|
|
|
|
Invocation.method(
|
2023-11-06 17:00:39 +00:00
|
|
|
#getWallet,
|
2022-10-16 06:50:10 +00:00
|
|
|
[walletId],
|
|
|
|
),
|
2023-11-06 17:00:39 +00:00
|
|
|
returnValue: _FakeWallet_2<_i4.CryptoCurrency>(
|
2022-10-16 06:50:10 +00:00
|
|
|
this,
|
2022-10-13 18:40:19 +00:00
|
|
|
Invocation.method(
|
2023-11-06 17:00:39 +00:00
|
|
|
#getWallet,
|
2022-10-16 06:50:10 +00:00
|
|
|
[walletId],
|
|
|
|
),
|
|
|
|
),
|
2023-11-06 17:00:39 +00:00
|
|
|
) as _i5.Wallet<_i4.CryptoCurrency>);
|
2022-10-16 06:50:10 +00:00
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
void addWallet(_i5.Wallet<_i4.CryptoCurrency>? wallet) => super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.method(
|
|
|
|
#addWallet,
|
2023-11-06 17:00:39 +00:00
|
|
|
[wallet],
|
2022-10-16 06:50:10 +00:00
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<void> deleteWallet(
|
2023-11-09 18:21:04 +00:00
|
|
|
String? walletId,
|
2023-11-16 16:59:09 +00:00
|
|
|
_i9.SecureStorageInterface? secureStorage,
|
2023-11-09 18:21:04 +00:00
|
|
|
) =>
|
|
|
|
(super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.method(
|
2023-11-06 17:00:39 +00:00
|
|
|
#deleteWallet,
|
2023-11-09 18:21:04 +00:00
|
|
|
[
|
|
|
|
walletId,
|
|
|
|
secureStorage,
|
|
|
|
],
|
2022-10-16 06:50:10 +00:00
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<void>.value(),
|
|
|
|
returnValueForMissingStub: _i8.Future<void>.value(),
|
|
|
|
) as _i8.Future<void>);
|
2022-10-13 18:40:19 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<void> load(
|
|
|
|
_i10.Prefs? prefs,
|
2023-11-06 17:00:39 +00:00
|
|
|
_i3.MainDB? mainDB,
|
|
|
|
) =>
|
|
|
|
(super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.method(
|
|
|
|
#load,
|
2023-11-06 17:00:39 +00:00
|
|
|
[
|
|
|
|
prefs,
|
|
|
|
mainDB,
|
|
|
|
],
|
2022-10-16 06:50:10 +00:00
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<void>.value(),
|
|
|
|
returnValueForMissingStub: _i8.Future<void>.value(),
|
|
|
|
) as _i8.Future<void>);
|
2022-10-13 18:40:19 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<void> loadAfterStackRestore(
|
|
|
|
_i10.Prefs? prefs,
|
2023-11-06 17:00:39 +00:00
|
|
|
List<_i5.Wallet<_i4.CryptoCurrency>>? wallets,
|
2022-10-16 06:50:10 +00:00
|
|
|
) =>
|
2022-10-13 18:40:19 +00:00
|
|
|
(super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.method(
|
|
|
|
#loadAfterStackRestore,
|
|
|
|
[
|
|
|
|
prefs,
|
2023-11-06 17:00:39 +00:00
|
|
|
wallets,
|
2022-10-16 06:50:10 +00:00
|
|
|
],
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<void>.value(),
|
|
|
|
returnValueForMissingStub: _i8.Future<void>.value(),
|
|
|
|
) as _i8.Future<void>);
|
2022-10-16 06:50:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// A class which mocks [LocaleService].
|
|
|
|
///
|
|
|
|
/// See the documentation for Mockito's code generation for more information.
|
2023-11-16 16:59:09 +00:00
|
|
|
class MockLocaleService extends _i1.Mock implements _i11.LocaleService {
|
2022-10-16 06:50:10 +00:00
|
|
|
MockLocaleService() {
|
|
|
|
_i1.throwOnMissingStub(this);
|
|
|
|
}
|
|
|
|
|
2022-10-13 18:40:19 +00:00
|
|
|
@override
|
2022-10-16 06:50:10 +00:00
|
|
|
String get locale => (super.noSuchMethod(
|
|
|
|
Invocation.getter(#locale),
|
|
|
|
returnValue: '',
|
|
|
|
) as String);
|
|
|
|
@override
|
|
|
|
bool get hasListeners => (super.noSuchMethod(
|
|
|
|
Invocation.getter(#hasListeners),
|
|
|
|
returnValue: false,
|
|
|
|
) as bool);
|
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<void> loadLocale({bool? notify = true}) => (super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.method(
|
|
|
|
#loadLocale,
|
|
|
|
[],
|
|
|
|
{#notify: notify},
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<void>.value(),
|
|
|
|
returnValueForMissingStub: _i8.Future<void>.value(),
|
|
|
|
) as _i8.Future<void>);
|
2022-10-16 06:50:10 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
void addListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.method(
|
|
|
|
#addListener,
|
|
|
|
[listener],
|
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod(
|
2022-10-16 06:50:10 +00:00
|
|
|
Invocation.method(
|
|
|
|
#removeListener,
|
|
|
|
[listener],
|
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
|
|
|
@override
|
|
|
|
void dispose() => super.noSuchMethod(
|
|
|
|
Invocation.method(
|
|
|
|
#dispose,
|
|
|
|
[],
|
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
|
|
|
@override
|
|
|
|
void notifyListeners() => super.noSuchMethod(
|
|
|
|
Invocation.method(
|
|
|
|
#notifyListeners,
|
|
|
|
[],
|
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
2022-10-13 18:40:19 +00:00
|
|
|
}
|
2023-05-12 20:02:04 +00:00
|
|
|
|
|
|
|
/// A class which mocks [ThemeService].
|
|
|
|
///
|
|
|
|
/// See the documentation for Mockito's code generation for more information.
|
2023-11-16 16:59:09 +00:00
|
|
|
class MockThemeService extends _i1.Mock implements _i13.ThemeService {
|
2023-05-12 20:02:04 +00:00
|
|
|
MockThemeService() {
|
|
|
|
_i1.throwOnMissingStub(this);
|
|
|
|
}
|
|
|
|
|
2023-09-13 16:58:02 +00:00
|
|
|
@override
|
2023-11-09 18:21:04 +00:00
|
|
|
_i6.HTTP get client => (super.noSuchMethod(
|
2023-09-13 16:58:02 +00:00
|
|
|
Invocation.getter(#client),
|
2023-11-09 18:21:04 +00:00
|
|
|
returnValue: _FakeHTTP_3(
|
2023-09-13 16:58:02 +00:00
|
|
|
this,
|
|
|
|
Invocation.getter(#client),
|
|
|
|
),
|
2023-11-09 18:21:04 +00:00
|
|
|
) as _i6.HTTP);
|
2023-09-13 16:58:02 +00:00
|
|
|
@override
|
2023-11-09 18:21:04 +00:00
|
|
|
set client(_i6.HTTP? _client) => super.noSuchMethod(
|
2023-09-13 16:58:02 +00:00
|
|
|
Invocation.setter(
|
|
|
|
#client,
|
|
|
|
_client,
|
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
_i3.MainDB get db => (super.noSuchMethod(
|
2023-05-12 20:02:04 +00:00
|
|
|
Invocation.getter(#db),
|
2023-11-06 17:00:39 +00:00
|
|
|
returnValue: _FakeMainDB_1(
|
2023-05-12 20:02:04 +00:00
|
|
|
this,
|
|
|
|
Invocation.getter(#db),
|
|
|
|
),
|
2023-11-06 17:00:39 +00:00
|
|
|
) as _i3.MainDB);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
List<_i14.StackTheme> get installedThemes => (super.noSuchMethod(
|
2023-05-12 20:02:04 +00:00
|
|
|
Invocation.getter(#installedThemes),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: <_i14.StackTheme>[],
|
|
|
|
) as List<_i14.StackTheme>);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-06 17:00:39 +00:00
|
|
|
void init(_i3.MainDB? db) => super.noSuchMethod(
|
2023-05-12 20:02:04 +00:00
|
|
|
Invocation.method(
|
|
|
|
#init,
|
|
|
|
[db],
|
|
|
|
),
|
|
|
|
returnValueForMissingStub: null,
|
|
|
|
);
|
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<void> install({required _i15.Uint8List? themeArchiveData}) =>
|
2023-05-12 20:02:04 +00:00
|
|
|
(super.noSuchMethod(
|
|
|
|
Invocation.method(
|
|
|
|
#install,
|
|
|
|
[],
|
|
|
|
{#themeArchiveData: themeArchiveData},
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<void>.value(),
|
|
|
|
returnValueForMissingStub: _i8.Future<void>.value(),
|
|
|
|
) as _i8.Future<void>);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
2023-05-12 20:02:04 +00:00
|
|
|
Invocation.method(
|
|
|
|
#remove,
|
|
|
|
[],
|
|
|
|
{#themeId: themeId},
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<void>.value(),
|
|
|
|
returnValueForMissingStub: _i8.Future<void>.value(),
|
|
|
|
) as _i8.Future<void>);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
2023-05-29 16:30:41 +00:00
|
|
|
Invocation.method(
|
|
|
|
#checkDefaultThemesOnStartup,
|
|
|
|
[],
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<void>.value(),
|
|
|
|
returnValueForMissingStub: _i8.Future<void>.value(),
|
|
|
|
) as _i8.Future<void>);
|
2023-05-29 16:30:41 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<bool> verifyInstalled({required String? themeId}) =>
|
2023-05-12 20:02:04 +00:00
|
|
|
(super.noSuchMethod(
|
|
|
|
Invocation.method(
|
|
|
|
#verifyInstalled,
|
|
|
|
[],
|
|
|
|
{#themeId: themeId},
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<bool>.value(false),
|
|
|
|
) as _i8.Future<bool>);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<List<_i13.StackThemeMetaData>> fetchThemes() =>
|
2023-05-12 20:02:04 +00:00
|
|
|
(super.noSuchMethod(
|
|
|
|
Invocation.method(
|
|
|
|
#fetchThemes,
|
|
|
|
[],
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<List<_i13.StackThemeMetaData>>.value(
|
|
|
|
<_i13.StackThemeMetaData>[]),
|
|
|
|
) as _i8.Future<List<_i13.StackThemeMetaData>>);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i8.Future<_i15.Uint8List> fetchTheme(
|
|
|
|
{required _i13.StackThemeMetaData? themeMetaData}) =>
|
2023-05-12 20:02:04 +00:00
|
|
|
(super.noSuchMethod(
|
|
|
|
Invocation.method(
|
|
|
|
#fetchTheme,
|
|
|
|
[],
|
|
|
|
{#themeMetaData: themeMetaData},
|
|
|
|
),
|
2023-11-16 16:59:09 +00:00
|
|
|
returnValue: _i8.Future<_i15.Uint8List>.value(_i15.Uint8List(0)),
|
|
|
|
) as _i8.Future<_i15.Uint8List>);
|
2023-05-12 20:02:04 +00:00
|
|
|
@override
|
2023-11-16 16:59:09 +00:00
|
|
|
_i14.StackTheme? getTheme({required String? themeId}) =>
|
2023-05-12 20:02:04 +00:00
|
|
|
(super.noSuchMethod(Invocation.method(
|
|
|
|
#getTheme,
|
|
|
|
[],
|
|
|
|
{#themeId: themeId},
|
2023-11-16 16:59:09 +00:00
|
|
|
)) as _i14.StackTheme?);
|
2023-05-12 20:02:04 +00:00
|
|
|
}
|