1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "github.com/bnema/dumber/internal/domain/favicon"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockFaviconBlobStore creates a new instance of MockFaviconBlobStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockFaviconBlobStore(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MockFaviconBlobStore {
20 mock := &MockFaviconBlobStore{}
21 mock.Mock.Test(t)
22
23 t.Cleanup(func() { mock.AssertExpectations(t) })
24
25 return mock
26}
27
28// MockFaviconBlobStore is an autogenerated mock type for the FaviconBlobStore type
29type MockFaviconBlobStore struct {
30 mock.Mock
31}
32
33type MockFaviconBlobStore_Expecter struct {
34 mock *mock.Mock
35}
36
37func (_m *MockFaviconBlobStore) EXPECT() *MockFaviconBlobStore_Expecter {
38 return &MockFaviconBlobStore_Expecter{mock: &_m.Mock}
39}
40
41// ReadOriginal provides a mock function for the type MockFaviconBlobStore
42func (_mock *MockFaviconBlobStore) ReadOriginal(ctx context.Context, key favicon.Key) ([]byte, string, error) {
43 ret := _mock.Called(ctx, key)
44
45 if len(ret) == 0 {
46 panic("no return value specified for ReadOriginal")
47 }
48
49 var r0 []byte
50 var r1 string
51 var r2 error
52 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) ([]byte, string, error)); ok {
53 return returnFunc(ctx, key)
54 }
55 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) []byte); ok {
56 r0 = returnFunc(ctx, key)
57 } else {
58 if ret.Get(0) != nil {
59 r0 = ret.Get(0).([]byte)
60 }
61 }
62 if returnFunc, ok := ret.Get(1).(func(context.Context, favicon.Key) string); ok {
63 r1 = returnFunc(ctx, key)
64 } else {
65 r1 = ret.Get(1).(string)
66 }
67 if returnFunc, ok := ret.Get(2).(func(context.Context, favicon.Key) error); ok {
68 r2 = returnFunc(ctx, key)
69 } else {
70 r2 = ret.Error(2)
71 }
72 return r0, r1, r2
73}
74
75// MockFaviconBlobStore_ReadOriginal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadOriginal'
76type MockFaviconBlobStore_ReadOriginal_Call struct {
77 *mock.Call
78}
79
80// ReadOriginal is a helper method to define mock.On call
81// - ctx context.Context
82// - key favicon.Key
83func (_e *MockFaviconBlobStore_Expecter) ReadOriginal(ctx any, key any) *MockFaviconBlobStore_ReadOriginal_Call {
84 return &MockFaviconBlobStore_ReadOriginal_Call{Call: _e.mock.On("ReadOriginal", ctx, key)}
85}
86
87func (_c *MockFaviconBlobStore_ReadOriginal_Call) Run(run func(ctx context.Context, key favicon.Key)) *MockFaviconBlobStore_ReadOriginal_Call {
88 _c.Call.Run(func(args mock.Arguments) {
89 var arg0 context.Context
90 if args[0] != nil {
91 arg0 = args[0].(context.Context)
92 }
93 var arg1 favicon.Key
94 if args[1] != nil {
95 arg1 = args[1].(favicon.Key)
96 }
97 run(
98 arg0,
99 arg1,
100 )
101 })
102 return _c
103}
104
105func (_c *MockFaviconBlobStore_ReadOriginal_Call) Return(bytes []byte, s string, err error) *MockFaviconBlobStore_ReadOriginal_Call {
106 _c.Call.Return(bytes, s, err)
107 return _c
108}
109
110func (_c *MockFaviconBlobStore_ReadOriginal_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key) ([]byte, string, error)) *MockFaviconBlobStore_ReadOriginal_Call {
111 _c.Call.Return(run)
112 return _c
113}
114
115// ReadPNG provides a mock function for the type MockFaviconBlobStore
116func (_mock *MockFaviconBlobStore) ReadPNG(ctx context.Context, key favicon.Key) ([]byte, string, error) {
117 ret := _mock.Called(ctx, key)
118
119 if len(ret) == 0 {
120 panic("no return value specified for ReadPNG")
121 }
122
123 var r0 []byte
124 var r1 string
125 var r2 error
126 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) ([]byte, string, error)); ok {
127 return returnFunc(ctx, key)
128 }
129 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) []byte); ok {
130 r0 = returnFunc(ctx, key)
131 } else {
132 if ret.Get(0) != nil {
133 r0 = ret.Get(0).([]byte)
134 }
135 }
136 if returnFunc, ok := ret.Get(1).(func(context.Context, favicon.Key) string); ok {
137 r1 = returnFunc(ctx, key)
138 } else {
139 r1 = ret.Get(1).(string)
140 }
141 if returnFunc, ok := ret.Get(2).(func(context.Context, favicon.Key) error); ok {
142 r2 = returnFunc(ctx, key)
143 } else {
144 r2 = ret.Error(2)
145 }
146 return r0, r1, r2
147}
148
149// MockFaviconBlobStore_ReadPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadPNG'
150type MockFaviconBlobStore_ReadPNG_Call struct {
151 *mock.Call
152}
153
154// ReadPNG is a helper method to define mock.On call
155// - ctx context.Context
156// - key favicon.Key
157func (_e *MockFaviconBlobStore_Expecter) ReadPNG(ctx any, key any) *MockFaviconBlobStore_ReadPNG_Call {
158 return &MockFaviconBlobStore_ReadPNG_Call{Call: _e.mock.On("ReadPNG", ctx, key)}
159}
160
161func (_c *MockFaviconBlobStore_ReadPNG_Call) Run(run func(ctx context.Context, key favicon.Key)) *MockFaviconBlobStore_ReadPNG_Call {
162 _c.Call.Run(func(args mock.Arguments) {
163 var arg0 context.Context
164 if args[0] != nil {
165 arg0 = args[0].(context.Context)
166 }
167 var arg1 favicon.Key
168 if args[1] != nil {
169 arg1 = args[1].(favicon.Key)
170 }
171 run(
172 arg0,
173 arg1,
174 )
175 })
176 return _c
177}
178
179func (_c *MockFaviconBlobStore_ReadPNG_Call) Return(bytes []byte, s string, err error) *MockFaviconBlobStore_ReadPNG_Call {
180 _c.Call.Return(bytes, s, err)
181 return _c
182}
183
184func (_c *MockFaviconBlobStore_ReadPNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key) ([]byte, string, error)) *MockFaviconBlobStore_ReadPNG_Call {
185 _c.Call.Return(run)
186 return _c
187}
188
189// ReadSizedPNG provides a mock function for the type MockFaviconBlobStore
190func (_mock *MockFaviconBlobStore) ReadSizedPNG(ctx context.Context, key favicon.Key, size int) ([]byte, string, error) {
191 ret := _mock.Called(ctx, key, size)
192
193 if len(ret) == 0 {
194 panic("no return value specified for ReadSizedPNG")
195 }
196
197 var r0 []byte
198 var r1 string
199 var r2 error
200 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, int) ([]byte, string, error)); ok {
201 return returnFunc(ctx, key, size)
202 }
203 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, int) []byte); ok {
204 r0 = returnFunc(ctx, key, size)
205 } else {
206 if ret.Get(0) != nil {
207 r0 = ret.Get(0).([]byte)
208 }
209 }
210 if returnFunc, ok := ret.Get(1).(func(context.Context, favicon.Key, int) string); ok {
211 r1 = returnFunc(ctx, key, size)
212 } else {
213 r1 = ret.Get(1).(string)
214 }
215 if returnFunc, ok := ret.Get(2).(func(context.Context, favicon.Key, int) error); ok {
216 r2 = returnFunc(ctx, key, size)
217 } else {
218 r2 = ret.Error(2)
219 }
220 return r0, r1, r2
221}
222
223// MockFaviconBlobStore_ReadSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadSizedPNG'
224type MockFaviconBlobStore_ReadSizedPNG_Call struct {
225 *mock.Call
226}
227
228// ReadSizedPNG is a helper method to define mock.On call
229// - ctx context.Context
230// - key favicon.Key
231// - size int
232func (_e *MockFaviconBlobStore_Expecter) ReadSizedPNG(ctx any, key any, size any) *MockFaviconBlobStore_ReadSizedPNG_Call {
233 return &MockFaviconBlobStore_ReadSizedPNG_Call{Call: _e.mock.On("ReadSizedPNG", ctx, key, size)}
234}
235
236func (_c *MockFaviconBlobStore_ReadSizedPNG_Call) Run(run func(ctx context.Context, key favicon.Key, size int)) *MockFaviconBlobStore_ReadSizedPNG_Call {
237 _c.Call.Run(func(args mock.Arguments) {
238 var arg0 context.Context
239 if args[0] != nil {
240 arg0 = args[0].(context.Context)
241 }
242 var arg1 favicon.Key
243 if args[1] != nil {
244 arg1 = args[1].(favicon.Key)
245 }
246 var arg2 int
247 if args[2] != nil {
248 arg2 = args[2].(int)
249 }
250 run(
251 arg0,
252 arg1,
253 arg2,
254 )
255 })
256 return _c
257}
258
259func (_c *MockFaviconBlobStore_ReadSizedPNG_Call) Return(bytes []byte, s string, err error) *MockFaviconBlobStore_ReadSizedPNG_Call {
260 _c.Call.Return(bytes, s, err)
261 return _c
262}
263
264func (_c *MockFaviconBlobStore_ReadSizedPNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, size int) ([]byte, string, error)) *MockFaviconBlobStore_ReadSizedPNG_Call {
265 _c.Call.Return(run)
266 return _c
267}
268
269// RemoveDerived provides a mock function for the type MockFaviconBlobStore
270func (_mock *MockFaviconBlobStore) RemoveDerived(ctx context.Context, key favicon.Key) error {
271 ret := _mock.Called(ctx, key)
272
273 if len(ret) == 0 {
274 panic("no return value specified for RemoveDerived")
275 }
276
277 var r0 error
278 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key) error); ok {
279 r0 = returnFunc(ctx, key)
280 } else {
281 r0 = ret.Error(0)
282 }
283 return r0
284}
285
286// MockFaviconBlobStore_RemoveDerived_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDerived'
287type MockFaviconBlobStore_RemoveDerived_Call struct {
288 *mock.Call
289}
290
291// RemoveDerived is a helper method to define mock.On call
292// - ctx context.Context
293// - key favicon.Key
294func (_e *MockFaviconBlobStore_Expecter) RemoveDerived(ctx any, key any) *MockFaviconBlobStore_RemoveDerived_Call {
295 return &MockFaviconBlobStore_RemoveDerived_Call{Call: _e.mock.On("RemoveDerived", ctx, key)}
296}
297
298func (_c *MockFaviconBlobStore_RemoveDerived_Call) Run(run func(ctx context.Context, key favicon.Key)) *MockFaviconBlobStore_RemoveDerived_Call {
299 _c.Call.Run(func(args mock.Arguments) {
300 var arg0 context.Context
301 if args[0] != nil {
302 arg0 = args[0].(context.Context)
303 }
304 var arg1 favicon.Key
305 if args[1] != nil {
306 arg1 = args[1].(favicon.Key)
307 }
308 run(
309 arg0,
310 arg1,
311 )
312 })
313 return _c
314}
315
316func (_c *MockFaviconBlobStore_RemoveDerived_Call) Return(err error) *MockFaviconBlobStore_RemoveDerived_Call {
317 _c.Call.Return(err)
318 return _c
319}
320
321func (_c *MockFaviconBlobStore_RemoveDerived_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key) error) *MockFaviconBlobStore_RemoveDerived_Call {
322 _c.Call.Return(run)
323 return _c
324}
325
326// WriteOriginal provides a mock function for the type MockFaviconBlobStore
327func (_mock *MockFaviconBlobStore) WriteOriginal(ctx context.Context, key favicon.Key, data []byte, contentType string) error {
328 ret := _mock.Called(ctx, key, data, contentType)
329
330 if len(ret) == 0 {
331 panic("no return value specified for WriteOriginal")
332 }
333
334 var r0 error
335 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, []byte, string) error); ok {
336 r0 = returnFunc(ctx, key, data, contentType)
337 } else {
338 r0 = ret.Error(0)
339 }
340 return r0
341}
342
343// MockFaviconBlobStore_WriteOriginal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteOriginal'
344type MockFaviconBlobStore_WriteOriginal_Call struct {
345 *mock.Call
346}
347
348// WriteOriginal is a helper method to define mock.On call
349// - ctx context.Context
350// - key favicon.Key
351// - data []byte
352// - contentType string
353func (_e *MockFaviconBlobStore_Expecter) WriteOriginal(ctx any, key any, data any, contentType any) *MockFaviconBlobStore_WriteOriginal_Call {
354 return &MockFaviconBlobStore_WriteOriginal_Call{Call: _e.mock.On("WriteOriginal", ctx, key, data, contentType)}
355}
356
357func (_c *MockFaviconBlobStore_WriteOriginal_Call) Run(run func(ctx context.Context, key favicon.Key, data []byte, contentType string)) *MockFaviconBlobStore_WriteOriginal_Call {
358 _c.Call.Run(func(args mock.Arguments) {
359 var arg0 context.Context
360 if args[0] != nil {
361 arg0 = args[0].(context.Context)
362 }
363 var arg1 favicon.Key
364 if args[1] != nil {
365 arg1 = args[1].(favicon.Key)
366 }
367 var arg2 []byte
368 if args[2] != nil {
369 arg2 = args[2].([]byte)
370 }
371 var arg3 string
372 if args[3] != nil {
373 arg3 = args[3].(string)
374 }
375 run(
376 arg0,
377 arg1,
378 arg2,
379 arg3,
380 )
381 })
382 return _c
383}
384
385func (_c *MockFaviconBlobStore_WriteOriginal_Call) Return(err error) *MockFaviconBlobStore_WriteOriginal_Call {
386 _c.Call.Return(err)
387 return _c
388}
389
390func (_c *MockFaviconBlobStore_WriteOriginal_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, data []byte, contentType string) error) *MockFaviconBlobStore_WriteOriginal_Call {
391 _c.Call.Return(run)
392 return _c
393}
394
395// WritePNG provides a mock function for the type MockFaviconBlobStore
396func (_mock *MockFaviconBlobStore) WritePNG(ctx context.Context, key favicon.Key, data []byte) error {
397 ret := _mock.Called(ctx, key, data)
398
399 if len(ret) == 0 {
400 panic("no return value specified for WritePNG")
401 }
402
403 var r0 error
404 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, []byte) error); ok {
405 r0 = returnFunc(ctx, key, data)
406 } else {
407 r0 = ret.Error(0)
408 }
409 return r0
410}
411
412// MockFaviconBlobStore_WritePNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WritePNG'
413type MockFaviconBlobStore_WritePNG_Call struct {
414 *mock.Call
415}
416
417// WritePNG is a helper method to define mock.On call
418// - ctx context.Context
419// - key favicon.Key
420// - data []byte
421func (_e *MockFaviconBlobStore_Expecter) WritePNG(ctx any, key any, data any) *MockFaviconBlobStore_WritePNG_Call {
422 return &MockFaviconBlobStore_WritePNG_Call{Call: _e.mock.On("WritePNG", ctx, key, data)}
423}
424
425func (_c *MockFaviconBlobStore_WritePNG_Call) Run(run func(ctx context.Context, key favicon.Key, data []byte)) *MockFaviconBlobStore_WritePNG_Call {
426 _c.Call.Run(func(args mock.Arguments) {
427 var arg0 context.Context
428 if args[0] != nil {
429 arg0 = args[0].(context.Context)
430 }
431 var arg1 favicon.Key
432 if args[1] != nil {
433 arg1 = args[1].(favicon.Key)
434 }
435 var arg2 []byte
436 if args[2] != nil {
437 arg2 = args[2].([]byte)
438 }
439 run(
440 arg0,
441 arg1,
442 arg2,
443 )
444 })
445 return _c
446}
447
448func (_c *MockFaviconBlobStore_WritePNG_Call) Return(err error) *MockFaviconBlobStore_WritePNG_Call {
449 _c.Call.Return(err)
450 return _c
451}
452
453func (_c *MockFaviconBlobStore_WritePNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, data []byte) error) *MockFaviconBlobStore_WritePNG_Call {
454 _c.Call.Return(run)
455 return _c
456}
457
458// WriteSizedPNG provides a mock function for the type MockFaviconBlobStore
459func (_mock *MockFaviconBlobStore) WriteSizedPNG(ctx context.Context, key favicon.Key, size int, data []byte) error {
460 ret := _mock.Called(ctx, key, size, data)
461
462 if len(ret) == 0 {
463 panic("no return value specified for WriteSizedPNG")
464 }
465
466 var r0 error
467 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, int, []byte) error); ok {
468 r0 = returnFunc(ctx, key, size, data)
469 } else {
470 r0 = ret.Error(0)
471 }
472 return r0
473}
474
475// MockFaviconBlobStore_WriteSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteSizedPNG'
476type MockFaviconBlobStore_WriteSizedPNG_Call struct {
477 *mock.Call
478}
479
480// WriteSizedPNG is a helper method to define mock.On call
481// - ctx context.Context
482// - key favicon.Key
483// - size int
484// - data []byte
485func (_e *MockFaviconBlobStore_Expecter) WriteSizedPNG(ctx any, key any, size any, data any) *MockFaviconBlobStore_WriteSizedPNG_Call {
486 return &MockFaviconBlobStore_WriteSizedPNG_Call{Call: _e.mock.On("WriteSizedPNG", ctx, key, size, data)}
487}
488
489func (_c *MockFaviconBlobStore_WriteSizedPNG_Call) Run(run func(ctx context.Context, key favicon.Key, size int, data []byte)) *MockFaviconBlobStore_WriteSizedPNG_Call {
490 _c.Call.Run(func(args mock.Arguments) {
491 var arg0 context.Context
492 if args[0] != nil {
493 arg0 = args[0].(context.Context)
494 }
495 var arg1 favicon.Key
496 if args[1] != nil {
497 arg1 = args[1].(favicon.Key)
498 }
499 var arg2 int
500 if args[2] != nil {
501 arg2 = args[2].(int)
502 }
503 var arg3 []byte
504 if args[3] != nil {
505 arg3 = args[3].([]byte)
506 }
507 run(
508 arg0,
509 arg1,
510 arg2,
511 arg3,
512 )
513 })
514 return _c
515}
516
517func (_c *MockFaviconBlobStore_WriteSizedPNG_Call) Return(err error) *MockFaviconBlobStore_WriteSizedPNG_Call {
518 _c.Call.Return(err)
519 return _c
520}
521
522func (_c *MockFaviconBlobStore_WriteSizedPNG_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, size int, data []byte) error) *MockFaviconBlobStore_WriteSizedPNG_Call {
523 _c.Call.Return(run)
524 return _c
525}