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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/api/copyapplicationsource"
)

type FakeRepository struct {
	CopyApplicationStub        func(string, string) error
	copyApplicationMutex       sync.RWMutex
	copyApplicationArgsForCall []struct {
		arg1 string
		arg2 string
	}
	copyApplicationReturns struct {
		result1 error
	}
	copyApplicationReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeRepository) CopyApplication(arg1 string, arg2 string) error {
	fake.copyApplicationMutex.Lock()
	ret, specificReturn := fake.copyApplicationReturnsOnCall[len(fake.copyApplicationArgsForCall)]
	fake.copyApplicationArgsForCall = append(fake.copyApplicationArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("CopyApplication", []interface{}{arg1, arg2})
	fake.copyApplicationMutex.Unlock()
	if fake.CopyApplicationStub != nil {
		return fake.CopyApplicationStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.copyApplicationReturns
	return fakeReturns.result1
}

func (fake *FakeRepository) CopyApplicationCallCount() int {
	fake.copyApplicationMutex.RLock()
	defer fake.copyApplicationMutex.RUnlock()
	return len(fake.copyApplicationArgsForCall)
}

func (fake *FakeRepository) CopyApplicationCalls(stub func(string, string) error) {
	fake.copyApplicationMutex.Lock()
	defer fake.copyApplicationMutex.Unlock()
	fake.CopyApplicationStub = stub
}

func (fake *FakeRepository) CopyApplicationArgsForCall(i int) (string, string) {
	fake.copyApplicationMutex.RLock()
	defer fake.copyApplicationMutex.RUnlock()
	argsForCall := fake.copyApplicationArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeRepository) CopyApplicationReturns(result1 error) {
	fake.copyApplicationMutex.Lock()
	defer fake.copyApplicationMutex.Unlock()
	fake.CopyApplicationStub = nil
	fake.copyApplicationReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeRepository) CopyApplicationReturnsOnCall(i int, result1 error) {
	fake.copyApplicationMutex.Lock()
	defer fake.copyApplicationMutex.Unlock()
	fake.CopyApplicationStub = nil
	if fake.copyApplicationReturnsOnCall == nil {
		fake.copyApplicationReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.copyApplicationReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeRepository) 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 _ copyapplicationsource.Repository = new(FakeRepository)
