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

import (
	"sync"

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

type FakeTranslatableError struct {
	ErrorStub        func() string
	errorMutex       sync.RWMutex
	errorArgsForCall []struct {
	}
	errorReturns struct {
		result1 string
	}
	errorReturnsOnCall map[int]struct {
		result1 string
	}
	TranslateStub        func(func(string, ...interface{}) string) string
	translateMutex       sync.RWMutex
	translateArgsForCall []struct {
		arg1 func(string, ...interface{}) string
	}
	translateReturns struct {
		result1 string
	}
	translateReturnsOnCall map[int]struct {
		result1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeTranslatableError) Error() string {
	fake.errorMutex.Lock()
	ret, specificReturn := fake.errorReturnsOnCall[len(fake.errorArgsForCall)]
	fake.errorArgsForCall = append(fake.errorArgsForCall, struct {
	}{})
	fake.recordInvocation("Error", []interface{}{})
	fake.errorMutex.Unlock()
	if fake.ErrorStub != nil {
		return fake.ErrorStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.errorReturns
	return fakeReturns.result1
}

func (fake *FakeTranslatableError) ErrorCallCount() int {
	fake.errorMutex.RLock()
	defer fake.errorMutex.RUnlock()
	return len(fake.errorArgsForCall)
}

func (fake *FakeTranslatableError) ErrorCalls(stub func() string) {
	fake.errorMutex.Lock()
	defer fake.errorMutex.Unlock()
	fake.ErrorStub = stub
}

func (fake *FakeTranslatableError) ErrorReturns(result1 string) {
	fake.errorMutex.Lock()
	defer fake.errorMutex.Unlock()
	fake.ErrorStub = nil
	fake.errorReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeTranslatableError) ErrorReturnsOnCall(i int, result1 string) {
	fake.errorMutex.Lock()
	defer fake.errorMutex.Unlock()
	fake.ErrorStub = nil
	if fake.errorReturnsOnCall == nil {
		fake.errorReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.errorReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeTranslatableError) Translate(arg1 func(string, ...interface{}) string) string {
	fake.translateMutex.Lock()
	ret, specificReturn := fake.translateReturnsOnCall[len(fake.translateArgsForCall)]
	fake.translateArgsForCall = append(fake.translateArgsForCall, struct {
		arg1 func(string, ...interface{}) string
	}{arg1})
	fake.recordInvocation("Translate", []interface{}{arg1})
	fake.translateMutex.Unlock()
	if fake.TranslateStub != nil {
		return fake.TranslateStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.translateReturns
	return fakeReturns.result1
}

func (fake *FakeTranslatableError) TranslateCallCount() int {
	fake.translateMutex.RLock()
	defer fake.translateMutex.RUnlock()
	return len(fake.translateArgsForCall)
}

func (fake *FakeTranslatableError) TranslateCalls(stub func(func(string, ...interface{}) string) string) {
	fake.translateMutex.Lock()
	defer fake.translateMutex.Unlock()
	fake.TranslateStub = stub
}

func (fake *FakeTranslatableError) TranslateArgsForCall(i int) func(string, ...interface{}) string {
	fake.translateMutex.RLock()
	defer fake.translateMutex.RUnlock()
	argsForCall := fake.translateArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeTranslatableError) TranslateReturns(result1 string) {
	fake.translateMutex.Lock()
	defer fake.translateMutex.Unlock()
	fake.TranslateStub = nil
	fake.translateReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeTranslatableError) TranslateReturnsOnCall(i int, result1 string) {
	fake.translateMutex.Lock()
	defer fake.translateMutex.Unlock()
	fake.TranslateStub = nil
	if fake.translateReturnsOnCall == nil {
		fake.translateReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.translateReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

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

func (fake *FakeTranslatableError) 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 _ translatableerror.TranslatableError = new(FakeTranslatableError)
