fix testsuite

pull/6738/head
Krypto Pank 2 years ago
parent 8364d3ec72
commit bdf99bfa69
  1. 11
      AlphaWalletTests/Coordinators/ActiveWalletViewTests.swift
  2. 4
      AlphaWalletTests/Factories/FakeSessionsProvider.swift
  3. 2
      AlphaWalletTests/ViewControllers/PaymentCoordinatorTests.swift

@ -5,6 +5,17 @@ import XCTest
import AlphaWalletFoundation
import Combine
import AlphaWalletCore
import Alamofire
final class FakeApiTransporter: ApiTransporter {
func dataTaskPublisher(_ request: URLRequestConvertible) -> AnyPublisher<URLRequest.Response, SessionTaskError> {
return .empty()
}
func dataPublisher(_ request: URLRequestConvertible) -> AnyPublisher<Alamofire.DataResponsePublisher<Data>.Output, SessionTaskError> {
return .empty()
}
}
final class FakeNetworkService: NetworkService {
func dataTask(_ request: AlphaWalletFoundation.URLRequestConvertible) async throws -> URLRequest.Response {

@ -13,15 +13,13 @@ import Combine
extension BlockchainsProvider {
static func make(servers: [RPCServer]) -> BlockchainsProvider {
let networkService = FakeNetworkService()
let analytics = FakeAnalyticsService()
let config = Config.make(defaults: .standardOrForTests, enabledServers: servers)
let blockchainFactory = BaseBlockchainFactory(
config: config,
analytics: analytics,
networkService: networkService)
analytics: analytics)
let serversProvider = BaseServersProvider(config: config)

@ -53,7 +53,7 @@ extension WalletDataProcessingPipeline {
analytics: fas,
transactionsStorage: transactionsDataStore,
assetDefinitionStore: .make(),
networkService: FakeNetworkService())
transporter: FakeApiTransporter())
let pipeline: TokensProcessingPipeline = WalletDataProcessingPipeline(
wallet: wallet,

Loading…
Cancel
Save