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

Add E2EDeleteRequest functor

parent c3641f64
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!18Update Bindings
...@@ -17,6 +17,7 @@ public struct E2E { ...@@ -17,6 +17,7 @@ public struct E2E {
public var resetAuthenticatedChannel: E2EResetAuthenticatedChannel public var resetAuthenticatedChannel: E2EResetAuthenticatedChannel
public var callAllReceivedRequests: E2ECallAllReceivedRequests public var callAllReceivedRequests: E2ECallAllReceivedRequests
public var getReceivedRequest: E2EGetReceivedRequest public var getReceivedRequest: E2EGetReceivedRequest
public var deleteRequest: E2EDeleteRequest
public var send: E2ESend public var send: E2ESend
// TODO: // TODO:
...@@ -41,6 +42,7 @@ extension E2E { ...@@ -41,6 +42,7 @@ extension E2E {
resetAuthenticatedChannel: .live(bindingsE2E), resetAuthenticatedChannel: .live(bindingsE2E),
callAllReceivedRequests: .live(bindingsE2E), callAllReceivedRequests: .live(bindingsE2E),
getReceivedRequest: .live(bindingsE2E), getReceivedRequest: .live(bindingsE2E),
deleteRequest: .live(bindingsE2E),
send: .live(bindingsE2E) send: .live(bindingsE2E)
) )
} }
...@@ -64,6 +66,7 @@ extension E2E { ...@@ -64,6 +66,7 @@ extension E2E {
resetAuthenticatedChannel: .unimplemented, resetAuthenticatedChannel: .unimplemented,
callAllReceivedRequests: .unimplemented, callAllReceivedRequests: .unimplemented,
getReceivedRequest: .unimplemented, getReceivedRequest: .unimplemented,
deleteRequest: .unimplemented,
send: .unimplemented send: .unimplemented
) )
} }
import Bindings
import XCTestDynamicOverlay
public struct E2EDeleteRequest {
public var partner: (Data) throws -> Void
public var received: () throws -> Void
public var sent: () throws -> Void
public var all: () throws -> Void
}
extension E2EDeleteRequest {
public static func live(_ bindingsE2E: BindingsE2e) -> E2EDeleteRequest {
E2EDeleteRequest(
partner: bindingsE2E.deleteRequest(_:),
received: bindingsE2E.deleteReceiveRequests,
sent: bindingsE2E.deleteSentRequests,
all: bindingsE2E.deleteAllRequests
)
}
}
extension E2EDeleteRequest {
public static let unimplemented = E2EDeleteRequest(
partner: XCTUnimplemented("\(Self.self).partner"),
received: XCTUnimplemented("\(Self.self).received"),
sent: XCTUnimplemented("\(Self.self).sent"),
all: XCTUnimplemented("\(Self.self).all")
)
}
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