From 586de073892a6a5f704d1dca3654f1e94a60e97c Mon Sep 17 00:00:00 2001 From: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:40:14 -0400 Subject: [PATCH] Improve access control. Partial #592 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> --- Sources/mas/Commands/Lucky.swift | 2 +- Tests/masTests/Errors/MASErrorTestCase.swift | 6 +++--- Tests/masTests/Network/NetworkManagerTests.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/mas/Commands/Lucky.swift b/Sources/mas/Commands/Lucky.swift index a75fbea..b79c776 100644 --- a/Sources/mas/Commands/Lucky.swift +++ b/Sources/mas/Commands/Lucky.swift @@ -56,7 +56,7 @@ extension Mas { /// - appID: App identifier /// - appLibrary: Library of installed apps /// - Throws: Any error that occurs while attempting to install the app. - fileprivate func install(appID: AppID, appLibrary: AppLibrary) throws { + private func install(appID: AppID, appLibrary: AppLibrary) throws { // Try to download applications with given identifiers and collect results if let product = appLibrary.installedApp(withAppID: appID), !force { printWarning("\(product.appName) is already installed") diff --git a/Tests/masTests/Errors/MASErrorTestCase.swift b/Tests/masTests/Errors/MASErrorTestCase.swift index 0d59cb2..fdc044e 100644 --- a/Tests/masTests/Errors/MASErrorTestCase.swift +++ b/Tests/masTests/Errors/MASErrorTestCase.swift @@ -13,15 +13,15 @@ import XCTest class MASErrorTestCase: XCTestCase { private let errorDomain = "MAS" - var error: MASError! - var nserror: NSError! + private var error: MASError! + private var nserror: NSError! /// Convenience property for setting the value which will be use for the localized description /// value of the next NSError created. /// /// Only used when the NSError does not have a user info /// entry for localized description. - var localizedDescription: String { + private var localizedDescription: String { get { "dummy value" } set { NSError.setUserInfoValueProvider(forDomain: errorDomain) { _, _ in diff --git a/Tests/masTests/Network/NetworkManagerTests.swift b/Tests/masTests/Network/NetworkManagerTests.swift index a92227c..450bb39 100644 --- a/Tests/masTests/Network/NetworkManagerTests.swift +++ b/Tests/masTests/Network/NetworkManagerTests.swift @@ -11,7 +11,7 @@ import XCTest @testable import mas class NetworkManagerTests: XCTestCase { - override public func setUp() { + override func setUp() { super.setUp() Mas.initialize() }