From e10c1c9f59afffa1bff1a539353e50dd8fd623b4 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 17 Mar 2024 18:18:44 +0100 Subject: [PATCH] Implemented the "mock" static constant for the URLSessionConfiguration+Constants extension in the Foundation library. --- .../URLSessionConfiguration+Constants.swift | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Libraries/Foundation/Kit/Sources/Extensions/URLSessionConfiguration+Constants.swift diff --git a/Libraries/Foundation/Kit/Sources/Extensions/URLSessionConfiguration+Constants.swift b/Libraries/Foundation/Kit/Sources/Extensions/URLSessionConfiguration+Constants.swift new file mode 100644 index 0000000..aa54f9a --- /dev/null +++ b/Libraries/Foundation/Kit/Sources/Extensions/URLSessionConfiguration+Constants.swift @@ -0,0 +1,22 @@ +// +// URLSessionConfiguration+Constants.swift +// ReviewsFoundationKit +// +// Created by Javier Cicchelli on 17/03/2024. +// Copyright © 2024 Röck+Cöde VoF. All rights reserved. +// + +import Foundation + +extension URLSessionConfiguration { + + // MARK: Constants + public static let mock = { + let configuration: URLSessionConfiguration = .ephemeral + + configuration.protocolClasses = [MockURLProtocol.self] + + return configuration + }() + +}