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

Add E2EGetReceptionId functor

parent 1f0395fb
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!18Update Bindings
......@@ -2,6 +2,7 @@ import Bindings
public struct E2E {
public var getId: E2EGetId
public var getReceptionId: E2EGetReceptionId
// TODO:
}
......@@ -9,13 +10,15 @@ public struct E2E {
extension E2E {
public static func live(_ bindingsE2E: BindingsE2e) -> E2E {
E2E(
getId: .live(bindingsE2E: bindingsE2E)
getId: .live(bindingsE2E: bindingsE2E),
getReceptionId: .live(bindingsE2E: bindingsE2E)
)
}
}
extension E2E {
public static let unimplemented = E2E(
getId: .unimplemented
getId: .unimplemented,
getReceptionId: .unimplemented
)
}
import Bindings
import XCTestDynamicOverlay
public struct E2EGetReceptionId {
public var run: () -> Data
public func callAsFunction() -> Data {
run()
}
}
extension E2EGetReceptionId {
public static func live(bindingsE2E: BindingsE2e) -> E2EGetReceptionId {
E2EGetReceptionId {
guard let data = bindingsE2E.getReceptionID() else {
fatalError("BindingsE2e.getReceptionID returned `nil`")
}
return data
}
}
}
extension E2EGetReceptionId {
public static let unimplemented = E2EGetReceptionId(
run: XCTUnimplemented("\(Self.self)")
)
}
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