diff --git a/Sources/CheckoutNetworkFakeClient/CheckoutNetworkFakeClient.swift b/Sources/CheckoutNetworkFakeClient/CheckoutNetworkFakeClient.swift index 32d9828..c32bd88 100644 --- a/Sources/CheckoutNetworkFakeClient/CheckoutNetworkFakeClient.swift +++ b/Sources/CheckoutNetworkFakeClient/CheckoutNetworkFakeClient.swift @@ -28,10 +28,14 @@ final public class CheckoutNetworkFakeClient: CheckoutClientInterface { extension CheckoutNetworkFakeClient { public func runRequest(with configuration: CheckoutNetwork.RequestConfiguration) async throws -> T { calledAsyncRequests.append(configuration) + // swiftlint:disable force_cast return dataToBeReturned as! T + // swiftlint:enable force_cast } public func runRequest(with configuration: RequestConfiguration) async throws { calledAsyncRequests.append(configuration) + try await Task.sleep(nanoseconds: 1 * 1_000_000_000) // 1 second + return () } }