Skip to content
Snippets Groups Projects
Commit 2ab2c6a1 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add DownloadAndVerifySignedNdf functor

parent a1a2826f
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!18Update Bindings
import Bindings
import XCTestDynamicOverlay
public struct NDFDownloader {
public struct DownloadAndVerifySignedNdf {
public var run: (Environment) throws -> Data
public func callAsFunction(_ env: Environment) throws -> Data {
......@@ -8,8 +9,8 @@ public struct NDFDownloader {
}
}
extension NDFDownloader {
public static let live = NDFDownloader { env in
extension DownloadAndVerifySignedNdf {
public static let live = DownloadAndVerifySignedNdf { env in
var error: NSError?
let data = BindingsDownloadAndVerifySignedNdfWithUrl(
env.url.absoluteString,
......@@ -26,11 +27,8 @@ extension NDFDownloader {
}
}
#if DEBUG
extension NDFDownloader {
public static let failing = NDFDownloader { _ in
struct NotImplemented: Error {}
throw NotImplemented()
}
extension DownloadAndVerifySignedNdf {
public static let unimplemented = DownloadAndVerifySignedNdf(
run: XCTUnimplemented("\(Self.self)")
)
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment