-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfake_broker_builder.go
216 lines (193 loc) · 8.13 KB
/
fake_broker_builder.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
// This file was generated by counterfeiter
package brokerbuilderfakes
import (
"sync"
"github.com/cloudfoundry/cli/cf/actors/brokerbuilder"
"github.com/cloudfoundry/cli/cf/models"
)
type FakeBrokerBuilder struct {
AttachBrokersToServicesStub func([]models.ServiceOffering) ([]models.ServiceBroker, error)
attachBrokersToServicesMutex sync.RWMutex
attachBrokersToServicesArgsForCall []struct {
arg1 []models.ServiceOffering
}
attachBrokersToServicesReturns struct {
result1 []models.ServiceBroker
result2 error
}
AttachSpecificBrokerToServicesStub func(string, []models.ServiceOffering) (models.ServiceBroker, error)
attachSpecificBrokerToServicesMutex sync.RWMutex
attachSpecificBrokerToServicesArgsForCall []struct {
arg1 string
arg2 []models.ServiceOffering
}
attachSpecificBrokerToServicesReturns struct {
result1 models.ServiceBroker
result2 error
}
GetAllServiceBrokersStub func() ([]models.ServiceBroker, error)
getAllServiceBrokersMutex sync.RWMutex
getAllServiceBrokersArgsForCall []struct{}
getAllServiceBrokersReturns struct {
result1 []models.ServiceBroker
result2 error
}
GetBrokerWithAllServicesStub func(brokerName string) (models.ServiceBroker, error)
getBrokerWithAllServicesMutex sync.RWMutex
getBrokerWithAllServicesArgsForCall []struct {
brokerName string
}
getBrokerWithAllServicesReturns struct {
result1 models.ServiceBroker
result2 error
}
GetBrokerWithSpecifiedServiceStub func(serviceName string) (models.ServiceBroker, error)
getBrokerWithSpecifiedServiceMutex sync.RWMutex
getBrokerWithSpecifiedServiceArgsForCall []struct {
serviceName string
}
getBrokerWithSpecifiedServiceReturns struct {
result1 models.ServiceBroker
result2 error
}
}
func (fake *FakeBrokerBuilder) AttachBrokersToServices(arg1 []models.ServiceOffering) ([]models.ServiceBroker, error) {
fake.attachBrokersToServicesMutex.Lock()
fake.attachBrokersToServicesArgsForCall = append(fake.attachBrokersToServicesArgsForCall, struct {
arg1 []models.ServiceOffering
}{arg1})
fake.attachBrokersToServicesMutex.Unlock()
if fake.AttachBrokersToServicesStub != nil {
return fake.AttachBrokersToServicesStub(arg1)
} else {
return fake.attachBrokersToServicesReturns.result1, fake.attachBrokersToServicesReturns.result2
}
}
func (fake *FakeBrokerBuilder) AttachBrokersToServicesCallCount() int {
fake.attachBrokersToServicesMutex.RLock()
defer fake.attachBrokersToServicesMutex.RUnlock()
return len(fake.attachBrokersToServicesArgsForCall)
}
func (fake *FakeBrokerBuilder) AttachBrokersToServicesArgsForCall(i int) []models.ServiceOffering {
fake.attachBrokersToServicesMutex.RLock()
defer fake.attachBrokersToServicesMutex.RUnlock()
return fake.attachBrokersToServicesArgsForCall[i].arg1
}
func (fake *FakeBrokerBuilder) AttachBrokersToServicesReturns(result1 []models.ServiceBroker, result2 error) {
fake.AttachBrokersToServicesStub = nil
fake.attachBrokersToServicesReturns = struct {
result1 []models.ServiceBroker
result2 error
}{result1, result2}
}
func (fake *FakeBrokerBuilder) AttachSpecificBrokerToServices(arg1 string, arg2 []models.ServiceOffering) (models.ServiceBroker, error) {
fake.attachSpecificBrokerToServicesMutex.Lock()
fake.attachSpecificBrokerToServicesArgsForCall = append(fake.attachSpecificBrokerToServicesArgsForCall, struct {
arg1 string
arg2 []models.ServiceOffering
}{arg1, arg2})
fake.attachSpecificBrokerToServicesMutex.Unlock()
if fake.AttachSpecificBrokerToServicesStub != nil {
return fake.AttachSpecificBrokerToServicesStub(arg1, arg2)
} else {
return fake.attachSpecificBrokerToServicesReturns.result1, fake.attachSpecificBrokerToServicesReturns.result2
}
}
func (fake *FakeBrokerBuilder) AttachSpecificBrokerToServicesCallCount() int {
fake.attachSpecificBrokerToServicesMutex.RLock()
defer fake.attachSpecificBrokerToServicesMutex.RUnlock()
return len(fake.attachSpecificBrokerToServicesArgsForCall)
}
func (fake *FakeBrokerBuilder) AttachSpecificBrokerToServicesArgsForCall(i int) (string, []models.ServiceOffering) {
fake.attachSpecificBrokerToServicesMutex.RLock()
defer fake.attachSpecificBrokerToServicesMutex.RUnlock()
return fake.attachSpecificBrokerToServicesArgsForCall[i].arg1, fake.attachSpecificBrokerToServicesArgsForCall[i].arg2
}
func (fake *FakeBrokerBuilder) AttachSpecificBrokerToServicesReturns(result1 models.ServiceBroker, result2 error) {
fake.AttachSpecificBrokerToServicesStub = nil
fake.attachSpecificBrokerToServicesReturns = struct {
result1 models.ServiceBroker
result2 error
}{result1, result2}
}
func (fake *FakeBrokerBuilder) GetAllServiceBrokers() ([]models.ServiceBroker, error) {
fake.getAllServiceBrokersMutex.Lock()
fake.getAllServiceBrokersArgsForCall = append(fake.getAllServiceBrokersArgsForCall, struct{}{})
fake.getAllServiceBrokersMutex.Unlock()
if fake.GetAllServiceBrokersStub != nil {
return fake.GetAllServiceBrokersStub()
} else {
return fake.getAllServiceBrokersReturns.result1, fake.getAllServiceBrokersReturns.result2
}
}
func (fake *FakeBrokerBuilder) GetAllServiceBrokersCallCount() int {
fake.getAllServiceBrokersMutex.RLock()
defer fake.getAllServiceBrokersMutex.RUnlock()
return len(fake.getAllServiceBrokersArgsForCall)
}
func (fake *FakeBrokerBuilder) GetAllServiceBrokersReturns(result1 []models.ServiceBroker, result2 error) {
fake.GetAllServiceBrokersStub = nil
fake.getAllServiceBrokersReturns = struct {
result1 []models.ServiceBroker
result2 error
}{result1, result2}
}
func (fake *FakeBrokerBuilder) GetBrokerWithAllServices(brokerName string) (models.ServiceBroker, error) {
fake.getBrokerWithAllServicesMutex.Lock()
fake.getBrokerWithAllServicesArgsForCall = append(fake.getBrokerWithAllServicesArgsForCall, struct {
brokerName string
}{brokerName})
fake.getBrokerWithAllServicesMutex.Unlock()
if fake.GetBrokerWithAllServicesStub != nil {
return fake.GetBrokerWithAllServicesStub(brokerName)
} else {
return fake.getBrokerWithAllServicesReturns.result1, fake.getBrokerWithAllServicesReturns.result2
}
}
func (fake *FakeBrokerBuilder) GetBrokerWithAllServicesCallCount() int {
fake.getBrokerWithAllServicesMutex.RLock()
defer fake.getBrokerWithAllServicesMutex.RUnlock()
return len(fake.getBrokerWithAllServicesArgsForCall)
}
func (fake *FakeBrokerBuilder) GetBrokerWithAllServicesArgsForCall(i int) string {
fake.getBrokerWithAllServicesMutex.RLock()
defer fake.getBrokerWithAllServicesMutex.RUnlock()
return fake.getBrokerWithAllServicesArgsForCall[i].brokerName
}
func (fake *FakeBrokerBuilder) GetBrokerWithAllServicesReturns(result1 models.ServiceBroker, result2 error) {
fake.GetBrokerWithAllServicesStub = nil
fake.getBrokerWithAllServicesReturns = struct {
result1 models.ServiceBroker
result2 error
}{result1, result2}
}
func (fake *FakeBrokerBuilder) GetBrokerWithSpecifiedService(serviceName string) (models.ServiceBroker, error) {
fake.getBrokerWithSpecifiedServiceMutex.Lock()
fake.getBrokerWithSpecifiedServiceArgsForCall = append(fake.getBrokerWithSpecifiedServiceArgsForCall, struct {
serviceName string
}{serviceName})
fake.getBrokerWithSpecifiedServiceMutex.Unlock()
if fake.GetBrokerWithSpecifiedServiceStub != nil {
return fake.GetBrokerWithSpecifiedServiceStub(serviceName)
} else {
return fake.getBrokerWithSpecifiedServiceReturns.result1, fake.getBrokerWithSpecifiedServiceReturns.result2
}
}
func (fake *FakeBrokerBuilder) GetBrokerWithSpecifiedServiceCallCount() int {
fake.getBrokerWithSpecifiedServiceMutex.RLock()
defer fake.getBrokerWithSpecifiedServiceMutex.RUnlock()
return len(fake.getBrokerWithSpecifiedServiceArgsForCall)
}
func (fake *FakeBrokerBuilder) GetBrokerWithSpecifiedServiceArgsForCall(i int) string {
fake.getBrokerWithSpecifiedServiceMutex.RLock()
defer fake.getBrokerWithSpecifiedServiceMutex.RUnlock()
return fake.getBrokerWithSpecifiedServiceArgsForCall[i].serviceName
}
func (fake *FakeBrokerBuilder) GetBrokerWithSpecifiedServiceReturns(result1 models.ServiceBroker, result2 error) {
fake.GetBrokerWithSpecifiedServiceStub = nil
fake.getBrokerWithSpecifiedServiceReturns = struct {
result1 models.ServiceBroker
result2 error
}{result1, result2}
}
var _ brokerbuilder.BrokerBuilder = new(FakeBrokerBuilder)