From 0d76afb73820d43e9d59a62c5a0854d25c533cc4 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Tue, 23 Sep 2025 14:15:28 +0200 Subject: [PATCH] Added the Input and Output namespaces in the tests target. --- .../Internal/Enumerations/AssetFileTests.swift | 2 +- .../Internal/Enumerations/AssetFolderTests.swift | 2 +- .../Enumerations/DocumentationFolderTests.swift | 2 +- .../Internal/Use Cases/CheckURIUseCaseTests.swift | 6 +++--- Tests/DocCMiddleware/Types/Namespaces/Input.swift | 14 ++++++++++++++ Tests/DocCMiddleware/Types/Namespaces/Output.swift | 14 ++++++++++++++ 6 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 Tests/DocCMiddleware/Types/Namespaces/Input.swift create mode 100644 Tests/DocCMiddleware/Types/Namespaces/Output.swift diff --git a/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFileTests.swift b/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFileTests.swift index 6ad465f..0ded28e 100644 --- a/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFileTests.swift +++ b/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFileTests.swift @@ -71,7 +71,7 @@ private extension AssetFileTests { // MARK: - Constants -extension Output { +private extension Output { /// A list of expected outputs for the paths of the ``AssetFile`` enumeration cases. static let assetFilePaths: [String] = ["/data/documentation.json", "/favicon.ico", "/favicon.svg", "/theme-settings.json"] } diff --git a/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFolderTests.swift b/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFolderTests.swift index eabef30..a0b12d1 100644 --- a/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFolderTests.swift +++ b/Tests/DocCMiddleware/Tests/Internal/Enumerations/AssetFolderTests.swift @@ -71,7 +71,7 @@ private extension AssetFolderTests { // MARK: - Constants -extension Output { +private extension Output { /// A list of expected outputs for the paths of the ``AssetFolder`` enumeration cases. static let assetFolderPaths: [String] = ["/css/", "/data/", "/downloads/", "/images/", "/img/", "/index/", "/js/", "/videos/"] } diff --git a/Tests/DocCMiddleware/Tests/Internal/Enumerations/DocumentationFolderTests.swift b/Tests/DocCMiddleware/Tests/Internal/Enumerations/DocumentationFolderTests.swift index fc2cc6d..3004b0c 100644 --- a/Tests/DocCMiddleware/Tests/Internal/Enumerations/DocumentationFolderTests.swift +++ b/Tests/DocCMiddleware/Tests/Internal/Enumerations/DocumentationFolderTests.swift @@ -71,7 +71,7 @@ private extension DocumentationTypeTests { // MARK: - Constants -extension Output { +private extension Output { /// A list of expected outputs for the paths of the ``DocumentationFolder`` enumeration cases. static let documentationFolderPaths: [String] = ["/documentation", "/tutorials"] } diff --git a/Tests/DocCMiddleware/Tests/Internal/Use Cases/CheckURIUseCaseTests.swift b/Tests/DocCMiddleware/Tests/Internal/Use Cases/CheckURIUseCaseTests.swift index fc3c5c7..055a1be 100644 --- a/Tests/DocCMiddleware/Tests/Internal/Use Cases/CheckURIUseCaseTests.swift +++ b/Tests/DocCMiddleware/Tests/Internal/Use Cases/CheckURIUseCaseTests.swift @@ -79,7 +79,7 @@ private extension CheckURIUseCaseTests { // MARK: Functions - /// Asserts a URI type based on a given path and an expected result. + /// Asserts a URI path provided by the ``CheckURIPathUseCase`` use case based on a given path and an expected result. /// - Parameters: /// - uriPath: A URI path to use with a URI type. /// - result: An expected result coming out of the use case. @@ -101,14 +101,14 @@ private extension CheckURIUseCaseTests { // MARK: - Constants -enum Input { +private extension Input { /// A list of non-encoded URI samples. static let nonEncodedURIs: [String] = ["/", "/some/known/path", "", "/some/../path", "some/other/path"] /// A list of percent-encoded URI samples. static let percentEncodedURIs: [String] = ["%2F", "/some%2Fknown%3Fpath", "%20", "/some/%2E%2E/path", "some%2Fother%3Fpath"] } -enum Output { +private extension Output { /// A list of expected outputs for the non-encoded URI samples. static let nonEncodedURIs: [String?] = ["/", "/some/known/path", "/", nil, nil] /// A list of expected outputs for the percent-encoded URI samples. diff --git a/Tests/DocCMiddleware/Types/Namespaces/Input.swift b/Tests/DocCMiddleware/Types/Namespaces/Input.swift new file mode 100644 index 0000000..a71d255 --- /dev/null +++ b/Tests/DocCMiddleware/Types/Namespaces/Input.swift @@ -0,0 +1,14 @@ +// ===----------------------------------------------------------------------=== +// +// This source file is part of the Hummingbird DocC Middleware open source project +// +// Copyright (c) 2025 Röck+Cöde VoF. and the Hummingbird DocC Middleware project authors +// Licensed under the EUPL 1.2 or later. +// +// See LICENSE for license information +// See CONTRIBUTORS for the list of Hummingbird DocC Middleware project authors +// +// ===----------------------------------------------------------------------=== + +/// A namespace assigned for test arguments that would be input into test cases. +enum Input {} diff --git a/Tests/DocCMiddleware/Types/Namespaces/Output.swift b/Tests/DocCMiddleware/Types/Namespaces/Output.swift new file mode 100644 index 0000000..0773041 --- /dev/null +++ b/Tests/DocCMiddleware/Types/Namespaces/Output.swift @@ -0,0 +1,14 @@ +// ===----------------------------------------------------------------------=== +// +// This source file is part of the Hummingbird DocC Middleware open source project +// +// Copyright (c) 2025 Röck+Cöde VoF. and the Hummingbird DocC Middleware project authors +// Licensed under the EUPL 1.2 or later. +// +// See LICENSE for license information +// See CONTRIBUTORS for the list of Hummingbird DocC Middleware project authors +// +// ===----------------------------------------------------------------------=== + +/// A namespace assigned for test arguments that would be expected outputs coming from results of test cases. +enum Output {}