mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 20:43:10 +00:00
Move MasKit module to mas.
Move MasKitTests module to masTests. Rename MasKit enum as Mas. Upgrade swift-tools-version from 5.3 to 5.6.1. swift-tools-version 5.5+ is necessary to allow test code to import executable target code, to allow MasKit library code to be moved into the mas executable. Upgrade to swift-tools-version to 5.6.1 instead of to 5.5 because they support all the same macOS versions. Standardize comments. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
611d4a7fb7
commit
d413d8cfa1
106 changed files with 236 additions and 252 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -37,4 +37,5 @@ build/
|
|||
default.profraw
|
||||
releases/
|
||||
xcuserdata
|
||||
Sources/mas/Package.swift
|
||||
Sources/MasKit/Package.swift
|
||||
|
|
104
Package.resolved
104
Package.resolved
|
@ -1,79 +1,77 @@
|
|||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
"pins" : [
|
||||
{
|
||||
"package": "Commandant",
|
||||
"repositoryURL": "https://github.com/Carthage/Commandant.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "a1671cf728db837cf5ec1980a80d276bbba748f6",
|
||||
"version": "0.18.0"
|
||||
"identity" : "commandant",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/Carthage/Commandant.git",
|
||||
"state" : {
|
||||
"revision" : "a1671cf728db837cf5ec1980a80d276bbba748f6",
|
||||
"version" : "0.18.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "CwlCatchException",
|
||||
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea",
|
||||
"version": "2.1.1"
|
||||
"identity" : "cwlcatchexception",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
|
||||
"state" : {
|
||||
"revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea",
|
||||
"version" : "2.1.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "CwlPreconditionTesting",
|
||||
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
|
||||
"version": "2.1.0"
|
||||
"identity" : "cwlpreconditiontesting",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git",
|
||||
"state" : {
|
||||
"revision" : "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
|
||||
"version" : "2.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Nimble",
|
||||
"repositoryURL": "https://github.com/Quick/Nimble.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "1f3bde57bde12f5e7b07909848c071e9b73d6edc",
|
||||
"version": "10.0.0"
|
||||
"identity" : "nimble",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/Quick/Nimble.git",
|
||||
"state" : {
|
||||
"revision" : "1f3bde57bde12f5e7b07909848c071e9b73d6edc",
|
||||
"version" : "10.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "PromiseKit",
|
||||
"repositoryURL": "https://github.com/mxcl/PromiseKit.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "43772616c46a44a9977e41924ae01d0e55f2f9ca",
|
||||
"version": "6.18.1"
|
||||
"identity" : "promisekit",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mxcl/PromiseKit.git",
|
||||
"state" : {
|
||||
"revision" : "43772616c46a44a9977e41924ae01d0e55f2f9ca",
|
||||
"version" : "6.18.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Quick",
|
||||
"repositoryURL": "https://github.com/Quick/Quick.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "f9d519828bb03dfc8125467d8f7b93131951124c",
|
||||
"version": "5.0.1"
|
||||
"identity" : "quick",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/Quick/Quick.git",
|
||||
"state" : {
|
||||
"revision" : "f9d519828bb03dfc8125467d8f7b93131951124c",
|
||||
"version" : "5.0.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Regex",
|
||||
"repositoryURL": "https://github.com/sharplet/Regex.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "76c2b73d4281d77fc3118391877efd1bf972f515",
|
||||
"version": "2.1.1"
|
||||
"identity" : "regex",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/sharplet/Regex.git",
|
||||
"state" : {
|
||||
"revision" : "76c2b73d4281d77fc3118391877efd1bf972f515",
|
||||
"version" : "2.1.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Version",
|
||||
"repositoryURL": "https://github.com/mxcl/Version.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "1fe824b80d89201652e7eca7c9252269a1d85e25",
|
||||
"version": "2.0.1"
|
||||
"identity" : "version",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/mxcl/Version.git",
|
||||
"state" : {
|
||||
"revision" : "1fe824b80d89201652e7eca7c9252269a1d85e25",
|
||||
"version" : "2.0.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": 1
|
||||
],
|
||||
"version" : 2
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// swift-tools-version:5.3
|
||||
// swift-tools-version:5.6.1
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
@ -13,11 +13,7 @@ let package = Package(
|
|||
.executable(
|
||||
name: "mas",
|
||||
targets: ["mas"]
|
||||
),
|
||||
.library(
|
||||
name: "MasKit",
|
||||
targets: ["MasKit"]
|
||||
),
|
||||
)
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
|
@ -31,18 +27,8 @@ let package = Package(
|
|||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
||||
.target(
|
||||
.executableTarget(
|
||||
name: "mas",
|
||||
dependencies: ["MasKit"],
|
||||
swiftSettings: [
|
||||
.unsafeFlags([
|
||||
"-I", "Sources/PrivateFrameworks/CommerceKit",
|
||||
"-I", "Sources/PrivateFrameworks/StoreFoundation",
|
||||
])
|
||||
]
|
||||
),
|
||||
.target(
|
||||
name: "MasKit",
|
||||
dependencies: [
|
||||
"Commandant",
|
||||
"PromiseKit",
|
||||
|
@ -62,8 +48,8 @@ let package = Package(
|
|||
]
|
||||
),
|
||||
.testTarget(
|
||||
name: "MasKitTests",
|
||||
dependencies: ["MasKit", "Nimble", "Quick"],
|
||||
name: "masTests",
|
||||
dependencies: ["mas", "Nimble", "Quick"],
|
||||
resources: [.copy("JSON")],
|
||||
swiftSettings: [
|
||||
.unsafeFlags([
|
||||
|
|
|
@ -246,7 +246,7 @@ Build output can be found in the `.build/` directory within the project.
|
|||
|
||||
The tests in this project are a recent work-in-progress.
|
||||
Since Xcode does not officially support tests for command-line tool targets,
|
||||
all logic is part of the MasKit target with tests in MasKitTests.
|
||||
all logic is part of the mas target with tests in masTests.
|
||||
Tests are written using [Quick].
|
||||
|
||||
```bash
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// CKSoftwareMap+SoftwareMap.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/27/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// CKSoftwareProduct+SoftwareProduct.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/27/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Downloader.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 21/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// ISStoreAccount.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 22/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// PurchaseDownloadObserver.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 21/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SSPurchase.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 25/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// StoreAccount.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 4/3/18.
|
||||
// Copyright © 2018 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Account.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 21/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Home.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-29.
|
||||
// Copyright © 2016 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Info.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Denis Lebedev on 21/10/2016.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Install.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 21/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// List.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 21/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Lucky.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Pablo Varela on 05/11/17.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Open.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-29.
|
||||
// Copyright © 2016 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Outdated.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 21/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Purchase.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Jakob Rieck on 24/10/2017.
|
||||
// Copyright (c) 2017 Jakob Rieck. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Reset.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 14/09/2016.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Search.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Michael Schneider on 4/14/16.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SignIn.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 14/02/2016.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SignOut.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 14/02/2016.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Uninstall.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-27.
|
||||
// Copyright © 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Upgrade.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 30/12/2015.
|
||||
// Copyright © 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Vendor.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-29.
|
||||
// Copyright © 2016 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Version.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 20/09/2015.
|
||||
// Copyright © 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// AppLibrary.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/27/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// MasAppLibrary.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/27/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// MasStoreSearch.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/29/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SoftwareMap.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 3/1/20.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// StoreSearch.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/29/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// MASError.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 21/08/2015.
|
||||
// Copyright (c) 2015 Andrew Naylor. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// ExternalCommand.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 1/1/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// OpenSystemCommand.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 1/2/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SysCtlSystemCommand.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Chris Araman on 6/3/21.
|
||||
// Copyright © 2021 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// AppInfoFormatter.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 1/7/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// AppListFormatter.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 6/7/20.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SearchResultFormatter.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 1/11/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Utilities.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 14/09/2016.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
||||
|
@ -18,7 +18,7 @@ let csi = "\u{001B}["
|
|||
var printObserver: ((String) -> Void)?
|
||||
|
||||
// Override global print for testability.
|
||||
// See MasKitTests/OutputListener.swift.
|
||||
// See masTests/OutputListener.swift.
|
||||
func print(
|
||||
_ items: Any...,
|
||||
separator: String = " ",
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// MasKit.swift
|
||||
// MasKit
|
||||
// Mas.swift
|
||||
// mas
|
||||
//
|
||||
// Created by Chris Araman on 4/22/21.
|
||||
// Copyright © 2021 mas-cli. All rights reserved.
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
import PromiseKit
|
||||
|
||||
public enum MasKit {
|
||||
public enum Mas {
|
||||
public static func initialize() {
|
||||
PromiseKit.conf.Q.map = .global()
|
||||
PromiseKit.conf.Q.return = .global()
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SearchResult.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/29/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SearchResultList.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/29/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SoftwareProduct.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 12/27/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Foundation
|
||||
import Version
|
||||
|
||||
/// Protocol describing the members of CKSoftwareProduct used throughout MasKit.
|
||||
/// Protocol describing the members of CKSoftwareProduct used throughout mas.
|
||||
protocol SoftwareProduct {
|
||||
var appName: String { get }
|
||||
var bundleIdentifier: String { get set }
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// NetworkManager.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 1/5/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// NetworkSession.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 1/5/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// URLSession+NetworkSession.swift
|
||||
// MasKit
|
||||
// mas
|
||||
//
|
||||
// Created by Ben Chatelain on 1/5/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,15 +1,14 @@
|
|||
//
|
||||
// main.swift
|
||||
// mas-cli
|
||||
// mas
|
||||
//
|
||||
// Created by Andrew Naylor on 11/07/2015.
|
||||
// Copyright © 2015 Andrew Naylor. All rights reserved.
|
||||
//
|
||||
|
||||
import Commandant
|
||||
import MasKit
|
||||
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
|
||||
let registry = CommandRegistry<MASError>()
|
||||
let helpCommand = HelpCommand(registry: registry)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# .swiftlint.yml
|
||||
# MasKitTests
|
||||
# masTests
|
||||
#
|
||||
# https://github.com/realm/SwiftLint#configuration
|
||||
#
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// AccountCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,13 +9,13 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
// Deprecated test
|
||||
public class AccountCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
// account command disabled since macOS 12 Monterey https://github.com/mas-cli/mas#%EF%B8%8F-known-issues
|
||||
xdescribe("Account command") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// HomeCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-29.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class HomeCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -23,7 +23,7 @@ public class HomeCommandSpec: QuickSpec {
|
|||
let cmd = HomeCommand(storeSearch: storeSearch, openCommand: openCommand)
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("home command") {
|
||||
beforeEach {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// InfoCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class InfoCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -37,7 +37,7 @@ public class InfoCommandSpec: QuickSpec {
|
|||
"""
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("Info command") {
|
||||
beforeEach {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// InstallCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class InstallCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("install command") {
|
||||
it("installs apps") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// ListCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-27.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class ListCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("list command") {
|
||||
it("lists apps") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// LuckyCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class LuckyCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -17,7 +17,7 @@ public class LuckyCommandSpec: QuickSpec {
|
|||
let storeSearch = MasStoreSearch(networkManager: NetworkManager(session: networkSession))
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("lucky command") {
|
||||
xit("installs the first app matching a search") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// OpenCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2019-01-03.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -10,7 +10,7 @@ import Foundation
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class OpenCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -24,7 +24,7 @@ public class OpenCommandSpec: QuickSpec {
|
|||
let cmd = OpenCommand(storeSearch: storeSearch, openCommand: openCommand)
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("open command") {
|
||||
beforeEach {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// OutdatedCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class OutdatedCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("outdated command") {
|
||||
it("displays apps with pending updates") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// PurchaseCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Maximilian Blochberger on 2020-03-21.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class PurchaseCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("purchase command") {
|
||||
it("purchases apps") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// ResetCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class ResetCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("reset command") {
|
||||
it("resets the App Store state") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SearchCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class SearchCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -22,7 +22,7 @@ public class SearchCommandSpec: QuickSpec {
|
|||
let storeSearch = StoreSearchMock()
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("search command") {
|
||||
beforeEach {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SignInCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,13 +9,13 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
// Deprecated test
|
||||
public class SignInCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
// account command disabled since macOS 10.13 High Sierra https://github.com/mas-cli/mas#%EF%B8%8F-known-issues
|
||||
xdescribe("signin command") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SignOutCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class SignOutCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("signout command") {
|
||||
it("signs out") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// UninstallCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-27.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -10,12 +10,12 @@ import Foundation
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class UninstallCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("uninstall command") {
|
||||
let appId = 12345
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// UpgradeCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class UpgradeCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("upgrade command") {
|
||||
it("upgrades stuff") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// VendorCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2019-01-03.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class VendorCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -23,7 +23,7 @@ public class VendorCommandSpec: QuickSpec {
|
|||
let cmd = VendorCommand(storeSearch: storeSearch, openCommand: openCommand)
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("vendor command") {
|
||||
beforeEach {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// VersionCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2018-12-28.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class VersionCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("version command") {
|
||||
it("displays the current version") {
|
|
@ -1,12 +1,12 @@
|
|||
//
|
||||
// AppLibraryMock.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 12/27/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
//
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
class AppLibraryMock: AppLibrary {
|
||||
var installedApps = [SoftwareProduct]()
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// MasAppLibrarySpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 3/1/20.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
||||
|
@ -9,14 +9,14 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class MasAppLibrarySpec: QuickSpec {
|
||||
override public func spec() {
|
||||
let library = MasAppLibrary(softwareMap: SoftwareMapMock(products: apps))
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("mas app library") {
|
||||
it("contains all installed apps") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// MasStoreSearchSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 1/4/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class MasStoreSearchSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("url string") {
|
||||
it("contains the app name") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// StoreSearchMock.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 1/4/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
import PromiseKit
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
class StoreSearchMock: StoreSearch {
|
||||
var apps: [Int: SearchResult] = [:]
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// MASErrorTestCase.swift
|
||||
// mas-tests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2/11/18.
|
||||
// Copyright © 2018 Andrew Naylor. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Foundation
|
||||
import XCTest
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
class MASErrorTestCase: XCTestCase {
|
||||
private let errorDomain = "MAS"
|
||||
|
@ -30,7 +30,7 @@ class MASErrorTestCase: XCTestCase {
|
|||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
nserror = NSError(domain: errorDomain, code: 999)
|
||||
localizedDescription = "foo"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// Bundle+JSON.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 1/5/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -28,7 +28,7 @@ extension Bundle {
|
|||
let bundleURL = Bundle(for: NetworkSessionMock.self)
|
||||
.bundleURL
|
||||
.deletingLastPathComponent()
|
||||
.appendingPathComponent("mas_MasKitTests.bundle")
|
||||
.appendingPathComponent("mas_masTests.bundle")
|
||||
guard let bundle = Bundle(url: bundleURL),
|
||||
let url = bundle.url(for: fileName)
|
||||
else {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// String+FileExtension.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 1/5/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// OpenSystemCommandMock.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 1/4/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
import Foundation
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
class OpenSystemCommandMock: ExternalCommand {
|
||||
// Stub out protocol logic
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// OpenSystemCommandSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2/24/20.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
||||
|
@ -9,12 +9,12 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class OpenSystemCommandSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("open system command") {
|
||||
context("binary path") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// AppListFormatterSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 8/23/2020.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class AppListsFormatterSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -18,7 +18,7 @@ public class AppListsFormatterSpec: QuickSpec {
|
|||
var products: [SoftwareProduct] = []
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("app list formatter") {
|
||||
beforeEach {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SearchResultFormatterSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 1/14/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class SearchResultsFormatterSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
|
@ -18,7 +18,7 @@ public class SearchResultsFormatterSpec: QuickSpec {
|
|||
var results: [SearchResult] = []
|
||||
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("search results formatter") {
|
||||
beforeEach {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SearchResultListSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 9/2/20.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
||||
|
@ -10,12 +10,12 @@ import Foundation
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class SearchResultListSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("search result list") {
|
||||
it("can parse bbedit") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SearchResultSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 9/2/20.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
||||
|
@ -10,12 +10,12 @@ import Foundation
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class SearchResultSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("search result") {
|
||||
it("can parse things") {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SoftwareProductMock.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 12/27/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
import Foundation
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
struct SoftwareProductMock: SoftwareProduct {
|
||||
var appName: String
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// SoftwareProductSpec.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 9/30/21.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -10,12 +10,12 @@ import Foundation
|
|||
import Nimble
|
||||
import Quick
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
public class SoftwareProductSpec: QuickSpec {
|
||||
override public func spec() {
|
||||
beforeSuite {
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
describe("software product") {
|
||||
let app = SoftwareProductMock(
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// NetworkManagerTests.swift
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 1/5/19.
|
||||
// Copyright © 2019 mas-cli. All rights reserved.
|
||||
|
@ -8,12 +8,12 @@
|
|||
|
||||
import XCTest
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
class NetworkManagerTests: XCTestCase {
|
||||
override public func setUp() {
|
||||
super.setUp()
|
||||
MasKit.initialize()
|
||||
Mas.initialize()
|
||||
}
|
||||
|
||||
func testSuccessfulAsyncResponse() throws {
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// NetworkSessionMock
|
||||
// MasKitTests
|
||||
// masTests
|
||||
//
|
||||
// Created by Ben Chatelain on 11/13/18.
|
||||
// Copyright © 2018 mas-cli. All rights reserved.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import Foundation
|
||||
import PromiseKit
|
||||
|
||||
@testable import MasKit
|
||||
@testable import mas
|
||||
|
||||
/// Mock NetworkSession for testing.
|
||||
class NetworkSessionMock: NetworkSession {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue