-
Notifications
You must be signed in to change notification settings - Fork 160
/
fake_access_token.go
190 lines (172 loc) · 4.62 KB
/
fake_access_token.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
// Code generated by counterfeiter. DO NOT EDIT.
package uaafakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/uaa"
)
type FakeAccessToken struct {
TypeStub func() string
typeMutex sync.RWMutex
typeArgsForCall []struct{}
typeReturns struct {
result1 string
}
typeReturnsOnCall map[int]struct {
result1 string
}
ValueStub func() string
valueMutex sync.RWMutex
valueArgsForCall []struct{}
valueReturns struct {
result1 string
}
valueReturnsOnCall map[int]struct {
result1 string
}
IsValidStub func() bool
isValidMutex sync.RWMutex
isValidArgsForCall []struct{}
isValidReturns struct {
result1 bool
}
isValidReturnsOnCall map[int]struct {
result1 bool
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeAccessToken) Type() string {
fake.typeMutex.Lock()
ret, specificReturn := fake.typeReturnsOnCall[len(fake.typeArgsForCall)]
fake.typeArgsForCall = append(fake.typeArgsForCall, struct{}{})
fake.recordInvocation("Type", []interface{}{})
fake.typeMutex.Unlock()
if fake.TypeStub != nil {
return fake.TypeStub()
}
if specificReturn {
return ret.result1
}
return fake.typeReturns.result1
}
func (fake *FakeAccessToken) TypeCallCount() int {
fake.typeMutex.RLock()
defer fake.typeMutex.RUnlock()
return len(fake.typeArgsForCall)
}
func (fake *FakeAccessToken) TypeReturns(result1 string) {
fake.TypeStub = nil
fake.typeReturns = struct {
result1 string
}{result1}
}
func (fake *FakeAccessToken) TypeReturnsOnCall(i int, result1 string) {
fake.TypeStub = nil
if fake.typeReturnsOnCall == nil {
fake.typeReturnsOnCall = make(map[int]struct {
result1 string
})
}
fake.typeReturnsOnCall[i] = struct {
result1 string
}{result1}
}
func (fake *FakeAccessToken) Value() string {
fake.valueMutex.Lock()
ret, specificReturn := fake.valueReturnsOnCall[len(fake.valueArgsForCall)]
fake.valueArgsForCall = append(fake.valueArgsForCall, struct{}{})
fake.recordInvocation("Value", []interface{}{})
fake.valueMutex.Unlock()
if fake.ValueStub != nil {
return fake.ValueStub()
}
if specificReturn {
return ret.result1
}
return fake.valueReturns.result1
}
func (fake *FakeAccessToken) ValueCallCount() int {
fake.valueMutex.RLock()
defer fake.valueMutex.RUnlock()
return len(fake.valueArgsForCall)
}
func (fake *FakeAccessToken) ValueReturns(result1 string) {
fake.ValueStub = nil
fake.valueReturns = struct {
result1 string
}{result1}
}
func (fake *FakeAccessToken) ValueReturnsOnCall(i int, result1 string) {
fake.ValueStub = nil
if fake.valueReturnsOnCall == nil {
fake.valueReturnsOnCall = make(map[int]struct {
result1 string
})
}
fake.valueReturnsOnCall[i] = struct {
result1 string
}{result1}
}
func (fake *FakeAccessToken) IsValid() bool {
fake.isValidMutex.Lock()
ret, specificReturn := fake.isValidReturnsOnCall[len(fake.isValidArgsForCall)]
fake.isValidArgsForCall = append(fake.isValidArgsForCall, struct{}{})
fake.recordInvocation("IsValid", []interface{}{})
fake.isValidMutex.Unlock()
if fake.IsValidStub != nil {
return fake.IsValidStub()
}
if specificReturn {
return ret.result1
}
return fake.isValidReturns.result1
}
func (fake *FakeAccessToken) IsValidCallCount() int {
fake.isValidMutex.RLock()
defer fake.isValidMutex.RUnlock()
return len(fake.isValidArgsForCall)
}
func (fake *FakeAccessToken) IsValidReturns(result1 bool) {
fake.IsValidStub = nil
fake.isValidReturns = struct {
result1 bool
}{result1}
}
func (fake *FakeAccessToken) IsValidReturnsOnCall(i int, result1 bool) {
fake.IsValidStub = nil
if fake.isValidReturnsOnCall == nil {
fake.isValidReturnsOnCall = make(map[int]struct {
result1 bool
})
}
fake.isValidReturnsOnCall[i] = struct {
result1 bool
}{result1}
}
func (fake *FakeAccessToken) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.typeMutex.RLock()
defer fake.typeMutex.RUnlock()
fake.valueMutex.RLock()
defer fake.valueMutex.RUnlock()
fake.isValidMutex.RLock()
defer fake.isValidMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *FakeAccessToken) 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 _ uaa.AccessToken = new(FakeAccessToken)