forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_running_environment_variable_group_actor.go
122 lines (110 loc) · 4.89 KB
/
fake_running_environment_variable_group_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
// Code generated by counterfeiter. DO NOT EDIT.
package v7fakes
import (
"sync"
"code.cloudfoundry.org/cli/actor/v7action"
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant"
v7 "code.cloudfoundry.org/cli/command/v7"
)
type FakeRunningEnvironmentVariableGroupActor struct {
GetEnvironmentVariableGroupStub func(constant.EnvironmentVariableGroupName) (v7action.EnvironmentVariableGroup, v7action.Warnings, error)
getEnvironmentVariableGroupMutex sync.RWMutex
getEnvironmentVariableGroupArgsForCall []struct {
arg1 constant.EnvironmentVariableGroupName
}
getEnvironmentVariableGroupReturns struct {
result1 v7action.EnvironmentVariableGroup
result2 v7action.Warnings
result3 error
}
getEnvironmentVariableGroupReturnsOnCall map[int]struct {
result1 v7action.EnvironmentVariableGroup
result2 v7action.Warnings
result3 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeRunningEnvironmentVariableGroupActor) GetEnvironmentVariableGroup(arg1 constant.EnvironmentVariableGroupName) (v7action.EnvironmentVariableGroup, v7action.Warnings, error) {
fake.getEnvironmentVariableGroupMutex.Lock()
ret, specificReturn := fake.getEnvironmentVariableGroupReturnsOnCall[len(fake.getEnvironmentVariableGroupArgsForCall)]
fake.getEnvironmentVariableGroupArgsForCall = append(fake.getEnvironmentVariableGroupArgsForCall, struct {
arg1 constant.EnvironmentVariableGroupName
}{arg1})
fake.recordInvocation("GetEnvironmentVariableGroup", []interface{}{arg1})
fake.getEnvironmentVariableGroupMutex.Unlock()
if fake.GetEnvironmentVariableGroupStub != nil {
return fake.GetEnvironmentVariableGroupStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2, ret.result3
}
fakeReturns := fake.getEnvironmentVariableGroupReturns
return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}
func (fake *FakeRunningEnvironmentVariableGroupActor) GetEnvironmentVariableGroupCallCount() int {
fake.getEnvironmentVariableGroupMutex.RLock()
defer fake.getEnvironmentVariableGroupMutex.RUnlock()
return len(fake.getEnvironmentVariableGroupArgsForCall)
}
func (fake *FakeRunningEnvironmentVariableGroupActor) GetEnvironmentVariableGroupCalls(stub func(constant.EnvironmentVariableGroupName) (v7action.EnvironmentVariableGroup, v7action.Warnings, error)) {
fake.getEnvironmentVariableGroupMutex.Lock()
defer fake.getEnvironmentVariableGroupMutex.Unlock()
fake.GetEnvironmentVariableGroupStub = stub
}
func (fake *FakeRunningEnvironmentVariableGroupActor) GetEnvironmentVariableGroupArgsForCall(i int) constant.EnvironmentVariableGroupName {
fake.getEnvironmentVariableGroupMutex.RLock()
defer fake.getEnvironmentVariableGroupMutex.RUnlock()
argsForCall := fake.getEnvironmentVariableGroupArgsForCall[i]
return argsForCall.arg1
}
func (fake *FakeRunningEnvironmentVariableGroupActor) GetEnvironmentVariableGroupReturns(result1 v7action.EnvironmentVariableGroup, result2 v7action.Warnings, result3 error) {
fake.getEnvironmentVariableGroupMutex.Lock()
defer fake.getEnvironmentVariableGroupMutex.Unlock()
fake.GetEnvironmentVariableGroupStub = nil
fake.getEnvironmentVariableGroupReturns = struct {
result1 v7action.EnvironmentVariableGroup
result2 v7action.Warnings
result3 error
}{result1, result2, result3}
}
func (fake *FakeRunningEnvironmentVariableGroupActor) GetEnvironmentVariableGroupReturnsOnCall(i int, result1 v7action.EnvironmentVariableGroup, result2 v7action.Warnings, result3 error) {
fake.getEnvironmentVariableGroupMutex.Lock()
defer fake.getEnvironmentVariableGroupMutex.Unlock()
fake.GetEnvironmentVariableGroupStub = nil
if fake.getEnvironmentVariableGroupReturnsOnCall == nil {
fake.getEnvironmentVariableGroupReturnsOnCall = make(map[int]struct {
result1 v7action.EnvironmentVariableGroup
result2 v7action.Warnings
result3 error
})
}
fake.getEnvironmentVariableGroupReturnsOnCall[i] = struct {
result1 v7action.EnvironmentVariableGroup
result2 v7action.Warnings
result3 error
}{result1, result2, result3}
}
func (fake *FakeRunningEnvironmentVariableGroupActor) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.getEnvironmentVariableGroupMutex.RLock()
defer fake.getEnvironmentVariableGroupMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *FakeRunningEnvironmentVariableGroupActor) 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 _ v7.RunningEnvironmentVariableGroupActor = new(FakeRunningEnvironmentVariableGroupActor)