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
1.2 KiB
33 lines
1.2 KiB
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import XCTest
|
|
@testable import AlphaWallet
|
|
|
|
class LockEnterPasscodeCoordinatorTest: XCTestCase {
|
|
func testStart() {
|
|
let viewModel = LockEnterPasscodeViewModel()
|
|
let fakeLock = FakeLockProtocol()
|
|
let coordinator = LockEnterPasscodeCoordinator(model: viewModel, lock: fakeLock)
|
|
XCTAssertTrue(coordinator.window.isHidden)
|
|
coordinator.start()
|
|
XCTAssertFalse(coordinator.window.isHidden)
|
|
}
|
|
func testStop() {
|
|
let viewModel = LockEnterPasscodeViewModel()
|
|
let fakeLock = FakeLockProtocol()
|
|
let coordinator = LockEnterPasscodeCoordinator(model: viewModel, lock: fakeLock)
|
|
coordinator.start()
|
|
XCTAssertFalse(coordinator.window.isHidden)
|
|
coordinator.stop()
|
|
XCTAssertTrue(coordinator.window.isHidden)
|
|
}
|
|
func testDisableLock() {
|
|
let viewModel = LockEnterPasscodeViewModel()
|
|
let fakeLock = FakeLockProtocol()
|
|
fakeLock.passcodeSet = false
|
|
let coordinator = LockEnterPasscodeCoordinator(model: viewModel, lock: fakeLock)
|
|
XCTAssertTrue(coordinator.window.isHidden)
|
|
coordinator.start()
|
|
XCTAssertTrue(coordinator.window.isHidden)
|
|
}
|
|
}
|
|
|