24 lines
836 B
Swift
24 lines
836 B
Swift
import Foundation
|
|
import Testing
|
|
@testable import LocalData
|
|
|
|
@Suite struct RouterConfigurationTests {
|
|
private let router = StorageRouter(keychain: MockKeychainHelper())
|
|
|
|
@Test func updateConfigurations() async {
|
|
// Exercise the configuration update paths in StorageRouter
|
|
await router.updateStorageConfiguration(.default)
|
|
await router.updateEncryptionConfiguration(.default)
|
|
await router.updateSyncConfiguration(.default)
|
|
}
|
|
|
|
@Test func registerKeyMaterialProvider() async throws {
|
|
struct Provider: KeyMaterialProviding {
|
|
func keyMaterial(for keyName: String) async throws -> Data { Data() }
|
|
}
|
|
|
|
// Exercise registration path
|
|
await router.registerKeyMaterialProvider(Provider(), for: KeyMaterialSource(id: "test.source"))
|
|
}
|
|
}
|