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

import (
	"sync"

	"code.cloudfoundry.org/guardian/rundmc"
)

type FakeStateStore struct {
	IsStoppedStub        func(string) bool
	isStoppedMutex       sync.RWMutex
	isStoppedArgsForCall []struct {
		arg1 string
	}
	isStoppedReturns struct {
		result1 bool
	}
	isStoppedReturnsOnCall map[int]struct {
		result1 bool
	}
	StoreStoppedStub        func(string)
	storeStoppedMutex       sync.RWMutex
	storeStoppedArgsForCall []struct {
		arg1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeStateStore) IsStopped(arg1 string) bool {
	fake.isStoppedMutex.Lock()
	ret, specificReturn := fake.isStoppedReturnsOnCall[len(fake.isStoppedArgsForCall)]
	fake.isStoppedArgsForCall = append(fake.isStoppedArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.IsStoppedStub
	fakeReturns := fake.isStoppedReturns
	fake.recordInvocation("IsStopped", []interface{}{arg1})
	fake.isStoppedMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeStateStore) IsStoppedCallCount() int {
	fake.isStoppedMutex.RLock()
	defer fake.isStoppedMutex.RUnlock()
	return len(fake.isStoppedArgsForCall)
}

func (fake *FakeStateStore) IsStoppedCalls(stub func(string) bool) {
	fake.isStoppedMutex.Lock()
	defer fake.isStoppedMutex.Unlock()
	fake.IsStoppedStub = stub
}

func (fake *FakeStateStore) IsStoppedArgsForCall(i int) string {
	fake.isStoppedMutex.RLock()
	defer fake.isStoppedMutex.RUnlock()
	argsForCall := fake.isStoppedArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeStateStore) IsStoppedReturns(result1 bool) {
	fake.isStoppedMutex.Lock()
	defer fake.isStoppedMutex.Unlock()
	fake.IsStoppedStub = nil
	fake.isStoppedReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeStateStore) IsStoppedReturnsOnCall(i int, result1 bool) {
	fake.isStoppedMutex.Lock()
	defer fake.isStoppedMutex.Unlock()
	fake.IsStoppedStub = nil
	if fake.isStoppedReturnsOnCall == nil {
		fake.isStoppedReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isStoppedReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeStateStore) StoreStopped(arg1 string) {
	fake.storeStoppedMutex.Lock()
	fake.storeStoppedArgsForCall = append(fake.storeStoppedArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.StoreStoppedStub
	fake.recordInvocation("StoreStopped", []interface{}{arg1})
	fake.storeStoppedMutex.Unlock()
	if stub != nil {
		fake.StoreStoppedStub(arg1)
	}
}

func (fake *FakeStateStore) StoreStoppedCallCount() int {
	fake.storeStoppedMutex.RLock()
	defer fake.storeStoppedMutex.RUnlock()
	return len(fake.storeStoppedArgsForCall)
}

func (fake *FakeStateStore) StoreStoppedCalls(stub func(string)) {
	fake.storeStoppedMutex.Lock()
	defer fake.storeStoppedMutex.Unlock()
	fake.StoreStoppedStub = stub
}

func (fake *FakeStateStore) StoreStoppedArgsForCall(i int) string {
	fake.storeStoppedMutex.RLock()
	defer fake.storeStoppedMutex.RUnlock()
	argsForCall := fake.storeStoppedArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeStateStore) 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 _ rundmc.StateStore = new(FakeStateStore)
