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

import (
	"sync"

	"code.cloudfoundry.org/cli/util"
)

type FakeSha1Checksum struct {
	CheckSha1Stub        func(string) bool
	checkSha1Mutex       sync.RWMutex
	checkSha1ArgsForCall []struct {
		arg1 string
	}
	checkSha1Returns struct {
		result1 bool
	}
	checkSha1ReturnsOnCall map[int]struct {
		result1 bool
	}
	ComputeFileSha1Stub        func() ([]byte, error)
	computeFileSha1Mutex       sync.RWMutex
	computeFileSha1ArgsForCall []struct {
	}
	computeFileSha1Returns struct {
		result1 []byte
		result2 error
	}
	computeFileSha1ReturnsOnCall map[int]struct {
		result1 []byte
		result2 error
	}
	SetFilePathStub        func(string)
	setFilePathMutex       sync.RWMutex
	setFilePathArgsForCall []struct {
		arg1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeSha1Checksum) CheckSha1(arg1 string) bool {
	fake.checkSha1Mutex.Lock()
	ret, specificReturn := fake.checkSha1ReturnsOnCall[len(fake.checkSha1ArgsForCall)]
	fake.checkSha1ArgsForCall = append(fake.checkSha1ArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("CheckSha1", []interface{}{arg1})
	fake.checkSha1Mutex.Unlock()
	if fake.CheckSha1Stub != nil {
		return fake.CheckSha1Stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.checkSha1Returns
	return fakeReturns.result1
}

func (fake *FakeSha1Checksum) CheckSha1CallCount() int {
	fake.checkSha1Mutex.RLock()
	defer fake.checkSha1Mutex.RUnlock()
	return len(fake.checkSha1ArgsForCall)
}

func (fake *FakeSha1Checksum) CheckSha1Calls(stub func(string) bool) {
	fake.checkSha1Mutex.Lock()
	defer fake.checkSha1Mutex.Unlock()
	fake.CheckSha1Stub = stub
}

func (fake *FakeSha1Checksum) CheckSha1ArgsForCall(i int) string {
	fake.checkSha1Mutex.RLock()
	defer fake.checkSha1Mutex.RUnlock()
	argsForCall := fake.checkSha1ArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeSha1Checksum) CheckSha1Returns(result1 bool) {
	fake.checkSha1Mutex.Lock()
	defer fake.checkSha1Mutex.Unlock()
	fake.CheckSha1Stub = nil
	fake.checkSha1Returns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSha1Checksum) CheckSha1ReturnsOnCall(i int, result1 bool) {
	fake.checkSha1Mutex.Lock()
	defer fake.checkSha1Mutex.Unlock()
	fake.CheckSha1Stub = nil
	if fake.checkSha1ReturnsOnCall == nil {
		fake.checkSha1ReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.checkSha1ReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSha1Checksum) ComputeFileSha1() ([]byte, error) {
	fake.computeFileSha1Mutex.Lock()
	ret, specificReturn := fake.computeFileSha1ReturnsOnCall[len(fake.computeFileSha1ArgsForCall)]
	fake.computeFileSha1ArgsForCall = append(fake.computeFileSha1ArgsForCall, struct {
	}{})
	fake.recordInvocation("ComputeFileSha1", []interface{}{})
	fake.computeFileSha1Mutex.Unlock()
	if fake.ComputeFileSha1Stub != nil {
		return fake.ComputeFileSha1Stub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.computeFileSha1Returns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeSha1Checksum) ComputeFileSha1CallCount() int {
	fake.computeFileSha1Mutex.RLock()
	defer fake.computeFileSha1Mutex.RUnlock()
	return len(fake.computeFileSha1ArgsForCall)
}

func (fake *FakeSha1Checksum) ComputeFileSha1Calls(stub func() ([]byte, error)) {
	fake.computeFileSha1Mutex.Lock()
	defer fake.computeFileSha1Mutex.Unlock()
	fake.ComputeFileSha1Stub = stub
}

func (fake *FakeSha1Checksum) ComputeFileSha1Returns(result1 []byte, result2 error) {
	fake.computeFileSha1Mutex.Lock()
	defer fake.computeFileSha1Mutex.Unlock()
	fake.ComputeFileSha1Stub = nil
	fake.computeFileSha1Returns = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeSha1Checksum) ComputeFileSha1ReturnsOnCall(i int, result1 []byte, result2 error) {
	fake.computeFileSha1Mutex.Lock()
	defer fake.computeFileSha1Mutex.Unlock()
	fake.ComputeFileSha1Stub = nil
	if fake.computeFileSha1ReturnsOnCall == nil {
		fake.computeFileSha1ReturnsOnCall = make(map[int]struct {
			result1 []byte
			result2 error
		})
	}
	fake.computeFileSha1ReturnsOnCall[i] = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeSha1Checksum) SetFilePath(arg1 string) {
	fake.setFilePathMutex.Lock()
	fake.setFilePathArgsForCall = append(fake.setFilePathArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("SetFilePath", []interface{}{arg1})
	fake.setFilePathMutex.Unlock()
	if fake.SetFilePathStub != nil {
		fake.SetFilePathStub(arg1)
	}
}

func (fake *FakeSha1Checksum) SetFilePathCallCount() int {
	fake.setFilePathMutex.RLock()
	defer fake.setFilePathMutex.RUnlock()
	return len(fake.setFilePathArgsForCall)
}

func (fake *FakeSha1Checksum) SetFilePathCalls(stub func(string)) {
	fake.setFilePathMutex.Lock()
	defer fake.setFilePathMutex.Unlock()
	fake.SetFilePathStub = stub
}

func (fake *FakeSha1Checksum) SetFilePathArgsForCall(i int) string {
	fake.setFilePathMutex.RLock()
	defer fake.setFilePathMutex.RUnlock()
	argsForCall := fake.setFilePathArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeSha1Checksum) 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 _ util.Sha1Checksum = new(FakeSha1Checksum)
