/
Health_WatchServer_mock.go
325 lines (261 loc) · 9.23 KB
/
Health_WatchServer_mock.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mockhealthv1
import (
context "context"
healthv1 "github.com/deepsquare-io/grid/supervisor/generated/grpc/health/v1"
metadata "google.golang.org/grpc/metadata"
mock "github.com/stretchr/testify/mock"
)
// Health_WatchServer is an autogenerated mock type for the Health_WatchServer type
type Health_WatchServer struct {
mock.Mock
}
type Health_WatchServer_Expecter struct {
mock *mock.Mock
}
func (_m *Health_WatchServer) EXPECT() *Health_WatchServer_Expecter {
return &Health_WatchServer_Expecter{mock: &_m.Mock}
}
// Context provides a mock function with given fields:
func (_m *Health_WatchServer) Context() context.Context {
ret := _m.Called()
var r0 context.Context
if rf, ok := ret.Get(0).(func() context.Context); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(context.Context)
}
}
return r0
}
// Health_WatchServer_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context'
type Health_WatchServer_Context_Call struct {
*mock.Call
}
// Context is a helper method to define mock.On call
func (_e *Health_WatchServer_Expecter) Context() *Health_WatchServer_Context_Call {
return &Health_WatchServer_Context_Call{Call: _e.mock.On("Context")}
}
func (_c *Health_WatchServer_Context_Call) Run(run func()) *Health_WatchServer_Context_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Health_WatchServer_Context_Call) Return(_a0 context.Context) *Health_WatchServer_Context_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Health_WatchServer_Context_Call) RunAndReturn(run func() context.Context) *Health_WatchServer_Context_Call {
_c.Call.Return(run)
return _c
}
// RecvMsg provides a mock function with given fields: m
func (_m *Health_WatchServer) RecvMsg(m interface{}) error {
ret := _m.Called(m)
var r0 error
if rf, ok := ret.Get(0).(func(interface{}) error); ok {
r0 = rf(m)
} else {
r0 = ret.Error(0)
}
return r0
}
// Health_WatchServer_RecvMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecvMsg'
type Health_WatchServer_RecvMsg_Call struct {
*mock.Call
}
// RecvMsg is a helper method to define mock.On call
// - m interface{}
func (_e *Health_WatchServer_Expecter) RecvMsg(m interface{}) *Health_WatchServer_RecvMsg_Call {
return &Health_WatchServer_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)}
}
func (_c *Health_WatchServer_RecvMsg_Call) Run(run func(m interface{})) *Health_WatchServer_RecvMsg_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(interface{}))
})
return _c
}
func (_c *Health_WatchServer_RecvMsg_Call) Return(_a0 error) *Health_WatchServer_RecvMsg_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Health_WatchServer_RecvMsg_Call) RunAndReturn(run func(interface{}) error) *Health_WatchServer_RecvMsg_Call {
_c.Call.Return(run)
return _c
}
// Send provides a mock function with given fields: _a0
func (_m *Health_WatchServer) Send(_a0 *healthv1.HealthCheckResponse) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(*healthv1.HealthCheckResponse) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
}
// Health_WatchServer_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send'
type Health_WatchServer_Send_Call struct {
*mock.Call
}
// Send is a helper method to define mock.On call
// - _a0 *healthv1.HealthCheckResponse
func (_e *Health_WatchServer_Expecter) Send(_a0 interface{}) *Health_WatchServer_Send_Call {
return &Health_WatchServer_Send_Call{Call: _e.mock.On("Send", _a0)}
}
func (_c *Health_WatchServer_Send_Call) Run(run func(_a0 *healthv1.HealthCheckResponse)) *Health_WatchServer_Send_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*healthv1.HealthCheckResponse))
})
return _c
}
func (_c *Health_WatchServer_Send_Call) Return(_a0 error) *Health_WatchServer_Send_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Health_WatchServer_Send_Call) RunAndReturn(run func(*healthv1.HealthCheckResponse) error) *Health_WatchServer_Send_Call {
_c.Call.Return(run)
return _c
}
// SendHeader provides a mock function with given fields: _a0
func (_m *Health_WatchServer) SendHeader(_a0 metadata.MD) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(metadata.MD) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
}
// Health_WatchServer_SendHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendHeader'
type Health_WatchServer_SendHeader_Call struct {
*mock.Call
}
// SendHeader is a helper method to define mock.On call
// - _a0 metadata.MD
func (_e *Health_WatchServer_Expecter) SendHeader(_a0 interface{}) *Health_WatchServer_SendHeader_Call {
return &Health_WatchServer_SendHeader_Call{Call: _e.mock.On("SendHeader", _a0)}
}
func (_c *Health_WatchServer_SendHeader_Call) Run(run func(_a0 metadata.MD)) *Health_WatchServer_SendHeader_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(metadata.MD))
})
return _c
}
func (_c *Health_WatchServer_SendHeader_Call) Return(_a0 error) *Health_WatchServer_SendHeader_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Health_WatchServer_SendHeader_Call) RunAndReturn(run func(metadata.MD) error) *Health_WatchServer_SendHeader_Call {
_c.Call.Return(run)
return _c
}
// SendMsg provides a mock function with given fields: m
func (_m *Health_WatchServer) SendMsg(m interface{}) error {
ret := _m.Called(m)
var r0 error
if rf, ok := ret.Get(0).(func(interface{}) error); ok {
r0 = rf(m)
} else {
r0 = ret.Error(0)
}
return r0
}
// Health_WatchServer_SendMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMsg'
type Health_WatchServer_SendMsg_Call struct {
*mock.Call
}
// SendMsg is a helper method to define mock.On call
// - m interface{}
func (_e *Health_WatchServer_Expecter) SendMsg(m interface{}) *Health_WatchServer_SendMsg_Call {
return &Health_WatchServer_SendMsg_Call{Call: _e.mock.On("SendMsg", m)}
}
func (_c *Health_WatchServer_SendMsg_Call) Run(run func(m interface{})) *Health_WatchServer_SendMsg_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(interface{}))
})
return _c
}
func (_c *Health_WatchServer_SendMsg_Call) Return(_a0 error) *Health_WatchServer_SendMsg_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Health_WatchServer_SendMsg_Call) RunAndReturn(run func(interface{}) error) *Health_WatchServer_SendMsg_Call {
_c.Call.Return(run)
return _c
}
// SetHeader provides a mock function with given fields: _a0
func (_m *Health_WatchServer) SetHeader(_a0 metadata.MD) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(metadata.MD) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
}
// Health_WatchServer_SetHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHeader'
type Health_WatchServer_SetHeader_Call struct {
*mock.Call
}
// SetHeader is a helper method to define mock.On call
// - _a0 metadata.MD
func (_e *Health_WatchServer_Expecter) SetHeader(_a0 interface{}) *Health_WatchServer_SetHeader_Call {
return &Health_WatchServer_SetHeader_Call{Call: _e.mock.On("SetHeader", _a0)}
}
func (_c *Health_WatchServer_SetHeader_Call) Run(run func(_a0 metadata.MD)) *Health_WatchServer_SetHeader_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(metadata.MD))
})
return _c
}
func (_c *Health_WatchServer_SetHeader_Call) Return(_a0 error) *Health_WatchServer_SetHeader_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Health_WatchServer_SetHeader_Call) RunAndReturn(run func(metadata.MD) error) *Health_WatchServer_SetHeader_Call {
_c.Call.Return(run)
return _c
}
// SetTrailer provides a mock function with given fields: _a0
func (_m *Health_WatchServer) SetTrailer(_a0 metadata.MD) {
_m.Called(_a0)
}
// Health_WatchServer_SetTrailer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTrailer'
type Health_WatchServer_SetTrailer_Call struct {
*mock.Call
}
// SetTrailer is a helper method to define mock.On call
// - _a0 metadata.MD
func (_e *Health_WatchServer_Expecter) SetTrailer(_a0 interface{}) *Health_WatchServer_SetTrailer_Call {
return &Health_WatchServer_SetTrailer_Call{Call: _e.mock.On("SetTrailer", _a0)}
}
func (_c *Health_WatchServer_SetTrailer_Call) Run(run func(_a0 metadata.MD)) *Health_WatchServer_SetTrailer_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(metadata.MD))
})
return _c
}
func (_c *Health_WatchServer_SetTrailer_Call) Return() *Health_WatchServer_SetTrailer_Call {
_c.Call.Return()
return _c
}
func (_c *Health_WatchServer_SetTrailer_Call) RunAndReturn(run func(metadata.MD)) *Health_WatchServer_SetTrailer_Call {
_c.Call.Return(run)
return _c
}
// NewHealth_WatchServer creates a new instance of Health_WatchServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewHealth_WatchServer(t interface {
mock.TestingT
Cleanup(func())
}) *Health_WatchServer {
mock := &Health_WatchServer{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}