mas/Tests/MasKitTests/ExternalCommands/OpenSystemCommandMock.swift

29 lines
560 B
Swift
Raw Normal View History

2019-01-05 00:54:00 +00:00
//
// OpenSystemCommandMock.swift
2019-01-05 00:54:00 +00:00
// MasKitTests
//
// Created by Ben Chatelain on 1/4/19.
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
2019-01-05 00:54:00 +00:00
@testable import MasKit
class OpenSystemCommandMock: ExternalCommand {
2019-01-05 00:54:00 +00:00
// Stub out protocol logic
var succeeded = true
var arguments: [String]?
// unused
var binaryPath = "/dev/null"
var process = Process()
var stdoutPipe = Pipe()
var stderrPipe = Pipe()
init() {}
func run(arguments: String...) throws {
self.arguments = arguments
}
}