portal_client.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 mock "github.com/stretchr/testify/mock"
9)
10
11// NewMockPortalClient creates a new instance of MockPortalClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12// The first argument is typically a *testing.T value.
13func NewMockPortalClient(t interface {
14 mock.TestingT
15 Cleanup(func())
16}) *MockPortalClient {
17 if helper, ok := t.(interface{ Helper() }); ok {
18 helper.Helper()
19 }
20
21 mock := &MockPortalClient{}
22 mock.Mock.Test(t)
23
24 t.Cleanup(func() {
25 if helper, ok := t.(interface{ Helper() }); ok {
26 helper.Helper()
27 }
28 mock.AssertExpectations(t)
29 })
30
31 return mock
32}
33
34// MockPortalClient is an autogenerated mock type for the portalClient type
35type MockPortalClient struct {
36 mock.Mock
37}
38
39type MockPortalClient_Expecter struct {
40 mock *mock.Mock
41}
42
43func (_m *MockPortalClient) EXPECT() *MockPortalClient_Expecter {
44 return &MockPortalClient_Expecter{mock: &_m.Mock}
45}
46
47// Close provides a mock function for the type MockPortalClient
48func (_mock *MockPortalClient) Close() error {
49 ret := _mock.Called()
50
51 if len(ret) == 0 {
52 panic("no return value specified for Close")
53 }
54
55 var r0 error
56 if returnFunc, ok := ret.Get(0).(func() error); ok {
57 r0 = returnFunc()
58 } else {
59 r0 = ret.Error(0)
60 }
61 return r0
62}
63
64// MockPortalClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
65type MockPortalClient_Close_Call struct {
66 *mock.Call
67}
68
69// Close is a helper method to define mock.On call
70func (_e *MockPortalClient_Expecter) Close() *MockPortalClient_Close_Call {
71 return &MockPortalClient_Close_Call{Call: _e.mock.On("Close")}
72}
73
74func (_c *MockPortalClient_Close_Call) Run(run func()) *MockPortalClient_Close_Call {
75 _c.Call.Run(func(args mock.Arguments) {
76 run()
77 })
78 return _c
79}
80
81func (_c *MockPortalClient_Close_Call) Return(err error) *MockPortalClient_Close_Call {
82 _c.Call.Return(err)
83 return _c
84}
85
86func (_c *MockPortalClient_Close_Call) RunAndReturn(run func() error) *MockPortalClient_Close_Call {
87 _c.Call.Return(run)
88 return _c
89}
90
91// CloseRequest provides a mock function for the type MockPortalClient
92func (_mock *MockPortalClient) CloseRequest(handle string) error {
93 ret := _mock.Called(handle)
94
95 if len(ret) == 0 {
96 panic("no return value specified for CloseRequest")
97 }
98
99 var r0 error
100 if returnFunc, ok := ret.Get(0).(func(string) error); ok {
101 r0 = returnFunc(handle)
102 } else {
103 r0 = ret.Error(0)
104 }
105 return r0
106}
107
108// MockPortalClient_CloseRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseRequest'
109type MockPortalClient_CloseRequest_Call struct {
110 *mock.Call
111}
112
113// CloseRequest is a helper method to define mock.On call
114// - handle string
115func (_e *MockPortalClient_Expecter) CloseRequest(handle any) *MockPortalClient_CloseRequest_Call {
116 return &MockPortalClient_CloseRequest_Call{Call: _e.mock.On("CloseRequest", handle)}
117}
118
119func (_c *MockPortalClient_CloseRequest_Call) Run(run func(handle string)) *MockPortalClient_CloseRequest_Call {
120 _c.Call.Run(func(args mock.Arguments) {
121 var arg0 string
122 if args[0] != nil {
123 arg0 = args[0].(string)
124 }
125 run(
126 arg0,
127 )
128 })
129 return _c
130}
131
132func (_c *MockPortalClient_CloseRequest_Call) Return(err error) *MockPortalClient_CloseRequest_Call {
133 _c.Call.Return(err)
134 return _c
135}
136
137func (_c *MockPortalClient_CloseRequest_Call) RunAndReturn(run func(handle string) error) *MockPortalClient_CloseRequest_Call {
138 _c.Call.Return(run)
139 return _c
140}
141
142// Inhibit provides a mock function for the type MockPortalClient
143func (_mock *MockPortalClient) Inhibit(reason string) (string, error) {
144 ret := _mock.Called(reason)
145
146 if len(ret) == 0 {
147 panic("no return value specified for Inhibit")
148 }
149
150 var r0 string
151 var r1 error
152 if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok {
153 return returnFunc(reason)
154 }
155 if returnFunc, ok := ret.Get(0).(func(string) string); ok {
156 r0 = returnFunc(reason)
157 } else {
158 r0 = ret.Get(0).(string)
159 }
160 if returnFunc, ok := ret.Get(1).(func(string) error); ok {
161 r1 = returnFunc(reason)
162 } else {
163 r1 = ret.Error(1)
164 }
165 return r0, r1
166}
167
168// MockPortalClient_Inhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inhibit'
169type MockPortalClient_Inhibit_Call struct {
170 *mock.Call
171}
172
173// Inhibit is a helper method to define mock.On call
174// - reason string
175func (_e *MockPortalClient_Expecter) Inhibit(reason any) *MockPortalClient_Inhibit_Call {
176 return &MockPortalClient_Inhibit_Call{Call: _e.mock.On("Inhibit", reason)}
177}
178
179func (_c *MockPortalClient_Inhibit_Call) Run(run func(reason string)) *MockPortalClient_Inhibit_Call {
180 _c.Call.Run(func(args mock.Arguments) {
181 var arg0 string
182 if args[0] != nil {
183 arg0 = args[0].(string)
184 }
185 run(
186 arg0,
187 )
188 })
189 return _c
190}
191
192func (_c *MockPortalClient_Inhibit_Call) Return(s string, err error) *MockPortalClient_Inhibit_Call {
193 _c.Call.Return(s, err)
194 return _c
195}
196
197func (_c *MockPortalClient_Inhibit_Call) RunAndReturn(run func(reason string) (string, error)) *MockPortalClient_Inhibit_Call {
198 _c.Call.Return(run)
199 return _c
200}
201
202// Version provides a mock function for the type MockPortalClient
203func (_mock *MockPortalClient) Version() (uint32, error) {
204 ret := _mock.Called()
205
206 if len(ret) == 0 {
207 panic("no return value specified for Version")
208 }
209
210 var r0 uint32
211 var r1 error
212 if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok {
213 return returnFunc()
214 }
215 if returnFunc, ok := ret.Get(0).(func() uint32); ok {
216 r0 = returnFunc()
217 } else {
218 r0 = ret.Get(0).(uint32)
219 }
220 if returnFunc, ok := ret.Get(1).(func() error); ok {
221 r1 = returnFunc()
222 } else {
223 r1 = ret.Error(1)
224 }
225 return r0, r1
226}
227
228// MockPortalClient_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version'
229type MockPortalClient_Version_Call struct {
230 *mock.Call
231}
232
233// Version is a helper method to define mock.On call
234func (_e *MockPortalClient_Expecter) Version() *MockPortalClient_Version_Call {
235 return &MockPortalClient_Version_Call{Call: _e.mock.On("Version")}
236}
237
238func (_c *MockPortalClient_Version_Call) Run(run func()) *MockPortalClient_Version_Call {
239 _c.Call.Run(func(args mock.Arguments) {
240 run()
241 })
242 return _c
243}
244
245func (_c *MockPortalClient_Version_Call) Return(v uint32, err error) *MockPortalClient_Version_Call {
246 _c.Call.Return(v, err)
247 return _c
248}
249
250func (_c *MockPortalClient_Version_Call) RunAndReturn(run func() (uint32, error)) *MockPortalClient_Version_Call {
251 _c.Call.Return(run)
252 return _c
253}