diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fe6dbfbb06..9b7a7b939e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,16 +8,39 @@ jobs: - name: Prepare repository uses: actions/checkout@v3 with: - flutter-version: '3.0.5' + flutter-version: '3.3.4' channel: 'stable' - name: Install Flutter uses: subosito/flutter-action@v2 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: stable + components: clippy - name: Checkout submodules run: git submodule update --init --recursive + - name: install dependencies + run: | + cargo install cargo-ndk + rustup target add x86_64-unknown-linux-gnu + sudo apt install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm + sudo apt install -y debhelper libclang-dev cargo rustc opencl-headers libssl-dev ocl-icd-opencl-dev + sudo apt install -y libc6-dev-i386 + sudo apt install -y build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config llvm + sudo apt install -y build-essential debhelper cmake libclang-dev libncurses5-dev clang libncursesw5-dev cargo rustc opencl-headers libssl-dev pkg-config ocl-icd-opencl-dev + sudo apt install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless - name: Build Lelantus run: | cd crypto_plugins/flutter_liblelantus/scripts/linux/ ./build_all.sh + - name: Build Monero + run: | + cd crypto_plugins/flutter_libmonero/scripts/linux/ + ./build_monero_all.sh + - name: Build Epic Cash + run: | + cd crypto_plugins/flutter_libepiccash/scripts/linux/ + ./build_all.sh - name: Get dependencies run: flutter pub get - name: Create temp files diff --git a/.gitignore b/.gitignore index 3ffacac455..323aac218b 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ coverage scripts/**/build /lib/external_api_keys.dart /test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart +/test/services/coins/namecoin/namecoin_wallet_test_parameters.dart.txt diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index f74f31e2f3..51f74f05d4 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit f74f31e2f3b4a7c11907ae5df6cd38505cd25897 +Subproject commit 51f74f05d465a92e0118cf7c2bcfb049df21af42 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1ffbb9415e..bb92ea24c0 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -243,7 +243,7 @@ SPEC CHECKSUMS: DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95 - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_libepiccash: 36241aa7d3126f6521529985ccb3dc5eaf7bb317 flutter_libmonero: da68a616b73dd0374a8419c684fa6b6df2c44ffe flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 32c584797e..4b7b1058de 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -198,6 +198,7 @@ CreatedOnToolsVersion = 7.3.1; DevelopmentTeam = 4DQKUWSG6C; LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; }; }; }; @@ -451,6 +452,8 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 79; DEVELOPMENT_TEAM = 4DQKUWSG6C; ENABLE_BITCODE = NO; @@ -509,6 +512,7 @@ ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; STRIP_INSTALLED_PRODUCT = NO; STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -635,6 +639,8 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 79; DEVELOPMENT_TEAM = 4DQKUWSG6C; ENABLE_BITCODE = NO; @@ -693,6 +699,7 @@ ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; STRIP_INSTALLED_PRODUCT = NO; STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -711,6 +718,8 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 79; DEVELOPMENT_TEAM = 4DQKUWSG6C; ENABLE_BITCODE = NO; @@ -769,6 +778,7 @@ ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; STRIP_INSTALLED_PRODUCT = NO; STRIP_STYLE = "non-global"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/pages_desktop_specific/home/desktop_home_view.dart b/lib/pages_desktop_specific/home/desktop_home_view.dart index adfcdfb6a3..4ca78894b6 100644 --- a/lib/pages_desktop_specific/home/desktop_home_view.dart +++ b/lib/pages_desktop_specific/home/desktop_home_view.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:stackwallet/pages_desktop_specific/home/desktop_menu.dart'; import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart'; +import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart'; import 'package:stackwallet/route_generator.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; @@ -30,8 +31,9 @@ class _DesktopHomeViewState extends ConsumerState { Container( color: Colors.orange, ), - Container( - color: Colors.yellow, + const Navigator( + onGenerateRoute: RouteGenerator.generateRoute, + initialRoute: SettingsMenu.routeName, ), Container( color: Colors.blue, diff --git a/lib/pages_desktop_specific/home/desktop_settings_view.dart b/lib/pages_desktop_specific/home/desktop_settings_view.dart new file mode 100644 index 0000000000..bfe9272f28 --- /dev/null +++ b/lib/pages_desktop_specific/home/desktop_settings_view.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; + +class DesktopSettingsView extends ConsumerStatefulWidget { + const DesktopSettingsView({Key? key}) : super(key: key); + + static const String routeName = "/desktopSettings"; + + @override + ConsumerState createState() => + _DesktopSettingsViewState(); +} + +class _DesktopSettingsViewState extends ConsumerState { + int currentViewIndex = 0; + final List contentViews = [ + Container( + color: Colors.lime, + ), //b+r + Container( + color: Colors.green, + ), //security + Container( + color: Colors.red, + ), //currency + Container( + color: Colors.orange, + ), //language + Container( + color: Colors.yellow, + ), //nodes + Container( + color: Colors.blue, + ), //syncing prefs + Container( + color: Colors.pink, + ), //appearance + Container( + color: Colors.purple, + ), //advanced + ]; + + void onMenuSelectionChanged(int newIndex) { + setState(() { + currentViewIndex = newIndex; + }); + } + + // will have a row with two items: SettingsMenu and settings contentxd + @override + Widget build(BuildContext context) { + return Material( + color: Theme.of(context).extension()!.background, + child: Row( + children: [ + SettingsMenu( + onSelectionChanged: onMenuSelectionChanged, + ), + Expanded( + child: contentViews[currentViewIndex], + ), + ], + ), + ); + } +} diff --git a/lib/pages_desktop_specific/home/settings_menu/backup_and_restore.dart b/lib/pages_desktop_specific/home/settings_menu/backup_and_restore.dart new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/pages_desktop_specific/home/settings_menu/settings_menu.dart b/lib/pages_desktop_specific/home/settings_menu/settings_menu.dart new file mode 100644 index 0000000000..de800b51f8 --- /dev/null +++ b/lib/pages_desktop_specific/home/settings_menu/settings_menu.dart @@ -0,0 +1,189 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:stackwallet/pages_desktop_specific/home/settings_menu_item.dart'; +import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/text_styles.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; + +class SettingsMenu extends ConsumerStatefulWidget { + const SettingsMenu({ + Key? key, + required this.onSelectionChanged, + }) : super(key: key); + + final void Function(int)? + onSelectionChanged; //is a function that takes in an int and returns void/.; + + static const String routeName = "/settingsMenu"; + + @override + ConsumerState createState() => _SettingsMenuState(); +} + +class _SettingsMenuState extends ConsumerState { + int selectedMenuItem = 0; + + void updateSelectedMenuItem(int index) { + setState(() { + selectedMenuItem = index; + }); + widget.onSelectionChanged?.call(index); + } + + @override + Widget build(BuildContext context) { + debugPrint("BUILD: $runtimeType"); + + return Material( + color: Theme.of(context).extension()!.background, + child: SizedBox( + width: 300, + child: Padding( + padding: const EdgeInsets.fromLTRB(24.0, 10.0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 20, + // width: 300, + ), + Text( + "Settings", + style: STextStyles.desktopH3(context).copyWith( + fontSize: 24, + ), + ), + Row( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB( + 3.0, + 30.0, + 55.0, + 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Backup and restore", + value: 0, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + const SizedBox( + height: 2, + ), + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Security", + value: 1, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + const SizedBox( + height: 2, + ), + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Currency", + value: 2, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + const SizedBox( + height: 2, + ), + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Language", + value: 3, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + const SizedBox( + height: 2, + ), + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Nodes", + value: 4, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + const SizedBox( + height: 2, + ), + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Syncing preferences", + value: 5, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + const SizedBox( + height: 2, + ), + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Appearance", + value: 6, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + const SizedBox( + height: 2, + ), + SettingsMenuItem( + icon: SvgPicture.asset( + Assets.svg.polygon, + width: 11, + height: 11, + ), + label: "Advanced", + value: 7, + group: selectedMenuItem, + onChanged: updateSelectedMenuItem, + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages_desktop_specific/home/settings_menu_item.dart b/lib/pages_desktop_specific/home/settings_menu_item.dart new file mode 100644 index 0000000000..d317c509a7 --- /dev/null +++ b/lib/pages_desktop_specific/home/settings_menu_item.dart @@ -0,0 +1,58 @@ +import 'package:flutter/material.dart'; +import 'package:stackwallet/utilities/text_styles.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; + +class SettingsMenuItem extends StatelessWidget { + const SettingsMenuItem({ + Key? key, + required this.icon, + required this.label, + required this.value, + required this.group, + required this.onChanged, + }) : super(key: key); + + final Widget icon; + final String label; + final T value; + final T group; + final void Function(T) onChanged; + + @override + Widget build(BuildContext context) { + return TextButton( + //if val == group, then button is selected, otherwise unselected + style: value == group + ? Theme.of(context) + .extension()! + .getDesktopSettingsButtonColor(context) + : Theme.of(context) + .extension()! + .getDesktopSettingsButtonColor(context), + onPressed: () { + onChanged(value); + }, + child: Padding( + padding: EdgeInsets.symmetric( + vertical: 16, + horizontal: 16, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + icon, + const SizedBox( + width: 12, + ), + Text( + label, + style: value == group //checks if option is selected + ? STextStyles.settingsMenuItemSelected(context) + : STextStyles.settingsMenuItem(context), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages_desktop_specific/home/settings_view/settings_view.dart b/lib/pages_desktop_specific/home/settings_view/settings_view.dart deleted file mode 100644 index c308f29620..0000000000 --- a/lib/pages_desktop_specific/home/settings_view/settings_view.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; - -class SettingsView extends ConsumerStatefulWidget { - const SettingsView({Key? key}) : super(key: key); - - static const String routeName = "/settingsView"; - - @override - ConsumerState createState() => _SettingsView(); -} - -class _SettingsView extends ConsumerState { - @override - Widget build(BuildContext context) { - debugPrint("BUILD: $runtimeType"); - // TODO: implement build - throw UnimplementedError(); - } -} diff --git a/lib/route_generator.dart b/lib/route_generator.dart index 016f60165b..d318b85a6d 100644 --- a/lib/route_generator.dart +++ b/lib/route_generator.dart @@ -84,7 +84,9 @@ import 'package:stackwallet/pages/wallet_view/wallet_view.dart'; import 'package:stackwallet/pages/wallets_view/wallets_view.dart'; import 'package:stackwallet/pages_desktop_specific/create_password/create_password_view.dart'; import 'package:stackwallet/pages_desktop_specific/home/desktop_home_view.dart'; +import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart'; import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart'; +import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart'; import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/event_bus/events/global/node_connection_status_changed_event.dart'; import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart'; @@ -955,12 +957,26 @@ class RouteGenerator { builder: (_) => const DesktopHomeView(), settings: RouteSettings(name: settings.name)); + // case DesktopSettingsView.routeName: + // return getRoute( + // shouldUseMaterialRoute: useMaterialPageRoute, + // builder: (_) => const DesktopSettingsView(), + // settings: RouteSettings(name: settings.name)); + case MyStackView.routeName: return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, builder: (_) => const MyStackView(), settings: RouteSettings(name: settings.name)); + case SettingsMenu.routeName: + return getRoute( + shouldUseMaterialRoute: useMaterialPageRoute, + builder: (_) => SettingsMenu( + onSelectionChanged: (int) {}, + ), + settings: RouteSettings(name: settings.name)); + // == End of desktop specific routes ===================================== default: diff --git a/lib/utilities/text_styles.dart b/lib/utilities/text_styles.dart index 21a1ee4882..c3a6929fe8 100644 --- a/lib/utilities/text_styles.dart +++ b/lib/utilities/text_styles.dart @@ -793,6 +793,44 @@ class STextStyles { } } + static TextStyle settingsMenuItem(BuildContext context) { + switch (_theme(context).themeType) { + case ThemeType.light: + return GoogleFonts.inter( + color: _theme(context).textDark.withOpacity(0.5), + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); + case ThemeType.dark: + return GoogleFonts.inter( + color: _theme(context).textDark.withOpacity(0.5), + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); + } + } + + static TextStyle settingsMenuItemSelected(BuildContext context) { + switch (_theme(context).themeType) { + case ThemeType.light: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); + case ThemeType.dark: + return GoogleFonts.inter( + color: _theme(context).textDark, + fontWeight: FontWeight.w500, + fontSize: 16, + height: 20.8 / 16, + ); + } + } + static TextStyle stepIndicator(BuildContext context) { switch (_theme(context).themeType) { case ThemeType.light: diff --git a/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index 9dd34809b9..0481268b59 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -1513,4 +1513,11 @@ class StackColors extends ThemeExtension { textFieldDefaultBG, ), ); + + ButtonStyle? getDesktopSettingsButtonColor(BuildContext context) => + Theme.of(context).textButtonTheme.style?.copyWith( + backgroundColor: MaterialStateProperty.all( + background, + ), + ); } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index a4f194b8db..1989755561 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,6 +6,7 @@ import FlutterMacOS import Foundation import connectivity_plus_macos +import devicelocale import flutter_libepiccash import flutter_local_notifications import flutter_secure_storage_macos @@ -21,6 +22,7 @@ import window_size func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) + DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin")) FlutterLibepiccashPlugin.register(with: registry.registrar(forPlugin: "FlutterLibepiccashPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin")) diff --git a/macos/Podfile.lock b/macos/Podfile.lock new file mode 100644 index 0000000000..82579cd8ed --- /dev/null +++ b/macos/Podfile.lock @@ -0,0 +1,101 @@ +PODS: + - connectivity_plus_macos (0.0.1): + - FlutterMacOS + - ReachabilitySwift + - flutter_libepiccash (0.0.1): + - FlutterMacOS + - flutter_local_notifications (0.0.1): + - FlutterMacOS + - flutter_secure_storage_macos (3.3.1): + - FlutterMacOS + - FlutterMacOS (1.0.0) + - isar_flutter_libs (1.0.0): + - FlutterMacOS + - package_info_plus_macos (0.0.1): + - FlutterMacOS + - path_provider_macos (0.0.1): + - FlutterMacOS + - ReachabilitySwift (5.0.0) + - share_plus_macos (0.0.1): + - FlutterMacOS + - shared_preferences_macos (0.0.1): + - FlutterMacOS + - stack_wallet_backup (0.0.1): + - FlutterMacOS + - url_launcher_macos (0.0.1): + - FlutterMacOS + - wakelock_macos (0.0.1): + - FlutterMacOS + - window_size (0.0.2): + - FlutterMacOS + +DEPENDENCIES: + - connectivity_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos`) + - flutter_libepiccash (from `Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos`) + - flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`) + - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) + - FlutterMacOS (from `Flutter/ephemeral`) + - isar_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos`) + - package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`) + - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) + - share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`) + - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) + - stack_wallet_backup (from `Flutter/ephemeral/.symlinks/plugins/stack_wallet_backup/macos`) + - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) + - wakelock_macos (from `Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos`) + - window_size (from `Flutter/ephemeral/.symlinks/plugins/window_size/macos`) + +SPEC REPOS: + trunk: + - ReachabilitySwift + +EXTERNAL SOURCES: + connectivity_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos + flutter_libepiccash: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_libepiccash/macos + flutter_local_notifications: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos + flutter_secure_storage_macos: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos + FlutterMacOS: + :path: Flutter/ephemeral + isar_flutter_libs: + :path: Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos + package_info_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos + path_provider_macos: + :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos + share_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos + shared_preferences_macos: + :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos + stack_wallet_backup: + :path: Flutter/ephemeral/.symlinks/plugins/stack_wallet_backup/macos + url_launcher_macos: + :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos + wakelock_macos: + :path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos + window_size: + :path: Flutter/ephemeral/.symlinks/plugins/window_size/macos + +SPEC CHECKSUMS: + connectivity_plus_macos: f6e86fd000e971d361e54b5afcadc8c8fa773308 + flutter_libepiccash: b33f7396504712b513b8ff019a3f6f3bdae54cfb + flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4 + flutter_secure_storage_macos: 6ceee8fbc7f484553ad17f79361b556259df89aa + FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 + isar_flutter_libs: 1948109973b6c2e46d6196b1537688a36a6edeac + package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c + path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 + share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 + shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727 + stack_wallet_backup: 6ebc60b1bdcf11cf1f1cbad9aa78332e1e15778c + url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3 + wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9 + window_size: 339dafa0b27a95a62a843042038fa6c3c48de195 + +PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c + +COCOAPODS: 1.11.3 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 075bb31c99..6cc16a184e 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 36299DF6FDF6725B2B9C51D5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BB87EF657A3ADFB1CE3E959 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -54,7 +55,7 @@ /* Begin PBXFileReference section */ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* firo_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "firo_wallet.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* firo_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = firo_wallet.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -66,8 +67,12 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 6BB87EF657A3ADFB1CE3E959 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 937DF254AD7EDA15AFE96BD9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + BC4589C48A71C3A1A477DD76 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + EA2D897BC13EBFB1DE697D5C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -75,6 +80,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 36299DF6FDF6725B2B9C51D5 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -99,6 +105,7 @@ 33CEB47122A05771004F2AC0 /* Flutter */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, + 9000119722579F22067B9BC0 /* Pods */, ); sourceTree = ""; }; @@ -145,9 +152,21 @@ path = Runner; sourceTree = ""; }; + 9000119722579F22067B9BC0 /* Pods */ = { + isa = PBXGroup; + children = ( + EA2D897BC13EBFB1DE697D5C /* Pods-Runner.debug.xcconfig */, + 937DF254AD7EDA15AFE96BD9 /* Pods-Runner.release.xcconfig */, + BC4589C48A71C3A1A477DD76 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( + 6BB87EF657A3ADFB1CE3E959 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -159,11 +178,13 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + DF80A3E256A63BF2D2008937 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, + 8D7CC24E5AE846869656D4D1 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -270,6 +291,45 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; + 8D7CC24E5AE846869656D4D1 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + DF80A3E256A63BF2D2008937 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16ed..21a3cc14c7 100644 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/pubspec.lock b/pubspec.lock index 2cc67f6116..2405aef270 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,28 +7,28 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "46.0.0" + version: "47.0.0" analyzer: dependency: "direct dev" description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "4.6.0" + version: "4.7.0" animations: dependency: "direct main" description: name: animations url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.7" another_flushbar: dependency: "direct main" description: name: another_flushbar url: "https://pub.dartlang.org" source: hosted - version: "1.10.29" + version: "1.12.29" app_settings: dependency: "direct main" description: @@ -42,7 +42,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.1.11" + version: "3.3.0" args: dependency: transitive description: @@ -56,14 +56,14 @@ packages: name: asn1lib url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" barcode_scan2: dependency: "direct main" description: @@ -134,14 +134,14 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" build_config: dependency: transitive description: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.1" build_daemon: dependency: transitive description: @@ -155,21 +155,21 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.10" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.1.11" + version: "2.3.0" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "7.2.3" + version: "7.2.6" built_collection: dependency: transitive description: @@ -183,21 +183,14 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.3.3" + version: "8.4.1" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" checked_yaml: dependency: transitive description: @@ -211,14 +204,14 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "4.1.0" + version: "4.3.0" collection: dependency: transitive description: @@ -246,21 +239,21 @@ packages: name: connectivity_plus_macos url: "https://pub.dartlang.org" source: hosted - version: "1.2.4" + version: "1.2.6" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.2" connectivity_plus_web: dependency: transitive description: name: connectivity_plus_web url: "https://pub.dartlang.org" source: hosted - version: "1.2.3" + version: "1.2.5" connectivity_plus_windows: dependency: transitive description: @@ -281,7 +274,14 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.5.0" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3+2" crypto: dependency: "direct main" description: @@ -296,6 +296,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.5" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.2" cw_core: dependency: "direct main" description: @@ -337,7 +344,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.2.3" + version: "2.2.4" dartx: dependency: transitive description: @@ -358,21 +365,21 @@ packages: name: decimal url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.0" dependency_validator: dependency: "direct dev" description: name: dependency_validator url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.2.2" devicelocale: dependency: "direct main" description: name: devicelocale url: "https://pub.dartlang.org" source: hosted - version: "0.5.2" + version: "0.5.5" dropdown_button2: dependency: "direct main" description: @@ -407,7 +414,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: "direct main" description: @@ -428,7 +435,7 @@ packages: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "5.0.1" + version: "5.2.1" fixnum: dependency: transitive description: @@ -494,14 +501,14 @@ packages: name: flutter_local_notifications url: "https://pub.dartlang.org" source: hosted - version: "9.6.1" + version: "9.9.1" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux url: "https://pub.dartlang.org" source: hosted - version: "0.5.0+1" + version: "0.5.1" flutter_local_notifications_platform_interface: dependency: transitive description: @@ -515,21 +522,21 @@ packages: name: flutter_mobx url: "https://pub.dartlang.org" source: hosted - version: "2.0.6+1" + version: "2.0.6+4" flutter_native_splash: dependency: "direct main" description: name: flutter_native_splash url: "https://pub.dartlang.org" source: hosted - version: "2.2.4" + version: "2.2.11" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.7" flutter_riverpod: dependency: "direct main" description: @@ -543,28 +550,28 @@ packages: name: flutter_rounded_date_picker url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" flutter_secure_storage: dependency: "direct main" description: name: flutter_secure_storage url: "https://pub.dartlang.org" source: hosted - version: "5.0.2" + version: "5.1.2" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" flutter_secure_storage_platform_interface: dependency: transitive description: @@ -599,7 +606,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "1.1.1+1" + version: "1.1.5" flutter_test: dependency: "direct dev" description: flutter @@ -678,13 +685,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.1" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.0" http: dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.4" + version: "0.13.5" http_multi_server: dependency: transitive description: @@ -698,14 +712,14 @@ packages: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "4.0.1" + version: "4.0.2" image: dependency: transitive description: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.2.2" import_sorter: dependency: "direct dev" description: @@ -766,7 +780,7 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.5.0" + version: "4.7.0" jsonrpc2: dependency: "direct main" description: @@ -788,13 +802,6 @@ packages: relative: true source: path version: "0.0.1" - lint: - dependency: transitive - description: - name: lint - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.2" lints: dependency: transitive description: @@ -815,35 +822,35 @@ packages: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.0" lottie: dependency: "direct main" description: name: lottie url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.4.3" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: @@ -857,7 +864,7 @@ packages: name: mobx url: "https://pub.dartlang.org" source: hosted - version: "2.0.7+4" + version: "2.1.1" mockingjay: dependency: "direct dev" description: @@ -871,7 +878,7 @@ packages: name: mockito url: "https://pub.dartlang.org" source: hosted - version: "5.2.0" + version: "5.3.2" mocktail: dependency: transitive description: @@ -941,35 +948,35 @@ packages: name: package_info_plus_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.0.6" package_info_plus_windows: dependency: transitive description: name: package_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" path_drawing: dependency: transitive description: name: path_drawing url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" path_provider: dependency: "direct main" description: @@ -983,14 +990,14 @@ packages: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.16" + version: "2.0.20" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.10" + version: "2.0.11" path_provider_linux: dependency: transitive description: @@ -1011,49 +1018,49 @@ packages: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.3" permission_handler: dependency: "direct main" description: name: permission_handler url: "https://pub.dartlang.org" source: hosted - version: "10.0.0" + version: "10.1.0" permission_handler_android: dependency: transitive description: name: permission_handler_android url: "https://pub.dartlang.org" source: hosted - version: "10.0.0" + version: "10.2.0" permission_handler_apple: dependency: transitive description: name: permission_handler_apple url: "https://pub.dartlang.org" source: hosted - version: "9.0.4" + version: "9.0.7" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.7.0" + version: "3.9.0" permission_handler_windows: dependency: transitive description: name: permission_handler_windows url: "https://pub.dartlang.org" source: hosted - version: "0.1.0" + version: "0.1.2" petitparser: dependency: transitive description: @@ -1074,14 +1081,14 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.3" pointycastle: dependency: "direct main" description: name: pointycastle url: "https://pub.dartlang.org" source: hosted - version: "3.6.0" + version: "3.6.2" pool: dependency: transitive description: @@ -1109,14 +1116,14 @@ packages: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" pubspec_parse: dependency: transitive description: name: pubspec_parse url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" qr: dependency: transitive description: @@ -1131,13 +1138,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" rational: dependency: transitive description: @@ -1172,21 +1172,21 @@ packages: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.27.4" + version: "0.27.5" share_plus: dependency: "direct main" description: name: share_plus url: "https://pub.dartlang.org" source: hosted - version: "4.0.10" + version: "4.5.3" share_plus_linux: dependency: transitive description: name: share_plus_linux url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" share_plus_macos: dependency: transitive description: @@ -1200,14 +1200,14 @@ packages: name: share_plus_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.0.3" + version: "3.1.1" share_plus_web: dependency: transitive description: name: share_plus_web url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.1.0" share_plus_windows: dependency: transitive description: @@ -1228,7 +1228,7 @@ packages: name: shared_preferences_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.12" + version: "2.0.14" shared_preferences_ios: dependency: transitive description: @@ -1256,7 +1256,7 @@ packages: name: shared_preferences_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" shared_preferences_web: dependency: transitive description: @@ -1277,7 +1277,7 @@ packages: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.4.0" shelf_packages_handler: dependency: transitive description: @@ -1310,21 +1310,21 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.2.6" source_helper: dependency: transitive description: name: source_helper url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.3.3" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" source_maps: dependency: transitive description: @@ -1338,7 +1338,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -1375,56 +1375,56 @@ packages: name: stream_transform url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" sync_http: dependency: transitive description: name: sync_http url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test: dependency: transitive description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.21.1" + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.13" + version: "0.4.16" time: dependency: transitive description: name: time url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.3" timezone: dependency: transitive description: @@ -1459,14 +1459,14 @@ packages: name: tuple url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" universal_io: dependency: transitive description: @@ -1480,14 +1480,14 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.1.5" + version: "6.1.6" url_launcher_android: dependency: transitive description: name: url_launcher_android url: "https://pub.dartlang.org" source: hosted - version: "6.0.17" + version: "6.0.19" url_launcher_ios: dependency: transitive description: @@ -1515,14 +1515,14 @@ packages: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.12" + version: "2.0.13" url_launcher_windows: dependency: transitive description: @@ -1550,7 +1550,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "8.2.2" + version: "9.0.0" wakelock: dependency: "direct main" description: @@ -1585,14 +1585,14 @@ packages: name: wakelock_windows url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.1" watcher: dependency: transitive description: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" web_socket_channel: dependency: transitive description: @@ -1613,14 +1613,14 @@ packages: name: webkit_inspection_protocol url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.7.0" + version: "3.0.1" window_size: dependency: "direct main" description: @@ -1636,7 +1636,7 @@ packages: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+1" + version: "0.2.0+2" xml: dependency: transitive description: @@ -1666,5 +1666,5 @@ packages: source: hosted version: "1.0.0" sdks: - dart: ">=2.17.5 <3.0.0" - flutter: ">=3.0.1" + dart: ">=2.18.0 <3.0.0" + flutter: ">=3.3.0" diff --git a/test/cached_electrumx_test.mocks.dart b/test/cached_electrumx_test.mocks.dart index 52f6c40a57..1e3e70a0af 100644 --- a/test/cached_electrumx_test.mocks.dart +++ b/test/cached_electrumx_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/cached_electrumx_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i9; @@ -23,8 +24,17 @@ import 'package:stackwallet/utilities/prefs.dart' as _i5; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {} +class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ElectrumX]. /// @@ -35,187 +45,346 @@ class MockElectrumX extends _i1.Mock implements _i3.ElectrumX { } @override - set failovers(List<_i3.ElectrumXNode>? _failovers) => - super.noSuchMethod(Invocation.setter(#failovers, _failovers), - returnValueForMissingStub: null); + set failovers(List<_i3.ElectrumXNode>? _failovers) => super.noSuchMethod( + Invocation.setter( + #failovers, + _failovers, + ), + returnValueForMissingStub: null, + ); @override - int get currentFailoverIndex => - (super.noSuchMethod(Invocation.getter(#currentFailoverIndex), - returnValue: 0) as int); + int get currentFailoverIndex => (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) as int); @override set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter(#currentFailoverIndex, _currentFailoverIndex), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i4.Future request( - {String? command, - List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), - String? requestID, - int? retries = 2}) => + Invocation.setter( + #currentFailoverIndex, + _currentFailoverIndex, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i4.Future request({ + required String? command, + List? args = const [], + Duration? connectionTimeout = const Duration(seconds: 60), + String? requestID, + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#request, [], { + Invocation.method( + #request, + [], + { #command: command, #args: args, #connectionTimeout: connectionTimeout, #requestID: requestID, - #retries: retries - }), - returnValue: Future.value()) as _i4.Future); - @override - _i4.Future>> batchRequest( - {String? command, - Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), - int? retries = 2}) => + #retries: retries, + }, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future>> batchRequest({ + required String? command, + required Map>? args, + Duration? connectionTimeout = const Duration(seconds: 60), + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #connectionTimeout: connectionTimeout, - #retries: retries - }), - returnValue: Future>>.value( - >[])) - as _i4.Future>>); - @override - _i4.Future ping({String? requestID, int? retryCount = 1}) => + Invocation.method( + #batchRequest, + [], + { + #command: command, + #args: args, + #connectionTimeout: connectionTimeout, + #retries: retries, + }, + ), + returnValue: _i4.Future>>.value( + >[]), + ) as _i4.Future>>); + @override + _i4.Future ping({ + String? requestID, + int? retryCount = 1, + }) => (super.noSuchMethod( - Invocation.method( - #ping, [], {#requestID: requestID, #retryCount: retryCount}), - returnValue: Future.value(false)) as _i4.Future); + Invocation.method( + #ping, + [], + { + #requestID: requestID, + #retryCount: retryCount, + }, + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); @override _i4.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: - Future>.value({})) - as _i4.Future>); + Invocation.method( + #getBlockHeadTip, + [], + {#requestID: requestID}, + ), + returnValue: + _i4.Future>.value({}), + ) as _i4.Future>); @override _i4.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i4 - .Future>); - @override - _i4.Future broadcastTransaction({String? rawTx, String? requestID}) => + Invocation.method( + #getServerFeatures, + [], + {#requestID: requestID}, + ), + returnValue: + _i4.Future>.value({}), + ) as _i4.Future>); + @override + _i4.Future broadcastTransaction({ + required String? rawTx, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], - {#rawTx: rawTx, #requestID: requestID}), - returnValue: Future.value('')) as _i4.Future); - @override - _i4.Future> getBalance( - {String? scripthash, String? requestID}) => + Invocation.method( + #broadcastTransaction, + [], + { + #rawTx: rawTx, + #requestID: requestID, + }, + ), + returnValue: _i4.Future.value(''), + ) as _i4.Future); + @override + _i4.Future> getBalance({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i4.Future>); - @override - _i4.Future>> getHistory( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBalance, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: + _i4.Future>.value({}), + ) as _i4.Future>); + @override + _i4.Future>> getHistory({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) - as _i4.Future>>); + Invocation.method( + #getHistory, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i4.Future>>.value( + >[]), + ) as _i4.Future>>); @override _i4.Future>>> getBatchHistory( - {Map>? args}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i4 - .Future>>>); - @override - _i4.Future>> getUTXOs( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBatchHistory, + [], + {#args: args}, + ), + returnValue: _i4.Future>>>.value( + >>{}), + ) as _i4.Future>>>); + @override + _i4.Future>> getUTXOs({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) as _i4 - .Future>>); + Invocation.method( + #getUTXOs, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i4.Future>>.value( + >[]), + ) as _i4.Future>>); @override _i4.Future>>> getBatchUTXOs( - {Map>? args}) => - (super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i4 - .Future>>>); - @override - _i4.Future> getTransaction( - {String? txHash, bool? verbose = true, String? requestID}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #verbose: verbose, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i4.Future>); - @override - _i4.Future> getAnonymitySet( - {String? groupId = r'1', - String? blockhash = r'', - String? requestID}) => + Invocation.method( + #getBatchUTXOs, + [], + {#args: args}, + ), + returnValue: _i4.Future>>>.value( + >>{}), + ) as _i4.Future>>>); + @override + _i4.Future> getTransaction({ + required String? txHash, + bool? verbose = true, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID - }), - returnValue: - Future>.value({})) - as _i4.Future>); - @override - _i4.Future getMintData({dynamic mints, String? requestID}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }, + ), + returnValue: + _i4.Future>.value({}), + ) as _i4.Future>); + @override + _i4.Future> getAnonymitySet({ + String? groupId = r'1', + String? blockhash = r'', + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getMintData, [], {#mints: mints, #requestID: requestID}), - returnValue: Future.value()) as _i4.Future); - @override - _i4.Future> getUsedCoinSerials( - {String? requestID, int? startNumber}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }, + ), + returnValue: + _i4.Future>.value({}), + ) as _i4.Future>); + @override + _i4.Future getMintData({ + dynamic mints, + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getMintData, + [], + { + #mints: mints, + #requestID: requestID, + }, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future> getUsedCoinSerials({ + String? requestID, + required int? startNumber, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#requestID: requestID, #startNumber: startNumber}), - returnValue: - Future>.value({})) - as _i4.Future>); + Invocation.method( + #getUsedCoinSerials, + [], + { + #requestID: requestID, + #startNumber: startNumber, + }, + ), + returnValue: + _i4.Future>.value({}), + ) as _i4.Future>); @override _i4.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLatestCoinId, [], {#requestID: requestID}), - returnValue: Future.value(0)) as _i4.Future); - @override - _i4.Future> getFeeRate({String? requestID}) => (super - .noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i4 - .Future>); - @override - _i4.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) => + Invocation.method( + #getLatestCoinId, + [], + {#requestID: requestID}, + ), + returnValue: _i4.Future.value(0), + ) as _i4.Future); + @override + _i4.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #estimateFee, [], {#requestID: requestID, #blocks: blocks}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i4.Future<_i2.Decimal>); + Invocation.method( + #getFeeRate, + [], + {#requestID: requestID}, + ), + returnValue: + _i4.Future>.value({}), + ) as _i4.Future>); + @override + _i4.Future<_i2.Decimal> estimateFee({ + String? requestID, + required int? blocks, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + )), + ) as _i4.Future<_i2.Decimal>); @override _i4.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i4.Future<_i2.Decimal>); + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + returnValue: _i4.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + )), + ) as _i4.Future<_i2.Decimal>); } /// A class which mocks [Prefs]. @@ -227,192 +396,317 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs { } @override - bool get isInitialized => - (super.noSuchMethod(Invocation.getter(#isInitialized), returnValue: false) - as bool); + bool get isInitialized => (super.noSuchMethod( + Invocation.getter(#isInitialized), + returnValue: false, + ) as bool); @override - int get lastUnlockedTimeout => (super - .noSuchMethod(Invocation.getter(#lastUnlockedTimeout), returnValue: 0) - as int); + int get lastUnlockedTimeout => (super.noSuchMethod( + Invocation.getter(#lastUnlockedTimeout), + returnValue: 0, + ) as int); @override set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( - Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), - returnValueForMissingStub: null); - @override - int get lastUnlocked => - (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) - as int); - @override - set lastUnlocked(int? lastUnlocked) => - super.noSuchMethod(Invocation.setter(#lastUnlocked, lastUnlocked), - returnValueForMissingStub: null); - @override - int get currentNotificationId => - (super.noSuchMethod(Invocation.getter(#currentNotificationId), - returnValue: 0) as int); - @override - List get walletIdsSyncOnStartup => - (super.noSuchMethod(Invocation.getter(#walletIdsSyncOnStartup), - returnValue: []) as List); + Invocation.setter( + #lastUnlockedTimeout, + lastUnlockedTimeout, + ), + returnValueForMissingStub: null, + ); + @override + int get lastUnlocked => (super.noSuchMethod( + Invocation.getter(#lastUnlocked), + returnValue: 0, + ) as int); + @override + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter( + #lastUnlocked, + lastUnlocked, + ), + returnValueForMissingStub: null, + ); + @override + int get currentNotificationId => (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) as int); + @override + List get walletIdsSyncOnStartup => (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) as List); @override set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => super.noSuchMethod( - Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), - returnValueForMissingStub: null); - @override - _i6.SyncingType get syncType => - (super.noSuchMethod(Invocation.getter(#syncType), - returnValue: _i6.SyncingType.currentWalletOnly) as _i6.SyncingType); - @override - set syncType(_i6.SyncingType? syncType) => - super.noSuchMethod(Invocation.setter(#syncType, syncType), - returnValueForMissingStub: null); - @override - bool get wifiOnly => - (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) - as bool); - @override - set wifiOnly(bool? wifiOnly) => - super.noSuchMethod(Invocation.setter(#wifiOnly, wifiOnly), - returnValueForMissingStub: null); - @override - bool get externalCalls => - (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) - as bool); - @override - set externalCalls(bool? eCalls) => - super.noSuchMethod(Invocation.setter(#externalCalls, eCalls), - returnValueForMissingStub: null); - @override - bool get showFavoriteWallets => - (super.noSuchMethod(Invocation.getter(#showFavoriteWallets), - returnValue: false) as bool); + Invocation.setter( + #walletIdsSyncOnStartup, + walletIdsSyncOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + _i6.SyncingType get syncType => (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i6.SyncingType.currentWalletOnly, + ) as _i6.SyncingType); + @override + set syncType(_i6.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter( + #syncType, + syncType, + ), + returnValueForMissingStub: null, + ); + @override + bool get wifiOnly => (super.noSuchMethod( + Invocation.getter(#wifiOnly), + returnValue: false, + ) as bool); + @override + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter( + #wifiOnly, + wifiOnly, + ), + returnValueForMissingStub: null, + ); + @override + bool get showFavoriteWallets => (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) as bool); @override set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter(#showFavoriteWallets, showFavoriteWallets), - returnValueForMissingStub: null); - @override - String get language => - (super.noSuchMethod(Invocation.getter(#language), returnValue: '') - as String); - @override - set language(String? newLanguage) => - super.noSuchMethod(Invocation.setter(#language, newLanguage), - returnValueForMissingStub: null); - @override - String get currency => - (super.noSuchMethod(Invocation.getter(#currency), returnValue: '') - as String); - @override - set currency(String? newCurrency) => - super.noSuchMethod(Invocation.setter(#currency, newCurrency), - returnValueForMissingStub: null); - @override - _i7.ExchangeRateType get exchangeRateType => - (super.noSuchMethod(Invocation.getter(#exchangeRateType), - returnValue: _i7.ExchangeRateType.estimated) as _i7.ExchangeRateType); + Invocation.setter( + #showFavoriteWallets, + showFavoriteWallets, + ), + returnValueForMissingStub: null, + ); + @override + String get language => (super.noSuchMethod( + Invocation.getter(#language), + returnValue: '', + ) as String); + @override + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter( + #language, + newLanguage, + ), + returnValueForMissingStub: null, + ); + @override + String get currency => (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: '', + ) as String); + @override + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter( + #currency, + newCurrency, + ), + returnValueForMissingStub: null, + ); + @override + _i7.ExchangeRateType get exchangeRateType => (super.noSuchMethod( + Invocation.getter(#exchangeRateType), + returnValue: _i7.ExchangeRateType.estimated, + ) as _i7.ExchangeRateType); @override set exchangeRateType(_i7.ExchangeRateType? exchangeRateType) => - super.noSuchMethod(Invocation.setter(#exchangeRateType, exchangeRateType), - returnValueForMissingStub: null); - @override - bool get useBiometrics => - (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) - as bool); - @override - set useBiometrics(bool? useBiometrics) => - super.noSuchMethod(Invocation.setter(#useBiometrics, useBiometrics), - returnValueForMissingStub: null); - @override - bool get hasPin => - (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) - as bool); - @override - set hasPin(bool? hasPin) => - super.noSuchMethod(Invocation.setter(#hasPin, hasPin), - returnValueForMissingStub: null); - @override - bool get showTestNetCoins => - (super.noSuchMethod(Invocation.getter(#showTestNetCoins), - returnValue: false) as bool); - @override - set showTestNetCoins(bool? showTestNetCoins) => - super.noSuchMethod(Invocation.setter(#showTestNetCoins, showTestNetCoins), - returnValueForMissingStub: null); - @override - bool get isAutoBackupEnabled => - (super.noSuchMethod(Invocation.getter(#isAutoBackupEnabled), - returnValue: false) as bool); + super.noSuchMethod( + Invocation.setter( + #exchangeRateType, + exchangeRateType, + ), + returnValueForMissingStub: null, + ); + @override + bool get useBiometrics => (super.noSuchMethod( + Invocation.getter(#useBiometrics), + returnValue: false, + ) as bool); + @override + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter( + #useBiometrics, + useBiometrics, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasPin => (super.noSuchMethod( + Invocation.getter(#hasPin), + returnValue: false, + ) as bool); + @override + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter( + #hasPin, + hasPin, + ), + returnValueForMissingStub: null, + ); + @override + bool get showTestNetCoins => (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) as bool); + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter( + #showTestNetCoins, + showTestNetCoins, + ), + returnValueForMissingStub: null, + ); + @override + bool get isAutoBackupEnabled => (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) as bool); @override set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), - returnValueForMissingStub: null); + Invocation.setter( + #isAutoBackupEnabled, + isAutoBackupEnabled, + ), + returnValueForMissingStub: null, + ); @override set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter(#autoBackupLocation, autoBackupLocation), - returnValueForMissingStub: null); - @override - _i8.BackupFrequencyType get backupFrequencyType => - (super.noSuchMethod(Invocation.getter(#backupFrequencyType), - returnValue: _i8.BackupFrequencyType.everyTenMinutes) - as _i8.BackupFrequencyType); + Invocation.setter( + #autoBackupLocation, + autoBackupLocation, + ), + returnValueForMissingStub: null, + ); + @override + _i8.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i8.BackupFrequencyType.everyTenMinutes, + ) as _i8.BackupFrequencyType); @override set backupFrequencyType(_i8.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( - Invocation.setter(#backupFrequencyType, backupFrequencyType), - returnValueForMissingStub: null); - @override - set lastAutoBackup(DateTime? lastAutoBackup) => - super.noSuchMethod(Invocation.setter(#lastAutoBackup, lastAutoBackup), - returnValueForMissingStub: null); - @override - bool get hideBlockExplorerWarning => - (super.noSuchMethod(Invocation.getter(#hideBlockExplorerWarning), - returnValue: false) as bool); + Invocation.setter( + #backupFrequencyType, + backupFrequencyType, + ), + returnValueForMissingStub: null, + ); + @override + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter( + #lastAutoBackup, + lastAutoBackup, + ), + returnValueForMissingStub: null, + ); + @override + bool get hideBlockExplorerWarning => (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) as bool); @override set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, hideBlockExplorerWarning), - returnValueForMissingStub: null); - @override - bool get gotoWalletOnStartup => - (super.noSuchMethod(Invocation.getter(#gotoWalletOnStartup), - returnValue: false) as bool); + Invocation.setter( + #hideBlockExplorerWarning, + hideBlockExplorerWarning, + ), + returnValueForMissingStub: null, + ); + @override + bool get gotoWalletOnStartup => (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) as bool); @override set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), - returnValueForMissingStub: null); - @override - set startupWalletId(String? startupWalletId) => - super.noSuchMethod(Invocation.setter(#startupWalletId, startupWalletId), - returnValueForMissingStub: null); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i4.Future init() => (super.noSuchMethod(Invocation.method(#init, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + Invocation.setter( + #gotoWalletOnStartup, + gotoWalletOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter( + #startupWalletId, + startupWalletId, + ), + returnValueForMissingStub: null, + ); + @override + bool get externalCalls => (super.noSuchMethod( + Invocation.getter(#externalCalls), + returnValue: false, + ) as bool); + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter( + #externalCalls, + externalCalls, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i4.Future init() => (super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override _i4.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method(#incrementCurrentNotificationIndex, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - void addListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i9.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #incrementCurrentNotificationIndex, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/electrumx_test.mocks.dart b/test/electrumx_test.mocks.dart index b8ec89ff89..fa48ea2fde 100644 --- a/test/electrumx_test.mocks.dart +++ b/test/electrumx_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/electrumx_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i8; @@ -22,8 +23,17 @@ import 'package:stackwallet/utilities/prefs.dart' as _i4; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDuration_0 extends _i1.Fake implements Duration {} +class _FakeDuration_0 extends _i1.SmartFake implements Duration { + _FakeDuration_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [JsonRPC]. /// @@ -34,37 +44,68 @@ class MockJsonRPC extends _i1.Mock implements _i2.JsonRPC { } @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - set useSSL(bool? _useSSL) => - super.noSuchMethod(Invocation.setter(#useSSL, _useSSL), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - set host(String? _host) => super.noSuchMethod(Invocation.setter(#host, _host), - returnValueForMissingStub: null); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - set port(int? _port) => super.noSuchMethod(Invocation.setter(#port, _port), - returnValueForMissingStub: null); - @override - Duration get connectionTimeout => - (super.noSuchMethod(Invocation.getter(#connectionTimeout), - returnValue: _FakeDuration_0()) as Duration); + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + set useSSL(bool? _useSSL) => super.noSuchMethod( + Invocation.setter( + #useSSL, + _useSSL, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + set host(String? _host) => super.noSuchMethod( + Invocation.setter( + #host, + _host, + ), + returnValueForMissingStub: null, + ); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + set port(int? _port) => super.noSuchMethod( + Invocation.setter( + #port, + _port, + ), + returnValueForMissingStub: null, + ); + @override + Duration get connectionTimeout => (super.noSuchMethod( + Invocation.getter(#connectionTimeout), + returnValue: _FakeDuration_0( + this, + Invocation.getter(#connectionTimeout), + ), + ) as Duration); @override set connectionTimeout(Duration? _connectionTimeout) => super.noSuchMethod( - Invocation.setter(#connectionTimeout, _connectionTimeout), - returnValueForMissingStub: null); - @override - _i3.Future request(String? jsonRpcRequest) => - (super.noSuchMethod(Invocation.method(#request, [jsonRpcRequest]), - returnValue: Future.value()) as _i3.Future); + Invocation.setter( + #connectionTimeout, + _connectionTimeout, + ), + returnValueForMissingStub: null, + ); + @override + _i3.Future request(String? jsonRpcRequest) => (super.noSuchMethod( + Invocation.method( + #request, + [jsonRpcRequest], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [Prefs]. @@ -76,192 +117,317 @@ class MockPrefs extends _i1.Mock implements _i4.Prefs { } @override - bool get isInitialized => - (super.noSuchMethod(Invocation.getter(#isInitialized), returnValue: false) - as bool); + bool get isInitialized => (super.noSuchMethod( + Invocation.getter(#isInitialized), + returnValue: false, + ) as bool); @override - int get lastUnlockedTimeout => (super - .noSuchMethod(Invocation.getter(#lastUnlockedTimeout), returnValue: 0) - as int); + int get lastUnlockedTimeout => (super.noSuchMethod( + Invocation.getter(#lastUnlockedTimeout), + returnValue: 0, + ) as int); @override set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( - Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), - returnValueForMissingStub: null); - @override - int get lastUnlocked => - (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) - as int); - @override - set lastUnlocked(int? lastUnlocked) => - super.noSuchMethod(Invocation.setter(#lastUnlocked, lastUnlocked), - returnValueForMissingStub: null); - @override - int get currentNotificationId => - (super.noSuchMethod(Invocation.getter(#currentNotificationId), - returnValue: 0) as int); - @override - List get walletIdsSyncOnStartup => - (super.noSuchMethod(Invocation.getter(#walletIdsSyncOnStartup), - returnValue: []) as List); + Invocation.setter( + #lastUnlockedTimeout, + lastUnlockedTimeout, + ), + returnValueForMissingStub: null, + ); + @override + int get lastUnlocked => (super.noSuchMethod( + Invocation.getter(#lastUnlocked), + returnValue: 0, + ) as int); + @override + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter( + #lastUnlocked, + lastUnlocked, + ), + returnValueForMissingStub: null, + ); + @override + int get currentNotificationId => (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) as int); + @override + List get walletIdsSyncOnStartup => (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) as List); @override set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => super.noSuchMethod( - Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), - returnValueForMissingStub: null); - @override - _i5.SyncingType get syncType => - (super.noSuchMethod(Invocation.getter(#syncType), - returnValue: _i5.SyncingType.currentWalletOnly) as _i5.SyncingType); - @override - set syncType(_i5.SyncingType? syncType) => - super.noSuchMethod(Invocation.setter(#syncType, syncType), - returnValueForMissingStub: null); - @override - bool get wifiOnly => - (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) - as bool); - @override - set wifiOnly(bool? wifiOnly) => - super.noSuchMethod(Invocation.setter(#wifiOnly, wifiOnly), - returnValueForMissingStub: null); - @override - bool get externalCalls => - (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) - as bool); - @override - set externalCalls(bool? eCalls) => - super.noSuchMethod(Invocation.setter(#externalCalls, eCalls), - returnValueForMissingStub: null); - @override - bool get showFavoriteWallets => - (super.noSuchMethod(Invocation.getter(#showFavoriteWallets), - returnValue: false) as bool); + Invocation.setter( + #walletIdsSyncOnStartup, + walletIdsSyncOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + _i5.SyncingType get syncType => (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i5.SyncingType.currentWalletOnly, + ) as _i5.SyncingType); + @override + set syncType(_i5.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter( + #syncType, + syncType, + ), + returnValueForMissingStub: null, + ); + @override + bool get wifiOnly => (super.noSuchMethod( + Invocation.getter(#wifiOnly), + returnValue: false, + ) as bool); + @override + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter( + #wifiOnly, + wifiOnly, + ), + returnValueForMissingStub: null, + ); + @override + bool get showFavoriteWallets => (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) as bool); @override set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter(#showFavoriteWallets, showFavoriteWallets), - returnValueForMissingStub: null); - @override - String get language => - (super.noSuchMethod(Invocation.getter(#language), returnValue: '') - as String); - @override - set language(String? newLanguage) => - super.noSuchMethod(Invocation.setter(#language, newLanguage), - returnValueForMissingStub: null); - @override - String get currency => - (super.noSuchMethod(Invocation.getter(#currency), returnValue: '') - as String); - @override - set currency(String? newCurrency) => - super.noSuchMethod(Invocation.setter(#currency, newCurrency), - returnValueForMissingStub: null); - @override - _i6.ExchangeRateType get exchangeRateType => - (super.noSuchMethod(Invocation.getter(#exchangeRateType), - returnValue: _i6.ExchangeRateType.estimated) as _i6.ExchangeRateType); + Invocation.setter( + #showFavoriteWallets, + showFavoriteWallets, + ), + returnValueForMissingStub: null, + ); + @override + String get language => (super.noSuchMethod( + Invocation.getter(#language), + returnValue: '', + ) as String); + @override + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter( + #language, + newLanguage, + ), + returnValueForMissingStub: null, + ); + @override + String get currency => (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: '', + ) as String); + @override + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter( + #currency, + newCurrency, + ), + returnValueForMissingStub: null, + ); + @override + _i6.ExchangeRateType get exchangeRateType => (super.noSuchMethod( + Invocation.getter(#exchangeRateType), + returnValue: _i6.ExchangeRateType.estimated, + ) as _i6.ExchangeRateType); @override set exchangeRateType(_i6.ExchangeRateType? exchangeRateType) => - super.noSuchMethod(Invocation.setter(#exchangeRateType, exchangeRateType), - returnValueForMissingStub: null); - @override - bool get useBiometrics => - (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) - as bool); - @override - set useBiometrics(bool? useBiometrics) => - super.noSuchMethod(Invocation.setter(#useBiometrics, useBiometrics), - returnValueForMissingStub: null); - @override - bool get hasPin => - (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) - as bool); - @override - set hasPin(bool? hasPin) => - super.noSuchMethod(Invocation.setter(#hasPin, hasPin), - returnValueForMissingStub: null); - @override - bool get showTestNetCoins => - (super.noSuchMethod(Invocation.getter(#showTestNetCoins), - returnValue: false) as bool); - @override - set showTestNetCoins(bool? showTestNetCoins) => - super.noSuchMethod(Invocation.setter(#showTestNetCoins, showTestNetCoins), - returnValueForMissingStub: null); - @override - bool get isAutoBackupEnabled => - (super.noSuchMethod(Invocation.getter(#isAutoBackupEnabled), - returnValue: false) as bool); + super.noSuchMethod( + Invocation.setter( + #exchangeRateType, + exchangeRateType, + ), + returnValueForMissingStub: null, + ); + @override + bool get useBiometrics => (super.noSuchMethod( + Invocation.getter(#useBiometrics), + returnValue: false, + ) as bool); + @override + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter( + #useBiometrics, + useBiometrics, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasPin => (super.noSuchMethod( + Invocation.getter(#hasPin), + returnValue: false, + ) as bool); + @override + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter( + #hasPin, + hasPin, + ), + returnValueForMissingStub: null, + ); + @override + bool get showTestNetCoins => (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) as bool); + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter( + #showTestNetCoins, + showTestNetCoins, + ), + returnValueForMissingStub: null, + ); + @override + bool get isAutoBackupEnabled => (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) as bool); @override set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), - returnValueForMissingStub: null); + Invocation.setter( + #isAutoBackupEnabled, + isAutoBackupEnabled, + ), + returnValueForMissingStub: null, + ); @override set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter(#autoBackupLocation, autoBackupLocation), - returnValueForMissingStub: null); - @override - _i7.BackupFrequencyType get backupFrequencyType => - (super.noSuchMethod(Invocation.getter(#backupFrequencyType), - returnValue: _i7.BackupFrequencyType.everyTenMinutes) - as _i7.BackupFrequencyType); + Invocation.setter( + #autoBackupLocation, + autoBackupLocation, + ), + returnValueForMissingStub: null, + ); + @override + _i7.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i7.BackupFrequencyType.everyTenMinutes, + ) as _i7.BackupFrequencyType); @override set backupFrequencyType(_i7.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( - Invocation.setter(#backupFrequencyType, backupFrequencyType), - returnValueForMissingStub: null); - @override - set lastAutoBackup(DateTime? lastAutoBackup) => - super.noSuchMethod(Invocation.setter(#lastAutoBackup, lastAutoBackup), - returnValueForMissingStub: null); - @override - bool get hideBlockExplorerWarning => - (super.noSuchMethod(Invocation.getter(#hideBlockExplorerWarning), - returnValue: false) as bool); + Invocation.setter( + #backupFrequencyType, + backupFrequencyType, + ), + returnValueForMissingStub: null, + ); + @override + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter( + #lastAutoBackup, + lastAutoBackup, + ), + returnValueForMissingStub: null, + ); + @override + bool get hideBlockExplorerWarning => (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) as bool); @override set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, hideBlockExplorerWarning), - returnValueForMissingStub: null); - @override - bool get gotoWalletOnStartup => - (super.noSuchMethod(Invocation.getter(#gotoWalletOnStartup), - returnValue: false) as bool); + Invocation.setter( + #hideBlockExplorerWarning, + hideBlockExplorerWarning, + ), + returnValueForMissingStub: null, + ); + @override + bool get gotoWalletOnStartup => (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) as bool); @override set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), - returnValueForMissingStub: null); - @override - set startupWalletId(String? startupWalletId) => - super.noSuchMethod(Invocation.setter(#startupWalletId, startupWalletId), - returnValueForMissingStub: null); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i3.Future init() => (super.noSuchMethod(Invocation.method(#init, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + Invocation.setter( + #gotoWalletOnStartup, + gotoWalletOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter( + #startupWalletId, + startupWalletId, + ), + returnValueForMissingStub: null, + ); + @override + bool get externalCalls => (super.noSuchMethod( + Invocation.getter(#externalCalls), + returnValue: false, + ) as bool); + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter( + #externalCalls, + externalCalls, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i3.Future init() => (super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); @override _i3.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method(#incrementCurrentNotificationIndex, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #incrementCurrentNotificationIndex, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/flutter_secure_storage_interface_test.mocks.dart b/test/flutter_secure_storage_interface_test.mocks.dart index 420e018163..b784fda7fb 100644 --- a/test/flutter_secure_storage_interface_test.mocks.dart +++ b/test/flutter_secure_storage_interface_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/flutter_secure_storage_interface_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'package:flutter_secure_storage/flutter_secure_storage.dart' as _i2; @@ -16,18 +17,69 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeIOSOptions_0 extends _i1.Fake implements _i2.IOSOptions {} +class _FakeIOSOptions_0 extends _i1.SmartFake implements _i2.IOSOptions { + _FakeIOSOptions_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeAndroidOptions_1 extends _i1.Fake implements _i2.AndroidOptions {} +class _FakeAndroidOptions_1 extends _i1.SmartFake + implements _i2.AndroidOptions { + _FakeAndroidOptions_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeLinuxOptions_2 extends _i1.Fake implements _i2.LinuxOptions {} +class _FakeLinuxOptions_2 extends _i1.SmartFake implements _i2.LinuxOptions { + _FakeLinuxOptions_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWindowsOptions_3 extends _i1.Fake implements _i2.WindowsOptions {} +class _FakeWindowsOptions_3 extends _i1.SmartFake + implements _i2.WindowsOptions { + _FakeWindowsOptions_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWebOptions_4 extends _i1.Fake implements _i2.WebOptions {} +class _FakeWebOptions_4 extends _i1.SmartFake implements _i2.WebOptions { + _FakeWebOptions_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeMacOsOptions_5 extends _i1.Fake implements _i2.MacOsOptions {} +class _FakeMacOsOptions_5 extends _i1.SmartFake implements _i2.MacOsOptions { + _FakeMacOsOptions_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [FlutterSecureStorage]. /// @@ -39,41 +91,69 @@ class MockFlutterSecureStorage extends _i1.Mock } @override - _i2.IOSOptions get iOptions => - (super.noSuchMethod(Invocation.getter(#iOptions), - returnValue: _FakeIOSOptions_0()) as _i2.IOSOptions); + _i2.IOSOptions get iOptions => (super.noSuchMethod( + Invocation.getter(#iOptions), + returnValue: _FakeIOSOptions_0( + this, + Invocation.getter(#iOptions), + ), + ) as _i2.IOSOptions); @override - _i2.AndroidOptions get aOptions => - (super.noSuchMethod(Invocation.getter(#aOptions), - returnValue: _FakeAndroidOptions_1()) as _i2.AndroidOptions); + _i2.AndroidOptions get aOptions => (super.noSuchMethod( + Invocation.getter(#aOptions), + returnValue: _FakeAndroidOptions_1( + this, + Invocation.getter(#aOptions), + ), + ) as _i2.AndroidOptions); @override - _i2.LinuxOptions get lOptions => - (super.noSuchMethod(Invocation.getter(#lOptions), - returnValue: _FakeLinuxOptions_2()) as _i2.LinuxOptions); + _i2.LinuxOptions get lOptions => (super.noSuchMethod( + Invocation.getter(#lOptions), + returnValue: _FakeLinuxOptions_2( + this, + Invocation.getter(#lOptions), + ), + ) as _i2.LinuxOptions); @override - _i2.WindowsOptions get wOptions => - (super.noSuchMethod(Invocation.getter(#wOptions), - returnValue: _FakeWindowsOptions_3()) as _i2.WindowsOptions); + _i2.WindowsOptions get wOptions => (super.noSuchMethod( + Invocation.getter(#wOptions), + returnValue: _FakeWindowsOptions_3( + this, + Invocation.getter(#wOptions), + ), + ) as _i2.WindowsOptions); @override - _i2.WebOptions get webOptions => - (super.noSuchMethod(Invocation.getter(#webOptions), - returnValue: _FakeWebOptions_4()) as _i2.WebOptions); + _i2.WebOptions get webOptions => (super.noSuchMethod( + Invocation.getter(#webOptions), + returnValue: _FakeWebOptions_4( + this, + Invocation.getter(#webOptions), + ), + ) as _i2.WebOptions); @override - _i2.MacOsOptions get mOptions => - (super.noSuchMethod(Invocation.getter(#mOptions), - returnValue: _FakeMacOsOptions_5()) as _i2.MacOsOptions); + _i2.MacOsOptions get mOptions => (super.noSuchMethod( + Invocation.getter(#mOptions), + returnValue: _FakeMacOsOptions_5( + this, + Invocation.getter(#mOptions), + ), + ) as _i2.MacOsOptions); @override - _i3.Future write( - {String? key, - String? value, - _i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i3.Future write({ + required String? key, + required String? value, + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#write, [], { + Invocation.method( + #write, + [], + { #key: key, #value: value, #iOptions: iOptions, @@ -81,108 +161,138 @@ class MockFlutterSecureStorage extends _i1.Mock #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); @override - _i3.Future read( - {String? key, - _i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i3.Future read({ + required String? key, + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#read, [], { + Invocation.method( + #read, + [], + { #key: key, #iOptions: iOptions, #aOptions: aOptions, #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value()) as _i3.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); @override - _i3.Future containsKey( - {String? key, - _i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i3.Future containsKey({ + required String? key, + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#containsKey, [], { + Invocation.method( + #containsKey, + [], + { #key: key, #iOptions: iOptions, #aOptions: aOptions, #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value(false)) as _i3.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); @override - _i3.Future delete( - {String? key, - _i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i3.Future delete({ + required String? key, + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#delete, [], { + Invocation.method( + #delete, + [], + { #key: key, #iOptions: iOptions, #aOptions: aOptions, #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); @override - _i3.Future> readAll( - {_i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i3.Future> readAll({ + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#readAll, [], { - #iOptions: iOptions, - #aOptions: aOptions, - #lOptions: lOptions, - #webOptions: webOptions, - #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: - Future>.value({})) - as _i3.Future>); + Invocation.method( + #readAll, + [], + { + #iOptions: iOptions, + #aOptions: aOptions, + #lOptions: lOptions, + #webOptions: webOptions, + #mOptions: mOptions, + #wOptions: wOptions, + }, + ), + returnValue: _i3.Future>.value({}), + ) as _i3.Future>); @override - _i3.Future deleteAll( - {_i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i3.Future deleteAll({ + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#deleteAll, [], { + Invocation.method( + #deleteAll, + [], + { #iOptions: iOptions, #aOptions: aOptions, #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } diff --git a/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart b/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart index 3a3c3e54c2..37a40b3808 100644 --- a/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/lelantus_coin_adapter_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/models/type_adapter_tests/lelantus_coin_adapter_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:convert' as _i5; import 'dart:typed_data' as _i4; @@ -18,9 +19,18 @@ import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeHiveList_0 extends _i2.Fake - implements _i3.HiveList {} +class _FakeHiveList_0 extends _i2.SmartFake + implements _i3.HiveList { + _FakeHiveList_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [BinaryReader]. /// @@ -31,95 +41,188 @@ class MockBinaryReader extends _i2.Mock implements _i3.BinaryReader { } @override - int get availableBytes => - (super.noSuchMethod(Invocation.getter(#availableBytes), returnValue: 0) - as int); - @override - int get usedBytes => - (super.noSuchMethod(Invocation.getter(#usedBytes), returnValue: 0) - as int); - @override - void skip(int? bytes) => super.noSuchMethod(Invocation.method(#skip, [bytes]), - returnValueForMissingStub: null); - @override - int readByte() => - (super.noSuchMethod(Invocation.method(#readByte, []), returnValue: 0) - as int); - @override - _i4.Uint8List viewBytes(int? bytes) => - (super.noSuchMethod(Invocation.method(#viewBytes, [bytes]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - _i4.Uint8List peekBytes(int? bytes) => - (super.noSuchMethod(Invocation.method(#peekBytes, [bytes]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - int readWord() => - (super.noSuchMethod(Invocation.method(#readWord, []), returnValue: 0) - as int); - @override - int readInt32() => - (super.noSuchMethod(Invocation.method(#readInt32, []), returnValue: 0) - as int); - @override - int readUint32() => - (super.noSuchMethod(Invocation.method(#readUint32, []), returnValue: 0) - as int); - @override - int readInt() => - (super.noSuchMethod(Invocation.method(#readInt, []), returnValue: 0) - as int); - @override - double readDouble() => - (super.noSuchMethod(Invocation.method(#readDouble, []), returnValue: 0.0) - as double); - @override - bool readBool() => - (super.noSuchMethod(Invocation.method(#readBool, []), returnValue: false) - as bool); - @override - String readString( - [int? byteCount, - _i5.Converter, String>? decoder = - const _i5.Utf8Decoder()]) => - (super.noSuchMethod(Invocation.method(#readString, [byteCount, decoder]), - returnValue: '') as String); - @override - _i4.Uint8List readByteList([int? length]) => - (super.noSuchMethod(Invocation.method(#readByteList, [length]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - List readIntList([int? length]) => - (super.noSuchMethod(Invocation.method(#readIntList, [length]), - returnValue: []) as List); - @override - List readDoubleList([int? length]) => - (super.noSuchMethod(Invocation.method(#readDoubleList, [length]), - returnValue: []) as List); - @override - List readBoolList([int? length]) => - (super.noSuchMethod(Invocation.method(#readBoolList, [length]), - returnValue: []) as List); - @override - List readStringList( - [int? length, - _i5.Converter, String>? decoder = - const _i5.Utf8Decoder()]) => - (super.noSuchMethod(Invocation.method(#readStringList, [length, decoder]), - returnValue: []) as List); - @override - List readList([int? length]) => - (super.noSuchMethod(Invocation.method(#readList, [length]), - returnValue: []) as List); - @override - Map readMap([int? length]) => - (super.noSuchMethod(Invocation.method(#readMap, [length]), - returnValue: {}) as Map); + int get availableBytes => (super.noSuchMethod( + Invocation.getter(#availableBytes), + returnValue: 0, + ) as int); + @override + int get usedBytes => (super.noSuchMethod( + Invocation.getter(#usedBytes), + returnValue: 0, + ) as int); + @override + void skip(int? bytes) => super.noSuchMethod( + Invocation.method( + #skip, + [bytes], + ), + returnValueForMissingStub: null, + ); + @override + int readByte() => (super.noSuchMethod( + Invocation.method( + #readByte, + [], + ), + returnValue: 0, + ) as int); + @override + _i4.Uint8List viewBytes(int? bytes) => (super.noSuchMethod( + Invocation.method( + #viewBytes, + [bytes], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + _i4.Uint8List peekBytes(int? bytes) => (super.noSuchMethod( + Invocation.method( + #peekBytes, + [bytes], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + int readWord() => (super.noSuchMethod( + Invocation.method( + #readWord, + [], + ), + returnValue: 0, + ) as int); + @override + int readInt32() => (super.noSuchMethod( + Invocation.method( + #readInt32, + [], + ), + returnValue: 0, + ) as int); + @override + int readUint32() => (super.noSuchMethod( + Invocation.method( + #readUint32, + [], + ), + returnValue: 0, + ) as int); + @override + int readInt() => (super.noSuchMethod( + Invocation.method( + #readInt, + [], + ), + returnValue: 0, + ) as int); + @override + double readDouble() => (super.noSuchMethod( + Invocation.method( + #readDouble, + [], + ), + returnValue: 0.0, + ) as double); + @override + bool readBool() => (super.noSuchMethod( + Invocation.method( + #readBool, + [], + ), + returnValue: false, + ) as bool); + @override + String readString([ + int? byteCount, + _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + ]) => + (super.noSuchMethod( + Invocation.method( + #readString, + [ + byteCount, + decoder, + ], + ), + returnValue: '', + ) as String); + @override + _i4.Uint8List readByteList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readByteList, + [length], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + List readIntList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readIntList, + [length], + ), + returnValue: [], + ) as List); + @override + List readDoubleList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readDoubleList, + [length], + ), + returnValue: [], + ) as List); + @override + List readBoolList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readBoolList, + [length], + ), + returnValue: [], + ) as List); + @override + List readStringList([ + int? length, + _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + ]) => + (super.noSuchMethod( + Invocation.method( + #readStringList, + [ + length, + decoder, + ], + ), + returnValue: [], + ) as List); + @override + List readList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readList, + [length], + ), + returnValue: [], + ) as List); + @override + Map readMap([int? length]) => (super.noSuchMethod( + Invocation.method( + #readMap, + [length], + ), + returnValue: {}, + ) as Map); @override _i3.HiveList<_i1.HiveObjectMixin> readHiveList([int? length]) => - (super.noSuchMethod(Invocation.method(#readHiveList, [length]), - returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>()) - as _i3.HiveList<_i1.HiveObjectMixin>); + (super.noSuchMethod( + Invocation.method( + #readHiveList, + [length], + ), + returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( + this, + Invocation.method( + #readHiveList, + [length], + ), + ), + ) as _i3.HiveList<_i1.HiveObjectMixin>); } /// A class which mocks [BinaryWriter]. @@ -131,93 +234,197 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { } @override - void writeByte(int? byte) => - super.noSuchMethod(Invocation.method(#writeByte, [byte]), - returnValueForMissingStub: null); - @override - void writeWord(int? value) => - super.noSuchMethod(Invocation.method(#writeWord, [value]), - returnValueForMissingStub: null); - @override - void writeInt32(int? value) => - super.noSuchMethod(Invocation.method(#writeInt32, [value]), - returnValueForMissingStub: null); - @override - void writeUint32(int? value) => - super.noSuchMethod(Invocation.method(#writeUint32, [value]), - returnValueForMissingStub: null); - @override - void writeInt(int? value) => - super.noSuchMethod(Invocation.method(#writeInt, [value]), - returnValueForMissingStub: null); - @override - void writeDouble(double? value) => - super.noSuchMethod(Invocation.method(#writeDouble, [value]), - returnValueForMissingStub: null); - @override - void writeBool(bool? value) => - super.noSuchMethod(Invocation.method(#writeBool, [value]), - returnValueForMissingStub: null); - @override - void writeString(String? value, - {bool? writeByteCount = true, - _i5.Converter>? encoder = - const _i5.Utf8Encoder()}) => + void writeByte(int? byte) => super.noSuchMethod( + Invocation.method( + #writeByte, + [byte], + ), + returnValueForMissingStub: null, + ); + @override + void writeWord(int? value) => super.noSuchMethod( + Invocation.method( + #writeWord, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeInt32(int? value) => super.noSuchMethod( + Invocation.method( + #writeInt32, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeUint32(int? value) => super.noSuchMethod( + Invocation.method( + #writeUint32, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeInt(int? value) => super.noSuchMethod( + Invocation.method( + #writeInt, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeDouble(double? value) => super.noSuchMethod( + Invocation.method( + #writeDouble, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeBool(bool? value) => super.noSuchMethod( + Invocation.method( + #writeBool, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeString( + String? value, { + bool? writeByteCount = true, + _i5.Converter>? encoder = const _i5.Utf8Encoder(), + }) => super.noSuchMethod( - Invocation.method(#writeString, [value], - {#writeByteCount: writeByteCount, #encoder: encoder}), - returnValueForMissingStub: null); - @override - void writeByteList(List? bytes, {bool? writeLength = true}) => + Invocation.method( + #writeString, + [value], + { + #writeByteCount: writeByteCount, + #encoder: encoder, + }, + ), + returnValueForMissingStub: null, + ); + @override + void writeByteList( + List? bytes, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeByteList, [bytes], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeIntList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeByteList, + [bytes], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeIntList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeIntList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeDoubleList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeIntList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeDoubleList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeDoubleList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeBoolList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeDoubleList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeBoolList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeBoolList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeStringList(List? list, - {bool? writeLength = true, - _i5.Converter>? encoder = - const _i5.Utf8Encoder()}) => + Invocation.method( + #writeBoolList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeStringList( + List? list, { + bool? writeLength = true, + _i5.Converter>? encoder = const _i5.Utf8Encoder(), + }) => super.noSuchMethod( - Invocation.method(#writeStringList, [list], - {#writeLength: writeLength, #encoder: encoder}), - returnValueForMissingStub: null); - @override - void writeList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeStringList, + [list], + { + #writeLength: writeLength, + #encoder: encoder, + }, + ), + returnValueForMissingStub: null, + ); + @override + void writeList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeMap(Map? map, {bool? writeLength = true}) => + Invocation.method( + #writeList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeMap( + Map? map, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeMap, [map], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeHiveList(_i3.HiveList<_i1.HiveObjectMixin>? list, - {bool? writeLength = true}) => + Invocation.method( + #writeMap, + [map], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeHiveList( + _i3.HiveList<_i1.HiveObjectMixin>? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeHiveList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void write(T? value, {bool? writeTypeId = true}) => super.noSuchMethod( - Invocation.method(#write, [value], {#writeTypeId: writeTypeId}), - returnValueForMissingStub: null); + Invocation.method( + #writeHiveList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void write( + T? value, { + bool? writeTypeId = true, + }) => + super.noSuchMethod( + Invocation.method( + #write, + [value], + {#writeTypeId: writeTypeId}, + ), + returnValueForMissingStub: null, + ); } diff --git a/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart b/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart index 30d5c21e48..1a8eb42f80 100644 --- a/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/transactions_model_adapter_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/models/type_adapter_tests/transactions_model_adapter_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:convert' as _i5; import 'dart:typed_data' as _i4; @@ -18,9 +19,18 @@ import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeHiveList_0 extends _i2.Fake - implements _i3.HiveList {} +class _FakeHiveList_0 extends _i2.SmartFake + implements _i3.HiveList { + _FakeHiveList_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [BinaryReader]. /// @@ -31,95 +41,188 @@ class MockBinaryReader extends _i2.Mock implements _i3.BinaryReader { } @override - int get availableBytes => - (super.noSuchMethod(Invocation.getter(#availableBytes), returnValue: 0) - as int); - @override - int get usedBytes => - (super.noSuchMethod(Invocation.getter(#usedBytes), returnValue: 0) - as int); - @override - void skip(int? bytes) => super.noSuchMethod(Invocation.method(#skip, [bytes]), - returnValueForMissingStub: null); - @override - int readByte() => - (super.noSuchMethod(Invocation.method(#readByte, []), returnValue: 0) - as int); - @override - _i4.Uint8List viewBytes(int? bytes) => - (super.noSuchMethod(Invocation.method(#viewBytes, [bytes]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - _i4.Uint8List peekBytes(int? bytes) => - (super.noSuchMethod(Invocation.method(#peekBytes, [bytes]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - int readWord() => - (super.noSuchMethod(Invocation.method(#readWord, []), returnValue: 0) - as int); - @override - int readInt32() => - (super.noSuchMethod(Invocation.method(#readInt32, []), returnValue: 0) - as int); - @override - int readUint32() => - (super.noSuchMethod(Invocation.method(#readUint32, []), returnValue: 0) - as int); - @override - int readInt() => - (super.noSuchMethod(Invocation.method(#readInt, []), returnValue: 0) - as int); - @override - double readDouble() => - (super.noSuchMethod(Invocation.method(#readDouble, []), returnValue: 0.0) - as double); - @override - bool readBool() => - (super.noSuchMethod(Invocation.method(#readBool, []), returnValue: false) - as bool); - @override - String readString( - [int? byteCount, - _i5.Converter, String>? decoder = - const _i5.Utf8Decoder()]) => - (super.noSuchMethod(Invocation.method(#readString, [byteCount, decoder]), - returnValue: '') as String); - @override - _i4.Uint8List readByteList([int? length]) => - (super.noSuchMethod(Invocation.method(#readByteList, [length]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - List readIntList([int? length]) => - (super.noSuchMethod(Invocation.method(#readIntList, [length]), - returnValue: []) as List); - @override - List readDoubleList([int? length]) => - (super.noSuchMethod(Invocation.method(#readDoubleList, [length]), - returnValue: []) as List); - @override - List readBoolList([int? length]) => - (super.noSuchMethod(Invocation.method(#readBoolList, [length]), - returnValue: []) as List); - @override - List readStringList( - [int? length, - _i5.Converter, String>? decoder = - const _i5.Utf8Decoder()]) => - (super.noSuchMethod(Invocation.method(#readStringList, [length, decoder]), - returnValue: []) as List); - @override - List readList([int? length]) => - (super.noSuchMethod(Invocation.method(#readList, [length]), - returnValue: []) as List); - @override - Map readMap([int? length]) => - (super.noSuchMethod(Invocation.method(#readMap, [length]), - returnValue: {}) as Map); + int get availableBytes => (super.noSuchMethod( + Invocation.getter(#availableBytes), + returnValue: 0, + ) as int); + @override + int get usedBytes => (super.noSuchMethod( + Invocation.getter(#usedBytes), + returnValue: 0, + ) as int); + @override + void skip(int? bytes) => super.noSuchMethod( + Invocation.method( + #skip, + [bytes], + ), + returnValueForMissingStub: null, + ); + @override + int readByte() => (super.noSuchMethod( + Invocation.method( + #readByte, + [], + ), + returnValue: 0, + ) as int); + @override + _i4.Uint8List viewBytes(int? bytes) => (super.noSuchMethod( + Invocation.method( + #viewBytes, + [bytes], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + _i4.Uint8List peekBytes(int? bytes) => (super.noSuchMethod( + Invocation.method( + #peekBytes, + [bytes], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + int readWord() => (super.noSuchMethod( + Invocation.method( + #readWord, + [], + ), + returnValue: 0, + ) as int); + @override + int readInt32() => (super.noSuchMethod( + Invocation.method( + #readInt32, + [], + ), + returnValue: 0, + ) as int); + @override + int readUint32() => (super.noSuchMethod( + Invocation.method( + #readUint32, + [], + ), + returnValue: 0, + ) as int); + @override + int readInt() => (super.noSuchMethod( + Invocation.method( + #readInt, + [], + ), + returnValue: 0, + ) as int); + @override + double readDouble() => (super.noSuchMethod( + Invocation.method( + #readDouble, + [], + ), + returnValue: 0.0, + ) as double); + @override + bool readBool() => (super.noSuchMethod( + Invocation.method( + #readBool, + [], + ), + returnValue: false, + ) as bool); + @override + String readString([ + int? byteCount, + _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + ]) => + (super.noSuchMethod( + Invocation.method( + #readString, + [ + byteCount, + decoder, + ], + ), + returnValue: '', + ) as String); + @override + _i4.Uint8List readByteList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readByteList, + [length], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + List readIntList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readIntList, + [length], + ), + returnValue: [], + ) as List); + @override + List readDoubleList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readDoubleList, + [length], + ), + returnValue: [], + ) as List); + @override + List readBoolList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readBoolList, + [length], + ), + returnValue: [], + ) as List); + @override + List readStringList([ + int? length, + _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + ]) => + (super.noSuchMethod( + Invocation.method( + #readStringList, + [ + length, + decoder, + ], + ), + returnValue: [], + ) as List); + @override + List readList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readList, + [length], + ), + returnValue: [], + ) as List); + @override + Map readMap([int? length]) => (super.noSuchMethod( + Invocation.method( + #readMap, + [length], + ), + returnValue: {}, + ) as Map); @override _i3.HiveList<_i1.HiveObjectMixin> readHiveList([int? length]) => - (super.noSuchMethod(Invocation.method(#readHiveList, [length]), - returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>()) - as _i3.HiveList<_i1.HiveObjectMixin>); + (super.noSuchMethod( + Invocation.method( + #readHiveList, + [length], + ), + returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( + this, + Invocation.method( + #readHiveList, + [length], + ), + ), + ) as _i3.HiveList<_i1.HiveObjectMixin>); } /// A class which mocks [BinaryWriter]. @@ -131,93 +234,197 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { } @override - void writeByte(int? byte) => - super.noSuchMethod(Invocation.method(#writeByte, [byte]), - returnValueForMissingStub: null); - @override - void writeWord(int? value) => - super.noSuchMethod(Invocation.method(#writeWord, [value]), - returnValueForMissingStub: null); - @override - void writeInt32(int? value) => - super.noSuchMethod(Invocation.method(#writeInt32, [value]), - returnValueForMissingStub: null); - @override - void writeUint32(int? value) => - super.noSuchMethod(Invocation.method(#writeUint32, [value]), - returnValueForMissingStub: null); - @override - void writeInt(int? value) => - super.noSuchMethod(Invocation.method(#writeInt, [value]), - returnValueForMissingStub: null); - @override - void writeDouble(double? value) => - super.noSuchMethod(Invocation.method(#writeDouble, [value]), - returnValueForMissingStub: null); - @override - void writeBool(bool? value) => - super.noSuchMethod(Invocation.method(#writeBool, [value]), - returnValueForMissingStub: null); - @override - void writeString(String? value, - {bool? writeByteCount = true, - _i5.Converter>? encoder = - const _i5.Utf8Encoder()}) => + void writeByte(int? byte) => super.noSuchMethod( + Invocation.method( + #writeByte, + [byte], + ), + returnValueForMissingStub: null, + ); + @override + void writeWord(int? value) => super.noSuchMethod( + Invocation.method( + #writeWord, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeInt32(int? value) => super.noSuchMethod( + Invocation.method( + #writeInt32, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeUint32(int? value) => super.noSuchMethod( + Invocation.method( + #writeUint32, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeInt(int? value) => super.noSuchMethod( + Invocation.method( + #writeInt, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeDouble(double? value) => super.noSuchMethod( + Invocation.method( + #writeDouble, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeBool(bool? value) => super.noSuchMethod( + Invocation.method( + #writeBool, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeString( + String? value, { + bool? writeByteCount = true, + _i5.Converter>? encoder = const _i5.Utf8Encoder(), + }) => super.noSuchMethod( - Invocation.method(#writeString, [value], - {#writeByteCount: writeByteCount, #encoder: encoder}), - returnValueForMissingStub: null); - @override - void writeByteList(List? bytes, {bool? writeLength = true}) => + Invocation.method( + #writeString, + [value], + { + #writeByteCount: writeByteCount, + #encoder: encoder, + }, + ), + returnValueForMissingStub: null, + ); + @override + void writeByteList( + List? bytes, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeByteList, [bytes], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeIntList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeByteList, + [bytes], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeIntList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeIntList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeDoubleList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeIntList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeDoubleList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeDoubleList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeBoolList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeDoubleList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeBoolList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeBoolList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeStringList(List? list, - {bool? writeLength = true, - _i5.Converter>? encoder = - const _i5.Utf8Encoder()}) => + Invocation.method( + #writeBoolList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeStringList( + List? list, { + bool? writeLength = true, + _i5.Converter>? encoder = const _i5.Utf8Encoder(), + }) => super.noSuchMethod( - Invocation.method(#writeStringList, [list], - {#writeLength: writeLength, #encoder: encoder}), - returnValueForMissingStub: null); - @override - void writeList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeStringList, + [list], + { + #writeLength: writeLength, + #encoder: encoder, + }, + ), + returnValueForMissingStub: null, + ); + @override + void writeList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeMap(Map? map, {bool? writeLength = true}) => + Invocation.method( + #writeList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeMap( + Map? map, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeMap, [map], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeHiveList(_i3.HiveList<_i1.HiveObjectMixin>? list, - {bool? writeLength = true}) => + Invocation.method( + #writeMap, + [map], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeHiveList( + _i3.HiveList<_i1.HiveObjectMixin>? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeHiveList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void write(T? value, {bool? writeTypeId = true}) => super.noSuchMethod( - Invocation.method(#write, [value], {#writeTypeId: writeTypeId}), - returnValueForMissingStub: null); + Invocation.method( + #writeHiveList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void write( + T? value, { + bool? writeTypeId = true, + }) => + super.noSuchMethod( + Invocation.method( + #write, + [value], + {#writeTypeId: writeTypeId}, + ), + returnValueForMissingStub: null, + ); } diff --git a/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart b/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart index 7ca90b489b..af621edf1f 100644 --- a/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart +++ b/test/models/type_adapter_tests/utxo_model_adapter_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/models/type_adapter_tests/utxo_model_adapter_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:convert' as _i5; import 'dart:typed_data' as _i4; @@ -18,9 +19,18 @@ import 'package:mockito/mockito.dart' as _i2; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeHiveList_0 extends _i2.Fake - implements _i3.HiveList {} +class _FakeHiveList_0 extends _i2.SmartFake + implements _i3.HiveList { + _FakeHiveList_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [BinaryReader]. /// @@ -31,95 +41,188 @@ class MockBinaryReader extends _i2.Mock implements _i3.BinaryReader { } @override - int get availableBytes => - (super.noSuchMethod(Invocation.getter(#availableBytes), returnValue: 0) - as int); - @override - int get usedBytes => - (super.noSuchMethod(Invocation.getter(#usedBytes), returnValue: 0) - as int); - @override - void skip(int? bytes) => super.noSuchMethod(Invocation.method(#skip, [bytes]), - returnValueForMissingStub: null); - @override - int readByte() => - (super.noSuchMethod(Invocation.method(#readByte, []), returnValue: 0) - as int); - @override - _i4.Uint8List viewBytes(int? bytes) => - (super.noSuchMethod(Invocation.method(#viewBytes, [bytes]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - _i4.Uint8List peekBytes(int? bytes) => - (super.noSuchMethod(Invocation.method(#peekBytes, [bytes]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - int readWord() => - (super.noSuchMethod(Invocation.method(#readWord, []), returnValue: 0) - as int); - @override - int readInt32() => - (super.noSuchMethod(Invocation.method(#readInt32, []), returnValue: 0) - as int); - @override - int readUint32() => - (super.noSuchMethod(Invocation.method(#readUint32, []), returnValue: 0) - as int); - @override - int readInt() => - (super.noSuchMethod(Invocation.method(#readInt, []), returnValue: 0) - as int); - @override - double readDouble() => - (super.noSuchMethod(Invocation.method(#readDouble, []), returnValue: 0.0) - as double); - @override - bool readBool() => - (super.noSuchMethod(Invocation.method(#readBool, []), returnValue: false) - as bool); - @override - String readString( - [int? byteCount, - _i5.Converter, String>? decoder = - const _i5.Utf8Decoder()]) => - (super.noSuchMethod(Invocation.method(#readString, [byteCount, decoder]), - returnValue: '') as String); - @override - _i4.Uint8List readByteList([int? length]) => - (super.noSuchMethod(Invocation.method(#readByteList, [length]), - returnValue: _i4.Uint8List(0)) as _i4.Uint8List); - @override - List readIntList([int? length]) => - (super.noSuchMethod(Invocation.method(#readIntList, [length]), - returnValue: []) as List); - @override - List readDoubleList([int? length]) => - (super.noSuchMethod(Invocation.method(#readDoubleList, [length]), - returnValue: []) as List); - @override - List readBoolList([int? length]) => - (super.noSuchMethod(Invocation.method(#readBoolList, [length]), - returnValue: []) as List); - @override - List readStringList( - [int? length, - _i5.Converter, String>? decoder = - const _i5.Utf8Decoder()]) => - (super.noSuchMethod(Invocation.method(#readStringList, [length, decoder]), - returnValue: []) as List); - @override - List readList([int? length]) => - (super.noSuchMethod(Invocation.method(#readList, [length]), - returnValue: []) as List); - @override - Map readMap([int? length]) => - (super.noSuchMethod(Invocation.method(#readMap, [length]), - returnValue: {}) as Map); + int get availableBytes => (super.noSuchMethod( + Invocation.getter(#availableBytes), + returnValue: 0, + ) as int); + @override + int get usedBytes => (super.noSuchMethod( + Invocation.getter(#usedBytes), + returnValue: 0, + ) as int); + @override + void skip(int? bytes) => super.noSuchMethod( + Invocation.method( + #skip, + [bytes], + ), + returnValueForMissingStub: null, + ); + @override + int readByte() => (super.noSuchMethod( + Invocation.method( + #readByte, + [], + ), + returnValue: 0, + ) as int); + @override + _i4.Uint8List viewBytes(int? bytes) => (super.noSuchMethod( + Invocation.method( + #viewBytes, + [bytes], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + _i4.Uint8List peekBytes(int? bytes) => (super.noSuchMethod( + Invocation.method( + #peekBytes, + [bytes], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + int readWord() => (super.noSuchMethod( + Invocation.method( + #readWord, + [], + ), + returnValue: 0, + ) as int); + @override + int readInt32() => (super.noSuchMethod( + Invocation.method( + #readInt32, + [], + ), + returnValue: 0, + ) as int); + @override + int readUint32() => (super.noSuchMethod( + Invocation.method( + #readUint32, + [], + ), + returnValue: 0, + ) as int); + @override + int readInt() => (super.noSuchMethod( + Invocation.method( + #readInt, + [], + ), + returnValue: 0, + ) as int); + @override + double readDouble() => (super.noSuchMethod( + Invocation.method( + #readDouble, + [], + ), + returnValue: 0.0, + ) as double); + @override + bool readBool() => (super.noSuchMethod( + Invocation.method( + #readBool, + [], + ), + returnValue: false, + ) as bool); + @override + String readString([ + int? byteCount, + _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + ]) => + (super.noSuchMethod( + Invocation.method( + #readString, + [ + byteCount, + decoder, + ], + ), + returnValue: '', + ) as String); + @override + _i4.Uint8List readByteList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readByteList, + [length], + ), + returnValue: _i4.Uint8List(0), + ) as _i4.Uint8List); + @override + List readIntList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readIntList, + [length], + ), + returnValue: [], + ) as List); + @override + List readDoubleList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readDoubleList, + [length], + ), + returnValue: [], + ) as List); + @override + List readBoolList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readBoolList, + [length], + ), + returnValue: [], + ) as List); + @override + List readStringList([ + int? length, + _i5.Converter, String>? decoder = const _i5.Utf8Decoder(), + ]) => + (super.noSuchMethod( + Invocation.method( + #readStringList, + [ + length, + decoder, + ], + ), + returnValue: [], + ) as List); + @override + List readList([int? length]) => (super.noSuchMethod( + Invocation.method( + #readList, + [length], + ), + returnValue: [], + ) as List); + @override + Map readMap([int? length]) => (super.noSuchMethod( + Invocation.method( + #readMap, + [length], + ), + returnValue: {}, + ) as Map); @override _i3.HiveList<_i1.HiveObjectMixin> readHiveList([int? length]) => - (super.noSuchMethod(Invocation.method(#readHiveList, [length]), - returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>()) - as _i3.HiveList<_i1.HiveObjectMixin>); + (super.noSuchMethod( + Invocation.method( + #readHiveList, + [length], + ), + returnValue: _FakeHiveList_0<_i1.HiveObjectMixin>( + this, + Invocation.method( + #readHiveList, + [length], + ), + ), + ) as _i3.HiveList<_i1.HiveObjectMixin>); } /// A class which mocks [BinaryWriter]. @@ -131,93 +234,197 @@ class MockBinaryWriter extends _i2.Mock implements _i3.BinaryWriter { } @override - void writeByte(int? byte) => - super.noSuchMethod(Invocation.method(#writeByte, [byte]), - returnValueForMissingStub: null); - @override - void writeWord(int? value) => - super.noSuchMethod(Invocation.method(#writeWord, [value]), - returnValueForMissingStub: null); - @override - void writeInt32(int? value) => - super.noSuchMethod(Invocation.method(#writeInt32, [value]), - returnValueForMissingStub: null); - @override - void writeUint32(int? value) => - super.noSuchMethod(Invocation.method(#writeUint32, [value]), - returnValueForMissingStub: null); - @override - void writeInt(int? value) => - super.noSuchMethod(Invocation.method(#writeInt, [value]), - returnValueForMissingStub: null); - @override - void writeDouble(double? value) => - super.noSuchMethod(Invocation.method(#writeDouble, [value]), - returnValueForMissingStub: null); - @override - void writeBool(bool? value) => - super.noSuchMethod(Invocation.method(#writeBool, [value]), - returnValueForMissingStub: null); - @override - void writeString(String? value, - {bool? writeByteCount = true, - _i5.Converter>? encoder = - const _i5.Utf8Encoder()}) => + void writeByte(int? byte) => super.noSuchMethod( + Invocation.method( + #writeByte, + [byte], + ), + returnValueForMissingStub: null, + ); + @override + void writeWord(int? value) => super.noSuchMethod( + Invocation.method( + #writeWord, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeInt32(int? value) => super.noSuchMethod( + Invocation.method( + #writeInt32, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeUint32(int? value) => super.noSuchMethod( + Invocation.method( + #writeUint32, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeInt(int? value) => super.noSuchMethod( + Invocation.method( + #writeInt, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeDouble(double? value) => super.noSuchMethod( + Invocation.method( + #writeDouble, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeBool(bool? value) => super.noSuchMethod( + Invocation.method( + #writeBool, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void writeString( + String? value, { + bool? writeByteCount = true, + _i5.Converter>? encoder = const _i5.Utf8Encoder(), + }) => super.noSuchMethod( - Invocation.method(#writeString, [value], - {#writeByteCount: writeByteCount, #encoder: encoder}), - returnValueForMissingStub: null); - @override - void writeByteList(List? bytes, {bool? writeLength = true}) => + Invocation.method( + #writeString, + [value], + { + #writeByteCount: writeByteCount, + #encoder: encoder, + }, + ), + returnValueForMissingStub: null, + ); + @override + void writeByteList( + List? bytes, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeByteList, [bytes], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeIntList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeByteList, + [bytes], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeIntList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeIntList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeDoubleList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeIntList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeDoubleList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeDoubleList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeBoolList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeDoubleList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeBoolList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeBoolList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeStringList(List? list, - {bool? writeLength = true, - _i5.Converter>? encoder = - const _i5.Utf8Encoder()}) => + Invocation.method( + #writeBoolList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeStringList( + List? list, { + bool? writeLength = true, + _i5.Converter>? encoder = const _i5.Utf8Encoder(), + }) => super.noSuchMethod( - Invocation.method(#writeStringList, [list], - {#writeLength: writeLength, #encoder: encoder}), - returnValueForMissingStub: null); - @override - void writeList(List? list, {bool? writeLength = true}) => + Invocation.method( + #writeStringList, + [list], + { + #writeLength: writeLength, + #encoder: encoder, + }, + ), + returnValueForMissingStub: null, + ); + @override + void writeList( + List? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeMap(Map? map, {bool? writeLength = true}) => + Invocation.method( + #writeList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeMap( + Map? map, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method(#writeMap, [map], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void writeHiveList(_i3.HiveList<_i1.HiveObjectMixin>? list, - {bool? writeLength = true}) => + Invocation.method( + #writeMap, + [map], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void writeHiveList( + _i3.HiveList<_i1.HiveObjectMixin>? list, { + bool? writeLength = true, + }) => super.noSuchMethod( - Invocation.method( - #writeHiveList, [list], {#writeLength: writeLength}), - returnValueForMissingStub: null); - @override - void write(T? value, {bool? writeTypeId = true}) => super.noSuchMethod( - Invocation.method(#write, [value], {#writeTypeId: writeTypeId}), - returnValueForMissingStub: null); + Invocation.method( + #writeHiveList, + [list], + {#writeLength: writeLength}, + ), + returnValueForMissingStub: null, + ); + @override + void write( + T? value, { + bool? writeTypeId = true, + }) => + super.noSuchMethod( + Invocation.method( + #write, + [value], + {#writeTypeId: writeTypeId}, + ), + returnValueForMissingStub: null, + ); } diff --git a/test/price_test.mocks.dart b/test/price_test.mocks.dart index 203673a6a0..3850f3b753 100644 --- a/test/price_test.mocks.dart +++ b/test/price_test.mocks.dart @@ -1,15 +1,13 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/price_test.dart. // Do not manually edit this file. -import 'dart:async' as _i5; -import 'dart:convert' as _i6; -import 'dart:typed_data' as _i7; +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; +import 'dart:convert' as _i4; +import 'dart:typed_data' as _i5; -import 'package:http/src/base_request.dart' as _i8; -import 'package:http/src/client.dart' as _i4; -import 'package:http/src/response.dart' as _i2; -import 'package:http/src/streamed_response.dart' as _i3; +import 'package:http/http.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: type=lint @@ -21,88 +19,245 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeResponse_0 extends _i1.Fake implements _i2.Response {} +class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { + _FakeResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeStreamedResponse_1 extends _i1.Fake implements _i3.StreamedResponse { +class _FakeStreamedResponse_1 extends _i1.SmartFake + implements _i2.StreamedResponse { + _FakeStreamedResponse_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [Client]. /// /// See the documentation for Mockito's code generation for more information. -class MockClient extends _i1.Mock implements _i4.Client { +class MockClient extends _i1.Mock implements _i2.Client { MockClient() { _i1.throwOnMissingStub(this); } @override - _i5.Future<_i2.Response> head(Uri? url, {Map? headers}) => - (super.noSuchMethod(Invocation.method(#head, [url], {#headers: headers}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + _i3.Future<_i2.Response> head( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #head, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #head, + [url], + {#headers: headers}, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> get(Uri? url, {Map? headers}) => - (super.noSuchMethod(Invocation.method(#get, [url], {#headers: headers}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + _i3.Future<_i2.Response> get( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #get, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #get, + [url], + {#headers: headers}, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> post(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> post( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#post, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #post, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #post, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> put(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> put( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#put, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #put, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #put, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> patch(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> patch( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#patch, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #patch, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> delete(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> delete( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#delete, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future read(Uri? url, {Map? headers}) => - (super.noSuchMethod(Invocation.method(#read, [url], {#headers: headers}), - returnValue: Future.value('')) as _i5.Future); + _i3.Future read( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #read, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future.value(''), + ) as _i3.Future); @override - _i5.Future<_i7.Uint8List> readBytes(Uri? url, - {Map? headers}) => + _i3.Future<_i5.Uint8List> readBytes( + Uri? url, { + Map? headers, + }) => (super.noSuchMethod( - Invocation.method(#readBytes, [url], {#headers: headers}), - returnValue: Future<_i7.Uint8List>.value(_i7.Uint8List(0))) - as _i5.Future<_i7.Uint8List>); + Invocation.method( + #readBytes, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i5.Uint8List>.value(_i5.Uint8List(0)), + ) as _i3.Future<_i5.Uint8List>); @override - _i5.Future<_i3.StreamedResponse> send(_i8.BaseRequest? request) => - (super.noSuchMethod(Invocation.method(#send, [request]), - returnValue: - Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_1())) - as _i5.Future<_i3.StreamedResponse>); + _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method( + #send, + [request], + ), + returnValue: + _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( + this, + Invocation.method( + #send, + [request], + ), + )), + ) as _i3.Future<_i2.StreamedResponse>); @override - void close() => super.noSuchMethod(Invocation.method(#close, []), - returnValueForMissingStub: null); + void close() => super.noSuchMethod( + Invocation.method( + #close, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart index 6ebef79719..754121b879 100644 --- a/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/address_book_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/address_book_view/address_book_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i5; @@ -18,8 +19,17 @@ import 'package:stackwallet/services/address_book_service.dart' as _i3; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeContact_0 extends _i1.Fake implements _i2.Contact {} +class _FakeContact_0 extends _i1.SmartFake implements _i2.Contact { + _FakeContact_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [AddressBookService]. /// @@ -27,57 +37,113 @@ class _FakeContact_0 extends _i1.Fake implements _i2.Contact {} class MockAddressBookService extends _i1.Mock implements _i3.AddressBookService { @override - List<_i2.Contact> get contacts => - (super.noSuchMethod(Invocation.getter(#contacts), - returnValue: <_i2.Contact>[]) as List<_i2.Contact>); + List<_i2.Contact> get contacts => (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.Contact>[], + ) as List<_i2.Contact>); @override - _i4.Future> get addressBookEntries => - (super.noSuchMethod(Invocation.getter(#addressBookEntries), - returnValue: Future>.value(<_i2.Contact>[])) - as _i4.Future>); + _i4.Future> get addressBookEntries => (super.noSuchMethod( + Invocation.getter(#addressBookEntries), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override - _i2.Contact getContactById(String? id) => - (super.noSuchMethod(Invocation.method(#getContactById, [id]), - returnValue: _FakeContact_0()) as _i2.Contact); + _i2.Contact getContactById(String? id) => (super.noSuchMethod( + Invocation.method( + #getContactById, + [id], + ), + returnValue: _FakeContact_0( + this, + Invocation.method( + #getContactById, + [id], + ), + ), + ) as _i2.Contact); @override - _i4.Future> search(String? text) => - (super.noSuchMethod(Invocation.method(#search, [text]), - returnValue: Future>.value(<_i2.Contact>[])) - as _i4.Future>); + _i4.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); @override - bool matches(String? term, _i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#matches, [term, contact]), - returnValue: false) as bool); + bool matches( + String? term, + _i2.Contact? contact, + ) => + (super.noSuchMethod( + Invocation.method( + #matches, + [ + term, + contact, + ], + ), + returnValue: false, + ) as bool); @override - _i4.Future addContact(_i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#addContact, [contact]), - returnValue: Future.value(false)) as _i4.Future); + _i4.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + Invocation.method( + #addContact, + [contact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); @override _i4.Future editContact(_i2.Contact? editedContact) => - (super.noSuchMethod(Invocation.method(#editContact, [editedContact]), - returnValue: Future.value(false)) as _i4.Future); + (super.noSuchMethod( + Invocation.method( + #editContact, + [editedContact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); @override - _i4.Future removeContact(String? id) => - (super.noSuchMethod(Invocation.method(#removeContact, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + _i4.Future removeContact(String? id) => (super.noSuchMethod( + Invocation.method( + #removeContact, + [id], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart index c28b76d748..c1f322a085 100644 --- a/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/add_address_book_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; @@ -25,18 +26,69 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i12; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeScanResult_0 extends _i1.Fake implements _i2.ScanResult {} +class _FakeScanResult_0 extends _i1.SmartFake implements _i2.ScanResult { + _FakeScanResult_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeContact_1 extends _i1.Fake implements _i3.Contact {} +class _FakeContact_1 extends _i1.SmartFake implements _i3.Contact { + _FakeContact_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_2 extends _i1.Fake implements _i4.CoinServiceAPI {} +class _FakeCoinServiceAPI_2 extends _i1.SmartFake + implements _i4.CoinServiceAPI { + _FakeCoinServiceAPI_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_3 extends _i1.Fake implements _i5.FeeObject {} +class _FakeFeeObject_3 extends _i1.SmartFake implements _i5.FeeObject { + _FakeFeeObject_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_4 extends _i1.Fake implements _i6.Decimal {} +class _FakeDecimal_4 extends _i1.SmartFake implements _i6.Decimal { + _FakeDecimal_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_5 extends _i1.Fake implements _i5.TransactionData {} +class _FakeTransactionData_5 extends _i1.SmartFake + implements _i5.TransactionData { + _FakeTransactionData_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [BarcodeScannerWrapper]. /// @@ -50,9 +102,21 @@ class MockBarcodeScannerWrapper extends _i1.Mock @override _i8.Future<_i2.ScanResult> scan( {_i2.ScanOptions? options = const _i2.ScanOptions()}) => - (super.noSuchMethod(Invocation.method(#scan, [], {#options: options}), - returnValue: Future<_i2.ScanResult>.value(_FakeScanResult_0())) - as _i8.Future<_i2.ScanResult>); + (super.noSuchMethod( + Invocation.method( + #scan, + [], + {#options: options}, + ), + returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0( + this, + Invocation.method( + #scan, + [], + {#options: options}, + ), + )), + ) as _i8.Future<_i2.ScanResult>); } /// A class which mocks [AddressBookService]. @@ -61,59 +125,115 @@ class MockBarcodeScannerWrapper extends _i1.Mock class MockAddressBookService extends _i1.Mock implements _i9.AddressBookService { @override - List<_i3.Contact> get contacts => - (super.noSuchMethod(Invocation.getter(#contacts), - returnValue: <_i3.Contact>[]) as List<_i3.Contact>); - @override - _i8.Future> get addressBookEntries => - (super.noSuchMethod(Invocation.getter(#addressBookEntries), - returnValue: Future>.value(<_i3.Contact>[])) - as _i8.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i3.Contact getContactById(String? id) => - (super.noSuchMethod(Invocation.method(#getContactById, [id]), - returnValue: _FakeContact_1()) as _i3.Contact); - @override - _i8.Future> search(String? text) => - (super.noSuchMethod(Invocation.method(#search, [text]), - returnValue: Future>.value(<_i3.Contact>[])) - as _i8.Future>); - @override - bool matches(String? term, _i3.Contact? contact) => - (super.noSuchMethod(Invocation.method(#matches, [term, contact]), - returnValue: false) as bool); - @override - _i8.Future addContact(_i3.Contact? contact) => - (super.noSuchMethod(Invocation.method(#addContact, [contact]), - returnValue: Future.value(false)) as _i8.Future); + List<_i3.Contact> get contacts => (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i3.Contact>[], + ) as List<_i3.Contact>); + @override + _i8.Future> get addressBookEntries => (super.noSuchMethod( + Invocation.getter(#addressBookEntries), + returnValue: _i8.Future>.value(<_i3.Contact>[]), + ) as _i8.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i3.Contact getContactById(String? id) => (super.noSuchMethod( + Invocation.method( + #getContactById, + [id], + ), + returnValue: _FakeContact_1( + this, + Invocation.method( + #getContactById, + [id], + ), + ), + ) as _i3.Contact); + @override + _i8.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i8.Future>.value(<_i3.Contact>[]), + ) as _i8.Future>); + @override + bool matches( + String? term, + _i3.Contact? contact, + ) => + (super.noSuchMethod( + Invocation.method( + #matches, + [ + term, + contact, + ], + ), + returnValue: false, + ) as bool); + @override + _i8.Future addContact(_i3.Contact? contact) => (super.noSuchMethod( + Invocation.method( + #addContact, + [contact], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override _i8.Future editContact(_i3.Contact? editedContact) => - (super.noSuchMethod(Invocation.method(#editContact, [editedContact]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future removeContact(String? id) => - (super.noSuchMethod(Invocation.method(#removeContact, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(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); + (super.noSuchMethod( + Invocation.method( + #editContact, + [editedContact], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future removeContact(String? id) => (super.noSuchMethod( + Invocation.method( + #removeContact, + [id], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -121,232 +241,391 @@ class MockAddressBookService extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i11.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i4.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_2()) as _i4.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i12.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i12.Coin.bitcoin) as _i12.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i8.Future<_i5.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i5.FeeObject>.value(_FakeFeeObject_3())) - as _i8.Future<_i5.FeeObject>); - @override - _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future<_i6.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i6.Decimal>.value(_FakeDecimal_4())) - as _i8.Future<_i6.Decimal>); - @override - _i6.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_4()) as _i6.Decimal); - @override - _i8.Future<_i6.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i6.Decimal>.value(_FakeDecimal_4())) - as _i8.Future<_i6.Decimal>); - @override - _i8.Future<_i6.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i6.Decimal>.value(_FakeDecimal_4())) - as _i8.Future<_i6.Decimal>); - @override - _i8.Future<_i6.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i6.Decimal>.value(_FakeDecimal_4())) - as _i8.Future<_i6.Decimal>); - @override - _i6.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_4()) as _i6.Decimal); - @override - _i8.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future<_i5.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i5.TransactionData>.value(_FakeTransactionData_5())) - as _i8.Future<_i5.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i4.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_2( + this, + Invocation.getter(#wallet), + ), + ) as _i4.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i12.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i12.Coin.bitcoin, + ) as _i12.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future<_i5.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i8.Future<_i5.FeeObject>.value(_FakeFeeObject_3( + this, + Invocation.getter(#fees), + )), + ) as _i8.Future<_i5.FeeObject>); + @override + _i8.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future<_i6.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i8.Future<_i6.Decimal>.value(_FakeDecimal_4( + this, + Invocation.getter(#availableBalance), + )), + ) as _i8.Future<_i6.Decimal>); + @override + _i6.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_4( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i6.Decimal); + @override + _i8.Future<_i6.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i8.Future<_i6.Decimal>.value(_FakeDecimal_4( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i8.Future<_i6.Decimal>); + @override + _i8.Future<_i6.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i8.Future<_i6.Decimal>.value(_FakeDecimal_4( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i8.Future<_i6.Decimal>); + @override + _i8.Future<_i6.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i8.Future<_i6.Decimal>.value(_FakeDecimal_4( + this, + Invocation.getter(#totalBalance), + )), + ) as _i8.Future<_i6.Decimal>); + @override + _i6.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_4( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i6.Decimal); + @override + _i8.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future<_i5.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i8.Future<_i5.TransactionData>.value(_FakeTransactionData_5( + this, + Invocation.getter(#transactionData), + )), + ) as _i8.Future<_i5.TransactionData>); @override _i8.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i5.UtxoObject>[])) - as _i8.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i8.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i8.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i8.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i8.Future>.value(<_i5.UtxoObject>[]), + ) as _i8.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i8.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i8.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i8.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + #height: height, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i8.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart index 7829cd299c..d86533c225 100644 --- a/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/address_book_entry_details_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -25,16 +26,59 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeContact_0 extends _i1.Fake implements _i2.Contact {} +class _FakeContact_0 extends _i1.SmartFake implements _i2.Contact { + _FakeContact_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [AddressBookService]. /// @@ -42,59 +86,115 @@ class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} class MockAddressBookService extends _i1.Mock implements _i6.AddressBookService { @override - List<_i2.Contact> get contacts => - (super.noSuchMethod(Invocation.getter(#contacts), - returnValue: <_i2.Contact>[]) as List<_i2.Contact>); - @override - _i7.Future> get addressBookEntries => - (super.noSuchMethod(Invocation.getter(#addressBookEntries), - returnValue: Future>.value(<_i2.Contact>[])) - as _i7.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i2.Contact getContactById(String? id) => - (super.noSuchMethod(Invocation.method(#getContactById, [id]), - returnValue: _FakeContact_0()) as _i2.Contact); - @override - _i7.Future> search(String? text) => - (super.noSuchMethod(Invocation.method(#search, [text]), - returnValue: Future>.value(<_i2.Contact>[])) - as _i7.Future>); - @override - bool matches(String? term, _i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#matches, [term, contact]), - returnValue: false) as bool); - @override - _i7.Future addContact(_i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#addContact, [contact]), - returnValue: Future.value(false)) as _i7.Future); + List<_i2.Contact> get contacts => (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.Contact>[], + ) as List<_i2.Contact>); + @override + _i7.Future> get addressBookEntries => (super.noSuchMethod( + Invocation.getter(#addressBookEntries), + returnValue: _i7.Future>.value(<_i2.Contact>[]), + ) as _i7.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i2.Contact getContactById(String? id) => (super.noSuchMethod( + Invocation.method( + #getContactById, + [id], + ), + returnValue: _FakeContact_0( + this, + Invocation.method( + #getContactById, + [id], + ), + ), + ) as _i2.Contact); + @override + _i7.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i7.Future>.value(<_i2.Contact>[]), + ) as _i7.Future>); + @override + bool matches( + String? term, + _i2.Contact? contact, + ) => + (super.noSuchMethod( + Invocation.method( + #matches, + [ + term, + contact, + ], + ), + returnValue: false, + ) as bool); + @override + _i7.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + Invocation.method( + #addContact, + [contact], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override _i7.Future editContact(_i2.Contact? editedContact) => - (super.noSuchMethod(Invocation.method(#editContact, [editedContact]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future removeContact(String? id) => - (super.noSuchMethod(Invocation.method(#removeContact, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + (super.noSuchMethod( + Invocation.method( + #editContact, + [editedContact], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future removeContact(String? id) => (super.noSuchMethod( + Invocation.method( + #removeContact, + [id], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -102,234 +202,393 @@ class MockAddressBookService extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i10.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i10.Coin.bitcoin) as _i10.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i7.Future<_i4.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i7.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i10.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i10.Coin.bitcoin, + ) as _i10.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i4.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i4.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i4.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -337,57 +596,101 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i11.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i7.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i7.Future>); + Invocation.getter(#notes), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i7.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i7.Future>); - @override - _i7.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [LocaleService]. @@ -395,31 +698,55 @@ class MockNotesService extends _i1.Mock implements _i11.NotesService { /// See the documentation for Mockito's code generation for more information. class MockLocaleService extends _i1.Mock implements _i12.LocaleService { @override - 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 - _i7.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + 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 + _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart index 0aa30d54fa..403d3523f5 100644 --- a/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart +++ b/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/address_book_view/subviews/edit_address_book_entry_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -23,16 +24,59 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeContact_0 extends _i1.Fake implements _i2.Contact {} +class _FakeContact_0 extends _i1.SmartFake implements _i2.Contact { + _FakeContact_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [AddressBookService]. /// @@ -40,59 +84,115 @@ class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} class MockAddressBookService extends _i1.Mock implements _i6.AddressBookService { @override - List<_i2.Contact> get contacts => - (super.noSuchMethod(Invocation.getter(#contacts), - returnValue: <_i2.Contact>[]) as List<_i2.Contact>); - @override - _i7.Future> get addressBookEntries => - (super.noSuchMethod(Invocation.getter(#addressBookEntries), - returnValue: Future>.value(<_i2.Contact>[])) - as _i7.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i2.Contact getContactById(String? id) => - (super.noSuchMethod(Invocation.method(#getContactById, [id]), - returnValue: _FakeContact_0()) as _i2.Contact); - @override - _i7.Future> search(String? text) => - (super.noSuchMethod(Invocation.method(#search, [text]), - returnValue: Future>.value(<_i2.Contact>[])) - as _i7.Future>); - @override - bool matches(String? term, _i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#matches, [term, contact]), - returnValue: false) as bool); - @override - _i7.Future addContact(_i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#addContact, [contact]), - returnValue: Future.value(false)) as _i7.Future); + List<_i2.Contact> get contacts => (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.Contact>[], + ) as List<_i2.Contact>); + @override + _i7.Future> get addressBookEntries => (super.noSuchMethod( + Invocation.getter(#addressBookEntries), + returnValue: _i7.Future>.value(<_i2.Contact>[]), + ) as _i7.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i2.Contact getContactById(String? id) => (super.noSuchMethod( + Invocation.method( + #getContactById, + [id], + ), + returnValue: _FakeContact_0( + this, + Invocation.method( + #getContactById, + [id], + ), + ), + ) as _i2.Contact); + @override + _i7.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i7.Future>.value(<_i2.Contact>[]), + ) as _i7.Future>); + @override + bool matches( + String? term, + _i2.Contact? contact, + ) => + (super.noSuchMethod( + Invocation.method( + #matches, + [ + term, + contact, + ], + ), + returnValue: false, + ) as bool); + @override + _i7.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + Invocation.method( + #addContact, + [contact], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); @override _i7.Future editContact(_i2.Contact? editedContact) => - (super.noSuchMethod(Invocation.method(#editContact, [editedContact]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future removeContact(String? id) => - (super.noSuchMethod(Invocation.method(#removeContact, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + (super.noSuchMethod( + Invocation.method( + #editContact, + [editedContact], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future removeContact(String? id) => (super.noSuchMethod( + Invocation.method( + #removeContact, + [id], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -100,232 +200,391 @@ class MockAddressBookService extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i10.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i10.Coin.bitcoin) as _i10.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i7.Future<_i4.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i7.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i10.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i10.Coin.bitcoin, + ) as _i10.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i4.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i4.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i4.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/exchange/exchange_view_test.mocks.dart b/test/screen_tests/exchange/exchange_view_test.mocks.dart index 73667c366c..1d93023d59 100644 --- a/test/screen_tests/exchange/exchange_view_test.mocks.dart +++ b/test/screen_tests/exchange/exchange_view_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/exchange/exchange_view_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -45,9 +46,18 @@ import 'package:stackwallet/utilities/prefs.dart' as _i3; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeExchangeResponse_0 extends _i1.Fake - implements _i2.ExchangeResponse {} +class _FakeExchangeResponse_0 extends _i1.SmartFake + implements _i2.ExchangeResponse { + _FakeExchangeResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Prefs]. /// @@ -58,194 +68,319 @@ class MockPrefs extends _i1.Mock implements _i3.Prefs { } @override - bool get isInitialized => - (super.noSuchMethod(Invocation.getter(#isInitialized), returnValue: false) - as bool); + bool get isInitialized => (super.noSuchMethod( + Invocation.getter(#isInitialized), + returnValue: false, + ) as bool); @override - int get lastUnlockedTimeout => (super - .noSuchMethod(Invocation.getter(#lastUnlockedTimeout), returnValue: 0) - as int); + int get lastUnlockedTimeout => (super.noSuchMethod( + Invocation.getter(#lastUnlockedTimeout), + returnValue: 0, + ) as int); @override set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( - Invocation.setter(#lastUnlockedTimeout, lastUnlockedTimeout), - returnValueForMissingStub: null); - @override - int get lastUnlocked => - (super.noSuchMethod(Invocation.getter(#lastUnlocked), returnValue: 0) - as int); - @override - set lastUnlocked(int? lastUnlocked) => - super.noSuchMethod(Invocation.setter(#lastUnlocked, lastUnlocked), - returnValueForMissingStub: null); - @override - int get currentNotificationId => - (super.noSuchMethod(Invocation.getter(#currentNotificationId), - returnValue: 0) as int); - @override - List get walletIdsSyncOnStartup => - (super.noSuchMethod(Invocation.getter(#walletIdsSyncOnStartup), - returnValue: []) as List); + Invocation.setter( + #lastUnlockedTimeout, + lastUnlockedTimeout, + ), + returnValueForMissingStub: null, + ); + @override + int get lastUnlocked => (super.noSuchMethod( + Invocation.getter(#lastUnlocked), + returnValue: 0, + ) as int); + @override + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter( + #lastUnlocked, + lastUnlocked, + ), + returnValueForMissingStub: null, + ); + @override + int get currentNotificationId => (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) as int); + @override + List get walletIdsSyncOnStartup => (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) as List); @override set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => super.noSuchMethod( - Invocation.setter(#walletIdsSyncOnStartup, walletIdsSyncOnStartup), - returnValueForMissingStub: null); - @override - _i4.SyncingType get syncType => - (super.noSuchMethod(Invocation.getter(#syncType), - returnValue: _i4.SyncingType.currentWalletOnly) as _i4.SyncingType); - @override - set syncType(_i4.SyncingType? syncType) => - super.noSuchMethod(Invocation.setter(#syncType, syncType), - returnValueForMissingStub: null); - @override - bool get wifiOnly => - (super.noSuchMethod(Invocation.getter(#wifiOnly), returnValue: false) - as bool); - @override - set wifiOnly(bool? wifiOnly) => - super.noSuchMethod(Invocation.setter(#wifiOnly, wifiOnly), - returnValueForMissingStub: null); - @override - bool get externalCalls => - (super.noSuchMethod(Invocation.getter(#externalCalls), returnValue: false) - as bool); - @override - set externalCalls(bool? eCalls) => - super.noSuchMethod(Invocation.setter(#externalCalls, eCalls), - returnValueForMissingStub: null); - @override - bool get showFavoriteWallets => - (super.noSuchMethod(Invocation.getter(#showFavoriteWallets), - returnValue: false) as bool); + Invocation.setter( + #walletIdsSyncOnStartup, + walletIdsSyncOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + _i4.SyncingType get syncType => (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i4.SyncingType.currentWalletOnly, + ) as _i4.SyncingType); + @override + set syncType(_i4.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter( + #syncType, + syncType, + ), + returnValueForMissingStub: null, + ); + @override + bool get wifiOnly => (super.noSuchMethod( + Invocation.getter(#wifiOnly), + returnValue: false, + ) as bool); + @override + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter( + #wifiOnly, + wifiOnly, + ), + returnValueForMissingStub: null, + ); + @override + bool get showFavoriteWallets => (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) as bool); @override set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( - Invocation.setter(#showFavoriteWallets, showFavoriteWallets), - returnValueForMissingStub: null); - @override - String get language => - (super.noSuchMethod(Invocation.getter(#language), returnValue: '') - as String); - @override - set language(String? newLanguage) => - super.noSuchMethod(Invocation.setter(#language, newLanguage), - returnValueForMissingStub: null); - @override - String get currency => - (super.noSuchMethod(Invocation.getter(#currency), returnValue: '') - as String); - @override - set currency(String? newCurrency) => - super.noSuchMethod(Invocation.setter(#currency, newCurrency), - returnValueForMissingStub: null); - @override - _i5.ExchangeRateType get exchangeRateType => - (super.noSuchMethod(Invocation.getter(#exchangeRateType), - returnValue: _i5.ExchangeRateType.estimated) as _i5.ExchangeRateType); + Invocation.setter( + #showFavoriteWallets, + showFavoriteWallets, + ), + returnValueForMissingStub: null, + ); + @override + String get language => (super.noSuchMethod( + Invocation.getter(#language), + returnValue: '', + ) as String); + @override + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter( + #language, + newLanguage, + ), + returnValueForMissingStub: null, + ); + @override + String get currency => (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: '', + ) as String); + @override + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter( + #currency, + newCurrency, + ), + returnValueForMissingStub: null, + ); + @override + _i5.ExchangeRateType get exchangeRateType => (super.noSuchMethod( + Invocation.getter(#exchangeRateType), + returnValue: _i5.ExchangeRateType.estimated, + ) as _i5.ExchangeRateType); @override set exchangeRateType(_i5.ExchangeRateType? exchangeRateType) => - super.noSuchMethod(Invocation.setter(#exchangeRateType, exchangeRateType), - returnValueForMissingStub: null); - @override - bool get useBiometrics => - (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) - as bool); - @override - set useBiometrics(bool? useBiometrics) => - super.noSuchMethod(Invocation.setter(#useBiometrics, useBiometrics), - returnValueForMissingStub: null); - @override - bool get hasPin => - (super.noSuchMethod(Invocation.getter(#hasPin), returnValue: false) - as bool); - @override - set hasPin(bool? hasPin) => - super.noSuchMethod(Invocation.setter(#hasPin, hasPin), - returnValueForMissingStub: null); - @override - bool get showTestNetCoins => - (super.noSuchMethod(Invocation.getter(#showTestNetCoins), - returnValue: false) as bool); - @override - set showTestNetCoins(bool? showTestNetCoins) => - super.noSuchMethod(Invocation.setter(#showTestNetCoins, showTestNetCoins), - returnValueForMissingStub: null); - @override - bool get isAutoBackupEnabled => - (super.noSuchMethod(Invocation.getter(#isAutoBackupEnabled), - returnValue: false) as bool); + super.noSuchMethod( + Invocation.setter( + #exchangeRateType, + exchangeRateType, + ), + returnValueForMissingStub: null, + ); + @override + bool get useBiometrics => (super.noSuchMethod( + Invocation.getter(#useBiometrics), + returnValue: false, + ) as bool); + @override + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter( + #useBiometrics, + useBiometrics, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasPin => (super.noSuchMethod( + Invocation.getter(#hasPin), + returnValue: false, + ) as bool); + @override + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter( + #hasPin, + hasPin, + ), + returnValueForMissingStub: null, + ); + @override + bool get showTestNetCoins => (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) as bool); + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter( + #showTestNetCoins, + showTestNetCoins, + ), + returnValueForMissingStub: null, + ); + @override + bool get isAutoBackupEnabled => (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) as bool); @override set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( - Invocation.setter(#isAutoBackupEnabled, isAutoBackupEnabled), - returnValueForMissingStub: null); + Invocation.setter( + #isAutoBackupEnabled, + isAutoBackupEnabled, + ), + returnValueForMissingStub: null, + ); @override set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( - Invocation.setter(#autoBackupLocation, autoBackupLocation), - returnValueForMissingStub: null); - @override - _i6.BackupFrequencyType get backupFrequencyType => - (super.noSuchMethod(Invocation.getter(#backupFrequencyType), - returnValue: _i6.BackupFrequencyType.everyTenMinutes) - as _i6.BackupFrequencyType); + Invocation.setter( + #autoBackupLocation, + autoBackupLocation, + ), + returnValueForMissingStub: null, + ); + @override + _i6.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i6.BackupFrequencyType.everyTenMinutes, + ) as _i6.BackupFrequencyType); @override set backupFrequencyType(_i6.BackupFrequencyType? backupFrequencyType) => super.noSuchMethod( - Invocation.setter(#backupFrequencyType, backupFrequencyType), - returnValueForMissingStub: null); - @override - set lastAutoBackup(DateTime? lastAutoBackup) => - super.noSuchMethod(Invocation.setter(#lastAutoBackup, lastAutoBackup), - returnValueForMissingStub: null); - @override - bool get hideBlockExplorerWarning => - (super.noSuchMethod(Invocation.getter(#hideBlockExplorerWarning), - returnValue: false) as bool); + Invocation.setter( + #backupFrequencyType, + backupFrequencyType, + ), + returnValueForMissingStub: null, + ); + @override + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter( + #lastAutoBackup, + lastAutoBackup, + ), + returnValueForMissingStub: null, + ); + @override + bool get hideBlockExplorerWarning => (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) as bool); @override set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => super.noSuchMethod( - Invocation.setter( - #hideBlockExplorerWarning, hideBlockExplorerWarning), - returnValueForMissingStub: null); - @override - bool get gotoWalletOnStartup => - (super.noSuchMethod(Invocation.getter(#gotoWalletOnStartup), - returnValue: false) as bool); + Invocation.setter( + #hideBlockExplorerWarning, + hideBlockExplorerWarning, + ), + returnValueForMissingStub: null, + ); + @override + bool get gotoWalletOnStartup => (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) as bool); @override set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( - Invocation.setter(#gotoWalletOnStartup, gotoWalletOnStartup), - returnValueForMissingStub: null); - @override - set startupWalletId(String? startupWalletId) => - super.noSuchMethod(Invocation.setter(#startupWalletId, startupWalletId), - returnValueForMissingStub: null); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future init() => (super.noSuchMethod(Invocation.method(#init, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + Invocation.setter( + #gotoWalletOnStartup, + gotoWalletOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter( + #startupWalletId, + startupWalletId, + ), + returnValueForMissingStub: null, + ); + @override + bool get externalCalls => (super.noSuchMethod( + Invocation.getter(#externalCalls), + returnValue: false, + ) as bool); + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter( + #externalCalls, + externalCalls, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future init() => (super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( - Invocation.method(#incrementCurrentNotificationIndex, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #incrementCurrentNotificationIndex, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [TradesService]. @@ -257,55 +392,115 @@ class MockTradesService extends _i1.Mock implements _i9.TradesService { } @override - List<_i10.Trade> get trades => (super.noSuchMethod(Invocation.getter(#trades), - returnValue: <_i10.Trade>[]) as List<_i10.Trade>); + List<_i10.Trade> get trades => (super.noSuchMethod( + Invocation.getter(#trades), + returnValue: <_i10.Trade>[], + ) as List<_i10.Trade>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override - _i7.Future add({_i10.Trade? trade, bool? shouldNotifyListeners}) => + _i7.Future add({ + required _i10.Trade? trade, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#add, [], - {#trade: trade, #shouldNotifyListeners: shouldNotifyListeners}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future edit({_i10.Trade? trade, bool? shouldNotifyListeners}) => + Invocation.method( + #add, + [], + { + #trade: trade, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future edit({ + required _i10.Trade? trade, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#edit, [], - {#trade: trade, #shouldNotifyListeners: shouldNotifyListeners}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future delete({_i10.Trade? trade, bool? shouldNotifyListeners}) => + Invocation.method( + #edit, + [], + { + #trade: trade, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future delete({ + required _i10.Trade? trade, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#delete, [], - {#trade: trade, #shouldNotifyListeners: shouldNotifyListeners}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteByUuid({String? uuid, bool? shouldNotifyListeners}) => + Invocation.method( + #delete, + [], + { + #trade: trade, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteByUuid({ + required String? uuid, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#deleteByUuid, [], - {#uuid: uuid, #shouldNotifyListeners: shouldNotifyListeners}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #deleteByUuid, + [], + { + #uuid: uuid, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [TradeNotesService]. @@ -317,41 +512,83 @@ class MockTradeNotesService extends _i1.Mock implements _i11.TradeNotesService { } @override - Map get all => (super.noSuchMethod(Invocation.getter(#all), - returnValue: {}) as Map); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - String getNote({String? tradeId}) => - (super.noSuchMethod(Invocation.method(#getNote, [], {#tradeId: tradeId}), - returnValue: '') as String); - @override - _i7.Future set({String? tradeId, String? note}) => (super.noSuchMethod( - Invocation.method(#set, [], {#tradeId: tradeId, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future delete({String? tradeId}) => - (super.noSuchMethod(Invocation.method(#delete, [], {#tradeId: tradeId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Map get all => (super.noSuchMethod( + Invocation.getter(#all), + returnValue: {}, + ) as Map); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + String getNote({required String? tradeId}) => (super.noSuchMethod( + Invocation.method( + #getNote, + [], + {#tradeId: tradeId}, + ), + returnValue: '', + ) as String); + @override + _i7.Future set({ + required String? tradeId, + required String? note, + }) => + (super.noSuchMethod( + Invocation.method( + #set, + [], + { + #tradeId: tradeId, + #note: note, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future delete({required String? tradeId}) => (super.noSuchMethod( + Invocation.method( + #delete, + [], + {#tradeId: tradeId}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [ChangeNowAPI]. @@ -363,207 +600,431 @@ class MockChangeNowAPI extends _i1.Mock implements _i12.ChangeNowAPI { } @override - set client(_i13.Client? _client) => - super.noSuchMethod(Invocation.setter(#client, _client), - returnValueForMissingStub: null); - @override - _i7.Future<_i2.ExchangeResponse>> getAvailableCurrencies( - {bool? fixedRate, bool? active}) => + set client(_i13.Client? _client) => super.noSuchMethod( + Invocation.setter( + #client, + _client, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i2.ExchangeResponse>> getAvailableCurrencies({ + bool? fixedRate, + bool? active, + }) => (super.noSuchMethod( - Invocation.method(#getAvailableCurrencies, [], - {#fixedRate: fixedRate, #active: active}), - returnValue: Future<_i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>())) as _i7 - .Future<_i2.ExchangeResponse>>); - @override - _i7.Future<_i2.ExchangeResponse>> getPairedCurrencies( - {String? ticker, bool? fixedRate}) => + Invocation.method( + #getAvailableCurrencies, + [], + { + #fixedRate: fixedRate, + #active: active, + }, + ), + returnValue: + _i7.Future<_i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( + this, + Invocation.method( + #getAvailableCurrencies, + [], + { + #fixedRate: fixedRate, + #active: active, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse>>); + @override + _i7.Future<_i2.ExchangeResponse>> getPairedCurrencies({ + required String? ticker, + bool? fixedRate, + }) => (super.noSuchMethod( - Invocation.method(#getPairedCurrencies, [], - {#ticker: ticker, #fixedRate: fixedRate}), - returnValue: Future<_i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>())) as _i7 - .Future<_i2.ExchangeResponse>>); - @override - _i7.Future<_i2.ExchangeResponse<_i15.Decimal>> getMinimalExchangeAmount( - {String? fromTicker, String? toTicker, String? apiKey}) => + Invocation.method( + #getPairedCurrencies, + [], + { + #ticker: ticker, + #fixedRate: fixedRate, + }, + ), + returnValue: + _i7.Future<_i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( + this, + Invocation.method( + #getPairedCurrencies, + [], + { + #ticker: ticker, + #fixedRate: fixedRate, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse>>); + @override + _i7.Future<_i2.ExchangeResponse<_i15.Decimal>> getMinimalExchangeAmount({ + required String? fromTicker, + required String? toTicker, + String? apiKey, + }) => (super.noSuchMethod( - Invocation.method(#getMinimalExchangeAmount, [], { - #fromTicker: fromTicker, - #toTicker: toTicker, - #apiKey: apiKey - }), - returnValue: Future<_i2.ExchangeResponse<_i15.Decimal>>.value( - _FakeExchangeResponse_0<_i15.Decimal>())) - as _i7.Future<_i2.ExchangeResponse<_i15.Decimal>>); - @override - _i7.Future<_i2.ExchangeResponse<_i16.Range>> getRange( - {String? fromTicker, - String? toTicker, - bool? isFixedRate, - String? apiKey}) => + Invocation.method( + #getMinimalExchangeAmount, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #apiKey: apiKey, + }, + ), + returnValue: _i7.Future<_i2.ExchangeResponse<_i15.Decimal>>.value( + _FakeExchangeResponse_0<_i15.Decimal>( + this, + Invocation.method( + #getMinimalExchangeAmount, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #apiKey: apiKey, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse<_i15.Decimal>>); + @override + _i7.Future<_i2.ExchangeResponse<_i16.Range>> getRange({ + required String? fromTicker, + required String? toTicker, + required bool? isFixedRate, + String? apiKey, + }) => (super.noSuchMethod( - Invocation.method(#getRange, [], { - #fromTicker: fromTicker, - #toTicker: toTicker, - #isFixedRate: isFixedRate, - #apiKey: apiKey - }), - returnValue: Future<_i2.ExchangeResponse<_i16.Range>>.value( - _FakeExchangeResponse_0<_i16.Range>())) - as _i7.Future<_i2.ExchangeResponse<_i16.Range>>); - @override - _i7.Future<_i2.ExchangeResponse<_i17.Estimate>> getEstimatedExchangeAmount( - {String? fromTicker, - String? toTicker, - _i15.Decimal? fromAmount, - String? apiKey}) => + Invocation.method( + #getRange, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #isFixedRate: isFixedRate, + #apiKey: apiKey, + }, + ), + returnValue: _i7.Future<_i2.ExchangeResponse<_i16.Range>>.value( + _FakeExchangeResponse_0<_i16.Range>( + this, + Invocation.method( + #getRange, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #isFixedRate: isFixedRate, + #apiKey: apiKey, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse<_i16.Range>>); + @override + _i7.Future<_i2.ExchangeResponse<_i17.Estimate>> getEstimatedExchangeAmount({ + required String? fromTicker, + required String? toTicker, + required _i15.Decimal? fromAmount, + String? apiKey, + }) => (super.noSuchMethod( - Invocation.method(#getEstimatedExchangeAmount, [], { - #fromTicker: fromTicker, - #toTicker: toTicker, - #fromAmount: fromAmount, - #apiKey: apiKey - }), - returnValue: Future<_i2.ExchangeResponse<_i17.Estimate>>.value( - _FakeExchangeResponse_0<_i17.Estimate>())) - as _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>); + Invocation.method( + #getEstimatedExchangeAmount, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #fromAmount: fromAmount, + #apiKey: apiKey, + }, + ), + returnValue: _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>.value( + _FakeExchangeResponse_0<_i17.Estimate>( + this, + Invocation.method( + #getEstimatedExchangeAmount, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #fromAmount: fromAmount, + #apiKey: apiKey, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>); @override _i7.Future<_i2.ExchangeResponse<_i17.Estimate>> - getEstimatedExchangeAmountFixedRate( - {String? fromTicker, - String? toTicker, - _i15.Decimal? fromAmount, - bool? reversed, - bool? useRateId = true, - String? apiKey}) => + getEstimatedExchangeAmountFixedRate({ + required String? fromTicker, + required String? toTicker, + required _i15.Decimal? fromAmount, + required bool? reversed, + bool? useRateId = true, + String? apiKey, + }) => (super.noSuchMethod( - Invocation.method(#getEstimatedExchangeAmountFixedRate, [], { + Invocation.method( + #getEstimatedExchangeAmountFixedRate, + [], + { #fromTicker: fromTicker, #toTicker: toTicker, #fromAmount: fromAmount, #reversed: reversed, #useRateId: useRateId, - #apiKey: apiKey - }), - returnValue: Future<_i2.ExchangeResponse<_i17.Estimate>>.value( - _FakeExchangeResponse_0<_i17.Estimate>())) as _i7 - .Future<_i2.ExchangeResponse<_i17.Estimate>>); + #apiKey: apiKey, + }, + ), + returnValue: _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>.value( + _FakeExchangeResponse_0<_i17.Estimate>( + this, + Invocation.method( + #getEstimatedExchangeAmountFixedRate, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #fromAmount: fromAmount, + #reversed: reversed, + #useRateId: useRateId, + #apiKey: apiKey, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse<_i17.Estimate>>); @override _i7.Future<_i2.ExchangeResponse<_i18.CNExchangeEstimate>> - getEstimatedExchangeAmountV2( - {String? fromTicker, - String? toTicker, - _i18.CNEstimateType? fromOrTo, - _i15.Decimal? amount, - String? fromNetwork, - String? toNetwork, - _i18.CNFlowType? flow = _i18.CNFlowType.standard, - String? apiKey}) => + getEstimatedExchangeAmountV2({ + required String? fromTicker, + required String? toTicker, + required _i18.CNEstimateType? fromOrTo, + required _i15.Decimal? amount, + String? fromNetwork, + String? toNetwork, + _i18.CNFlowType? flow = _i18.CNFlowType.standard, + String? apiKey, + }) => (super.noSuchMethod( - Invocation.method(#getEstimatedExchangeAmountV2, [], { - #fromTicker: fromTicker, - #toTicker: toTicker, - #fromOrTo: fromOrTo, - #amount: amount, - #fromNetwork: fromNetwork, - #toNetwork: toNetwork, - #flow: flow, - #apiKey: apiKey - }), - returnValue: Future< - _i2.ExchangeResponse<_i18.CNExchangeEstimate>>.value( - _FakeExchangeResponse_0<_i18.CNExchangeEstimate>())) - as _i7.Future<_i2.ExchangeResponse<_i18.CNExchangeEstimate>>); + Invocation.method( + #getEstimatedExchangeAmountV2, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #fromOrTo: fromOrTo, + #amount: amount, + #fromNetwork: fromNetwork, + #toNetwork: toNetwork, + #flow: flow, + #apiKey: apiKey, + }, + ), + returnValue: + _i7.Future<_i2.ExchangeResponse<_i18.CNExchangeEstimate>>.value( + _FakeExchangeResponse_0<_i18.CNExchangeEstimate>( + this, + Invocation.method( + #getEstimatedExchangeAmountV2, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #fromOrTo: fromOrTo, + #amount: amount, + #fromNetwork: fromNetwork, + #toNetwork: toNetwork, + #flow: flow, + #apiKey: apiKey, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse<_i18.CNExchangeEstimate>>); @override _i7.Future<_i2.ExchangeResponse>> getAvailableFixedRateMarkets({String? apiKey}) => (super.noSuchMethod( - Invocation.method( - #getAvailableFixedRateMarkets, [], {#apiKey: apiKey}), - returnValue: - Future<_i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>())) as _i7 - .Future<_i2.ExchangeResponse>>); + Invocation.method( + #getAvailableFixedRateMarkets, + [], + {#apiKey: apiKey}, + ), + returnValue: _i7.Future< + _i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( + this, + Invocation.method( + #getAvailableFixedRateMarkets, + [], + {#apiKey: apiKey}, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse>>); @override _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>> - createStandardExchangeTransaction( - {String? fromTicker, - String? toTicker, - String? receivingAddress, - _i15.Decimal? amount, - String? extraId = r'', - String? userId = r'', - String? contactEmail = r'', - String? refundAddress = r'', - String? refundExtraId = r'', - String? apiKey}) => + createStandardExchangeTransaction({ + required String? fromTicker, + required String? toTicker, + required String? receivingAddress, + required _i15.Decimal? amount, + String? extraId = r'', + String? userId = r'', + String? contactEmail = r'', + String? refundAddress = r'', + String? refundExtraId = r'', + String? apiKey, + }) => (super.noSuchMethod( - Invocation.method(#createStandardExchangeTransaction, [], { - #fromTicker: fromTicker, - #toTicker: toTicker, - #receivingAddress: receivingAddress, - #amount: amount, - #extraId: extraId, - #userId: userId, - #contactEmail: contactEmail, - #refundAddress: refundAddress, - #refundExtraId: refundExtraId, - #apiKey: apiKey - }), - returnValue: Future< - _i2.ExchangeResponse<_i20.ExchangeTransaction>>.value( - _FakeExchangeResponse_0<_i20.ExchangeTransaction>())) - as _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>>); + Invocation.method( + #createStandardExchangeTransaction, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #receivingAddress: receivingAddress, + #amount: amount, + #extraId: extraId, + #userId: userId, + #contactEmail: contactEmail, + #refundAddress: refundAddress, + #refundExtraId: refundExtraId, + #apiKey: apiKey, + }, + ), + returnValue: _i7.Future< + _i2.ExchangeResponse<_i20.ExchangeTransaction>>.value( + _FakeExchangeResponse_0<_i20.ExchangeTransaction>( + this, + Invocation.method( + #createStandardExchangeTransaction, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #receivingAddress: receivingAddress, + #amount: amount, + #extraId: extraId, + #userId: userId, + #contactEmail: contactEmail, + #refundAddress: refundAddress, + #refundExtraId: refundExtraId, + #apiKey: apiKey, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>>); @override _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>> - createFixedRateExchangeTransaction( - {String? fromTicker, - String? toTicker, - String? receivingAddress, - _i15.Decimal? amount, - String? rateId, - bool? reversed, - String? extraId = r'', - String? userId = r'', - String? contactEmail = r'', - String? refundAddress = r'', - String? refundExtraId = r'', - String? apiKey}) => + createFixedRateExchangeTransaction({ + required String? fromTicker, + required String? toTicker, + required String? receivingAddress, + required _i15.Decimal? amount, + required String? rateId, + required bool? reversed, + String? extraId = r'', + String? userId = r'', + String? contactEmail = r'', + String? refundAddress = r'', + String? refundExtraId = r'', + String? apiKey, + }) => (super.noSuchMethod( - Invocation.method(#createFixedRateExchangeTransaction, [], { - #fromTicker: fromTicker, - #toTicker: toTicker, - #receivingAddress: receivingAddress, - #amount: amount, - #rateId: rateId, - #reversed: reversed, - #extraId: extraId, - #userId: userId, - #contactEmail: contactEmail, - #refundAddress: refundAddress, - #refundExtraId: refundExtraId, - #apiKey: apiKey - }), - returnValue: Future< - _i2.ExchangeResponse<_i20.ExchangeTransaction>>.value( - _FakeExchangeResponse_0<_i20.ExchangeTransaction>())) - as _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>>); + Invocation.method( + #createFixedRateExchangeTransaction, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #receivingAddress: receivingAddress, + #amount: amount, + #rateId: rateId, + #reversed: reversed, + #extraId: extraId, + #userId: userId, + #contactEmail: contactEmail, + #refundAddress: refundAddress, + #refundExtraId: refundExtraId, + #apiKey: apiKey, + }, + ), + returnValue: _i7.Future< + _i2.ExchangeResponse<_i20.ExchangeTransaction>>.value( + _FakeExchangeResponse_0<_i20.ExchangeTransaction>( + this, + Invocation.method( + #createFixedRateExchangeTransaction, + [], + { + #fromTicker: fromTicker, + #toTicker: toTicker, + #receivingAddress: receivingAddress, + #amount: amount, + #rateId: rateId, + #reversed: reversed, + #extraId: extraId, + #userId: userId, + #contactEmail: contactEmail, + #refundAddress: refundAddress, + #refundExtraId: refundExtraId, + #apiKey: apiKey, + }, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse<_i20.ExchangeTransaction>>); @override _i7.Future<_i2.ExchangeResponse<_i21.ExchangeTransactionStatus>> - getTransactionStatus({String? id, String? apiKey}) => (super.noSuchMethod( - Invocation.method( - #getTransactionStatus, [], {#id: id, #apiKey: apiKey}), - returnValue: - Future<_i2.ExchangeResponse<_i21.ExchangeTransactionStatus>>.value( - _FakeExchangeResponse_0<_i21.ExchangeTransactionStatus>())) as _i7 - .Future<_i2.ExchangeResponse<_i21.ExchangeTransactionStatus>>); + getTransactionStatus({ + required String? id, + String? apiKey, + }) => + (super.noSuchMethod( + Invocation.method( + #getTransactionStatus, + [], + { + #id: id, + #apiKey: apiKey, + }, + ), + returnValue: _i7.Future< + _i2.ExchangeResponse<_i21.ExchangeTransactionStatus>>.value( + _FakeExchangeResponse_0<_i21.ExchangeTransactionStatus>( + this, + Invocation.method( + #getTransactionStatus, + [], + { + #id: id, + #apiKey: apiKey, + }, + ), + )), + ) as _i7 + .Future<_i2.ExchangeResponse<_i21.ExchangeTransactionStatus>>); @override _i7.Future<_i2.ExchangeResponse>> getAvailableFloatingRatePairs({bool? includePartners = false}) => (super.noSuchMethod( - Invocation.method(#getAvailableFloatingRatePairs, [], - {#includePartners: includePartners}), - returnValue: Future<_i2.ExchangeResponse>>.value( - _FakeExchangeResponse_0>())) as _i7 - .Future<_i2.ExchangeResponse>>); + Invocation.method( + #getAvailableFloatingRatePairs, + [], + {#includePartners: includePartners}, + ), + returnValue: + _i7.Future<_i2.ExchangeResponse>>.value( + _FakeExchangeResponse_0>( + this, + Invocation.method( + #getAvailableFloatingRatePairs, + [], + {#includePartners: includePartners}, + ), + )), + ) as _i7.Future<_i2.ExchangeResponse>>); } diff --git a/test/screen_tests/lockscreen_view_screen_test.mocks.dart b/test/screen_tests/lockscreen_view_screen_test.mocks.dart index d7d0e193c8..1cd697e050 100644 --- a/test/screen_tests/lockscreen_view_screen_test.mocks.dart +++ b/test/screen_tests/lockscreen_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/lockscreen_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; @@ -26,17 +27,60 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake - implements _i2.FlutterSecureStorageInterface {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake + implements _i2.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -44,120 +88,220 @@ class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override _i7.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i7.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future addExistingStackWallet( - {String? name, - String? walletId, - _i8.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i8.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future addNewWallet( - {String? name, _i8.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future addNewWallet({ + required String? name, + required _i8.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i7.Future); - @override - _i7.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i7.Future); - @override - _i7.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i9.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [NodeService]. @@ -166,103 +310,199 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { class MockNodeService extends _i1.Mock implements _i10.NodeService { @override _i2.FlutterSecureStorageInterface get secureStorageInterface => - (super.noSuchMethod(Invocation.getter(#secureStorageInterface), - returnValue: _FakeFlutterSecureStorageInterface_0()) - as _i2.FlutterSecureStorageInterface); - @override - List<_i11.NodeModel> get primaryNodes => - (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - List<_i11.NodeModel> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateDefaults() => - (super.noSuchMethod(Invocation.method(#updateDefaults, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future setPrimaryNodeFor( - {_i8.Coin? coin, - _i11.NodeModel? node, - bool? shouldNotifyListeners = false}) => (super.noSuchMethod( - Invocation.method(#setPrimaryNodeFor, [], { + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i2.FlutterSecureStorageInterface); + @override + List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + List<_i11.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future setPrimaryNodeFor({ + required _i8.Coin? coin, + required _i11.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { #coin: coin, #node: node, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i11.NodeModel? getPrimaryNodeFor({_i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i11.NodeModel?); - @override - List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => - (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - _i11.NodeModel? getNodeById({String? id}) => - (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i11.NodeModel?); - @override - List<_i11.NodeModel> failoverNodesFor({_i8.Coin? coin}) => (super - .noSuchMethod(Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - _i7.Future add(_i11.NodeModel? node, String? password, - bool? shouldNotifyListeners) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i11.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i11.NodeModel?); + @override + List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + _i11.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i11.NodeModel?); + @override + List<_i11.NodeModel> failoverNodesFor({required _i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#add, [node, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future delete(String? id, bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + _i7.Future add( + _i11.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future setEnabledState( - String? id, bool? enabled, bool? shouldNotifyListeners) => + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, [id, enabled, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future edit(_i11.NodeModel? editedNode, String? password, - bool? shouldNotifyListeners) => + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future edit( + _i11.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #edit, [editedNode, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future updateCommunityNodes() => - (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i9.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -270,232 +510,391 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i12.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i8.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i8.Coin.bitcoin) as _i8.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i7.Future<_i4.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i7.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i8.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i4.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i4.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i4.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart index 5d1ac1f5dc..b2168f4086 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testA_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testA_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i8; @@ -24,14 +25,49 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -39,120 +75,220 @@ class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} class MockWalletsService extends _i1.Mock implements _i5.WalletsService { @override _i6.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i6.Future>.value( + {}), + ) as _i6.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future addExistingStackWallet( - {String? name, - String? walletId, - _i7.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addNewWallet({ + required String? name, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -160,234 +296,393 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i6.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); - @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i7.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i6.Future<_i3.FeeObject>); + @override + _i6.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i6.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i6.Future<_i3.TransactionData>); @override _i6.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i6.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i6.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i6.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i6.Future>.value(<_i3.UtxoObject>[]), + ) as _i6.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i6.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i6.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i6.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + #height: height, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -395,57 +690,101 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i10.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i6.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i6.Future>); + Invocation.getter(#notes), + returnValue: _i6.Future>.value({}), + ) as _i6.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i6.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i6.Future>); - @override - _i6.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [LocaleService]. @@ -453,31 +792,55 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { /// See the documentation for Mockito's code generation for more information. class MockLocaleService extends _i1.Mock implements _i11.LocaleService { @override - 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 - _i6.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + 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 + _i6.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart index c2ac8447a2..fdc326e3cb 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testB_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testB_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i8; @@ -24,14 +25,49 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -39,120 +75,220 @@ class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} class MockWalletsService extends _i1.Mock implements _i5.WalletsService { @override _i6.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i6.Future>.value( + {}), + ) as _i6.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future addExistingStackWallet( - {String? name, - String? walletId, - _i7.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addNewWallet({ + required String? name, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -160,234 +296,393 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i6.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); - @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i7.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i6.Future<_i3.FeeObject>); + @override + _i6.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i6.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i6.Future<_i3.TransactionData>); @override _i6.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i6.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i6.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i6.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i6.Future>.value(<_i3.UtxoObject>[]), + ) as _i6.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i6.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i6.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i6.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + #height: height, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -395,57 +690,101 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i10.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i6.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i6.Future>); + Invocation.getter(#notes), + returnValue: _i6.Future>.value({}), + ) as _i6.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i6.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i6.Future>); - @override - _i6.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [LocaleService]. @@ -453,31 +792,55 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { /// See the documentation for Mockito's code generation for more information. class MockLocaleService extends _i1.Mock implements _i11.LocaleService { @override - 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 - _i6.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + 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 + _i6.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart index 04a0dac531..b3b16f4cbf 100644 --- a/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart +++ b/test/screen_tests/main_view_tests/main_view_screen_testC_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/main_view_tests/main_view_screen_testC_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i8; @@ -24,14 +25,49 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -39,120 +75,220 @@ class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} class MockWalletsService extends _i1.Mock implements _i5.WalletsService { @override _i6.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i6.Future>.value( + {}), + ) as _i6.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future addExistingStackWallet( - {String? name, - String? walletId, - _i7.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addNewWallet({ + required String? name, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -160,234 +296,393 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i6.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); - @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i7.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i6.Future<_i3.FeeObject>); + @override + _i6.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i6.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i6.Future<_i3.TransactionData>); @override _i6.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i6.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i6.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i6.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i6.Future>.value(<_i3.UtxoObject>[]), + ) as _i6.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i6.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i6.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i6.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + #height: height, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -395,57 +690,101 @@ class MockManager extends _i1.Mock implements _i9.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i10.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i6.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i6.Future>); + Invocation.getter(#notes), + returnValue: _i6.Future>.value({}), + ) as _i6.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i6.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i6.Future>); - @override - _i6.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [LocaleService]. @@ -453,31 +792,55 @@ class MockNotesService extends _i1.Mock implements _i10.NotesService { /// See the documentation for Mockito's code generation for more information. class MockLocaleService extends _i1.Mock implements _i11.LocaleService { @override - 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 - _i6.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + 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 + _i6.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart b/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart index 80c9677f19..1e3c575cf1 100644 --- a/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/backup_key_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/onboarding/backup_key_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -21,246 +22,440 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart index c34ced0def..5bb48aaddd 100644 --- a/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/backup_key_warning_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/onboarding/backup_key_warning_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i8; @@ -22,14 +23,49 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -37,120 +73,220 @@ class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} class MockWalletsService extends _i1.Mock implements _i5.WalletsService { @override _i6.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i6.Future>.value( + {}), + ) as _i6.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future addExistingStackWallet( - {String? name, - String? walletId, - _i7.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addNewWallet({ + required String? name, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -158,232 +294,391 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i6.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); - @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i7.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i6.Future<_i3.FeeObject>); + @override + _i6.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i6.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i6.Future<_i3.TransactionData>); @override _i6.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i6.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i6.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i6.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i6.Future>.value(<_i3.UtxoObject>[]), + ) as _i6.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i6.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i6.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i6.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + #height: height, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart index f37383e4bc..62d3c597dc 100644 --- a/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/create_pin_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/onboarding/create_pin_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i9; @@ -26,17 +27,60 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake - implements _i2.FlutterSecureStorageInterface {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake + implements _i2.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -44,120 +88,220 @@ class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} class MockWalletsService extends _i1.Mock implements _i6.WalletsService { @override _i7.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i7.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i7.Future>.value( + {}), + ) as _i7.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future addExistingStackWallet( - {String? name, - String? walletId, - _i8.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i8.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future addNewWallet( - {String? name, _i8.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future addNewWallet({ + required String? name, + required _i8.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i7.Future); - @override - _i7.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i7.Future); - @override - _i7.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i9.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [NodeService]. @@ -166,103 +310,199 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService { class MockNodeService extends _i1.Mock implements _i10.NodeService { @override _i2.FlutterSecureStorageInterface get secureStorageInterface => - (super.noSuchMethod(Invocation.getter(#secureStorageInterface), - returnValue: _FakeFlutterSecureStorageInterface_0()) - as _i2.FlutterSecureStorageInterface); - @override - List<_i11.NodeModel> get primaryNodes => - (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - List<_i11.NodeModel> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateDefaults() => - (super.noSuchMethod(Invocation.method(#updateDefaults, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future setPrimaryNodeFor( - {_i8.Coin? coin, - _i11.NodeModel? node, - bool? shouldNotifyListeners = false}) => (super.noSuchMethod( - Invocation.method(#setPrimaryNodeFor, [], { + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i2.FlutterSecureStorageInterface); + @override + List<_i11.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + List<_i11.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future setPrimaryNodeFor({ + required _i8.Coin? coin, + required _i11.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { #coin: coin, #node: node, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i11.NodeModel? getPrimaryNodeFor({_i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i11.NodeModel?); - @override - List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => - (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - _i11.NodeModel? getNodeById({String? id}) => - (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i11.NodeModel?); - @override - List<_i11.NodeModel> failoverNodesFor({_i8.Coin? coin}) => (super - .noSuchMethod(Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i11.NodeModel>[]) as List<_i11.NodeModel>); - @override - _i7.Future add(_i11.NodeModel? node, String? password, - bool? shouldNotifyListeners) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i11.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i11.NodeModel?); + @override + List<_i11.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + _i11.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i11.NodeModel?); + @override + List<_i11.NodeModel> failoverNodesFor({required _i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#add, [node, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future delete(String? id, bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i11.NodeModel>[], + ) as List<_i11.NodeModel>); + @override + _i7.Future add( + _i11.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future setEnabledState( - String? id, bool? enabled, bool? shouldNotifyListeners) => + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, [id, enabled, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future edit(_i11.NodeModel? editedNode, String? password, - bool? shouldNotifyListeners) => + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future edit( + _i11.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #edit, [editedNode, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future updateCommunityNodes() => - (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i9.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -270,232 +510,391 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i12.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i8.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i8.Coin.bitcoin) as _i8.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i7.Future<_i4.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i7.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i8.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i8.Coin.bitcoin, + ) as _i8.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i4.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i4.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i4.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i9.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i9.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart index 2f6c8afea8..29cdf0642f 100644 --- a/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/name_your_wallet_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/onboarding/name_your_wallet_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i5; @@ -18,6 +19,7 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class /// A class which mocks [WalletsService]. /// @@ -25,118 +27,218 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4; class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i3.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i3.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}), + ) as _i3.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i3.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future addExistingStackWallet( - {String? name, - String? walletId, - _i4.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i4.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future addNewWallet( - {String? name, _i4.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future addNewWallet({ + required String? name, + required _i4.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i3.Future); - @override - _i3.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i3.Future>); - @override - _i3.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i3.Future>.value([]), + ) as _i3.Future>); + @override + _i3.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i3.Future); - @override - _i3.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i3.Future); - @override - _i3.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i3.Future.value(0), + ) as _i3.Future); + @override + _i3.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart index 48de40a421..cf891e8295 100644 --- a/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/restore_wallet_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/onboarding/restore_wallet_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i11; @@ -28,19 +29,70 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeScanResult_0 extends _i1.Fake implements _i2.ScanResult {} +class _FakeScanResult_0 extends _i1.SmartFake implements _i2.ScanResult { + _FakeScanResult_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFlutterSecureStorageInterface_5 extends _i1.Fake - implements _i6.FlutterSecureStorageInterface {} +class _FakeFlutterSecureStorageInterface_5 extends _i1.SmartFake + implements _i6.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [BarcodeScannerWrapper]. /// @@ -54,9 +106,21 @@ class MockBarcodeScannerWrapper extends _i1.Mock @override _i8.Future<_i2.ScanResult> scan( {_i2.ScanOptions? options = const _i2.ScanOptions()}) => - (super.noSuchMethod(Invocation.method(#scan, [], {#options: options}), - returnValue: Future<_i2.ScanResult>.value(_FakeScanResult_0())) - as _i8.Future<_i2.ScanResult>); + (super.noSuchMethod( + Invocation.method( + #scan, + [], + {#options: options}, + ), + returnValue: _i8.Future<_i2.ScanResult>.value(_FakeScanResult_0( + this, + Invocation.method( + #scan, + [], + {#options: options}, + ), + )), + ) as _i8.Future<_i2.ScanResult>); } /// A class which mocks [WalletsService]. @@ -65,120 +129,220 @@ class MockBarcodeScannerWrapper extends _i1.Mock class MockWalletsService extends _i1.Mock implements _i9.WalletsService { @override _i8.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i8.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i8.Future>.value( + {}), + ) as _i8.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future addExistingStackWallet( - {String? name, - String? walletId, - _i10.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i10.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future addNewWallet( - {String? name, _i10.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future addNewWallet({ + required String? name, + required _i10.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i8.Future); - @override - _i8.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i8.Future); - @override - _i8.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void addListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i11.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -186,234 +350,393 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i12.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i10.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i10.Coin.bitcoin) as _i10.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i8.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i8.Future<_i4.FeeObject>); - @override - _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i8.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i10.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i10.Coin.bitcoin, + ) as _i10.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i8.Future<_i4.FeeObject>); + @override + _i8.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i8.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i8.Future<_i4.TransactionData>); @override _i8.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i8.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i8.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i8.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i8.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i8.Future>.value(<_i4.UtxoObject>[]), + ) as _i8.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i8.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i8.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i8.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + #height: height, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i8.Future); - @override - void addListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NodeService]. @@ -422,101 +745,197 @@ class MockManager extends _i1.Mock implements _i12.Manager { class MockNodeService extends _i1.Mock implements _i13.NodeService { @override _i6.FlutterSecureStorageInterface get secureStorageInterface => - (super.noSuchMethod(Invocation.getter(#secureStorageInterface), - returnValue: _FakeFlutterSecureStorageInterface_5()) - as _i6.FlutterSecureStorageInterface); - @override - List<_i14.NodeModel> get primaryNodes => - (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); - @override - List<_i14.NodeModel> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateDefaults() => - (super.noSuchMethod(Invocation.method(#updateDefaults, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future setPrimaryNodeFor( - {_i10.Coin? coin, - _i14.NodeModel? node, - bool? shouldNotifyListeners = false}) => (super.noSuchMethod( - Invocation.method(#setPrimaryNodeFor, [], { + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_5( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i6.FlutterSecureStorageInterface); + @override + List<_i14.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); + @override + List<_i14.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future setPrimaryNodeFor({ + required _i10.Coin? coin, + required _i14.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { #coin: coin, #node: node, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i14.NodeModel? getPrimaryNodeFor({_i10.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i14.NodeModel?); - @override - List<_i14.NodeModel> getNodesFor(_i10.Coin? coin) => - (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); - @override - _i14.NodeModel? getNodeById({String? id}) => - (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i14.NodeModel?); - @override - List<_i14.NodeModel> failoverNodesFor({_i10.Coin? coin}) => (super - .noSuchMethod(Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i14.NodeModel>[]) as List<_i14.NodeModel>); - @override - _i8.Future add(_i14.NodeModel? node, String? password, - bool? shouldNotifyListeners) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i14.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i14.NodeModel?); + @override + List<_i14.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); + @override + _i14.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i14.NodeModel?); + @override + List<_i14.NodeModel> failoverNodesFor({required _i10.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#add, [node, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future delete(String? id, bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i14.NodeModel>[], + ) as List<_i14.NodeModel>); + @override + _i8.Future add( + _i14.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future setEnabledState( - String? id, bool? enabled, bool? shouldNotifyListeners) => + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, [id, enabled, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future edit(_i14.NodeModel? editedNode, String? password, - bool? shouldNotifyListeners) => + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future edit( + _i14.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #edit, [editedNode, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future updateCommunityNodes() => - (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void addListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i11.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart b/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart index e93ed2ce72..7753264802 100644 --- a/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart +++ b/test/screen_tests/onboarding/verify_backup_key_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/onboarding/verify_backup_key_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -21,246 +22,440 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart index b95f2cc229..dc2ff62574 100644 --- a/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/currency_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -21,246 +22,440 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart index 17fb394ac7..d80b978529 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/add_custom_node_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; @@ -25,17 +26,60 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake - implements _i2.FlutterSecureStorageInterface {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake + implements _i2.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [NodeService]. /// @@ -43,103 +87,199 @@ class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} class MockNodeService extends _i1.Mock implements _i6.NodeService { @override _i2.FlutterSecureStorageInterface get secureStorageInterface => - (super.noSuchMethod(Invocation.getter(#secureStorageInterface), - returnValue: _FakeFlutterSecureStorageInterface_0()) - as _i2.FlutterSecureStorageInterface); - @override - List<_i7.NodeModel> get primaryNodes => - (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); - @override - List<_i7.NodeModel> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateDefaults() => - (super.noSuchMethod(Invocation.method(#updateDefaults, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future setPrimaryNodeFor( - {_i9.Coin? coin, - _i7.NodeModel? node, - bool? shouldNotifyListeners = false}) => (super.noSuchMethod( - Invocation.method(#setPrimaryNodeFor, [], { + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i2.FlutterSecureStorageInterface); + @override + List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); + @override + List<_i7.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future setPrimaryNodeFor({ + required _i9.Coin? coin, + required _i7.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { #coin: coin, #node: node, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i7.NodeModel? getPrimaryNodeFor({_i9.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i7.NodeModel?); - @override - List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => - (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); - @override - _i7.NodeModel? getNodeById({String? id}) => - (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i7.NodeModel?); - @override - List<_i7.NodeModel> failoverNodesFor({_i9.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i7.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i7.NodeModel?); + @override + List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); + @override + _i7.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i7.NodeModel?); + @override + List<_i7.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); @override _i8.Future add( - _i7.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i7.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method(#add, [node, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future delete(String? id, bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future setEnabledState( - String? id, bool? enabled, bool? shouldNotifyListeners) => + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, [id, enabled, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future edit(_i7.NodeModel? editedNode, String? password, - bool? shouldNotifyListeners) => + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future edit( + _i7.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #edit, [editedNode, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future updateCommunityNodes() => - (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -147,232 +287,391 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i11.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin) as _i9.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i8.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i8.Future<_i4.FeeObject>); - @override - _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i8.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i9.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i9.Coin.bitcoin, + ) as _i9.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i8.Future<_i4.FeeObject>); + @override + _i8.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i8.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i8.Future<_i4.TransactionData>); @override _i8.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i8.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i8.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i8.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i8.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i8.Future>.value(<_i4.UtxoObject>[]), + ) as _i8.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i8.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i8.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i8.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + #height: height, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i8.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart index 5c08dc466c..89820ee973 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_subviews/node_details_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i10; @@ -25,17 +26,60 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake - implements _i2.FlutterSecureStorageInterface {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake + implements _i2.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [NodeService]. /// @@ -43,103 +87,199 @@ class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} class MockNodeService extends _i1.Mock implements _i6.NodeService { @override _i2.FlutterSecureStorageInterface get secureStorageInterface => - (super.noSuchMethod(Invocation.getter(#secureStorageInterface), - returnValue: _FakeFlutterSecureStorageInterface_0()) - as _i2.FlutterSecureStorageInterface); - @override - List<_i7.NodeModel> get primaryNodes => - (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); - @override - List<_i7.NodeModel> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateDefaults() => - (super.noSuchMethod(Invocation.method(#updateDefaults, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future setPrimaryNodeFor( - {_i9.Coin? coin, - _i7.NodeModel? node, - bool? shouldNotifyListeners = false}) => (super.noSuchMethod( - Invocation.method(#setPrimaryNodeFor, [], { + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i2.FlutterSecureStorageInterface); + @override + List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); + @override + List<_i7.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future setPrimaryNodeFor({ + required _i9.Coin? coin, + required _i7.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { #coin: coin, #node: node, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i7.NodeModel? getPrimaryNodeFor({_i9.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i7.NodeModel?); - @override - List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => - (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); - @override - _i7.NodeModel? getNodeById({String? id}) => - (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i7.NodeModel?); - @override - List<_i7.NodeModel> failoverNodesFor({_i9.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i7.NodeModel>[]) as List<_i7.NodeModel>); + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i7.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i7.NodeModel?); + @override + List<_i7.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); + @override + _i7.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i7.NodeModel?); + @override + List<_i7.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i7.NodeModel>[], + ) as List<_i7.NodeModel>); @override _i8.Future add( - _i7.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i7.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method(#add, [node, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future delete(String? id, bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future setEnabledState( - String? id, bool? enabled, bool? shouldNotifyListeners) => + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, [id, enabled, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future edit(_i7.NodeModel? editedNode, String? password, - bool? shouldNotifyListeners) => + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future edit( + _i7.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #edit, [editedNode, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future updateCommunityNodes() => - (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -147,232 +287,391 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i11.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin) as _i9.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i8.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i8.Future<_i4.FeeObject>); - @override - _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i8.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i9.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i9.Coin.bitcoin, + ) as _i9.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i8.Future<_i4.FeeObject>); + @override + _i8.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i8.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i8.Future<_i4.TransactionData>); @override _i8.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i8.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i8.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i8.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i8.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i8.Future>.value(<_i4.UtxoObject>[]), + ) as _i8.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i8.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i8.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i8.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + #height: height, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i8.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart index 9daa9dec20..7e8ff731e7 100644 --- a/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/network_settings_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:ui' as _i7; @@ -21,9 +22,18 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake - implements _i2.FlutterSecureStorageInterface {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake + implements _i2.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [NodeService]. /// @@ -31,101 +41,197 @@ class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake class MockNodeService extends _i1.Mock implements _i3.NodeService { @override _i2.FlutterSecureStorageInterface get secureStorageInterface => - (super.noSuchMethod(Invocation.getter(#secureStorageInterface), - returnValue: _FakeFlutterSecureStorageInterface_0()) - as _i2.FlutterSecureStorageInterface); - @override - List<_i4.NodeModel> get primaryNodes => - (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); - @override - List<_i4.NodeModel> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i5.Future updateDefaults() => - (super.noSuchMethod(Invocation.method(#updateDefaults, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future setPrimaryNodeFor( - {_i6.Coin? coin, - _i4.NodeModel? node, - bool? shouldNotifyListeners = false}) => (super.noSuchMethod( - Invocation.method(#setPrimaryNodeFor, [], { + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i2.FlutterSecureStorageInterface); + @override + List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); + @override + List<_i4.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i5.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future setPrimaryNodeFor({ + required _i6.Coin? coin, + required _i4.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { #coin: coin, #node: node, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i4.NodeModel? getPrimaryNodeFor({_i6.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i4.NodeModel?); - @override - List<_i4.NodeModel> getNodesFor(_i6.Coin? coin) => - (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); - @override - _i4.NodeModel? getNodeById({String? id}) => - (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i4.NodeModel?); - @override - List<_i4.NodeModel> failoverNodesFor({_i6.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i4.NodeModel? getPrimaryNodeFor({required _i6.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i4.NodeModel?); + @override + List<_i4.NodeModel> getNodesFor(_i6.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); + @override + _i4.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i4.NodeModel?); + @override + List<_i4.NodeModel> failoverNodesFor({required _i6.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); @override _i5.Future add( - _i4.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i4.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method(#add, [node, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override _i5.Future setEnabledState( - String? id, bool? enabled, bool? shouldNotifyListeners) => + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, [id, enabled, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future edit(_i4.NodeModel? editedNode, String? password, - bool? shouldNotifyListeners) => + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future edit( + _i4.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #edit, [editedNode, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future updateCommunityNodes() => - (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - void addListener(_i7.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i7.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart index 10d20aa58f..3241ca931b 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_backup_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -21,246 +22,440 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart index ec8fb1b639..280d08e09a 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/change_pin_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i5; @@ -18,6 +19,7 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class /// A class which mocks [WalletsService]. /// @@ -25,118 +27,218 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4; class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i3.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i3.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}), + ) as _i3.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i3.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future addExistingStackWallet( - {String? name, - String? walletId, - _i4.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i4.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future addNewWallet( - {String? name, _i4.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future addNewWallet({ + required String? name, + required _i4.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i3.Future); - @override - _i3.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i3.Future>); - @override - _i3.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i3.Future>.value([]), + ) as _i3.Future>); + @override + _i3.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i3.Future); - @override - _i3.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i3.Future); - @override - _i3.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i3.Future.value(0), + ) as _i3.Future); + @override + _i3.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart index 8f7ca6279c..12e07fd2f3 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rename_wallet_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'dart:ui' as _i5; @@ -18,6 +19,7 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class /// A class which mocks [WalletsService]. /// @@ -25,118 +27,218 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4; class MockWalletsService extends _i1.Mock implements _i2.WalletsService { @override _i3.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i3.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i3.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i3.Future>.value( + {}), + ) as _i3.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i3.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future addExistingStackWallet( - {String? name, - String? walletId, - _i4.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i4.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future addNewWallet( - {String? name, _i4.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future addNewWallet({ + required String? name, + required _i4.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i3.Future); - @override - _i3.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i3.Future>); - @override - _i3.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i3.Future>.value([]), + ) as _i3.Future>); + @override + _i3.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i3.Future); - @override - _i3.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i3.Future); - @override - _i3.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + @override + _i3.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i3.Future); - @override - _i3.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + _i3.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i3.Future.value(0), + ) as _i3.Future); + @override + _i3.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart index d5760cd45c..67a0b598ba 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/rescan_warning_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -21,246 +22,440 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart index 969da34a15..a036896f1d 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_subviews/wallet_delete_mnemonic_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i8; @@ -22,14 +23,49 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -37,120 +73,220 @@ class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} class MockWalletsService extends _i1.Mock implements _i5.WalletsService { @override _i6.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i6.Future>.value( + {}), + ) as _i6.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future addExistingStackWallet( - {String? name, - String? walletId, - _i7.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addNewWallet({ + required String? name, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -158,232 +294,391 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i6.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); - @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i7.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i6.Future<_i3.FeeObject>); + @override + _i6.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i6.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i6.Future<_i3.TransactionData>); @override _i6.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i6.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i6.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i6.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i6.Future>.value(<_i3.UtxoObject>[]), + ) as _i6.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i6.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i6.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i6.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + #height: height, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart index 336bb7222e..27ae855972 100644 --- a/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_subviews/wallet_settings_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'dart:ui' as _i14; @@ -28,16 +29,59 @@ import 'package:stackwallet/utilities/prefs.dart' as _i2; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakePrefs_0 extends _i1.Fake implements _i2.Prefs {} +class _FakePrefs_0 extends _i1.SmartFake implements _i2.Prefs { + _FakePrefs_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [CachedElectrumX]. /// @@ -48,55 +92,98 @@ class MockCachedElectrumX extends _i1.Mock implements _i6.CachedElectrumX { } @override - String get server => - (super.noSuchMethod(Invocation.getter(#server), returnValue: '') - as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i2.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs), - returnValue: _FakePrefs_0()) as _i2.Prefs); - @override - List<_i7.ElectrumXNode> get failovers => - (super.noSuchMethod(Invocation.getter(#failovers), - returnValue: <_i7.ElectrumXNode>[]) as List<_i7.ElectrumXNode>); - @override - _i8.Future> getAnonymitySet( - {String? groupId, String? blockhash = r'', _i9.Coin? coin}) => + String get server => (super.noSuchMethod( + Invocation.getter(#server), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i2.Prefs get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakePrefs_0( + this, + Invocation.getter(#prefs), + ), + ) as _i2.Prefs); + @override + List<_i7.ElectrumXNode> get failovers => (super.noSuchMethod( + Invocation.getter(#failovers), + returnValue: <_i7.ElectrumXNode>[], + ) as List<_i7.ElectrumXNode>); + @override + _i8.Future> getAnonymitySet({ + required String? groupId, + String? blockhash = r'', + required _i9.Coin? coin, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], - {#groupId: groupId, #blockhash: blockhash, #coin: coin}), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future> getTransaction( - {String? txHash, _i9.Coin? coin, bool? verbose = true}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #coin: coin, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future> getTransaction({ + required String? txHash, + required _i9.Coin? coin, + bool? verbose = true, + }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #coin: coin, #verbose: verbose}), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future> getUsedCoinSerials( - {_i9.Coin? coin, int? startNumber = 0}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #coin: coin, + #verbose: verbose, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future> getUsedCoinSerials({ + required _i9.Coin? coin, + int? startNumber = 0, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#coin: coin, #startNumber: startNumber}), - returnValue: Future>.value([])) - as _i8.Future>); + Invocation.method( + #getUsedCoinSerials, + [], + { + #coin: coin, + #startNumber: startNumber, + }, + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); @override - _i8.Future clearSharedTransactionCache({_i9.Coin? coin}) => + _i8.Future clearSharedTransactionCache({required _i9.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + Invocation.method( + #clearSharedTransactionCache, + [], + {#coin: coin}, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); } /// A class which mocks [LocalAuthentication]. @@ -109,62 +196,88 @@ class MockLocalAuthentication extends _i1.Mock } @override - _i8.Future get canCheckBiometrics => - (super.noSuchMethod(Invocation.getter(#canCheckBiometrics), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future authenticateWithBiometrics( - {String? localizedReason, - bool? useErrorDialogs = true, - bool? stickyAuth = false, - _i11.AndroidAuthMessages? androidAuthStrings = - const _i11.AndroidAuthMessages(), - _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(), - bool? sensitiveTransaction = true}) => + _i8.Future get canCheckBiometrics => (super.noSuchMethod( + Invocation.getter(#canCheckBiometrics), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future authenticateWithBiometrics({ + required String? localizedReason, + bool? useErrorDialogs = true, + bool? stickyAuth = false, + _i11.AndroidAuthMessages? androidAuthStrings = + const _i11.AndroidAuthMessages(), + _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(), + bool? sensitiveTransaction = true, + }) => (super.noSuchMethod( - Invocation.method(#authenticateWithBiometrics, [], { + Invocation.method( + #authenticateWithBiometrics, + [], + { #localizedReason: localizedReason, #useErrorDialogs: useErrorDialogs, #stickyAuth: stickyAuth, #androidAuthStrings: androidAuthStrings, #iOSAuthStrings: iOSAuthStrings, - #sensitiveTransaction: sensitiveTransaction - }), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future authenticate( - {String? localizedReason, - bool? useErrorDialogs = true, - bool? stickyAuth = false, - _i11.AndroidAuthMessages? androidAuthStrings = - const _i11.AndroidAuthMessages(), - _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(), - bool? sensitiveTransaction = true, - bool? biometricOnly = false}) => + #sensitiveTransaction: sensitiveTransaction, + }, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future authenticate({ + required String? localizedReason, + bool? useErrorDialogs = true, + bool? stickyAuth = false, + _i11.AndroidAuthMessages? androidAuthStrings = + const _i11.AndroidAuthMessages(), + _i11.IOSAuthMessages? iOSAuthStrings = const _i11.IOSAuthMessages(), + bool? sensitiveTransaction = true, + bool? biometricOnly = false, + }) => (super.noSuchMethod( - Invocation.method(#authenticate, [], { + Invocation.method( + #authenticate, + [], + { #localizedReason: localizedReason, #useErrorDialogs: useErrorDialogs, #stickyAuth: stickyAuth, #androidAuthStrings: androidAuthStrings, #iOSAuthStrings: iOSAuthStrings, #sensitiveTransaction: sensitiveTransaction, - #biometricOnly: biometricOnly - }), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future stopAuthentication() => - (super.noSuchMethod(Invocation.method(#stopAuthentication, []), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future isDeviceSupported() => - (super.noSuchMethod(Invocation.method(#isDeviceSupported, []), - returnValue: Future.value(false)) as _i8.Future); + #biometricOnly: biometricOnly, + }, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future stopAuthentication() => (super.noSuchMethod( + Invocation.method( + #stopAuthentication, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future isDeviceSupported() => (super.noSuchMethod( + Invocation.method( + #isDeviceSupported, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override _i8.Future> getAvailableBiometrics() => - (super.noSuchMethod(Invocation.method(#getAvailableBiometrics, []), - returnValue: Future>.value( - <_i10.BiometricType>[])) as _i8.Future>); + (super.noSuchMethod( + Invocation.method( + #getAvailableBiometrics, + [], + ), + returnValue: + _i8.Future>.value(<_i10.BiometricType>[]), + ) as _i8.Future>); } /// A class which mocks [Biometrics]. @@ -176,15 +289,23 @@ class MockBiometrics extends _i1.Mock implements _i12.Biometrics { } @override - _i8.Future authenticate( - {String? cancelButtonText, String? localizedReason, String? title}) => + _i8.Future authenticate({ + required String? cancelButtonText, + required String? localizedReason, + required String? title, + }) => (super.noSuchMethod( - Invocation.method(#authenticate, [], { + Invocation.method( + #authenticate, + [], + { #cancelButtonText: cancelButtonText, #localizedReason: localizedReason, - #title: title - }), - returnValue: Future.value(false)) as _i8.Future); + #title: title, + }, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); } /// A class which mocks [WalletsService]. @@ -193,120 +314,220 @@ class MockBiometrics extends _i1.Mock implements _i12.Biometrics { class MockWalletsService extends _i1.Mock implements _i13.WalletsService { @override _i8.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i8.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i8.Future>.value( + {}), + ) as _i8.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future addExistingStackWallet( - {String? name, - String? walletId, - _i9.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i9.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future addNewWallet( - {String? name, _i9.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future addNewWallet({ + required String? name, + required _i9.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i8.Future); - @override - _i8.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i8.Future); - @override - _i8.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void addListener(_i14.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i14.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -314,232 +535,391 @@ class MockWalletsService extends _i1.Mock implements _i13.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i15.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin) as _i9.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i8.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i8.Future<_i4.FeeObject>); - @override - _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i8.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i8.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i8.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i8.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i9.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i9.Coin.bitcoin, + ) as _i9.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i8.Future<_i4.FeeObject>); + @override + _i8.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i8.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i8.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i8.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i8.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i8.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i8.Future<_i4.TransactionData>); @override _i8.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i8.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i8.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i8.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i8.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i8.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i8.Future>.value(<_i4.UtxoObject>[]), + ) as _i8.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i8.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i8.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i8.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + #height: height, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i8.Future); - @override - void addListener(_i14.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i14.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart index f74cec132d..ddfdcc387c 100644 --- a/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart +++ b/test/screen_tests/settings_view/settings_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/settings_view/settings_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'dart:ui' as _i8; @@ -22,14 +23,49 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [WalletsService]. /// @@ -37,120 +73,220 @@ class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} class MockWalletsService extends _i1.Mock implements _i5.WalletsService { @override _i6.Future> get walletNames => - (super.noSuchMethod(Invocation.getter(#walletNames), - returnValue: Future>.value( - {})) - as _i6.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future renameWallet( - {String? from, String? to, bool? shouldNotifyListeners}) => (super.noSuchMethod( - Invocation.method(#renameWallet, [], { + Invocation.getter(#walletNames), + returnValue: _i6.Future>.value( + {}), + ) as _i6.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { #from: from, #to: to, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future addExistingStackWallet( - {String? name, - String? walletId, - _i7.Coin? coin, - bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addExistingStackWallet, [], { + Invocation.method( + #addExistingStackWallet, + [], + { #name: name, #walletId: walletId, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addNewWallet( - {String? name, _i7.Coin? coin, bool? shouldNotifyListeners}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addNewWallet({ + required String? name, + required _i7.Coin? coin, + required bool? shouldNotifyListeners, + }) => (super.noSuchMethod( - Invocation.method(#addNewWallet, [], { + Invocation.method( + #addNewWallet, + [], + { #name: name, #coin: coin, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getFavoriteWalletIds() => - (super.noSuchMethod(Invocation.method(#getFavoriteWalletIds, []), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future saveFavoriteWalletIds(List? walletIds) => (super - .noSuchMethod(Invocation.method(#saveFavoriteWalletIds, [walletIds]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future addFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#addFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future removeFavorite(String? walletId) => - (super.noSuchMethod(Invocation.method(#removeFavorite, [walletId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future moveFavorite({int? fromIndex, int? toIndex}) => + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future saveFavoriteWalletIds(List? walletIds) => (super.noSuchMethod( - Invocation.method( - #moveFavorite, [], {#fromIndex: fromIndex, #toIndex: toIndex}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future checkForDuplicate(String? name) => - (super.noSuchMethod(Invocation.method(#checkForDuplicate, [name]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future getWalletId(String? walletName) => - (super.noSuchMethod(Invocation.method(#getWalletId, [walletName]), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future isMnemonicVerified({String? walletId}) => + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => (super.noSuchMethod( - Invocation.method(#isMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future setMnemonicVerified({String? walletId}) => + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#setMnemonicVerified, [], {#walletId: walletId}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future deleteWallet(String? name, bool? shouldNotifyListeners) => + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future setMnemonicVerified({required String? walletId}) => (super.noSuchMethod( - Invocation.method(#deleteWallet, [name, shouldNotifyListeners]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future refreshWallets(bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#refreshWallets, [shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [Manager]. @@ -158,232 +294,391 @@ class MockWalletsService extends _i1.Mock implements _i5.WalletsService { /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i9.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i7.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i7.Coin.bitcoin) as _i7.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i6.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i6.Future<_i3.FeeObject>); - @override - _i6.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i6.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i6.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i6.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i6.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i7.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i7.Coin.bitcoin, + ) as _i7.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i6.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i6.Future<_i3.FeeObject>); + @override + _i6.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i6.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i6.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i6.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i6.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i6.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i6.Future<_i3.TransactionData>); @override _i6.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i6.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i6.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i6.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i6.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i6.Future>.value(<_i3.UtxoObject>[]), + ) as _i6.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i6.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i6.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i6.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i6.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + #height: height, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i6.Future); - @override - _i6.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + _i6.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i6.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart index 23f82f51db..4d7191c2ca 100644 --- a/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_details_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i5; @@ -20,65 +21,118 @@ import 'package:stackwallet/services/notes_service.dart' as _i3; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeContact_0 extends _i1.Fake implements _i2.Contact {} +class _FakeContact_0 extends _i1.SmartFake implements _i2.Contact { + _FakeContact_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [NotesService]. /// /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i3.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i4.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i4.Future>); + Invocation.getter(#notes), + returnValue: _i4.Future>.value({}), + ) as _i4.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i4.Future>); - @override - _i4.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i4.Future); - @override - _i4.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i4.Future>.value({}), + ) as _i4.Future>); + @override + _i4.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i4.Future.value(''), + ) as _i4.Future); + @override + _i4.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [AddressBookService]. @@ -87,59 +141,115 @@ class MockNotesService extends _i1.Mock implements _i3.NotesService { class MockAddressBookService extends _i1.Mock implements _i6.AddressBookService { @override - List<_i2.Contact> get contacts => - (super.noSuchMethod(Invocation.getter(#contacts), - returnValue: <_i2.Contact>[]) as List<_i2.Contact>); - @override - _i4.Future> get addressBookEntries => - (super.noSuchMethod(Invocation.getter(#addressBookEntries), - returnValue: Future>.value(<_i2.Contact>[])) - as _i4.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i2.Contact getContactById(String? id) => - (super.noSuchMethod(Invocation.method(#getContactById, [id]), - returnValue: _FakeContact_0()) as _i2.Contact); - @override - _i4.Future> search(String? text) => - (super.noSuchMethod(Invocation.method(#search, [text]), - returnValue: Future>.value(<_i2.Contact>[])) - as _i4.Future>); - @override - bool matches(String? term, _i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#matches, [term, contact]), - returnValue: false) as bool); - @override - _i4.Future addContact(_i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#addContact, [contact]), - returnValue: Future.value(false)) as _i4.Future); + List<_i2.Contact> get contacts => (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.Contact>[], + ) as List<_i2.Contact>); + @override + _i4.Future> get addressBookEntries => (super.noSuchMethod( + Invocation.getter(#addressBookEntries), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i2.Contact getContactById(String? id) => (super.noSuchMethod( + Invocation.method( + #getContactById, + [id], + ), + returnValue: _FakeContact_0( + this, + Invocation.method( + #getContactById, + [id], + ), + ), + ) as _i2.Contact); + @override + _i4.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); + @override + bool matches( + String? term, + _i2.Contact? contact, + ) => + (super.noSuchMethod( + Invocation.method( + #matches, + [ + term, + contact, + ], + ), + returnValue: false, + ) as bool); + @override + _i4.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + Invocation.method( + #addContact, + [contact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); @override _i4.Future editContact(_i2.Contact? editedContact) => - (super.noSuchMethod(Invocation.method(#editContact, [editedContact]), - returnValue: Future.value(false)) as _i4.Future); - @override - _i4.Future removeContact(String? id) => - (super.noSuchMethod(Invocation.method(#removeContact, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + (super.noSuchMethod( + Invocation.method( + #editContact, + [editedContact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); + @override + _i4.Future removeContact(String? id) => (super.noSuchMethod( + Invocation.method( + #removeContact, + [id], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [LocaleService]. @@ -147,31 +257,55 @@ class MockAddressBookService extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockLocaleService extends _i1.Mock implements _i7.LocaleService { @override - 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 - _i4.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + 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 + _i4.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart index 337f73285e..fda23c162b 100644 --- a/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_search_results_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -23,248 +24,442 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -272,57 +467,101 @@ class MockManager extends _i1.Mock implements _i5.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i9.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i7.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i7.Future>); + Invocation.getter(#notes), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i7.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i7.Future>); - @override - _i7.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [LocaleService]. @@ -330,31 +569,55 @@ class MockNotesService extends _i1.Mock implements _i9.NotesService { /// See the documentation for Mockito's code generation for more information. class MockLocaleService extends _i1.Mock implements _i10.LocaleService { @override - 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 - _i7.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + 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 + _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart b/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart index f529d30346..86d4ca9611 100644 --- a/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart +++ b/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/transaction_subviews/transaction_search_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:ui' as _i5; @@ -19,8 +20,17 @@ import 'package:stackwallet/services/notes_service.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeContact_0 extends _i1.Fake implements _i2.Contact {} +class _FakeContact_0 extends _i1.SmartFake implements _i2.Contact { + _FakeContact_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [AddressBookService]. /// @@ -28,59 +38,115 @@ class _FakeContact_0 extends _i1.Fake implements _i2.Contact {} class MockAddressBookService extends _i1.Mock implements _i3.AddressBookService { @override - List<_i2.Contact> get contacts => - (super.noSuchMethod(Invocation.getter(#contacts), - returnValue: <_i2.Contact>[]) as List<_i2.Contact>); - @override - _i4.Future> get addressBookEntries => - (super.noSuchMethod(Invocation.getter(#addressBookEntries), - returnValue: Future>.value(<_i2.Contact>[])) - as _i4.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i2.Contact getContactById(String? id) => - (super.noSuchMethod(Invocation.method(#getContactById, [id]), - returnValue: _FakeContact_0()) as _i2.Contact); - @override - _i4.Future> search(String? text) => - (super.noSuchMethod(Invocation.method(#search, [text]), - returnValue: Future>.value(<_i2.Contact>[])) - as _i4.Future>); - @override - bool matches(String? term, _i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#matches, [term, contact]), - returnValue: false) as bool); - @override - _i4.Future addContact(_i2.Contact? contact) => - (super.noSuchMethod(Invocation.method(#addContact, [contact]), - returnValue: Future.value(false)) as _i4.Future); + List<_i2.Contact> get contacts => (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.Contact>[], + ) as List<_i2.Contact>); + @override + _i4.Future> get addressBookEntries => (super.noSuchMethod( + Invocation.getter(#addressBookEntries), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i2.Contact getContactById(String? id) => (super.noSuchMethod( + Invocation.method( + #getContactById, + [id], + ), + returnValue: _FakeContact_0( + this, + Invocation.method( + #getContactById, + [id], + ), + ), + ) as _i2.Contact); + @override + _i4.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); + @override + bool matches( + String? term, + _i2.Contact? contact, + ) => + (super.noSuchMethod( + Invocation.method( + #matches, + [ + term, + contact, + ], + ), + returnValue: false, + ) as bool); + @override + _i4.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + Invocation.method( + #addContact, + [contact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); @override _i4.Future editContact(_i2.Contact? editedContact) => - (super.noSuchMethod(Invocation.method(#editContact, [editedContact]), - returnValue: Future.value(false)) as _i4.Future); - @override - _i4.Future removeContact(String? id) => - (super.noSuchMethod(Invocation.method(#removeContact, [id]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + (super.noSuchMethod( + Invocation.method( + #editContact, + [editedContact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); + @override + _i4.Future removeContact(String? id) => (super.noSuchMethod( + Invocation.method( + #removeContact, + [id], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [NotesService]. @@ -88,55 +154,99 @@ class MockAddressBookService extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i6.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i4.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i4.Future>); + Invocation.getter(#notes), + returnValue: _i4.Future>.value({}), + ) as _i4.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i4.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i4.Future>); - @override - _i4.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i4.Future); - @override - _i4.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i4.Future>.value({}), + ) as _i4.Future>); + @override + _i4.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i4.Future.value(''), + ) as _i4.Future); + @override + _i4.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - _i4.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + _i4.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart index 0fa3baaa5b..108b779019 100644 --- a/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/confirm_send_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/wallet_view/confirm_send_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -22,248 +23,442 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -271,55 +466,99 @@ class MockManager extends _i1.Mock implements _i5.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i9.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i7.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i7.Future>); + Invocation.getter(#notes), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i7.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i7.Future>); - @override - _i7.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart index 745dab4f36..760c1d754c 100644 --- a/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/receive_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/wallet_view/receive_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -21,246 +22,440 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart index 72eb2f7464..dbcc2eef12 100644 --- a/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/send_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/wallet_view/send_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i10; @@ -24,16 +25,59 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeScanResult_0 extends _i1.Fake implements _i2.ScanResult {} +class _FakeScanResult_0 extends _i1.SmartFake implements _i2.ScanResult { + _FakeScanResult_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCoinServiceAPI_1 extends _i1.Fake implements _i3.CoinServiceAPI {} +class _FakeCoinServiceAPI_1 extends _i1.SmartFake + implements _i3.CoinServiceAPI { + _FakeCoinServiceAPI_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_2 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_2 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_3 extends _i1.Fake implements _i5.Decimal {} +class _FakeDecimal_3 extends _i1.SmartFake implements _i5.Decimal { + _FakeDecimal_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_4 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_4 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [BarcodeScannerWrapper]. /// @@ -47,9 +91,21 @@ class MockBarcodeScannerWrapper extends _i1.Mock @override _i7.Future<_i2.ScanResult> scan( {_i2.ScanOptions? options = const _i2.ScanOptions()}) => - (super.noSuchMethod(Invocation.method(#scan, [], {#options: options}), - returnValue: Future<_i2.ScanResult>.value(_FakeScanResult_0())) - as _i7.Future<_i2.ScanResult>); + (super.noSuchMethod( + Invocation.method( + #scan, + [], + {#options: options}, + ), + returnValue: _i7.Future<_i2.ScanResult>.value(_FakeScanResult_0( + this, + Invocation.method( + #scan, + [], + {#options: options}, + ), + )), + ) as _i7.Future<_i2.ScanResult>); } /// A class which mocks [Manager]. @@ -57,234 +113,393 @@ class MockBarcodeScannerWrapper extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i8.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i3.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_1()) as _i3.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin) as _i9.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_2())) - as _i7.Future<_i4.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i5.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future<_i5.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i7.Future<_i5.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i5.Decimal>.value(_FakeDecimal_3())) - as _i7.Future<_i5.Decimal>); - @override - _i5.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_3()) as _i5.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_4())) - as _i7.Future<_i4.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i3.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_1( + this, + Invocation.getter(#wallet), + ), + ) as _i3.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i9.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i9.Coin.bitcoin, + ) as _i9.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i4.FeeObject>.value(_FakeFeeObject_2( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i4.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i5.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future<_i5.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i7.Future<_i5.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i5.Decimal>.value(_FakeDecimal_3( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i5.Decimal>); + @override + _i5.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_3( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i5.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i4.TransactionData>.value(_FakeTransactionData_4( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i4.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i4.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -292,55 +507,99 @@ class MockManager extends _i1.Mock implements _i8.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i11.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i7.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i7.Future>); + Invocation.getter(#notes), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i7.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i7.Future>); - @override - _i7.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i10.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i10.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart index 8cbf518ee8..a75e0d23ca 100644 --- a/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart +++ b/test/screen_tests/wallet_view/wallet_view_screen_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/screen_tests/wallet_view/wallet_view_screen_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'dart:ui' as _i8; @@ -23,248 +24,442 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeCoinServiceAPI_0 extends _i1.SmartFake + implements _i2.CoinServiceAPI { + _FakeCoinServiceAPI_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeFeeObject_1 extends _i1.SmartFake implements _i3.FeeObject { + _FakeFeeObject_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeDecimal_2 extends _i1.SmartFake implements _i4.Decimal { + _FakeDecimal_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeTransactionData_3 extends _i1.SmartFake + implements _i3.TransactionData { + _FakeTransactionData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Manager]. /// /// See the documentation for Mockito's code generation for more information. class MockManager extends _i1.Mock implements _i5.Manager { @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i2.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_0( + this, + Invocation.getter(#wallet), + ), + ) as _i2.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i6.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i6.Coin.bitcoin, + ) as _i6.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future<_i3.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i7.Future<_i3.FeeObject>.value(_FakeFeeObject_1( + this, + Invocation.getter(#fees), + )), + ) as _i7.Future<_i3.FeeObject>); + @override + _i7.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future<_i4.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#availableBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future<_i4.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i7.Future<_i4.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i7.Future<_i4.Decimal>.value(_FakeDecimal_2( + this, + Invocation.getter(#totalBalance), + )), + ) as _i7.Future<_i4.Decimal>); + @override + _i4.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_2( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i4.Decimal); + @override + _i7.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + _i7.Future<_i3.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i7.Future<_i3.TransactionData>.value(_FakeTransactionData_3( + this, + Invocation.getter(#transactionData), + )), + ) as _i7.Future<_i3.TransactionData>); @override _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.getter(#unspentOutputs), + returnValue: _i7.Future>.value(<_i3.UtxoObject>[]), + ) as _i7.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i7.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i7.Future>.value([]), + ) as _i7.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i7.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i7.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future confirmSend({required Map? txData}) => (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i7.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); + #height: height, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); @override _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + _i7.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i7.Future.value(0), + ) as _i7.Future); + @override + _i7.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [NotesService]. @@ -272,57 +467,101 @@ class MockManager extends _i1.Mock implements _i5.Manager { /// See the documentation for Mockito's code generation for more information. class MockNotesService extends _i1.Mock implements _i9.NotesService { @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); @override _i7.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i7.Future>); + Invocation.getter(#notes), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override _i7.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i7.Future>); - @override - _i7.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future editOrAddNote({String? txid, String? note}) => + Invocation.method( + #search, + [text], + ), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); + @override + _i7.Future getNoteFor({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(''), + ) as _i7.Future); + @override + _i7.Future editOrAddNote({ + required String? txid, + required String? note, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + _i7.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } /// A class which mocks [LocaleService]. @@ -330,31 +569,55 @@ class MockNotesService extends _i1.Mock implements _i9.NotesService { /// See the documentation for Mockito's code generation for more information. class MockLocaleService extends _i1.Mock implements _i10.LocaleService { @override - 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 - _i7.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(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); + 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 + _i7.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + @override + void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/services/change_now/change_now_test.mocks.dart b/test/services/change_now/change_now_test.mocks.dart index 355c1904a0..808b276711 100644 --- a/test/services/change_now/change_now_test.mocks.dart +++ b/test/services/change_now/change_now_test.mocks.dart @@ -1,15 +1,13 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/change_now/change_now_test.dart. // Do not manually edit this file. -import 'dart:async' as _i5; -import 'dart:convert' as _i6; -import 'dart:typed_data' as _i7; +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; +import 'dart:convert' as _i4; +import 'dart:typed_data' as _i5; -import 'package:http/src/base_request.dart' as _i8; -import 'package:http/src/client.dart' as _i4; -import 'package:http/src/response.dart' as _i2; -import 'package:http/src/streamed_response.dart' as _i3; +import 'package:http/http.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: type=lint @@ -21,88 +19,245 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeResponse_0 extends _i1.Fake implements _i2.Response {} +class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { + _FakeResponse_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeStreamedResponse_1 extends _i1.Fake implements _i3.StreamedResponse { +class _FakeStreamedResponse_1 extends _i1.SmartFake + implements _i2.StreamedResponse { + _FakeStreamedResponse_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [Client]. /// /// See the documentation for Mockito's code generation for more information. -class MockClient extends _i1.Mock implements _i4.Client { +class MockClient extends _i1.Mock implements _i2.Client { MockClient() { _i1.throwOnMissingStub(this); } @override - _i5.Future<_i2.Response> head(Uri? url, {Map? headers}) => - (super.noSuchMethod(Invocation.method(#head, [url], {#headers: headers}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + _i3.Future<_i2.Response> head( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #head, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #head, + [url], + {#headers: headers}, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> get(Uri? url, {Map? headers}) => - (super.noSuchMethod(Invocation.method(#get, [url], {#headers: headers}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + _i3.Future<_i2.Response> get( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #get, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #get, + [url], + {#headers: headers}, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> post(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> post( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#post, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #post, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #post, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> put(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> put( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#put, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #put, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #put, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> patch(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> patch( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#patch, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #patch, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future<_i2.Response> delete(Uri? url, - {Map? headers, - Object? body, - _i6.Encoding? encoding}) => + _i3.Future<_i2.Response> delete( + Uri? url, { + Map? headers, + Object? body, + _i4.Encoding? encoding, + }) => (super.noSuchMethod( - Invocation.method(#delete, [url], - {#headers: headers, #body: body, #encoding: encoding}), - returnValue: Future<_i2.Response>.value(_FakeResponse_0())) - as _i5.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + { + #headers: headers, + #body: body, + #encoding: encoding, + }, + ), + )), + ) as _i3.Future<_i2.Response>); @override - _i5.Future read(Uri? url, {Map? headers}) => - (super.noSuchMethod(Invocation.method(#read, [url], {#headers: headers}), - returnValue: Future.value('')) as _i5.Future); + _i3.Future read( + Uri? url, { + Map? headers, + }) => + (super.noSuchMethod( + Invocation.method( + #read, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future.value(''), + ) as _i3.Future); @override - _i5.Future<_i7.Uint8List> readBytes(Uri? url, - {Map? headers}) => + _i3.Future<_i5.Uint8List> readBytes( + Uri? url, { + Map? headers, + }) => (super.noSuchMethod( - Invocation.method(#readBytes, [url], {#headers: headers}), - returnValue: Future<_i7.Uint8List>.value(_i7.Uint8List(0))) - as _i5.Future<_i7.Uint8List>); + Invocation.method( + #readBytes, + [url], + {#headers: headers}, + ), + returnValue: _i3.Future<_i5.Uint8List>.value(_i5.Uint8List(0)), + ) as _i3.Future<_i5.Uint8List>); @override - _i5.Future<_i3.StreamedResponse> send(_i8.BaseRequest? request) => - (super.noSuchMethod(Invocation.method(#send, [request]), - returnValue: - Future<_i3.StreamedResponse>.value(_FakeStreamedResponse_1())) - as _i5.Future<_i3.StreamedResponse>); + _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => + (super.noSuchMethod( + Invocation.method( + #send, + [request], + ), + returnValue: + _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( + this, + Invocation.method( + #send, + [request], + ), + )), + ) as _i3.Future<_i2.StreamedResponse>); @override - void close() => super.noSuchMethod(Invocation.method(#close, []), - returnValueForMissingStub: null); + void close() => super.noSuchMethod( + Invocation.method( + #close, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart index 0db5a384d4..99e2e6231b 100644 --- a/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart +++ b/test/services/coins/bitcoin/bitcoin_wallet_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/coins/bitcoin/bitcoin_wallet_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'package:decimal/decimal.dart' as _i2; @@ -25,12 +26,37 @@ import 'package:tuple/tuple.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {} +class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakePrefs_1 extends _i1.Fake implements _i3.Prefs {} +class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { + _FakePrefs_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_2 extends _i1.Fake implements _i4.Client {} +class _FakeClient_2 extends _i1.SmartFake implements _i4.Client { + _FakeClient_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ElectrumX]. /// @@ -41,187 +67,346 @@ class MockElectrumX extends _i1.Mock implements _i5.ElectrumX { } @override - set failovers(List<_i5.ElectrumXNode>? _failovers) => - super.noSuchMethod(Invocation.setter(#failovers, _failovers), - returnValueForMissingStub: null); + set failovers(List<_i5.ElectrumXNode>? _failovers) => super.noSuchMethod( + Invocation.setter( + #failovers, + _failovers, + ), + returnValueForMissingStub: null, + ); @override - int get currentFailoverIndex => - (super.noSuchMethod(Invocation.getter(#currentFailoverIndex), - returnValue: 0) as int); + int get currentFailoverIndex => (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) as int); @override set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter(#currentFailoverIndex, _currentFailoverIndex), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i6.Future request( - {String? command, - List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), - String? requestID, - int? retries = 2}) => + Invocation.setter( + #currentFailoverIndex, + _currentFailoverIndex, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i6.Future request({ + required String? command, + List? args = const [], + Duration? connectionTimeout = const Duration(seconds: 60), + String? requestID, + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#request, [], { + Invocation.method( + #request, + [], + { #command: command, #args: args, #connectionTimeout: connectionTimeout, #requestID: requestID, - #retries: retries - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future>> batchRequest( - {String? command, - Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), - int? retries = 2}) => + #retries: retries, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future>> batchRequest({ + required String? command, + required Map>? args, + Duration? connectionTimeout = const Duration(seconds: 60), + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #connectionTimeout: connectionTimeout, - #retries: retries - }), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); - @override - _i6.Future ping({String? requestID, int? retryCount = 1}) => + Invocation.method( + #batchRequest, + [], + { + #command: command, + #args: args, + #connectionTimeout: connectionTimeout, + #retries: retries, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); + @override + _i6.Future ping({ + String? requestID, + int? retryCount = 1, + }) => (super.noSuchMethod( - Invocation.method( - #ping, [], {#requestID: requestID, #retryCount: retryCount}), - returnValue: Future.value(false)) as _i6.Future); + Invocation.method( + #ping, + [], + { + #requestID: requestID, + #retryCount: retryCount, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); @override _i6.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getBlockHeadTip, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future broadcastTransaction({String? rawTx, String? requestID}) => + Invocation.method( + #getServerFeatures, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future broadcastTransaction({ + required String? rawTx, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], - {#rawTx: rawTx, #requestID: requestID}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future> getBalance( - {String? scripthash, String? requestID}) => + Invocation.method( + #broadcastTransaction, + [], + { + #rawTx: rawTx, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future> getBalance({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future>> getHistory( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBalance, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future>> getHistory({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); + Invocation.method( + #getHistory, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchHistory( - {Map>? args}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future>> getUTXOs( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBatchHistory, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future>> getUTXOs({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) as _i6 - .Future>>); + Invocation.method( + #getUTXOs, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchUTXOs( - {Map>? args}) => - (super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future> getTransaction( - {String? txHash, bool? verbose = true, String? requestID}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #verbose: verbose, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getAnonymitySet( - {String? groupId = r'1', - String? blockhash = r'', - String? requestID}) => + Invocation.method( + #getBatchUTXOs, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future> getTransaction({ + required String? txHash, + bool? verbose = true, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future getMintData({dynamic mints, String? requestID}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getAnonymitySet({ + String? groupId = r'1', + String? blockhash = r'', + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getMintData, [], {#mints: mints, #requestID: requestID}), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getUsedCoinSerials( - {String? requestID, int? startNumber}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getMintData({ + dynamic mints, + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getMintData, + [], + { + #mints: mints, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getUsedCoinSerials({ + String? requestID, + required int? startNumber, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#requestID: requestID, #startNumber: startNumber}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getUsedCoinSerials, + [], + { + #requestID: requestID, + #startNumber: startNumber, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLatestCoinId, [], {#requestID: requestID}), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future> getFeeRate({String? requestID}) => (super - .noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) => + Invocation.method( + #getLatestCoinId, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #estimateFee, [], {#requestID: requestID, #blocks: blocks}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #getFeeRate, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future<_i2.Decimal> estimateFee({ + String? requestID, + required int? blocks, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + )), + ) as _i6.Future<_i2.Decimal>); @override _i6.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + )), + ) as _i6.Future<_i2.Decimal>); } /// A class which mocks [CachedElectrumX]. @@ -233,55 +418,98 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX { } @override - String get server => - (super.noSuchMethod(Invocation.getter(#server), returnValue: '') - as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i3.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs), - returnValue: _FakePrefs_1()) as _i3.Prefs); - @override - List<_i5.ElectrumXNode> get failovers => - (super.noSuchMethod(Invocation.getter(#failovers), - returnValue: <_i5.ElectrumXNode>[]) as List<_i5.ElectrumXNode>); - @override - _i6.Future> getAnonymitySet( - {String? groupId, String? blockhash = r'', _i8.Coin? coin}) => + String get server => (super.noSuchMethod( + Invocation.getter(#server), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i3.Prefs get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakePrefs_1( + this, + Invocation.getter(#prefs), + ), + ) as _i3.Prefs); + @override + List<_i5.ElectrumXNode> get failovers => (super.noSuchMethod( + Invocation.getter(#failovers), + returnValue: <_i5.ElectrumXNode>[], + ) as List<_i5.ElectrumXNode>); + @override + _i6.Future> getAnonymitySet({ + required String? groupId, + String? blockhash = r'', + required _i8.Coin? coin, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], - {#groupId: groupId, #blockhash: blockhash, #coin: coin}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getTransaction( - {String? txHash, _i8.Coin? coin, bool? verbose = true}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #coin: coin, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getTransaction({ + required String? txHash, + required _i8.Coin? coin, + bool? verbose = true, + }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #coin: coin, #verbose: verbose}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getUsedCoinSerials( - {_i8.Coin? coin, int? startNumber = 0}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #coin: coin, + #verbose: verbose, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getUsedCoinSerials({ + required _i8.Coin? coin, + int? startNumber = 0, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#coin: coin, #startNumber: startNumber}), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future clearSharedTransactionCache({_i8.Coin? coin}) => + Invocation.method( + #getUsedCoinSerials, + [], + { + #coin: coin, + #startNumber: startNumber, + }, + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future clearSharedTransactionCache({required _i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + Invocation.method( + #clearSharedTransactionCache, + [], + {#coin: coin}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [PriceAPI]. @@ -293,21 +521,35 @@ class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI { } @override - _i4.Client get client => (super.noSuchMethod(Invocation.getter(#client), - returnValue: _FakeClient_2()) as _i4.Client); + _i4.Client get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeClient_2( + this, + Invocation.getter(#client), + ), + ) as _i4.Client); @override void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod( - Invocation.method(#resetLastCalledToForceNextCallToUpdateCache, []), - returnValueForMissingStub: null); - @override - _i6.Future>> - getPricesAnd24hChange({String? baseCurrency}) => (super.noSuchMethod( - Invocation.method( - #getPricesAnd24hChange, [], {#baseCurrency: baseCurrency}), - returnValue: - Future>>.value( - <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{})) - as _i6.Future>>); + Invocation.method( + #resetLastCalledToForceNextCallToUpdateCache, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future< + Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>> getPricesAnd24hChange( + {required String? baseCurrency}) => + (super.noSuchMethod( + Invocation.method( + #getPricesAnd24hChange, + [], + {#baseCurrency: baseCurrency}, + ), + returnValue: + _i6.Future>>.value( + <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{}), + ) as _i6.Future>>); } /// A class which mocks [TransactionNotificationTracker]. @@ -320,33 +562,52 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - List get pendings => - (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) - as List); - @override - List get confirmeds => (super - .noSuchMethod(Invocation.getter(#confirmeds), returnValue: []) - as List); - @override - bool wasNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedPending, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool wasNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + List get pendings => (super.noSuchMethod( + Invocation.getter(#pendings), + returnValue: [], + ) as List); + @override + List get confirmeds => (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) as List); + @override + bool wasNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedPending, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedPending, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedConfirmed, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedConfirmed, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } diff --git a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart index f24f8be4c0..a5a2018e7e 100644 --- a/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart +++ b/test/services/coins/bitcoincash/bitcoincash_wallet_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'package:decimal/decimal.dart' as _i2; @@ -25,12 +26,37 @@ import 'package:tuple/tuple.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {} +class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakePrefs_1 extends _i1.Fake implements _i3.Prefs {} +class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { + _FakePrefs_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_2 extends _i1.Fake implements _i4.Client {} +class _FakeClient_2 extends _i1.SmartFake implements _i4.Client { + _FakeClient_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ElectrumX]. /// @@ -41,187 +67,346 @@ class MockElectrumX extends _i1.Mock implements _i5.ElectrumX { } @override - set failovers(List<_i5.ElectrumXNode>? _failovers) => - super.noSuchMethod(Invocation.setter(#failovers, _failovers), - returnValueForMissingStub: null); + set failovers(List<_i5.ElectrumXNode>? _failovers) => super.noSuchMethod( + Invocation.setter( + #failovers, + _failovers, + ), + returnValueForMissingStub: null, + ); @override - int get currentFailoverIndex => - (super.noSuchMethod(Invocation.getter(#currentFailoverIndex), - returnValue: 0) as int); + int get currentFailoverIndex => (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) as int); @override set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter(#currentFailoverIndex, _currentFailoverIndex), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i6.Future request( - {String? command, - List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), - String? requestID, - int? retries = 2}) => + Invocation.setter( + #currentFailoverIndex, + _currentFailoverIndex, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i6.Future request({ + required String? command, + List? args = const [], + Duration? connectionTimeout = const Duration(seconds: 60), + String? requestID, + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#request, [], { + Invocation.method( + #request, + [], + { #command: command, #args: args, #connectionTimeout: connectionTimeout, #requestID: requestID, - #retries: retries - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future>> batchRequest( - {String? command, - Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), - int? retries = 2}) => + #retries: retries, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future>> batchRequest({ + required String? command, + required Map>? args, + Duration? connectionTimeout = const Duration(seconds: 60), + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #connectionTimeout: connectionTimeout, - #retries: retries - }), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); - @override - _i6.Future ping({String? requestID, int? retryCount = 1}) => + Invocation.method( + #batchRequest, + [], + { + #command: command, + #args: args, + #connectionTimeout: connectionTimeout, + #retries: retries, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); + @override + _i6.Future ping({ + String? requestID, + int? retryCount = 1, + }) => (super.noSuchMethod( - Invocation.method( - #ping, [], {#requestID: requestID, #retryCount: retryCount}), - returnValue: Future.value(false)) as _i6.Future); + Invocation.method( + #ping, + [], + { + #requestID: requestID, + #retryCount: retryCount, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); @override _i6.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getBlockHeadTip, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future broadcastTransaction({String? rawTx, String? requestID}) => + Invocation.method( + #getServerFeatures, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future broadcastTransaction({ + required String? rawTx, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], - {#rawTx: rawTx, #requestID: requestID}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future> getBalance( - {String? scripthash, String? requestID}) => + Invocation.method( + #broadcastTransaction, + [], + { + #rawTx: rawTx, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future> getBalance({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future>> getHistory( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBalance, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future>> getHistory({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); + Invocation.method( + #getHistory, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchHistory( - {Map>? args}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future>> getUTXOs( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBatchHistory, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future>> getUTXOs({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) as _i6 - .Future>>); + Invocation.method( + #getUTXOs, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchUTXOs( - {Map>? args}) => - (super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future> getTransaction( - {String? txHash, bool? verbose = true, String? requestID}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #verbose: verbose, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getAnonymitySet( - {String? groupId = r'1', - String? blockhash = r'', - String? requestID}) => + Invocation.method( + #getBatchUTXOs, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future> getTransaction({ + required String? txHash, + bool? verbose = true, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future getMintData({dynamic mints, String? requestID}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getAnonymitySet({ + String? groupId = r'1', + String? blockhash = r'', + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getMintData, [], {#mints: mints, #requestID: requestID}), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getUsedCoinSerials( - {String? requestID, int? startNumber}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getMintData({ + dynamic mints, + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getMintData, + [], + { + #mints: mints, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getUsedCoinSerials({ + String? requestID, + required int? startNumber, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#requestID: requestID, #startNumber: startNumber}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getUsedCoinSerials, + [], + { + #requestID: requestID, + #startNumber: startNumber, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLatestCoinId, [], {#requestID: requestID}), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future> getFeeRate({String? requestID}) => (super - .noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) => + Invocation.method( + #getLatestCoinId, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #estimateFee, [], {#requestID: requestID, #blocks: blocks}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #getFeeRate, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future<_i2.Decimal> estimateFee({ + String? requestID, + required int? blocks, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + )), + ) as _i6.Future<_i2.Decimal>); @override _i6.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + )), + ) as _i6.Future<_i2.Decimal>); } /// A class which mocks [CachedElectrumX]. @@ -233,55 +418,98 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX { } @override - String get server => - (super.noSuchMethod(Invocation.getter(#server), returnValue: '') - as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i3.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs), - returnValue: _FakePrefs_1()) as _i3.Prefs); - @override - List<_i5.ElectrumXNode> get failovers => - (super.noSuchMethod(Invocation.getter(#failovers), - returnValue: <_i5.ElectrumXNode>[]) as List<_i5.ElectrumXNode>); - @override - _i6.Future> getAnonymitySet( - {String? groupId, String? blockhash = r'', _i8.Coin? coin}) => + String get server => (super.noSuchMethod( + Invocation.getter(#server), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i3.Prefs get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakePrefs_1( + this, + Invocation.getter(#prefs), + ), + ) as _i3.Prefs); + @override + List<_i5.ElectrumXNode> get failovers => (super.noSuchMethod( + Invocation.getter(#failovers), + returnValue: <_i5.ElectrumXNode>[], + ) as List<_i5.ElectrumXNode>); + @override + _i6.Future> getAnonymitySet({ + required String? groupId, + String? blockhash = r'', + required _i8.Coin? coin, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], - {#groupId: groupId, #blockhash: blockhash, #coin: coin}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getTransaction( - {String? txHash, _i8.Coin? coin, bool? verbose = true}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #coin: coin, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getTransaction({ + required String? txHash, + required _i8.Coin? coin, + bool? verbose = true, + }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #coin: coin, #verbose: verbose}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getUsedCoinSerials( - {_i8.Coin? coin, int? startNumber = 0}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #coin: coin, + #verbose: verbose, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getUsedCoinSerials({ + required _i8.Coin? coin, + int? startNumber = 0, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#coin: coin, #startNumber: startNumber}), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future clearSharedTransactionCache({_i8.Coin? coin}) => + Invocation.method( + #getUsedCoinSerials, + [], + { + #coin: coin, + #startNumber: startNumber, + }, + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future clearSharedTransactionCache({required _i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + Invocation.method( + #clearSharedTransactionCache, + [], + {#coin: coin}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [PriceAPI]. @@ -293,21 +521,35 @@ class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI { } @override - _i4.Client get client => (super.noSuchMethod(Invocation.getter(#client), - returnValue: _FakeClient_2()) as _i4.Client); + _i4.Client get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeClient_2( + this, + Invocation.getter(#client), + ), + ) as _i4.Client); @override void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod( - Invocation.method(#resetLastCalledToForceNextCallToUpdateCache, []), - returnValueForMissingStub: null); - @override - _i6.Future>> - getPricesAnd24hChange({String? baseCurrency}) => (super.noSuchMethod( - Invocation.method( - #getPricesAnd24hChange, [], {#baseCurrency: baseCurrency}), - returnValue: - Future>>.value( - <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{})) - as _i6.Future>>); + Invocation.method( + #resetLastCalledToForceNextCallToUpdateCache, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future< + Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>> getPricesAnd24hChange( + {required String? baseCurrency}) => + (super.noSuchMethod( + Invocation.method( + #getPricesAnd24hChange, + [], + {#baseCurrency: baseCurrency}, + ), + returnValue: + _i6.Future>>.value( + <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{}), + ) as _i6.Future>>); } /// A class which mocks [TransactionNotificationTracker]. @@ -320,33 +562,52 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - List get pendings => - (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) - as List); - @override - List get confirmeds => (super - .noSuchMethod(Invocation.getter(#confirmeds), returnValue: []) - as List); - @override - bool wasNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedPending, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool wasNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + List get pendings => (super.noSuchMethod( + Invocation.getter(#pendings), + returnValue: [], + ) as List); + @override + List get confirmeds => (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) as List); + @override + bool wasNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedPending, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedPending, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedConfirmed, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedConfirmed, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } diff --git a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart index 344ad42d68..944e5faead 100644 --- a/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart +++ b/test/services/coins/dogecoin/dogecoin_wallet_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/coins/dogecoin/dogecoin_wallet_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'package:decimal/decimal.dart' as _i2; @@ -25,12 +26,37 @@ import 'package:tuple/tuple.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {} +class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakePrefs_1 extends _i1.Fake implements _i3.Prefs {} +class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { + _FakePrefs_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_2 extends _i1.Fake implements _i4.Client {} +class _FakeClient_2 extends _i1.SmartFake implements _i4.Client { + _FakeClient_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ElectrumX]. /// @@ -41,187 +67,346 @@ class MockElectrumX extends _i1.Mock implements _i5.ElectrumX { } @override - set failovers(List<_i5.ElectrumXNode>? _failovers) => - super.noSuchMethod(Invocation.setter(#failovers, _failovers), - returnValueForMissingStub: null); + set failovers(List<_i5.ElectrumXNode>? _failovers) => super.noSuchMethod( + Invocation.setter( + #failovers, + _failovers, + ), + returnValueForMissingStub: null, + ); @override - int get currentFailoverIndex => - (super.noSuchMethod(Invocation.getter(#currentFailoverIndex), - returnValue: 0) as int); + int get currentFailoverIndex => (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) as int); @override set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter(#currentFailoverIndex, _currentFailoverIndex), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i6.Future request( - {String? command, - List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), - String? requestID, - int? retries = 2}) => + Invocation.setter( + #currentFailoverIndex, + _currentFailoverIndex, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i6.Future request({ + required String? command, + List? args = const [], + Duration? connectionTimeout = const Duration(seconds: 60), + String? requestID, + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#request, [], { + Invocation.method( + #request, + [], + { #command: command, #args: args, #connectionTimeout: connectionTimeout, #requestID: requestID, - #retries: retries - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future>> batchRequest( - {String? command, - Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), - int? retries = 2}) => + #retries: retries, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future>> batchRequest({ + required String? command, + required Map>? args, + Duration? connectionTimeout = const Duration(seconds: 60), + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #connectionTimeout: connectionTimeout, - #retries: retries - }), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); - @override - _i6.Future ping({String? requestID, int? retryCount = 1}) => + Invocation.method( + #batchRequest, + [], + { + #command: command, + #args: args, + #connectionTimeout: connectionTimeout, + #retries: retries, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); + @override + _i6.Future ping({ + String? requestID, + int? retryCount = 1, + }) => (super.noSuchMethod( - Invocation.method( - #ping, [], {#requestID: requestID, #retryCount: retryCount}), - returnValue: Future.value(false)) as _i6.Future); + Invocation.method( + #ping, + [], + { + #requestID: requestID, + #retryCount: retryCount, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); @override _i6.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getBlockHeadTip, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future broadcastTransaction({String? rawTx, String? requestID}) => + Invocation.method( + #getServerFeatures, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future broadcastTransaction({ + required String? rawTx, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], - {#rawTx: rawTx, #requestID: requestID}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future> getBalance( - {String? scripthash, String? requestID}) => + Invocation.method( + #broadcastTransaction, + [], + { + #rawTx: rawTx, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future> getBalance({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future>> getHistory( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBalance, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future>> getHistory({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); + Invocation.method( + #getHistory, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchHistory( - {Map>? args}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future>> getUTXOs( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBatchHistory, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future>> getUTXOs({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) as _i6 - .Future>>); + Invocation.method( + #getUTXOs, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchUTXOs( - {Map>? args}) => - (super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future> getTransaction( - {String? txHash, bool? verbose = true, String? requestID}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #verbose: verbose, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getAnonymitySet( - {String? groupId = r'1', - String? blockhash = r'', - String? requestID}) => + Invocation.method( + #getBatchUTXOs, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future> getTransaction({ + required String? txHash, + bool? verbose = true, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future getMintData({dynamic mints, String? requestID}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getAnonymitySet({ + String? groupId = r'1', + String? blockhash = r'', + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getMintData, [], {#mints: mints, #requestID: requestID}), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getUsedCoinSerials( - {String? requestID, int? startNumber}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getMintData({ + dynamic mints, + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getMintData, + [], + { + #mints: mints, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getUsedCoinSerials({ + String? requestID, + required int? startNumber, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#requestID: requestID, #startNumber: startNumber}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getUsedCoinSerials, + [], + { + #requestID: requestID, + #startNumber: startNumber, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLatestCoinId, [], {#requestID: requestID}), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future> getFeeRate({String? requestID}) => (super - .noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) => + Invocation.method( + #getLatestCoinId, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #estimateFee, [], {#requestID: requestID, #blocks: blocks}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #getFeeRate, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future<_i2.Decimal> estimateFee({ + String? requestID, + required int? blocks, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + )), + ) as _i6.Future<_i2.Decimal>); @override _i6.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + )), + ) as _i6.Future<_i2.Decimal>); } /// A class which mocks [CachedElectrumX]. @@ -233,55 +418,98 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX { } @override - String get server => - (super.noSuchMethod(Invocation.getter(#server), returnValue: '') - as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i3.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs), - returnValue: _FakePrefs_1()) as _i3.Prefs); - @override - List<_i5.ElectrumXNode> get failovers => - (super.noSuchMethod(Invocation.getter(#failovers), - returnValue: <_i5.ElectrumXNode>[]) as List<_i5.ElectrumXNode>); - @override - _i6.Future> getAnonymitySet( - {String? groupId, String? blockhash = r'', _i8.Coin? coin}) => + String get server => (super.noSuchMethod( + Invocation.getter(#server), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i3.Prefs get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakePrefs_1( + this, + Invocation.getter(#prefs), + ), + ) as _i3.Prefs); + @override + List<_i5.ElectrumXNode> get failovers => (super.noSuchMethod( + Invocation.getter(#failovers), + returnValue: <_i5.ElectrumXNode>[], + ) as List<_i5.ElectrumXNode>); + @override + _i6.Future> getAnonymitySet({ + required String? groupId, + String? blockhash = r'', + required _i8.Coin? coin, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], - {#groupId: groupId, #blockhash: blockhash, #coin: coin}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getTransaction( - {String? txHash, _i8.Coin? coin, bool? verbose = true}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #coin: coin, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getTransaction({ + required String? txHash, + required _i8.Coin? coin, + bool? verbose = true, + }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #coin: coin, #verbose: verbose}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getUsedCoinSerials( - {_i8.Coin? coin, int? startNumber = 0}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #coin: coin, + #verbose: verbose, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getUsedCoinSerials({ + required _i8.Coin? coin, + int? startNumber = 0, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#coin: coin, #startNumber: startNumber}), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future clearSharedTransactionCache({_i8.Coin? coin}) => + Invocation.method( + #getUsedCoinSerials, + [], + { + #coin: coin, + #startNumber: startNumber, + }, + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future clearSharedTransactionCache({required _i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + Invocation.method( + #clearSharedTransactionCache, + [], + {#coin: coin}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [PriceAPI]. @@ -293,21 +521,35 @@ class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI { } @override - _i4.Client get client => (super.noSuchMethod(Invocation.getter(#client), - returnValue: _FakeClient_2()) as _i4.Client); + _i4.Client get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeClient_2( + this, + Invocation.getter(#client), + ), + ) as _i4.Client); @override void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod( - Invocation.method(#resetLastCalledToForceNextCallToUpdateCache, []), - returnValueForMissingStub: null); - @override - _i6.Future>> - getPricesAnd24hChange({String? baseCurrency}) => (super.noSuchMethod( - Invocation.method( - #getPricesAnd24hChange, [], {#baseCurrency: baseCurrency}), - returnValue: - Future>>.value( - <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{})) - as _i6.Future>>); + Invocation.method( + #resetLastCalledToForceNextCallToUpdateCache, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future< + Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>> getPricesAnd24hChange( + {required String? baseCurrency}) => + (super.noSuchMethod( + Invocation.method( + #getPricesAnd24hChange, + [], + {#baseCurrency: baseCurrency}, + ), + returnValue: + _i6.Future>>.value( + <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{}), + ) as _i6.Future>>); } /// A class which mocks [TransactionNotificationTracker]. @@ -320,33 +562,52 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - List get pendings => - (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) - as List); - @override - List get confirmeds => (super - .noSuchMethod(Invocation.getter(#confirmeds), returnValue: []) - as List); - @override - bool wasNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedPending, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool wasNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + List get pendings => (super.noSuchMethod( + Invocation.getter(#pendings), + returnValue: [], + ) as List); + @override + List get confirmeds => (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) as List); + @override + bool wasNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedPending, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedPending, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedConfirmed, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedConfirmed, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } diff --git a/test/services/coins/firo/firo_wallet_test.mocks.dart b/test/services/coins/firo/firo_wallet_test.mocks.dart index 437978c355..4fe6af52a8 100644 --- a/test/services/coins/firo/firo_wallet_test.mocks.dart +++ b/test/services/coins/firo/firo_wallet_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/coins/firo/firo_wallet_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'package:decimal/decimal.dart' as _i2; @@ -25,12 +26,37 @@ import 'package:tuple/tuple.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {} +class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakePrefs_1 extends _i1.Fake implements _i3.Prefs {} +class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { + _FakePrefs_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_2 extends _i1.Fake implements _i4.Client {} +class _FakeClient_2 extends _i1.SmartFake implements _i4.Client { + _FakeClient_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ElectrumX]. /// @@ -41,187 +67,346 @@ class MockElectrumX extends _i1.Mock implements _i5.ElectrumX { } @override - set failovers(List<_i5.ElectrumXNode>? _failovers) => - super.noSuchMethod(Invocation.setter(#failovers, _failovers), - returnValueForMissingStub: null); + set failovers(List<_i5.ElectrumXNode>? _failovers) => super.noSuchMethod( + Invocation.setter( + #failovers, + _failovers, + ), + returnValueForMissingStub: null, + ); @override - int get currentFailoverIndex => - (super.noSuchMethod(Invocation.getter(#currentFailoverIndex), - returnValue: 0) as int); + int get currentFailoverIndex => (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) as int); @override set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter(#currentFailoverIndex, _currentFailoverIndex), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i6.Future request( - {String? command, - List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), - String? requestID, - int? retries = 2}) => + Invocation.setter( + #currentFailoverIndex, + _currentFailoverIndex, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i6.Future request({ + required String? command, + List? args = const [], + Duration? connectionTimeout = const Duration(seconds: 60), + String? requestID, + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#request, [], { + Invocation.method( + #request, + [], + { #command: command, #args: args, #connectionTimeout: connectionTimeout, #requestID: requestID, - #retries: retries - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future>> batchRequest( - {String? command, - Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), - int? retries = 2}) => + #retries: retries, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future>> batchRequest({ + required String? command, + required Map>? args, + Duration? connectionTimeout = const Duration(seconds: 60), + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #connectionTimeout: connectionTimeout, - #retries: retries - }), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); - @override - _i6.Future ping({String? requestID, int? retryCount = 1}) => + Invocation.method( + #batchRequest, + [], + { + #command: command, + #args: args, + #connectionTimeout: connectionTimeout, + #retries: retries, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); + @override + _i6.Future ping({ + String? requestID, + int? retryCount = 1, + }) => (super.noSuchMethod( - Invocation.method( - #ping, [], {#requestID: requestID, #retryCount: retryCount}), - returnValue: Future.value(false)) as _i6.Future); + Invocation.method( + #ping, + [], + { + #requestID: requestID, + #retryCount: retryCount, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); @override _i6.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getBlockHeadTip, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future broadcastTransaction({String? rawTx, String? requestID}) => + Invocation.method( + #getServerFeatures, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future broadcastTransaction({ + required String? rawTx, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], - {#rawTx: rawTx, #requestID: requestID}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future> getBalance( - {String? scripthash, String? requestID}) => + Invocation.method( + #broadcastTransaction, + [], + { + #rawTx: rawTx, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future> getBalance({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future>> getHistory( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBalance, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future>> getHistory({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); + Invocation.method( + #getHistory, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchHistory( - {Map>? args}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future>> getUTXOs( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBatchHistory, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future>> getUTXOs({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) as _i6 - .Future>>); + Invocation.method( + #getUTXOs, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchUTXOs( - {Map>? args}) => - (super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future> getTransaction( - {String? txHash, bool? verbose = true, String? requestID}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #verbose: verbose, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getAnonymitySet( - {String? groupId = r'1', - String? blockhash = r'', - String? requestID}) => + Invocation.method( + #getBatchUTXOs, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future> getTransaction({ + required String? txHash, + bool? verbose = true, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future getMintData({dynamic mints, String? requestID}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getAnonymitySet({ + String? groupId = r'1', + String? blockhash = r'', + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getMintData, [], {#mints: mints, #requestID: requestID}), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getUsedCoinSerials( - {String? requestID, int? startNumber}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getMintData({ + dynamic mints, + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getMintData, + [], + { + #mints: mints, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getUsedCoinSerials({ + String? requestID, + required int? startNumber, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#requestID: requestID, #startNumber: startNumber}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getUsedCoinSerials, + [], + { + #requestID: requestID, + #startNumber: startNumber, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLatestCoinId, [], {#requestID: requestID}), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future> getFeeRate({String? requestID}) => (super - .noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) => + Invocation.method( + #getLatestCoinId, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #estimateFee, [], {#requestID: requestID, #blocks: blocks}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #getFeeRate, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future<_i2.Decimal> estimateFee({ + String? requestID, + required int? blocks, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + )), + ) as _i6.Future<_i2.Decimal>); @override _i6.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + )), + ) as _i6.Future<_i2.Decimal>); } /// A class which mocks [CachedElectrumX]. @@ -233,55 +418,98 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX { } @override - String get server => - (super.noSuchMethod(Invocation.getter(#server), returnValue: '') - as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i3.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs), - returnValue: _FakePrefs_1()) as _i3.Prefs); - @override - List<_i5.ElectrumXNode> get failovers => - (super.noSuchMethod(Invocation.getter(#failovers), - returnValue: <_i5.ElectrumXNode>[]) as List<_i5.ElectrumXNode>); - @override - _i6.Future> getAnonymitySet( - {String? groupId, String? blockhash = r'', _i8.Coin? coin}) => + String get server => (super.noSuchMethod( + Invocation.getter(#server), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i3.Prefs get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakePrefs_1( + this, + Invocation.getter(#prefs), + ), + ) as _i3.Prefs); + @override + List<_i5.ElectrumXNode> get failovers => (super.noSuchMethod( + Invocation.getter(#failovers), + returnValue: <_i5.ElectrumXNode>[], + ) as List<_i5.ElectrumXNode>); + @override + _i6.Future> getAnonymitySet({ + required String? groupId, + String? blockhash = r'', + required _i8.Coin? coin, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], - {#groupId: groupId, #blockhash: blockhash, #coin: coin}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getTransaction( - {String? txHash, _i8.Coin? coin, bool? verbose = true}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #coin: coin, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getTransaction({ + required String? txHash, + required _i8.Coin? coin, + bool? verbose = true, + }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #coin: coin, #verbose: verbose}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getUsedCoinSerials( - {_i8.Coin? coin, int? startNumber = 0}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #coin: coin, + #verbose: verbose, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getUsedCoinSerials({ + required _i8.Coin? coin, + int? startNumber = 0, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#coin: coin, #startNumber: startNumber}), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future clearSharedTransactionCache({_i8.Coin? coin}) => + Invocation.method( + #getUsedCoinSerials, + [], + { + #coin: coin, + #startNumber: startNumber, + }, + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future clearSharedTransactionCache({required _i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + Invocation.method( + #clearSharedTransactionCache, + [], + {#coin: coin}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [PriceAPI]. @@ -293,21 +521,35 @@ class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI { } @override - _i4.Client get client => (super.noSuchMethod(Invocation.getter(#client), - returnValue: _FakeClient_2()) as _i4.Client); + _i4.Client get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeClient_2( + this, + Invocation.getter(#client), + ), + ) as _i4.Client); @override void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod( - Invocation.method(#resetLastCalledToForceNextCallToUpdateCache, []), - returnValueForMissingStub: null); - @override - _i6.Future>> - getPricesAnd24hChange({String? baseCurrency}) => (super.noSuchMethod( - Invocation.method( - #getPricesAnd24hChange, [], {#baseCurrency: baseCurrency}), - returnValue: - Future>>.value( - <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{})) - as _i6.Future>>); + Invocation.method( + #resetLastCalledToForceNextCallToUpdateCache, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future< + Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>> getPricesAnd24hChange( + {required String? baseCurrency}) => + (super.noSuchMethod( + Invocation.method( + #getPricesAnd24hChange, + [], + {#baseCurrency: baseCurrency}, + ), + returnValue: + _i6.Future>>.value( + <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{}), + ) as _i6.Future>>); } /// A class which mocks [TransactionNotificationTracker]. @@ -320,33 +562,52 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - List get pendings => - (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) - as List); - @override - List get confirmeds => (super - .noSuchMethod(Invocation.getter(#confirmeds), returnValue: []) - as List); - @override - bool wasNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedPending, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool wasNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + List get pendings => (super.noSuchMethod( + Invocation.getter(#pendings), + returnValue: [], + ) as List); + @override + List get confirmeds => (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) as List); + @override + bool wasNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedPending, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedPending, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedConfirmed, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedConfirmed, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } diff --git a/test/services/coins/manager_test.mocks.dart b/test/services/coins/manager_test.mocks.dart index 8baae2d1b7..0c20b752d8 100644 --- a/test/services/coins/manager_test.mocks.dart +++ b/test/services/coins/manager_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/coins/manager_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'package:decimal/decimal.dart' as _i3; @@ -24,21 +25,80 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeTransactionNotificationTracker_0 extends _i1.Fake - implements _i2.TransactionNotificationTracker {} +class _FakeTransactionNotificationTracker_0 extends _i1.SmartFake + implements _i2.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_1 extends _i1.Fake implements _i3.Decimal {} +class _FakeDecimal_1 extends _i1.SmartFake implements _i3.Decimal { + _FakeDecimal_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_2 extends _i1.Fake implements _i4.TransactionData {} +class _FakeTransactionData_2 extends _i1.SmartFake + implements _i4.TransactionData { + _FakeTransactionData_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeUtxoData_3 extends _i1.Fake implements _i4.UtxoData {} +class _FakeUtxoData_3 extends _i1.SmartFake implements _i4.UtxoData { + _FakeUtxoData_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_4 extends _i1.Fake implements _i4.FeeObject {} +class _FakeFeeObject_4 extends _i1.SmartFake implements _i4.FeeObject { + _FakeFeeObject_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeElectrumX_5 extends _i1.Fake implements _i5.ElectrumX {} +class _FakeElectrumX_5 extends _i1.SmartFake implements _i5.ElectrumX { + _FakeElectrumX_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeCachedElectrumX_6 extends _i1.Fake implements _i6.CachedElectrumX {} +class _FakeCachedElectrumX_6 extends _i1.SmartFake + implements _i6.CachedElectrumX { + _FakeCachedElectrumX_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [FiroWallet]. /// @@ -49,477 +109,839 @@ class MockFiroWallet extends _i1.Mock implements _i7.FiroWallet { } @override - set timer(_i8.Timer? _timer) => - super.noSuchMethod(Invocation.setter(#timer, _timer), - returnValueForMissingStub: null); - @override - _i2.TransactionNotificationTracker get txTracker => - (super.noSuchMethod(Invocation.getter(#txTracker), - returnValue: _FakeTransactionNotificationTracker_0()) - as _i2.TransactionNotificationTracker); + set timer(_i8.Timer? _timer) => super.noSuchMethod( + Invocation.setter( + #timer, + _timer, + ), + returnValueForMissingStub: null, + ); + @override + _i2.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + Invocation.getter(#txTracker), + returnValue: _FakeTransactionNotificationTracker_0( + this, + Invocation.getter(#txTracker), + ), + ) as _i2.TransactionNotificationTracker); @override set txTracker(_i2.TransactionNotificationTracker? _txTracker) => - super.noSuchMethod(Invocation.setter(#txTracker, _txTracker), - returnValueForMissingStub: null); - @override - bool get refreshMutex => - (super.noSuchMethod(Invocation.getter(#refreshMutex), returnValue: false) - as bool); - @override - set refreshMutex(bool? _refreshMutex) => - super.noSuchMethod(Invocation.setter(#refreshMutex, _refreshMutex), - returnValueForMissingStub: null); - @override - bool get longMutex => - (super.noSuchMethod(Invocation.getter(#longMutex), returnValue: false) - as bool); - @override - set longMutex(bool? _longMutex) => - super.noSuchMethod(Invocation.setter(#longMutex, _longMutex), - returnValueForMissingStub: null); - @override - bool get isActive => - (super.noSuchMethod(Invocation.getter(#isActive), returnValue: false) - as bool); - @override - set isActive(bool? _isActive) => - super.noSuchMethod(Invocation.setter(#isActive, _isActive), - returnValueForMissingStub: null); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - _i9.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i9.Coin.bitcoin) as _i9.Coin); - @override - _i8.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future<_i3.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); - @override - _i8.Future<_i3.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); - @override - _i8.Future<_i3.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); - @override - _i8.Future<_i3.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); - @override - _i8.Future<_i4.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_2())) - as _i8.Future<_i4.TransactionData>); - @override - _i8.Future<_i4.UtxoData> get utxoData => - (super.noSuchMethod(Invocation.getter(#utxoData), - returnValue: Future<_i4.UtxoData>.value(_FakeUtxoData_3())) - as _i8.Future<_i4.UtxoData>); + super.noSuchMethod( + Invocation.setter( + #txTracker, + _txTracker, + ), + returnValueForMissingStub: null, + ); + @override + bool get refreshMutex => (super.noSuchMethod( + Invocation.getter(#refreshMutex), + returnValue: false, + ) as bool); + @override + set refreshMutex(bool? _refreshMutex) => super.noSuchMethod( + Invocation.setter( + #refreshMutex, + _refreshMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get longMutex => (super.noSuchMethod( + Invocation.getter(#longMutex), + returnValue: false, + ) as bool); + @override + set longMutex(bool? _longMutex) => super.noSuchMethod( + Invocation.setter( + #longMutex, + _longMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get isActive => (super.noSuchMethod( + Invocation.getter(#isActive), + returnValue: false, + ) as bool); + @override + set isActive(bool? _isActive) => super.noSuchMethod( + Invocation.setter( + #isActive, + _isActive, + ), + returnValueForMissingStub: null, + ); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + _i9.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i9.Coin.bitcoin, + ) as _i9.Coin); + @override + _i8.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future<_i3.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.getter(#availableBalance), + )), + ) as _i8.Future<_i3.Decimal>); + @override + _i8.Future<_i3.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i8.Future<_i3.Decimal>); + @override + _i8.Future<_i3.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.getter(#totalBalance), + )), + ) as _i8.Future<_i3.Decimal>); + @override + _i8.Future<_i3.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i8.Future<_i3.Decimal>); + @override + _i8.Future<_i4.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i8.Future<_i4.TransactionData>.value(_FakeTransactionData_2( + this, + Invocation.getter(#transactionData), + )), + ) as _i8.Future<_i4.TransactionData>); + @override + _i8.Future<_i4.UtxoData> get utxoData => (super.noSuchMethod( + Invocation.getter(#utxoData), + returnValue: _i8.Future<_i4.UtxoData>.value(_FakeUtxoData_3( + this, + Invocation.getter(#utxoData), + )), + ) as _i8.Future<_i4.UtxoData>); @override _i8.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i4.UtxoObject>[])) - as _i8.Future>); + Invocation.getter(#unspentOutputs), + returnValue: _i8.Future>.value(<_i4.UtxoObject>[]), + ) as _i8.Future>); @override _i8.Future<_i4.TransactionData> get lelantusTransactionData => - (super.noSuchMethod(Invocation.getter(#lelantusTransactionData), - returnValue: - Future<_i4.TransactionData>.value(_FakeTransactionData_2())) - as _i8.Future<_i4.TransactionData>); - @override - _i8.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future> get balances => - (super.noSuchMethod(Invocation.getter(#balances), - returnValue: Future>.value(<_i3.Decimal>[])) - as _i8.Future>); - @override - _i8.Future<_i3.Decimal> get firoPrice => - (super.noSuchMethod(Invocation.getter(#firoPrice), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); - @override - _i8.Future<_i4.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i4.FeeObject>.value(_FakeFeeObject_4())) - as _i8.Future<_i4.FeeObject>); - @override - _i8.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i8.Future); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i8.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i8.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - _i5.ElectrumX get electrumXClient => - (super.noSuchMethod(Invocation.getter(#electrumXClient), - returnValue: _FakeElectrumX_5()) as _i5.ElectrumX); - @override - _i6.CachedElectrumX get cachedElectrumXClient => - (super.noSuchMethod(Invocation.getter(#cachedElectrumXClient), - returnValue: _FakeCachedElectrumX_6()) as _i6.CachedElectrumX); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get hasCalledExit => - (super.noSuchMethod(Invocation.getter(#hasCalledExit), returnValue: false) - as bool); + (super.noSuchMethod( + Invocation.getter(#lelantusTransactionData), + returnValue: + _i8.Future<_i4.TransactionData>.value(_FakeTransactionData_2( + this, + Invocation.getter(#lelantusTransactionData), + )), + ) as _i8.Future<_i4.TransactionData>); + @override + _i8.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future> get balances => (super.noSuchMethod( + Invocation.getter(#balances), + returnValue: _i8.Future>.value(<_i3.Decimal>[]), + ) as _i8.Future>); + @override + _i8.Future<_i3.Decimal> get firoPrice => (super.noSuchMethod( + Invocation.getter(#firoPrice), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.getter(#firoPrice), + )), + ) as _i8.Future<_i3.Decimal>); + @override + _i8.Future<_i4.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i8.Future<_i4.FeeObject>.value(_FakeFeeObject_4( + this, + Invocation.getter(#fees), + )), + ) as _i8.Future<_i4.FeeObject>); + @override + _i8.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i8.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i5.ElectrumX get electrumXClient => (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumX_5( + this, + Invocation.getter(#electrumXClient), + ), + ) as _i5.ElectrumX); + @override + _i6.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + Invocation.getter(#cachedElectrumXClient), + returnValue: _FakeCachedElectrumX_6( + this, + Invocation.getter(#cachedElectrumXClient), + ), + ) as _i6.CachedElectrumX); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); @override set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => super.noSuchMethod( - Invocation.setter(#onIsActiveWalletChanged, _onIsActiveWalletChanged), - returnValueForMissingStub: null); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i8.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i8.Future); - @override - void startNetworkAlivePinging() => - super.noSuchMethod(Invocation.method(#startNetworkAlivePinging, []), - returnValueForMissingStub: null); - @override - void stopNetworkAlivePinging() => - super.noSuchMethod(Invocation.method(#stopNetworkAlivePinging, []), - returnValueForMissingStub: null); - @override - _i8.Future> prepareSendPublic( - {String? address, int? satoshiAmount, Map? args}) => + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i8.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + void startNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #startNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + void stopNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #stopNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i8.Future> prepareSendPublic({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#prepareSendPublic, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i8.Future>); + Invocation.method( + #prepareSendPublic, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); @override _i8.Future confirmSendPublic({dynamic txData}) => (super.noSuchMethod( - Invocation.method(#confirmSendPublic, [], {#txData: txData}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => - (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => + Invocation.method( + #confirmSendPublic, + [], + {#txData: txData}, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i8.Future); - @override - int estimateTxFee({int? vSize, int? feeRatePerKB}) => (super.noSuchMethod( - Invocation.method( - #estimateTxFee, [], {#vSize: vSize, #feeRatePerKB: feeRatePerKB}), - returnValue: 0) as int); - @override - dynamic coinSelection(int? satoshiAmountToSend, int? selectedTxFeeRate, - String? _recipientAddress, bool? isSendAll, - {int? additionalOutputs = 0, List<_i4.UtxoObject>? utxos}) => - super.noSuchMethod(Invocation.method(#coinSelection, [ - satoshiAmountToSend, - selectedTxFeeRate, - _recipientAddress, - isSendAll - ], { - #additionalOutputs: additionalOutputs, - #utxos: utxos - })); + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + int estimateTxFee({ + required int? vSize, + required int? feeRatePerKB, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateTxFee, + [], + { + #vSize: vSize, + #feeRatePerKB: feeRatePerKB, + }, + ), + returnValue: 0, + ) as int); + @override + dynamic coinSelection( + int? satoshiAmountToSend, + int? selectedTxFeeRate, + String? _recipientAddress, + bool? isSendAll, { + int? additionalOutputs = 0, + List<_i4.UtxoObject>? utxos, + }) => + super.noSuchMethod(Invocation.method( + #coinSelection, + [ + satoshiAmountToSend, + selectedTxFeeRate, + _recipientAddress, + isSendAll, + ], + { + #additionalOutputs: additionalOutputs, + #utxos: utxos, + }, + )); @override _i8.Future> fetchBuildTxData( List<_i4.UtxoObject>? utxosToUse) => - (super.noSuchMethod(Invocation.method(#fetchBuildTxData, [utxosToUse]), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future> buildTransaction( - {List<_i4.UtxoObject>? utxosToUse, - Map? utxoSigningData, - List? recipients, - List? satoshiAmounts}) => - (super.noSuchMethod( - Invocation.method(#buildTransaction, [], { - #utxosToUse: utxosToUse, - #utxoSigningData: utxoSigningData, - #recipients: recipients, - #satoshiAmounts: satoshiAmounts - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future refreshIfThereIsNewData() => - (super.noSuchMethod(Invocation.method(#refreshIfThereIsNewData, []), - returnValue: Future.value(false)) as _i8.Future); + (super.noSuchMethod( + Invocation.method( + #fetchBuildTxData, + [utxosToUse], + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future> buildTransaction({ + required List<_i4.UtxoObject>? utxosToUse, + required Map? utxoSigningData, + required List? recipients, + required List? satoshiAmounts, + }) => + (super.noSuchMethod( + Invocation.method( + #buildTransaction, + [], + { + #utxosToUse: utxosToUse, + #utxoSigningData: utxoSigningData, + #recipients: recipients, + #satoshiAmounts: satoshiAmounts, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future refreshIfThereIsNewData() => (super.noSuchMethod( + Invocation.method( + #refreshIfThereIsNewData, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override _i8.Future getAllTxsToWatch( - _i4.TransactionData? txData, _i4.TransactionData? lTxData) => + _i4.TransactionData? txData, + _i4.TransactionData? lTxData, + ) => (super.noSuchMethod( - Invocation.method(#getAllTxsToWatch, [txData, lTxData]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + Invocation.method( + #getAllTxsToWatch, + [ + txData, + lTxData, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override List> getLelantusCoinMap() => - (super.noSuchMethod(Invocation.method(#getLelantusCoinMap, []), - returnValue: >[]) - as List>); - @override - _i8.Future anonymizeAllPublicFunds() => - (super.noSuchMethod(Invocation.method(#anonymizeAllPublicFunds, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + (super.noSuchMethod( + Invocation.method( + #getLelantusCoinMap, + [], + ), + returnValue: >[], + ) as List>); + @override + _i8.Future anonymizeAllPublicFunds() => (super.noSuchMethod( + Invocation.method( + #anonymizeAllPublicFunds, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future>> createMintsFromAmount(int? total) => - (super.noSuchMethod(Invocation.method(#createMintsFromAmount, [total]), - returnValue: Future>>.value( - >[])) - as _i8.Future>>); - @override - _i8.Future submitHexToNetwork(String? hex) => - (super.noSuchMethod(Invocation.method(#submitHexToNetwork, [hex]), - returnValue: Future.value('')) as _i8.Future); + (super.noSuchMethod( + Invocation.method( + #createMintsFromAmount, + [total], + ), + returnValue: _i8.Future>>.value( + >[]), + ) as _i8.Future>>); + @override + _i8.Future submitHexToNetwork(String? hex) => (super.noSuchMethod( + Invocation.method( + #submitHexToNetwork, + [hex], + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); @override _i8.Future> buildMintTransaction( - List<_i4.UtxoObject>? utxosToUse, - int? satoshisPerRecipient, - List>? mintsMap) => + List<_i4.UtxoObject>? utxosToUse, + int? satoshisPerRecipient, + List>? mintsMap, + ) => (super.noSuchMethod( - Invocation.method(#buildMintTransaction, - [utxosToUse, satoshisPerRecipient, mintsMap]), - returnValue: - Future>.value({})) - as _i8.Future>); + Invocation.method( + #buildMintTransaction, + [ + utxosToUse, + satoshisPerRecipient, + mintsMap, + ], + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); @override _i8.Future checkReceivingAddressForTransactions() => (super.noSuchMethod( - Invocation.method(#checkReceivingAddressForTransactions, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + Invocation.method( + #checkReceivingAddressForTransactions, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future checkChangeAddressForTransactions() => (super.noSuchMethod( - Invocation.method(#checkChangeAddressForTransactions, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future fillAddresses(String? suppliedMnemonic, - {int? perBatch = 50, int? numberOfThreads = 4}) => + Invocation.method( + #checkChangeAddressForTransactions, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future fillAddresses( + String? suppliedMnemonic, { + int? perBatch = 50, + int? numberOfThreads = 4, + }) => (super.noSuchMethod( - Invocation.method(#fillAddresses, [suppliedMnemonic], - {#perBatch: perBatch, #numberOfThreads: numberOfThreads}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future incrementAddressIndexForChain(int? chain) => (super - .noSuchMethod(Invocation.method(#incrementAddressIndexForChain, [chain]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future addToAddressesArrayForChain(String? address, int? chain) => + Invocation.method( + #fillAddresses, + [suppliedMnemonic], + { + #perBatch: perBatch, + #numberOfThreads: numberOfThreads, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future incrementAddressIndexForChain(int? chain) => (super.noSuchMethod( - Invocation.method(#addToAddressesArrayForChain, [address, chain]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + Invocation.method( + #incrementAddressIndexForChain, + [chain], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future addToAddressesArrayForChain( + String? address, + int? chain, + ) => + (super.noSuchMethod( + Invocation.method( + #addToAddressesArrayForChain, + [ + address, + chain, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); + #height: height, + }, + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future> getSetDataMap(int? latestSetId) => - (super.noSuchMethod(Invocation.method(#getSetDataMap, [latestSetId]), - returnValue: Future>.value({})) - as _i8.Future>); + (super.noSuchMethod( + Invocation.method( + #getSetDataMap, + [latestSetId], + ), + returnValue: _i8.Future>.value({}), + ) as _i8.Future>); @override _i8.Future>> fetchAnonymitySets() => - (super.noSuchMethod(Invocation.method(#fetchAnonymitySets, []), - returnValue: Future>>.value( - >[])) - as _i8.Future>>); - @override - _i8.Future getLatestSetId() => - (super.noSuchMethod(Invocation.method(#getLatestSetId, []), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future> getUsedCoinSerials() => - (super.noSuchMethod(Invocation.method(#getUsedCoinSerials, []), - returnValue: Future>.value([])) - as _i8.Future>); - @override - _i8.Future exit() => (super.noSuchMethod(Invocation.method(#exit, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i8.Future); - @override - _i8.Future getCoinsToJoinSplit(int? required) => - (super.noSuchMethod(Invocation.method(#getCoinsToJoinSplit, [required]), - returnValue: Future.value()) as _i8.Future); + (super.noSuchMethod( + Invocation.method( + #fetchAnonymitySets, + [], + ), + returnValue: _i8.Future>>.value( + >[]), + ) as _i8.Future>>); + @override + _i8.Future getLatestSetId() => (super.noSuchMethod( + Invocation.method( + #getLatestSetId, + [], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future> getUsedCoinSerials() => (super.noSuchMethod( + Invocation.method( + #getUsedCoinSerials, + [], + ), + returnValue: _i8.Future>.value([]), + ) as _i8.Future>); + @override + _i8.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i8.Future.value(), + returnValueForMissingStub: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future getCoinsToJoinSplit(int? required) => (super.noSuchMethod( + Invocation.method( + #getCoinsToJoinSplit, + [required], + ), + returnValue: _i8.Future.value(), + ) as _i8.Future); @override _i8.Future estimateJoinSplitFee(int? spendAmount) => (super.noSuchMethod( - Invocation.method(#estimateJoinSplitFee, [spendAmount]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #estimateJoinSplitFee, + [spendAmount], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future estimateFeeForPublic(int? satoshiAmount, int? feeRate) => + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future estimateFeeForPublic( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeForPublic, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i8.Future); - @override - int roughFeeEstimate(int? inputCount, int? outputCount, int? feeRatePerKB) => + Invocation.method( + #estimateFeeForPublic, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + int roughFeeEstimate( + int? inputCount, + int? outputCount, + int? feeRatePerKB, + ) => (super.noSuchMethod( - Invocation.method( - #roughFeeEstimate, [inputCount, outputCount, feeRatePerKB]), - returnValue: 0) as int); - @override - int sweepAllEstimate(int? feeRate) => - (super.noSuchMethod(Invocation.method(#sweepAllEstimate, [feeRate]), - returnValue: 0) as int); + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + returnValue: 0, + ) as int); + @override + int sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + returnValue: 0, + ) as int); @override _i8.Future>> fastFetch(List? allTxHashes) => - (super.noSuchMethod(Invocation.method(#fastFetch, [allTxHashes]), - returnValue: Future>>.value( - >[])) - as _i8.Future>>); + (super.noSuchMethod( + Invocation.method( + #fastFetch, + [allTxHashes], + ), + returnValue: _i8.Future>>.value( + >[]), + ) as _i8.Future>>); @override _i8.Future> getJMintTransactions( - _i6.CachedElectrumX? cachedClient, - List? transactions, - String? currency, - _i9.Coin? coin, - _i3.Decimal? currentPrice, - String? locale) => - (super.noSuchMethod( - Invocation.method(#getJMintTransactions, [ - cachedClient, - transactions, - currency, - coin, - currentPrice, - locale - ]), - returnValue: - Future>.value(<_i4.Transaction>[])) - as _i8.Future>); - @override - _i8.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i8.Future); - @override - _i8.Future<_i3.Decimal> availablePrivateBalance() => - (super.noSuchMethod(Invocation.method(#availablePrivateBalance, []), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); - @override - _i8.Future<_i3.Decimal> availablePublicBalance() => - (super.noSuchMethod(Invocation.method(#availablePublicBalance, []), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); + _i6.CachedElectrumX? cachedClient, + List? transactions, + String? currency, + _i9.Coin? coin, + _i3.Decimal? currentPrice, + String? locale, + ) => + (super.noSuchMethod( + Invocation.method( + #getJMintTransactions, + [ + cachedClient, + transactions, + currency, + coin, + currentPrice, + locale, + ], + ), + returnValue: + _i8.Future>.value(<_i4.Transaction>[]), + ) as _i8.Future>); + @override + _i8.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); + @override + _i8.Future<_i3.Decimal> availablePrivateBalance() => (super.noSuchMethod( + Invocation.method( + #availablePrivateBalance, + [], + ), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.method( + #availablePrivateBalance, + [], + ), + )), + ) as _i8.Future<_i3.Decimal>); + @override + _i8.Future<_i3.Decimal> availablePublicBalance() => (super.noSuchMethod( + Invocation.method( + #availablePublicBalance, + [], + ), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.method( + #availablePublicBalance, + [], + ), + )), + ) as _i8.Future<_i3.Decimal>); } /// A class which mocks [ElectrumX]. @@ -531,185 +953,344 @@ class MockElectrumX extends _i1.Mock implements _i5.ElectrumX { } @override - set failovers(List<_i5.ElectrumXNode>? _failovers) => - super.noSuchMethod(Invocation.setter(#failovers, _failovers), - returnValueForMissingStub: null); + set failovers(List<_i5.ElectrumXNode>? _failovers) => super.noSuchMethod( + Invocation.setter( + #failovers, + _failovers, + ), + returnValueForMissingStub: null, + ); @override - int get currentFailoverIndex => - (super.noSuchMethod(Invocation.getter(#currentFailoverIndex), - returnValue: 0) as int); + int get currentFailoverIndex => (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) as int); @override set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter(#currentFailoverIndex, _currentFailoverIndex), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i8.Future request( - {String? command, - List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), - String? requestID, - int? retries = 2}) => + Invocation.setter( + #currentFailoverIndex, + _currentFailoverIndex, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i8.Future request({ + required String? command, + List? args = const [], + Duration? connectionTimeout = const Duration(seconds: 60), + String? requestID, + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#request, [], { + Invocation.method( + #request, + [], + { #command: command, #args: args, #connectionTimeout: connectionTimeout, #requestID: requestID, - #retries: retries - }), - returnValue: Future.value()) as _i8.Future); - @override - _i8.Future>> batchRequest( - {String? command, - Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), - int? retries = 2}) => - (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #connectionTimeout: connectionTimeout, - #retries: retries - }), - returnValue: Future>>.value( - >[])) - as _i8.Future>>); - @override - _i8.Future ping({String? requestID, int? retryCount = 1}) => + #retries: retries, + }, + ), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future>> batchRequest({ + required String? command, + required Map>? args, + Duration? connectionTimeout = const Duration(seconds: 60), + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method( - #ping, [], {#requestID: requestID, #retryCount: retryCount}), - returnValue: Future.value(false)) as _i8.Future); + Invocation.method( + #batchRequest, + [], + { + #command: command, + #args: args, + #connectionTimeout: connectionTimeout, + #retries: retries, + }, + ), + returnValue: _i8.Future>>.value( + >[]), + ) as _i8.Future>>); + @override + _i8.Future ping({ + String? requestID, + int? retryCount = 1, + }) => + (super.noSuchMethod( + Invocation.method( + #ping, + [], + { + #requestID: requestID, + #retryCount: retryCount, + }, + ), + returnValue: _i8.Future.value(false), + ) as _i8.Future); @override _i8.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: - Future>.value({})) - as _i8.Future>); + Invocation.method( + #getBlockHeadTip, + [], + {#requestID: requestID}, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); @override _i8.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i8 - .Future>); - @override - _i8.Future broadcastTransaction({String? rawTx, String? requestID}) => + Invocation.method( + #getServerFeatures, + [], + {#requestID: requestID}, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future broadcastTransaction({ + required String? rawTx, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], - {#rawTx: rawTx, #requestID: requestID}), - returnValue: Future.value('')) as _i8.Future); - @override - _i8.Future> getBalance( - {String? scripthash, String? requestID}) => + Invocation.method( + #broadcastTransaction, + [], + { + #rawTx: rawTx, + #requestID: requestID, + }, + ), + returnValue: _i8.Future.value(''), + ) as _i8.Future); + @override + _i8.Future> getBalance({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future>> getHistory( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBalance, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future>> getHistory({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) - as _i8.Future>>); + Invocation.method( + #getHistory, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i8.Future>>.value( + >[]), + ) as _i8.Future>>); @override _i8.Future>>> getBatchHistory( - {Map>? args}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i8 - .Future>>>); - @override - _i8.Future>> getUTXOs( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBatchHistory, + [], + {#args: args}, + ), + returnValue: _i8.Future>>>.value( + >>{}), + ) as _i8.Future>>>); + @override + _i8.Future>> getUTXOs({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) as _i8 - .Future>>); + Invocation.method( + #getUTXOs, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i8.Future>>.value( + >[]), + ) as _i8.Future>>); @override _i8.Future>>> getBatchUTXOs( - {Map>? args}) => - (super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i8 - .Future>>>); - @override - _i8.Future> getTransaction( - {String? txHash, bool? verbose = true, String? requestID}) => - (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #verbose: verbose, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future> getAnonymitySet( - {String? groupId = r'1', - String? blockhash = r'', - String? requestID}) => - (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID - }), - returnValue: - Future>.value({})) - as _i8.Future>); - @override - _i8.Future getMintData({dynamic mints, String? requestID}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method( - #getMintData, [], {#mints: mints, #requestID: requestID}), - returnValue: Future.value()) as _i8.Future); - @override - _i8.Future> getUsedCoinSerials( - {String? requestID, int? startNumber}) => + Invocation.method( + #getBatchUTXOs, + [], + {#args: args}, + ), + returnValue: _i8.Future>>>.value( + >>{}), + ) as _i8.Future>>>); + @override + _i8.Future> getTransaction({ + required String? txHash, + bool? verbose = true, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#requestID: requestID, #startNumber: startNumber}), - returnValue: - Future>.value({})) - as _i8.Future>); + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future> getAnonymitySet({ + String? groupId = r'1', + String? blockhash = r'', + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future getMintData({ + dynamic mints, + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getMintData, + [], + { + #mints: mints, + #requestID: requestID, + }, + ), + returnValue: _i8.Future.value(), + ) as _i8.Future); + @override + _i8.Future> getUsedCoinSerials({ + String? requestID, + required int? startNumber, + }) => + (super.noSuchMethod( + Invocation.method( + #getUsedCoinSerials, + [], + { + #requestID: requestID, + #startNumber: startNumber, + }, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); @override _i8.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLatestCoinId, [], {#requestID: requestID}), - returnValue: Future.value(0)) as _i8.Future); - @override - _i8.Future> getFeeRate({String? requestID}) => (super - .noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i8 - .Future>); - @override - _i8.Future<_i3.Decimal> estimateFee({String? requestID, int? blocks}) => + Invocation.method( + #getLatestCoinId, + [], + {#requestID: requestID}, + ), + returnValue: _i8.Future.value(0), + ) as _i8.Future); + @override + _i8.Future> getFeeRate({String? requestID}) => + (super.noSuchMethod( + Invocation.method( + #getFeeRate, + [], + {#requestID: requestID}, + ), + returnValue: + _i8.Future>.value({}), + ) as _i8.Future>); + @override + _i8.Future<_i3.Decimal> estimateFee({ + String? requestID, + required int? blocks, + }) => (super.noSuchMethod( - Invocation.method( - #estimateFee, [], {#requestID: requestID, #blocks: blocks}), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + )), + ) as _i8.Future<_i3.Decimal>); @override _i8.Future<_i3.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: Future<_i3.Decimal>.value(_FakeDecimal_1())) - as _i8.Future<_i3.Decimal>); + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + returnValue: _i8.Future<_i3.Decimal>.value(_FakeDecimal_1( + this, + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + )), + ) as _i8.Future<_i3.Decimal>); } diff --git a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart index d86949a61f..a81c27fe03 100644 --- a/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart +++ b/test/services/coins/namecoin/namecoin_wallet_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/coins/namecoin/namecoin_wallet_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'package:decimal/decimal.dart' as _i2; @@ -25,12 +26,37 @@ import 'package:tuple/tuple.dart' as _i10; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {} +class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal { + _FakeDecimal_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakePrefs_1 extends _i1.Fake implements _i3.Prefs {} +class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs { + _FakePrefs_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeClient_2 extends _i1.Fake implements _i4.Client {} +class _FakeClient_2 extends _i1.SmartFake implements _i4.Client { + _FakeClient_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ElectrumX]. /// @@ -41,187 +67,346 @@ class MockElectrumX extends _i1.Mock implements _i5.ElectrumX { } @override - set failovers(List<_i5.ElectrumXNode>? _failovers) => - super.noSuchMethod(Invocation.setter(#failovers, _failovers), - returnValueForMissingStub: null); + set failovers(List<_i5.ElectrumXNode>? _failovers) => super.noSuchMethod( + Invocation.setter( + #failovers, + _failovers, + ), + returnValueForMissingStub: null, + ); @override - int get currentFailoverIndex => - (super.noSuchMethod(Invocation.getter(#currentFailoverIndex), - returnValue: 0) as int); + int get currentFailoverIndex => (super.noSuchMethod( + Invocation.getter(#currentFailoverIndex), + returnValue: 0, + ) as int); @override set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod( - Invocation.setter(#currentFailoverIndex, _currentFailoverIndex), - returnValueForMissingStub: null); - @override - String get host => - (super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i6.Future request( - {String? command, - List? args = const [], - Duration? connectionTimeout = const Duration(seconds: 60), - String? requestID, - int? retries = 2}) => + Invocation.setter( + #currentFailoverIndex, + _currentFailoverIndex, + ), + returnValueForMissingStub: null, + ); + @override + String get host => (super.noSuchMethod( + Invocation.getter(#host), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i6.Future request({ + required String? command, + List? args = const [], + Duration? connectionTimeout = const Duration(seconds: 60), + String? requestID, + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#request, [], { + Invocation.method( + #request, + [], + { #command: command, #args: args, #connectionTimeout: connectionTimeout, #requestID: requestID, - #retries: retries - }), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future>> batchRequest( - {String? command, - Map>? args, - Duration? connectionTimeout = const Duration(seconds: 60), - int? retries = 2}) => + #retries: retries, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future>> batchRequest({ + required String? command, + required Map>? args, + Duration? connectionTimeout = const Duration(seconds: 60), + int? retries = 2, + }) => (super.noSuchMethod( - Invocation.method(#batchRequest, [], { - #command: command, - #args: args, - #connectionTimeout: connectionTimeout, - #retries: retries - }), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); - @override - _i6.Future ping({String? requestID, int? retryCount = 1}) => + Invocation.method( + #batchRequest, + [], + { + #command: command, + #args: args, + #connectionTimeout: connectionTimeout, + #retries: retries, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); + @override + _i6.Future ping({ + String? requestID, + int? retryCount = 1, + }) => (super.noSuchMethod( - Invocation.method( - #ping, [], {#requestID: requestID, #retryCount: retryCount}), - returnValue: Future.value(false)) as _i6.Future); + Invocation.method( + #ping, + [], + { + #requestID: requestID, + #retryCount: retryCount, + }, + ), + returnValue: _i6.Future.value(false), + ) as _i6.Future); @override _i6.Future> getBlockHeadTip({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getBlockHeadTip, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future> getServerFeatures({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getServerFeatures, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future broadcastTransaction({String? rawTx, String? requestID}) => + Invocation.method( + #getServerFeatures, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future broadcastTransaction({ + required String? rawTx, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#broadcastTransaction, [], - {#rawTx: rawTx, #requestID: requestID}), - returnValue: Future.value('')) as _i6.Future); - @override - _i6.Future> getBalance( - {String? scripthash, String? requestID}) => + Invocation.method( + #broadcastTransaction, + [], + { + #rawTx: rawTx, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(''), + ) as _i6.Future); + @override + _i6.Future> getBalance({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getBalance, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future>> getHistory( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBalance, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future>> getHistory({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getHistory, [], - {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) - as _i6.Future>>); + Invocation.method( + #getHistory, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchHistory( - {Map>? args}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getBatchHistory, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future>> getUTXOs( - {String? scripthash, String? requestID}) => + Invocation.method( + #getBatchHistory, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future>> getUTXOs({ + required String? scripthash, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}), - returnValue: Future>>.value( - >[])) as _i6 - .Future>>); + Invocation.method( + #getUTXOs, + [], + { + #scripthash: scripthash, + #requestID: requestID, + }, + ), + returnValue: _i6.Future>>.value( + >[]), + ) as _i6.Future>>); @override _i6.Future>>> getBatchUTXOs( - {Map>? args}) => - (super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}), - returnValue: Future>>>.value( - >>{})) as _i6 - .Future>>>); - @override - _i6.Future> getTransaction( - {String? txHash, bool? verbose = true, String? requestID}) => + {required Map>? args}) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #verbose: verbose, #requestID: requestID}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getAnonymitySet( - {String? groupId = r'1', - String? blockhash = r'', - String? requestID}) => + Invocation.method( + #getBatchUTXOs, + [], + {#args: args}, + ), + returnValue: _i6.Future>>>.value( + >>{}), + ) as _i6.Future>>>); + @override + _i6.Future> getTransaction({ + required String? txHash, + bool? verbose = true, + String? requestID, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], { - #groupId: groupId, - #blockhash: blockhash, - #requestID: requestID - }), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future getMintData({dynamic mints, String? requestID}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #verbose: verbose, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getAnonymitySet({ + String? groupId = r'1', + String? blockhash = r'', + String? requestID, + }) => (super.noSuchMethod( - Invocation.method( - #getMintData, [], {#mints: mints, #requestID: requestID}), - returnValue: Future.value()) as _i6.Future); - @override - _i6.Future> getUsedCoinSerials( - {String? requestID, int? startNumber}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #requestID: requestID, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future getMintData({ + dynamic mints, + String? requestID, + }) => + (super.noSuchMethod( + Invocation.method( + #getMintData, + [], + { + #mints: mints, + #requestID: requestID, + }, + ), + returnValue: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future> getUsedCoinSerials({ + String? requestID, + required int? startNumber, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#requestID: requestID, #startNumber: startNumber}), - returnValue: - Future>.value({})) - as _i6.Future>); + Invocation.method( + #getUsedCoinSerials, + [], + { + #requestID: requestID, + #startNumber: startNumber, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); @override _i6.Future getLatestCoinId({String? requestID}) => (super.noSuchMethod( - Invocation.method(#getLatestCoinId, [], {#requestID: requestID}), - returnValue: Future.value(0)) as _i6.Future); - @override - _i6.Future> getFeeRate({String? requestID}) => (super - .noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}), - returnValue: - Future>.value({})) as _i6 - .Future>); - @override - _i6.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) => + Invocation.method( + #getLatestCoinId, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future.value(0), + ) as _i6.Future); + @override + _i6.Future> getFeeRate({String? requestID}) => (super.noSuchMethod( - Invocation.method( - #estimateFee, [], {#requestID: requestID, #blocks: blocks}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #getFeeRate, + [], + {#requestID: requestID}, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future<_i2.Decimal> estimateFee({ + String? requestID, + required int? blocks, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #estimateFee, + [], + { + #requestID: requestID, + #blocks: blocks, + }, + ), + )), + ) as _i6.Future<_i2.Decimal>); @override _i6.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod( - Invocation.method(#relayFee, [], {#requestID: requestID}), - returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0())) - as _i6.Future<_i2.Decimal>); + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0( + this, + Invocation.method( + #relayFee, + [], + {#requestID: requestID}, + ), + )), + ) as _i6.Future<_i2.Decimal>); } /// A class which mocks [CachedElectrumX]. @@ -233,55 +418,98 @@ class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX { } @override - String get server => - (super.noSuchMethod(Invocation.getter(#server), returnValue: '') - as String); - @override - int get port => - (super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int); - @override - bool get useSSL => - (super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false) - as bool); - @override - _i3.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs), - returnValue: _FakePrefs_1()) as _i3.Prefs); - @override - List<_i5.ElectrumXNode> get failovers => - (super.noSuchMethod(Invocation.getter(#failovers), - returnValue: <_i5.ElectrumXNode>[]) as List<_i5.ElectrumXNode>); - @override - _i6.Future> getAnonymitySet( - {String? groupId, String? blockhash = r'', _i8.Coin? coin}) => + String get server => (super.noSuchMethod( + Invocation.getter(#server), + returnValue: '', + ) as String); + @override + int get port => (super.noSuchMethod( + Invocation.getter(#port), + returnValue: 0, + ) as int); + @override + bool get useSSL => (super.noSuchMethod( + Invocation.getter(#useSSL), + returnValue: false, + ) as bool); + @override + _i3.Prefs get prefs => (super.noSuchMethod( + Invocation.getter(#prefs), + returnValue: _FakePrefs_1( + this, + Invocation.getter(#prefs), + ), + ) as _i3.Prefs); + @override + List<_i5.ElectrumXNode> get failovers => (super.noSuchMethod( + Invocation.getter(#failovers), + returnValue: <_i5.ElectrumXNode>[], + ) as List<_i5.ElectrumXNode>); + @override + _i6.Future> getAnonymitySet({ + required String? groupId, + String? blockhash = r'', + required _i8.Coin? coin, + }) => (super.noSuchMethod( - Invocation.method(#getAnonymitySet, [], - {#groupId: groupId, #blockhash: blockhash, #coin: coin}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getTransaction( - {String? txHash, _i8.Coin? coin, bool? verbose = true}) => + Invocation.method( + #getAnonymitySet, + [], + { + #groupId: groupId, + #blockhash: blockhash, + #coin: coin, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getTransaction({ + required String? txHash, + required _i8.Coin? coin, + bool? verbose = true, + }) => (super.noSuchMethod( - Invocation.method(#getTransaction, [], - {#txHash: txHash, #coin: coin, #verbose: verbose}), - returnValue: - Future>.value({})) - as _i6.Future>); - @override - _i6.Future> getUsedCoinSerials( - {_i8.Coin? coin, int? startNumber = 0}) => + Invocation.method( + #getTransaction, + [], + { + #txHash: txHash, + #coin: coin, + #verbose: verbose, + }, + ), + returnValue: + _i6.Future>.value({}), + ) as _i6.Future>); + @override + _i6.Future> getUsedCoinSerials({ + required _i8.Coin? coin, + int? startNumber = 0, + }) => (super.noSuchMethod( - Invocation.method(#getUsedCoinSerials, [], - {#coin: coin, #startNumber: startNumber}), - returnValue: Future>.value([])) - as _i6.Future>); - @override - _i6.Future clearSharedTransactionCache({_i8.Coin? coin}) => + Invocation.method( + #getUsedCoinSerials, + [], + { + #coin: coin, + #startNumber: startNumber, + }, + ), + returnValue: _i6.Future>.value([]), + ) as _i6.Future>); + @override + _i6.Future clearSharedTransactionCache({required _i8.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + Invocation.method( + #clearSharedTransactionCache, + [], + {#coin: coin}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [PriceAPI]. @@ -293,21 +521,35 @@ class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI { } @override - _i4.Client get client => (super.noSuchMethod(Invocation.getter(#client), - returnValue: _FakeClient_2()) as _i4.Client); + _i4.Client get client => (super.noSuchMethod( + Invocation.getter(#client), + returnValue: _FakeClient_2( + this, + Invocation.getter(#client), + ), + ) as _i4.Client); @override void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod( - Invocation.method(#resetLastCalledToForceNextCallToUpdateCache, []), - returnValueForMissingStub: null); - @override - _i6.Future>> - getPricesAnd24hChange({String? baseCurrency}) => (super.noSuchMethod( - Invocation.method( - #getPricesAnd24hChange, [], {#baseCurrency: baseCurrency}), - returnValue: - Future>>.value( - <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{})) - as _i6.Future>>); + Invocation.method( + #resetLastCalledToForceNextCallToUpdateCache, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future< + Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>> getPricesAnd24hChange( + {required String? baseCurrency}) => + (super.noSuchMethod( + Invocation.method( + #getPricesAnd24hChange, + [], + {#baseCurrency: baseCurrency}, + ), + returnValue: + _i6.Future>>.value( + <_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{}), + ) as _i6.Future>>); } /// A class which mocks [TransactionNotificationTracker]. @@ -320,33 +562,52 @@ class MockTransactionNotificationTracker extends _i1.Mock } @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - List get pendings => - (super.noSuchMethod(Invocation.getter(#pendings), returnValue: []) - as List); - @override - List get confirmeds => (super - .noSuchMethod(Invocation.getter(#confirmeds), returnValue: []) - as List); - @override - bool wasNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedPending, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedPending(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedPending, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - bool wasNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#wasNotifiedConfirmed, [txid]), - returnValue: false) as bool); - @override - _i6.Future addNotifiedConfirmed(String? txid) => - (super.noSuchMethod(Invocation.method(#addNotifiedConfirmed, [txid]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + List get pendings => (super.noSuchMethod( + Invocation.getter(#pendings), + returnValue: [], + ) as List); + @override + List get confirmeds => (super.noSuchMethod( + Invocation.getter(#confirmeds), + returnValue: [], + ) as List); + @override + bool wasNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedPending, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedPending(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedPending, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #wasNotifiedConfirmed, + [txid], + ), + returnValue: false, + ) as bool); + @override + _i6.Future addNotifiedConfirmed(String? txid) => (super.noSuchMethod( + Invocation.method( + #addNotifiedConfirmed, + [txid], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } diff --git a/test/services/wallets_service_test.mocks.dart b/test/services/wallets_service_test.mocks.dart index 8033542e62..c553bbf932 100644 --- a/test/services/wallets_service_test.mocks.dart +++ b/test/services/wallets_service_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/services/wallets_service_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'package:flutter_secure_storage/flutter_secure_storage.dart' as _i2; @@ -18,9 +19,18 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeFlutterSecureStorage_0 extends _i1.Fake - implements _i2.FlutterSecureStorage {} +class _FakeFlutterSecureStorage_0 extends _i1.SmartFake + implements _i2.FlutterSecureStorage { + _FakeFlutterSecureStorage_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [SecureStorageWrapper]. /// @@ -33,40 +43,54 @@ class MockSecureStorageWrapper extends _i1.Mock @override _i2.FlutterSecureStorage get secureStore => (super.noSuchMethod( - Invocation.getter(#secureStore), - returnValue: _FakeFlutterSecureStorage_0()) as _i2.FlutterSecureStorage); + Invocation.getter(#secureStore), + returnValue: _FakeFlutterSecureStorage_0( + this, + Invocation.getter(#secureStore), + ), + ) as _i2.FlutterSecureStorage); @override - _i4.Future read( - {String? key, - _i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i4.Future read({ + required String? key, + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#read, [], { + Invocation.method( + #read, + [], + { #key: key, #iOptions: iOptions, #aOptions: aOptions, #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value()) as _i4.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i4.Future.value(), + ) as _i4.Future); @override - _i4.Future write( - {String? key, - String? value, - _i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i4.Future write({ + required String? key, + required String? value, + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#write, [], { + Invocation.method( + #write, + [], + { #key: key, #value: value, #iOptions: iOptions, @@ -74,29 +98,37 @@ class MockSecureStorageWrapper extends _i1.Mock #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i4.Future delete( - {String? key, - _i2.IOSOptions? iOptions, - _i2.AndroidOptions? aOptions, - _i2.LinuxOptions? lOptions, - _i2.WebOptions? webOptions, - _i2.MacOsOptions? mOptions, - _i2.WindowsOptions? wOptions}) => + _i4.Future delete({ + required String? key, + _i2.IOSOptions? iOptions, + _i2.AndroidOptions? aOptions, + _i2.LinuxOptions? lOptions, + _i2.WebOptions? webOptions, + _i2.MacOsOptions? mOptions, + _i2.WindowsOptions? wOptions, + }) => (super.noSuchMethod( - Invocation.method(#delete, [], { + Invocation.method( + #delete, + [], + { #key: key, #iOptions: iOptions, #aOptions: aOptions, #lOptions: lOptions, #webOptions: webOptions, #mOptions: mOptions, - #wOptions: wOptions - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + #wOptions: wOptions, + }, + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); } diff --git a/test/widget_tests/address_book_card_test.dart b/test/widget_tests/address_book_card_test.dart new file mode 100644 index 0000000000..664fe05f3f --- /dev/null +++ b/test/widget_tests/address_book_card_test.dart @@ -0,0 +1,227 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/models/contact.dart'; +import 'package:stackwallet/models/contact_address_entry.dart'; +import 'package:stackwallet/pages/address_book_views/subviews/contact_popup.dart'; +import 'package:stackwallet/providers/global/address_book_service_provider.dart'; +import 'package:stackwallet/services/address_book_service.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/address_book_card.dart'; + +import 'address_book_card_test.mocks.dart'; + +class MockedFunctions extends Mock { + void showDialog(); +} + +@GenerateMocks([AddressBookService]) +void main() { + group('Navigation tests', () { + late AddressBookService service; + setUp(() { + service = MockAddressBookService(); + + when(service.getContactById("some id")) + .thenAnswer((realInvocation) => Contact( + name: "John Doe", + addresses: [ + const ContactAddressEntry( + coin: Coin.bitcoincash, + address: "some bch address", + label: "Bills") + ], + isFavorite: true)); + }); + + testWidgets('test returns Contact Address Entry', (widgetTester) async { + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + addressBookServiceProvider.overrideWithValue( + service, + ), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const AddressBookCard( + contactId: "some id", + ), + ), + ), + ); + + expect(find.text("John Doe"), findsOneWidget); + expect(find.text(Coin.bitcoincash.ticker), findsOneWidget); + }); + + // testWidgets("Test button press opens dialog", (widgetTester) async { + // // final service = MockAddressBookService(); + // + // when(service.getContactById("some id")) + // .thenAnswer((realInvocation) => Contact( + // name: "John Doe", + // addresses: [ + // const ContactAddressEntry( + // coin: Coin.bitcoincash, + // address: "some bch address", + // label: "Bills") + // ], + // isFavorite: true)); + // + // await widgetTester.pumpWidget( + // ProviderScope( + // overrides: [ + // addressBookServiceProvider.overrideWithValue( + // service, + // ), + // ], + // child: MaterialApp( + // theme: ThemeData( + // extensions: [ + // StackColors.fromStackColorTheme( + // LightColors(), + // ), + // ], + // ), + // home: const AddressBookCard( + // contactId: "some id", + // ), + // ), + // ), + // ); + // // + // // when(service.getContactById("03177ce0-4af4-11ed-9617-af8aa7a3796f")) + // // .thenAnswer((realInvocation) => Contact( + // // name: "John Doe", + // // addresses: [ + // // const ContactAddressEntry( + // // coin: Coin.bitcoincash, + // // address: "some bch address", + // // label: "Bills") + // // ], + // // isFavorite: true)); + // await widgetTester.tap(find.byType(RawMaterialButton)); + // // verify(MockedFunctions().showDialog()).called(1); + // await widgetTester.pump(); + // when(service.getContactById("03177ce0-4af4-11ed-9617-af8aa7a3796f")) + // .thenAnswer((realInvocation) => Contact( + // name: "John Doe", + // addresses: [ + // const ContactAddressEntry( + // coin: Coin.bitcoincash, + // address: "some bch address", + // label: "Bills") + // ], + // isFavorite: true)); + // + // expect( + // find.byWidget(const ContactPopUp( + // contactId: "03177ce0-4af4-11ed-9617-af8aa7a3796f")), + // findsOneWidget); + // // await widgetTester.pump(); + // // // when(contact) + // // await widgetTester.pump(); + // }); + }); + + // testWidgets('test returns Contact Address Entry', (widgetTester) async { + // // final service = MockAddressBookService(); + // // when(service.getContactById("some id")) + // // .thenAnswer((realInvocation) => Contact( + // // name: "John Doe", + // // addresses: [ + // // const ContactAddressEntry( + // // coin: Coin.bitcoincash, + // // address: "some bch address", + // // label: "Bills") + // // ], + // // isFavorite: true)); + // + // await widgetTester.pumpWidget( + // ProviderScope( + // overrides: [ + // addressBookServiceProvider.overrideWithValue( + // serv, + // ), + // ], + // child: MaterialApp( + // theme: ThemeData( + // extensions: [ + // StackColors.fromStackColorTheme( + // LightColors(), + // ), + // ], + // ), + // home: const AddressBookCard( + // contactId: "some id", + // ), + // ), + // ), + // ); + // + // expect(find.text("John Doe"), findsOneWidget); + // expect(find.text(Coin.bitcoincash.ticker), findsOneWidget); + // }); + + // testWidgets("Test button press opens dialog", (widgetTester) async { + // final service = MockAddressBookService(); + // + // // when(service.getContactById("some id")) + // // .thenAnswer((realInvocation) => Contact( + // // name: "John Doe", + // // addresses: [ + // // const ContactAddressEntry( + // // coin: Coin.bitcoincash, + // // address: "some bch address", + // // label: "Bills") + // // ], + // // isFavorite: true)); + // + // await widgetTester.pumpWidget( + // ProviderScope( + // overrides: [ + // addressBookServiceProvider.overrideWithValue( + // service, + // ), + // ], + // child: MaterialApp( + // theme: ThemeData( + // extensions: [ + // StackColors.fromStackColorTheme( + // LightColors(), + // ), + // ], + // ), + // home: const AddressBookCard( + // contactId: "03177ce0-4af4-11ed-9617-af8aa7a3796f", + // ), + // ), + // ), + // ); + // // + // // when(service.getContactById("03177ce0-4af4-11ed-9617-af8aa7a3796f")) + // // .thenAnswer((realInvocation) => Contact( + // // name: "John Doe", + // // addresses: [ + // // const ContactAddressEntry( + // // coin: Coin.bitcoincash, + // // address: "some bch address", + // // label: "Bills") + // // ], + // // isFavorite: true)); + // // await widgetTester.tap(find.byType(RawMaterialButton)); + // // // when(contact) + // // await widgetTester.pump(); + // }); +} diff --git a/test/widget_tests/address_book_card_test.mocks.dart b/test/widget_tests/address_book_card_test.mocks.dart new file mode 100644 index 0000000000..550095d265 --- /dev/null +++ b/test/widget_tests/address_book_card_test.mocks.dart @@ -0,0 +1,153 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/widget_tests/address_book_card_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i4; +import 'dart:ui' as _i5; + +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/models/contact.dart' as _i2; +import 'package:stackwallet/services/address_book_service.dart' as _i3; + +// 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 +// ignore_for_file: subtype_of_sealed_class + +class _FakeContact_0 extends _i1.SmartFake implements _i2.Contact { + _FakeContact_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [AddressBookService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockAddressBookService extends _i1.Mock + implements _i3.AddressBookService { + MockAddressBookService() { + _i1.throwOnMissingStub(this); + } + + @override + List<_i2.Contact> get contacts => (super.noSuchMethod( + Invocation.getter(#contacts), + returnValue: <_i2.Contact>[], + ) as List<_i2.Contact>); + @override + _i4.Future> get addressBookEntries => (super.noSuchMethod( + Invocation.getter(#addressBookEntries), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i2.Contact getContactById(String? id) => (super.noSuchMethod( + Invocation.method( + #getContactById, + [id], + ), + returnValue: _FakeContact_0( + this, + Invocation.method( + #getContactById, + [id], + ), + ), + ) as _i2.Contact); + @override + _i4.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i4.Future>.value(<_i2.Contact>[]), + ) as _i4.Future>); + @override + bool matches( + String? term, + _i2.Contact? contact, + ) => + (super.noSuchMethod( + Invocation.method( + #matches, + [ + term, + contact, + ], + ), + returnValue: false, + ) as bool); + @override + _i4.Future addContact(_i2.Contact? contact) => (super.noSuchMethod( + Invocation.method( + #addContact, + [contact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); + @override + _i4.Future editContact(_i2.Contact? editedContact) => + (super.noSuchMethod( + Invocation.method( + #editContact, + [editedContact], + ), + returnValue: _i4.Future.value(false), + ) as _i4.Future); + @override + _i4.Future removeContact(String? id) => (super.noSuchMethod( + Invocation.method( + #removeContact, + [id], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} diff --git a/test/widget_tests/animated_text_test.dart b/test/widget_tests/animated_text_test.dart new file mode 100644 index 0000000000..ba2610dc52 --- /dev/null +++ b/test/widget_tests/animated_text_test.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/animated_text.dart'; + +void main() { + testWidgets("Widget displays first word in strings list", + (widgetTester) async { + const animatedText = AnimatedText( + stringsToLoopThrough: [ + "Calculating", + "Calculating.", + "Calculating..", + "Calculating...", + ], + style: TextStyle( + color: null, + fontWeight: FontWeight.w500, + fontSize: 14, + )); + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: animatedText, + ), + ), + ); + + expect(find.text("Calculating"), findsOneWidget); + expect(find.byWidget(animatedText), findsOneWidget); + }); +} diff --git a/test/widget_tests/custom_loading_overlay_test.dart b/test/widget_tests/custom_loading_overlay_test.dart new file mode 100644 index 0000000000..2e1ac48465 --- /dev/null +++ b/test/widget_tests/custom_loading_overlay_test.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/custom_loading_overlay.dart'; + +void main() { + testWidgets("Test wiget displays correct text", (widgetTester) async { + const customLoadingOverlay = + CustomLoadingOverlay(message: "Updating exchange rate", eventBus: null); + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: customLoadingOverlay, + ), + ), + ); + + expect(find.text("Updating exchange rate"), findsOneWidget); + }); +} diff --git a/test/widget_tests/emoji_select_sheet_test.dart b/test/widget_tests/emoji_select_sheet_test.dart new file mode 100644 index 0000000000..368a1d99b5 --- /dev/null +++ b/test/widget_tests/emoji_select_sheet_test.dart @@ -0,0 +1,60 @@ +import 'package:emojis/emoji.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:mockingjay/mockingjay.dart' as mockingjay; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/emoji_select_sheet.dart'; + +void main() { + testWidgets("Widget displays correctly", (tester) async { + const emojiSelectSheet = EmojiSelectSheet(); + + await tester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: emojiSelectSheet, + ), + ), + ); + + expect(find.byWidget(emojiSelectSheet), findsOneWidget); + expect(find.text("Select emoji"), findsOneWidget); + }); + + testWidgets("Emoji tapped test", (tester) async { + const emojiSelectSheet = EmojiSelectSheet(); + + final navigator = mockingjay.MockNavigator(); + + await tester.pumpWidget( + ProviderScope( + overrides: [], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: mockingjay.MockNavigatorProvider( + navigator: navigator, child: emojiSelectSheet), + ), + ), + ); + + final gestureDetector = find.byType(GestureDetector).first; + expect(gestureDetector, findsOneWidget); + + final emoji = Emoji.all()[0]; + + await tester.tap(gestureDetector); + await tester.pumpAndSettle(); + mockingjay.verify(() => navigator.pop(emoji)).called(1); + }); +} diff --git a/test/widget_tests/managed_favorite_test.dart b/test/widget_tests/managed_favorite_test.dart new file mode 100644 index 0000000000..4caaad89d0 --- /dev/null +++ b/test/widget_tests/managed_favorite_test.dart @@ -0,0 +1,191 @@ +import 'dart:ffi'; + +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart'; +import 'package:stackwallet/services/coins/coin_service.dart'; +import 'package:stackwallet/services/coins/manager.dart'; +import 'package:stackwallet/services/locale_service.dart'; +import 'package:stackwallet/services/node_service.dart'; +import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/utilities/listenable_list.dart'; +import 'package:stackwallet/widgets/managed_favorite.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; + +import 'managed_favorite_test.mocks.dart'; + +@GenerateMocks([ + Wallets, + WalletsService, + BitcoinWallet, + LocaleService +], customMocks: [ + MockSpec(returnNullOnMissingStub: true), + MockSpec(returnNullOnMissingStub: true), + MockSpec(returnNullOnMissingStub: true), +]) +void main() { + testWidgets("Test wallet info row displays correctly", (widgetTester) async { + final wallets = MockWallets(); + final CoinServiceAPI wallet = MockBitcoinWallet(); + + when(wallet.coin).thenAnswer((_) => Coin.bitcoin); + when(wallet.walletName).thenAnswer((_) => "some wallet"); + when(wallet.walletId).thenAnswer((_) => "some wallet id"); + + final manager = Manager(wallet); + when(wallets.getManager("some wallet id")) + .thenAnswer((realInvocation) => manager); + + when(manager.isFavorite).thenAnswer((realInvocation) => false); + const managedFavorite = ManagedFavorite(walletId: "some wallet id"); + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const Material( + child: managedFavorite, + ), + ), + ), + ); + + expect(find.byType(ManagedFavorite), findsOneWidget); + }); + + testWidgets("Button Pressed - wallet unfavorite", (widgetTester) async { + final wallets = MockWallets(); + final CoinServiceAPI wallet = MockBitcoinWallet(); + final mockLocaleService = MockLocaleService(); + final mockWalletsService = MockWalletsService(); + + when(wallet.coin).thenAnswer((_) => Coin.bitcoin); + when(wallet.walletName).thenAnswer((_) => "some wallet"); + when(wallet.walletId).thenAnswer((_) => "some wallet id"); + + final manager = Manager(wallet); + + when(wallets.getManager("some wallet id")) + .thenAnswer((realInvocation) => manager); + + when(manager.isFavorite).thenAnswer((realInvocation) => false); + + when(mockLocaleService.locale).thenAnswer((_) => "en_US"); + + when(wallets.getManagerProvider("some wallet id")).thenAnswer( + (realInvocation) => ChangeNotifierProvider((ref) => manager)); + + const managedFavorite = ManagedFavorite(walletId: "some wallet id"); + + final ListenableList> favorites = + ListenableList(); + + final ListenableList> nonfavorites = + ListenableList(); + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + localeServiceChangeNotifierProvider + .overrideWithValue(mockLocaleService), + favoritesProvider.overrideWithValue(favorites), + nonFavoritesProvider.overrideWithValue(nonfavorites), + walletsServiceChangeNotifierProvider + .overrideWithValue(mockWalletsService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const Material( + child: managedFavorite, + ), + ), + ), + ); + + expect(find.byType(RawMaterialButton), findsOneWidget); + await widgetTester.tap(find.byType(RawMaterialButton)); + await widgetTester.pump(); + }); + + testWidgets("Button Pressed - wallet is favorite", (widgetTester) async { + final wallets = MockWallets(); + final CoinServiceAPI wallet = MockBitcoinWallet(); + final mockLocaleService = MockLocaleService(); + final mockWalletsService = MockWalletsService(); + + when(wallet.coin).thenAnswer((_) => Coin.bitcoin); + when(wallet.walletName).thenAnswer((_) => "some wallet"); + when(wallet.walletId).thenAnswer((_) => "some wallet id"); + + final manager = Manager(wallet); + + when(wallets.getManager("some wallet id")) + .thenAnswer((realInvocation) => manager); + + when(manager.isFavorite).thenAnswer((realInvocation) => true); + + when(mockLocaleService.locale).thenAnswer((_) => "en_US"); + + when(wallets.getManagerProvider("some wallet id")).thenAnswer( + (realInvocation) => ChangeNotifierProvider((ref) => manager)); + + const managedFavorite = ManagedFavorite(walletId: "some wallet id"); + + final ListenableList> favorites = + ListenableList(); + + final ListenableList> nonfavorites = + ListenableList(); + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + localeServiceChangeNotifierProvider + .overrideWithValue(mockLocaleService), + favoritesProvider.overrideWithValue(favorites), + nonFavoritesProvider.overrideWithValue(nonfavorites), + walletsServiceChangeNotifierProvider + .overrideWithValue(mockWalletsService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const Material( + child: managedFavorite, + ), + ), + ), + ); + + expect(find.byType(RawMaterialButton), findsOneWidget); + await widgetTester.tap(find.byType(RawMaterialButton)); + await widgetTester.pump(); + }); +} diff --git a/test/widget_tests/managed_favorite_test.mocks.dart b/test/widget_tests/managed_favorite_test.mocks.dart new file mode 100644 index 0000000000..7d1d864dfc --- /dev/null +++ b/test/widget_tests/managed_favorite_test.mocks.dart @@ -0,0 +1,2294 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/widget_tests/managed_favorite_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i16; +import 'dart:ui' as _i18; + +import 'package:decimal/decimal.dart' as _i9; +import 'package:flutter/foundation.dart' as _i4; +import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10; +import 'package:stackwallet/models/models.dart' as _i8; +import 'package:stackwallet/models/node_model.dart' as _i21; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i19; +import 'package:stackwallet/services/coins/coin_service.dart' as _i13; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/locale_service.dart' as _i20; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/services/transaction_notification_tracker.dart' + as _i7; +import 'package:stackwallet/services/wallets.dart' as _i14; +import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i15; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i12; +import 'package:stackwallet/utilities/prefs.dart' as _i17; + +// 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 +// ignore_for_file: subtype_of_sealed_class + +class _FakeWalletsService_0 extends _i1.SmartFake + implements _i2.WalletsService { + _FakeWalletsService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeNodeService_1 extends _i1.SmartFake implements _i3.NodeService { + _FakeNodeService_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeChangeNotifierProvider_2 + extends _i1.SmartFake implements _i5.ChangeNotifierProvider { + _FakeChangeNotifierProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager { + _FakeManager_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionNotificationTracker_4 extends _i1.SmartFake + implements _i7.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUtxoData_5 extends _i1.SmartFake implements _i8.UtxoData { + _FakeUtxoData_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_6 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFeeObject_7 extends _i1.SmartFake implements _i8.FeeObject { + _FakeFeeObject_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionData_8 extends _i1.SmartFake + implements _i8.TransactionData { + _FakeTransactionData_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_9 extends _i1.SmartFake implements _i10.ElectrumX { + _FakeElectrumX_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCachedElectrumX_10 extends _i1.SmartFake + implements _i11.CachedElectrumX { + _FakeCachedElectrumX_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXNode_11 extends _i1.SmartFake + implements _i10.ElectrumXNode { + _FakeElectrumXNode_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFlutterSecureStorageInterface_12 extends _i1.SmartFake + implements _i12.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_13 extends _i1.SmartFake + implements _i13.CoinServiceAPI { + _FakeCoinServiceAPI_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallets]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWallets extends _i1.Mock implements _i14.Wallets { + MockWallets() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.WalletsService get walletsService => (super.noSuchMethod( + Invocation.getter(#walletsService), + returnValue: _FakeWalletsService_0( + this, + Invocation.getter(#walletsService), + ), + ) as _i2.WalletsService); + @override + set walletsService(_i2.WalletsService? _walletsService) => super.noSuchMethod( + Invocation.setter( + #walletsService, + _walletsService, + ), + returnValueForMissingStub: null, + ); + @override + _i3.NodeService get nodeService => (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_1( + this, + Invocation.getter(#nodeService), + ), + ) as _i3.NodeService); + @override + set nodeService(_i3.NodeService? _nodeService) => super.noSuchMethod( + Invocation.setter( + #nodeService, + _nodeService, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasWallets => (super.noSuchMethod( + Invocation.getter(#hasWallets), + returnValue: false, + ) as bool); + @override + List<_i5.ChangeNotifierProvider<_i6.Manager>> get managerProviders => + (super.noSuchMethod( + Invocation.getter(#managerProviders), + returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[], + ) as List<_i5.ChangeNotifierProvider<_i6.Manager>>); + @override + List<_i6.Manager> get managers => (super.noSuchMethod( + Invocation.getter(#managers), + returnValue: <_i6.Manager>[], + ) as List<_i6.Manager>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + List getWalletIdsFor({required _i15.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #getWalletIdsFor, + [], + {#coin: coin}, + ), + returnValue: [], + ) as List); + @override + Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + getManagerProvidersByCoin() => (super.noSuchMethod( + Invocation.method( + #getManagerProvidersByCoin, + [], + ), + returnValue: <_i15.Coin, + List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, + ) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + @override + _i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider( + String? walletId) => + (super.noSuchMethod( + Invocation.method( + #getManagerProvider, + [walletId], + ), + returnValue: _FakeChangeNotifierProvider_2<_i6.Manager>( + this, + Invocation.method( + #getManagerProvider, + [walletId], + ), + ), + ) as _i5.ChangeNotifierProvider<_i6.Manager>); + @override + _i6.Manager getManager(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getManager, + [walletId], + ), + returnValue: _FakeManager_3( + this, + Invocation.method( + #getManager, + [walletId], + ), + ), + ) as _i6.Manager); + @override + void addWallet({ + required String? walletId, + required _i6.Manager? manager, + }) => + super.noSuchMethod( + Invocation.method( + #addWallet, + [], + { + #walletId: walletId, + #manager: manager, + }, + ), + returnValueForMissingStub: null, + ); + @override + void removeWallet({required String? walletId}) => super.noSuchMethod( + Invocation.method( + #removeWallet, + [], + {#walletId: walletId}, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future load(_i17.Prefs? prefs) => (super.noSuchMethod( + Invocation.method( + #load, + [prefs], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future loadAfterStackRestore( + _i17.Prefs? prefs, + List<_i6.Manager>? managers, + ) => + (super.noSuchMethod( + Invocation.method( + #loadAfterStackRestore, + [ + prefs, + managers, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [WalletsService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWalletsService extends _i1.Mock implements _i2.WalletsService { + MockWalletsService() { + _i1.throwOnMissingStub(this); + } + + @override + _i16.Future> get walletNames => + (super.noSuchMethod( + Invocation.getter(#walletNames), + returnValue: _i16.Future>.value( + {}), + ) as _i16.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { + #from: from, + #to: to, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i15.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addExistingStackWallet, + [], + { + #name: name, + #walletId: walletId, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addNewWallet({ + required String? name, + required _i15.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addNewWallet, + [], + { + #name: name, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future saveFavoriteWalletIds(List? walletIds) => + (super.noSuchMethod( + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future isMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future setMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [BitcoinWallet]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBitcoinWallet extends _i1.Mock implements _i19.BitcoinWallet { + MockBitcoinWallet() { + _i1.throwOnMissingStub(this); + } + + @override + set timer(_i16.Timer? _timer) => super.noSuchMethod( + Invocation.setter( + #timer, + _timer, + ), + returnValueForMissingStub: null, + ); + @override + _i7.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + Invocation.getter(#txTracker), + returnValue: _FakeTransactionNotificationTracker_4( + this, + Invocation.getter(#txTracker), + ), + ) as _i7.TransactionNotificationTracker); + @override + set txTracker(_i7.TransactionNotificationTracker? _txTracker) => + super.noSuchMethod( + Invocation.setter( + #txTracker, + _txTracker, + ), + returnValueForMissingStub: null, + ); + @override + List<_i8.UtxoObject> get outputsList => (super.noSuchMethod( + Invocation.getter(#outputsList), + returnValue: <_i8.UtxoObject>[], + ) as List<_i8.UtxoObject>); + @override + set outputsList(List<_i8.UtxoObject>? _outputsList) => super.noSuchMethod( + Invocation.setter( + #outputsList, + _outputsList, + ), + returnValueForMissingStub: null, + ); + @override + bool get longMutex => (super.noSuchMethod( + Invocation.getter(#longMutex), + returnValue: false, + ) as bool); + @override + set longMutex(bool? _longMutex) => super.noSuchMethod( + Invocation.setter( + #longMutex, + _longMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get refreshMutex => (super.noSuchMethod( + Invocation.getter(#refreshMutex), + returnValue: false, + ) as bool); + @override + set refreshMutex(bool? _refreshMutex) => super.noSuchMethod( + Invocation.setter( + #refreshMutex, + _refreshMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get isActive => (super.noSuchMethod( + Invocation.getter(#isActive), + returnValue: false, + ) as bool); + @override + set isActive(bool? _isActive) => super.noSuchMethod( + Invocation.setter( + #isActive, + _isActive, + ), + returnValueForMissingStub: null, + ); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.UtxoData> get utxoData => (super.noSuchMethod( + Invocation.getter(#utxoData), + returnValue: _i16.Future<_i8.UtxoData>.value(_FakeUtxoData_5( + this, + Invocation.getter(#utxoData), + )), + ) as _i16.Future<_i8.UtxoData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future get currentLegacyReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentLegacyReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddressP2SH => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddressP2SH), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future get chainHeight => (super.noSuchMethod( + Invocation.getter(#chainHeight), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + int get storedChainHeight => (super.noSuchMethod( + Invocation.getter(#storedChainHeight), + returnValue: 0, + ) as int); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + _i10.ElectrumX get electrumXClient => (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumX_9( + this, + Invocation.getter(#electrumXClient), + ), + ) as _i10.ElectrumX); + @override + _i11.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + Invocation.getter(#cachedElectrumXClient), + returnValue: _FakeCachedElectrumX_10( + this, + Invocation.getter(#cachedElectrumXClient), + ), + ) as _i11.CachedElectrumX); + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateStoredChainHeight({required int? newHeight}) => + (super.noSuchMethod( + Invocation.method( + #updateStoredChainHeight, + [], + {#newHeight: newHeight}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i19.DerivePathType addressType({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #addressType, + [], + {#address: address}, + ), + returnValue: _i19.DerivePathType.bip44, + ) as _i19.DerivePathType); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future getTransactionCacheEarly(List? allAddresses) => + (super.noSuchMethod( + Invocation.method( + #getTransactionCacheEarly, + [allAddresses], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refreshIfThereIsNewData() => (super.noSuchMethod( + Invocation.method( + #refreshIfThereIsNewData, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future getAllTxsToWatch(_i8.TransactionData? txData) => + (super.noSuchMethod( + Invocation.method( + #getAllTxsToWatch, + [txData], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void startNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #startNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + void stopNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #stopNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + Invocation.method( + #getCurrentNode, + [], + ), + returnValue: + _i16.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_11( + this, + Invocation.method( + #getCurrentNode, + [], + ), + )), + ) as _i16.Future<_i10.ElectrumXNode>); + @override + _i16.Future addDerivation({ + required int? chain, + required String? address, + required String? pubKey, + required String? wif, + required _i19.DerivePathType? derivePathType, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivation, + [], + { + #chain: chain, + #address: address, + #pubKey: pubKey, + #wif: wif, + #derivePathType: derivePathType, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addDerivations({ + required int? chain, + required _i19.DerivePathType? derivePathType, + required Map? derivationsToAdd, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivations, + [], + { + #chain: chain, + #derivePathType: derivePathType, + #derivationsToAdd: derivationsToAdd, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future getTxCount({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #getTxCount, + [], + {#address: address}, + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future checkCurrentReceivingAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentReceivingAddressesForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future checkCurrentChangeAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentChangeAddressesForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future>> fastFetch( + List? allTxHashes) => + (super.noSuchMethod( + Invocation.method( + #fastFetch, + [allTxHashes], + ), + returnValue: _i16.Future>>.value( + >[]), + ) as _i16.Future>>); + @override + int estimateTxFee({ + required int? vSize, + required int? feeRatePerKB, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateTxFee, + [], + { + #vSize: vSize, + #feeRatePerKB: feeRatePerKB, + }, + ), + returnValue: 0, + ) as int); + @override + dynamic coinSelection( + int? satoshiAmountToSend, + int? selectedTxFeeRate, + String? _recipientAddress, + bool? isSendAll, { + int? additionalOutputs = 0, + List<_i8.UtxoObject>? utxos, + }) => + super.noSuchMethod(Invocation.method( + #coinSelection, + [ + satoshiAmountToSend, + selectedTxFeeRate, + _recipientAddress, + isSendAll, + ], + { + #additionalOutputs: additionalOutputs, + #utxos: utxos, + }, + )); + @override + _i16.Future> fetchBuildTxData( + List<_i8.UtxoObject>? utxosToUse) => + (super.noSuchMethod( + Invocation.method( + #fetchBuildTxData, + [utxosToUse], + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future> buildTransaction({ + required List<_i8.UtxoObject>? utxosToUse, + required Map? utxoSigningData, + required List? recipients, + required List? satoshiAmounts, + }) => + (super.noSuchMethod( + Invocation.method( + #buildTransaction, + [], + { + #utxosToUse: utxosToUse, + #utxoSigningData: utxoSigningData, + #recipients: recipients, + #satoshiAmounts: satoshiAmounts, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + int roughFeeEstimate( + int? inputCount, + int? outputCount, + int? feeRatePerKB, + ) => + (super.noSuchMethod( + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + returnValue: 0, + ) as int); + @override + int sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + returnValue: 0, + ) as int); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); +} + +/// A class which mocks [LocaleService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockLocaleService extends _i1.Mock implements _i20.LocaleService { + MockLocaleService() { + _i1.throwOnMissingStub(this); + } + + @override + 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 + _i16.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [NodeService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockNodeService extends _i1.Mock implements _i3.NodeService { + @override + _i12.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_12( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i12.FlutterSecureStorageInterface); + @override + List<_i21.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i21.NodeModel>[], + ) as List<_i21.NodeModel>); + @override + List<_i21.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i21.NodeModel>[], + ) as List<_i21.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future setPrimaryNodeFor({ + required _i15.Coin? coin, + required _i21.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i21.NodeModel? getPrimaryNodeFor({required _i15.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i21.NodeModel?); + @override + List<_i21.NodeModel> getNodesFor(_i15.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i21.NodeModel>[], + ) as List<_i21.NodeModel>); + @override + _i21.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i21.NodeModel?); + @override + List<_i21.NodeModel> failoverNodesFor({required _i15.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i21.NodeModel>[], + ) as List<_i21.NodeModel>); + @override + _i16.Future add( + _i21.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future setEnabledState( + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future edit( + _i21.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [Manager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockManager extends _i1.Mock implements _i6.Manager { + @override + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i13.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_13( + this, + Invocation.getter(#wallet), + ), + ) as _i13.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [CoinServiceAPI]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockCoinServiceAPI extends _i1.Mock implements _i13.CoinServiceAPI { + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); +} diff --git a/test/widget_tests/node_card_test.dart b/test/widget_tests/node_card_test.dart index 65f31c6307..47209db584 100644 --- a/test/widget_tests/node_card_test.dart +++ b/test/widget_tests/node_card_test.dart @@ -1,586 +1,204 @@ -// import 'package:flutter/material.dart'; -// import 'package:flutter_svg/svg.dart'; -// import 'package:flutter_test/flutter_test.dart'; -// import 'package:mockingjay/mockingjay.dart' as mockingjay; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:mockito/annotations.dart'; -// import 'package:mockito/mockito.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/models/node_model.dart'; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/services/node_service.dart'; -// import 'package:stackwallet/widgets/node_card.dart'; +import 'package:stackwallet/widgets/node_card.dart'; +import 'package:stackwallet/widgets/node_options_sheet.dart'; -// import 'node_card_test.mocks.dart'; +import 'node_card_test.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) +@GenerateMocks([NodeService]) void main() { - // testWidgets("NodeCard builds inactive node correctly", (tester) async { - // final nodeService = MockNodeService(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "some other node"); - // - // await tester.pumpWidget( - // MaterialApp( - // home: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "Campfire default", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("Campfire default"), findsOneWidget); - // expect(find.byType(Text), findsOneWidget); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // - // verifyNoMoreInteractions(nodeService); - // }); - // - // testWidgets("NodeCard builds active node correctly", (tester) async { - // final nodeService = MockNodeService(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // - // await tester.pumpWidget( - // MaterialApp( - // home: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "Campfire default", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("Campfire default"), findsOneWidget); - // expect(find.text("Connected"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(2)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // - // verifyNoMoreInteractions(nodeService); - // }); - // - // testWidgets("tap to open context menu on default node", (tester) async { - // final nodeService = MockNodeService(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // - // await tester.pumpWidget( - // MaterialApp( - // home: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "Campfire default", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("Campfire default"), findsOneWidget); - // expect(find.text("Connected"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(2)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(4)); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // - // verifyNoMoreInteractions(nodeService); - // }); - // - // testWidgets("tap to open context menu on any other node", (tester) async { - // final nodeService = MockNodeService(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // - // await tester.pumpWidget( - // MaterialApp( - // home: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "some other node", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("some other node"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(1)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.text("Edit"), findsOneWidget); - // expect(find.text("Delete"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(5)); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // - // verifyNoMoreInteractions(nodeService); - // }); - // - // testWidgets("tap connect", (tester) async { - // final nodeService = MockNodeService(); - // final navigator = mockingjay.MockNavigator(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // when(nodeService.setCurrentNode("some other node")) - // .thenAnswer((_) async {}); - // - // mockingjay.when(() => navigator.pop()).thenAnswer((_) {}); - // - // await tester.pumpWidget( - // MaterialApp( - // home: mockingjay.MockNavigatorProvider( - // navigator: navigator, - // child: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "some other node", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("some other node"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(1)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.text("Edit"), findsOneWidget); - // expect(find.text("Delete"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(5)); - // - // await tester.tap(find.text("Connect")); - // await tester.pumpAndSettle(); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // verify(nodeService.setCurrentNode("some other node")).called(1); - // - // verifyNoMoreInteractions(nodeService); - // - // mockingjay.verify(() => navigator.pop()).called(1); - // mockingjay.verifyNoMoreInteractions(navigator); - // }); - // - // testWidgets("tap details", (tester) async { - // final nodeService = MockNodeService(); - // final navigator = mockingjay.MockNavigator(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // - // mockingjay.when(() => navigator.pop()).thenAnswer((_) {}); - // mockingjay - // .when(() => navigator.push(mockingjay.any())) - // .thenAnswer((_) async {}); - // - // await tester.pumpWidget( - // MaterialApp( - // home: mockingjay.MockNavigatorProvider( - // navigator: navigator, - // child: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "some other node", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("some other node"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(1)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.text("Edit"), findsOneWidget); - // expect(find.text("Delete"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(5)); - // - // await tester.tap(find.text("Details")); - // await tester.pump(); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // - // verifyNoMoreInteractions(nodeService); - // - // mockingjay.verify(() => navigator.pop()).called(1); - // mockingjay - // .verify(() => navigator.push(mockingjay.any( - // that: mockingjay.isRoute(whereName: equals("/nodedetailsview"))))) - // .called(1); - // - // mockingjay.verifyNoMoreInteractions(navigator); - // }); - // - // testWidgets("tap edit", (tester) async { - // final nodeService = MockNodeService(); - // final navigator = mockingjay.MockNavigator(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // - // mockingjay.when(() => navigator.pop()).thenAnswer((_) {}); - // mockingjay - // .when(() => navigator.push(mockingjay.any())) - // .thenAnswer((_) async {}); - // - // await tester.pumpWidget( - // MaterialApp( - // home: mockingjay.MockNavigatorProvider( - // navigator: navigator, - // child: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "some other node", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("some other node"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(1)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.text("Edit"), findsOneWidget); - // expect(find.text("Delete"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(5)); - // - // await tester.tap(find.text("Edit")); - // await tester.pump(); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // - // verifyNoMoreInteractions(nodeService); - // - // mockingjay.verify(() => navigator.pop()).called(1); - // mockingjay - // .verify(() => navigator.push(mockingjay.any( - // that: - // mockingjay.isRoute(whereName: equals("/editnodedetailsview"))))) - // .called(1); - // - // mockingjay.verifyNoMoreInteractions(navigator); - // }); - // - // testWidgets("tap delete and cancel", (tester) async { - // final nodeService = MockNodeService(); - // final navigator = mockingjay.MockNavigator(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // - // mockingjay.when(() => navigator.pop()).thenAnswer((_) {}); - // - // await tester.pumpWidget( - // MaterialApp( - // home: mockingjay.MockNavigatorProvider( - // navigator: navigator, - // child: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "some other node", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("some other node"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(1)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.text("Edit"), findsOneWidget); - // expect(find.text("Delete"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(5)); - // - // await tester.tap(find.text("Delete")); - // await tester.pumpAndSettle(); - // - // expect(find.byType(ModalPopupDialog), findsOneWidget); - // expect(find.byType(SimpleButton), findsOneWidget); - // expect(find.byType(GradientButton), findsOneWidget); - // expect(find.text("CANCEL"), findsOneWidget); - // expect(find.text("DELETE"), findsOneWidget); - // expect(find.text("Do you want to delete some other node?"), findsOneWidget); - // - // await tester.tap(find.byType(SimpleButton)); - // await tester.pumpAndSettle(); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // - // verifyNoMoreInteractions(nodeService); - // - // mockingjay.verify(() => navigator.pop()).called(2); - // - // mockingjay.verifyNoMoreInteractions(navigator); - // }); - // - // testWidgets("tap delete and confirm fails", (tester) async { - // final nodeService = MockNodeService(); - // final navigator = mockingjay.MockNavigator(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // when(nodeService.deleteNode("some other node")) - // .thenAnswer((_) async => false); - // - // mockingjay.when(() => navigator.pop()).thenAnswer((_) {}); - // - // await tester.pumpWidget( - // MaterialApp( - // home: mockingjay.MockNavigatorProvider( - // navigator: navigator, - // child: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "some other node", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("some other node"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(1)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.text("Edit"), findsOneWidget); - // expect(find.text("Delete"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(5)); - // - // await tester.tap(find.text("Delete")); - // await tester.pumpAndSettle(); - // - // expect(find.byType(ModalPopupDialog), findsOneWidget); - // expect(find.byType(SimpleButton), findsOneWidget); - // expect(find.byType(GradientButton), findsOneWidget); - // expect(find.text("CANCEL"), findsOneWidget); - // expect(find.text("DELETE"), findsOneWidget); - // expect(find.text("Do you want to delete some other node?"), findsOneWidget); - // - // await tester.tap(find.byType(GradientButton)); - // await tester.pumpAndSettle(); - // - // expect(find.byType(CampfireAlert), findsOneWidget); - // expect(find.text("Error: Could not delete node named \"some other node\"!"), - // findsOneWidget); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // verify(nodeService.deleteNode("some other node")).called(1); - // - // verifyNoMoreInteractions(nodeService); - // - // mockingjay.verify(() => navigator.pop()).called(2); - // - // mockingjay.verifyNoMoreInteractions(navigator); - // }); - // - // testWidgets("tap delete and confirm succeeds", (tester) async { - // final nodeService = MockNodeService(); - // final navigator = mockingjay.MockNavigator(); - // - // when(nodeService.activeNodeName).thenAnswer((_) => "Campfire default"); - // when(nodeService.deleteNode("some other node")) - // .thenAnswer((_) async => true); - // - // mockingjay.when(() => navigator.pop()).thenAnswer((_) {}); - // - // await tester.pumpWidget( - // MaterialApp( - // home: mockingjay.MockNavigatorProvider( - // navigator: navigator, - // child: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (_) => nodeService, - // ), - // ], - // child: NodeCard( - // nodeName: "some other node", - // nodeData: { - // "port": "9000", - // "ipAddress": "some url", - // "useSSL": true, - // }, - // ), - // ), - // ), - // ), - // ); - // await tester.pumpAndSettle(); - // - // expect(find.text("some other node"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(1)); - // expect(find.byType(SvgPicture), findsOneWidget); - // - // await tester.tap(find.byType(NodeCard)); - // await tester.pumpAndSettle(); - // - // expect(find.text("Connect"), findsOneWidget); - // expect(find.text("Details"), findsOneWidget); - // expect(find.text("Edit"), findsOneWidget); - // expect(find.text("Delete"), findsOneWidget); - // expect(find.byType(Text), findsNWidgets(5)); - // - // await tester.tap(find.text("Delete")); - // await tester.pumpAndSettle(); - // - // expect(find.byType(ModalPopupDialog), findsOneWidget); - // expect(find.byType(SimpleButton), findsOneWidget); - // expect(find.byType(GradientButton), findsOneWidget); - // expect(find.text("CANCEL"), findsOneWidget); - // expect(find.text("DELETE"), findsOneWidget); - // expect(find.text("Do you want to delete some other node?"), findsOneWidget); - // - // await tester.tap(find.byType(GradientButton)); - // await tester.pumpAndSettle(); - // - // expect(find.byType(CampfireAlert), findsNothing); - // expect(find.text("Error: Could not delete node named \"some other node\"!"), - // findsNothing); - // - // verify(nodeService.activeNodeName).called(1); - // verify(nodeService.addListener(any)).called(1); - // verify(nodeService.deleteNode("some other node")).called(1); - // - // verifyNoMoreInteractions(nodeService); - // - // mockingjay.verify(() => navigator.pop()).called(2); - // - // mockingjay.verifyNoMoreInteractions(navigator); - // }); + testWidgets("NodeCard builds inactive node correctly", (tester) async { + final nodeService = MockNodeService(); + + when(nodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + when(nodeService.getNodeById(id: "node id")).thenAnswer((realInvocation) => + NodeModel( + host: "127.0.0.1", + port: 2000, + name: "some other name", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + nodeServiceChangeNotifierProvider.overrideWithValue(nodeService), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const NodeCard( + nodeId: "node id", coin: Coin.bitcoin, popBackToRoute: ""), + ), + ), + ); + + await tester.pumpAndSettle(); + + expect(find.text("some other name"), findsOneWidget); + expect(find.text("Disconnected"), findsOneWidget); + expect(find.byType(SvgPicture), findsWidgets); + + verify(nodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).called(1); + verify(nodeService.getNodeById(id: "node id")).called(1); + verify(nodeService.addListener(any)).called(1); + verifyNoMoreInteractions(nodeService); + }); + + testWidgets("NodeCard builds active node correctly", (tester) async { + final nodeService = MockNodeService(); + + when(nodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + when(nodeService.getNodeById(id: "node id")).thenAnswer((realInvocation) => + NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + nodeServiceChangeNotifierProvider.overrideWithValue(nodeService), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const NodeCard( + nodeId: "node id", coin: Coin.bitcoin, popBackToRoute: ""), + ), + ), + ); + await tester.pumpAndSettle(); + + expect(find.text("Stack Default"), findsOneWidget); + expect(find.text("Connected"), findsOneWidget); + expect(find.byType(Text), findsNWidgets(2)); + expect(find.byType(SvgPicture), findsWidgets); + + verify(nodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).called(1); + verify(nodeService.getNodeById(id: "node id")).called(1); + verify(nodeService.addListener(any)).called(1); + + verifyNoMoreInteractions(nodeService); + }); + + testWidgets("tap to open context menu on default node", (tester) async { + final nodeService = MockNodeService(); + + when(nodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + when(nodeService.getNodeById(id: "node id")).thenAnswer((realInvocation) => + NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + nodeServiceChangeNotifierProvider.overrideWithValue(nodeService), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const NodeCard( + nodeId: "node id", coin: Coin.bitcoin, popBackToRoute: ""), + ), + ), + ); + + await tester.pumpAndSettle(); + + expect(find.text("Stack Default"), findsOneWidget); + expect(find.text("Connected"), findsOneWidget); + expect(find.byType(Text), findsNWidgets(2)); + expect(find.byType(SvgPicture), findsNWidgets(2)); + + await tester.tap(find.byType(NodeCard)); + await tester.pumpAndSettle(); + + expect(find.text("Connect"), findsOneWidget); + expect(find.text("Details"), findsOneWidget); + expect(find.byType(NodeOptionsSheet), findsOneWidget); + expect(find.byType(Text), findsNWidgets(7)); + + verify(nodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).called(2); + verify(nodeService.getNodeById(id: "node id")).called(2); + verify(nodeService.addListener(any)).called(1); + + verifyNoMoreInteractions(nodeService); + }); } diff --git a/test/widget_tests/node_card_test.mocks.dart b/test/widget_tests/node_card_test.mocks.dart index 87e3497866..673182cebd 100644 --- a/test/widget_tests/node_card_test.mocks.dart +++ b/test/widget_tests/node_card_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/widget_tests/node_card_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i5; import 'dart:ui' as _i7; @@ -21,111 +22,220 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeFlutterSecureStorageInterface_0 extends _i1.Fake - implements _i2.FlutterSecureStorageInterface {} +class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake + implements _i2.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [NodeService]. /// /// See the documentation for Mockito's code generation for more information. class MockNodeService extends _i1.Mock implements _i3.NodeService { + MockNodeService() { + _i1.throwOnMissingStub(this); + } + @override _i2.FlutterSecureStorageInterface get secureStorageInterface => - (super.noSuchMethod(Invocation.getter(#secureStorageInterface), - returnValue: _FakeFlutterSecureStorageInterface_0()) - as _i2.FlutterSecureStorageInterface); - @override - List<_i4.NodeModel> get primaryNodes => - (super.noSuchMethod(Invocation.getter(#primaryNodes), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); - @override - List<_i4.NodeModel> get nodes => - (super.noSuchMethod(Invocation.getter(#nodes), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i5.Future updateDefaults() => - (super.noSuchMethod(Invocation.method(#updateDefaults, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future setPrimaryNodeFor( - {_i6.Coin? coin, - _i4.NodeModel? node, - bool? shouldNotifyListeners = false}) => (super.noSuchMethod( - Invocation.method(#setPrimaryNodeFor, [], { + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_0( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i2.FlutterSecureStorageInterface); + @override + List<_i4.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); + @override + List<_i4.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i5.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future setPrimaryNodeFor({ + required _i6.Coin? coin, + required _i4.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { #coin: coin, #node: node, - #shouldNotifyListeners: shouldNotifyListeners - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i4.NodeModel? getPrimaryNodeFor({_i6.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#getPrimaryNodeFor, [], {#coin: coin})) - as _i4.NodeModel?); - @override - List<_i4.NodeModel> getNodesFor(_i6.Coin? coin) => - (super.noSuchMethod(Invocation.method(#getNodesFor, [coin]), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); - @override - _i4.NodeModel? getNodeById({String? id}) => - (super.noSuchMethod(Invocation.method(#getNodeById, [], {#id: id})) - as _i4.NodeModel?); - @override - List<_i4.NodeModel> failoverNodesFor({_i6.Coin? coin}) => (super.noSuchMethod( - Invocation.method(#failoverNodesFor, [], {#coin: coin}), - returnValue: <_i4.NodeModel>[]) as List<_i4.NodeModel>); + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i4.NodeModel? getPrimaryNodeFor({required _i6.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i4.NodeModel?); + @override + List<_i4.NodeModel> getNodesFor(_i6.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); + @override + _i4.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i4.NodeModel?); + @override + List<_i4.NodeModel> failoverNodesFor({required _i6.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i4.NodeModel>[], + ) as List<_i4.NodeModel>); @override _i5.Future add( - _i4.NodeModel? node, String? password, bool? shouldNotifyListeners) => + _i4.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method(#add, [node, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future delete(String? id, bool? shouldNotifyListeners) => (super - .noSuchMethod(Invocation.method(#delete, [id, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); @override _i5.Future setEnabledState( - String? id, bool? enabled, bool? shouldNotifyListeners) => + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #setEnabledState, [id, enabled, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future edit(_i4.NodeModel? editedNode, String? password, - bool? shouldNotifyListeners) => + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future edit( + _i4.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => (super.noSuchMethod( - Invocation.method( - #edit, [editedNode, password, shouldNotifyListeners]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - _i5.Future updateCommunityNodes() => - (super.noSuchMethod(Invocation.method(#updateCommunityNodes, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - void addListener(_i7.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i7.VoidCallback? listener) => - super.noSuchMethod(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); + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + _i5.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + @override + void addListener(_i7.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/widget_tests/node_options_sheet_test.dart b/test/widget_tests/node_options_sheet_test.dart new file mode 100644 index 0000000000..78800fb8ac --- /dev/null +++ b/test/widget_tests/node_options_sheet_test.dart @@ -0,0 +1,213 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/models/node_model.dart'; +import 'package:mockingjay/mockingjay.dart' as mockingjay; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/prefs.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/services/node_service.dart'; +import 'package:stackwallet/widgets/node_options_sheet.dart'; +import 'package:tuple/tuple.dart'; + +import 'node_options_sheet_test.mocks.dart'; + +@GenerateMocks([Wallets, Prefs, NodeService]) +void main() { + testWidgets("Load Node Options widget", (tester) async { + final mockWallets = MockWallets(); + final mockPrefs = MockPrefs(); + final mockNodeService = MockNodeService(); + + when(mockNodeService.getNodeById(id: "node id")).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + when(mockNodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(mockWallets), + prefsChangeNotifierProvider.overrideWithValue(mockPrefs), + nodeServiceChangeNotifierProvider.overrideWithValue(mockNodeService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const NodeOptionsSheet( + nodeId: "node id", coin: Coin.bitcoin, popBackToRoute: ""), + ), + ), + ); + + await tester.pumpAndSettle(); + expect(find.text("Node options"), findsOneWidget); + expect(find.text("Stack Default"), findsOneWidget); + expect(find.text("Connected"), findsOneWidget); + expect(find.byType(SvgPicture), findsNWidgets(2)); + expect(find.text("Details"), findsOneWidget); + expect(find.text("Connect"), findsOneWidget); + + verify(mockNodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).called(1); + verify(mockNodeService.getNodeById(id: "node id")).called(1); + verify(mockNodeService.addListener(any)).called(1); + verifyNoMoreInteractions(mockNodeService); + }); + + testWidgets("Details tap", (tester) async { + final mockWallets = MockWallets(); + final mockPrefs = MockPrefs(); + final mockNodeService = MockNodeService(); + final navigator = mockingjay.MockNavigator(); + + when(mockNodeService.getNodeById(id: "node id")).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + when(mockNodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + mockingjay + .when(() => navigator.pushNamed("/nodeDetails", + arguments: const Tuple3(Coin.bitcoin, "node id", "coinNodes"))) + .thenAnswer((_) async => {}); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(mockWallets), + prefsChangeNotifierProvider.overrideWithValue(mockPrefs), + nodeServiceChangeNotifierProvider.overrideWithValue(mockNodeService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: mockingjay.MockNavigatorProvider( + navigator: navigator, + child: const NodeOptionsSheet( + nodeId: "node id", + coin: Coin.bitcoin, + popBackToRoute: "coinNodes")), + ), + ), + ); + + await tester.tap(find.text("Details")); + await tester.pumpAndSettle(); + + mockingjay.verify(() => navigator.pop()).called(1); + mockingjay + .verify(() => navigator.pushNamed("/nodeDetails", + arguments: const Tuple3(Coin.bitcoin, "node id", "coinNodes"))) + .called(1); + }); + + testWidgets("Connect tap", (tester) async { + final mockWallets = MockWallets(); + final mockPrefs = MockPrefs(); + final mockNodeService = MockNodeService(); + + when(mockNodeService.getNodeById(id: "node id")).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Stack Default", + id: "node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + when(mockNodeService.getPrimaryNodeFor(coin: Coin.bitcoin)).thenAnswer( + (realInvocation) => NodeModel( + host: "127.0.0.1", + port: 2000, + name: "Some other node name", + id: "some node id", + useSSL: true, + enabled: true, + coinName: "Bitcoin", + isFailover: false, + isDown: false)); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(mockWallets), + prefsChangeNotifierProvider.overrideWithValue(mockPrefs), + nodeServiceChangeNotifierProvider.overrideWithValue(mockNodeService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const NodeOptionsSheet( + nodeId: "node id", coin: Coin.bitcoin, popBackToRoute: ""), + ), + ), + ); + + await tester.pumpAndSettle(); + expect(find.text("Node options"), findsOneWidget); + // expect(find.text("Stack Default"), findsOneWidget); + expect(find.text("Disconnected"), findsOneWidget); + + await tester.tap(find.text("Connect")); + await tester.pumpAndSettle(); + }); +} diff --git a/test/widget_tests/node_options_sheet_test.mocks.dart b/test/widget_tests/node_options_sheet_test.mocks.dart new file mode 100644 index 0000000000..173edf1bfc --- /dev/null +++ b/test/widget_tests/node_options_sheet_test.mocks.dart @@ -0,0 +1,812 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/widget_tests/node_options_sheet_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i10; +import 'dart:ui' as _i12; + +import 'package:flutter/foundation.dart' as _i4; +import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/models/node_model.dart' as _i16; +import 'package:stackwallet/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart' + as _i14; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/services/wallets.dart' as _i8; +import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i15; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i13; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i7; +import 'package:stackwallet/utilities/prefs.dart' as _i11; + +// 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 +// ignore_for_file: subtype_of_sealed_class + +class _FakeWalletsService_0 extends _i1.SmartFake + implements _i2.WalletsService { + _FakeWalletsService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeNodeService_1 extends _i1.SmartFake implements _i3.NodeService { + _FakeNodeService_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeChangeNotifierProvider_2 + extends _i1.SmartFake implements _i5.ChangeNotifierProvider { + _FakeChangeNotifierProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager { + _FakeManager_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFlutterSecureStorageInterface_4 extends _i1.SmartFake + implements _i7.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallets]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWallets extends _i1.Mock implements _i8.Wallets { + MockWallets() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.WalletsService get walletsService => (super.noSuchMethod( + Invocation.getter(#walletsService), + returnValue: _FakeWalletsService_0( + this, + Invocation.getter(#walletsService), + ), + ) as _i2.WalletsService); + @override + set walletsService(_i2.WalletsService? _walletsService) => super.noSuchMethod( + Invocation.setter( + #walletsService, + _walletsService, + ), + returnValueForMissingStub: null, + ); + @override + _i3.NodeService get nodeService => (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_1( + this, + Invocation.getter(#nodeService), + ), + ) as _i3.NodeService); + @override + set nodeService(_i3.NodeService? _nodeService) => super.noSuchMethod( + Invocation.setter( + #nodeService, + _nodeService, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasWallets => (super.noSuchMethod( + Invocation.getter(#hasWallets), + returnValue: false, + ) as bool); + @override + List<_i5.ChangeNotifierProvider<_i6.Manager>> get managerProviders => + (super.noSuchMethod( + Invocation.getter(#managerProviders), + returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[], + ) as List<_i5.ChangeNotifierProvider<_i6.Manager>>); + @override + List<_i6.Manager> get managers => (super.noSuchMethod( + Invocation.getter(#managers), + returnValue: <_i6.Manager>[], + ) as List<_i6.Manager>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + List getWalletIdsFor({required _i9.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #getWalletIdsFor, + [], + {#coin: coin}, + ), + returnValue: [], + ) as List); + @override + Map<_i9.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + getManagerProvidersByCoin() => (super.noSuchMethod( + Invocation.method( + #getManagerProvidersByCoin, + [], + ), + returnValue: <_i9.Coin, + List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, + ) as Map<_i9.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + @override + _i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider( + String? walletId) => + (super.noSuchMethod( + Invocation.method( + #getManagerProvider, + [walletId], + ), + returnValue: _FakeChangeNotifierProvider_2<_i6.Manager>( + this, + Invocation.method( + #getManagerProvider, + [walletId], + ), + ), + ) as _i5.ChangeNotifierProvider<_i6.Manager>); + @override + _i6.Manager getManager(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getManager, + [walletId], + ), + returnValue: _FakeManager_3( + this, + Invocation.method( + #getManager, + [walletId], + ), + ), + ) as _i6.Manager); + @override + void addWallet({ + required String? walletId, + required _i6.Manager? manager, + }) => + super.noSuchMethod( + Invocation.method( + #addWallet, + [], + { + #walletId: walletId, + #manager: manager, + }, + ), + returnValueForMissingStub: null, + ); + @override + void removeWallet({required String? walletId}) => super.noSuchMethod( + Invocation.method( + #removeWallet, + [], + {#walletId: walletId}, + ), + returnValueForMissingStub: null, + ); + @override + _i10.Future load(_i11.Prefs? prefs) => (super.noSuchMethod( + Invocation.method( + #load, + [prefs], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future loadAfterStackRestore( + _i11.Prefs? prefs, + List<_i6.Manager>? managers, + ) => + (super.noSuchMethod( + Invocation.method( + #loadAfterStackRestore, + [ + prefs, + managers, + ], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [Prefs]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPrefs extends _i1.Mock implements _i11.Prefs { + MockPrefs() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isInitialized => (super.noSuchMethod( + Invocation.getter(#isInitialized), + returnValue: false, + ) as bool); + @override + int get lastUnlockedTimeout => (super.noSuchMethod( + Invocation.getter(#lastUnlockedTimeout), + returnValue: 0, + ) as int); + @override + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter( + #lastUnlockedTimeout, + lastUnlockedTimeout, + ), + returnValueForMissingStub: null, + ); + @override + int get lastUnlocked => (super.noSuchMethod( + Invocation.getter(#lastUnlocked), + returnValue: 0, + ) as int); + @override + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter( + #lastUnlocked, + lastUnlocked, + ), + returnValueForMissingStub: null, + ); + @override + int get currentNotificationId => (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) as int); + @override + List get walletIdsSyncOnStartup => (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) as List); + @override + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter( + #walletIdsSyncOnStartup, + walletIdsSyncOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + _i13.SyncingType get syncType => (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i13.SyncingType.currentWalletOnly, + ) as _i13.SyncingType); + @override + set syncType(_i13.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter( + #syncType, + syncType, + ), + returnValueForMissingStub: null, + ); + @override + bool get wifiOnly => (super.noSuchMethod( + Invocation.getter(#wifiOnly), + returnValue: false, + ) as bool); + @override + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter( + #wifiOnly, + wifiOnly, + ), + returnValueForMissingStub: null, + ); + @override + bool get showFavoriteWallets => (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) as bool); + @override + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter( + #showFavoriteWallets, + showFavoriteWallets, + ), + returnValueForMissingStub: null, + ); + @override + String get language => (super.noSuchMethod( + Invocation.getter(#language), + returnValue: '', + ) as String); + @override + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter( + #language, + newLanguage, + ), + returnValueForMissingStub: null, + ); + @override + String get currency => (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: '', + ) as String); + @override + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter( + #currency, + newCurrency, + ), + returnValueForMissingStub: null, + ); + @override + _i14.ExchangeRateType get exchangeRateType => (super.noSuchMethod( + Invocation.getter(#exchangeRateType), + returnValue: _i14.ExchangeRateType.estimated, + ) as _i14.ExchangeRateType); + @override + set exchangeRateType(_i14.ExchangeRateType? exchangeRateType) => + super.noSuchMethod( + Invocation.setter( + #exchangeRateType, + exchangeRateType, + ), + returnValueForMissingStub: null, + ); + @override + bool get useBiometrics => (super.noSuchMethod( + Invocation.getter(#useBiometrics), + returnValue: false, + ) as bool); + @override + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter( + #useBiometrics, + useBiometrics, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasPin => (super.noSuchMethod( + Invocation.getter(#hasPin), + returnValue: false, + ) as bool); + @override + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter( + #hasPin, + hasPin, + ), + returnValueForMissingStub: null, + ); + @override + bool get showTestNetCoins => (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) as bool); + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter( + #showTestNetCoins, + showTestNetCoins, + ), + returnValueForMissingStub: null, + ); + @override + bool get isAutoBackupEnabled => (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) as bool); + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter( + #isAutoBackupEnabled, + isAutoBackupEnabled, + ), + returnValueForMissingStub: null, + ); + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter( + #autoBackupLocation, + autoBackupLocation, + ), + returnValueForMissingStub: null, + ); + @override + _i15.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i15.BackupFrequencyType.everyTenMinutes, + ) as _i15.BackupFrequencyType); + @override + set backupFrequencyType(_i15.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter( + #backupFrequencyType, + backupFrequencyType, + ), + returnValueForMissingStub: null, + ); + @override + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter( + #lastAutoBackup, + lastAutoBackup, + ), + returnValueForMissingStub: null, + ); + @override + bool get hideBlockExplorerWarning => (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) as bool); + @override + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => + super.noSuchMethod( + Invocation.setter( + #hideBlockExplorerWarning, + hideBlockExplorerWarning, + ), + returnValueForMissingStub: null, + ); + @override + bool get gotoWalletOnStartup => (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) as bool); + @override + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter( + #gotoWalletOnStartup, + gotoWalletOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter( + #startupWalletId, + startupWalletId, + ), + returnValueForMissingStub: null, + ); + @override + bool get externalCalls => (super.noSuchMethod( + Invocation.getter(#externalCalls), + returnValue: false, + ) as bool); + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter( + #externalCalls, + externalCalls, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i10.Future init() => (super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + Invocation.method( + #incrementCurrentNotificationIndex, + [], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [NodeService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockNodeService extends _i1.Mock implements _i3.NodeService { + MockNodeService() { + _i1.throwOnMissingStub(this); + } + + @override + _i7.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_4( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i7.FlutterSecureStorageInterface); + @override + List<_i16.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); + @override + List<_i16.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i10.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future setPrimaryNodeFor({ + required _i9.Coin? coin, + required _i16.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i16.NodeModel? getPrimaryNodeFor({required _i9.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i16.NodeModel?); + @override + List<_i16.NodeModel> getNodesFor(_i9.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); + @override + _i16.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i16.NodeModel?); + @override + List<_i16.NodeModel> failoverNodesFor({required _i9.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i16.NodeModel>[], + ) as List<_i16.NodeModel>); + @override + _i10.Future add( + _i16.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future setEnabledState( + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future edit( + _i16.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + _i10.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + @override + void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} diff --git a/test/widget_tests/progress_bar_test.dart b/test/widget_tests/progress_bar_test.dart new file mode 100644 index 0000000000..1fe1876d62 --- /dev/null +++ b/test/widget_tests/progress_bar_test.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/progress_bar.dart'; + +void main() { + testWidgets("Widget build", (widgetTester) async { + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: Material( + child: ProgressBar( + width: 20, + height: 10, + fillColor: + StackColors.fromStackColorTheme(LightColors()).accentColorRed, + backgroundColor: StackColors.fromStackColorTheme(LightColors()) + .accentColorYellow, + percent: 30), + ), + ), + ); + + expect(find.byType(ProgressBar), findsOneWidget); + }); +} diff --git a/test/widget_tests/stack_dialog_test.dart b/test/widget_tests/stack_dialog_test.dart new file mode 100644 index 0000000000..1f33acb321 --- /dev/null +++ b/test/widget_tests/stack_dialog_test.dart @@ -0,0 +1,85 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/stack_dialog.dart'; +import 'package:mockingjay/mockingjay.dart' as mockingjay; + +void main() { + testWidgets("test StackDialogBase", (widgetTester) async { + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: StackDialogBase(), + ), + ), + ); + + expect(find.byType(StackDialogBase), findsOneWidget); + }); + + testWidgets("test StackDialog", (widgetTester) async { + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: StackDialog( + title: "Some Dialog title", + message: "Some Message", + leftButton: TextButton(onPressed: null, child: Text("Left Button")), + rightButton: + TextButton(onPressed: null, child: Text("Right Button")), + ), + ), + ), + ); + + expect(find.byType(StackDialogBase), findsOneWidget); + expect(find.byType(StackDialog), findsOneWidget); + expect(find.text("Some Dialog title"), findsOneWidget); + expect(find.text("Some Message"), findsOneWidget); + expect(find.text("Left Button"), findsOneWidget); + expect(find.text("Right Button"), findsOneWidget); + }); + + testWidgets("Test StackDialogOk", (widgetTester) async { + final navigator = mockingjay.MockNavigator(); + + await widgetTester.pumpWidget(ProviderScope( + overrides: [], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: mockingjay.MockNavigatorProvider( + navigator: navigator, + child: const StackOkDialog( + title: "Some random title", + message: "Some message", + leftButton: TextButton(onPressed: null, child: Text("I am left")), + ), + ), + ))); + await widgetTester.pumpAndSettle(); + + expect(find.byType(StackOkDialog), findsOneWidget); + expect(find.text("Some random title"), findsOneWidget); + expect(find.text("Some message"), findsOneWidget); + expect(find.byType(TextButton), findsNWidgets(2)); + + await widgetTester.tap(find.text("I am left")); + await widgetTester.pumpAndSettle(); + }); +} diff --git a/test/widget_tests/table_view/table_view_cell_test.dart b/test/widget_tests/table_view/table_view_cell_test.dart new file mode 100644 index 0000000000..dff6ba5138 --- /dev/null +++ b/test/widget_tests/table_view/table_view_cell_test.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/table_view/table_view_cell.dart'; + +void main() { + testWidgets("Widget build correctly", (widgetTester) async { + const tableViewCell = TableViewCell(flex: 16, child: Text("data")); + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: tableViewCell, + ), + ), + ); + + expect(find.text("data"), findsOneWidget); + expect(find.byWidget(tableViewCell), findsOneWidget); + }); +} diff --git a/test/widget_tests/table_view/table_view_row_test.dart b/test/widget_tests/table_view/table_view_row_test.dart new file mode 100644 index 0000000000..4c40a81239 --- /dev/null +++ b/test/widget_tests/table_view/table_view_row_test.dart @@ -0,0 +1,79 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/coin_wallets_table.dart'; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart'; +import 'package:stackwallet/services/coins/coin_service.dart'; +import 'package:stackwallet/services/coins/manager.dart'; +import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/table_view/table_view_cell.dart'; +import 'package:stackwallet/widgets/table_view/table_view_row.dart'; + +import 'table_view_row_test.mocks.dart'; + +@GenerateMocks([ + Wallets, + WalletsService, + BitcoinWallet +], customMocks: [ + MockSpec(returnNullOnMissingStub: true), + MockSpec(returnNullOnMissingStub: true) +]) +void main() { + testWidgets('Test table view row', (widgetTester) async { + final mockWallet = MockWallets(); + final CoinServiceAPI wallet = MockBitcoinWallet(); + when(wallet.coin).thenAnswer((_) => Coin.bitcoin); + + when(wallet.walletName).thenAnswer((_) => "some wallet"); + when(wallet.walletId).thenAnswer((_) => "Wallet id 1"); + + final manager = Manager(wallet); + + when(mockWallet.getWalletIdsFor(coin: Coin.bitcoin)) + .thenAnswer((realInvocation) => ["Wallet id 1", "wallet id 2"]); + + when(mockWallet.getManagerProvider("Wallet id 1")).thenAnswer( + (realInvocation) => ChangeNotifierProvider((ref) => manager)); + + when(mockWallet.getManagerProvider("wallet id 2")).thenAnswer( + (realInvocation) => ChangeNotifierProvider((ref) => manager)); + + final walletIds = mockWallet.getWalletIdsFor(coin: Coin.bitcoin); + + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(mockWallet), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: Material( + child: TableViewRow(cells: [ + for (int j = 1; j <= 5; j++) + TableViewCell(flex: 16, child: Text("Some Text ${j}")) + ], expandingChild: CoinWalletsTable(walletIds: walletIds)), + ), + ), + ), + ); + + expect(find.text("Some Text 1"), findsOneWidget); + expect(find.byType(TableViewRow), findsWidgets); + expect(find.byType(TableViewCell), findsWidgets); + expect(find.byType(CoinWalletsTable), findsWidgets); + }); +} diff --git a/test/widget_tests/table_view/table_view_row_test.mocks.dart b/test/widget_tests/table_view/table_view_row_test.mocks.dart new file mode 100644 index 0000000000..b4a0e9cc74 --- /dev/null +++ b/test/widget_tests/table_view/table_view_row_test.mocks.dart @@ -0,0 +1,2016 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/widget_tests/table_view/table_view_row_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i15; +import 'dart:ui' as _i17; + +import 'package:decimal/decimal.dart' as _i9; +import 'package:flutter/foundation.dart' as _i4; +import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10; +import 'package:stackwallet/models/models.dart' as _i8; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i18; +import 'package:stackwallet/services/coins/coin_service.dart' as _i12; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/services/transaction_notification_tracker.dart' + as _i7; +import 'package:stackwallet/services/wallets.dart' as _i13; +import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i14; +import 'package:stackwallet/utilities/prefs.dart' as _i16; + +// 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 +// ignore_for_file: subtype_of_sealed_class + +class _FakeWalletsService_0 extends _i1.SmartFake + implements _i2.WalletsService { + _FakeWalletsService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeNodeService_1 extends _i1.SmartFake implements _i3.NodeService { + _FakeNodeService_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeChangeNotifierProvider_2 + extends _i1.SmartFake implements _i5.ChangeNotifierProvider { + _FakeChangeNotifierProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager { + _FakeManager_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionNotificationTracker_4 extends _i1.SmartFake + implements _i7.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUtxoData_5 extends _i1.SmartFake implements _i8.UtxoData { + _FakeUtxoData_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_6 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFeeObject_7 extends _i1.SmartFake implements _i8.FeeObject { + _FakeFeeObject_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionData_8 extends _i1.SmartFake + implements _i8.TransactionData { + _FakeTransactionData_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_9 extends _i1.SmartFake implements _i10.ElectrumX { + _FakeElectrumX_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCachedElectrumX_10 extends _i1.SmartFake + implements _i11.CachedElectrumX { + _FakeCachedElectrumX_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXNode_11 extends _i1.SmartFake + implements _i10.ElectrumXNode { + _FakeElectrumXNode_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_12 extends _i1.SmartFake + implements _i12.CoinServiceAPI { + _FakeCoinServiceAPI_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallets]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWallets extends _i1.Mock implements _i13.Wallets { + MockWallets() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.WalletsService get walletsService => (super.noSuchMethod( + Invocation.getter(#walletsService), + returnValue: _FakeWalletsService_0( + this, + Invocation.getter(#walletsService), + ), + ) as _i2.WalletsService); + @override + set walletsService(_i2.WalletsService? _walletsService) => super.noSuchMethod( + Invocation.setter( + #walletsService, + _walletsService, + ), + returnValueForMissingStub: null, + ); + @override + _i3.NodeService get nodeService => (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_1( + this, + Invocation.getter(#nodeService), + ), + ) as _i3.NodeService); + @override + set nodeService(_i3.NodeService? _nodeService) => super.noSuchMethod( + Invocation.setter( + #nodeService, + _nodeService, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasWallets => (super.noSuchMethod( + Invocation.getter(#hasWallets), + returnValue: false, + ) as bool); + @override + List<_i5.ChangeNotifierProvider<_i6.Manager>> get managerProviders => + (super.noSuchMethod( + Invocation.getter(#managerProviders), + returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[], + ) as List<_i5.ChangeNotifierProvider<_i6.Manager>>); + @override + List<_i6.Manager> get managers => (super.noSuchMethod( + Invocation.getter(#managers), + returnValue: <_i6.Manager>[], + ) as List<_i6.Manager>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + List getWalletIdsFor({required _i14.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #getWalletIdsFor, + [], + {#coin: coin}, + ), + returnValue: [], + ) as List); + @override + Map<_i14.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + getManagerProvidersByCoin() => (super.noSuchMethod( + Invocation.method( + #getManagerProvidersByCoin, + [], + ), + returnValue: <_i14.Coin, + List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, + ) as Map<_i14.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + @override + _i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider( + String? walletId) => + (super.noSuchMethod( + Invocation.method( + #getManagerProvider, + [walletId], + ), + returnValue: _FakeChangeNotifierProvider_2<_i6.Manager>( + this, + Invocation.method( + #getManagerProvider, + [walletId], + ), + ), + ) as _i5.ChangeNotifierProvider<_i6.Manager>); + @override + _i6.Manager getManager(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getManager, + [walletId], + ), + returnValue: _FakeManager_3( + this, + Invocation.method( + #getManager, + [walletId], + ), + ), + ) as _i6.Manager); + @override + void addWallet({ + required String? walletId, + required _i6.Manager? manager, + }) => + super.noSuchMethod( + Invocation.method( + #addWallet, + [], + { + #walletId: walletId, + #manager: manager, + }, + ), + returnValueForMissingStub: null, + ); + @override + void removeWallet({required String? walletId}) => super.noSuchMethod( + Invocation.method( + #removeWallet, + [], + {#walletId: walletId}, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Future load(_i16.Prefs? prefs) => (super.noSuchMethod( + Invocation.method( + #load, + [prefs], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future loadAfterStackRestore( + _i16.Prefs? prefs, + List<_i6.Manager>? managers, + ) => + (super.noSuchMethod( + Invocation.method( + #loadAfterStackRestore, + [ + prefs, + managers, + ], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [WalletsService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWalletsService extends _i1.Mock implements _i2.WalletsService { + MockWalletsService() { + _i1.throwOnMissingStub(this); + } + + @override + _i15.Future> get walletNames => + (super.noSuchMethod( + Invocation.getter(#walletNames), + returnValue: _i15.Future>.value( + {}), + ) as _i15.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i15.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { + #from: from, + #to: to, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + _i15.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i14.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addExistingStackWallet, + [], + { + #name: name, + #walletId: walletId, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future addNewWallet({ + required String? name, + required _i14.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addNewWallet, + [], + { + #name: name, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i15.Future>.value([]), + ) as _i15.Future>); + @override + _i15.Future saveFavoriteWalletIds(List? walletIds) => + (super.noSuchMethod( + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + _i15.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future isMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + _i15.Future setMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + _i15.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [BitcoinWallet]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBitcoinWallet extends _i1.Mock implements _i18.BitcoinWallet { + MockBitcoinWallet() { + _i1.throwOnMissingStub(this); + } + + @override + set timer(_i15.Timer? _timer) => super.noSuchMethod( + Invocation.setter( + #timer, + _timer, + ), + returnValueForMissingStub: null, + ); + @override + _i7.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + Invocation.getter(#txTracker), + returnValue: _FakeTransactionNotificationTracker_4( + this, + Invocation.getter(#txTracker), + ), + ) as _i7.TransactionNotificationTracker); + @override + set txTracker(_i7.TransactionNotificationTracker? _txTracker) => + super.noSuchMethod( + Invocation.setter( + #txTracker, + _txTracker, + ), + returnValueForMissingStub: null, + ); + @override + List<_i8.UtxoObject> get outputsList => (super.noSuchMethod( + Invocation.getter(#outputsList), + returnValue: <_i8.UtxoObject>[], + ) as List<_i8.UtxoObject>); + @override + set outputsList(List<_i8.UtxoObject>? _outputsList) => super.noSuchMethod( + Invocation.setter( + #outputsList, + _outputsList, + ), + returnValueForMissingStub: null, + ); + @override + bool get longMutex => (super.noSuchMethod( + Invocation.getter(#longMutex), + returnValue: false, + ) as bool); + @override + set longMutex(bool? _longMutex) => super.noSuchMethod( + Invocation.setter( + #longMutex, + _longMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get refreshMutex => (super.noSuchMethod( + Invocation.getter(#refreshMutex), + returnValue: false, + ) as bool); + @override + set refreshMutex(bool? _refreshMutex) => super.noSuchMethod( + Invocation.setter( + #refreshMutex, + _refreshMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get isActive => (super.noSuchMethod( + Invocation.getter(#isActive), + returnValue: false, + ) as bool); + @override + set isActive(bool? _isActive) => super.noSuchMethod( + Invocation.setter( + #isActive, + _isActive, + ), + returnValueForMissingStub: null, + ); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + _i14.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i14.Coin.bitcoin, + ) as _i14.Coin); + @override + _i15.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i15.Future>.value([]), + ) as _i15.Future>); + @override + _i15.Future<_i8.UtxoData> get utxoData => (super.noSuchMethod( + Invocation.getter(#utxoData), + returnValue: _i15.Future<_i8.UtxoData>.value(_FakeUtxoData_5( + this, + Invocation.getter(#utxoData), + )), + ) as _i15.Future<_i8.UtxoData>); + @override + _i15.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i15.Future>.value(<_i8.UtxoObject>[]), + ) as _i15.Future>); + @override + _i15.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future get currentLegacyReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentLegacyReceivingAddress), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future get currentReceivingAddressP2SH => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddressP2SH), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + _i15.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i15.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i15.Future<_i8.FeeObject>); + @override + _i15.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + _i15.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i15.Future>.value([]), + ) as _i15.Future>); + @override + _i15.Future get chainHeight => (super.noSuchMethod( + Invocation.getter(#chainHeight), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + int get storedChainHeight => (super.noSuchMethod( + Invocation.getter(#storedChainHeight), + returnValue: 0, + ) as int); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i15.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i15.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i15.Future<_i8.TransactionData>); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + _i10.ElectrumX get electrumXClient => (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumX_9( + this, + Invocation.getter(#electrumXClient), + ), + ) as _i10.ElectrumX); + @override + _i11.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + Invocation.getter(#cachedElectrumXClient), + returnValue: _FakeCachedElectrumX_10( + this, + Invocation.getter(#cachedElectrumXClient), + ), + ) as _i11.CachedElectrumX); + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future updateStoredChainHeight({required int? newHeight}) => + (super.noSuchMethod( + Invocation.method( + #updateStoredChainHeight, + [], + {#newHeight: newHeight}, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i18.DerivePathType addressType({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #addressType, + [], + {#address: address}, + ), + returnValue: _i18.DerivePathType.bip44, + ) as _i18.DerivePathType); + @override + _i15.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future getTransactionCacheEarly(List? allAddresses) => + (super.noSuchMethod( + Invocation.method( + #getTransactionCacheEarly, + [allAddresses], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future refreshIfThereIsNewData() => (super.noSuchMethod( + Invocation.method( + #refreshIfThereIsNewData, + [], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + _i15.Future getAllTxsToWatch(_i8.TransactionData? txData) => + (super.noSuchMethod( + Invocation.method( + #getAllTxsToWatch, + [txData], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i15.Future>.value({}), + ) as _i15.Future>); + @override + _i15.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + void startNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #startNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + void stopNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #stopNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i15.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i15.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + Invocation.method( + #getCurrentNode, + [], + ), + returnValue: + _i15.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_11( + this, + Invocation.method( + #getCurrentNode, + [], + ), + )), + ) as _i15.Future<_i10.ElectrumXNode>); + @override + _i15.Future addDerivation({ + required int? chain, + required String? address, + required String? pubKey, + required String? wif, + required _i18.DerivePathType? derivePathType, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivation, + [], + { + #chain: chain, + #address: address, + #pubKey: pubKey, + #wif: wif, + #derivePathType: derivePathType, + }, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future addDerivations({ + required int? chain, + required _i18.DerivePathType? derivePathType, + required Map? derivationsToAdd, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivations, + [], + { + #chain: chain, + #derivePathType: derivePathType, + #derivationsToAdd: derivationsToAdd, + }, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future getTxCount({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #getTxCount, + [], + {#address: address}, + ), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + _i15.Future checkCurrentReceivingAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentReceivingAddressesForTransactions, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future checkCurrentChangeAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentChangeAddressesForTransactions, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future>> fastFetch( + List? allTxHashes) => + (super.noSuchMethod( + Invocation.method( + #fastFetch, + [allTxHashes], + ), + returnValue: _i15.Future>>.value( + >[]), + ) as _i15.Future>>); + @override + int estimateTxFee({ + required int? vSize, + required int? feeRatePerKB, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateTxFee, + [], + { + #vSize: vSize, + #feeRatePerKB: feeRatePerKB, + }, + ), + returnValue: 0, + ) as int); + @override + dynamic coinSelection( + int? satoshiAmountToSend, + int? selectedTxFeeRate, + String? _recipientAddress, + bool? isSendAll, { + int? additionalOutputs = 0, + List<_i8.UtxoObject>? utxos, + }) => + super.noSuchMethod(Invocation.method( + #coinSelection, + [ + satoshiAmountToSend, + selectedTxFeeRate, + _recipientAddress, + isSendAll, + ], + { + #additionalOutputs: additionalOutputs, + #utxos: utxos, + }, + )); + @override + _i15.Future> fetchBuildTxData( + List<_i8.UtxoObject>? utxosToUse) => + (super.noSuchMethod( + Invocation.method( + #fetchBuildTxData, + [utxosToUse], + ), + returnValue: + _i15.Future>.value({}), + ) as _i15.Future>); + @override + _i15.Future> buildTransaction({ + required List<_i8.UtxoObject>? utxosToUse, + required Map? utxoSigningData, + required List? recipients, + required List? satoshiAmounts, + }) => + (super.noSuchMethod( + Invocation.method( + #buildTransaction, + [], + { + #utxosToUse: utxosToUse, + #utxoSigningData: utxoSigningData, + #recipients: recipients, + #satoshiAmounts: satoshiAmounts, + }, + ), + returnValue: + _i15.Future>.value({}), + ) as _i15.Future>); + @override + _i15.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + int roughFeeEstimate( + int? inputCount, + int? outputCount, + int? feeRatePerKB, + ) => + (super.noSuchMethod( + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + returnValue: 0, + ) as int); + @override + int sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + returnValue: 0, + ) as int); + @override + _i15.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); +} + +/// A class which mocks [Manager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockManager extends _i1.Mock implements _i6.Manager { + @override + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i12.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_12( + this, + Invocation.getter(#wallet), + ), + ) as _i12.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i14.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i14.Coin.bitcoin, + ) as _i14.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i15.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i15.Future<_i8.FeeObject>); + @override + _i15.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + _i15.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i9.Decimal); + @override + _i15.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i9.Decimal); + @override + _i15.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i15.Future>.value([]), + ) as _i15.Future>); + @override + _i15.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i15.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i15.Future<_i8.TransactionData>); + @override + _i15.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i15.Future>.value(<_i8.UtxoObject>[]), + ) as _i15.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i15.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i15.Future>.value([]), + ) as _i15.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i15.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i15.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i15.Future>.value({}), + ) as _i15.Future>); + @override + _i15.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i15.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + _i15.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + _i15.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + _i15.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + void addListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [CoinServiceAPI]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockCoinServiceAPI extends _i1.Mock implements _i12.CoinServiceAPI { + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i14.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i14.Coin.bitcoin, + ) as _i14.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i15.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i15.Future<_i8.FeeObject>); + @override + _i15.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + _i15.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i15.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i15.Future<_i9.Decimal>); + @override + _i15.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i15.Future>.value([]), + ) as _i15.Future>); + @override + _i15.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i15.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i15.Future<_i8.TransactionData>); + @override + _i15.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i15.Future>.value(<_i8.UtxoObject>[]), + ) as _i15.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i15.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i15.Future>.value([]), + ) as _i15.Future>); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i15.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i15.Future>.value({}), + ) as _i15.Future>); + @override + _i15.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future send({ + required String? toAddress, + required int? amount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i15.Future.value(''), + ) as _i15.Future); + @override + _i15.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i15.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); + @override + _i15.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i15.Future.value(), + returnValueForMissingStub: _i15.Future.value(), + ) as _i15.Future); + @override + _i15.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i15.Future.value(0), + ) as _i15.Future); + @override + _i15.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i15.Future.value(false), + ) as _i15.Future); +} diff --git a/test/widget_tests/table_view/table_view_test.dart b/test/widget_tests/table_view/table_view_test.dart new file mode 100644 index 0000000000..2c33858d82 --- /dev/null +++ b/test/widget_tests/table_view/table_view_test.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/table_view/table_view.dart'; +import 'package:stackwallet/widgets/table_view/table_view_cell.dart'; +import 'package:stackwallet/widgets/table_view/table_view_row.dart'; + +void main() { + testWidgets("Test create table row widget ", (widgetTester) async { + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: Material( + child: TableView( + rows: [ + for (int i = 0; i < 10; i++) + TableViewRow(cells: [ + for (int j = 1; j <= 5; j++) + const TableViewCell(flex: 16, child: Text("Some Text")) + ], expandingChild: null) + ], + ), + ), + ), + ); + + expect(find.byType(TableView), findsOneWidget); + expect(find.byType(TableViewRow), findsWidgets); + expect(find.byType(TableViewCell), findsWidgets); + }); +} diff --git a/test/widget_tests/textfield_icon_button_test.dart b/test/widget_tests/textfield_icon_button_test.dart new file mode 100644 index 0000000000..ee628064e7 --- /dev/null +++ b/test/widget_tests/textfield_icon_button_test.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/icon_widgets/x_icon.dart'; +import 'package:stackwallet/widgets/textfield_icon_button.dart'; + +void main() { + testWidgets("test", (widgetTester) async { + await widgetTester.pumpWidget( + MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: TextFieldIconButton(child: XIcon()), + ), + ), + ); + + expect(find.byType(TextFieldIconButton), findsOneWidget); + expect(find.byType(XIcon), findsOneWidget); + }); +} diff --git a/test/widget_tests/transaction_card_test.dart b/test/widget_tests/transaction_card_test.dart index f96a0ebd0f..b23254f59e 100644 --- a/test/widget_tests/transaction_card_test.dart +++ b/test/widget_tests/transaction_card_test.dart @@ -1,353 +1,305 @@ -// import 'package:decimal/decimal.dart'; -// import 'package:flutter/material.dart'; -// import 'package:flutter_feather_icons/flutter_feather_icons.dart'; -// import 'package:flutter_test/flutter_test.dart'; -// import 'package:mockingjay/mockingjay.dart' as mockingjay; +import 'package:decimal/decimal.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_feather_icons/flutter_feather_icons.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockingjay/mockingjay.dart' as mockingjay; import 'package:mockito/annotations.dart'; -// import 'package:mockito/mockito.dart'; -// import 'package:stackwallet/models/models.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/models/models.dart'; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/services/coins/coin_service.dart'; +import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; import 'package:stackwallet/services/coins/manager.dart'; import 'package:stackwallet/services/locale_service.dart'; import 'package:stackwallet/services/notes_service.dart'; -// import 'package:stackwallet/widgets/transaction_card.dart'; +import 'package:stackwallet/services/price_service.dart'; +import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/utilities/default_nodes.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/listenable_map.dart'; +import 'package:stackwallet/utilities/prefs.dart'; +import 'package:stackwallet/widgets/transaction_card.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:tuple/tuple.dart'; -// import 'transaction_card_test.mocks.dart'; +import 'transaction_card_test.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) +@GenerateMocks([ + Wallets, + Manager, + CoinServiceAPI, + FiroWallet, + LocaleService, + Prefs, + PriceService, + NotesService +], customMocks: []) void main() { - // testWidgets("Sent confirmed tx displays correctly", (tester) async { - // final mockManager = MockManager(); - // final mockNotesService = MockNotesService(); - // final mockLocaleService = MockLocaleService(); - // - // final tx = Transaction( - // txid: "some txid", - // confirmedStatus: true, - // timestamp: 1648595998, - // txType: "Sent", - // amount: 100000000, - // aliens: [], - // worthNow: "0.01", - // worthAtBlockTimestamp: "0.01", - // fees: 3794, - // inputSize: 1, - // outputSize: 1, - // inputs: [], - // outputs: [], - // address: "", - // height: 450123, - // subType: "mint", - // ); - // - // when(mockManager.coinTicker).thenAnswer((_) => "FIRO"); - // when(mockManager.fiatPrice).thenAnswer((_) async => Decimal.ten); - // when(mockManager.fiatCurrency).thenAnswer((_) => "USD"); - // - // when(mockLocaleService.locale).thenAnswer((_) => "en_US"); - // - // await tester.pumpWidget( - // MaterialApp( - // home: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (context) => mockNotesService, - // ), - // ChangeNotifierProvider( - // create: (context) => mockManager, - // ), - // ChangeNotifierProvider( - // create: (context) => mockLocaleService, - // ), - // ], - // child: TransactionCard(transaction: tx), - // ), - // ), - // ); - // - // final title = find.text("Sent"); - // final price1 = find.text("0.00"); - // final amount = find.text("1.00000000 FIRO"); - // - // final icon = find.byIcon(FeatherIcons.arrowUp); - // - // expect(title, findsOneWidget); - // expect(price1, findsOneWidget); - // expect(amount, findsOneWidget); - // expect(icon, findsOneWidget); - // - // await tester.pumpAndSettle(Duration(seconds: 2)); - // - // final price2 = find.text("\$10.00"); - // expect(price2, findsOneWidget); - // - // verify(mockManager.addListener(any)).called(1); - // verify(mockLocaleService.addListener(any)).called(1); - // verify(mockNotesService.addListener(any)).called(1); - // - // verify(mockManager.fiatCurrency).called(1); - // verify(mockManager.fiatPrice).called(1); - // verify(mockManager.coinTicker).called(1); - // - // verify(mockLocaleService.locale).called(2); - // - // verifyNoMoreInteractions(mockNotesService); - // verifyNoMoreInteractions(mockManager); - // verifyNoMoreInteractions(mockLocaleService); - // }); - // - // testWidgets("Received unconfirmed tx displays correctly", (tester) async { - // final mockManager = MockManager(); - // final mockNotesService = MockNotesService(); - // final mockLocaleService = MockLocaleService(); - // - // final tx = Transaction( - // txid: "some txid", - // confirmedStatus: false, - // timestamp: 1648595998, - // txType: "Received", - // amount: 100000000, - // aliens: [], - // worthNow: "0.01", - // worthAtBlockTimestamp: "0.01", - // fees: 3794, - // inputSize: 1, - // outputSize: 1, - // inputs: [], - // outputs: [], - // address: "", - // height: null, - // subType: null, - // ); - // - // when(mockManager.coinTicker).thenAnswer((_) => "FIRO"); - // when(mockManager.fiatPrice).thenAnswer((_) async => Decimal.ten); - // when(mockManager.fiatCurrency).thenAnswer((_) => "USD"); - // - // when(mockLocaleService.locale).thenAnswer((_) => "en_US"); - // - // await tester.pumpWidget( - // MaterialApp( - // home: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (context) => mockNotesService, - // ), - // ChangeNotifierProvider( - // create: (context) => mockManager, - // ), - // ChangeNotifierProvider( - // create: (context) => mockLocaleService, - // ), - // ], - // child: TransactionCard(transaction: tx), - // ), - // ), - // ); - // - // final title = find.text("Receiving"); - // final price1 = find.text("0.00"); - // final amount = find.text("1.00000000 FIRO"); - // - // final icon = find.byIcon(FeatherIcons.arrowDown); - // - // expect(title, findsOneWidget); - // expect(price1, findsOneWidget); - // expect(amount, findsOneWidget); - // expect(icon, findsOneWidget); - // - // await tester.pumpAndSettle(Duration(seconds: 2)); - // - // final price2 = find.text("\$10.00"); - // expect(price2, findsOneWidget); - // - // verify(mockManager.addListener(any)).called(1); - // verify(mockLocaleService.addListener(any)).called(1); - // verify(mockNotesService.addListener(any)).called(1); - // - // verify(mockManager.fiatCurrency).called(1); - // verify(mockManager.fiatPrice).called(1); - // verify(mockManager.coinTicker).called(1); - // - // verify(mockLocaleService.locale).called(2); - // - // verifyNoMoreInteractions(mockNotesService); - // verifyNoMoreInteractions(mockManager); - // verifyNoMoreInteractions(mockLocaleService); - // }); - // - // testWidgets("bad tx displays correctly", (tester) async { - // final mockManager = MockManager(); - // final mockNotesService = MockNotesService(); - // final mockLocaleService = MockLocaleService(); - // - // final tx = Transaction( - // txid: "some txid", - // confirmedStatus: false, - // timestamp: 1648595998, - // txType: "ahhhhhh", - // amount: 100000000, - // aliens: [], - // worthNow: "0.01", - // worthAtBlockTimestamp: "0.01", - // fees: 3794, - // inputSize: 1, - // outputSize: 1, - // inputs: [], - // outputs: [], - // address: "", - // height: null, - // subType: null, - // ); - // - // when(mockManager.coinTicker).thenAnswer((_) => "FIRO"); - // when(mockManager.fiatPrice).thenAnswer((_) async => Decimal.ten); - // when(mockManager.fiatCurrency).thenAnswer((_) => "USD"); - // - // when(mockLocaleService.locale).thenAnswer((_) => "en_US"); - // - // await tester.pumpWidget( - // MaterialApp( - // home: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (context) => mockNotesService, - // ), - // ChangeNotifierProvider( - // create: (context) => mockManager, - // ), - // ChangeNotifierProvider( - // create: (context) => mockLocaleService, - // ), - // ], - // child: TransactionCard(transaction: tx), - // ), - // ), - // ); - // - // final title = find.text("Unknown"); - // final price1 = find.text("0.00"); - // final amount = find.text("1.00000000 FIRO"); - // - // final icon = find.byIcon(Icons.warning_rounded); - // - // expect(title, findsOneWidget); - // expect(price1, findsOneWidget); - // expect(amount, findsOneWidget); - // expect(icon, findsOneWidget); - // - // await tester.pumpAndSettle(Duration(seconds: 2)); - // - // final price2 = find.text("\$10.00"); - // expect(price2, findsOneWidget); - // - // verify(mockManager.addListener(any)).called(1); - // verify(mockLocaleService.addListener(any)).called(1); - // verify(mockNotesService.addListener(any)).called(1); - // - // verify(mockManager.fiatCurrency).called(1); - // verify(mockManager.fiatPrice).called(1); - // verify(mockManager.coinTicker).called(1); - // - // verify(mockLocaleService.locale).called(2); - // - // verifyNoMoreInteractions(mockNotesService); - // verifyNoMoreInteractions(mockManager); - // verifyNoMoreInteractions(mockLocaleService); - // }); - // - // testWidgets("Tap gesture", (tester) async { - // final mockManager = MockManager(); - // final mockNotesService = MockNotesService(); - // final mockLocaleService = MockLocaleService(); - // final navigator = mockingjay.MockNavigator(); - // - // final tx = Transaction( - // txid: "some txid", - // confirmedStatus: false, - // timestamp: 1648595998, - // txType: "Received", - // amount: 100000000, - // aliens: [], - // worthNow: "0.01", - // worthAtBlockTimestamp: "0.01", - // fees: 3794, - // inputSize: 1, - // outputSize: 1, - // inputs: [], - // outputs: [], - // address: "", - // height: null, - // subType: null, - // ); - // - // when(mockNotesService.getNoteFor(txid: "some txid")) - // .thenAnswer((_) async => "some note"); - // - // when(mockManager.coinTicker).thenAnswer((_) => "FIRO"); - // when(mockManager.fiatPrice).thenAnswer((_) async => Decimal.ten); - // when(mockManager.fiatCurrency).thenAnswer((_) => "USD"); - // - // when(mockLocaleService.locale).thenAnswer((_) => "en_US"); - // - // mockingjay - // .when(() => navigator.push(mockingjay.any( - // that: mockingjay.isRoute( - // whereName: equals("/transactiondetailsview"))))) - // .thenAnswer((_) async => {}); - // - // await tester.pumpWidget( - // MaterialApp( - // home: mockingjay.MockNavigatorProvider( - // navigator: navigator, - // child: MultiProvider( - // providers: [ - // ChangeNotifierProvider( - // create: (context) => mockNotesService, - // ), - // ChangeNotifierProvider( - // create: (context) => mockManager, - // ), - // ChangeNotifierProvider( - // create: (context) => mockLocaleService, - // ), - // ], - // child: TransactionCard(transaction: tx), - // ), - // ), - // ), - // ); - // - // expect(find.byType(GestureDetector), findsOneWidget); - // - // await tester.tap(find.byType(GestureDetector)); - // await tester.pump(); - // - // verify(mockManager.addListener(any)).called(1); - // verify(mockLocaleService.addListener(any)).called(1); - // verify(mockNotesService.addListener(any)).called(1); - // - // verify(mockNotesService.getNoteFor(txid: "some txid")).called(1); - // - // verify(mockManager.fiatCurrency).called(1); - // verify(mockManager.fiatPrice).called(1); - // verify(mockManager.coinTicker).called(1); - // - // verify(mockLocaleService.locale).called(2); - // - // verifyNoMoreInteractions(mockNotesService); - // verifyNoMoreInteractions(mockManager); - // verifyNoMoreInteractions(mockLocaleService); - // - // mockingjay - // .verify(() => navigator.push(mockingjay.any( - // that: mockingjay.isRoute( - // whereName: equals("/transactiondetailsview"))))) - // .called(1); - // - // mockingjay.verifyNoMoreInteractions(navigator); - // }); + TestWidgetsFlutterBinding.ensureInitialized(); + testWidgets("Sent confirmed tx displays correctly", (tester) async { + final mockManager = MockManager(); + final mockLocaleService = MockLocaleService(); + final wallets = MockWallets(); + final mockPrefs = MockPrefs(); + final mockPriceService = MockPriceService(); + + final tx = Transaction( + txid: "some txid", + confirmedStatus: true, + timestamp: 1648595998, + txType: "Sent", + amount: 100000000, + aliens: [], + worthNow: "0.01", + worthAtBlockTimestamp: "0.01", + fees: 3794, + inputSize: 1, + outputSize: 1, + inputs: [], + outputs: [], + address: "", + height: 450123, + subType: "", + confirmations: 10, + isCancelled: false); + + final CoinServiceAPI wallet = MockFiroWallet(); + + when(wallet.coin.ticker).thenAnswer((_) => "FIRO"); + when(mockLocaleService.locale).thenAnswer((_) => "en_US"); + when(mockPrefs.currency).thenAnswer((_) => "USD"); + when(mockPrefs.externalCalls).thenAnswer((_) => true); + when(mockPriceService.getPrice(Coin.firo)) + .thenAnswer((realInvocation) => Tuple2(Decimal.ten, 0.00)); + + when(wallet.coin).thenAnswer((_) => Coin.firo); + + when(wallets.getManager("wallet-id")) + .thenAnswer((realInvocation) => Manager(wallet)); + // + await tester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + localeServiceChangeNotifierProvider + .overrideWithValue(mockLocaleService), + prefsChangeNotifierProvider.overrideWithValue(mockPrefs), + priceAnd24hChangeNotifierProvider.overrideWithValue(mockPriceService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: TransactionCard(transaction: tx, walletId: "wallet-id"), + ), + ), + ); + + // + final title = find.text("Sent"); + // final price1 = find.text("0.00 USD"); + final amount = find.text("1.00000000 FIRO"); + + final icon = find.byIcon(FeatherIcons.arrowUp); + + expect(title, findsOneWidget); + // expect(price1, findsOneWidget); + expect(amount, findsOneWidget); + // expect(icon, findsOneWidget); + // + await tester.pumpAndSettle(Duration(seconds: 2)); + // + // final price2 = find.text("\$10.00"); + // expect(price2, findsOneWidget); + // + // verify(mockManager.addListener(any)).called(1); + verify(mockLocaleService.addListener(any)).called(1); + + verify(mockPrefs.currency).called(1); + verify(mockPriceService.getPrice(Coin.firo)).called(1); + verify(wallet.coin.ticker).called(1); + + verify(mockLocaleService.locale).called(1); + + verifyNoMoreInteractions(mockManager); + verifyNoMoreInteractions(mockLocaleService); + }); + + testWidgets("Received unconfirmed tx displays correctly", (tester) async { + final mockManager = MockManager(); + final mockLocaleService = MockLocaleService(); + final wallets = MockWallets(); + final mockPrefs = MockPrefs(); + final mockPriceService = MockPriceService(); + + final tx = Transaction( + txid: "some txid", + confirmedStatus: false, + timestamp: 1648595998, + txType: "Received", + amount: 100000000, + aliens: [], + worthNow: "0.01", + worthAtBlockTimestamp: "0.01", + fees: 3794, + inputSize: 1, + outputSize: 1, + inputs: [], + outputs: [], + address: "", + height: 0, + subType: "", + confirmations: 0, + ); + + final CoinServiceAPI wallet = MockFiroWallet(); + + when(wallet.coin.ticker).thenAnswer((_) => "FIRO"); + when(mockLocaleService.locale).thenAnswer((_) => "en_US"); + when(mockPrefs.currency).thenAnswer((_) => "USD"); + when(mockPrefs.externalCalls).thenAnswer((_) => true); + when(mockPriceService.getPrice(Coin.firo)) + .thenAnswer((realInvocation) => Tuple2(Decimal.ten, 0.00)); + + when(wallet.coin).thenAnswer((_) => Coin.firo); + + when(wallets.getManager("wallet-id")) + .thenAnswer((realInvocation) => Manager(wallet)); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + localeServiceChangeNotifierProvider + .overrideWithValue(mockLocaleService), + prefsChangeNotifierProvider.overrideWithValue(mockPrefs), + priceAnd24hChangeNotifierProvider.overrideWithValue(mockPriceService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: TransactionCard(transaction: tx, walletId: "wallet-id"), + ), + ), + ); + + final title = find.text("Receiving"); + final amount = find.text("1.00000000 FIRO"); + + expect(title, findsOneWidget); + expect(amount, findsOneWidget); + + await tester.pumpAndSettle(Duration(seconds: 2)); + + verify(mockLocaleService.addListener(any)).called(1); + + verify(mockPrefs.currency).called(1); + verify(mockPriceService.getPrice(Coin.firo)).called(1); + verify(wallet.coin.ticker).called(1); + + verify(mockLocaleService.locale).called(1); + + verifyNoMoreInteractions(mockManager); + verifyNoMoreInteractions(mockLocaleService); + }); + + testWidgets("Tap gesture", (tester) async { + final mockManager = MockManager(); + final mockLocaleService = MockLocaleService(); + final wallets = MockWallets(); + final mockPrefs = MockPrefs(); + final mockPriceService = MockPriceService(); + final navigator = mockingjay.MockNavigator(); + + final tx = Transaction( + txid: "some txid", + confirmedStatus: false, + timestamp: 1648595998, + txType: "Received", + amount: 100000000, + aliens: [], + worthNow: "0.01", + worthAtBlockTimestamp: "0.01", + fees: 3794, + inputSize: 1, + outputSize: 1, + inputs: [], + outputs: [], + address: "", + height: 250, + subType: "", + confirmations: 10, + ); + + final CoinServiceAPI wallet = MockFiroWallet(); + + when(wallet.coin.ticker).thenAnswer((_) => "FIRO"); + when(mockLocaleService.locale).thenAnswer((_) => "en_US"); + when(mockPrefs.currency).thenAnswer((_) => "USD"); + when(mockPrefs.externalCalls).thenAnswer((_) => true); + when(mockPriceService.getPrice(Coin.firo)) + .thenAnswer((realInvocation) => Tuple2(Decimal.ten, 0.00)); + + when(wallet.coin).thenAnswer((_) => Coin.firo); + + when(wallets.getManager("wallet id")) + .thenAnswer((realInvocation) => Manager(wallet)); + + mockingjay + .when(() => navigator.pushNamed("/transactionDetails", + arguments: Tuple3(tx, Coin.firo, "wallet id"))) + .thenAnswer((_) async => {}); + + await tester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + localeServiceChangeNotifierProvider + .overrideWithValue(mockLocaleService), + prefsChangeNotifierProvider.overrideWithValue(mockPrefs), + priceAnd24hChangeNotifierProvider.overrideWithValue(mockPriceService) + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: mockingjay.MockNavigatorProvider( + navigator: navigator, + child: TransactionCard(transaction: tx, walletId: "wallet id")), + ), + ), + ); + + expect(find.byType(GestureDetector), findsOneWidget); + + await tester.tap(find.byType(GestureDetector)); + await tester.pump(); + + verify(mockLocaleService.addListener(any)).called(1); + + verify(mockPrefs.currency).called(1); + verify(mockLocaleService.locale).called(1); + verify(wallet.coin.ticker).called(1); + + verifyNoMoreInteractions(wallet); + verifyNoMoreInteractions(mockLocaleService); + + mockingjay + .verify(() => navigator.pushNamed("/transactionDetails", + arguments: Tuple3(tx, Coin.firo, "wallet id"))) + .called(1); + }); } diff --git a/test/widget_tests/transaction_card_test.mocks.dart b/test/widget_tests/transaction_card_test.mocks.dart index 012df80616..df696801ac 100644 --- a/test/widget_tests/transaction_card_test.mocks.dart +++ b/test/widget_tests/transaction_card_test.mocks.dart @@ -1,18 +1,36 @@ -// Mocks generated by Mockito 5.2.0 from annotations +// Mocks generated by Mockito 5.3.2 from annotations // in stackwallet/test/widget_tests/transaction_card_test.dart. // Do not manually edit this file. -import 'dart:async' as _i7; -import 'dart:ui' as _i8; +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i16; +import 'dart:ui' as _i18; -import 'package:decimal/decimal.dart' as _i4; +import 'package:decimal/decimal.dart' as _i9; +import 'package:flutter/foundation.dart' as _i4; +import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; import 'package:mockito/mockito.dart' as _i1; -import 'package:stackwallet/models/models.dart' as _i3; -import 'package:stackwallet/services/coins/coin_service.dart' as _i2; -import 'package:stackwallet/services/coins/manager.dart' as _i5; -import 'package:stackwallet/services/locale_service.dart' as _i10; -import 'package:stackwallet/services/notes_service.dart' as _i9; -import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i12; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i11; +import 'package:stackwallet/models/models.dart' as _i8; +import 'package:stackwallet/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart' + as _i22; +import 'package:stackwallet/services/coins/coin_service.dart' as _i7; +import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as _i19; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/locale_service.dart' as _i20; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/services/notes_service.dart' as _i25; +import 'package:stackwallet/services/price_service.dart' as _i24; +import 'package:stackwallet/services/transaction_notification_tracker.dart' + as _i10; +import 'package:stackwallet/services/wallets.dart' as _i14; +import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i23; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i15; +import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i21; +import 'package:stackwallet/utilities/prefs.dart' as _i17; +import 'package:tuple/tuple.dart' as _i13; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -23,338 +41,2521 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i6; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeCoinServiceAPI_0 extends _i1.Fake implements _i2.CoinServiceAPI {} +class _FakeWalletsService_0 extends _i1.SmartFake + implements _i2.WalletsService { + _FakeWalletsService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeFeeObject_1 extends _i1.Fake implements _i3.FeeObject {} +class _FakeNodeService_1 extends _i1.SmartFake implements _i3.NodeService { + _FakeNodeService_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {} +class _FakeChangeNotifierProvider_2 + extends _i1.SmartFake implements _i5.ChangeNotifierProvider { + _FakeChangeNotifierProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransactionData_3 extends _i1.Fake implements _i3.TransactionData {} +class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager { + _FakeManager_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -/// A class which mocks [Manager]. +class _FakeCoinServiceAPI_4 extends _i1.SmartFake + implements _i7.CoinServiceAPI { + _FakeCoinServiceAPI_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFeeObject_5 extends _i1.SmartFake implements _i8.FeeObject { + _FakeFeeObject_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_6 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionData_7 extends _i1.SmartFake + implements _i8.TransactionData { + _FakeTransactionData_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionNotificationTracker_8 extends _i1.SmartFake + implements _i10.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUtxoData_9 extends _i1.SmartFake implements _i8.UtxoData { + _FakeUtxoData_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_10 extends _i1.SmartFake implements _i11.ElectrumX { + _FakeElectrumX_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCachedElectrumX_11 extends _i1.SmartFake + implements _i12.CachedElectrumX { + _FakeCachedElectrumX_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDuration_12 extends _i1.SmartFake implements Duration { + _FakeDuration_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTuple2_13 extends _i1.SmartFake + implements _i13.Tuple2 { + _FakeTuple2_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallets]. /// /// See the documentation for Mockito's code generation for more information. -class MockManager extends _i1.Mock implements _i5.Manager { - @override - bool get isActiveWallet => (super - .noSuchMethod(Invocation.getter(#isActiveWallet), returnValue: false) - as bool); - @override - set isActiveWallet(bool? isActive) => - super.noSuchMethod(Invocation.setter(#isActiveWallet, isActive), - returnValueForMissingStub: null); - @override - _i2.CoinServiceAPI get wallet => - (super.noSuchMethod(Invocation.getter(#wallet), - returnValue: _FakeCoinServiceAPI_0()) as _i2.CoinServiceAPI); - @override - bool get hasBackgroundRefreshListener => - (super.noSuchMethod(Invocation.getter(#hasBackgroundRefreshListener), - returnValue: false) as bool); - @override - _i6.Coin get coin => (super.noSuchMethod(Invocation.getter(#coin), - returnValue: _i6.Coin.bitcoin) as _i6.Coin); - @override - bool get isRefreshing => - (super.noSuchMethod(Invocation.getter(#isRefreshing), returnValue: false) - as bool); - @override - bool get shouldAutoSync => (super - .noSuchMethod(Invocation.getter(#shouldAutoSync), returnValue: false) - as bool); - @override - set shouldAutoSync(bool? shouldAutoSync) => - super.noSuchMethod(Invocation.setter(#shouldAutoSync, shouldAutoSync), - returnValueForMissingStub: null); - @override - bool get isFavorite => - (super.noSuchMethod(Invocation.getter(#isFavorite), returnValue: false) - as bool); - @override - set isFavorite(bool? markFavorite) => - super.noSuchMethod(Invocation.setter(#isFavorite, markFavorite), - returnValueForMissingStub: null); - @override - _i7.Future<_i3.FeeObject> get fees => - (super.noSuchMethod(Invocation.getter(#fees), - returnValue: Future<_i3.FeeObject>.value(_FakeFeeObject_1())) - as _i7.Future<_i3.FeeObject>); - @override - _i7.Future get maxFee => (super.noSuchMethod(Invocation.getter(#maxFee), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future get currentReceivingAddress => - (super.noSuchMethod(Invocation.getter(#currentReceivingAddress), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future<_i4.Decimal> get availableBalance => - (super.noSuchMethod(Invocation.getter(#availableBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedAvailableBalance => - (super.noSuchMethod(Invocation.getter(#cachedAvailableBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future<_i4.Decimal> get pendingBalance => - (super.noSuchMethod(Invocation.getter(#pendingBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get balanceMinusMaxFee => - (super.noSuchMethod(Invocation.getter(#balanceMinusMaxFee), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i7.Future<_i4.Decimal> get totalBalance => - (super.noSuchMethod(Invocation.getter(#totalBalance), - returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2())) - as _i7.Future<_i4.Decimal>); - @override - _i4.Decimal get cachedTotalBalance => - (super.noSuchMethod(Invocation.getter(#cachedTotalBalance), - returnValue: _FakeDecimal_2()) as _i4.Decimal); - @override - _i7.Future> get allOwnAddresses => - (super.noSuchMethod(Invocation.getter(#allOwnAddresses), - returnValue: Future>.value([])) - as _i7.Future>); - @override - _i7.Future<_i3.TransactionData> get transactionData => - (super.noSuchMethod(Invocation.getter(#transactionData), - returnValue: - Future<_i3.TransactionData>.value(_FakeTransactionData_3())) - as _i7.Future<_i3.TransactionData>); - @override - _i7.Future> get unspentOutputs => (super.noSuchMethod( - Invocation.getter(#unspentOutputs), - returnValue: Future>.value(<_i3.UtxoObject>[])) - as _i7.Future>); - @override - set walletName(String? newName) => - super.noSuchMethod(Invocation.setter(#walletName, newName), - returnValueForMissingStub: null); - @override - String get walletName => - (super.noSuchMethod(Invocation.getter(#walletName), returnValue: '') - as String); - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - _i7.Future> get mnemonic => - (super.noSuchMethod(Invocation.getter(#mnemonic), - returnValue: Future>.value([])) - as _i7.Future>); - @override - bool get isConnected => - (super.noSuchMethod(Invocation.getter(#isConnected), returnValue: false) - as bool); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future updateNode(bool? shouldRefresh) => - (super.noSuchMethod(Invocation.method(#updateNode, [shouldRefresh]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i7.Future> prepareSend( - {String? address, int? satoshiAmount, Map? args}) => - (super.noSuchMethod( - Invocation.method(#prepareSend, [], { - #address: address, - #satoshiAmount: satoshiAmount, - #args: args - }), - returnValue: - Future>.value({})) - as _i7.Future>); - @override - _i7.Future confirmSend({Map? txData}) => (super - .noSuchMethod(Invocation.method(#confirmSend, [], {#txData: txData}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future send( - {String? toAddress, - int? amount, - Map? args = const {}}) => +class MockWallets extends _i1.Mock implements _i14.Wallets { + MockWallets() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.WalletsService get walletsService => (super.noSuchMethod( + Invocation.getter(#walletsService), + returnValue: _FakeWalletsService_0( + this, + Invocation.getter(#walletsService), + ), + ) as _i2.WalletsService); + @override + set walletsService(_i2.WalletsService? _walletsService) => super.noSuchMethod( + Invocation.setter( + #walletsService, + _walletsService, + ), + returnValueForMissingStub: null, + ); + @override + _i3.NodeService get nodeService => (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_1( + this, + Invocation.getter(#nodeService), + ), + ) as _i3.NodeService); + @override + set nodeService(_i3.NodeService? _nodeService) => super.noSuchMethod( + Invocation.setter( + #nodeService, + _nodeService, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasWallets => (super.noSuchMethod( + Invocation.getter(#hasWallets), + returnValue: false, + ) as bool); + @override + List<_i5.ChangeNotifierProvider<_i6.Manager>> get managerProviders => + (super.noSuchMethod( + Invocation.getter(#managerProviders), + returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[], + ) as List<_i5.ChangeNotifierProvider<_i6.Manager>>); + @override + List<_i6.Manager> get managers => (super.noSuchMethod( + Invocation.getter(#managers), + returnValue: <_i6.Manager>[], + ) as List<_i6.Manager>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + List getWalletIdsFor({required _i15.Coin? coin}) => (super.noSuchMethod( + Invocation.method( + #getWalletIdsFor, + [], + {#coin: coin}, + ), + returnValue: [], + ) as List); + @override + Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + getManagerProvidersByCoin() => (super.noSuchMethod( + Invocation.method( + #getManagerProvidersByCoin, + [], + ), + returnValue: <_i15.Coin, + List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, + ) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + @override + _i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider( + String? walletId) => + (super.noSuchMethod( + Invocation.method( + #getManagerProvider, + [walletId], + ), + returnValue: _FakeChangeNotifierProvider_2<_i6.Manager>( + this, + Invocation.method( + #getManagerProvider, + [walletId], + ), + ), + ) as _i5.ChangeNotifierProvider<_i6.Manager>); + @override + _i6.Manager getManager(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getManager, + [walletId], + ), + returnValue: _FakeManager_3( + this, Invocation.method( - #send, [], {#toAddress: toAddress, #amount: amount, #args: args}), - returnValue: Future.value('')) as _i7.Future); - @override - _i7.Future refresh() => - (super.noSuchMethod(Invocation.method(#refresh, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - bool validateAddress(String? address) => - (super.noSuchMethod(Invocation.method(#validateAddress, [address]), - returnValue: false) as bool); - @override - _i7.Future testNetworkConnection() => - (super.noSuchMethod(Invocation.method(#testNetworkConnection, []), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future initializeNew() => - (super.noSuchMethod(Invocation.method(#initializeNew, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future initializeExisting() => - (super.noSuchMethod(Invocation.method(#initializeExisting, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future recoverFromMnemonic( - {String? mnemonic, - int? maxUnusedAddressGap, - int? maxNumberOfIndexesToCheck, - int? height}) => - (super.noSuchMethod( - Invocation.method(#recoverFromMnemonic, [], { + #getManager, + [walletId], + ), + ), + ) as _i6.Manager); + @override + void addWallet({ + required String? walletId, + required _i6.Manager? manager, + }) => + super.noSuchMethod( + Invocation.method( + #addWallet, + [], + { + #walletId: walletId, + #manager: manager, + }, + ), + returnValueForMissingStub: null, + ); + @override + void removeWallet({required String? walletId}) => super.noSuchMethod( + Invocation.method( + #removeWallet, + [], + {#walletId: walletId}, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future load(_i17.Prefs? prefs) => (super.noSuchMethod( + Invocation.method( + #load, + [prefs], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future loadAfterStackRestore( + _i17.Prefs? prefs, + List<_i6.Manager>? managers, + ) => + (super.noSuchMethod( + Invocation.method( + #loadAfterStackRestore, + [ + prefs, + managers, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [Manager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockManager extends _i1.Mock implements _i6.Manager { + MockManager() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i7.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_4( + this, + Invocation.getter(#wallet), + ), + ) as _i7.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_7( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { #mnemonic: mnemonic, #maxUnusedAddressGap: maxUnusedAddressGap, #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, - #height: height - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future exitCurrentWallet() => - (super.noSuchMethod(Invocation.method(#exitCurrentWallet, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future fullRescan( - int? maxUnusedAddressGap, int? maxNumberOfIndexesToCheck) => + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => (super.noSuchMethod( - Invocation.method( - #fullRescan, [maxUnusedAddressGap, maxNumberOfIndexesToCheck]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future isOwnAddress(String? address) => - (super.noSuchMethod(Invocation.method(#isOwnAddress, [address]), - returnValue: Future.value(false)) as _i7.Future); - @override - _i7.Future estimateFeeFor(int? satoshiAmount, int? feeRate) => + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => (super.noSuchMethod( - Invocation.method(#estimateFeeFor, [satoshiAmount, feeRate]), - returnValue: Future.value(0)) as _i7.Future); - @override - _i7.Future generateNewAddress() => - (super.noSuchMethod(Invocation.method(#generateNewAddress, []), - returnValue: Future.value(false)) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } -/// A class which mocks [NotesService]. +/// A class which mocks [CoinServiceAPI]. /// /// See the documentation for Mockito's code generation for more information. -class MockNotesService extends _i1.Mock implements _i9.NotesService { - @override - String get walletId => - (super.noSuchMethod(Invocation.getter(#walletId), returnValue: '') - as String); - @override - Map get notesSync => - (super.noSuchMethod(Invocation.getter(#notesSync), - returnValue: {}) as Map); - @override - _i7.Future> get notes => (super.noSuchMethod( - Invocation.getter(#notes), - returnValue: Future>.value({})) - as _i7.Future>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future> search(String? text) => (super.noSuchMethod( - Invocation.method(#search, [text]), - returnValue: Future>.value({})) - as _i7.Future>); - @override - _i7.Future getNoteFor({String? txid}) => - (super.noSuchMethod(Invocation.method(#getNoteFor, [], {#txid: txid}), - returnValue: Future.value('')) as _i7.Future); +class MockCoinServiceAPI extends _i1.Mock implements _i7.CoinServiceAPI { + MockCoinServiceAPI() { + _i1.throwOnMissingStub(this); + } + @override - _i7.Future editOrAddNote({String? txid, String? note}) => + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_7( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => (super.noSuchMethod( - Invocation.method(#editOrAddNote, [], {#txid: txid, #note: note}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future deleteNote({String? txid}) => - (super.noSuchMethod(Invocation.method(#deleteNote, [], {#txid: txid}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); +} + +/// A class which mocks [FiroWallet]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockFiroWallet extends _i1.Mock implements _i19.FiroWallet { + MockFiroWallet() { + _i1.throwOnMissingStub(this); + } + @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + set timer(_i16.Timer? _timer) => super.noSuchMethod( + Invocation.setter( + #timer, + _timer, + ), + returnValueForMissingStub: null, + ); + @override + _i10.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + Invocation.getter(#txTracker), + returnValue: _FakeTransactionNotificationTracker_8( + this, + Invocation.getter(#txTracker), + ), + ) as _i10.TransactionNotificationTracker); + @override + set txTracker(_i10.TransactionNotificationTracker? _txTracker) => + super.noSuchMethod( + Invocation.setter( + #txTracker, + _txTracker, + ), + returnValueForMissingStub: null, + ); + @override + bool get refreshMutex => (super.noSuchMethod( + Invocation.getter(#refreshMutex), + returnValue: false, + ) as bool); + @override + set refreshMutex(bool? _refreshMutex) => super.noSuchMethod( + Invocation.setter( + #refreshMutex, + _refreshMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get longMutex => (super.noSuchMethod( + Invocation.getter(#longMutex), + returnValue: false, + ) as bool); + @override + set longMutex(bool? _longMutex) => super.noSuchMethod( + Invocation.setter( + #longMutex, + _longMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get isActive => (super.noSuchMethod( + Invocation.getter(#isActive), + returnValue: false, + ) as bool); + @override + set isActive(bool? _isActive) => super.noSuchMethod( + Invocation.setter( + #isActive, + _isActive, + ), + returnValueForMissingStub: null, + ); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_7( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future<_i8.UtxoData> get utxoData => (super.noSuchMethod( + Invocation.getter(#utxoData), + returnValue: _i16.Future<_i8.UtxoData>.value(_FakeUtxoData_9( + this, + Invocation.getter(#utxoData), + )), + ) as _i16.Future<_i8.UtxoData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get lelantusTransactionData => + (super.noSuchMethod( + Invocation.getter(#lelantusTransactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_7( + this, + Invocation.getter(#lelantusTransactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future> get balances => (super.noSuchMethod( + Invocation.getter(#balances), + returnValue: _i16.Future>.value(<_i9.Decimal>[]), + ) as _i16.Future>); + @override + _i16.Future<_i9.Decimal> get firoPrice => (super.noSuchMethod( + Invocation.getter(#firoPrice), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#firoPrice), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_5( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i11.ElectrumX get electrumXClient => (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumX_10( + this, + Invocation.getter(#electrumXClient), + ), + ) as _i11.ElectrumX); + @override + _i12.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + Invocation.getter(#cachedElectrumXClient), + returnValue: _FakeCachedElectrumX_11( + this, + Invocation.getter(#cachedElectrumXClient), + ), + ) as _i12.CachedElectrumX); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void startNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #startNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + void stopNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #stopNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future> prepareSendPublic({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSendPublic, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSendPublic({dynamic txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSendPublic, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + int estimateTxFee({ + required int? vSize, + required int? feeRatePerKB, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateTxFee, + [], + { + #vSize: vSize, + #feeRatePerKB: feeRatePerKB, + }, + ), + returnValue: 0, + ) as int); + @override + dynamic coinSelection( + int? satoshiAmountToSend, + int? selectedTxFeeRate, + String? _recipientAddress, + bool? isSendAll, { + int? additionalOutputs = 0, + List<_i8.UtxoObject>? utxos, + }) => + super.noSuchMethod(Invocation.method( + #coinSelection, + [ + satoshiAmountToSend, + selectedTxFeeRate, + _recipientAddress, + isSendAll, + ], + { + #additionalOutputs: additionalOutputs, + #utxos: utxos, + }, + )); + @override + _i16.Future> fetchBuildTxData( + List<_i8.UtxoObject>? utxosToUse) => + (super.noSuchMethod( + Invocation.method( + #fetchBuildTxData, + [utxosToUse], + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future> buildTransaction({ + required List<_i8.UtxoObject>? utxosToUse, + required Map? utxoSigningData, + required List? recipients, + required List? satoshiAmounts, + }) => + (super.noSuchMethod( + Invocation.method( + #buildTransaction, + [], + { + #utxosToUse: utxosToUse, + #utxoSigningData: utxoSigningData, + #recipients: recipients, + #satoshiAmounts: satoshiAmounts, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refreshIfThereIsNewData() => (super.noSuchMethod( + Invocation.method( + #refreshIfThereIsNewData, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future getAllTxsToWatch( + _i8.TransactionData? txData, + _i8.TransactionData? lTxData, + ) => + (super.noSuchMethod( + Invocation.method( + #getAllTxsToWatch, + [ + txData, + lTxData, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + List> getLelantusCoinMap() => + (super.noSuchMethod( + Invocation.method( + #getLelantusCoinMap, + [], + ), + returnValue: >[], + ) as List>); + @override + _i16.Future anonymizeAllPublicFunds() => (super.noSuchMethod( + Invocation.method( + #anonymizeAllPublicFunds, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future>> createMintsFromAmount(int? total) => + (super.noSuchMethod( + Invocation.method( + #createMintsFromAmount, + [total], + ), + returnValue: _i16.Future>>.value( + >[]), + ) as _i16.Future>>); + @override + _i16.Future submitHexToNetwork(String? hex) => (super.noSuchMethod( + Invocation.method( + #submitHexToNetwork, + [hex], + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future> buildMintTransaction( + List<_i8.UtxoObject>? utxosToUse, + int? satoshisPerRecipient, + List>? mintsMap, + ) => + (super.noSuchMethod( + Invocation.method( + #buildMintTransaction, + [ + utxosToUse, + satoshisPerRecipient, + mintsMap, + ], + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future checkReceivingAddressForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkReceivingAddressForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future checkChangeAddressForTransactions() => (super.noSuchMethod( + Invocation.method( + #checkChangeAddressForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fillAddresses( + String? suppliedMnemonic, { + int? perBatch = 50, + int? numberOfThreads = 4, + }) => + (super.noSuchMethod( + Invocation.method( + #fillAddresses, + [suppliedMnemonic], + { + #perBatch: perBatch, + #numberOfThreads: numberOfThreads, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future incrementAddressIndexForChain(int? chain) => + (super.noSuchMethod( + Invocation.method( + #incrementAddressIndexForChain, + [chain], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addToAddressesArrayForChain( + String? address, + int? chain, + ) => + (super.noSuchMethod( + Invocation.method( + #addToAddressesArrayForChain, + [ + address, + chain, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future> getSetDataMap(int? latestSetId) => + (super.noSuchMethod( + Invocation.method( + #getSetDataMap, + [latestSetId], + ), + returnValue: _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future>> fetchAnonymitySets() => + (super.noSuchMethod( + Invocation.method( + #fetchAnonymitySets, + [], + ), + returnValue: _i16.Future>>.value( + >[]), + ) as _i16.Future>>); + @override + _i16.Future getLatestSetId() => (super.noSuchMethod( + Invocation.method( + #getLatestSetId, + [], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future> getUsedCoinSerials() => (super.noSuchMethod( + Invocation.method( + #getUsedCoinSerials, + [], + ), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future getCoinsToJoinSplit(int? required) => + (super.noSuchMethod( + Invocation.method( + #getCoinsToJoinSplit, + [required], + ), + returnValue: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateJoinSplitFee(int? spendAmount) => + (super.noSuchMethod( + Invocation.method( + #estimateJoinSplitFee, + [spendAmount], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future estimateFeeForPublic( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeForPublic, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + int roughFeeEstimate( + int? inputCount, + int? outputCount, + int? feeRatePerKB, + ) => + (super.noSuchMethod( + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + returnValue: 0, + ) as int); + @override + int sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + returnValue: 0, + ) as int); + @override + _i16.Future>> fastFetch( + List? allTxHashes) => + (super.noSuchMethod( + Invocation.method( + #fastFetch, + [allTxHashes], + ), + returnValue: _i16.Future>>.value( + >[]), + ) as _i16.Future>>); + @override + _i16.Future> getJMintTransactions( + _i12.CachedElectrumX? cachedClient, + List? transactions, + String? currency, + _i15.Coin? coin, + _i9.Decimal? currentPrice, + String? locale, + ) => + (super.noSuchMethod( + Invocation.method( + #getJMintTransactions, + [ + cachedClient, + transactions, + currency, + coin, + currentPrice, + locale, + ], + ), + returnValue: + _i16.Future>.value(<_i8.Transaction>[]), + ) as _i16.Future>); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> availablePrivateBalance() => (super.noSuchMethod( + Invocation.method( + #availablePrivateBalance, + [], + ), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.method( + #availablePrivateBalance, + [], + ), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> availablePublicBalance() => (super.noSuchMethod( + Invocation.method( + #availablePublicBalance, + [], + ), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.method( + #availablePublicBalance, + [], + ), + )), + ) as _i16.Future<_i9.Decimal>); } /// A class which mocks [LocaleService]. /// /// See the documentation for Mockito's code generation for more information. -class MockLocaleService extends _i1.Mock implements _i10.LocaleService { - @override - 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 - _i7.Future loadLocale({bool? notify = true}) => - (super.noSuchMethod(Invocation.method(#loadLocale, [], {#notify: notify}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); +class MockLocaleService extends _i1.Mock implements _i20.LocaleService { + MockLocaleService() { + _i1.throwOnMissingStub(this); + } + @override - void addListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); + 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 + _i16.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [Prefs]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPrefs extends _i1.Mock implements _i17.Prefs { + MockPrefs() { + _i1.throwOnMissingStub(this); + } + @override - void removeListener(_i8.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); + bool get isInitialized => (super.noSuchMethod( + Invocation.getter(#isInitialized), + returnValue: false, + ) as bool); + @override + int get lastUnlockedTimeout => (super.noSuchMethod( + Invocation.getter(#lastUnlockedTimeout), + returnValue: 0, + ) as int); + @override + set lastUnlockedTimeout(int? lastUnlockedTimeout) => super.noSuchMethod( + Invocation.setter( + #lastUnlockedTimeout, + lastUnlockedTimeout, + ), + returnValueForMissingStub: null, + ); + @override + int get lastUnlocked => (super.noSuchMethod( + Invocation.getter(#lastUnlocked), + returnValue: 0, + ) as int); + @override + set lastUnlocked(int? lastUnlocked) => super.noSuchMethod( + Invocation.setter( + #lastUnlocked, + lastUnlocked, + ), + returnValueForMissingStub: null, + ); + @override + int get currentNotificationId => (super.noSuchMethod( + Invocation.getter(#currentNotificationId), + returnValue: 0, + ) as int); + @override + List get walletIdsSyncOnStartup => (super.noSuchMethod( + Invocation.getter(#walletIdsSyncOnStartup), + returnValue: [], + ) as List); + @override + set walletIdsSyncOnStartup(List? walletIdsSyncOnStartup) => + super.noSuchMethod( + Invocation.setter( + #walletIdsSyncOnStartup, + walletIdsSyncOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + _i21.SyncingType get syncType => (super.noSuchMethod( + Invocation.getter(#syncType), + returnValue: _i21.SyncingType.currentWalletOnly, + ) as _i21.SyncingType); + @override + set syncType(_i21.SyncingType? syncType) => super.noSuchMethod( + Invocation.setter( + #syncType, + syncType, + ), + returnValueForMissingStub: null, + ); + @override + bool get wifiOnly => (super.noSuchMethod( + Invocation.getter(#wifiOnly), + returnValue: false, + ) as bool); + @override + set wifiOnly(bool? wifiOnly) => super.noSuchMethod( + Invocation.setter( + #wifiOnly, + wifiOnly, + ), + returnValueForMissingStub: null, + ); + @override + bool get showFavoriteWallets => (super.noSuchMethod( + Invocation.getter(#showFavoriteWallets), + returnValue: false, + ) as bool); + @override + set showFavoriteWallets(bool? showFavoriteWallets) => super.noSuchMethod( + Invocation.setter( + #showFavoriteWallets, + showFavoriteWallets, + ), + returnValueForMissingStub: null, + ); + @override + String get language => (super.noSuchMethod( + Invocation.getter(#language), + returnValue: '', + ) as String); + @override + set language(String? newLanguage) => super.noSuchMethod( + Invocation.setter( + #language, + newLanguage, + ), + returnValueForMissingStub: null, + ); + @override + String get currency => (super.noSuchMethod( + Invocation.getter(#currency), + returnValue: '', + ) as String); + @override + set currency(String? newCurrency) => super.noSuchMethod( + Invocation.setter( + #currency, + newCurrency, + ), + returnValueForMissingStub: null, + ); + @override + _i22.ExchangeRateType get exchangeRateType => (super.noSuchMethod( + Invocation.getter(#exchangeRateType), + returnValue: _i22.ExchangeRateType.estimated, + ) as _i22.ExchangeRateType); + @override + set exchangeRateType(_i22.ExchangeRateType? exchangeRateType) => + super.noSuchMethod( + Invocation.setter( + #exchangeRateType, + exchangeRateType, + ), + returnValueForMissingStub: null, + ); + @override + bool get useBiometrics => (super.noSuchMethod( + Invocation.getter(#useBiometrics), + returnValue: false, + ) as bool); + @override + set useBiometrics(bool? useBiometrics) => super.noSuchMethod( + Invocation.setter( + #useBiometrics, + useBiometrics, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasPin => (super.noSuchMethod( + Invocation.getter(#hasPin), + returnValue: false, + ) as bool); + @override + set hasPin(bool? hasPin) => super.noSuchMethod( + Invocation.setter( + #hasPin, + hasPin, + ), + returnValueForMissingStub: null, + ); + @override + bool get showTestNetCoins => (super.noSuchMethod( + Invocation.getter(#showTestNetCoins), + returnValue: false, + ) as bool); + @override + set showTestNetCoins(bool? showTestNetCoins) => super.noSuchMethod( + Invocation.setter( + #showTestNetCoins, + showTestNetCoins, + ), + returnValueForMissingStub: null, + ); + @override + bool get isAutoBackupEnabled => (super.noSuchMethod( + Invocation.getter(#isAutoBackupEnabled), + returnValue: false, + ) as bool); + @override + set isAutoBackupEnabled(bool? isAutoBackupEnabled) => super.noSuchMethod( + Invocation.setter( + #isAutoBackupEnabled, + isAutoBackupEnabled, + ), + returnValueForMissingStub: null, + ); + @override + set autoBackupLocation(String? autoBackupLocation) => super.noSuchMethod( + Invocation.setter( + #autoBackupLocation, + autoBackupLocation, + ), + returnValueForMissingStub: null, + ); + @override + _i23.BackupFrequencyType get backupFrequencyType => (super.noSuchMethod( + Invocation.getter(#backupFrequencyType), + returnValue: _i23.BackupFrequencyType.everyTenMinutes, + ) as _i23.BackupFrequencyType); + @override + set backupFrequencyType(_i23.BackupFrequencyType? backupFrequencyType) => + super.noSuchMethod( + Invocation.setter( + #backupFrequencyType, + backupFrequencyType, + ), + returnValueForMissingStub: null, + ); + @override + set lastAutoBackup(DateTime? lastAutoBackup) => super.noSuchMethod( + Invocation.setter( + #lastAutoBackup, + lastAutoBackup, + ), + returnValueForMissingStub: null, + ); + @override + bool get hideBlockExplorerWarning => (super.noSuchMethod( + Invocation.getter(#hideBlockExplorerWarning), + returnValue: false, + ) as bool); + @override + set hideBlockExplorerWarning(bool? hideBlockExplorerWarning) => + super.noSuchMethod( + Invocation.setter( + #hideBlockExplorerWarning, + hideBlockExplorerWarning, + ), + returnValueForMissingStub: null, + ); + @override + bool get gotoWalletOnStartup => (super.noSuchMethod( + Invocation.getter(#gotoWalletOnStartup), + returnValue: false, + ) as bool); + @override + set gotoWalletOnStartup(bool? gotoWalletOnStartup) => super.noSuchMethod( + Invocation.setter( + #gotoWalletOnStartup, + gotoWalletOnStartup, + ), + returnValueForMissingStub: null, + ); + @override + set startupWalletId(String? startupWalletId) => super.noSuchMethod( + Invocation.setter( + #startupWalletId, + startupWalletId, + ), + returnValueForMissingStub: null, + ); + @override + bool get externalCalls => (super.noSuchMethod( + Invocation.getter(#externalCalls), + returnValue: false, + ) as bool); + @override + set externalCalls(bool? externalCalls) => super.noSuchMethod( + Invocation.setter( + #externalCalls, + externalCalls, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future init() => (super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future incrementCurrentNotificationIndex() => (super.noSuchMethod( + Invocation.method( + #incrementCurrentNotificationIndex, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [PriceService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPriceService extends _i1.Mock implements _i24.PriceService { + MockPriceService() { + _i1.throwOnMissingStub(this); + } + @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); + String get baseTicker => (super.noSuchMethod( + Invocation.getter(#baseTicker), + returnValue: '', + ) as String); + @override + set baseTicker(String? _baseTicker) => super.noSuchMethod( + Invocation.setter( + #baseTicker, + _baseTicker, + ), + returnValueForMissingStub: null, + ); + @override + Duration get updateInterval => (super.noSuchMethod( + Invocation.getter(#updateInterval), + returnValue: _FakeDuration_12( + this, + Invocation.getter(#updateInterval), + ), + ) as Duration); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i13.Tuple2<_i9.Decimal, double> getPrice(_i15.Coin? coin) => + (super.noSuchMethod( + Invocation.method( + #getPrice, + [coin], + ), + returnValue: _FakeTuple2_13<_i9.Decimal, double>( + this, + Invocation.method( + #getPrice, + [coin], + ), + ), + ) as _i13.Tuple2<_i9.Decimal, double>); + @override + _i16.Future updatePrice() => (super.noSuchMethod( + Invocation.method( + #updatePrice, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void cancel() => super.noSuchMethod( + Invocation.method( + #cancel, + [], + ), + returnValueForMissingStub: null, + ); + @override + void start(bool? rightAway) => super.noSuchMethod( + Invocation.method( + #start, + [rightAway], + ), + returnValueForMissingStub: null, + ); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [NotesService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockNotesService extends _i1.Mock implements _i25.NotesService { + MockNotesService() { + _i1.throwOnMissingStub(this); + } + @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + Map get notesSync => (super.noSuchMethod( + Invocation.getter(#notesSync), + returnValue: {}, + ) as Map); + @override + _i16.Future> get notes => (super.noSuchMethod( + Invocation.getter(#notes), + returnValue: _i16.Future>.value({}), + ) as _i16.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future> search(String? text) => (super.noSuchMethod( + Invocation.method( + #search, + [text], + ), + returnValue: _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future getNoteFor({required String? txid}) => + (super.noSuchMethod( + Invocation.method( + #getNoteFor, + [], + {#txid: txid}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future editOrAddNote({ + required String? txid, + required String? note, + }) => + (super.noSuchMethod( + Invocation.method( + #editOrAddNote, + [], + { + #txid: txid, + #note: note, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future deleteNote({required String? txid}) => (super.noSuchMethod( + Invocation.method( + #deleteNote, + [], + {#txid: txid}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); } diff --git a/test/widget_tests/wallet_card_test.dart b/test/widget_tests/wallet_card_test.dart new file mode 100644 index 0000000000..834122da80 --- /dev/null +++ b/test/widget_tests/wallet_card_test.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockingjay/mockingjay.dart' as mockingjay; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart' as mockito; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart'; +import 'package:stackwallet/services/coins/coin_service.dart'; +import 'package:stackwallet/services/coins/manager.dart'; +import 'package:stackwallet/services/locale_service.dart'; +import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/widgets/wallet_card.dart'; +import 'package:tuple/tuple.dart'; + +import 'wallet_card_test.mocks.dart'; + +// class MockNavigatorObserver extends Mock implements NavigatorObserver {} + +@GenerateMocks([Wallets, BitcoinWallet, LocaleService]) +void main() { + testWidgets("Test button pressed", (widgetTester) async { + final CoinServiceAPI wallet = MockBitcoinWallet(); + mockito.when(wallet.walletId).thenAnswer((realInvocation) => "wallet id"); + mockito.when(wallet.coin).thenAnswer((realInvocation) => Coin.bitcoin); + mockito + .when(wallet.walletName) + .thenAnswer((realInvocation) => "wallet name"); + + final wallets = MockWallets(); + final locale = MockLocaleService(); + final manager = Manager(wallet); + final managerProvider = ChangeNotifierProvider((ref) => manager); + + mockito + .when(wallets.getManagerProvider("wallet id")) + .thenAnswer((realInvocation) => managerProvider); + mockito.when(locale.locale).thenAnswer((_) => "en_US"); + + mockito + .when(wallets.getManagerProvider("wallet id")) + .thenAnswer((realInvocation) => managerProvider); + + final navigator = mockingjay.MockNavigator(); + mockingjay + .when(() => navigator.pushNamed("/wallet", + arguments: Tuple2("wallet id", managerProvider))) + .thenAnswer((_) async => {}); + + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + localeServiceChangeNotifierProvider.overrideWithValue(locale), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: mockingjay.MockNavigatorProvider( + navigator: navigator, + child: const WalletSheetCard( + walletId: "wallet id", + )), + ), + ), + ); + + expect(find.byType(MaterialButton), findsOneWidget); + await widgetTester.tap(find.byType(MaterialButton)); + }); + + testWidgets('test widget loads correctly', (widgetTester) async { + final CoinServiceAPI wallet = MockBitcoinWallet(); + mockito.when(wallet.walletId).thenAnswer((realInvocation) => "wallet id"); + mockito.when(wallet.coin).thenAnswer((realInvocation) => Coin.bitcoin); + mockito + .when(wallet.walletName) + .thenAnswer((realInvocation) => "wallet name"); + + final wallets = MockWallets(); + final manager = Manager(wallet); + + mockito.when(wallets.getManagerProvider("wallet id")).thenAnswer( + (realInvocation) => ChangeNotifierProvider((ref) => manager)); + + const walletSheetCard = WalletSheetCard( + walletId: "wallet id", + ); + + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme(LightColors()), + ], + ), + home: const Material( + child: walletSheetCard, + ), + ), + ), + ); + expect(find.byWidget(walletSheetCard), findsOneWidget); + }); +} diff --git a/test/widget_tests/wallet_card_test.mocks.dart b/test/widget_tests/wallet_card_test.mocks.dart new file mode 100644 index 0000000000..ec4f90e226 --- /dev/null +++ b/test/widget_tests/wallet_card_test.mocks.dart @@ -0,0 +1,1124 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/widget_tests/wallet_card_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i14; +import 'dart:ui' as _i16; + +import 'package:decimal/decimal.dart' as _i9; +import 'package:flutter/foundation.dart' as _i4; +import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10; +import 'package:stackwallet/models/models.dart' as _i8; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i17; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/locale_service.dart' as _i18; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/services/transaction_notification_tracker.dart' + as _i7; +import 'package:stackwallet/services/wallets.dart' as _i12; +import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i13; +import 'package:stackwallet/utilities/prefs.dart' as _i15; + +// 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 +// ignore_for_file: subtype_of_sealed_class + +class _FakeWalletsService_0 extends _i1.SmartFake + implements _i2.WalletsService { + _FakeWalletsService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeNodeService_1 extends _i1.SmartFake implements _i3.NodeService { + _FakeNodeService_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeChangeNotifierProvider_2 + extends _i1.SmartFake implements _i5.ChangeNotifierProvider { + _FakeChangeNotifierProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager { + _FakeManager_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionNotificationTracker_4 extends _i1.SmartFake + implements _i7.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUtxoData_5 extends _i1.SmartFake implements _i8.UtxoData { + _FakeUtxoData_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_6 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFeeObject_7 extends _i1.SmartFake implements _i8.FeeObject { + _FakeFeeObject_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionData_8 extends _i1.SmartFake + implements _i8.TransactionData { + _FakeTransactionData_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_9 extends _i1.SmartFake implements _i10.ElectrumX { + _FakeElectrumX_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCachedElectrumX_10 extends _i1.SmartFake + implements _i11.CachedElectrumX { + _FakeCachedElectrumX_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXNode_11 extends _i1.SmartFake + implements _i10.ElectrumXNode { + _FakeElectrumXNode_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallets]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWallets extends _i1.Mock implements _i12.Wallets { + MockWallets() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.WalletsService get walletsService => (super.noSuchMethod( + Invocation.getter(#walletsService), + returnValue: _FakeWalletsService_0( + this, + Invocation.getter(#walletsService), + ), + ) as _i2.WalletsService); + @override + set walletsService(_i2.WalletsService? _walletsService) => super.noSuchMethod( + Invocation.setter( + #walletsService, + _walletsService, + ), + returnValueForMissingStub: null, + ); + @override + _i3.NodeService get nodeService => (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_1( + this, + Invocation.getter(#nodeService), + ), + ) as _i3.NodeService); + @override + set nodeService(_i3.NodeService? _nodeService) => super.noSuchMethod( + Invocation.setter( + #nodeService, + _nodeService, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasWallets => (super.noSuchMethod( + Invocation.getter(#hasWallets), + returnValue: false, + ) as bool); + @override + List<_i5.ChangeNotifierProvider<_i6.Manager>> get managerProviders => + (super.noSuchMethod( + Invocation.getter(#managerProviders), + returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[], + ) as List<_i5.ChangeNotifierProvider<_i6.Manager>>); + @override + List<_i6.Manager> get managers => (super.noSuchMethod( + Invocation.getter(#managers), + returnValue: <_i6.Manager>[], + ) as List<_i6.Manager>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + List getWalletIdsFor({required _i13.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #getWalletIdsFor, + [], + {#coin: coin}, + ), + returnValue: [], + ) as List); + @override + Map<_i13.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + getManagerProvidersByCoin() => (super.noSuchMethod( + Invocation.method( + #getManagerProvidersByCoin, + [], + ), + returnValue: <_i13.Coin, + List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, + ) as Map<_i13.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + @override + _i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider( + String? walletId) => + (super.noSuchMethod( + Invocation.method( + #getManagerProvider, + [walletId], + ), + returnValue: _FakeChangeNotifierProvider_2<_i6.Manager>( + this, + Invocation.method( + #getManagerProvider, + [walletId], + ), + ), + ) as _i5.ChangeNotifierProvider<_i6.Manager>); + @override + _i6.Manager getManager(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getManager, + [walletId], + ), + returnValue: _FakeManager_3( + this, + Invocation.method( + #getManager, + [walletId], + ), + ), + ) as _i6.Manager); + @override + void addWallet({ + required String? walletId, + required _i6.Manager? manager, + }) => + super.noSuchMethod( + Invocation.method( + #addWallet, + [], + { + #walletId: walletId, + #manager: manager, + }, + ), + returnValueForMissingStub: null, + ); + @override + void removeWallet({required String? walletId}) => super.noSuchMethod( + Invocation.method( + #removeWallet, + [], + {#walletId: walletId}, + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future load(_i15.Prefs? prefs) => (super.noSuchMethod( + Invocation.method( + #load, + [prefs], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future loadAfterStackRestore( + _i15.Prefs? prefs, + List<_i6.Manager>? managers, + ) => + (super.noSuchMethod( + Invocation.method( + #loadAfterStackRestore, + [ + prefs, + managers, + ], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [BitcoinWallet]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBitcoinWallet extends _i1.Mock implements _i17.BitcoinWallet { + MockBitcoinWallet() { + _i1.throwOnMissingStub(this); + } + + @override + set timer(_i14.Timer? _timer) => super.noSuchMethod( + Invocation.setter( + #timer, + _timer, + ), + returnValueForMissingStub: null, + ); + @override + _i7.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + Invocation.getter(#txTracker), + returnValue: _FakeTransactionNotificationTracker_4( + this, + Invocation.getter(#txTracker), + ), + ) as _i7.TransactionNotificationTracker); + @override + set txTracker(_i7.TransactionNotificationTracker? _txTracker) => + super.noSuchMethod( + Invocation.setter( + #txTracker, + _txTracker, + ), + returnValueForMissingStub: null, + ); + @override + List<_i8.UtxoObject> get outputsList => (super.noSuchMethod( + Invocation.getter(#outputsList), + returnValue: <_i8.UtxoObject>[], + ) as List<_i8.UtxoObject>); + @override + set outputsList(List<_i8.UtxoObject>? _outputsList) => super.noSuchMethod( + Invocation.setter( + #outputsList, + _outputsList, + ), + returnValueForMissingStub: null, + ); + @override + bool get longMutex => (super.noSuchMethod( + Invocation.getter(#longMutex), + returnValue: false, + ) as bool); + @override + set longMutex(bool? _longMutex) => super.noSuchMethod( + Invocation.setter( + #longMutex, + _longMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get refreshMutex => (super.noSuchMethod( + Invocation.getter(#refreshMutex), + returnValue: false, + ) as bool); + @override + set refreshMutex(bool? _refreshMutex) => super.noSuchMethod( + Invocation.setter( + #refreshMutex, + _refreshMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get isActive => (super.noSuchMethod( + Invocation.getter(#isActive), + returnValue: false, + ) as bool); + @override + set isActive(bool? _isActive) => super.noSuchMethod( + Invocation.setter( + #isActive, + _isActive, + ), + returnValueForMissingStub: null, + ); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + _i13.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i13.Coin.bitcoin, + ) as _i13.Coin); + @override + _i14.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i14.Future>.value([]), + ) as _i14.Future>); + @override + _i14.Future<_i8.UtxoData> get utxoData => (super.noSuchMethod( + Invocation.getter(#utxoData), + returnValue: _i14.Future<_i8.UtxoData>.value(_FakeUtxoData_5( + this, + Invocation.getter(#utxoData), + )), + ) as _i14.Future<_i8.UtxoData>); + @override + _i14.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i14.Future>.value(<_i8.UtxoObject>[]), + ) as _i14.Future>); + @override + _i14.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i14.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i14.Future<_i9.Decimal>); + @override + _i14.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i14.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i14.Future<_i9.Decimal>); + @override + _i14.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i14.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i14.Future<_i9.Decimal>); + @override + _i14.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i14.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i14.Future<_i9.Decimal>); + @override + _i14.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i14.Future.value(''), + ) as _i14.Future); + @override + _i14.Future get currentLegacyReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentLegacyReceivingAddress), + returnValue: _i14.Future.value(''), + ) as _i14.Future); + @override + _i14.Future get currentReceivingAddressP2SH => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddressP2SH), + returnValue: _i14.Future.value(''), + ) as _i14.Future); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + _i14.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i14.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i14.Future<_i8.FeeObject>); + @override + _i14.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i14.Future.value(0), + ) as _i14.Future); + @override + _i14.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i14.Future>.value([]), + ) as _i14.Future>); + @override + _i14.Future get chainHeight => (super.noSuchMethod( + Invocation.getter(#chainHeight), + returnValue: _i14.Future.value(0), + ) as _i14.Future); + @override + int get storedChainHeight => (super.noSuchMethod( + Invocation.getter(#storedChainHeight), + returnValue: 0, + ) as int); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i14.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i14.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i14.Future<_i8.TransactionData>); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + _i10.ElectrumX get electrumXClient => (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumX_9( + this, + Invocation.getter(#electrumXClient), + ), + ) as _i10.ElectrumX); + @override + _i11.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + Invocation.getter(#cachedElectrumXClient), + returnValue: _FakeCachedElectrumX_10( + this, + Invocation.getter(#cachedElectrumXClient), + ), + ) as _i11.CachedElectrumX); + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future updateStoredChainHeight({required int? newHeight}) => + (super.noSuchMethod( + Invocation.method( + #updateStoredChainHeight, + [], + {#newHeight: newHeight}, + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i17.DerivePathType addressType({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #addressType, + [], + {#address: address}, + ), + returnValue: _i17.DerivePathType.bip44, + ) as _i17.DerivePathType); + @override + _i14.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future getTransactionCacheEarly(List? allAddresses) => + (super.noSuchMethod( + Invocation.method( + #getTransactionCacheEarly, + [allAddresses], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future refreshIfThereIsNewData() => (super.noSuchMethod( + Invocation.method( + #refreshIfThereIsNewData, + [], + ), + returnValue: _i14.Future.value(false), + ) as _i14.Future); + @override + _i14.Future getAllTxsToWatch(_i8.TransactionData? txData) => + (super.noSuchMethod( + Invocation.method( + #getAllTxsToWatch, + [txData], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i14.Future>.value({}), + ) as _i14.Future>); + @override + _i14.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i14.Future.value(''), + ) as _i14.Future); + @override + _i14.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i14.Future.value(''), + ) as _i14.Future); + @override + _i14.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i14.Future.value(false), + ) as _i14.Future); + @override + void startNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #startNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + void stopNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #stopNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i14.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i14.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + Invocation.method( + #getCurrentNode, + [], + ), + returnValue: + _i14.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_11( + this, + Invocation.method( + #getCurrentNode, + [], + ), + )), + ) as _i14.Future<_i10.ElectrumXNode>); + @override + _i14.Future addDerivation({ + required int? chain, + required String? address, + required String? pubKey, + required String? wif, + required _i17.DerivePathType? derivePathType, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivation, + [], + { + #chain: chain, + #address: address, + #pubKey: pubKey, + #wif: wif, + #derivePathType: derivePathType, + }, + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future addDerivations({ + required int? chain, + required _i17.DerivePathType? derivePathType, + required Map? derivationsToAdd, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivations, + [], + { + #chain: chain, + #derivePathType: derivePathType, + #derivationsToAdd: derivationsToAdd, + }, + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future getTxCount({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #getTxCount, + [], + {#address: address}, + ), + returnValue: _i14.Future.value(0), + ) as _i14.Future); + @override + _i14.Future checkCurrentReceivingAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentReceivingAddressesForTransactions, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future checkCurrentChangeAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentChangeAddressesForTransactions, + [], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future>> fastFetch( + List? allTxHashes) => + (super.noSuchMethod( + Invocation.method( + #fastFetch, + [allTxHashes], + ), + returnValue: _i14.Future>>.value( + >[]), + ) as _i14.Future>>); + @override + int estimateTxFee({ + required int? vSize, + required int? feeRatePerKB, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateTxFee, + [], + { + #vSize: vSize, + #feeRatePerKB: feeRatePerKB, + }, + ), + returnValue: 0, + ) as int); + @override + dynamic coinSelection( + int? satoshiAmountToSend, + int? selectedTxFeeRate, + String? _recipientAddress, + bool? isSendAll, { + int? additionalOutputs = 0, + List<_i8.UtxoObject>? utxos, + }) => + super.noSuchMethod(Invocation.method( + #coinSelection, + [ + satoshiAmountToSend, + selectedTxFeeRate, + _recipientAddress, + isSendAll, + ], + { + #additionalOutputs: additionalOutputs, + #utxos: utxos, + }, + )); + @override + _i14.Future> fetchBuildTxData( + List<_i8.UtxoObject>? utxosToUse) => + (super.noSuchMethod( + Invocation.method( + #fetchBuildTxData, + [utxosToUse], + ), + returnValue: + _i14.Future>.value({}), + ) as _i14.Future>); + @override + _i14.Future> buildTransaction({ + required List<_i8.UtxoObject>? utxosToUse, + required Map? utxoSigningData, + required List? recipients, + required List? satoshiAmounts, + }) => + (super.noSuchMethod( + Invocation.method( + #buildTransaction, + [], + { + #utxosToUse: utxosToUse, + #utxoSigningData: utxoSigningData, + #recipients: recipients, + #satoshiAmounts: satoshiAmounts, + }, + ), + returnValue: + _i14.Future>.value({}), + ) as _i14.Future>); + @override + _i14.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + _i14.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i14.Future.value(0), + ) as _i14.Future); + @override + int roughFeeEstimate( + int? inputCount, + int? outputCount, + int? feeRatePerKB, + ) => + (super.noSuchMethod( + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + returnValue: 0, + ) as int); + @override + int sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + returnValue: 0, + ) as int); + @override + _i14.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i14.Future.value(false), + ) as _i14.Future); +} + +/// A class which mocks [LocaleService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockLocaleService extends _i1.Mock implements _i18.LocaleService { + MockLocaleService() { + _i1.throwOnMissingStub(this); + } + + @override + 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 + _i14.Future loadLocale({bool? notify = true}) => (super.noSuchMethod( + Invocation.method( + #loadLocale, + [], + {#notify: notify}, + ), + returnValue: _i14.Future.value(), + returnValueForMissingStub: _i14.Future.value(), + ) as _i14.Future); + @override + void addListener(_i16.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} diff --git a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart new file mode 100644 index 0000000000..ba8e11e474 --- /dev/null +++ b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart'; +import 'package:stackwallet/services/coins/coin_service.dart'; +import 'package:stackwallet/services/coins/manager.dart'; +import 'package:stackwallet/services/node_service.dart'; +import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/widgets/wallet_info_row/sub_widgets/wallet_info_row_balance_future.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; + +import 'wallet_info_row_balance_future_test.mocks.dart'; + +@GenerateMocks([ + Wallets, + WalletsService, + BitcoinWallet +], customMocks: [ + MockSpec(returnNullOnMissingStub: true), + MockSpec(returnNullOnMissingStub: true), + MockSpec(returnNullOnMissingStub: true), + // MockSpec(returnNullOnMissingStub: true), +]) +void main() { + testWidgets("Test wallet info row balance loads correctly", + (widgetTester) async { + final wallets = MockWallets(); + final CoinServiceAPI wallet = MockBitcoinWallet(); + when(wallet.coin).thenAnswer((_) => Coin.bitcoin); + when(wallet.walletName).thenAnswer((_) => "some wallet"); + when(wallet.walletId).thenAnswer((_) => "some-wallet-id"); + + final manager = Manager(wallet); + when(wallets.getManagerProvider("some-wallet-id")).thenAnswer( + (realInvocation) => ChangeNotifierProvider((ref) => manager)); + + const walletInfoRowBalance = + WalletInfoRowBalanceFuture(walletId: "some-wallet-id"); + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const Material( + child: walletInfoRowBalance, + ), + ), + ), + ); + // + // expect(find.text("some wallet"), findsOneWidget); + expect(find.byType(WalletInfoRowBalanceFuture), findsOneWidget); + }); +} diff --git a/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart new file mode 100644 index 0000000000..e5dc17bc49 --- /dev/null +++ b/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.mocks.dart @@ -0,0 +1,2231 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/widget_tests/wallet_info_row/sub_widgets/wallet_info_row_balance_future_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i16; +import 'dart:ui' as _i18; + +import 'package:decimal/decimal.dart' as _i9; +import 'package:flutter/foundation.dart' as _i4; +import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10; +import 'package:stackwallet/models/models.dart' as _i8; +import 'package:stackwallet/models/node_model.dart' as _i20; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i19; +import 'package:stackwallet/services/coins/coin_service.dart' as _i13; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/services/transaction_notification_tracker.dart' + as _i7; +import 'package:stackwallet/services/wallets.dart' as _i14; +import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i15; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i12; +import 'package:stackwallet/utilities/prefs.dart' as _i17; + +// 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 +// ignore_for_file: subtype_of_sealed_class + +class _FakeWalletsService_0 extends _i1.SmartFake + implements _i2.WalletsService { + _FakeWalletsService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeNodeService_1 extends _i1.SmartFake implements _i3.NodeService { + _FakeNodeService_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeChangeNotifierProvider_2 + extends _i1.SmartFake implements _i5.ChangeNotifierProvider { + _FakeChangeNotifierProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager { + _FakeManager_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionNotificationTracker_4 extends _i1.SmartFake + implements _i7.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUtxoData_5 extends _i1.SmartFake implements _i8.UtxoData { + _FakeUtxoData_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_6 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFeeObject_7 extends _i1.SmartFake implements _i8.FeeObject { + _FakeFeeObject_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionData_8 extends _i1.SmartFake + implements _i8.TransactionData { + _FakeTransactionData_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_9 extends _i1.SmartFake implements _i10.ElectrumX { + _FakeElectrumX_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCachedElectrumX_10 extends _i1.SmartFake + implements _i11.CachedElectrumX { + _FakeCachedElectrumX_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXNode_11 extends _i1.SmartFake + implements _i10.ElectrumXNode { + _FakeElectrumXNode_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFlutterSecureStorageInterface_12 extends _i1.SmartFake + implements _i12.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_13 extends _i1.SmartFake + implements _i13.CoinServiceAPI { + _FakeCoinServiceAPI_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallets]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWallets extends _i1.Mock implements _i14.Wallets { + MockWallets() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.WalletsService get walletsService => (super.noSuchMethod( + Invocation.getter(#walletsService), + returnValue: _FakeWalletsService_0( + this, + Invocation.getter(#walletsService), + ), + ) as _i2.WalletsService); + @override + set walletsService(_i2.WalletsService? _walletsService) => super.noSuchMethod( + Invocation.setter( + #walletsService, + _walletsService, + ), + returnValueForMissingStub: null, + ); + @override + _i3.NodeService get nodeService => (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_1( + this, + Invocation.getter(#nodeService), + ), + ) as _i3.NodeService); + @override + set nodeService(_i3.NodeService? _nodeService) => super.noSuchMethod( + Invocation.setter( + #nodeService, + _nodeService, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasWallets => (super.noSuchMethod( + Invocation.getter(#hasWallets), + returnValue: false, + ) as bool); + @override + List<_i5.ChangeNotifierProvider<_i6.Manager>> get managerProviders => + (super.noSuchMethod( + Invocation.getter(#managerProviders), + returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[], + ) as List<_i5.ChangeNotifierProvider<_i6.Manager>>); + @override + List<_i6.Manager> get managers => (super.noSuchMethod( + Invocation.getter(#managers), + returnValue: <_i6.Manager>[], + ) as List<_i6.Manager>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + List getWalletIdsFor({required _i15.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #getWalletIdsFor, + [], + {#coin: coin}, + ), + returnValue: [], + ) as List); + @override + Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + getManagerProvidersByCoin() => (super.noSuchMethod( + Invocation.method( + #getManagerProvidersByCoin, + [], + ), + returnValue: <_i15.Coin, + List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, + ) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + @override + _i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider( + String? walletId) => + (super.noSuchMethod( + Invocation.method( + #getManagerProvider, + [walletId], + ), + returnValue: _FakeChangeNotifierProvider_2<_i6.Manager>( + this, + Invocation.method( + #getManagerProvider, + [walletId], + ), + ), + ) as _i5.ChangeNotifierProvider<_i6.Manager>); + @override + _i6.Manager getManager(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getManager, + [walletId], + ), + returnValue: _FakeManager_3( + this, + Invocation.method( + #getManager, + [walletId], + ), + ), + ) as _i6.Manager); + @override + void addWallet({ + required String? walletId, + required _i6.Manager? manager, + }) => + super.noSuchMethod( + Invocation.method( + #addWallet, + [], + { + #walletId: walletId, + #manager: manager, + }, + ), + returnValueForMissingStub: null, + ); + @override + void removeWallet({required String? walletId}) => super.noSuchMethod( + Invocation.method( + #removeWallet, + [], + {#walletId: walletId}, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future load(_i17.Prefs? prefs) => (super.noSuchMethod( + Invocation.method( + #load, + [prefs], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future loadAfterStackRestore( + _i17.Prefs? prefs, + List<_i6.Manager>? managers, + ) => + (super.noSuchMethod( + Invocation.method( + #loadAfterStackRestore, + [ + prefs, + managers, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [WalletsService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWalletsService extends _i1.Mock implements _i2.WalletsService { + MockWalletsService() { + _i1.throwOnMissingStub(this); + } + + @override + _i16.Future> get walletNames => + (super.noSuchMethod( + Invocation.getter(#walletNames), + returnValue: _i16.Future>.value( + {}), + ) as _i16.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { + #from: from, + #to: to, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i15.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addExistingStackWallet, + [], + { + #name: name, + #walletId: walletId, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addNewWallet({ + required String? name, + required _i15.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addNewWallet, + [], + { + #name: name, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future saveFavoriteWalletIds(List? walletIds) => + (super.noSuchMethod( + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future isMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future setMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [BitcoinWallet]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBitcoinWallet extends _i1.Mock implements _i19.BitcoinWallet { + MockBitcoinWallet() { + _i1.throwOnMissingStub(this); + } + + @override + set timer(_i16.Timer? _timer) => super.noSuchMethod( + Invocation.setter( + #timer, + _timer, + ), + returnValueForMissingStub: null, + ); + @override + _i7.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + Invocation.getter(#txTracker), + returnValue: _FakeTransactionNotificationTracker_4( + this, + Invocation.getter(#txTracker), + ), + ) as _i7.TransactionNotificationTracker); + @override + set txTracker(_i7.TransactionNotificationTracker? _txTracker) => + super.noSuchMethod( + Invocation.setter( + #txTracker, + _txTracker, + ), + returnValueForMissingStub: null, + ); + @override + List<_i8.UtxoObject> get outputsList => (super.noSuchMethod( + Invocation.getter(#outputsList), + returnValue: <_i8.UtxoObject>[], + ) as List<_i8.UtxoObject>); + @override + set outputsList(List<_i8.UtxoObject>? _outputsList) => super.noSuchMethod( + Invocation.setter( + #outputsList, + _outputsList, + ), + returnValueForMissingStub: null, + ); + @override + bool get longMutex => (super.noSuchMethod( + Invocation.getter(#longMutex), + returnValue: false, + ) as bool); + @override + set longMutex(bool? _longMutex) => super.noSuchMethod( + Invocation.setter( + #longMutex, + _longMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get refreshMutex => (super.noSuchMethod( + Invocation.getter(#refreshMutex), + returnValue: false, + ) as bool); + @override + set refreshMutex(bool? _refreshMutex) => super.noSuchMethod( + Invocation.setter( + #refreshMutex, + _refreshMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get isActive => (super.noSuchMethod( + Invocation.getter(#isActive), + returnValue: false, + ) as bool); + @override + set isActive(bool? _isActive) => super.noSuchMethod( + Invocation.setter( + #isActive, + _isActive, + ), + returnValueForMissingStub: null, + ); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.UtxoData> get utxoData => (super.noSuchMethod( + Invocation.getter(#utxoData), + returnValue: _i16.Future<_i8.UtxoData>.value(_FakeUtxoData_5( + this, + Invocation.getter(#utxoData), + )), + ) as _i16.Future<_i8.UtxoData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future get currentLegacyReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentLegacyReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddressP2SH => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddressP2SH), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future get chainHeight => (super.noSuchMethod( + Invocation.getter(#chainHeight), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + int get storedChainHeight => (super.noSuchMethod( + Invocation.getter(#storedChainHeight), + returnValue: 0, + ) as int); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + _i10.ElectrumX get electrumXClient => (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumX_9( + this, + Invocation.getter(#electrumXClient), + ), + ) as _i10.ElectrumX); + @override + _i11.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + Invocation.getter(#cachedElectrumXClient), + returnValue: _FakeCachedElectrumX_10( + this, + Invocation.getter(#cachedElectrumXClient), + ), + ) as _i11.CachedElectrumX); + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateStoredChainHeight({required int? newHeight}) => + (super.noSuchMethod( + Invocation.method( + #updateStoredChainHeight, + [], + {#newHeight: newHeight}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i19.DerivePathType addressType({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #addressType, + [], + {#address: address}, + ), + returnValue: _i19.DerivePathType.bip44, + ) as _i19.DerivePathType); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future getTransactionCacheEarly(List? allAddresses) => + (super.noSuchMethod( + Invocation.method( + #getTransactionCacheEarly, + [allAddresses], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refreshIfThereIsNewData() => (super.noSuchMethod( + Invocation.method( + #refreshIfThereIsNewData, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future getAllTxsToWatch(_i8.TransactionData? txData) => + (super.noSuchMethod( + Invocation.method( + #getAllTxsToWatch, + [txData], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void startNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #startNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + void stopNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #stopNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + Invocation.method( + #getCurrentNode, + [], + ), + returnValue: + _i16.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_11( + this, + Invocation.method( + #getCurrentNode, + [], + ), + )), + ) as _i16.Future<_i10.ElectrumXNode>); + @override + _i16.Future addDerivation({ + required int? chain, + required String? address, + required String? pubKey, + required String? wif, + required _i19.DerivePathType? derivePathType, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivation, + [], + { + #chain: chain, + #address: address, + #pubKey: pubKey, + #wif: wif, + #derivePathType: derivePathType, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addDerivations({ + required int? chain, + required _i19.DerivePathType? derivePathType, + required Map? derivationsToAdd, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivations, + [], + { + #chain: chain, + #derivePathType: derivePathType, + #derivationsToAdd: derivationsToAdd, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future getTxCount({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #getTxCount, + [], + {#address: address}, + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future checkCurrentReceivingAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentReceivingAddressesForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future checkCurrentChangeAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentChangeAddressesForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future>> fastFetch( + List? allTxHashes) => + (super.noSuchMethod( + Invocation.method( + #fastFetch, + [allTxHashes], + ), + returnValue: _i16.Future>>.value( + >[]), + ) as _i16.Future>>); + @override + int estimateTxFee({ + required int? vSize, + required int? feeRatePerKB, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateTxFee, + [], + { + #vSize: vSize, + #feeRatePerKB: feeRatePerKB, + }, + ), + returnValue: 0, + ) as int); + @override + dynamic coinSelection( + int? satoshiAmountToSend, + int? selectedTxFeeRate, + String? _recipientAddress, + bool? isSendAll, { + int? additionalOutputs = 0, + List<_i8.UtxoObject>? utxos, + }) => + super.noSuchMethod(Invocation.method( + #coinSelection, + [ + satoshiAmountToSend, + selectedTxFeeRate, + _recipientAddress, + isSendAll, + ], + { + #additionalOutputs: additionalOutputs, + #utxos: utxos, + }, + )); + @override + _i16.Future> fetchBuildTxData( + List<_i8.UtxoObject>? utxosToUse) => + (super.noSuchMethod( + Invocation.method( + #fetchBuildTxData, + [utxosToUse], + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future> buildTransaction({ + required List<_i8.UtxoObject>? utxosToUse, + required Map? utxoSigningData, + required List? recipients, + required List? satoshiAmounts, + }) => + (super.noSuchMethod( + Invocation.method( + #buildTransaction, + [], + { + #utxosToUse: utxosToUse, + #utxoSigningData: utxoSigningData, + #recipients: recipients, + #satoshiAmounts: satoshiAmounts, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + int roughFeeEstimate( + int? inputCount, + int? outputCount, + int? feeRatePerKB, + ) => + (super.noSuchMethod( + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + returnValue: 0, + ) as int); + @override + int sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + returnValue: 0, + ) as int); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); +} + +/// A class which mocks [NodeService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockNodeService extends _i1.Mock implements _i3.NodeService { + @override + _i12.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_12( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i12.FlutterSecureStorageInterface); + @override + List<_i20.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + List<_i20.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future setPrimaryNodeFor({ + required _i15.Coin? coin, + required _i20.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i20.NodeModel? getPrimaryNodeFor({required _i15.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i20.NodeModel?); + @override + List<_i20.NodeModel> getNodesFor(_i15.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + _i20.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i20.NodeModel?); + @override + List<_i20.NodeModel> failoverNodesFor({required _i15.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + _i16.Future add( + _i20.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future setEnabledState( + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future edit( + _i20.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [Manager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockManager extends _i1.Mock implements _i6.Manager { + @override + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i13.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_13( + this, + Invocation.getter(#wallet), + ), + ) as _i13.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [CoinServiceAPI]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockCoinServiceAPI extends _i1.Mock implements _i13.CoinServiceAPI { + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); +} diff --git a/test/widget_tests/wallet_info_row/wallet_info_row_test.dart b/test/widget_tests/wallet_info_row/wallet_info_row_test.dart new file mode 100644 index 0000000000..d0ca88983a --- /dev/null +++ b/test/widget_tests/wallet_info_row/wallet_info_row_test.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'package:stackwallet/providers/providers.dart'; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart'; +import 'package:stackwallet/services/coins/coin_service.dart'; +import 'package:stackwallet/services/coins/manager.dart'; +import 'package:stackwallet/services/node_service.dart'; +import 'package:stackwallet/services/wallets.dart'; +import 'package:stackwallet/services/wallets_service.dart'; +import 'package:stackwallet/utilities/listenable_map.dart'; +import 'package:stackwallet/widgets/wallet_info_row/sub_widgets/wallet_info_row_balance_future.dart'; +import 'package:stackwallet/widgets/wallet_info_row/sub_widgets/wallet_info_row_coin_icon.dart'; +import 'package:stackwallet/widgets/wallet_info_row/wallet_info_row.dart'; +import 'package:stackwallet/utilities/enums/coin_enum.dart'; +import 'package:stackwallet/utilities/theme/light_colors.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; + +import 'wallet_info_row_test.mocks.dart'; + +@GenerateMocks([ + Wallets, + WalletsService, + BitcoinWallet +], customMocks: [ + MockSpec(returnNullOnMissingStub: true), + MockSpec(returnNullOnMissingStub: true), + MockSpec(returnNullOnMissingStub: true), + // MockSpec(returnNullOnMissingStub: true), +]) +void main() { + testWidgets("Test wallet info row displays correctly", (widgetTester) async { + final wallets = MockWallets(); + final CoinServiceAPI wallet = MockBitcoinWallet(); + when(wallet.coin).thenAnswer((_) => Coin.bitcoin); + when(wallet.walletName).thenAnswer((_) => "some wallet"); + when(wallet.walletId).thenAnswer((_) => "some-wallet-id"); + + final manager = Manager(wallet); + when(wallets.getManagerProvider("some-wallet-id")).thenAnswer( + (realInvocation) => ChangeNotifierProvider((ref) => manager)); + + const walletInfoRow = WalletInfoRow(walletId: "some-wallet-id"); + await widgetTester.pumpWidget( + ProviderScope( + overrides: [ + walletsChangeNotifierProvider.overrideWithValue(wallets), + ], + child: MaterialApp( + theme: ThemeData( + extensions: [ + StackColors.fromStackColorTheme( + LightColors(), + ), + ], + ), + home: const Material( + child: walletInfoRow, + ), + ), + ), + ); + + expect(find.text("some wallet"), findsOneWidget); + expect(find.byType(WalletInfoRowBalanceFuture), findsOneWidget); + }); +} diff --git a/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart new file mode 100644 index 0000000000..2b7bedb150 --- /dev/null +++ b/test/widget_tests/wallet_info_row/wallet_info_row_test.mocks.dart @@ -0,0 +1,2231 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in stackwallet/test/widget_tests/wallet_info_row/wallet_info_row_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i16; +import 'dart:ui' as _i18; + +import 'package:decimal/decimal.dart' as _i9; +import 'package:flutter/foundation.dart' as _i4; +import 'package:flutter_riverpod/flutter_riverpod.dart' as _i5; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11; +import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10; +import 'package:stackwallet/models/models.dart' as _i8; +import 'package:stackwallet/models/node_model.dart' as _i20; +import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i19; +import 'package:stackwallet/services/coins/coin_service.dart' as _i13; +import 'package:stackwallet/services/coins/manager.dart' as _i6; +import 'package:stackwallet/services/node_service.dart' as _i3; +import 'package:stackwallet/services/transaction_notification_tracker.dart' + as _i7; +import 'package:stackwallet/services/wallets.dart' as _i14; +import 'package:stackwallet/services/wallets_service.dart' as _i2; +import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i15; +import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart' + as _i12; +import 'package:stackwallet/utilities/prefs.dart' as _i17; + +// 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 +// ignore_for_file: subtype_of_sealed_class + +class _FakeWalletsService_0 extends _i1.SmartFake + implements _i2.WalletsService { + _FakeWalletsService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeNodeService_1 extends _i1.SmartFake implements _i3.NodeService { + _FakeNodeService_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeChangeNotifierProvider_2 + extends _i1.SmartFake implements _i5.ChangeNotifierProvider { + _FakeChangeNotifierProvider_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager { + _FakeManager_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionNotificationTracker_4 extends _i1.SmartFake + implements _i7.TransactionNotificationTracker { + _FakeTransactionNotificationTracker_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUtxoData_5 extends _i1.SmartFake implements _i8.UtxoData { + _FakeUtxoData_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDecimal_6 extends _i1.SmartFake implements _i9.Decimal { + _FakeDecimal_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFeeObject_7 extends _i1.SmartFake implements _i8.FeeObject { + _FakeFeeObject_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransactionData_8 extends _i1.SmartFake + implements _i8.TransactionData { + _FakeTransactionData_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumX_9 extends _i1.SmartFake implements _i10.ElectrumX { + _FakeElectrumX_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCachedElectrumX_10 extends _i1.SmartFake + implements _i11.CachedElectrumX { + _FakeCachedElectrumX_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeElectrumXNode_11 extends _i1.SmartFake + implements _i10.ElectrumXNode { + _FakeElectrumXNode_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFlutterSecureStorageInterface_12 extends _i1.SmartFake + implements _i12.FlutterSecureStorageInterface { + _FakeFlutterSecureStorageInterface_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCoinServiceAPI_13 extends _i1.SmartFake + implements _i13.CoinServiceAPI { + _FakeCoinServiceAPI_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Wallets]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWallets extends _i1.Mock implements _i14.Wallets { + MockWallets() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.WalletsService get walletsService => (super.noSuchMethod( + Invocation.getter(#walletsService), + returnValue: _FakeWalletsService_0( + this, + Invocation.getter(#walletsService), + ), + ) as _i2.WalletsService); + @override + set walletsService(_i2.WalletsService? _walletsService) => super.noSuchMethod( + Invocation.setter( + #walletsService, + _walletsService, + ), + returnValueForMissingStub: null, + ); + @override + _i3.NodeService get nodeService => (super.noSuchMethod( + Invocation.getter(#nodeService), + returnValue: _FakeNodeService_1( + this, + Invocation.getter(#nodeService), + ), + ) as _i3.NodeService); + @override + set nodeService(_i3.NodeService? _nodeService) => super.noSuchMethod( + Invocation.setter( + #nodeService, + _nodeService, + ), + returnValueForMissingStub: null, + ); + @override + bool get hasWallets => (super.noSuchMethod( + Invocation.getter(#hasWallets), + returnValue: false, + ) as bool); + @override + List<_i5.ChangeNotifierProvider<_i6.Manager>> get managerProviders => + (super.noSuchMethod( + Invocation.getter(#managerProviders), + returnValue: <_i5.ChangeNotifierProvider<_i6.Manager>>[], + ) as List<_i5.ChangeNotifierProvider<_i6.Manager>>); + @override + List<_i6.Manager> get managers => (super.noSuchMethod( + Invocation.getter(#managers), + returnValue: <_i6.Manager>[], + ) as List<_i6.Manager>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + List getWalletIdsFor({required _i15.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #getWalletIdsFor, + [], + {#coin: coin}, + ), + returnValue: [], + ) as List); + @override + Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>> + getManagerProvidersByCoin() => (super.noSuchMethod( + Invocation.method( + #getManagerProvidersByCoin, + [], + ), + returnValue: <_i15.Coin, + List<_i5.ChangeNotifierProvider<_i6.Manager>>>{}, + ) as Map<_i15.Coin, List<_i5.ChangeNotifierProvider<_i6.Manager>>>); + @override + _i5.ChangeNotifierProvider<_i6.Manager> getManagerProvider( + String? walletId) => + (super.noSuchMethod( + Invocation.method( + #getManagerProvider, + [walletId], + ), + returnValue: _FakeChangeNotifierProvider_2<_i6.Manager>( + this, + Invocation.method( + #getManagerProvider, + [walletId], + ), + ), + ) as _i5.ChangeNotifierProvider<_i6.Manager>); + @override + _i6.Manager getManager(String? walletId) => (super.noSuchMethod( + Invocation.method( + #getManager, + [walletId], + ), + returnValue: _FakeManager_3( + this, + Invocation.method( + #getManager, + [walletId], + ), + ), + ) as _i6.Manager); + @override + void addWallet({ + required String? walletId, + required _i6.Manager? manager, + }) => + super.noSuchMethod( + Invocation.method( + #addWallet, + [], + { + #walletId: walletId, + #manager: manager, + }, + ), + returnValueForMissingStub: null, + ); + @override + void removeWallet({required String? walletId}) => super.noSuchMethod( + Invocation.method( + #removeWallet, + [], + {#walletId: walletId}, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future load(_i17.Prefs? prefs) => (super.noSuchMethod( + Invocation.method( + #load, + [prefs], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future loadAfterStackRestore( + _i17.Prefs? prefs, + List<_i6.Manager>? managers, + ) => + (super.noSuchMethod( + Invocation.method( + #loadAfterStackRestore, + [ + prefs, + managers, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [WalletsService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockWalletsService extends _i1.Mock implements _i2.WalletsService { + MockWalletsService() { + _i1.throwOnMissingStub(this); + } + + @override + _i16.Future> get walletNames => + (super.noSuchMethod( + Invocation.getter(#walletNames), + returnValue: _i16.Future>.value( + {}), + ) as _i16.Future>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future renameWallet({ + required String? from, + required String? to, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #renameWallet, + [], + { + #from: from, + #to: to, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future addExistingStackWallet({ + required String? name, + required String? walletId, + required _i15.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addExistingStackWallet, + [], + { + #name: name, + #walletId: walletId, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addNewWallet({ + required String? name, + required _i15.Coin? coin, + required bool? shouldNotifyListeners, + }) => + (super.noSuchMethod( + Invocation.method( + #addNewWallet, + [], + { + #name: name, + #coin: coin, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future> getFavoriteWalletIds() => (super.noSuchMethod( + Invocation.method( + #getFavoriteWalletIds, + [], + ), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future saveFavoriteWalletIds(List? walletIds) => + (super.noSuchMethod( + Invocation.method( + #saveFavoriteWalletIds, + [walletIds], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #addFavorite, + [walletId], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future removeFavorite(String? walletId) => (super.noSuchMethod( + Invocation.method( + #removeFavorite, + [walletId], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future moveFavorite({ + required int? fromIndex, + required int? toIndex, + }) => + (super.noSuchMethod( + Invocation.method( + #moveFavorite, + [], + { + #fromIndex: fromIndex, + #toIndex: toIndex, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future checkForDuplicate(String? name) => (super.noSuchMethod( + Invocation.method( + #checkForDuplicate, + [name], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future getWalletId(String? walletName) => (super.noSuchMethod( + Invocation.method( + #getWalletId, + [walletName], + ), + returnValue: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future isMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #isMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future setMnemonicVerified({required String? walletId}) => + (super.noSuchMethod( + Invocation.method( + #setMnemonicVerified, + [], + {#walletId: walletId}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future deleteWallet( + String? name, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteWallet, + [ + name, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future refreshWallets(bool? shouldNotifyListeners) => + (super.noSuchMethod( + Invocation.method( + #refreshWallets, + [shouldNotifyListeners], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [BitcoinWallet]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBitcoinWallet extends _i1.Mock implements _i19.BitcoinWallet { + MockBitcoinWallet() { + _i1.throwOnMissingStub(this); + } + + @override + set timer(_i16.Timer? _timer) => super.noSuchMethod( + Invocation.setter( + #timer, + _timer, + ), + returnValueForMissingStub: null, + ); + @override + _i7.TransactionNotificationTracker get txTracker => (super.noSuchMethod( + Invocation.getter(#txTracker), + returnValue: _FakeTransactionNotificationTracker_4( + this, + Invocation.getter(#txTracker), + ), + ) as _i7.TransactionNotificationTracker); + @override + set txTracker(_i7.TransactionNotificationTracker? _txTracker) => + super.noSuchMethod( + Invocation.setter( + #txTracker, + _txTracker, + ), + returnValueForMissingStub: null, + ); + @override + List<_i8.UtxoObject> get outputsList => (super.noSuchMethod( + Invocation.getter(#outputsList), + returnValue: <_i8.UtxoObject>[], + ) as List<_i8.UtxoObject>); + @override + set outputsList(List<_i8.UtxoObject>? _outputsList) => super.noSuchMethod( + Invocation.setter( + #outputsList, + _outputsList, + ), + returnValueForMissingStub: null, + ); + @override + bool get longMutex => (super.noSuchMethod( + Invocation.getter(#longMutex), + returnValue: false, + ) as bool); + @override + set longMutex(bool? _longMutex) => super.noSuchMethod( + Invocation.setter( + #longMutex, + _longMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get refreshMutex => (super.noSuchMethod( + Invocation.getter(#refreshMutex), + returnValue: false, + ) as bool); + @override + set refreshMutex(bool? _refreshMutex) => super.noSuchMethod( + Invocation.setter( + #refreshMutex, + _refreshMutex, + ), + returnValueForMissingStub: null, + ); + @override + bool get isActive => (super.noSuchMethod( + Invocation.getter(#isActive), + returnValue: false, + ) as bool); + @override + set isActive(bool? _isActive) => super.noSuchMethod( + Invocation.setter( + #isActive, + _isActive, + ), + returnValueForMissingStub: null, + ); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.UtxoData> get utxoData => (super.noSuchMethod( + Invocation.getter(#utxoData), + returnValue: _i16.Future<_i8.UtxoData>.value(_FakeUtxoData_5( + this, + Invocation.getter(#utxoData), + )), + ) as _i16.Future<_i8.UtxoData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future get currentLegacyReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentLegacyReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddressP2SH => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddressP2SH), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future get chainHeight => (super.noSuchMethod( + Invocation.getter(#chainHeight), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + int get storedChainHeight => (super.noSuchMethod( + Invocation.getter(#storedChainHeight), + returnValue: 0, + ) as int); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + _i10.ElectrumX get electrumXClient => (super.noSuchMethod( + Invocation.getter(#electrumXClient), + returnValue: _FakeElectrumX_9( + this, + Invocation.getter(#electrumXClient), + ), + ) as _i10.ElectrumX); + @override + _i11.CachedElectrumX get cachedElectrumXClient => (super.noSuchMethod( + Invocation.getter(#cachedElectrumXClient), + returnValue: _FakeCachedElectrumX_10( + this, + Invocation.getter(#cachedElectrumXClient), + ), + ) as _i11.CachedElectrumX); + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateStoredChainHeight({required int? newHeight}) => + (super.noSuchMethod( + Invocation.method( + #updateStoredChainHeight, + [], + {#newHeight: newHeight}, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i19.DerivePathType addressType({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #addressType, + [], + {#address: address}, + ), + returnValue: _i19.DerivePathType.bip44, + ) as _i19.DerivePathType); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future getTransactionCacheEarly(List? allAddresses) => + (super.noSuchMethod( + Invocation.method( + #getTransactionCacheEarly, + [allAddresses], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refreshIfThereIsNewData() => (super.noSuchMethod( + Invocation.method( + #refreshIfThereIsNewData, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future getAllTxsToWatch(_i8.TransactionData? txData) => + (super.noSuchMethod( + Invocation.method( + #getAllTxsToWatch, + [txData], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void startNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #startNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + void stopNetworkAlivePinging() => super.noSuchMethod( + Invocation.method( + #stopNetworkAlivePinging, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future<_i10.ElectrumXNode> getCurrentNode() => (super.noSuchMethod( + Invocation.method( + #getCurrentNode, + [], + ), + returnValue: + _i16.Future<_i10.ElectrumXNode>.value(_FakeElectrumXNode_11( + this, + Invocation.method( + #getCurrentNode, + [], + ), + )), + ) as _i16.Future<_i10.ElectrumXNode>); + @override + _i16.Future addDerivation({ + required int? chain, + required String? address, + required String? pubKey, + required String? wif, + required _i19.DerivePathType? derivePathType, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivation, + [], + { + #chain: chain, + #address: address, + #pubKey: pubKey, + #wif: wif, + #derivePathType: derivePathType, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future addDerivations({ + required int? chain, + required _i19.DerivePathType? derivePathType, + required Map? derivationsToAdd, + }) => + (super.noSuchMethod( + Invocation.method( + #addDerivations, + [], + { + #chain: chain, + #derivePathType: derivePathType, + #derivationsToAdd: derivationsToAdd, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future getTxCount({required String? address}) => + (super.noSuchMethod( + Invocation.method( + #getTxCount, + [], + {#address: address}, + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future checkCurrentReceivingAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentReceivingAddressesForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future checkCurrentChangeAddressesForTransactions() => + (super.noSuchMethod( + Invocation.method( + #checkCurrentChangeAddressesForTransactions, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future>> fastFetch( + List? allTxHashes) => + (super.noSuchMethod( + Invocation.method( + #fastFetch, + [allTxHashes], + ), + returnValue: _i16.Future>>.value( + >[]), + ) as _i16.Future>>); + @override + int estimateTxFee({ + required int? vSize, + required int? feeRatePerKB, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateTxFee, + [], + { + #vSize: vSize, + #feeRatePerKB: feeRatePerKB, + }, + ), + returnValue: 0, + ) as int); + @override + dynamic coinSelection( + int? satoshiAmountToSend, + int? selectedTxFeeRate, + String? _recipientAddress, + bool? isSendAll, { + int? additionalOutputs = 0, + List<_i8.UtxoObject>? utxos, + }) => + super.noSuchMethod(Invocation.method( + #coinSelection, + [ + satoshiAmountToSend, + selectedTxFeeRate, + _recipientAddress, + isSendAll, + ], + { + #additionalOutputs: additionalOutputs, + #utxos: utxos, + }, + )); + @override + _i16.Future> fetchBuildTxData( + List<_i8.UtxoObject>? utxosToUse) => + (super.noSuchMethod( + Invocation.method( + #fetchBuildTxData, + [utxosToUse], + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future> buildTransaction({ + required List<_i8.UtxoObject>? utxosToUse, + required Map? utxoSigningData, + required List? recipients, + required List? satoshiAmounts, + }) => + (super.noSuchMethod( + Invocation.method( + #buildTransaction, + [], + { + #utxosToUse: utxosToUse, + #utxoSigningData: utxoSigningData, + #recipients: recipients, + #satoshiAmounts: satoshiAmounts, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + int roughFeeEstimate( + int? inputCount, + int? outputCount, + int? feeRatePerKB, + ) => + (super.noSuchMethod( + Invocation.method( + #roughFeeEstimate, + [ + inputCount, + outputCount, + feeRatePerKB, + ], + ), + returnValue: 0, + ) as int); + @override + int sweepAllEstimate(int? feeRate) => (super.noSuchMethod( + Invocation.method( + #sweepAllEstimate, + [feeRate], + ), + returnValue: 0, + ) as int); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); +} + +/// A class which mocks [NodeService]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockNodeService extends _i1.Mock implements _i3.NodeService { + @override + _i12.FlutterSecureStorageInterface get secureStorageInterface => + (super.noSuchMethod( + Invocation.getter(#secureStorageInterface), + returnValue: _FakeFlutterSecureStorageInterface_12( + this, + Invocation.getter(#secureStorageInterface), + ), + ) as _i12.FlutterSecureStorageInterface); + @override + List<_i20.NodeModel> get primaryNodes => (super.noSuchMethod( + Invocation.getter(#primaryNodes), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + List<_i20.NodeModel> get nodes => (super.noSuchMethod( + Invocation.getter(#nodes), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future updateDefaults() => (super.noSuchMethod( + Invocation.method( + #updateDefaults, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future setPrimaryNodeFor({ + required _i15.Coin? coin, + required _i20.NodeModel? node, + bool? shouldNotifyListeners = false, + }) => + (super.noSuchMethod( + Invocation.method( + #setPrimaryNodeFor, + [], + { + #coin: coin, + #node: node, + #shouldNotifyListeners: shouldNotifyListeners, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i20.NodeModel? getPrimaryNodeFor({required _i15.Coin? coin}) => + (super.noSuchMethod(Invocation.method( + #getPrimaryNodeFor, + [], + {#coin: coin}, + )) as _i20.NodeModel?); + @override + List<_i20.NodeModel> getNodesFor(_i15.Coin? coin) => (super.noSuchMethod( + Invocation.method( + #getNodesFor, + [coin], + ), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + _i20.NodeModel? getNodeById({required String? id}) => + (super.noSuchMethod(Invocation.method( + #getNodeById, + [], + {#id: id}, + )) as _i20.NodeModel?); + @override + List<_i20.NodeModel> failoverNodesFor({required _i15.Coin? coin}) => + (super.noSuchMethod( + Invocation.method( + #failoverNodesFor, + [], + {#coin: coin}, + ), + returnValue: <_i20.NodeModel>[], + ) as List<_i20.NodeModel>); + @override + _i16.Future add( + _i20.NodeModel? node, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #add, + [ + node, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future delete( + String? id, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #delete, + [ + id, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future setEnabledState( + String? id, + bool? enabled, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #setEnabledState, + [ + id, + enabled, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future edit( + _i20.NodeModel? editedNode, + String? password, + bool? shouldNotifyListeners, + ) => + (super.noSuchMethod( + Invocation.method( + #edit, + [ + editedNode, + password, + shouldNotifyListeners, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateCommunityNodes() => (super.noSuchMethod( + Invocation.method( + #updateCommunityNodes, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + 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, + ); +} + +/// A class which mocks [Manager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockManager extends _i1.Mock implements _i6.Manager { + @override + bool get isActiveWallet => (super.noSuchMethod( + Invocation.getter(#isActiveWallet), + returnValue: false, + ) as bool); + @override + set isActiveWallet(bool? isActive) => super.noSuchMethod( + Invocation.setter( + #isActiveWallet, + isActive, + ), + returnValueForMissingStub: null, + ); + @override + _i13.CoinServiceAPI get wallet => (super.noSuchMethod( + Invocation.getter(#wallet), + returnValue: _FakeCoinServiceAPI_13( + this, + Invocation.getter(#wallet), + ), + ) as _i13.CoinServiceAPI); + @override + bool get hasBackgroundRefreshListener => (super.noSuchMethod( + Invocation.getter(#hasBackgroundRefreshListener), + returnValue: false, + ) as bool); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedAvailableBalance => (super.noSuchMethod( + Invocation.getter(#cachedAvailableBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedAvailableBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i9.Decimal get cachedTotalBalance => (super.noSuchMethod( + Invocation.getter(#cachedTotalBalance), + returnValue: _FakeDecimal_6( + this, + Invocation.getter(#cachedTotalBalance), + ), + ) as _i9.Decimal); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exitCurrentWallet() => (super.noSuchMethod( + Invocation.method( + #exitCurrentWallet, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future isOwnAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #isOwnAddress, + [address], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + void addListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i18.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [CoinServiceAPI]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockCoinServiceAPI extends _i1.Mock implements _i13.CoinServiceAPI { + @override + set onIsActiveWalletChanged(void Function(bool)? _onIsActiveWalletChanged) => + super.noSuchMethod( + Invocation.setter( + #onIsActiveWalletChanged, + _onIsActiveWalletChanged, + ), + returnValueForMissingStub: null, + ); + @override + _i15.Coin get coin => (super.noSuchMethod( + Invocation.getter(#coin), + returnValue: _i15.Coin.bitcoin, + ) as _i15.Coin); + @override + bool get isRefreshing => (super.noSuchMethod( + Invocation.getter(#isRefreshing), + returnValue: false, + ) as bool); + @override + bool get shouldAutoSync => (super.noSuchMethod( + Invocation.getter(#shouldAutoSync), + returnValue: false, + ) as bool); + @override + set shouldAutoSync(bool? shouldAutoSync) => super.noSuchMethod( + Invocation.setter( + #shouldAutoSync, + shouldAutoSync, + ), + returnValueForMissingStub: null, + ); + @override + bool get isFavorite => (super.noSuchMethod( + Invocation.getter(#isFavorite), + returnValue: false, + ) as bool); + @override + set isFavorite(bool? markFavorite) => super.noSuchMethod( + Invocation.setter( + #isFavorite, + markFavorite, + ), + returnValueForMissingStub: null, + ); + @override + _i16.Future<_i8.FeeObject> get fees => (super.noSuchMethod( + Invocation.getter(#fees), + returnValue: _i16.Future<_i8.FeeObject>.value(_FakeFeeObject_7( + this, + Invocation.getter(#fees), + )), + ) as _i16.Future<_i8.FeeObject>); + @override + _i16.Future get maxFee => (super.noSuchMethod( + Invocation.getter(#maxFee), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future get currentReceivingAddress => (super.noSuchMethod( + Invocation.getter(#currentReceivingAddress), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future<_i9.Decimal> get availableBalance => (super.noSuchMethod( + Invocation.getter(#availableBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#availableBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get pendingBalance => (super.noSuchMethod( + Invocation.getter(#pendingBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#pendingBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get totalBalance => (super.noSuchMethod( + Invocation.getter(#totalBalance), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#totalBalance), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future<_i9.Decimal> get balanceMinusMaxFee => (super.noSuchMethod( + Invocation.getter(#balanceMinusMaxFee), + returnValue: _i16.Future<_i9.Decimal>.value(_FakeDecimal_6( + this, + Invocation.getter(#balanceMinusMaxFee), + )), + ) as _i16.Future<_i9.Decimal>); + @override + _i16.Future> get allOwnAddresses => (super.noSuchMethod( + Invocation.getter(#allOwnAddresses), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + _i16.Future<_i8.TransactionData> get transactionData => (super.noSuchMethod( + Invocation.getter(#transactionData), + returnValue: + _i16.Future<_i8.TransactionData>.value(_FakeTransactionData_8( + this, + Invocation.getter(#transactionData), + )), + ) as _i16.Future<_i8.TransactionData>); + @override + _i16.Future> get unspentOutputs => (super.noSuchMethod( + Invocation.getter(#unspentOutputs), + returnValue: + _i16.Future>.value(<_i8.UtxoObject>[]), + ) as _i16.Future>); + @override + set walletName(String? newName) => super.noSuchMethod( + Invocation.setter( + #walletName, + newName, + ), + returnValueForMissingStub: null, + ); + @override + String get walletName => (super.noSuchMethod( + Invocation.getter(#walletName), + returnValue: '', + ) as String); + @override + String get walletId => (super.noSuchMethod( + Invocation.getter(#walletId), + returnValue: '', + ) as String); + @override + _i16.Future> get mnemonic => (super.noSuchMethod( + Invocation.getter(#mnemonic), + returnValue: _i16.Future>.value([]), + ) as _i16.Future>); + @override + bool get hasCalledExit => (super.noSuchMethod( + Invocation.getter(#hasCalledExit), + returnValue: false, + ) as bool); + @override + bool get isConnected => (super.noSuchMethod( + Invocation.getter(#isConnected), + returnValue: false, + ) as bool); + @override + _i16.Future> prepareSend({ + required String? address, + required int? satoshiAmount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #prepareSend, + [], + { + #address: address, + #satoshiAmount: satoshiAmount, + #args: args, + }, + ), + returnValue: + _i16.Future>.value({}), + ) as _i16.Future>); + @override + _i16.Future confirmSend({required Map? txData}) => + (super.noSuchMethod( + Invocation.method( + #confirmSend, + [], + {#txData: txData}, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future send({ + required String? toAddress, + required int? amount, + Map? args, + }) => + (super.noSuchMethod( + Invocation.method( + #send, + [], + { + #toAddress: toAddress, + #amount: amount, + #args: args, + }, + ), + returnValue: _i16.Future.value(''), + ) as _i16.Future); + @override + _i16.Future refresh() => (super.noSuchMethod( + Invocation.method( + #refresh, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future updateNode(bool? shouldRefresh) => (super.noSuchMethod( + Invocation.method( + #updateNode, + [shouldRefresh], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + bool validateAddress(String? address) => (super.noSuchMethod( + Invocation.method( + #validateAddress, + [address], + ), + returnValue: false, + ) as bool); + @override + _i16.Future testNetworkConnection() => (super.noSuchMethod( + Invocation.method( + #testNetworkConnection, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); + @override + _i16.Future recoverFromMnemonic({ + required String? mnemonic, + required int? maxUnusedAddressGap, + required int? maxNumberOfIndexesToCheck, + required int? height, + }) => + (super.noSuchMethod( + Invocation.method( + #recoverFromMnemonic, + [], + { + #mnemonic: mnemonic, + #maxUnusedAddressGap: maxUnusedAddressGap, + #maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck, + #height: height, + }, + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeNew() => (super.noSuchMethod( + Invocation.method( + #initializeNew, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future initializeExisting() => (super.noSuchMethod( + Invocation.method( + #initializeExisting, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future exit() => (super.noSuchMethod( + Invocation.method( + #exit, + [], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future fullRescan( + int? maxUnusedAddressGap, + int? maxNumberOfIndexesToCheck, + ) => + (super.noSuchMethod( + Invocation.method( + #fullRescan, + [ + maxUnusedAddressGap, + maxNumberOfIndexesToCheck, + ], + ), + returnValue: _i16.Future.value(), + returnValueForMissingStub: _i16.Future.value(), + ) as _i16.Future); + @override + _i16.Future estimateFeeFor( + int? satoshiAmount, + int? feeRate, + ) => + (super.noSuchMethod( + Invocation.method( + #estimateFeeFor, + [ + satoshiAmount, + feeRate, + ], + ), + returnValue: _i16.Future.value(0), + ) as _i16.Future); + @override + _i16.Future generateNewAddress() => (super.noSuchMethod( + Invocation.method( + #generateNewAddress, + [], + ), + returnValue: _i16.Future.value(false), + ) as _i16.Future); +}