From ea68e811ecd5b0f02d7a2d8584da9f57b8687dca Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 19 Jan 2023 13:52:50 -0600 Subject: [PATCH] remove unneeded PriceAPI mock generation for coin tests --- test/services/coins/bitcoin/bitcoin_wallet_test.dart | 4 +--- test/services/coins/bitcoincash/bitcoincash_wallet_test.dart | 4 +--- test/services/coins/dogecoin/dogecoin_wallet_test.dart | 4 +--- test/services/coins/firo/firo_wallet_test.dart | 4 +--- test/services/coins/namecoin/namecoin_wallet_test.dart | 4 +--- test/services/coins/particl/particl_wallet_test.dart | 4 +--- 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/test/services/coins/bitcoin/bitcoin_wallet_test.dart b/test/services/coins/bitcoin/bitcoin_wallet_test.dart index 82c6e8f57..3fc19a1fe 100644 --- a/test/services/coins/bitcoin/bitcoin_wallet_test.dart +++ b/test/services/coins/bitcoin/bitcoin_wallet_test.dart @@ -12,7 +12,6 @@ import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/models/isar/models/blockchain_data/utxo.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart'; -import 'package:stackwallet/services/price.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; @@ -22,8 +21,7 @@ import 'bitcoin_transaction_data_samples.dart'; import 'bitcoin_wallet_test.mocks.dart'; import 'bitcoin_wallet_test_parameters.dart'; -@GenerateMocks( - [ElectrumX, CachedElectrumX, PriceAPI, TransactionNotificationTracker]) +@GenerateMocks([ElectrumX, CachedElectrumX, TransactionNotificationTracker]) void main() async { await Isar.initializeIsarCore(download: true); diff --git a/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart b/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart index 7bf17df50..258693bcb 100644 --- a/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart +++ b/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart @@ -11,7 +11,6 @@ import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/models/isar/models/blockchain_data/utxo.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart'; -import 'package:stackwallet/services/price.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; @@ -20,8 +19,7 @@ import 'bitcoincash_history_sample_data.dart'; import 'bitcoincash_wallet_test.mocks.dart'; import 'bitcoincash_wallet_test_parameters.dart'; -@GenerateMocks( - [ElectrumX, CachedElectrumX, PriceAPI, TransactionNotificationTracker]) +@GenerateMocks([ElectrumX, CachedElectrumX, TransactionNotificationTracker]) void main() async { await Isar.initializeIsarCore(download: true); diff --git a/test/services/coins/dogecoin/dogecoin_wallet_test.dart b/test/services/coins/dogecoin/dogecoin_wallet_test.dart index 8b2d83eb7..14d61e6dd 100644 --- a/test/services/coins/dogecoin/dogecoin_wallet_test.dart +++ b/test/services/coins/dogecoin/dogecoin_wallet_test.dart @@ -11,7 +11,6 @@ import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/models/isar/models/blockchain_data/utxo.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart'; -import 'package:stackwallet/services/price.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; @@ -20,8 +19,7 @@ import 'dogecoin_history_sample_data.dart'; import 'dogecoin_wallet_test.mocks.dart'; import 'dogecoin_wallet_test_parameters.dart'; -@GenerateMocks( - [ElectrumX, CachedElectrumX, PriceAPI, TransactionNotificationTracker]) +@GenerateMocks([ElectrumX, CachedElectrumX, TransactionNotificationTracker]) void main() { group("dogecoin constants", () { test("dogecoin minimum confirmations", () async { diff --git a/test/services/coins/firo/firo_wallet_test.dart b/test/services/coins/firo/firo_wallet_test.dart index 110eab9c1..eb5d1aae2 100644 --- a/test/services/coins/firo/firo_wallet_test.dart +++ b/test/services/coins/firo/firo_wallet_test.dart @@ -17,7 +17,6 @@ import 'package:stackwallet/models/lelantus_coin.dart'; import 'package:stackwallet/models/lelantus_fee_data.dart'; import 'package:stackwallet/models/paymint/transactions_model.dart' as old; import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; -import 'package:stackwallet/services/price.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/address_utils.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; @@ -32,8 +31,7 @@ import 'sample_data/get_utxos_sample_data.dart'; import 'sample_data/gethistory_samples.dart'; import 'sample_data/transaction_data_samples.dart'; -@GenerateMocks( - [ElectrumX, CachedElectrumX, PriceAPI, TransactionNotificationTracker]) +@GenerateMocks([ElectrumX, CachedElectrumX, TransactionNotificationTracker]) void main() { group("isolate functions", () { test("isolateDerive", () async { diff --git a/test/services/coins/namecoin/namecoin_wallet_test.dart b/test/services/coins/namecoin/namecoin_wallet_test.dart index 041882470..b9a234d69 100644 --- a/test/services/coins/namecoin/namecoin_wallet_test.dart +++ b/test/services/coins/namecoin/namecoin_wallet_test.dart @@ -9,7 +9,6 @@ import 'package:stackwallet/electrumx_rpc/electrumx.dart'; import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart'; -import 'package:stackwallet/services/price.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; @@ -19,8 +18,7 @@ import 'namecoin_transaction_data_samples.dart'; import 'namecoin_wallet_test.mocks.dart'; import 'namecoin_wallet_test_parameters.dart'; -@GenerateMocks( - [ElectrumX, CachedElectrumX, PriceAPI, TransactionNotificationTracker]) +@GenerateMocks([ElectrumX, CachedElectrumX, TransactionNotificationTracker]) void main() { group("namecoin constants", () { test("namecoin minimum confirmations", () async { diff --git a/test/services/coins/particl/particl_wallet_test.dart b/test/services/coins/particl/particl_wallet_test.dart index 1ef429209..56035e88e 100644 --- a/test/services/coins/particl/particl_wallet_test.dart +++ b/test/services/coins/particl/particl_wallet_test.dart @@ -8,7 +8,6 @@ import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart'; import 'package:stackwallet/electrumx_rpc/electrumx.dart'; import 'package:stackwallet/models/paymint/fee_object_model.dart'; import 'package:stackwallet/services/coins/particl/particl_wallet.dart'; -import 'package:stackwallet/services/price.dart'; import 'package:stackwallet/services/transaction_notification_tracker.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'; @@ -18,8 +17,7 @@ import 'particl_transaction_data_samples.dart'; import 'particl_wallet_test.mocks.dart'; import 'particl_wallet_test_parameters.dart'; -@GenerateMocks( - [ElectrumX, CachedElectrumX, PriceAPI, TransactionNotificationTracker]) +@GenerateMocks([ElectrumX, CachedElectrumX, TransactionNotificationTracker]) void main() { group("particl constants", () { test("particl minimum confirmations", () async {