blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
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.
33 lines
947 B
33 lines
947 B
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import XCTest
|
|
@testable import Trust
|
|
|
|
class PaymentCoordinatorTests: XCTestCase {
|
|
|
|
func testSendFlow() {
|
|
let address: Address = .make()
|
|
let coordinator = PaymentCoordinator(
|
|
navigationController: FakeNavigationController(),
|
|
flow: .send(type: .ether(destination: address)),
|
|
session: .make()
|
|
)
|
|
coordinator.start()
|
|
|
|
XCTAssertEqual(1, coordinator.coordinators.count)
|
|
XCTAssertTrue(coordinator.coordinators.first is SendCoordinator)
|
|
}
|
|
|
|
func testRequestFlow() {
|
|
let coordinator = PaymentCoordinator(
|
|
navigationController: FakeNavigationController(),
|
|
flow: .request,
|
|
session: .make()
|
|
)
|
|
|
|
coordinator.start()
|
|
|
|
XCTAssertEqual(1, coordinator.coordinators.count)
|
|
XCTAssertTrue(coordinator.coordinators.first is RequestCoordinator)
|
|
}
|
|
}
|
|
|