Added the initialiser function to the MockURLRequest struct.

This commit is contained in:
Javier Cicchelli 2023-04-19 14:55:39 +02:00
parent d8163ab0de
commit a9a7a6399a

View File

@ -75,8 +75,22 @@ public class MockURLProtocol: URLProtocol {
/// This model includes the data to be injected into an specific URL at the time of mocking its request.
public struct MockURLRequest: Hashable {
// MARK: Properties
public let method: HTTPRequestMethod
public let url: URL
// MARK: Initialisers
public init(
method: HTTPRequestMethod,
url: URL
) {
self.method = method
self.url = url
}
}
/// This model includes the data to be injected into an specific URL at the time of mocking its response.