forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_uaaclient.go
105 lines (94 loc) · 3.12 KB
/
fake_uaaclient.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
// Code generated by counterfeiter. DO NOT EDIT.
package v3actionfakes
import (
"sync"
"code.cloudfoundry.org/cli/actor/v3action"
)
type FakeUAAClient struct {
GetSSHPasscodeStub func(accessToken string, sshOAuthClient string) (string, error)
getSSHPasscodeMutex sync.RWMutex
getSSHPasscodeArgsForCall []struct {
accessToken string
sshOAuthClient string
}
getSSHPasscodeReturns struct {
result1 string
result2 error
}
getSSHPasscodeReturnsOnCall map[int]struct {
result1 string
result2 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeUAAClient) GetSSHPasscode(accessToken string, sshOAuthClient string) (string, error) {
fake.getSSHPasscodeMutex.Lock()
ret, specificReturn := fake.getSSHPasscodeReturnsOnCall[len(fake.getSSHPasscodeArgsForCall)]
fake.getSSHPasscodeArgsForCall = append(fake.getSSHPasscodeArgsForCall, struct {
accessToken string
sshOAuthClient string
}{accessToken, sshOAuthClient})
fake.recordInvocation("GetSSHPasscode", []interface{}{accessToken, sshOAuthClient})
fake.getSSHPasscodeMutex.Unlock()
if fake.GetSSHPasscodeStub != nil {
return fake.GetSSHPasscodeStub(accessToken, sshOAuthClient)
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.getSSHPasscodeReturns.result1, fake.getSSHPasscodeReturns.result2
}
func (fake *FakeUAAClient) GetSSHPasscodeCallCount() int {
fake.getSSHPasscodeMutex.RLock()
defer fake.getSSHPasscodeMutex.RUnlock()
return len(fake.getSSHPasscodeArgsForCall)
}
func (fake *FakeUAAClient) GetSSHPasscodeArgsForCall(i int) (string, string) {
fake.getSSHPasscodeMutex.RLock()
defer fake.getSSHPasscodeMutex.RUnlock()
return fake.getSSHPasscodeArgsForCall[i].accessToken, fake.getSSHPasscodeArgsForCall[i].sshOAuthClient
}
func (fake *FakeUAAClient) GetSSHPasscodeReturns(result1 string, result2 error) {
fake.GetSSHPasscodeStub = nil
fake.getSSHPasscodeReturns = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *FakeUAAClient) GetSSHPasscodeReturnsOnCall(i int, result1 string, result2 error) {
fake.GetSSHPasscodeStub = nil
if fake.getSSHPasscodeReturnsOnCall == nil {
fake.getSSHPasscodeReturnsOnCall = make(map[int]struct {
result1 string
result2 error
})
}
fake.getSSHPasscodeReturnsOnCall[i] = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *FakeUAAClient) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.getSSHPasscodeMutex.RLock()
defer fake.getSSHPasscodeMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *FakeUAAClient) 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 _ v3action.UAAClient = new(FakeUAAClient)