// Code generated by counterfeiter. DO NOT EDIT.
package platformfakes

import (
	"sync"
	"syscall"

	"github.com/ehsaniara/joblet/pkg/platform"
)

type FakeCommand struct {
	KillStub        func()
	killMutex       sync.RWMutex
	killArgsForCall []struct {
	}
	ProcessStub        func() platform.Process
	processMutex       sync.RWMutex
	processArgsForCall []struct {
	}
	processReturns struct {
		result1 platform.Process
	}
	processReturnsOnCall map[int]struct {
		result1 platform.Process
	}
	RunStub        func() error
	runMutex       sync.RWMutex
	runArgsForCall []struct {
	}
	runReturns struct {
		result1 error
	}
	runReturnsOnCall map[int]struct {
		result1 error
	}
	SetDirStub        func(string)
	setDirMutex       sync.RWMutex
	setDirArgsForCall []struct {
		arg1 string
	}
	SetEnvStub        func([]string)
	setEnvMutex       sync.RWMutex
	setEnvArgsForCall []struct {
		arg1 []string
	}
	SetStderrStub        func(interface{})
	setStderrMutex       sync.RWMutex
	setStderrArgsForCall []struct {
		arg1 interface{}
	}
	SetStdinStub        func(interface{})
	setStdinMutex       sync.RWMutex
	setStdinArgsForCall []struct {
		arg1 interface{}
	}
	SetStdoutStub        func(interface{})
	setStdoutMutex       sync.RWMutex
	setStdoutArgsForCall []struct {
		arg1 interface{}
	}
	SetSysProcAttrStub        func(*syscall.SysProcAttr)
	setSysProcAttrMutex       sync.RWMutex
	setSysProcAttrArgsForCall []struct {
		arg1 *syscall.SysProcAttr
	}
	StartStub        func() error
	startMutex       sync.RWMutex
	startArgsForCall []struct {
	}
	startReturns struct {
		result1 error
	}
	startReturnsOnCall map[int]struct {
		result1 error
	}
	WaitStub        func() error
	waitMutex       sync.RWMutex
	waitArgsForCall []struct {
	}
	waitReturns struct {
		result1 error
	}
	waitReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeCommand) Kill() {
	fake.killMutex.Lock()
	fake.killArgsForCall = append(fake.killArgsForCall, struct {
	}{})
	stub := fake.KillStub
	fake.recordInvocation("Kill", []interface{}{})
	fake.killMutex.Unlock()
	if stub != nil {
		fake.KillStub()
	}
}

func (fake *FakeCommand) KillCallCount() int {
	fake.killMutex.RLock()
	defer fake.killMutex.RUnlock()
	return len(fake.killArgsForCall)
}

func (fake *FakeCommand) KillCalls(stub func()) {
	fake.killMutex.Lock()
	defer fake.killMutex.Unlock()
	fake.KillStub = stub
}

func (fake *FakeCommand) Process() platform.Process {
	fake.processMutex.Lock()
	ret, specificReturn := fake.processReturnsOnCall[len(fake.processArgsForCall)]
	fake.processArgsForCall = append(fake.processArgsForCall, struct {
	}{})
	stub := fake.ProcessStub
	fakeReturns := fake.processReturns
	fake.recordInvocation("Process", []interface{}{})
	fake.processMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeCommand) ProcessCallCount() int {
	fake.processMutex.RLock()
	defer fake.processMutex.RUnlock()
	return len(fake.processArgsForCall)
}

func (fake *FakeCommand) ProcessCalls(stub func() platform.Process) {
	fake.processMutex.Lock()
	defer fake.processMutex.Unlock()
	fake.ProcessStub = stub
}

func (fake *FakeCommand) ProcessReturns(result1 platform.Process) {
	fake.processMutex.Lock()
	defer fake.processMutex.Unlock()
	fake.ProcessStub = nil
	fake.processReturns = struct {
		result1 platform.Process
	}{result1}
}

func (fake *FakeCommand) ProcessReturnsOnCall(i int, result1 platform.Process) {
	fake.processMutex.Lock()
	defer fake.processMutex.Unlock()
	fake.ProcessStub = nil
	if fake.processReturnsOnCall == nil {
		fake.processReturnsOnCall = make(map[int]struct {
			result1 platform.Process
		})
	}
	fake.processReturnsOnCall[i] = struct {
		result1 platform.Process
	}{result1}
}

func (fake *FakeCommand) Run() error {
	fake.runMutex.Lock()
	ret, specificReturn := fake.runReturnsOnCall[len(fake.runArgsForCall)]
	fake.runArgsForCall = append(fake.runArgsForCall, struct {
	}{})
	stub := fake.RunStub
	fakeReturns := fake.runReturns
	fake.recordInvocation("Run", []interface{}{})
	fake.runMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeCommand) RunCallCount() int {
	fake.runMutex.RLock()
	defer fake.runMutex.RUnlock()
	return len(fake.runArgsForCall)
}

func (fake *FakeCommand) RunCalls(stub func() error) {
	fake.runMutex.Lock()
	defer fake.runMutex.Unlock()
	fake.RunStub = stub
}

func (fake *FakeCommand) RunReturns(result1 error) {
	fake.runMutex.Lock()
	defer fake.runMutex.Unlock()
	fake.RunStub = nil
	fake.runReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeCommand) RunReturnsOnCall(i int, result1 error) {
	fake.runMutex.Lock()
	defer fake.runMutex.Unlock()
	fake.RunStub = nil
	if fake.runReturnsOnCall == nil {
		fake.runReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.runReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeCommand) SetDir(arg1 string) {
	fake.setDirMutex.Lock()
	fake.setDirArgsForCall = append(fake.setDirArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.SetDirStub
	fake.recordInvocation("SetDir", []interface{}{arg1})
	fake.setDirMutex.Unlock()
	if stub != nil {
		fake.SetDirStub(arg1)
	}
}

func (fake *FakeCommand) SetDirCallCount() int {
	fake.setDirMutex.RLock()
	defer fake.setDirMutex.RUnlock()
	return len(fake.setDirArgsForCall)
}

func (fake *FakeCommand) SetDirCalls(stub func(string)) {
	fake.setDirMutex.Lock()
	defer fake.setDirMutex.Unlock()
	fake.SetDirStub = stub
}

func (fake *FakeCommand) SetDirArgsForCall(i int) string {
	fake.setDirMutex.RLock()
	defer fake.setDirMutex.RUnlock()
	argsForCall := fake.setDirArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeCommand) SetEnv(arg1 []string) {
	var arg1Copy []string
	if arg1 != nil {
		arg1Copy = make([]string, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.setEnvMutex.Lock()
	fake.setEnvArgsForCall = append(fake.setEnvArgsForCall, struct {
		arg1 []string
	}{arg1Copy})
	stub := fake.SetEnvStub
	fake.recordInvocation("SetEnv", []interface{}{arg1Copy})
	fake.setEnvMutex.Unlock()
	if stub != nil {
		fake.SetEnvStub(arg1)
	}
}

func (fake *FakeCommand) SetEnvCallCount() int {
	fake.setEnvMutex.RLock()
	defer fake.setEnvMutex.RUnlock()
	return len(fake.setEnvArgsForCall)
}

func (fake *FakeCommand) SetEnvCalls(stub func([]string)) {
	fake.setEnvMutex.Lock()
	defer fake.setEnvMutex.Unlock()
	fake.SetEnvStub = stub
}

func (fake *FakeCommand) SetEnvArgsForCall(i int) []string {
	fake.setEnvMutex.RLock()
	defer fake.setEnvMutex.RUnlock()
	argsForCall := fake.setEnvArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeCommand) SetStderr(arg1 interface{}) {
	fake.setStderrMutex.Lock()
	fake.setStderrArgsForCall = append(fake.setStderrArgsForCall, struct {
		arg1 interface{}
	}{arg1})
	stub := fake.SetStderrStub
	fake.recordInvocation("SetStderr", []interface{}{arg1})
	fake.setStderrMutex.Unlock()
	if stub != nil {
		fake.SetStderrStub(arg1)
	}
}

func (fake *FakeCommand) SetStderrCallCount() int {
	fake.setStderrMutex.RLock()
	defer fake.setStderrMutex.RUnlock()
	return len(fake.setStderrArgsForCall)
}

func (fake *FakeCommand) SetStderrCalls(stub func(interface{})) {
	fake.setStderrMutex.Lock()
	defer fake.setStderrMutex.Unlock()
	fake.SetStderrStub = stub
}

func (fake *FakeCommand) SetStderrArgsForCall(i int) interface{} {
	fake.setStderrMutex.RLock()
	defer fake.setStderrMutex.RUnlock()
	argsForCall := fake.setStderrArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeCommand) SetStdin(arg1 interface{}) {
	fake.setStdinMutex.Lock()
	fake.setStdinArgsForCall = append(fake.setStdinArgsForCall, struct {
		arg1 interface{}
	}{arg1})
	stub := fake.SetStdinStub
	fake.recordInvocation("SetStdin", []interface{}{arg1})
	fake.setStdinMutex.Unlock()
	if stub != nil {
		fake.SetStdinStub(arg1)
	}
}

func (fake *FakeCommand) SetStdinCallCount() int {
	fake.setStdinMutex.RLock()
	defer fake.setStdinMutex.RUnlock()
	return len(fake.setStdinArgsForCall)
}

func (fake *FakeCommand) SetStdinCalls(stub func(interface{})) {
	fake.setStdinMutex.Lock()
	defer fake.setStdinMutex.Unlock()
	fake.SetStdinStub = stub
}

func (fake *FakeCommand) SetStdinArgsForCall(i int) interface{} {
	fake.setStdinMutex.RLock()
	defer fake.setStdinMutex.RUnlock()
	argsForCall := fake.setStdinArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeCommand) SetStdout(arg1 interface{}) {
	fake.setStdoutMutex.Lock()
	fake.setStdoutArgsForCall = append(fake.setStdoutArgsForCall, struct {
		arg1 interface{}
	}{arg1})
	stub := fake.SetStdoutStub
	fake.recordInvocation("SetStdout", []interface{}{arg1})
	fake.setStdoutMutex.Unlock()
	if stub != nil {
		fake.SetStdoutStub(arg1)
	}
}

func (fake *FakeCommand) SetStdoutCallCount() int {
	fake.setStdoutMutex.RLock()
	defer fake.setStdoutMutex.RUnlock()
	return len(fake.setStdoutArgsForCall)
}

func (fake *FakeCommand) SetStdoutCalls(stub func(interface{})) {
	fake.setStdoutMutex.Lock()
	defer fake.setStdoutMutex.Unlock()
	fake.SetStdoutStub = stub
}

func (fake *FakeCommand) SetStdoutArgsForCall(i int) interface{} {
	fake.setStdoutMutex.RLock()
	defer fake.setStdoutMutex.RUnlock()
	argsForCall := fake.setStdoutArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeCommand) SetSysProcAttr(arg1 *syscall.SysProcAttr) {
	fake.setSysProcAttrMutex.Lock()
	fake.setSysProcAttrArgsForCall = append(fake.setSysProcAttrArgsForCall, struct {
		arg1 *syscall.SysProcAttr
	}{arg1})
	stub := fake.SetSysProcAttrStub
	fake.recordInvocation("SetSysProcAttr", []interface{}{arg1})
	fake.setSysProcAttrMutex.Unlock()
	if stub != nil {
		fake.SetSysProcAttrStub(arg1)
	}
}

func (fake *FakeCommand) SetSysProcAttrCallCount() int {
	fake.setSysProcAttrMutex.RLock()
	defer fake.setSysProcAttrMutex.RUnlock()
	return len(fake.setSysProcAttrArgsForCall)
}

func (fake *FakeCommand) SetSysProcAttrCalls(stub func(*syscall.SysProcAttr)) {
	fake.setSysProcAttrMutex.Lock()
	defer fake.setSysProcAttrMutex.Unlock()
	fake.SetSysProcAttrStub = stub
}

func (fake *FakeCommand) SetSysProcAttrArgsForCall(i int) *syscall.SysProcAttr {
	fake.setSysProcAttrMutex.RLock()
	defer fake.setSysProcAttrMutex.RUnlock()
	argsForCall := fake.setSysProcAttrArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeCommand) Start() error {
	fake.startMutex.Lock()
	ret, specificReturn := fake.startReturnsOnCall[len(fake.startArgsForCall)]
	fake.startArgsForCall = append(fake.startArgsForCall, struct {
	}{})
	stub := fake.StartStub
	fakeReturns := fake.startReturns
	fake.recordInvocation("Start", []interface{}{})
	fake.startMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeCommand) StartCallCount() int {
	fake.startMutex.RLock()
	defer fake.startMutex.RUnlock()
	return len(fake.startArgsForCall)
}

func (fake *FakeCommand) StartCalls(stub func() error) {
	fake.startMutex.Lock()
	defer fake.startMutex.Unlock()
	fake.StartStub = stub
}

func (fake *FakeCommand) StartReturns(result1 error) {
	fake.startMutex.Lock()
	defer fake.startMutex.Unlock()
	fake.StartStub = nil
	fake.startReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeCommand) StartReturnsOnCall(i int, result1 error) {
	fake.startMutex.Lock()
	defer fake.startMutex.Unlock()
	fake.StartStub = nil
	if fake.startReturnsOnCall == nil {
		fake.startReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.startReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeCommand) Wait() error {
	fake.waitMutex.Lock()
	ret, specificReturn := fake.waitReturnsOnCall[len(fake.waitArgsForCall)]
	fake.waitArgsForCall = append(fake.waitArgsForCall, struct {
	}{})
	stub := fake.WaitStub
	fakeReturns := fake.waitReturns
	fake.recordInvocation("Wait", []interface{}{})
	fake.waitMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeCommand) WaitCallCount() int {
	fake.waitMutex.RLock()
	defer fake.waitMutex.RUnlock()
	return len(fake.waitArgsForCall)
}

func (fake *FakeCommand) WaitCalls(stub func() error) {
	fake.waitMutex.Lock()
	defer fake.waitMutex.Unlock()
	fake.WaitStub = stub
}

func (fake *FakeCommand) WaitReturns(result1 error) {
	fake.waitMutex.Lock()
	defer fake.waitMutex.Unlock()
	fake.WaitStub = nil
	fake.waitReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeCommand) WaitReturnsOnCall(i int, result1 error) {
	fake.waitMutex.Lock()
	defer fake.waitMutex.Unlock()
	fake.WaitStub = nil
	if fake.waitReturnsOnCall == nil {
		fake.waitReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.waitReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeCommand) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeCommand) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ platform.Command = new(FakeCommand)
