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

import (
	"sync"

	"github.com/hyperledger/fabric-protos-go/common"
)

type ClusterConsenter struct {
	IsChannelMemberStub        func(*common.Block) (bool, error)
	isChannelMemberMutex       sync.RWMutex
	isChannelMemberArgsForCall []struct {
		arg1 *common.Block
	}
	isChannelMemberReturns struct {
		result1 bool
		result2 error
	}
	isChannelMemberReturnsOnCall map[int]struct {
		result1 bool
		result2 error
	}
	RemoveInactiveChainRegistryStub        func()
	removeInactiveChainRegistryMutex       sync.RWMutex
	removeInactiveChainRegistryArgsForCall []struct {
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *ClusterConsenter) IsChannelMember(arg1 *common.Block) (bool, error) {
	fake.isChannelMemberMutex.Lock()
	ret, specificReturn := fake.isChannelMemberReturnsOnCall[len(fake.isChannelMemberArgsForCall)]
	fake.isChannelMemberArgsForCall = append(fake.isChannelMemberArgsForCall, struct {
		arg1 *common.Block
	}{arg1})
	fake.recordInvocation("IsChannelMember", []interface{}{arg1})
	fake.isChannelMemberMutex.Unlock()
	if fake.IsChannelMemberStub != nil {
		return fake.IsChannelMemberStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.isChannelMemberReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *ClusterConsenter) IsChannelMemberCallCount() int {
	fake.isChannelMemberMutex.RLock()
	defer fake.isChannelMemberMutex.RUnlock()
	return len(fake.isChannelMemberArgsForCall)
}

func (fake *ClusterConsenter) IsChannelMemberCalls(stub func(*common.Block) (bool, error)) {
	fake.isChannelMemberMutex.Lock()
	defer fake.isChannelMemberMutex.Unlock()
	fake.IsChannelMemberStub = stub
}

func (fake *ClusterConsenter) IsChannelMemberArgsForCall(i int) *common.Block {
	fake.isChannelMemberMutex.RLock()
	defer fake.isChannelMemberMutex.RUnlock()
	argsForCall := fake.isChannelMemberArgsForCall[i]
	return argsForCall.arg1
}

func (fake *ClusterConsenter) IsChannelMemberReturns(result1 bool, result2 error) {
	fake.isChannelMemberMutex.Lock()
	defer fake.isChannelMemberMutex.Unlock()
	fake.IsChannelMemberStub = nil
	fake.isChannelMemberReturns = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *ClusterConsenter) IsChannelMemberReturnsOnCall(i int, result1 bool, result2 error) {
	fake.isChannelMemberMutex.Lock()
	defer fake.isChannelMemberMutex.Unlock()
	fake.IsChannelMemberStub = nil
	if fake.isChannelMemberReturnsOnCall == nil {
		fake.isChannelMemberReturnsOnCall = make(map[int]struct {
			result1 bool
			result2 error
		})
	}
	fake.isChannelMemberReturnsOnCall[i] = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *ClusterConsenter) RemoveInactiveChainRegistry() {
	fake.removeInactiveChainRegistryMutex.Lock()
	fake.removeInactiveChainRegistryArgsForCall = append(fake.removeInactiveChainRegistryArgsForCall, struct {
	}{})
	fake.recordInvocation("RemoveInactiveChainRegistry", []interface{}{})
	fake.removeInactiveChainRegistryMutex.Unlock()
	if fake.RemoveInactiveChainRegistryStub != nil {
		fake.RemoveInactiveChainRegistryStub()
	}
}

func (fake *ClusterConsenter) RemoveInactiveChainRegistryCallCount() int {
	fake.removeInactiveChainRegistryMutex.RLock()
	defer fake.removeInactiveChainRegistryMutex.RUnlock()
	return len(fake.removeInactiveChainRegistryArgsForCall)
}

func (fake *ClusterConsenter) RemoveInactiveChainRegistryCalls(stub func()) {
	fake.removeInactiveChainRegistryMutex.Lock()
	defer fake.removeInactiveChainRegistryMutex.Unlock()
	fake.RemoveInactiveChainRegistryStub = stub
}

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

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