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

import (
	"sync"

	"code.cloudfoundry.org/eirini/bifrost"
)

type FakeTaskNamespacer struct {
	GetNamespaceStub        func(string) string
	getNamespaceMutex       sync.RWMutex
	getNamespaceArgsForCall []struct {
		arg1 string
	}
	getNamespaceReturns struct {
		result1 string
	}
	getNamespaceReturnsOnCall map[int]struct {
		result1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeTaskNamespacer) GetNamespace(arg1 string) string {
	fake.getNamespaceMutex.Lock()
	ret, specificReturn := fake.getNamespaceReturnsOnCall[len(fake.getNamespaceArgsForCall)]
	fake.getNamespaceArgsForCall = append(fake.getNamespaceArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.GetNamespaceStub
	fakeReturns := fake.getNamespaceReturns
	fake.recordInvocation("GetNamespace", []interface{}{arg1})
	fake.getNamespaceMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeTaskNamespacer) GetNamespaceCallCount() int {
	fake.getNamespaceMutex.RLock()
	defer fake.getNamespaceMutex.RUnlock()
	return len(fake.getNamespaceArgsForCall)
}

func (fake *FakeTaskNamespacer) GetNamespaceCalls(stub func(string) string) {
	fake.getNamespaceMutex.Lock()
	defer fake.getNamespaceMutex.Unlock()
	fake.GetNamespaceStub = stub
}

func (fake *FakeTaskNamespacer) GetNamespaceArgsForCall(i int) string {
	fake.getNamespaceMutex.RLock()
	defer fake.getNamespaceMutex.RUnlock()
	argsForCall := fake.getNamespaceArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeTaskNamespacer) GetNamespaceReturns(result1 string) {
	fake.getNamespaceMutex.Lock()
	defer fake.getNamespaceMutex.Unlock()
	fake.GetNamespaceStub = nil
	fake.getNamespaceReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeTaskNamespacer) GetNamespaceReturnsOnCall(i int, result1 string) {
	fake.getNamespaceMutex.Lock()
	defer fake.getNamespaceMutex.Unlock()
	fake.GetNamespaceStub = nil
	if fake.getNamespaceReturnsOnCall == nil {
		fake.getNamespaceReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.getNamespaceReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

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

func (fake *FakeTaskNamespacer) 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 _ bifrost.TaskNamespacer = new(FakeTaskNamespacer)
