-
Notifications
You must be signed in to change notification settings - Fork 162
/
fake_access_token.go
135 lines (119 loc) · 3.23 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
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/uaa"
)
type FakeAccessToken struct {
TypeStub func() string
typeMutex sync.RWMutex
typeArgsForCall []struct{}
typeReturns struct {
result1 string
}
ValueStub func() string
valueMutex sync.RWMutex
valueArgsForCall []struct{}
valueReturns struct {
result1 string
}
RefreshTokenStub func() uaa.Token
refreshTokenMutex sync.RWMutex
refreshTokenArgsForCall []struct{}
refreshTokenReturns struct {
result1 uaa.Token
}
RefreshStub func() (uaa.AccessToken, error)
refreshMutex sync.RWMutex
refreshArgsForCall []struct{}
refreshReturns struct {
result1 uaa.AccessToken
result2 error
}
}
func (fake *FakeAccessToken) Type() string {
fake.typeMutex.Lock()
fake.typeArgsForCall = append(fake.typeArgsForCall, struct{}{})
fake.typeMutex.Unlock()
if fake.TypeStub != nil {
return fake.TypeStub()
} else {
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) Value() string {
fake.valueMutex.Lock()
fake.valueArgsForCall = append(fake.valueArgsForCall, struct{}{})
fake.valueMutex.Unlock()
if fake.ValueStub != nil {
return fake.ValueStub()
} else {
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) RefreshToken() uaa.Token {
fake.refreshTokenMutex.Lock()
fake.refreshTokenArgsForCall = append(fake.refreshTokenArgsForCall, struct{}{})
fake.refreshTokenMutex.Unlock()
if fake.RefreshTokenStub != nil {
return fake.RefreshTokenStub()
} else {
return fake.refreshTokenReturns.result1
}
}
func (fake *FakeAccessToken) RefreshTokenCallCount() int {
fake.refreshTokenMutex.RLock()
defer fake.refreshTokenMutex.RUnlock()
return len(fake.refreshTokenArgsForCall)
}
func (fake *FakeAccessToken) RefreshTokenReturns(result1 uaa.Token) {
fake.RefreshTokenStub = nil
fake.refreshTokenReturns = struct {
result1 uaa.Token
}{result1}
}
func (fake *FakeAccessToken) Refresh() (uaa.AccessToken, error) {
fake.refreshMutex.Lock()
fake.refreshArgsForCall = append(fake.refreshArgsForCall, struct{}{})
fake.refreshMutex.Unlock()
if fake.RefreshStub != nil {
return fake.RefreshStub()
} else {
return fake.refreshReturns.result1, fake.refreshReturns.result2
}
}
func (fake *FakeAccessToken) RefreshCallCount() int {
fake.refreshMutex.RLock()
defer fake.refreshMutex.RUnlock()
return len(fake.refreshArgsForCall)
}
func (fake *FakeAccessToken) RefreshReturns(result1 uaa.AccessToken, result2 error) {
fake.RefreshStub = nil
fake.refreshReturns = struct {
result1 uaa.AccessToken
result2 error
}{result1, result2}
}
var _ uaa.AccessToken = new(FakeAccessToken)