-
Notifications
You must be signed in to change notification settings - Fork 927
/
fake_service_plan_actor.go
268 lines (242 loc) · 9.37 KB
/
fake_service_plan_actor.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
// This file was generated by counterfeiter
package actorsfakes
import (
"sync"
"code.cloudfoundry.org/cli/cf/actors"
)
type FakeServicePlanActor struct {
FindServiceAccessStub func(string, string) (actors.ServiceAccess, error)
findServiceAccessMutex sync.RWMutex
findServiceAccessArgsForCall []struct {
arg1 string
arg2 string
}
findServiceAccessReturns struct {
result1 actors.ServiceAccess
result2 error
}
UpdateAllPlansForServiceStub func(string, bool) error
updateAllPlansForServiceMutex sync.RWMutex
updateAllPlansForServiceArgsForCall []struct {
arg1 string
arg2 bool
}
updateAllPlansForServiceReturns struct {
result1 error
}
UpdateOrgForServiceStub func(string, string, bool) error
updateOrgForServiceMutex sync.RWMutex
updateOrgForServiceArgsForCall []struct {
arg1 string
arg2 string
arg3 bool
}
updateOrgForServiceReturns struct {
result1 error
}
UpdateSinglePlanForServiceStub func(string, string, bool) error
updateSinglePlanForServiceMutex sync.RWMutex
updateSinglePlanForServiceArgsForCall []struct {
arg1 string
arg2 string
arg3 bool
}
updateSinglePlanForServiceReturns struct {
result1 error
}
UpdatePlanAndOrgForServiceStub func(string, string, string, bool) error
updatePlanAndOrgForServiceMutex sync.RWMutex
updatePlanAndOrgForServiceArgsForCall []struct {
arg1 string
arg2 string
arg3 string
arg4 bool
}
updatePlanAndOrgForServiceReturns struct {
result1 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeServicePlanActor) FindServiceAccess(arg1 string, arg2 string) (actors.ServiceAccess, error) {
fake.findServiceAccessMutex.Lock()
fake.findServiceAccessArgsForCall = append(fake.findServiceAccessArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.recordInvocation("FindServiceAccess", []interface{}{arg1, arg2})
fake.findServiceAccessMutex.Unlock()
if fake.FindServiceAccessStub != nil {
return fake.FindServiceAccessStub(arg1, arg2)
} else {
return fake.findServiceAccessReturns.result1, fake.findServiceAccessReturns.result2
}
}
func (fake *FakeServicePlanActor) FindServiceAccessCallCount() int {
fake.findServiceAccessMutex.RLock()
defer fake.findServiceAccessMutex.RUnlock()
return len(fake.findServiceAccessArgsForCall)
}
func (fake *FakeServicePlanActor) FindServiceAccessArgsForCall(i int) (string, string) {
fake.findServiceAccessMutex.RLock()
defer fake.findServiceAccessMutex.RUnlock()
return fake.findServiceAccessArgsForCall[i].arg1, fake.findServiceAccessArgsForCall[i].arg2
}
func (fake *FakeServicePlanActor) FindServiceAccessReturns(result1 actors.ServiceAccess, result2 error) {
fake.FindServiceAccessStub = nil
fake.findServiceAccessReturns = struct {
result1 actors.ServiceAccess
result2 error
}{result1, result2}
}
func (fake *FakeServicePlanActor) UpdateAllPlansForService(arg1 string, arg2 bool) error {
fake.updateAllPlansForServiceMutex.Lock()
fake.updateAllPlansForServiceArgsForCall = append(fake.updateAllPlansForServiceArgsForCall, struct {
arg1 string
arg2 bool
}{arg1, arg2})
fake.recordInvocation("UpdateAllPlansForService", []interface{}{arg1, arg2})
fake.updateAllPlansForServiceMutex.Unlock()
if fake.UpdateAllPlansForServiceStub != nil {
return fake.UpdateAllPlansForServiceStub(arg1, arg2)
} else {
return fake.updateAllPlansForServiceReturns.result1
}
}
func (fake *FakeServicePlanActor) UpdateAllPlansForServiceCallCount() int {
fake.updateAllPlansForServiceMutex.RLock()
defer fake.updateAllPlansForServiceMutex.RUnlock()
return len(fake.updateAllPlansForServiceArgsForCall)
}
func (fake *FakeServicePlanActor) UpdateAllPlansForServiceArgsForCall(i int) (string, bool) {
fake.updateAllPlansForServiceMutex.RLock()
defer fake.updateAllPlansForServiceMutex.RUnlock()
return fake.updateAllPlansForServiceArgsForCall[i].arg1, fake.updateAllPlansForServiceArgsForCall[i].arg2
}
func (fake *FakeServicePlanActor) UpdateAllPlansForServiceReturns(result1 error) {
fake.UpdateAllPlansForServiceStub = nil
fake.updateAllPlansForServiceReturns = struct {
result1 error
}{result1}
}
func (fake *FakeServicePlanActor) UpdateOrgForService(arg1 string, arg2 string, arg3 bool) error {
fake.updateOrgForServiceMutex.Lock()
fake.updateOrgForServiceArgsForCall = append(fake.updateOrgForServiceArgsForCall, struct {
arg1 string
arg2 string
arg3 bool
}{arg1, arg2, arg3})
fake.recordInvocation("UpdateOrgForService", []interface{}{arg1, arg2, arg3})
fake.updateOrgForServiceMutex.Unlock()
if fake.UpdateOrgForServiceStub != nil {
return fake.UpdateOrgForServiceStub(arg1, arg2, arg3)
} else {
return fake.updateOrgForServiceReturns.result1
}
}
func (fake *FakeServicePlanActor) UpdateOrgForServiceCallCount() int {
fake.updateOrgForServiceMutex.RLock()
defer fake.updateOrgForServiceMutex.RUnlock()
return len(fake.updateOrgForServiceArgsForCall)
}
func (fake *FakeServicePlanActor) UpdateOrgForServiceArgsForCall(i int) (string, string, bool) {
fake.updateOrgForServiceMutex.RLock()
defer fake.updateOrgForServiceMutex.RUnlock()
return fake.updateOrgForServiceArgsForCall[i].arg1, fake.updateOrgForServiceArgsForCall[i].arg2, fake.updateOrgForServiceArgsForCall[i].arg3
}
func (fake *FakeServicePlanActor) UpdateOrgForServiceReturns(result1 error) {
fake.UpdateOrgForServiceStub = nil
fake.updateOrgForServiceReturns = struct {
result1 error
}{result1}
}
func (fake *FakeServicePlanActor) UpdateSinglePlanForService(arg1 string, arg2 string, arg3 bool) error {
fake.updateSinglePlanForServiceMutex.Lock()
fake.updateSinglePlanForServiceArgsForCall = append(fake.updateSinglePlanForServiceArgsForCall, struct {
arg1 string
arg2 string
arg3 bool
}{arg1, arg2, arg3})
fake.recordInvocation("UpdateSinglePlanForService", []interface{}{arg1, arg2, arg3})
fake.updateSinglePlanForServiceMutex.Unlock()
if fake.UpdateSinglePlanForServiceStub != nil {
return fake.UpdateSinglePlanForServiceStub(arg1, arg2, arg3)
} else {
return fake.updateSinglePlanForServiceReturns.result1
}
}
func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceCallCount() int {
fake.updateSinglePlanForServiceMutex.RLock()
defer fake.updateSinglePlanForServiceMutex.RUnlock()
return len(fake.updateSinglePlanForServiceArgsForCall)
}
func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceArgsForCall(i int) (string, string, bool) {
fake.updateSinglePlanForServiceMutex.RLock()
defer fake.updateSinglePlanForServiceMutex.RUnlock()
return fake.updateSinglePlanForServiceArgsForCall[i].arg1, fake.updateSinglePlanForServiceArgsForCall[i].arg2, fake.updateSinglePlanForServiceArgsForCall[i].arg3
}
func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceReturns(result1 error) {
fake.UpdateSinglePlanForServiceStub = nil
fake.updateSinglePlanForServiceReturns = struct {
result1 error
}{result1}
}
func (fake *FakeServicePlanActor) UpdatePlanAndOrgForService(arg1 string, arg2 string, arg3 string, arg4 bool) error {
fake.updatePlanAndOrgForServiceMutex.Lock()
fake.updatePlanAndOrgForServiceArgsForCall = append(fake.updatePlanAndOrgForServiceArgsForCall, struct {
arg1 string
arg2 string
arg3 string
arg4 bool
}{arg1, arg2, arg3, arg4})
fake.recordInvocation("UpdatePlanAndOrgForService", []interface{}{arg1, arg2, arg3, arg4})
fake.updatePlanAndOrgForServiceMutex.Unlock()
if fake.UpdatePlanAndOrgForServiceStub != nil {
return fake.UpdatePlanAndOrgForServiceStub(arg1, arg2, arg3, arg4)
} else {
return fake.updatePlanAndOrgForServiceReturns.result1
}
}
func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceCallCount() int {
fake.updatePlanAndOrgForServiceMutex.RLock()
defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
return len(fake.updatePlanAndOrgForServiceArgsForCall)
}
func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceArgsForCall(i int) (string, string, string, bool) {
fake.updatePlanAndOrgForServiceMutex.RLock()
defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
return fake.updatePlanAndOrgForServiceArgsForCall[i].arg1, fake.updatePlanAndOrgForServiceArgsForCall[i].arg2, fake.updatePlanAndOrgForServiceArgsForCall[i].arg3, fake.updatePlanAndOrgForServiceArgsForCall[i].arg4
}
func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceReturns(result1 error) {
fake.UpdatePlanAndOrgForServiceStub = nil
fake.updatePlanAndOrgForServiceReturns = struct {
result1 error
}{result1}
}
func (fake *FakeServicePlanActor) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.findServiceAccessMutex.RLock()
defer fake.findServiceAccessMutex.RUnlock()
fake.updateAllPlansForServiceMutex.RLock()
defer fake.updateAllPlansForServiceMutex.RUnlock()
fake.updateOrgForServiceMutex.RLock()
defer fake.updateOrgForServiceMutex.RUnlock()
fake.updateSinglePlanForServiceMutex.RLock()
defer fake.updateSinglePlanForServiceMutex.RUnlock()
fake.updatePlanAndOrgForServiceMutex.RLock()
defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
return fake.invocations
}
func (fake *FakeServicePlanActor) 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 _ actors.ServicePlanActor = new(FakeServicePlanActor)