pull/4104/head
Hwee-Boon Yar 3 years ago
parent 1fc7950bbe
commit e732051c8a
  1. 1
      AlphaWalletTests/Coordinators/AppCoordinatorTests.swift
  2. 8
      AlphaWalletTests/Coordinators/InCoordinatorTests.swift
  3. 3
      AlphaWalletTests/Settings/Coordinators/SettingsCoordinatorTests.swift

@ -152,6 +152,7 @@ class AppCoordinatorTests: XCTestCase {
class FakeAnalyticsService: AnalyticsServiceType {
func log(action: AnalyticsAction, properties: [String: AnalyticsEventPropertyValue]?) { }
func log(error: AnalyticsError, properties: [String: AnalyticsEventPropertyValue]?) { }
func log(stat: AnalyticsStat, properties: [String: AnalyticsEventPropertyValue]?) {}
func applicationDidBecomeActive() { }
func application(continue userActivity: NSUserActivity) { }
func application(open url: URL, sourceApplication: String?, annotation: Any) { }

@ -27,6 +27,7 @@ class InCoordinatorTests: XCTestCase {
walletBalanceService: FakeMultiWalletBalanceService())
let coordinator = InCoordinator(
navigationController: navigationController,
walletAddressesStore: EtherKeystore.migratedWalletAddressesStore(userDefaults: .test),
wallet: .make(),
keystore: keystore,
assetDefinitionStore: AssetDefinitionStore(),
@ -74,6 +75,7 @@ class InCoordinatorTests: XCTestCase {
walletBalanceService: FakeMultiWalletBalanceService())
let coordinator = InCoordinator(
navigationController: FakeNavigationController(),
walletAddressesStore: EtherKeystore.migratedWalletAddressesStore(userDefaults: .test),
wallet: .make(),
keystore: keystore,
assetDefinitionStore: AssetDefinitionStore(),
@ -107,6 +109,7 @@ class InCoordinatorTests: XCTestCase {
walletBalanceService: FakeMultiWalletBalanceService())
let coordinator = InCoordinator(
navigationController: FakeNavigationController(),
walletAddressesStore: EtherKeystore.migratedWalletAddressesStore(userDefaults: .test),
wallet: wallet,
keystore: FakeKeystore(wallets: [wallet]),
assetDefinitionStore: AssetDefinitionStore(),
@ -138,6 +141,7 @@ class InCoordinatorTests: XCTestCase {
walletBalanceService: FakeMultiWalletBalanceService())
let coordinator = InCoordinator(
navigationController: navigationController,
walletAddressesStore: EtherKeystore.migratedWalletAddressesStore(userDefaults: .test),
wallet: wallet,
keystore: FakeKeystore(wallets: [wallet]),
assetDefinitionStore: AssetDefinitionStore(),
@ -170,6 +174,7 @@ class InCoordinatorTests: XCTestCase {
let coordinator = InCoordinator(
navigationController: navigationController,
walletAddressesStore: EtherKeystore.migratedWalletAddressesStore(userDefaults: .test),
wallet: .make(),
keystore: FakeKeystore(),
assetDefinitionStore: AssetDefinitionStore(),
@ -220,6 +225,7 @@ class InCoordinatorTests: XCTestCase {
let ac = AccountsCoordinator(config: .make(), navigationController: navigationController, keystore: keystore, promptBackupCoordinator: pbc, analyticsCoordinator: fas, viewModel: .init(configuration: .changeWallets), walletBalanceService: FakeMultiWalletBalanceService())
let coordinator = InCoordinator(
navigationController: navigationController,
walletAddressesStore: EtherKeystore.migratedWalletAddressesStore(userDefaults: .test),
wallet: wallet,
keystore: keystore,
assetDefinitionStore: AssetDefinitionStore(),
@ -250,7 +256,7 @@ class InCoordinatorTests: XCTestCase {
import PromiseKit
final class FakeCoinTickersFetcher: CoinTickersFetcherType {
func fetchPrices(forTokens tokens: [TokenMappedToTicker]) -> Promise<Void> {
return .value(())
}

@ -45,7 +45,8 @@ class SettingsCoordinatorTests: XCTestCase {
promptBackupCoordinator: promptBackupCoordinator,
analyticsCoordinator: FakeAnalyticsService(),
walletConnectCoordinator: .fake(),
walletBalanceService: FakeMultiWalletBalanceService()
walletBalanceService: FakeMultiWalletBalanceService(),
blockscanChatService: BlockscanChatService(walletAddressesStore: EtherKeystore.migratedWalletAddressesStore(userDefaults: .test), account: .make(), analyticsCoordinator: FakeAnalyticsService())
)
let delegate = Delegate()
coordinator.delegate = delegate

Loading…
Cancel
Save