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

import (
	"sync"
)

type ChainNamer struct {
	PrefixStub        func(prefix, body string) string
	prefixMutex       sync.RWMutex
	prefixArgsForCall []struct {
		prefix string
		body   string
	}
	prefixReturns struct {
		result1 string
	}
	prefixReturnsOnCall map[int]struct {
		result1 string
	}
	PostfixStub        func(body, suffix string) (string, error)
	postfixMutex       sync.RWMutex
	postfixArgsForCall []struct {
		body   string
		suffix string
	}
	postfixReturns struct {
		result1 string
		result2 error
	}
	postfixReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *ChainNamer) Prefix(prefix string, body string) string {
	fake.prefixMutex.Lock()
	ret, specificReturn := fake.prefixReturnsOnCall[len(fake.prefixArgsForCall)]
	fake.prefixArgsForCall = append(fake.prefixArgsForCall, struct {
		prefix string
		body   string
	}{prefix, body})
	fake.recordInvocation("Prefix", []interface{}{prefix, body})
	fake.prefixMutex.Unlock()
	if fake.PrefixStub != nil {
		return fake.PrefixStub(prefix, body)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.prefixReturns.result1
}

func (fake *ChainNamer) PrefixCallCount() int {
	fake.prefixMutex.RLock()
	defer fake.prefixMutex.RUnlock()
	return len(fake.prefixArgsForCall)
}

func (fake *ChainNamer) PrefixArgsForCall(i int) (string, string) {
	fake.prefixMutex.RLock()
	defer fake.prefixMutex.RUnlock()
	return fake.prefixArgsForCall[i].prefix, fake.prefixArgsForCall[i].body
}

func (fake *ChainNamer) PrefixReturns(result1 string) {
	fake.PrefixStub = nil
	fake.prefixReturns = struct {
		result1 string
	}{result1}
}

func (fake *ChainNamer) PrefixReturnsOnCall(i int, result1 string) {
	fake.PrefixStub = nil
	if fake.prefixReturnsOnCall == nil {
		fake.prefixReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.prefixReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *ChainNamer) Postfix(body string, suffix string) (string, error) {
	fake.postfixMutex.Lock()
	ret, specificReturn := fake.postfixReturnsOnCall[len(fake.postfixArgsForCall)]
	fake.postfixArgsForCall = append(fake.postfixArgsForCall, struct {
		body   string
		suffix string
	}{body, suffix})
	fake.recordInvocation("Postfix", []interface{}{body, suffix})
	fake.postfixMutex.Unlock()
	if fake.PostfixStub != nil {
		return fake.PostfixStub(body, suffix)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.postfixReturns.result1, fake.postfixReturns.result2
}

func (fake *ChainNamer) PostfixCallCount() int {
	fake.postfixMutex.RLock()
	defer fake.postfixMutex.RUnlock()
	return len(fake.postfixArgsForCall)
}

func (fake *ChainNamer) PostfixArgsForCall(i int) (string, string) {
	fake.postfixMutex.RLock()
	defer fake.postfixMutex.RUnlock()
	return fake.postfixArgsForCall[i].body, fake.postfixArgsForCall[i].suffix
}

func (fake *ChainNamer) PostfixReturns(result1 string, result2 error) {
	fake.PostfixStub = nil
	fake.postfixReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *ChainNamer) PostfixReturnsOnCall(i int, result1 string, result2 error) {
	fake.PostfixStub = nil
	if fake.postfixReturnsOnCall == nil {
		fake.postfixReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.postfixReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *ChainNamer) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.prefixMutex.RLock()
	defer fake.prefixMutex.RUnlock()
	fake.postfixMutex.RLock()
	defer fake.postfixMutex.RUnlock()
	return fake.invocations
}

func (fake *ChainNamer) 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)
}
