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

import (
	"sync"

	v7 "code.cloudfoundry.org/cli/command/v7"
)

type FakeManifestLocator struct {
	PathStub        func(string) (string, bool, error)
	pathMutex       sync.RWMutex
	pathArgsForCall []struct {
		arg1 string
	}
	pathReturns struct {
		result1 string
		result2 bool
		result3 error
	}
	pathReturnsOnCall map[int]struct {
		result1 string
		result2 bool
		result3 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeManifestLocator) Path(arg1 string) (string, bool, error) {
	fake.pathMutex.Lock()
	ret, specificReturn := fake.pathReturnsOnCall[len(fake.pathArgsForCall)]
	fake.pathArgsForCall = append(fake.pathArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.PathStub
	fakeReturns := fake.pathReturns
	fake.recordInvocation("Path", []interface{}{arg1})
	fake.pathMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2, ret.result3
	}
	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}

func (fake *FakeManifestLocator) PathCallCount() int {
	fake.pathMutex.RLock()
	defer fake.pathMutex.RUnlock()
	return len(fake.pathArgsForCall)
}

func (fake *FakeManifestLocator) PathCalls(stub func(string) (string, bool, error)) {
	fake.pathMutex.Lock()
	defer fake.pathMutex.Unlock()
	fake.PathStub = stub
}

func (fake *FakeManifestLocator) PathArgsForCall(i int) string {
	fake.pathMutex.RLock()
	defer fake.pathMutex.RUnlock()
	argsForCall := fake.pathArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeManifestLocator) PathReturns(result1 string, result2 bool, result3 error) {
	fake.pathMutex.Lock()
	defer fake.pathMutex.Unlock()
	fake.PathStub = nil
	fake.pathReturns = struct {
		result1 string
		result2 bool
		result3 error
	}{result1, result2, result3}
}

func (fake *FakeManifestLocator) PathReturnsOnCall(i int, result1 string, result2 bool, result3 error) {
	fake.pathMutex.Lock()
	defer fake.pathMutex.Unlock()
	fake.PathStub = nil
	if fake.pathReturnsOnCall == nil {
		fake.pathReturnsOnCall = make(map[int]struct {
			result1 string
			result2 bool
			result3 error
		})
	}
	fake.pathReturnsOnCall[i] = struct {
		result1 string
		result2 bool
		result3 error
	}{result1, result2, result3}
}

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

func (fake *FakeManifestLocator) 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 _ v7.ManifestLocator = new(FakeManifestLocator)
