// // KeychainText.swift // GMERemittanceTests // // Created by InKwon Devik Kim on 08/04/2019. // Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. // import XCTest import KeychainAccess @testable import GME_Remit class KeychainTest: XCTestCase { func testSave() { KeyChain.shared.save(data: "ubrai13@gmail.com", key: .id) KeyChain.shared.save(data: "111111", key: .password) KeyChain.shared.save(data: "0", key: .biometricAuth) } func testFetch() { XCTAssert(KeyChain.shared.get(key: .id) == "ubrai13@gmail.com") XCTAssert(KeyChain.shared.get(key: .password) == "111111") XCTAssert(KeyChain.shared.get(key: .biometricAuth) == "0") } func testRemove() { KeyChain.shared.remove(key: .biometricAuth) KeyChain.shared.remove(key: .id) KeyChain.shared.remove(key: .password) } func testRemoveAll() { KeyChain.shared.removeAll() } }