From ecd659d93e9017551d8f4c8dbfbdad445d0a6834 Mon Sep 17 00:00:00 2001 From: Dariusz Rybicki <dariusz@elixxir.io> Date: Fri, 26 Aug 2022 12:57:32 +0100 Subject: [PATCH] Use Contact model in E2EGetContact --- Sources/XXClient/E2E/Functors/E2EGetContact.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Sources/XXClient/E2E/Functors/E2EGetContact.swift b/Sources/XXClient/E2E/Functors/E2EGetContact.swift index ccd3b417..f7426dc2 100644 --- a/Sources/XXClient/E2E/Functors/E2EGetContact.swift +++ b/Sources/XXClient/E2E/Functors/E2EGetContact.swift @@ -2,9 +2,9 @@ import Bindings import XCTestDynamicOverlay public struct E2EGetContact { - public var run: () -> Data + public var run: () -> Contact - public func callAsFunction() -> Data { + public func callAsFunction() -> Contact { run() } } @@ -15,13 +15,16 @@ extension E2EGetContact { guard let data = bindingsE2E.getContact() else { fatalError("BindingsE2e.getContact returned `nil`") } - return data + return Contact.live(data) } } } extension E2EGetContact { public static let unimplemented = E2EGetContact( - run: XCTUnimplemented("\(Self.self)", placeholder: "unimplemented".data(using: .utf8)!) + run: XCTUnimplemented( + "\(Self.self)", + placeholder: .unimplemented("unimplemented".data(using: .utf8)!) + ) ) } -- GitLab