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/AlphaWalletTests/Coordinators/LockEnterPasscodeCoordinato...

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)
}
}