metatext/Development Assets/MockKeychainService.swift

22 lines
435 B
Swift
Raw Normal View History

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