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.
39 lines
1.2 KiB
39 lines
1.2 KiB
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import XCTest
|
|
@testable import Trust
|
|
|
|
class PaymentCoordinatorTests: XCTestCase {
|
|
|
|
func testSendFlow() {
|
|
let coordinator = PaymentCoordinator(
|
|
navigationController: FakeNavigationController(),
|
|
flow: .send(destination: .make()),
|
|
session: .make()
|
|
)
|
|
|
|
XCTAssertTrue(coordinator.navigationController.viewControllers[0] is SendViewController)
|
|
}
|
|
|
|
func testSendFlowDestination() {
|
|
let address: Address = .make()
|
|
let coordinator = PaymentCoordinator(
|
|
navigationController: FakeNavigationController(),
|
|
flow: .send(destination: address),
|
|
session: .make()
|
|
)
|
|
|
|
XCTAssertEqual(address.address, coordinator.sendViewController.addressRow?.value)
|
|
XCTAssertTrue(coordinator.navigationController.viewControllers[0] is SendViewController)
|
|
}
|
|
|
|
func testRequestFlow() {
|
|
let coordinator = PaymentCoordinator(
|
|
navigationController: FakeNavigationController(),
|
|
flow: .request,
|
|
session: .make()
|
|
)
|
|
|
|
XCTAssertTrue(coordinator.navigationController.viewControllers[0] is RequestViewController)
|
|
}
|
|
}
|
|
|