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

import (
	"sync"

	"github.com/orange-cloudfoundry/terraform-provider-cloudfoundry/bitsmanager"
)

type FakeHandler struct {
	GetZipFileStub        func(path string) (fileHandler bitsmanager.FileHandler, err error)
	getZipFileMutex       sync.RWMutex
	getZipFileArgsForCall []struct {
		path string
	}
	getZipFileReturns struct {
		result1 bitsmanager.FileHandler
		result2 error
	}
	getZipFileReturnsOnCall map[int]struct {
		result1 bitsmanager.FileHandler
		result2 error
	}
	GetSha1FileStub        func(path string) (sha1 string, err error)
	getSha1FileMutex       sync.RWMutex
	getSha1FileArgsForCall []struct {
		path string
	}
	getSha1FileReturns struct {
		result1 string
		result2 error
	}
	getSha1FileReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	DetectStub        func(path string) bool
	detectMutex       sync.RWMutex
	detectArgsForCall []struct {
		path string
	}
	detectReturns struct {
		result1 bool
	}
	detectReturnsOnCall map[int]struct {
		result1 bool
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeHandler) GetZipFile(path string) (fileHandler bitsmanager.FileHandler, err error) {
	fake.getZipFileMutex.Lock()
	ret, specificReturn := fake.getZipFileReturnsOnCall[len(fake.getZipFileArgsForCall)]
	fake.getZipFileArgsForCall = append(fake.getZipFileArgsForCall, struct {
		path string
	}{path})
	fake.recordInvocation("GetZipFile", []interface{}{path})
	fake.getZipFileMutex.Unlock()
	if fake.GetZipFileStub != nil {
		return fake.GetZipFileStub(path)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.getZipFileReturns.result1, fake.getZipFileReturns.result2
}

func (fake *FakeHandler) GetZipFileCallCount() int {
	fake.getZipFileMutex.RLock()
	defer fake.getZipFileMutex.RUnlock()
	return len(fake.getZipFileArgsForCall)
}

func (fake *FakeHandler) GetZipFileArgsForCall(i int) string {
	fake.getZipFileMutex.RLock()
	defer fake.getZipFileMutex.RUnlock()
	return fake.getZipFileArgsForCall[i].path
}

func (fake *FakeHandler) GetZipFileReturns(result1 bitsmanager.FileHandler, result2 error) {
	fake.GetZipFileStub = nil
	fake.getZipFileReturns = struct {
		result1 bitsmanager.FileHandler
		result2 error
	}{result1, result2}
}

func (fake *FakeHandler) GetZipFileReturnsOnCall(i int, result1 bitsmanager.FileHandler, result2 error) {
	fake.GetZipFileStub = nil
	if fake.getZipFileReturnsOnCall == nil {
		fake.getZipFileReturnsOnCall = make(map[int]struct {
			result1 bitsmanager.FileHandler
			result2 error
		})
	}
	fake.getZipFileReturnsOnCall[i] = struct {
		result1 bitsmanager.FileHandler
		result2 error
	}{result1, result2}
}

func (fake *FakeHandler) GetSha1File(path string) (sha1 string, err error) {
	fake.getSha1FileMutex.Lock()
	ret, specificReturn := fake.getSha1FileReturnsOnCall[len(fake.getSha1FileArgsForCall)]
	fake.getSha1FileArgsForCall = append(fake.getSha1FileArgsForCall, struct {
		path string
	}{path})
	fake.recordInvocation("GetSha1File", []interface{}{path})
	fake.getSha1FileMutex.Unlock()
	if fake.GetSha1FileStub != nil {
		return fake.GetSha1FileStub(path)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.getSha1FileReturns.result1, fake.getSha1FileReturns.result2
}

func (fake *FakeHandler) GetSha1FileCallCount() int {
	fake.getSha1FileMutex.RLock()
	defer fake.getSha1FileMutex.RUnlock()
	return len(fake.getSha1FileArgsForCall)
}

func (fake *FakeHandler) GetSha1FileArgsForCall(i int) string {
	fake.getSha1FileMutex.RLock()
	defer fake.getSha1FileMutex.RUnlock()
	return fake.getSha1FileArgsForCall[i].path
}

func (fake *FakeHandler) GetSha1FileReturns(result1 string, result2 error) {
	fake.GetSha1FileStub = nil
	fake.getSha1FileReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeHandler) GetSha1FileReturnsOnCall(i int, result1 string, result2 error) {
	fake.GetSha1FileStub = nil
	if fake.getSha1FileReturnsOnCall == nil {
		fake.getSha1FileReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.getSha1FileReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeHandler) Detect(path string) bool {
	fake.detectMutex.Lock()
	ret, specificReturn := fake.detectReturnsOnCall[len(fake.detectArgsForCall)]
	fake.detectArgsForCall = append(fake.detectArgsForCall, struct {
		path string
	}{path})
	fake.recordInvocation("Detect", []interface{}{path})
	fake.detectMutex.Unlock()
	if fake.DetectStub != nil {
		return fake.DetectStub(path)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.detectReturns.result1
}

func (fake *FakeHandler) DetectCallCount() int {
	fake.detectMutex.RLock()
	defer fake.detectMutex.RUnlock()
	return len(fake.detectArgsForCall)
}

func (fake *FakeHandler) DetectArgsForCall(i int) string {
	fake.detectMutex.RLock()
	defer fake.detectMutex.RUnlock()
	return fake.detectArgsForCall[i].path
}

func (fake *FakeHandler) DetectReturns(result1 bool) {
	fake.DetectStub = nil
	fake.detectReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeHandler) DetectReturnsOnCall(i int, result1 bool) {
	fake.DetectStub = nil
	if fake.detectReturnsOnCall == nil {
		fake.detectReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.detectReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

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

func (fake *FakeHandler) 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 _ bitsmanager.Handler = new(FakeHandler)
