forked from cloudfoundry-community/cloudfoundry-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_create_org_actor.go
203 lines (185 loc) · 7 KB
/
fake_create_org_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
// Code generated by counterfeiter. DO NOT EDIT.
package v6fakes
import (
"sync"
"code.cloudfoundry.org/cli/actor/v2action"
v6 "code.cloudfoundry.org/cli/command/v6"
)
type FakeCreateOrgActor struct {
CreateOrganizationStub func(string, string) (v2action.Organization, v2action.Warnings, error)
createOrganizationMutex sync.RWMutex
createOrganizationArgsForCall []struct {
arg1 string
arg2 string
}
createOrganizationReturns struct {
result1 v2action.Organization
result2 v2action.Warnings
result3 error
}
createOrganizationReturnsOnCall map[int]struct {
result1 v2action.Organization
result2 v2action.Warnings
result3 error
}
GrantOrgManagerByUsernameStub func(string, string) (v2action.Warnings, error)
grantOrgManagerByUsernameMutex sync.RWMutex
grantOrgManagerByUsernameArgsForCall []struct {
arg1 string
arg2 string
}
grantOrgManagerByUsernameReturns struct {
result1 v2action.Warnings
result2 error
}
grantOrgManagerByUsernameReturnsOnCall map[int]struct {
result1 v2action.Warnings
result2 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeCreateOrgActor) CreateOrganization(arg1 string, arg2 string) (v2action.Organization, v2action.Warnings, error) {
fake.createOrganizationMutex.Lock()
ret, specificReturn := fake.createOrganizationReturnsOnCall[len(fake.createOrganizationArgsForCall)]
fake.createOrganizationArgsForCall = append(fake.createOrganizationArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.recordInvocation("CreateOrganization", []interface{}{arg1, arg2})
fake.createOrganizationMutex.Unlock()
if fake.CreateOrganizationStub != nil {
return fake.CreateOrganizationStub(arg1, arg2)
}
if specificReturn {
return ret.result1, ret.result2, ret.result3
}
fakeReturns := fake.createOrganizationReturns
return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}
func (fake *FakeCreateOrgActor) CreateOrganizationCallCount() int {
fake.createOrganizationMutex.RLock()
defer fake.createOrganizationMutex.RUnlock()
return len(fake.createOrganizationArgsForCall)
}
func (fake *FakeCreateOrgActor) CreateOrganizationCalls(stub func(string, string) (v2action.Organization, v2action.Warnings, error)) {
fake.createOrganizationMutex.Lock()
defer fake.createOrganizationMutex.Unlock()
fake.CreateOrganizationStub = stub
}
func (fake *FakeCreateOrgActor) CreateOrganizationArgsForCall(i int) (string, string) {
fake.createOrganizationMutex.RLock()
defer fake.createOrganizationMutex.RUnlock()
argsForCall := fake.createOrganizationArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *FakeCreateOrgActor) CreateOrganizationReturns(result1 v2action.Organization, result2 v2action.Warnings, result3 error) {
fake.createOrganizationMutex.Lock()
defer fake.createOrganizationMutex.Unlock()
fake.CreateOrganizationStub = nil
fake.createOrganizationReturns = struct {
result1 v2action.Organization
result2 v2action.Warnings
result3 error
}{result1, result2, result3}
}
func (fake *FakeCreateOrgActor) CreateOrganizationReturnsOnCall(i int, result1 v2action.Organization, result2 v2action.Warnings, result3 error) {
fake.createOrganizationMutex.Lock()
defer fake.createOrganizationMutex.Unlock()
fake.CreateOrganizationStub = nil
if fake.createOrganizationReturnsOnCall == nil {
fake.createOrganizationReturnsOnCall = make(map[int]struct {
result1 v2action.Organization
result2 v2action.Warnings
result3 error
})
}
fake.createOrganizationReturnsOnCall[i] = struct {
result1 v2action.Organization
result2 v2action.Warnings
result3 error
}{result1, result2, result3}
}
func (fake *FakeCreateOrgActor) GrantOrgManagerByUsername(arg1 string, arg2 string) (v2action.Warnings, error) {
fake.grantOrgManagerByUsernameMutex.Lock()
ret, specificReturn := fake.grantOrgManagerByUsernameReturnsOnCall[len(fake.grantOrgManagerByUsernameArgsForCall)]
fake.grantOrgManagerByUsernameArgsForCall = append(fake.grantOrgManagerByUsernameArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.recordInvocation("GrantOrgManagerByUsername", []interface{}{arg1, arg2})
fake.grantOrgManagerByUsernameMutex.Unlock()
if fake.GrantOrgManagerByUsernameStub != nil {
return fake.GrantOrgManagerByUsernameStub(arg1, arg2)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.grantOrgManagerByUsernameReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *FakeCreateOrgActor) GrantOrgManagerByUsernameCallCount() int {
fake.grantOrgManagerByUsernameMutex.RLock()
defer fake.grantOrgManagerByUsernameMutex.RUnlock()
return len(fake.grantOrgManagerByUsernameArgsForCall)
}
func (fake *FakeCreateOrgActor) GrantOrgManagerByUsernameCalls(stub func(string, string) (v2action.Warnings, error)) {
fake.grantOrgManagerByUsernameMutex.Lock()
defer fake.grantOrgManagerByUsernameMutex.Unlock()
fake.GrantOrgManagerByUsernameStub = stub
}
func (fake *FakeCreateOrgActor) GrantOrgManagerByUsernameArgsForCall(i int) (string, string) {
fake.grantOrgManagerByUsernameMutex.RLock()
defer fake.grantOrgManagerByUsernameMutex.RUnlock()
argsForCall := fake.grantOrgManagerByUsernameArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *FakeCreateOrgActor) GrantOrgManagerByUsernameReturns(result1 v2action.Warnings, result2 error) {
fake.grantOrgManagerByUsernameMutex.Lock()
defer fake.grantOrgManagerByUsernameMutex.Unlock()
fake.GrantOrgManagerByUsernameStub = nil
fake.grantOrgManagerByUsernameReturns = struct {
result1 v2action.Warnings
result2 error
}{result1, result2}
}
func (fake *FakeCreateOrgActor) GrantOrgManagerByUsernameReturnsOnCall(i int, result1 v2action.Warnings, result2 error) {
fake.grantOrgManagerByUsernameMutex.Lock()
defer fake.grantOrgManagerByUsernameMutex.Unlock()
fake.GrantOrgManagerByUsernameStub = nil
if fake.grantOrgManagerByUsernameReturnsOnCall == nil {
fake.grantOrgManagerByUsernameReturnsOnCall = make(map[int]struct {
result1 v2action.Warnings
result2 error
})
}
fake.grantOrgManagerByUsernameReturnsOnCall[i] = struct {
result1 v2action.Warnings
result2 error
}{result1, result2}
}
func (fake *FakeCreateOrgActor) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.createOrganizationMutex.RLock()
defer fake.createOrganizationMutex.RUnlock()
fake.grantOrgManagerByUsernameMutex.RLock()
defer fake.grantOrgManagerByUsernameMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *FakeCreateOrgActor) 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 _ v6.CreateOrgActor = new(FakeCreateOrgActor)