concourse/atc/exec/execfakes/fake_put_delegate_factory.go

112 lines
3.1 KiB
Go

// Code generated by counterfeiter. DO NOT EDIT.
package execfakes
import (
"sync"
"github.com/concourse/concourse/atc/exec"
)
type FakePutDelegateFactory struct {
PutDelegateStub func(exec.RunState) exec.PutDelegate
putDelegateMutex sync.RWMutex
putDelegateArgsForCall []struct {
arg1 exec.RunState
}
putDelegateReturns struct {
result1 exec.PutDelegate
}
putDelegateReturnsOnCall map[int]struct {
result1 exec.PutDelegate
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakePutDelegateFactory) PutDelegate(arg1 exec.RunState) exec.PutDelegate {
fake.putDelegateMutex.Lock()
ret, specificReturn := fake.putDelegateReturnsOnCall[len(fake.putDelegateArgsForCall)]
fake.putDelegateArgsForCall = append(fake.putDelegateArgsForCall, struct {
arg1 exec.RunState
}{arg1})
stub := fake.PutDelegateStub
fakeReturns := fake.putDelegateReturns
fake.recordInvocation("PutDelegate", []interface{}{arg1})
fake.putDelegateMutex.Unlock()
if stub != nil {
return stub(arg1)
}
if specificReturn {
return ret.result1
}
return fakeReturns.result1
}
func (fake *FakePutDelegateFactory) PutDelegateCallCount() int {
fake.putDelegateMutex.RLock()
defer fake.putDelegateMutex.RUnlock()
return len(fake.putDelegateArgsForCall)
}
func (fake *FakePutDelegateFactory) PutDelegateCalls(stub func(exec.RunState) exec.PutDelegate) {
fake.putDelegateMutex.Lock()
defer fake.putDelegateMutex.Unlock()
fake.PutDelegateStub = stub
}
func (fake *FakePutDelegateFactory) PutDelegateArgsForCall(i int) exec.RunState {
fake.putDelegateMutex.RLock()
defer fake.putDelegateMutex.RUnlock()
argsForCall := fake.putDelegateArgsForCall[i]
return argsForCall.arg1
}
func (fake *FakePutDelegateFactory) PutDelegateReturns(result1 exec.PutDelegate) {
fake.putDelegateMutex.Lock()
defer fake.putDelegateMutex.Unlock()
fake.PutDelegateStub = nil
fake.putDelegateReturns = struct {
result1 exec.PutDelegate
}{result1}
}
func (fake *FakePutDelegateFactory) PutDelegateReturnsOnCall(i int, result1 exec.PutDelegate) {
fake.putDelegateMutex.Lock()
defer fake.putDelegateMutex.Unlock()
fake.PutDelegateStub = nil
if fake.putDelegateReturnsOnCall == nil {
fake.putDelegateReturnsOnCall = make(map[int]struct {
result1 exec.PutDelegate
})
}
fake.putDelegateReturnsOnCall[i] = struct {
result1 exec.PutDelegate
}{result1}
}
func (fake *FakePutDelegateFactory) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.putDelegateMutex.RLock()
defer fake.putDelegateMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *FakePutDelegateFactory) 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 _ exec.PutDelegateFactory = new(FakePutDelegateFactory)