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

import (
	"sync"

	"code.cloudfoundry.org/service-discovery-controller/routes"
)

type DNSRequestRecorder struct {
	RecordRequestStub        func()
	recordRequestMutex       sync.RWMutex
	recordRequestArgsForCall []struct {
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *DNSRequestRecorder) RecordRequest() {
	fake.recordRequestMutex.Lock()
	fake.recordRequestArgsForCall = append(fake.recordRequestArgsForCall, struct {
	}{})
	stub := fake.RecordRequestStub
	fake.recordInvocation("RecordRequest", []interface{}{})
	fake.recordRequestMutex.Unlock()
	if stub != nil {
		fake.RecordRequestStub()
	}
}

func (fake *DNSRequestRecorder) RecordRequestCallCount() int {
	fake.recordRequestMutex.RLock()
	defer fake.recordRequestMutex.RUnlock()
	return len(fake.recordRequestArgsForCall)
}

func (fake *DNSRequestRecorder) RecordRequestCalls(stub func()) {
	fake.recordRequestMutex.Lock()
	defer fake.recordRequestMutex.Unlock()
	fake.RecordRequestStub = stub
}

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

func (fake *DNSRequestRecorder) 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 _ routes.DNSRequestRecorder = new(DNSRequestRecorder)
