1// Code generated by counterfeiter. DO NOT EDIT. 2package workerfakes 3 4import ( 5 "sync" 6 7 "github.com/concourse/concourse/atc/worker" 8) 9 10type FakeInputSource struct { 11 DestinationPathStub func() string 12 destinationPathMutex sync.RWMutex 13 destinationPathArgsForCall []struct { 14 } 15 destinationPathReturns struct { 16 result1 string 17 } 18 destinationPathReturnsOnCall map[int]struct { 19 result1 string 20 } 21 SourceStub func() worker.ArtifactSource 22 sourceMutex sync.RWMutex 23 sourceArgsForCall []struct { 24 } 25 sourceReturns struct { 26 result1 worker.ArtifactSource 27 } 28 sourceReturnsOnCall map[int]struct { 29 result1 worker.ArtifactSource 30 } 31 invocations map[string][][]interface{} 32 invocationsMutex sync.RWMutex 33} 34 35func (fake *FakeInputSource) DestinationPath() string { 36 fake.destinationPathMutex.Lock() 37 ret, specificReturn := fake.destinationPathReturnsOnCall[len(fake.destinationPathArgsForCall)] 38 fake.destinationPathArgsForCall = append(fake.destinationPathArgsForCall, struct { 39 }{}) 40 fake.recordInvocation("DestinationPath", []interface{}{}) 41 fake.destinationPathMutex.Unlock() 42 if fake.DestinationPathStub != nil { 43 return fake.DestinationPathStub() 44 } 45 if specificReturn { 46 return ret.result1 47 } 48 fakeReturns := fake.destinationPathReturns 49 return fakeReturns.result1 50} 51 52func (fake *FakeInputSource) DestinationPathCallCount() int { 53 fake.destinationPathMutex.RLock() 54 defer fake.destinationPathMutex.RUnlock() 55 return len(fake.destinationPathArgsForCall) 56} 57 58func (fake *FakeInputSource) DestinationPathCalls(stub func() string) { 59 fake.destinationPathMutex.Lock() 60 defer fake.destinationPathMutex.Unlock() 61 fake.DestinationPathStub = stub 62} 63 64func (fake *FakeInputSource) DestinationPathReturns(result1 string) { 65 fake.destinationPathMutex.Lock() 66 defer fake.destinationPathMutex.Unlock() 67 fake.DestinationPathStub = nil 68 fake.destinationPathReturns = struct { 69 result1 string 70 }{result1} 71} 72 73func (fake *FakeInputSource) DestinationPathReturnsOnCall(i int, result1 string) { 74 fake.destinationPathMutex.Lock() 75 defer fake.destinationPathMutex.Unlock() 76 fake.DestinationPathStub = nil 77 if fake.destinationPathReturnsOnCall == nil { 78 fake.destinationPathReturnsOnCall = make(map[int]struct { 79 result1 string 80 }) 81 } 82 fake.destinationPathReturnsOnCall[i] = struct { 83 result1 string 84 }{result1} 85} 86 87func (fake *FakeInputSource) Source() worker.ArtifactSource { 88 fake.sourceMutex.Lock() 89 ret, specificReturn := fake.sourceReturnsOnCall[len(fake.sourceArgsForCall)] 90 fake.sourceArgsForCall = append(fake.sourceArgsForCall, struct { 91 }{}) 92 fake.recordInvocation("Source", []interface{}{}) 93 fake.sourceMutex.Unlock() 94 if fake.SourceStub != nil { 95 return fake.SourceStub() 96 } 97 if specificReturn { 98 return ret.result1 99 } 100 fakeReturns := fake.sourceReturns 101 return fakeReturns.result1 102} 103 104func (fake *FakeInputSource) SourceCallCount() int { 105 fake.sourceMutex.RLock() 106 defer fake.sourceMutex.RUnlock() 107 return len(fake.sourceArgsForCall) 108} 109 110func (fake *FakeInputSource) SourceCalls(stub func() worker.ArtifactSource) { 111 fake.sourceMutex.Lock() 112 defer fake.sourceMutex.Unlock() 113 fake.SourceStub = stub 114} 115 116func (fake *FakeInputSource) SourceReturns(result1 worker.ArtifactSource) { 117 fake.sourceMutex.Lock() 118 defer fake.sourceMutex.Unlock() 119 fake.SourceStub = nil 120 fake.sourceReturns = struct { 121 result1 worker.ArtifactSource 122 }{result1} 123} 124 125func (fake *FakeInputSource) SourceReturnsOnCall(i int, result1 worker.ArtifactSource) { 126 fake.sourceMutex.Lock() 127 defer fake.sourceMutex.Unlock() 128 fake.SourceStub = nil 129 if fake.sourceReturnsOnCall == nil { 130 fake.sourceReturnsOnCall = make(map[int]struct { 131 result1 worker.ArtifactSource 132 }) 133 } 134 fake.sourceReturnsOnCall[i] = struct { 135 result1 worker.ArtifactSource 136 }{result1} 137} 138 139func (fake *FakeInputSource) Invocations() map[string][][]interface{} { 140 fake.invocationsMutex.RLock() 141 defer fake.invocationsMutex.RUnlock() 142 fake.destinationPathMutex.RLock() 143 defer fake.destinationPathMutex.RUnlock() 144 fake.sourceMutex.RLock() 145 defer fake.sourceMutex.RUnlock() 146 copiedInvocations := map[string][][]interface{}{} 147 for key, value := range fake.invocations { 148 copiedInvocations[key] = value 149 } 150 return copiedInvocations 151} 152 153func (fake *FakeInputSource) recordInvocation(key string, args []interface{}) { 154 fake.invocationsMutex.Lock() 155 defer fake.invocationsMutex.Unlock() 156 if fake.invocations == nil { 157 fake.invocations = map[string][][]interface{}{} 158 } 159 if fake.invocations[key] == nil { 160 fake.invocations[key] = [][]interface{}{} 161 } 162 fake.invocations[key] = append(fake.invocations[key], args) 163} 164 165var _ worker.InputSource = new(FakeInputSource) 166