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

import (
	"sync"

	"code.cloudfoundry.org/diego-ssh/handlers"
)

type FakeShellLocator struct {
	ShellPathStub        func() string
	shellPathMutex       sync.RWMutex
	shellPathArgsForCall []struct {
	}
	shellPathReturns struct {
		result1 string
	}
	shellPathReturnsOnCall map[int]struct {
		result1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeShellLocator) ShellPath() string {
	fake.shellPathMutex.Lock()
	ret, specificReturn := fake.shellPathReturnsOnCall[len(fake.shellPathArgsForCall)]
	fake.shellPathArgsForCall = append(fake.shellPathArgsForCall, struct {
	}{})
	fake.recordInvocation("ShellPath", []interface{}{})
	shellPathStubCopy := fake.ShellPathStub
	fake.shellPathMutex.Unlock()
	if shellPathStubCopy != nil {
		return shellPathStubCopy()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.shellPathReturns
	return fakeReturns.result1
}

func (fake *FakeShellLocator) ShellPathCallCount() int {
	fake.shellPathMutex.RLock()
	defer fake.shellPathMutex.RUnlock()
	return len(fake.shellPathArgsForCall)
}

func (fake *FakeShellLocator) ShellPathCalls(stub func() string) {
	fake.shellPathMutex.Lock()
	defer fake.shellPathMutex.Unlock()
	fake.ShellPathStub = stub
}

func (fake *FakeShellLocator) ShellPathReturns(result1 string) {
	fake.shellPathMutex.Lock()
	defer fake.shellPathMutex.Unlock()
	fake.ShellPathStub = nil
	fake.shellPathReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeShellLocator) ShellPathReturnsOnCall(i int, result1 string) {
	fake.shellPathMutex.Lock()
	defer fake.shellPathMutex.Unlock()
	fake.ShellPathStub = nil
	if fake.shellPathReturnsOnCall == nil {
		fake.shellPathReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.shellPathReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

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

func (fake *FakeShellLocator) 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 _ handlers.ShellLocator = new(FakeShellLocator)
