Made the MakeURLRequestUseCase use case available for Linux platforms by importing the FoundationNetworking framework.
This commit is contained in:
parent
94a49afb66
commit
52abee5487
@ -10,9 +10,12 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
#if canImport(FoundationNetworking)
|
||||||
|
import FoundationNetworking
|
||||||
|
#endif
|
||||||
|
|
||||||
/// This use case generate a url request out of a given endpoint.
|
/// This use case generate a url request out of a given endpoint.
|
||||||
public struct MakeURLRequestUseCase {
|
public struct MakeURLRequestUseCase {
|
||||||
|
|
||||||
@ -56,4 +59,3 @@ public struct MakeURLRequestUseCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@ -10,11 +10,14 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
|
|
||||||
import Communications
|
import Communications
|
||||||
import Foundation
|
import Foundation
|
||||||
import XCTest
|
import XCTest
|
||||||
|
|
||||||
|
#if canImport(FoundationNetworking)
|
||||||
|
import FoundationNetworking
|
||||||
|
#endif
|
||||||
|
|
||||||
final class MakeURLRequestUseCaseTests: XCTestCase {
|
final class MakeURLRequestUseCaseTests: XCTestCase {
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
@ -28,7 +31,7 @@ final class MakeURLRequestUseCaseTests: XCTestCase {
|
|||||||
let endpoint = TestEndpoint()
|
let endpoint = TestEndpoint()
|
||||||
|
|
||||||
// WHEN
|
// WHEN
|
||||||
let result = try makeURLRequest(endpoint: endpoint)
|
let result = try makeURLRequest(endpoint: endpoint)``
|
||||||
|
|
||||||
// THEN
|
// THEN
|
||||||
XCTAssertNotNil(result)
|
XCTAssertNotNil(result)
|
||||||
@ -142,4 +145,3 @@ private struct TestEndpoint: Endpoint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user