This PR contains the work done to implement some useful protocols, classes and extensions to use to setup a persistence layer in an application. To provide further details about the work done: - [x] declared the `Persistence` target in the Package file; - [x] forgot to declare the `Communications` and `Persistence` target to the `SwiftLibs` library in the `Package` file; - [x] defined the `Service` public protocol; - [x] implemented the `Fetcher` generic class; - [x] implemented the `bitBucket` static property in the `URL+Devices` public extension; - [x] updated the `README` file. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: #5
31 lines
534 B
Swift
31 lines
534 B
Swift
//
|
|
// URL+DevicesTests.swift
|
|
// PersistenceTests
|
|
//
|
|
// Created by Javier Cicchelli on 17/04/2023.
|
|
// Copyright © 2023 Röck+Cöde. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import Persistence
|
|
import XCTest
|
|
|
|
final class URL_DevicesTests: XCTestCase {
|
|
|
|
// MARK: Properties
|
|
|
|
private var url: URL!
|
|
|
|
// MARK: - Tests
|
|
|
|
func test_bitBucket() {
|
|
// GIVEN
|
|
// WHEN
|
|
url = .bitBucket
|
|
|
|
// THEN
|
|
XCTAssertEqual(url.absoluteString, "file:///dev/null")
|
|
}
|
|
|
|
}
|