An advanced Ethereum/EVM mobile wallet
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
alpha-wallet-ios/TrustTests/ViewControllers/PaymentCoordinator.swift

38 lines
1.1 KiB

// Copyright SIX DAY LLC. All rights reserved.
import XCTest
@testable import Trust
import TrustKeystore
class PaymentCoordinatorTests: XCTestCase {
func testSendFlow() {
let address: Address = .make()
let coordinator = PaymentCoordinator(
navigationController: FakeNavigationController(),
flow: .send(type: .ether(destination: address)),
session: .make(),
keystore: FakeKeystore(),
storage: FakeTokensDataStore()
)
coordinator.start()
XCTAssertEqual(1, coordinator.coordinators.count)
XCTAssertTrue(coordinator.coordinators.first is SendCoordinator)
}
func testRequestFlow() {
let coordinator = PaymentCoordinator(
navigationController: FakeNavigationController(),
flow: .request,
session: .make(),
keystore: FakeKeystore(),
storage: FakeTokensDataStore()
)
coordinator.start()
XCTAssertEqual(1, coordinator.coordinators.count)
XCTAssertTrue(coordinator.coordinators.first is RequestCoordinator)
}
}