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 Bindings
import XCTestDynamicOverlay
public struct NDFDownloader { public struct DownloadAndVerifySignedNdf {
public var run: (Environment) throws -> Data public var run: (Environment) throws -> Data
public func callAsFunction(_ env: Environment) throws -> Data { public func callAsFunction(_ env: Environment) throws -> Data {
...@@ -8,8 +9,8 @@ public struct NDFDownloader { ...@@ -8,8 +9,8 @@ public struct NDFDownloader {
} }
} }
extension NDFDownloader { extension DownloadAndVerifySignedNdf {
public static let live = NDFDownloader { env in public static let live = DownloadAndVerifySignedNdf { env in
var error: NSError? var error: NSError?
let data = BindingsDownloadAndVerifySignedNdfWithUrl( let data = BindingsDownloadAndVerifySignedNdfWithUrl(
env.url.absoluteString, env.url.absoluteString,
...@@ -26,11 +27,8 @@ extension NDFDownloader { ...@@ -26,11 +27,8 @@ extension NDFDownloader {
} }
} }
#if DEBUG extension DownloadAndVerifySignedNdf {
extension NDFDownloader { public static let unimplemented = DownloadAndVerifySignedNdf(
public static let failing = NDFDownloader { _ in run: XCTUnimplemented("\(Self.self)")
struct NotImplemented: Error {} )
throw NotImplemented()
}
} }
#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