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

import (
	"sync"

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

type FakeExecOperations struct {
	LookPathStub        func(string) (string, error)
	lookPathMutex       sync.RWMutex
	lookPathArgsForCall []struct {
		arg1 string
	}
	lookPathReturns struct {
		result1 string
		result2 error
	}
	lookPathReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeExecOperations) LookPath(arg1 string) (string, error) {
	fake.lookPathMutex.Lock()
	ret, specificReturn := fake.lookPathReturnsOnCall[len(fake.lookPathArgsForCall)]
	fake.lookPathArgsForCall = append(fake.lookPathArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.LookPathStub
	fakeReturns := fake.lookPathReturns
	fake.recordInvocation("LookPath", []interface{}{arg1})
	fake.lookPathMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeExecOperations) LookPathCallCount() int {
	fake.lookPathMutex.RLock()
	defer fake.lookPathMutex.RUnlock()
	return len(fake.lookPathArgsForCall)
}

func (fake *FakeExecOperations) LookPathCalls(stub func(string) (string, error)) {
	fake.lookPathMutex.Lock()
	defer fake.lookPathMutex.Unlock()
	fake.LookPathStub = stub
}

func (fake *FakeExecOperations) LookPathArgsForCall(i int) string {
	fake.lookPathMutex.RLock()
	defer fake.lookPathMutex.RUnlock()
	argsForCall := fake.lookPathArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeExecOperations) LookPathReturns(result1 string, result2 error) {
	fake.lookPathMutex.Lock()
	defer fake.lookPathMutex.Unlock()
	fake.LookPathStub = nil
	fake.lookPathReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeExecOperations) LookPathReturnsOnCall(i int, result1 string, result2 error) {
	fake.lookPathMutex.Lock()
	defer fake.lookPathMutex.Unlock()
	fake.LookPathStub = nil
	if fake.lookPathReturnsOnCall == nil {
		fake.lookPathReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.lookPathReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeExecOperations) 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 *FakeExecOperations) 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.ExecOperations = new(FakeExecOperations)
