forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_new_channel.go
149 lines (132 loc) · 3.83 KB
/
fake_new_channel.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
// This file was generated by counterfeiter
package fake_ssh
import (
"sync"
"golang.org/x/crypto/ssh"
)
type FakeNewChannel struct {
AcceptStub func() (ssh.Channel, <-chan *ssh.Request, error)
acceptMutex sync.RWMutex
acceptArgsForCall []struct{}
acceptReturns struct {
result1 ssh.Channel
result2 <-chan *ssh.Request
result3 error
}
RejectStub func(reason ssh.RejectionReason, message string) error
rejectMutex sync.RWMutex
rejectArgsForCall []struct {
reason ssh.RejectionReason
message string
}
rejectReturns struct {
result1 error
}
ChannelTypeStub func() string
channelTypeMutex sync.RWMutex
channelTypeArgsForCall []struct{}
channelTypeReturns struct {
result1 string
}
ExtraDataStub func() []byte
extraDataMutex sync.RWMutex
extraDataArgsForCall []struct{}
extraDataReturns struct {
result1 []byte
}
}
func (fake *FakeNewChannel) Accept() (ssh.Channel, <-chan *ssh.Request, error) {
fake.acceptMutex.Lock()
fake.acceptArgsForCall = append(fake.acceptArgsForCall, struct{}{})
fake.acceptMutex.Unlock()
if fake.AcceptStub != nil {
return fake.AcceptStub()
} else {
return fake.acceptReturns.result1, fake.acceptReturns.result2, fake.acceptReturns.result3
}
}
func (fake *FakeNewChannel) AcceptCallCount() int {
fake.acceptMutex.RLock()
defer fake.acceptMutex.RUnlock()
return len(fake.acceptArgsForCall)
}
func (fake *FakeNewChannel) AcceptReturns(result1 ssh.Channel, result2 <-chan *ssh.Request, result3 error) {
fake.AcceptStub = nil
fake.acceptReturns = struct {
result1 ssh.Channel
result2 <-chan *ssh.Request
result3 error
}{result1, result2, result3}
}
func (fake *FakeNewChannel) Reject(reason ssh.RejectionReason, message string) error {
fake.rejectMutex.Lock()
fake.rejectArgsForCall = append(fake.rejectArgsForCall, struct {
reason ssh.RejectionReason
message string
}{reason, message})
fake.rejectMutex.Unlock()
if fake.RejectStub != nil {
return fake.RejectStub(reason, message)
} else {
return fake.rejectReturns.result1
}
}
func (fake *FakeNewChannel) RejectCallCount() int {
fake.rejectMutex.RLock()
defer fake.rejectMutex.RUnlock()
return len(fake.rejectArgsForCall)
}
func (fake *FakeNewChannel) RejectArgsForCall(i int) (ssh.RejectionReason, string) {
fake.rejectMutex.RLock()
defer fake.rejectMutex.RUnlock()
return fake.rejectArgsForCall[i].reason, fake.rejectArgsForCall[i].message
}
func (fake *FakeNewChannel) RejectReturns(result1 error) {
fake.RejectStub = nil
fake.rejectReturns = struct {
result1 error
}{result1}
}
func (fake *FakeNewChannel) ChannelType() string {
fake.channelTypeMutex.Lock()
fake.channelTypeArgsForCall = append(fake.channelTypeArgsForCall, struct{}{})
fake.channelTypeMutex.Unlock()
if fake.ChannelTypeStub != nil {
return fake.ChannelTypeStub()
} else {
return fake.channelTypeReturns.result1
}
}
func (fake *FakeNewChannel) ChannelTypeCallCount() int {
fake.channelTypeMutex.RLock()
defer fake.channelTypeMutex.RUnlock()
return len(fake.channelTypeArgsForCall)
}
func (fake *FakeNewChannel) ChannelTypeReturns(result1 string) {
fake.ChannelTypeStub = nil
fake.channelTypeReturns = struct {
result1 string
}{result1}
}
func (fake *FakeNewChannel) ExtraData() []byte {
fake.extraDataMutex.Lock()
fake.extraDataArgsForCall = append(fake.extraDataArgsForCall, struct{}{})
fake.extraDataMutex.Unlock()
if fake.ExtraDataStub != nil {
return fake.ExtraDataStub()
} else {
return fake.extraDataReturns.result1
}
}
func (fake *FakeNewChannel) ExtraDataCallCount() int {
fake.extraDataMutex.RLock()
defer fake.extraDataMutex.RUnlock()
return len(fake.extraDataArgsForCall)
}
func (fake *FakeNewChannel) ExtraDataReturns(result1 []byte) {
fake.ExtraDataStub = nil
fake.extraDataReturns = struct {
result1 []byte
}{result1}
}
var _ ssh.NewChannel = new(FakeNewChannel)