This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
forked from cloudfoundry/bosh-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_compilable.go
231 lines (207 loc) · 6 KB
/
fake_compilable.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
// This file was generated by counterfeiter
package pkgfakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/release/pkg"
)
type FakeCompilable struct {
NameStub func() string
nameMutex sync.RWMutex
nameArgsForCall []struct{}
nameReturns struct {
result1 string
}
FingerprintStub func() string
fingerprintMutex sync.RWMutex
fingerprintArgsForCall []struct{}
fingerprintReturns struct {
result1 string
}
ArchivePathStub func() string
archivePathMutex sync.RWMutex
archivePathArgsForCall []struct{}
archivePathReturns struct {
result1 string
}
ArchiveSHA1Stub func() string
archiveSHA1Mutex sync.RWMutex
archiveSHA1ArgsForCall []struct{}
archiveSHA1Returns struct {
result1 string
}
IsCompiledStub func() bool
isCompiledMutex sync.RWMutex
isCompiledArgsForCall []struct{}
isCompiledReturns struct {
result1 bool
}
DepsStub func() []pkg.Compilable
depsMutex sync.RWMutex
depsArgsForCall []struct{}
depsReturns struct {
result1 []pkg.Compilable
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeCompilable) Name() string {
fake.nameMutex.Lock()
fake.nameArgsForCall = append(fake.nameArgsForCall, struct{}{})
fake.recordInvocation("Name", []interface{}{})
fake.nameMutex.Unlock()
if fake.NameStub != nil {
return fake.NameStub()
} else {
return fake.nameReturns.result1
}
}
func (fake *FakeCompilable) NameCallCount() int {
fake.nameMutex.RLock()
defer fake.nameMutex.RUnlock()
return len(fake.nameArgsForCall)
}
func (fake *FakeCompilable) NameReturns(result1 string) {
fake.NameStub = nil
fake.nameReturns = struct {
result1 string
}{result1}
}
func (fake *FakeCompilable) Fingerprint() string {
fake.fingerprintMutex.Lock()
fake.fingerprintArgsForCall = append(fake.fingerprintArgsForCall, struct{}{})
fake.recordInvocation("Fingerprint", []interface{}{})
fake.fingerprintMutex.Unlock()
if fake.FingerprintStub != nil {
return fake.FingerprintStub()
} else {
return fake.fingerprintReturns.result1
}
}
func (fake *FakeCompilable) FingerprintCallCount() int {
fake.fingerprintMutex.RLock()
defer fake.fingerprintMutex.RUnlock()
return len(fake.fingerprintArgsForCall)
}
func (fake *FakeCompilable) FingerprintReturns(result1 string) {
fake.FingerprintStub = nil
fake.fingerprintReturns = struct {
result1 string
}{result1}
}
func (fake *FakeCompilable) ArchivePath() string {
fake.archivePathMutex.Lock()
fake.archivePathArgsForCall = append(fake.archivePathArgsForCall, struct{}{})
fake.recordInvocation("ArchivePath", []interface{}{})
fake.archivePathMutex.Unlock()
if fake.ArchivePathStub != nil {
return fake.ArchivePathStub()
} else {
return fake.archivePathReturns.result1
}
}
func (fake *FakeCompilable) ArchivePathCallCount() int {
fake.archivePathMutex.RLock()
defer fake.archivePathMutex.RUnlock()
return len(fake.archivePathArgsForCall)
}
func (fake *FakeCompilable) ArchivePathReturns(result1 string) {
fake.ArchivePathStub = nil
fake.archivePathReturns = struct {
result1 string
}{result1}
}
func (fake *FakeCompilable) ArchiveSHA1() string {
fake.archiveSHA1Mutex.Lock()
fake.archiveSHA1ArgsForCall = append(fake.archiveSHA1ArgsForCall, struct{}{})
fake.recordInvocation("ArchiveSHA1", []interface{}{})
fake.archiveSHA1Mutex.Unlock()
if fake.ArchiveSHA1Stub != nil {
return fake.ArchiveSHA1Stub()
} else {
return fake.archiveSHA1Returns.result1
}
}
func (fake *FakeCompilable) ArchiveSHA1CallCount() int {
fake.archiveSHA1Mutex.RLock()
defer fake.archiveSHA1Mutex.RUnlock()
return len(fake.archiveSHA1ArgsForCall)
}
func (fake *FakeCompilable) ArchiveSHA1Returns(result1 string) {
fake.ArchiveSHA1Stub = nil
fake.archiveSHA1Returns = struct {
result1 string
}{result1}
}
func (fake *FakeCompilable) IsCompiled() bool {
fake.isCompiledMutex.Lock()
fake.isCompiledArgsForCall = append(fake.isCompiledArgsForCall, struct{}{})
fake.recordInvocation("IsCompiled", []interface{}{})
fake.isCompiledMutex.Unlock()
if fake.IsCompiledStub != nil {
return fake.IsCompiledStub()
} else {
return fake.isCompiledReturns.result1
}
}
func (fake *FakeCompilable) IsCompiledCallCount() int {
fake.isCompiledMutex.RLock()
defer fake.isCompiledMutex.RUnlock()
return len(fake.isCompiledArgsForCall)
}
func (fake *FakeCompilable) IsCompiledReturns(result1 bool) {
fake.IsCompiledStub = nil
fake.isCompiledReturns = struct {
result1 bool
}{result1}
}
func (fake *FakeCompilable) Deps() []pkg.Compilable {
fake.depsMutex.Lock()
fake.depsArgsForCall = append(fake.depsArgsForCall, struct{}{})
fake.recordInvocation("Deps", []interface{}{})
fake.depsMutex.Unlock()
if fake.DepsStub != nil {
return fake.DepsStub()
} else {
return fake.depsReturns.result1
}
}
func (fake *FakeCompilable) DepsCallCount() int {
fake.depsMutex.RLock()
defer fake.depsMutex.RUnlock()
return len(fake.depsArgsForCall)
}
func (fake *FakeCompilable) DepsReturns(result1 []pkg.Compilable) {
fake.DepsStub = nil
fake.depsReturns = struct {
result1 []pkg.Compilable
}{result1}
}
func (fake *FakeCompilable) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.nameMutex.RLock()
defer fake.nameMutex.RUnlock()
fake.fingerprintMutex.RLock()
defer fake.fingerprintMutex.RUnlock()
fake.archivePathMutex.RLock()
defer fake.archivePathMutex.RUnlock()
fake.archiveSHA1Mutex.RLock()
defer fake.archiveSHA1Mutex.RUnlock()
fake.isCompiledMutex.RLock()
defer fake.isCompiledMutex.RUnlock()
fake.depsMutex.RLock()
defer fake.depsMutex.RUnlock()
return fake.invocations
}
func (fake *FakeCompilable) 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 _ pkg.Compilable = new(FakeCompilable)