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

import (
	"sync"

	"github.com/cloudfoundry/bosh-agent/platform/net"
)

type FakeMACAddressDetector struct {
	DetectMacAddressesStub        func() (map[string]string, error)
	detectMacAddressesMutex       sync.RWMutex
	detectMacAddressesArgsForCall []struct {
	}
	detectMacAddressesReturns struct {
		result1 map[string]string
		result2 error
	}
	detectMacAddressesReturnsOnCall map[int]struct {
		result1 map[string]string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeMACAddressDetector) DetectMacAddresses() (map[string]string, error) {
	fake.detectMacAddressesMutex.Lock()
	ret, specificReturn := fake.detectMacAddressesReturnsOnCall[len(fake.detectMacAddressesArgsForCall)]
	fake.detectMacAddressesArgsForCall = append(fake.detectMacAddressesArgsForCall, struct {
	}{})
	fake.recordInvocation("DetectMacAddresses", []interface{}{})
	fake.detectMacAddressesMutex.Unlock()
	if fake.DetectMacAddressesStub != nil {
		return fake.DetectMacAddressesStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.detectMacAddressesReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeMACAddressDetector) DetectMacAddressesCallCount() int {
	fake.detectMacAddressesMutex.RLock()
	defer fake.detectMacAddressesMutex.RUnlock()
	return len(fake.detectMacAddressesArgsForCall)
}

func (fake *FakeMACAddressDetector) DetectMacAddressesCalls(stub func() (map[string]string, error)) {
	fake.detectMacAddressesMutex.Lock()
	defer fake.detectMacAddressesMutex.Unlock()
	fake.DetectMacAddressesStub = stub
}

func (fake *FakeMACAddressDetector) DetectMacAddressesReturns(result1 map[string]string, result2 error) {
	fake.detectMacAddressesMutex.Lock()
	defer fake.detectMacAddressesMutex.Unlock()
	fake.DetectMacAddressesStub = nil
	fake.detectMacAddressesReturns = struct {
		result1 map[string]string
		result2 error
	}{result1, result2}
}

func (fake *FakeMACAddressDetector) DetectMacAddressesReturnsOnCall(i int, result1 map[string]string, result2 error) {
	fake.detectMacAddressesMutex.Lock()
	defer fake.detectMacAddressesMutex.Unlock()
	fake.DetectMacAddressesStub = nil
	if fake.detectMacAddressesReturnsOnCall == nil {
		fake.detectMacAddressesReturnsOnCall = make(map[int]struct {
			result1 map[string]string
			result2 error
		})
	}
	fake.detectMacAddressesReturnsOnCall[i] = struct {
		result1 map[string]string
		result2 error
	}{result1, result2}
}

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

func (fake *FakeMACAddressDetector) 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 _ net.MACAddressDetector = new(FakeMACAddressDetector)
