1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-20 22:33:54 +01:00
metatext-app-ios-iphone-ipad/Development Assets/FakeKeychain.swift

22 lines
431 B
Swift
Raw Normal View History

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
2020-08-09 03:29:05 +02:00
class MockKeychainService {
private var guts = [String: Data]()
}
2020-08-09 03:29:05 +02:00
extension MockKeychainService: KeychainServiceType {
func set(data: Data, forKey key: String) throws {
guts[key] = data
}
2020-08-09 03:29:05 +02:00
func deleteData(key: String) throws {
guts[key] = nil
}
func getData(key: String) throws -> Data? {
2020-08-09 03:29:05 +02:00
guts[key]
}
}