forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_user_provided_service_instance_repository.go
132 lines (117 loc) · 4.28 KB
/
fake_user_provided_service_instance_repository.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
// This file was generated by counterfeiter
package apifakes
import (
"sync"
"github.com/cloudfoundry/cli/cf/api"
"github.com/cloudfoundry/cli/cf/models"
)
type FakeUserProvidedServiceInstanceRepository struct {
CreateStub func(name, drainURL string, routeServiceURL string, params map[string]interface{}) (apiErr error)
createMutex sync.RWMutex
createArgsForCall []struct {
name string
drainURL string
routeServiceURL string
params map[string]interface{}
}
createReturns struct {
result1 error
}
UpdateStub func(serviceInstanceFields models.ServiceInstanceFields) (apiErr error)
updateMutex sync.RWMutex
updateArgsForCall []struct {
serviceInstanceFields models.ServiceInstanceFields
}
updateReturns struct {
result1 error
}
GetSummariesStub func() (models.UserProvidedServiceSummary, error)
getSummariesMutex sync.RWMutex
getSummariesArgsForCall []struct{}
getSummariesReturns struct {
result1 models.UserProvidedServiceSummary
result2 error
}
}
func (fake *FakeUserProvidedServiceInstanceRepository) Create(name string, drainURL string, routeServiceURL string, params map[string]interface{}) (apiErr error) {
fake.createMutex.Lock()
fake.createArgsForCall = append(fake.createArgsForCall, struct {
name string
drainURL string
routeServiceURL string
params map[string]interface{}
}{name, drainURL, routeServiceURL, params})
fake.createMutex.Unlock()
if fake.CreateStub != nil {
return fake.CreateStub(name, drainURL, routeServiceURL, params)
} else {
return fake.createReturns.result1
}
}
func (fake *FakeUserProvidedServiceInstanceRepository) CreateCallCount() int {
fake.createMutex.RLock()
defer fake.createMutex.RUnlock()
return len(fake.createArgsForCall)
}
func (fake *FakeUserProvidedServiceInstanceRepository) CreateArgsForCall(i int) (string, string, string, map[string]interface{}) {
fake.createMutex.RLock()
defer fake.createMutex.RUnlock()
return fake.createArgsForCall[i].name, fake.createArgsForCall[i].drainURL, fake.createArgsForCall[i].routeServiceURL, fake.createArgsForCall[i].params
}
func (fake *FakeUserProvidedServiceInstanceRepository) CreateReturns(result1 error) {
fake.CreateStub = nil
fake.createReturns = struct {
result1 error
}{result1}
}
func (fake *FakeUserProvidedServiceInstanceRepository) Update(serviceInstanceFields models.ServiceInstanceFields) (apiErr error) {
fake.updateMutex.Lock()
fake.updateArgsForCall = append(fake.updateArgsForCall, struct {
serviceInstanceFields models.ServiceInstanceFields
}{serviceInstanceFields})
fake.updateMutex.Unlock()
if fake.UpdateStub != nil {
return fake.UpdateStub(serviceInstanceFields)
} else {
return fake.updateReturns.result1
}
}
func (fake *FakeUserProvidedServiceInstanceRepository) UpdateCallCount() int {
fake.updateMutex.RLock()
defer fake.updateMutex.RUnlock()
return len(fake.updateArgsForCall)
}
func (fake *FakeUserProvidedServiceInstanceRepository) UpdateArgsForCall(i int) models.ServiceInstanceFields {
fake.updateMutex.RLock()
defer fake.updateMutex.RUnlock()
return fake.updateArgsForCall[i].serviceInstanceFields
}
func (fake *FakeUserProvidedServiceInstanceRepository) UpdateReturns(result1 error) {
fake.UpdateStub = nil
fake.updateReturns = struct {
result1 error
}{result1}
}
func (fake *FakeUserProvidedServiceInstanceRepository) GetSummaries() (models.UserProvidedServiceSummary, error) {
fake.getSummariesMutex.Lock()
fake.getSummariesArgsForCall = append(fake.getSummariesArgsForCall, struct{}{})
fake.getSummariesMutex.Unlock()
if fake.GetSummariesStub != nil {
return fake.GetSummariesStub()
} else {
return fake.getSummariesReturns.result1, fake.getSummariesReturns.result2
}
}
func (fake *FakeUserProvidedServiceInstanceRepository) GetSummariesCallCount() int {
fake.getSummariesMutex.RLock()
defer fake.getSummariesMutex.RUnlock()
return len(fake.getSummariesArgsForCall)
}
func (fake *FakeUserProvidedServiceInstanceRepository) GetSummariesReturns(result1 models.UserProvidedServiceSummary, result2 error) {
fake.GetSummariesStub = nil
fake.getSummariesReturns = struct {
result1 models.UserProvidedServiceSummary
result2 error
}{result1, result2}
}
var _ api.UserProvidedServiceInstanceRepository = new(FakeUserProvidedServiceInstanceRepository)