Created
September 28, 2017 10:33
-
-
Save piotrbernad/257041f66818c6f50b2b92a096d707a0 to your computer and use it in GitHub Desktop.
MockedKeychain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MockedKeychain: KeychainAccess { | |
| public var data: [String: Data] = [:] | |
| public func remove(_ key: String) throws { | |
| _ = data.removeValue(forKey: key) | |
| } | |
| public func set(_ value: Data, key: String) throws { | |
| data[key] = value | |
| } | |
| public func get(_ key: String) throws -> Data? { | |
| return data[key] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment