-
Notifications
You must be signed in to change notification settings - Fork 162
/
fake_uaa.go
159 lines (141 loc) · 5.03 KB
/
fake_uaa.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
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/uaa"
)
type FakeUAA struct {
NewStaleAccessTokenStub func(refreshValue string) uaa.StaleAccessToken
newStaleAccessTokenMutex sync.RWMutex
newStaleAccessTokenArgsForCall []struct {
refreshValue string
}
newStaleAccessTokenReturns struct {
result1 uaa.StaleAccessToken
}
PromptsStub func() ([]uaa.Prompt, error)
promptsMutex sync.RWMutex
promptsArgsForCall []struct{}
promptsReturns struct {
result1 []uaa.Prompt
result2 error
}
ClientCredentialsGrantStub func() (uaa.Token, error)
clientCredentialsGrantMutex sync.RWMutex
clientCredentialsGrantArgsForCall []struct{}
clientCredentialsGrantReturns struct {
result1 uaa.Token
result2 error
}
OwnerPasswordCredentialsGrantStub func([]uaa.PromptAnswer) (uaa.AccessToken, error)
ownerPasswordCredentialsGrantMutex sync.RWMutex
ownerPasswordCredentialsGrantArgsForCall []struct {
arg1 []uaa.PromptAnswer
}
ownerPasswordCredentialsGrantReturns struct {
result1 uaa.AccessToken
result2 error
}
}
func (fake *FakeUAA) NewStaleAccessToken(refreshValue string) uaa.StaleAccessToken {
fake.newStaleAccessTokenMutex.Lock()
fake.newStaleAccessTokenArgsForCall = append(fake.newStaleAccessTokenArgsForCall, struct {
refreshValue string
}{refreshValue})
fake.newStaleAccessTokenMutex.Unlock()
if fake.NewStaleAccessTokenStub != nil {
return fake.NewStaleAccessTokenStub(refreshValue)
} else {
return fake.newStaleAccessTokenReturns.result1
}
}
func (fake *FakeUAA) NewStaleAccessTokenCallCount() int {
fake.newStaleAccessTokenMutex.RLock()
defer fake.newStaleAccessTokenMutex.RUnlock()
return len(fake.newStaleAccessTokenArgsForCall)
}
func (fake *FakeUAA) NewStaleAccessTokenArgsForCall(i int) string {
fake.newStaleAccessTokenMutex.RLock()
defer fake.newStaleAccessTokenMutex.RUnlock()
return fake.newStaleAccessTokenArgsForCall[i].refreshValue
}
func (fake *FakeUAA) NewStaleAccessTokenReturns(result1 uaa.StaleAccessToken) {
fake.NewStaleAccessTokenStub = nil
fake.newStaleAccessTokenReturns = struct {
result1 uaa.StaleAccessToken
}{result1}
}
func (fake *FakeUAA) Prompts() ([]uaa.Prompt, error) {
fake.promptsMutex.Lock()
fake.promptsArgsForCall = append(fake.promptsArgsForCall, struct{}{})
fake.promptsMutex.Unlock()
if fake.PromptsStub != nil {
return fake.PromptsStub()
} else {
return fake.promptsReturns.result1, fake.promptsReturns.result2
}
}
func (fake *FakeUAA) PromptsCallCount() int {
fake.promptsMutex.RLock()
defer fake.promptsMutex.RUnlock()
return len(fake.promptsArgsForCall)
}
func (fake *FakeUAA) PromptsReturns(result1 []uaa.Prompt, result2 error) {
fake.PromptsStub = nil
fake.promptsReturns = struct {
result1 []uaa.Prompt
result2 error
}{result1, result2}
}
func (fake *FakeUAA) ClientCredentialsGrant() (uaa.Token, error) {
fake.clientCredentialsGrantMutex.Lock()
fake.clientCredentialsGrantArgsForCall = append(fake.clientCredentialsGrantArgsForCall, struct{}{})
fake.clientCredentialsGrantMutex.Unlock()
if fake.ClientCredentialsGrantStub != nil {
return fake.ClientCredentialsGrantStub()
} else {
return fake.clientCredentialsGrantReturns.result1, fake.clientCredentialsGrantReturns.result2
}
}
func (fake *FakeUAA) ClientCredentialsGrantCallCount() int {
fake.clientCredentialsGrantMutex.RLock()
defer fake.clientCredentialsGrantMutex.RUnlock()
return len(fake.clientCredentialsGrantArgsForCall)
}
func (fake *FakeUAA) ClientCredentialsGrantReturns(result1 uaa.Token, result2 error) {
fake.ClientCredentialsGrantStub = nil
fake.clientCredentialsGrantReturns = struct {
result1 uaa.Token
result2 error
}{result1, result2}
}
func (fake *FakeUAA) OwnerPasswordCredentialsGrant(arg1 []uaa.PromptAnswer) (uaa.AccessToken, error) {
fake.ownerPasswordCredentialsGrantMutex.Lock()
fake.ownerPasswordCredentialsGrantArgsForCall = append(fake.ownerPasswordCredentialsGrantArgsForCall, struct {
arg1 []uaa.PromptAnswer
}{arg1})
fake.ownerPasswordCredentialsGrantMutex.Unlock()
if fake.OwnerPasswordCredentialsGrantStub != nil {
return fake.OwnerPasswordCredentialsGrantStub(arg1)
} else {
return fake.ownerPasswordCredentialsGrantReturns.result1, fake.ownerPasswordCredentialsGrantReturns.result2
}
}
func (fake *FakeUAA) OwnerPasswordCredentialsGrantCallCount() int {
fake.ownerPasswordCredentialsGrantMutex.RLock()
defer fake.ownerPasswordCredentialsGrantMutex.RUnlock()
return len(fake.ownerPasswordCredentialsGrantArgsForCall)
}
func (fake *FakeUAA) OwnerPasswordCredentialsGrantArgsForCall(i int) []uaa.PromptAnswer {
fake.ownerPasswordCredentialsGrantMutex.RLock()
defer fake.ownerPasswordCredentialsGrantMutex.RUnlock()
return fake.ownerPasswordCredentialsGrantArgsForCall[i].arg1
}
func (fake *FakeUAA) OwnerPasswordCredentialsGrantReturns(result1 uaa.AccessToken, result2 error) {
fake.OwnerPasswordCredentialsGrantStub = nil
fake.ownerPasswordCredentialsGrantReturns = struct {
result1 uaa.AccessToken
result2 error
}{result1, result2}
}
var _ uaa.UAA = new(FakeUAA)