forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_security_group_space_binder.go
123 lines (109 loc) · 3.79 KB
/
fake_security_group_space_binder.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
// This file was generated by counterfeiter
package spacesfakes
import (
"sync"
"code.cloudfoundry.org/cli/cf/api/securitygroups/spaces"
)
type FakeSecurityGroupSpaceBinder struct {
BindSpaceStub func(securityGroupGUID string, spaceGUID string) error
bindSpaceMutex sync.RWMutex
bindSpaceArgsForCall []struct {
securityGroupGUID string
spaceGUID string
}
bindSpaceReturns struct {
result1 error
}
UnbindSpaceStub func(securityGroupGUID string, spaceGUID string) error
unbindSpaceMutex sync.RWMutex
unbindSpaceArgsForCall []struct {
securityGroupGUID string
spaceGUID string
}
unbindSpaceReturns struct {
result1 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeSecurityGroupSpaceBinder) BindSpace(securityGroupGUID string, spaceGUID string) error {
fake.bindSpaceMutex.Lock()
fake.bindSpaceArgsForCall = append(fake.bindSpaceArgsForCall, struct {
securityGroupGUID string
spaceGUID string
}{securityGroupGUID, spaceGUID})
fake.recordInvocation("BindSpace", []interface{}{securityGroupGUID, spaceGUID})
fake.bindSpaceMutex.Unlock()
if fake.BindSpaceStub != nil {
return fake.BindSpaceStub(securityGroupGUID, spaceGUID)
} else {
return fake.bindSpaceReturns.result1
}
}
func (fake *FakeSecurityGroupSpaceBinder) BindSpaceCallCount() int {
fake.bindSpaceMutex.RLock()
defer fake.bindSpaceMutex.RUnlock()
return len(fake.bindSpaceArgsForCall)
}
func (fake *FakeSecurityGroupSpaceBinder) BindSpaceArgsForCall(i int) (string, string) {
fake.bindSpaceMutex.RLock()
defer fake.bindSpaceMutex.RUnlock()
return fake.bindSpaceArgsForCall[i].securityGroupGUID, fake.bindSpaceArgsForCall[i].spaceGUID
}
func (fake *FakeSecurityGroupSpaceBinder) BindSpaceReturns(result1 error) {
fake.BindSpaceStub = nil
fake.bindSpaceReturns = struct {
result1 error
}{result1}
}
func (fake *FakeSecurityGroupSpaceBinder) UnbindSpace(securityGroupGUID string, spaceGUID string) error {
fake.unbindSpaceMutex.Lock()
fake.unbindSpaceArgsForCall = append(fake.unbindSpaceArgsForCall, struct {
securityGroupGUID string
spaceGUID string
}{securityGroupGUID, spaceGUID})
fake.recordInvocation("UnbindSpace", []interface{}{securityGroupGUID, spaceGUID})
fake.unbindSpaceMutex.Unlock()
if fake.UnbindSpaceStub != nil {
return fake.UnbindSpaceStub(securityGroupGUID, spaceGUID)
} else {
return fake.unbindSpaceReturns.result1
}
}
func (fake *FakeSecurityGroupSpaceBinder) UnbindSpaceCallCount() int {
fake.unbindSpaceMutex.RLock()
defer fake.unbindSpaceMutex.RUnlock()
return len(fake.unbindSpaceArgsForCall)
}
func (fake *FakeSecurityGroupSpaceBinder) UnbindSpaceArgsForCall(i int) (string, string) {
fake.unbindSpaceMutex.RLock()
defer fake.unbindSpaceMutex.RUnlock()
return fake.unbindSpaceArgsForCall[i].securityGroupGUID, fake.unbindSpaceArgsForCall[i].spaceGUID
}
func (fake *FakeSecurityGroupSpaceBinder) UnbindSpaceReturns(result1 error) {
fake.UnbindSpaceStub = nil
fake.unbindSpaceReturns = struct {
result1 error
}{result1}
}
func (fake *FakeSecurityGroupSpaceBinder) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.bindSpaceMutex.RLock()
defer fake.bindSpaceMutex.RUnlock()
fake.unbindSpaceMutex.RLock()
defer fake.unbindSpaceMutex.RUnlock()
return fake.invocations
}
func (fake *FakeSecurityGroupSpaceBinder) 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 _ spaces.SecurityGroupSpaceBinder = new(FakeSecurityGroupSpaceBinder)