Skip to content
Snippets Groups Projects

Fix GetNotificationsReport

Merged Dariusz Rybicki requested to merge fix/get-notifications-report into development
3 files
+ 15
15
Compare changes
  • Side-by-side
  • Inline
Files
3
  • 20f41917
    Refactor · 20f41917
    Dariusz Rybicki authored
    Rename MessengerGetNotificationReport to MessengerGetNotificationReports
import XXClient
import XCTestDynamicOverlay
public struct MessengerGetNotificationReport {
public struct MessengerGetNotificationReports {
public enum Error: Swift.Error, Equatable {
case serviceListMissing
}
public var run: (String) throws -> NotificationReport
public var run: (String) throws -> [NotificationReport]
public func callAsFunction(notificationCSV: String) throws -> NotificationReport {
public func callAsFunction(notificationCSV: String) throws -> [NotificationReport] {
try run(notificationCSV)
}
}
extension MessengerGetNotificationReport {
public static func live(_ env: MessengerEnvironment) -> MessengerGetNotificationReport {
MessengerGetNotificationReport { notificationCSV in
extension MessengerGetNotificationReports {
public static func live(_ env: MessengerEnvironment) -> MessengerGetNotificationReports {
MessengerGetNotificationReports { notificationCSV in
guard let serviceList = env.serviceList() else {
throw Error.serviceListMissing
}
@@ -27,8 +27,8 @@ extension MessengerGetNotificationReport {
}
}
extension MessengerGetNotificationReport {
public static let unimplemented = MessengerGetNotificationReport(
extension MessengerGetNotificationReports {
public static let unimplemented = MessengerGetNotificationReports(
run: XCTUnimplemented("\(Self.self)")
)
}
Loading