diff --git a/Tests/NetworkingTests/Code/Api Implementation/ConcreteJSONApi.swift b/Tests/NetworkingTests/Code/Api Implementation/ConcreteJSONApi.swift deleted file mode 100644 index dbd67d2..0000000 --- a/Tests/NetworkingTests/Code/Api Implementation/ConcreteJSONApi.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ConcreteApi.swift -// -// -// Created by Sacha DSO on 30/01/2020. -// - -import Foundation -import Networking -import Combine - -struct ConcreteApi: Api, NetworkingService { - - let network: NetworkingClient = NetworkingClient(baseURL: "https://jsonplaceholder.typicode.com") - - func fetchPost() -> AnyPublisher { - get("/posts/1") - } - - func fetchPosts() -> AnyPublisher<[Post], Error> { - get("/posts") - } -} diff --git a/Tests/NetworkingTests/Code/Api Implementation/JSONPost.swift b/Tests/NetworkingTests/Code/Api Implementation/JSONPost.swift deleted file mode 100644 index 44a656d..0000000 --- a/Tests/NetworkingTests/Code/Api Implementation/JSONPost.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// JSONPost.swift -// -// -// Created by Sacha DSO on 30/01/2020. -// - -import Foundation -import Networking - -struct JSONPost: Decodable { - let identifier: Int - let userId: Int - let title: String - let body: String - - enum CodingKeys: String, CodingKey { - case identifier = "id" - case userId - case title - case body - } -} - -/* -JSON: -{ - "userId": 1, - "id": 1, - "title": "delectus aut autem", - "completed": false -} -*/ diff --git a/Tests/NetworkingTests/Code/App Domain/Api.swift b/Tests/NetworkingTests/Code/App Domain/Api.swift deleted file mode 100644 index 718e6aa..0000000 --- a/Tests/NetworkingTests/Code/App Domain/Api.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// Api.swift -// -// -// Created by Sacha DSO on 30/01/2020. -// - -import Foundation -import Combine - -// Your async api not depending on any networking details (http etc) -protocol Api { - func fetchPost() -> AnyPublisher - func fetchPosts() -> AnyPublisher<[Post], Error> -} diff --git a/Tests/NetworkingTests/Code/App Domain/Post.swift b/Tests/NetworkingTests/Code/App Domain/Post.swift deleted file mode 100644 index b29e39b..0000000 --- a/Tests/NetworkingTests/Code/App Domain/Post.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Post.swift -// -// -// Created by Sacha DSO on 30/01/2020. -// - -import Foundation - -struct Post: Decodable { - let identifier: Int - let userId: Int - let title: String - let body: String - - enum CodingKeys: String, CodingKey { - case identifier = "id" - case userId - case title - case body - } -} diff --git a/Tests/NetworkingTests/NetworkingTests.swift b/Tests/NetworkingTests/NetworkingTests.swift index 19d2628..cc55e8f 100644 --- a/Tests/NetworkingTests/NetworkingTests.swift +++ b/Tests/NetworkingTests/NetworkingTests.swift @@ -2,8 +2,6 @@ import XCTest import Networking import Combine -extension Post: NetworkingJSONDecodable {} - final class NetworkingTests: XCTestCase { var cancellables = Set()