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

Add GetNotificationsReport function wrapper

parent e2dcec22
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!56Update Bindings
This commit is part of merge request !56. Comments created here will be created in the context of that merge request.
import Bindings
import XCTestDynamicOverlay
public struct GetNotificationsReport {
public var run: (Int, String, Data) throws -> NotificationReport
public func callAsFunction(
e2eId: Int,
notificationCSV: String,
marshaledServices: Data
) throws -> NotificationReport {
try run(e2eId, notificationCSV, marshaledServices)
}
}
extension GetNotificationsReport {
public static func live() -> GetNotificationsReport {
GetNotificationsReport { e2eId, notificationCSV, marshaledServices in
var error: NSError?
let result = BindingsGetNotificationsReport(
e2eId,
notificationCSV,
marshaledServices,
&error
)
if let error = error {
throw error
}
guard let result = result else {
fatalError("BindingsGetNotificationsReport returned nil without providing error")
}
return try NotificationReport.decode(result)
}
}
}
extension GetNotificationsReport {
public static let unimplemented = GetNotificationsReport(
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