Implemented the ArchiveController controller in the library target.
This commit is contained in:
@@ -5,6 +5,7 @@ extension Tag {
|
||||
// MARK: Constants
|
||||
|
||||
@Tag static var builder: Tag
|
||||
@Tag static var controller: Tag
|
||||
@Tag static var enumeration: Tag
|
||||
@Tag static var middleware: Tag
|
||||
@Tag static var provider: Tag
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
@testable import DoxyLibrary
|
||||
|
||||
struct FileServiceMock {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
private let error: FileServiceError?
|
||||
private let items: [String]
|
||||
|
||||
// MARK: Initialisers
|
||||
|
||||
init(
|
||||
items: [String] = [],
|
||||
error: FileServiceError? = nil
|
||||
) {
|
||||
self.error = error
|
||||
self.items = items
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - FileServicing
|
||||
|
||||
extension FileServiceMock: FileServicing {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
func listItems(in folder: String) async throws(FileServiceError) -> [String] {
|
||||
if let error {
|
||||
throw error
|
||||
}
|
||||
|
||||
return items
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user