1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9 "time"
10
11 "github.com/bnema/dumber/internal/domain/entity"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockFavoriteRepository creates a new instance of MockFavoriteRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMockFavoriteRepository(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *MockFavoriteRepository {
21 mock := &MockFavoriteRepository{}
22 mock.Mock.Test(t)
23
24 t.Cleanup(func() { mock.AssertExpectations(t) })
25
26 return mock
27}
28
29// MockFavoriteRepository is an autogenerated mock type for the FavoriteRepository type
30type MockFavoriteRepository struct {
31 mock.Mock
32}
33
34type MockFavoriteRepository_Expecter struct {
35 mock *mock.Mock
36}
37
38func (_m *MockFavoriteRepository) EXPECT() *MockFavoriteRepository_Expecter {
39 return &MockFavoriteRepository_Expecter{mock: &_m.Mock}
40}
41
42// Delete provides a mock function for the type MockFavoriteRepository
43func (_mock *MockFavoriteRepository) Delete(ctx context.Context, id entity.FavoriteID) error {
44 ret := _mock.Called(ctx, id)
45
46 if len(ret) == 0 {
47 panic("no return value specified for Delete")
48 }
49
50 var r0 error
51 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok {
52 r0 = returnFunc(ctx, id)
53 } else {
54 r0 = ret.Error(0)
55 }
56 return r0
57}
58
59// MockFavoriteRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
60type MockFavoriteRepository_Delete_Call struct {
61 *mock.Call
62}
63
64// Delete is a helper method to define mock.On call
65// - ctx context.Context
66// - id entity.FavoriteID
67func (_e *MockFavoriteRepository_Expecter) Delete(ctx interface{}, id interface{}) *MockFavoriteRepository_Delete_Call {
68 return &MockFavoriteRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
69}
70
71func (_c *MockFavoriteRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_Delete_Call {
72 _c.Call.Run(func(args mock.Arguments) {
73 var arg0 context.Context
74 if args[0] != nil {
75 arg0 = args[0].(context.Context)
76 }
77 var arg1 entity.FavoriteID
78 if args[1] != nil {
79 arg1 = args[1].(entity.FavoriteID)
80 }
81 run(
82 arg0,
83 arg1,
84 )
85 })
86 return _c
87}
88
89func (_c *MockFavoriteRepository_Delete_Call) Return(err error) *MockFavoriteRepository_Delete_Call {
90 _c.Call.Return(err)
91 return _c
92}
93
94func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call {
95 _c.Call.Return(run)
96 return _c
97}
98
99// FindByID provides a mock function for the type MockFavoriteRepository
100func (_mock *MockFavoriteRepository) FindByID(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error) {
101 ret := _mock.Called(ctx, id)
102
103 if len(ret) == 0 {
104 panic("no return value specified for FindByID")
105 }
106
107 var r0 *entity.Favorite
108 var r1 error
109 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok {
110 return returnFunc(ctx, id)
111 }
112 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok {
113 r0 = returnFunc(ctx, id)
114 } else {
115 if ret.Get(0) != nil {
116 r0 = ret.Get(0).(*entity.Favorite)
117 }
118 }
119 if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
120 r1 = returnFunc(ctx, id)
121 } else {
122 r1 = ret.Error(1)
123 }
124 return r0, r1
125}
126
127// MockFavoriteRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
128type MockFavoriteRepository_FindByID_Call struct {
129 *mock.Call
130}
131
132// FindByID is a helper method to define mock.On call
133// - ctx context.Context
134// - id entity.FavoriteID
135func (_e *MockFavoriteRepository_Expecter) FindByID(ctx interface{}, id interface{}) *MockFavoriteRepository_FindByID_Call {
136 return &MockFavoriteRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
137}
138
139func (_c *MockFavoriteRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_FindByID_Call {
140 _c.Call.Run(func(args mock.Arguments) {
141 var arg0 context.Context
142 if args[0] != nil {
143 arg0 = args[0].(context.Context)
144 }
145 var arg1 entity.FavoriteID
146 if args[1] != nil {
147 arg1 = args[1].(entity.FavoriteID)
148 }
149 run(
150 arg0,
151 arg1,
152 )
153 })
154 return _c
155}
156
157func (_c *MockFavoriteRepository_FindByID_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByID_Call {
158 _c.Call.Return(favorite, err)
159 return _c
160}
161
162func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call {
163 _c.Call.Return(run)
164 return _c
165}
166
167// FindByURL provides a mock function for the type MockFavoriteRepository
168func (_mock *MockFavoriteRepository) FindByURL(ctx context.Context, url string) (*entity.Favorite, error) {
169 ret := _mock.Called(ctx, url)
170
171 if len(ret) == 0 {
172 panic("no return value specified for FindByURL")
173 }
174
175 var r0 *entity.Favorite
176 var r1 error
177 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok {
178 return returnFunc(ctx, url)
179 }
180 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok {
181 r0 = returnFunc(ctx, url)
182 } else {
183 if ret.Get(0) != nil {
184 r0 = ret.Get(0).(*entity.Favorite)
185 }
186 }
187 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
188 r1 = returnFunc(ctx, url)
189 } else {
190 r1 = ret.Error(1)
191 }
192 return r0, r1
193}
194
195// MockFavoriteRepository_FindByURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByURL'
196type MockFavoriteRepository_FindByURL_Call struct {
197 *mock.Call
198}
199
200// FindByURL is a helper method to define mock.On call
201// - ctx context.Context
202// - url string
203func (_e *MockFavoriteRepository_Expecter) FindByURL(ctx interface{}, url interface{}) *MockFavoriteRepository_FindByURL_Call {
204 return &MockFavoriteRepository_FindByURL_Call{Call: _e.mock.On("FindByURL", ctx, url)}
205}
206
207func (_c *MockFavoriteRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockFavoriteRepository_FindByURL_Call {
208 _c.Call.Run(func(args mock.Arguments) {
209 var arg0 context.Context
210 if args[0] != nil {
211 arg0 = args[0].(context.Context)
212 }
213 var arg1 string
214 if args[1] != nil {
215 arg1 = args[1].(string)
216 }
217 run(
218 arg0,
219 arg1,
220 )
221 })
222 return _c
223}
224
225func (_c *MockFavoriteRepository_FindByURL_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByURL_Call {
226 _c.Call.Return(favorite, err)
227 return _c
228}
229
230func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call {
231 _c.Call.Return(run)
232 return _c
233}
234
235// GetAll provides a mock function for the type MockFavoriteRepository
236func (_mock *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favorite, error) {
237 ret := _mock.Called(ctx)
238
239 if len(ret) == 0 {
240 panic("no return value specified for GetAll")
241 }
242
243 var r0 []*entity.Favorite
244 var r1 error
245 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok {
246 return returnFunc(ctx)
247 }
248 if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok {
249 r0 = returnFunc(ctx)
250 } else {
251 if ret.Get(0) != nil {
252 r0 = ret.Get(0).([]*entity.Favorite)
253 }
254 }
255 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
256 r1 = returnFunc(ctx)
257 } else {
258 r1 = ret.Error(1)
259 }
260 return r0, r1
261}
262
263// MockFavoriteRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
264type MockFavoriteRepository_GetAll_Call struct {
265 *mock.Call
266}
267
268// GetAll is a helper method to define mock.On call
269// - ctx context.Context
270func (_e *MockFavoriteRepository_Expecter) GetAll(ctx interface{}) *MockFavoriteRepository_GetAll_Call {
271 return &MockFavoriteRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
272}
273
274func (_c *MockFavoriteRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFavoriteRepository_GetAll_Call {
275 _c.Call.Run(func(args mock.Arguments) {
276 var arg0 context.Context
277 if args[0] != nil {
278 arg0 = args[0].(context.Context)
279 }
280 run(
281 arg0,
282 )
283 })
284 return _c
285}
286
287func (_c *MockFavoriteRepository_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetAll_Call {
288 _c.Call.Return(favorites, err)
289 return _c
290}
291
292func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call {
293 _c.Call.Return(run)
294 return _c
295}
296
297// GetByFolder provides a mock function for the type MockFavoriteRepository
298func (_mock *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error) {
299 ret := _mock.Called(ctx, folderID)
300
301 if len(ret) == 0 {
302 panic("no return value specified for GetByFolder")
303 }
304
305 var r0 []*entity.Favorite
306 var r1 error
307 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)); ok {
308 return returnFunc(ctx, folderID)
309 }
310 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Favorite); ok {
311 r0 = returnFunc(ctx, folderID)
312 } else {
313 if ret.Get(0) != nil {
314 r0 = ret.Get(0).([]*entity.Favorite)
315 }
316 }
317 if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
318 r1 = returnFunc(ctx, folderID)
319 } else {
320 r1 = ret.Error(1)
321 }
322 return r0, r1
323}
324
325// MockFavoriteRepository_GetByFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFolder'
326type MockFavoriteRepository_GetByFolder_Call struct {
327 *mock.Call
328}
329
330// GetByFolder is a helper method to define mock.On call
331// - ctx context.Context
332// - folderID *entity.FolderID
333func (_e *MockFavoriteRepository_Expecter) GetByFolder(ctx interface{}, folderID interface{}) *MockFavoriteRepository_GetByFolder_Call {
334 return &MockFavoriteRepository_GetByFolder_Call{Call: _e.mock.On("GetByFolder", ctx, folderID)}
335}
336
337func (_c *MockFavoriteRepository_GetByFolder_Call) Run(run func(ctx context.Context, folderID *entity.FolderID)) *MockFavoriteRepository_GetByFolder_Call {
338 _c.Call.Run(func(args mock.Arguments) {
339 var arg0 context.Context
340 if args[0] != nil {
341 arg0 = args[0].(context.Context)
342 }
343 var arg1 *entity.FolderID
344 if args[1] != nil {
345 arg1 = args[1].(*entity.FolderID)
346 }
347 run(
348 arg0,
349 arg1,
350 )
351 })
352 return _c
353}
354
355func (_c *MockFavoriteRepository_GetByFolder_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetByFolder_Call {
356 _c.Call.Return(favorites, err)
357 return _c
358}
359
360func (_c *MockFavoriteRepository_GetByFolder_Call) RunAndReturn(run func(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByFolder_Call {
361 _c.Call.Return(run)
362 return _c
363}
364
365// GetByShortcut provides a mock function for the type MockFavoriteRepository
366func (_mock *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) {
367 ret := _mock.Called(ctx, key)
368
369 if len(ret) == 0 {
370 panic("no return value specified for GetByShortcut")
371 }
372
373 var r0 *entity.Favorite
374 var r1 error
375 if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok {
376 return returnFunc(ctx, key)
377 }
378 if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok {
379 r0 = returnFunc(ctx, key)
380 } else {
381 if ret.Get(0) != nil {
382 r0 = ret.Get(0).(*entity.Favorite)
383 }
384 }
385 if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
386 r1 = returnFunc(ctx, key)
387 } else {
388 r1 = ret.Error(1)
389 }
390 return r0, r1
391}
392
393// MockFavoriteRepository_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut'
394type MockFavoriteRepository_GetByShortcut_Call struct {
395 *mock.Call
396}
397
398// GetByShortcut is a helper method to define mock.On call
399// - ctx context.Context
400// - key int
401func (_e *MockFavoriteRepository_Expecter) GetByShortcut(ctx interface{}, key interface{}) *MockFavoriteRepository_GetByShortcut_Call {
402 return &MockFavoriteRepository_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)}
403}
404
405func (_c *MockFavoriteRepository_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockFavoriteRepository_GetByShortcut_Call {
406 _c.Call.Run(func(args mock.Arguments) {
407 var arg0 context.Context
408 if args[0] != nil {
409 arg0 = args[0].(context.Context)
410 }
411 var arg1 int
412 if args[1] != nil {
413 arg1 = args[1].(int)
414 }
415 run(
416 arg0,
417 arg1,
418 )
419 })
420 return _c
421}
422
423func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_GetByShortcut_Call {
424 _c.Call.Return(favorite, err)
425 return _c
426}
427
428func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call {
429 _c.Call.Return(run)
430 return _c
431}
432
433// Save provides a mock function for the type MockFavoriteRepository
434func (_mock *MockFavoriteRepository) Save(ctx context.Context, fav *entity.Favorite) error {
435 ret := _mock.Called(ctx, fav)
436
437 if len(ret) == 0 {
438 panic("no return value specified for Save")
439 }
440
441 var r0 error
442 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok {
443 r0 = returnFunc(ctx, fav)
444 } else {
445 r0 = ret.Error(0)
446 }
447 return r0
448}
449
450// MockFavoriteRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
451type MockFavoriteRepository_Save_Call struct {
452 *mock.Call
453}
454
455// Save is a helper method to define mock.On call
456// - ctx context.Context
457// - fav *entity.Favorite
458func (_e *MockFavoriteRepository_Expecter) Save(ctx interface{}, fav interface{}) *MockFavoriteRepository_Save_Call {
459 return &MockFavoriteRepository_Save_Call{Call: _e.mock.On("Save", ctx, fav)}
460}
461
462func (_c *MockFavoriteRepository_Save_Call) Run(run func(ctx context.Context, fav *entity.Favorite)) *MockFavoriteRepository_Save_Call {
463 _c.Call.Run(func(args mock.Arguments) {
464 var arg0 context.Context
465 if args[0] != nil {
466 arg0 = args[0].(context.Context)
467 }
468 var arg1 *entity.Favorite
469 if args[1] != nil {
470 arg1 = args[1].(*entity.Favorite)
471 }
472 run(
473 arg0,
474 arg1,
475 )
476 })
477 return _c
478}
479
480func (_c *MockFavoriteRepository_Save_Call) Return(err error) *MockFavoriteRepository_Save_Call {
481 _c.Call.Return(err)
482 return _c
483}
484
485func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(ctx context.Context, fav *entity.Favorite) error) *MockFavoriteRepository_Save_Call {
486 _c.Call.Return(run)
487 return _c
488}
489
490// SetFolder provides a mock function for the type MockFavoriteRepository
491func (_mock *MockFavoriteRepository) SetFolder(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error {
492 ret := _mock.Called(ctx, id, folderID)
493
494 if len(ret) == 0 {
495 panic("no return value specified for SetFolder")
496 }
497
498 var r0 error
499 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok {
500 r0 = returnFunc(ctx, id, folderID)
501 } else {
502 r0 = ret.Error(0)
503 }
504 return r0
505}
506
507// MockFavoriteRepository_SetFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFolder'
508type MockFavoriteRepository_SetFolder_Call struct {
509 *mock.Call
510}
511
512// SetFolder is a helper method to define mock.On call
513// - ctx context.Context
514// - id entity.FavoriteID
515// - folderID *entity.FolderID
516func (_e *MockFavoriteRepository_Expecter) SetFolder(ctx interface{}, id interface{}, folderID interface{}) *MockFavoriteRepository_SetFolder_Call {
517 return &MockFavoriteRepository_SetFolder_Call{Call: _e.mock.On("SetFolder", ctx, id, folderID)}
518}
519
520func (_c *MockFavoriteRepository_SetFolder_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockFavoriteRepository_SetFolder_Call {
521 _c.Call.Run(func(args mock.Arguments) {
522 var arg0 context.Context
523 if args[0] != nil {
524 arg0 = args[0].(context.Context)
525 }
526 var arg1 entity.FavoriteID
527 if args[1] != nil {
528 arg1 = args[1].(entity.FavoriteID)
529 }
530 var arg2 *entity.FolderID
531 if args[2] != nil {
532 arg2 = args[2].(*entity.FolderID)
533 }
534 run(
535 arg0,
536 arg1,
537 arg2,
538 )
539 })
540 return _c
541}
542
543func (_c *MockFavoriteRepository_SetFolder_Call) Return(err error) *MockFavoriteRepository_SetFolder_Call {
544 _c.Call.Return(err)
545 return _c
546}
547
548func (_c *MockFavoriteRepository_SetFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockFavoriteRepository_SetFolder_Call {
549 _c.Call.Return(run)
550 return _c
551}
552
553// SetShortcut provides a mock function for the type MockFavoriteRepository
554func (_mock *MockFavoriteRepository) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error {
555 ret := _mock.Called(ctx, id, key)
556
557 if len(ret) == 0 {
558 panic("no return value specified for SetShortcut")
559 }
560
561 var r0 error
562 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok {
563 r0 = returnFunc(ctx, id, key)
564 } else {
565 r0 = ret.Error(0)
566 }
567 return r0
568}
569
570// MockFavoriteRepository_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut'
571type MockFavoriteRepository_SetShortcut_Call struct {
572 *mock.Call
573}
574
575// SetShortcut is a helper method to define mock.On call
576// - ctx context.Context
577// - id entity.FavoriteID
578// - key *int
579func (_e *MockFavoriteRepository_Expecter) SetShortcut(ctx interface{}, id interface{}, key interface{}) *MockFavoriteRepository_SetShortcut_Call {
580 return &MockFavoriteRepository_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)}
581}
582
583func (_c *MockFavoriteRepository_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockFavoriteRepository_SetShortcut_Call {
584 _c.Call.Run(func(args mock.Arguments) {
585 var arg0 context.Context
586 if args[0] != nil {
587 arg0 = args[0].(context.Context)
588 }
589 var arg1 entity.FavoriteID
590 if args[1] != nil {
591 arg1 = args[1].(entity.FavoriteID)
592 }
593 var arg2 *int
594 if args[2] != nil {
595 arg2 = args[2].(*int)
596 }
597 run(
598 arg0,
599 arg1,
600 arg2,
601 )
602 })
603 return _c
604}
605
606func (_c *MockFavoriteRepository_SetShortcut_Call) Return(err error) *MockFavoriteRepository_SetShortcut_Call {
607 _c.Call.Return(err)
608 return _c
609}
610
611func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockFavoriteRepository_SetShortcut_Call {
612 _c.Call.Return(run)
613 return _c
614}
615
616// UpdatePosition provides a mock function for the type MockFavoriteRepository
617func (_mock *MockFavoriteRepository) UpdatePosition(ctx context.Context, id entity.FavoriteID, position int) error {
618 ret := _mock.Called(ctx, id, position)
619
620 if len(ret) == 0 {
621 panic("no return value specified for UpdatePosition")
622 }
623
624 var r0 error
625 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok {
626 r0 = returnFunc(ctx, id, position)
627 } else {
628 r0 = ret.Error(0)
629 }
630 return r0
631}
632
633// MockFavoriteRepository_UpdatePosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePosition'
634type MockFavoriteRepository_UpdatePosition_Call struct {
635 *mock.Call
636}
637
638// UpdatePosition is a helper method to define mock.On call
639// - ctx context.Context
640// - id entity.FavoriteID
641// - position int
642func (_e *MockFavoriteRepository_Expecter) UpdatePosition(ctx interface{}, id interface{}, position interface{}) *MockFavoriteRepository_UpdatePosition_Call {
643 return &MockFavoriteRepository_UpdatePosition_Call{Call: _e.mock.On("UpdatePosition", ctx, id, position)}
644}
645
646func (_c *MockFavoriteRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FavoriteID, position int)) *MockFavoriteRepository_UpdatePosition_Call {
647 _c.Call.Run(func(args mock.Arguments) {
648 var arg0 context.Context
649 if args[0] != nil {
650 arg0 = args[0].(context.Context)
651 }
652 var arg1 entity.FavoriteID
653 if args[1] != nil {
654 arg1 = args[1].(entity.FavoriteID)
655 }
656 var arg2 int
657 if args[2] != nil {
658 arg2 = args[2].(int)
659 }
660 run(
661 arg0,
662 arg1,
663 arg2,
664 )
665 })
666 return _c
667}
668
669func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(err error) *MockFavoriteRepository_UpdatePosition_Call {
670 _c.Call.Return(err)
671 return _c
672}
673
674func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, position int) error) *MockFavoriteRepository_UpdatePosition_Call {
675 _c.Call.Return(run)
676 return _c
677}
678
679// NewMockFolderRepository creates a new instance of MockFolderRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
680// The first argument is typically a *testing.T value.
681func NewMockFolderRepository(t interface {
682 mock.TestingT
683 Cleanup(func())
684}) *MockFolderRepository {
685 mock := &MockFolderRepository{}
686 mock.Mock.Test(t)
687
688 t.Cleanup(func() { mock.AssertExpectations(t) })
689
690 return mock
691}
692
693// MockFolderRepository is an autogenerated mock type for the FolderRepository type
694type MockFolderRepository struct {
695 mock.Mock
696}
697
698type MockFolderRepository_Expecter struct {
699 mock *mock.Mock
700}
701
702func (_m *MockFolderRepository) EXPECT() *MockFolderRepository_Expecter {
703 return &MockFolderRepository_Expecter{mock: &_m.Mock}
704}
705
706// Delete provides a mock function for the type MockFolderRepository
707func (_mock *MockFolderRepository) Delete(ctx context.Context, id entity.FolderID) error {
708 ret := _mock.Called(ctx, id)
709
710 if len(ret) == 0 {
711 panic("no return value specified for Delete")
712 }
713
714 var r0 error
715 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok {
716 r0 = returnFunc(ctx, id)
717 } else {
718 r0 = ret.Error(0)
719 }
720 return r0
721}
722
723// MockFolderRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
724type MockFolderRepository_Delete_Call struct {
725 *mock.Call
726}
727
728// Delete is a helper method to define mock.On call
729// - ctx context.Context
730// - id entity.FolderID
731func (_e *MockFolderRepository_Expecter) Delete(ctx interface{}, id interface{}) *MockFolderRepository_Delete_Call {
732 return &MockFolderRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
733}
734
735func (_c *MockFolderRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_Delete_Call {
736 _c.Call.Run(func(args mock.Arguments) {
737 var arg0 context.Context
738 if args[0] != nil {
739 arg0 = args[0].(context.Context)
740 }
741 var arg1 entity.FolderID
742 if args[1] != nil {
743 arg1 = args[1].(entity.FolderID)
744 }
745 run(
746 arg0,
747 arg1,
748 )
749 })
750 return _c
751}
752
753func (_c *MockFolderRepository_Delete_Call) Return(err error) *MockFolderRepository_Delete_Call {
754 _c.Call.Return(err)
755 return _c
756}
757
758func (_c *MockFolderRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockFolderRepository_Delete_Call {
759 _c.Call.Return(run)
760 return _c
761}
762
763// FindByID provides a mock function for the type MockFolderRepository
764func (_mock *MockFolderRepository) FindByID(ctx context.Context, id entity.FolderID) (*entity.Folder, error) {
765 ret := _mock.Called(ctx, id)
766
767 if len(ret) == 0 {
768 panic("no return value specified for FindByID")
769 }
770
771 var r0 *entity.Folder
772 var r1 error
773 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) (*entity.Folder, error)); ok {
774 return returnFunc(ctx, id)
775 }
776 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) *entity.Folder); ok {
777 r0 = returnFunc(ctx, id)
778 } else {
779 if ret.Get(0) != nil {
780 r0 = ret.Get(0).(*entity.Folder)
781 }
782 }
783 if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FolderID) error); ok {
784 r1 = returnFunc(ctx, id)
785 } else {
786 r1 = ret.Error(1)
787 }
788 return r0, r1
789}
790
791// MockFolderRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
792type MockFolderRepository_FindByID_Call struct {
793 *mock.Call
794}
795
796// FindByID is a helper method to define mock.On call
797// - ctx context.Context
798// - id entity.FolderID
799func (_e *MockFolderRepository_Expecter) FindByID(ctx interface{}, id interface{}) *MockFolderRepository_FindByID_Call {
800 return &MockFolderRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
801}
802
803func (_c *MockFolderRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_FindByID_Call {
804 _c.Call.Run(func(args mock.Arguments) {
805 var arg0 context.Context
806 if args[0] != nil {
807 arg0 = args[0].(context.Context)
808 }
809 var arg1 entity.FolderID
810 if args[1] != nil {
811 arg1 = args[1].(entity.FolderID)
812 }
813 run(
814 arg0,
815 arg1,
816 )
817 })
818 return _c
819}
820
821func (_c *MockFolderRepository_FindByID_Call) Return(folder *entity.Folder, err error) *MockFolderRepository_FindByID_Call {
822 _c.Call.Return(folder, err)
823 return _c
824}
825
826func (_c *MockFolderRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) (*entity.Folder, error)) *MockFolderRepository_FindByID_Call {
827 _c.Call.Return(run)
828 return _c
829}
830
831// GetAll provides a mock function for the type MockFolderRepository
832func (_mock *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder, error) {
833 ret := _mock.Called(ctx)
834
835 if len(ret) == 0 {
836 panic("no return value specified for GetAll")
837 }
838
839 var r0 []*entity.Folder
840 var r1 error
841 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok {
842 return returnFunc(ctx)
843 }
844 if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok {
845 r0 = returnFunc(ctx)
846 } else {
847 if ret.Get(0) != nil {
848 r0 = ret.Get(0).([]*entity.Folder)
849 }
850 }
851 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
852 r1 = returnFunc(ctx)
853 } else {
854 r1 = ret.Error(1)
855 }
856 return r0, r1
857}
858
859// MockFolderRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
860type MockFolderRepository_GetAll_Call struct {
861 *mock.Call
862}
863
864// GetAll is a helper method to define mock.On call
865// - ctx context.Context
866func (_e *MockFolderRepository_Expecter) GetAll(ctx interface{}) *MockFolderRepository_GetAll_Call {
867 return &MockFolderRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
868}
869
870func (_c *MockFolderRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFolderRepository_GetAll_Call {
871 _c.Call.Run(func(args mock.Arguments) {
872 var arg0 context.Context
873 if args[0] != nil {
874 arg0 = args[0].(context.Context)
875 }
876 run(
877 arg0,
878 )
879 })
880 return _c
881}
882
883func (_c *MockFolderRepository_GetAll_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetAll_Call {
884 _c.Call.Return(folders, err)
885 return _c
886}
887
888func (_c *MockFolderRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockFolderRepository_GetAll_Call {
889 _c.Call.Return(run)
890 return _c
891}
892
893// GetChildren provides a mock function for the type MockFolderRepository
894func (_mock *MockFolderRepository) GetChildren(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error) {
895 ret := _mock.Called(ctx, parentID)
896
897 if len(ret) == 0 {
898 panic("no return value specified for GetChildren")
899 }
900
901 var r0 []*entity.Folder
902 var r1 error
903 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Folder, error)); ok {
904 return returnFunc(ctx, parentID)
905 }
906 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Folder); ok {
907 r0 = returnFunc(ctx, parentID)
908 } else {
909 if ret.Get(0) != nil {
910 r0 = ret.Get(0).([]*entity.Folder)
911 }
912 }
913 if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
914 r1 = returnFunc(ctx, parentID)
915 } else {
916 r1 = ret.Error(1)
917 }
918 return r0, r1
919}
920
921// MockFolderRepository_GetChildren_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChildren'
922type MockFolderRepository_GetChildren_Call struct {
923 *mock.Call
924}
925
926// GetChildren is a helper method to define mock.On call
927// - ctx context.Context
928// - parentID *entity.FolderID
929func (_e *MockFolderRepository_Expecter) GetChildren(ctx interface{}, parentID interface{}) *MockFolderRepository_GetChildren_Call {
930 return &MockFolderRepository_GetChildren_Call{Call: _e.mock.On("GetChildren", ctx, parentID)}
931}
932
933func (_c *MockFolderRepository_GetChildren_Call) Run(run func(ctx context.Context, parentID *entity.FolderID)) *MockFolderRepository_GetChildren_Call {
934 _c.Call.Run(func(args mock.Arguments) {
935 var arg0 context.Context
936 if args[0] != nil {
937 arg0 = args[0].(context.Context)
938 }
939 var arg1 *entity.FolderID
940 if args[1] != nil {
941 arg1 = args[1].(*entity.FolderID)
942 }
943 run(
944 arg0,
945 arg1,
946 )
947 })
948 return _c
949}
950
951func (_c *MockFolderRepository_GetChildren_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetChildren_Call {
952 _c.Call.Return(folders, err)
953 return _c
954}
955
956func (_c *MockFolderRepository_GetChildren_Call) RunAndReturn(run func(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error)) *MockFolderRepository_GetChildren_Call {
957 _c.Call.Return(run)
958 return _c
959}
960
961// Save provides a mock function for the type MockFolderRepository
962func (_mock *MockFolderRepository) Save(ctx context.Context, folder *entity.Folder) error {
963 ret := _mock.Called(ctx, folder)
964
965 if len(ret) == 0 {
966 panic("no return value specified for Save")
967 }
968
969 var r0 error
970 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Folder) error); ok {
971 r0 = returnFunc(ctx, folder)
972 } else {
973 r0 = ret.Error(0)
974 }
975 return r0
976}
977
978// MockFolderRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
979type MockFolderRepository_Save_Call struct {
980 *mock.Call
981}
982
983// Save is a helper method to define mock.On call
984// - ctx context.Context
985// - folder *entity.Folder
986func (_e *MockFolderRepository_Expecter) Save(ctx interface{}, folder interface{}) *MockFolderRepository_Save_Call {
987 return &MockFolderRepository_Save_Call{Call: _e.mock.On("Save", ctx, folder)}
988}
989
990func (_c *MockFolderRepository_Save_Call) Run(run func(ctx context.Context, folder *entity.Folder)) *MockFolderRepository_Save_Call {
991 _c.Call.Run(func(args mock.Arguments) {
992 var arg0 context.Context
993 if args[0] != nil {
994 arg0 = args[0].(context.Context)
995 }
996 var arg1 *entity.Folder
997 if args[1] != nil {
998 arg1 = args[1].(*entity.Folder)
999 }
1000 run(
1001 arg0,
1002 arg1,
1003 )
1004 })
1005 return _c
1006}
1007
1008func (_c *MockFolderRepository_Save_Call) Return(err error) *MockFolderRepository_Save_Call {
1009 _c.Call.Return(err)
1010 return _c
1011}
1012
1013func (_c *MockFolderRepository_Save_Call) RunAndReturn(run func(ctx context.Context, folder *entity.Folder) error) *MockFolderRepository_Save_Call {
1014 _c.Call.Return(run)
1015 return _c
1016}
1017
1018// UpdatePosition provides a mock function for the type MockFolderRepository
1019func (_mock *MockFolderRepository) UpdatePosition(ctx context.Context, id entity.FolderID, position int) error {
1020 ret := _mock.Called(ctx, id, position)
1021
1022 if len(ret) == 0 {
1023 panic("no return value specified for UpdatePosition")
1024 }
1025
1026 var r0 error
1027 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, int) error); ok {
1028 r0 = returnFunc(ctx, id, position)
1029 } else {
1030 r0 = ret.Error(0)
1031 }
1032 return r0
1033}
1034
1035// MockFolderRepository_UpdatePosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePosition'
1036type MockFolderRepository_UpdatePosition_Call struct {
1037 *mock.Call
1038}
1039
1040// UpdatePosition is a helper method to define mock.On call
1041// - ctx context.Context
1042// - id entity.FolderID
1043// - position int
1044func (_e *MockFolderRepository_Expecter) UpdatePosition(ctx interface{}, id interface{}, position interface{}) *MockFolderRepository_UpdatePosition_Call {
1045 return &MockFolderRepository_UpdatePosition_Call{Call: _e.mock.On("UpdatePosition", ctx, id, position)}
1046}
1047
1048func (_c *MockFolderRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FolderID, position int)) *MockFolderRepository_UpdatePosition_Call {
1049 _c.Call.Run(func(args mock.Arguments) {
1050 var arg0 context.Context
1051 if args[0] != nil {
1052 arg0 = args[0].(context.Context)
1053 }
1054 var arg1 entity.FolderID
1055 if args[1] != nil {
1056 arg1 = args[1].(entity.FolderID)
1057 }
1058 var arg2 int
1059 if args[2] != nil {
1060 arg2 = args[2].(int)
1061 }
1062 run(
1063 arg0,
1064 arg1,
1065 arg2,
1066 )
1067 })
1068 return _c
1069}
1070
1071func (_c *MockFolderRepository_UpdatePosition_Call) Return(err error) *MockFolderRepository_UpdatePosition_Call {
1072 _c.Call.Return(err)
1073 return _c
1074}
1075
1076func (_c *MockFolderRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, position int) error) *MockFolderRepository_UpdatePosition_Call {
1077 _c.Call.Return(run)
1078 return _c
1079}
1080
1081// NewMockTagRepository creates a new instance of MockTagRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1082// The first argument is typically a *testing.T value.
1083func NewMockTagRepository(t interface {
1084 mock.TestingT
1085 Cleanup(func())
1086}) *MockTagRepository {
1087 mock := &MockTagRepository{}
1088 mock.Mock.Test(t)
1089
1090 t.Cleanup(func() { mock.AssertExpectations(t) })
1091
1092 return mock
1093}
1094
1095// MockTagRepository is an autogenerated mock type for the TagRepository type
1096type MockTagRepository struct {
1097 mock.Mock
1098}
1099
1100type MockTagRepository_Expecter struct {
1101 mock *mock.Mock
1102}
1103
1104func (_m *MockTagRepository) EXPECT() *MockTagRepository_Expecter {
1105 return &MockTagRepository_Expecter{mock: &_m.Mock}
1106}
1107
1108// AssignToFavorite provides a mock function for the type MockTagRepository
1109func (_mock *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
1110 ret := _mock.Called(ctx, tagID, favID)
1111
1112 if len(ret) == 0 {
1113 panic("no return value specified for AssignToFavorite")
1114 }
1115
1116 var r0 error
1117 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
1118 r0 = returnFunc(ctx, tagID, favID)
1119 } else {
1120 r0 = ret.Error(0)
1121 }
1122 return r0
1123}
1124
1125// MockTagRepository_AssignToFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssignToFavorite'
1126type MockTagRepository_AssignToFavorite_Call struct {
1127 *mock.Call
1128}
1129
1130// AssignToFavorite is a helper method to define mock.On call
1131// - ctx context.Context
1132// - tagID entity.TagID
1133// - favID entity.FavoriteID
1134func (_e *MockTagRepository_Expecter) AssignToFavorite(ctx interface{}, tagID interface{}, favID interface{}) *MockTagRepository_AssignToFavorite_Call {
1135 return &MockTagRepository_AssignToFavorite_Call{Call: _e.mock.On("AssignToFavorite", ctx, tagID, favID)}
1136}
1137
1138func (_c *MockTagRepository_AssignToFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_AssignToFavorite_Call {
1139 _c.Call.Run(func(args mock.Arguments) {
1140 var arg0 context.Context
1141 if args[0] != nil {
1142 arg0 = args[0].(context.Context)
1143 }
1144 var arg1 entity.TagID
1145 if args[1] != nil {
1146 arg1 = args[1].(entity.TagID)
1147 }
1148 var arg2 entity.FavoriteID
1149 if args[2] != nil {
1150 arg2 = args[2].(entity.FavoriteID)
1151 }
1152 run(
1153 arg0,
1154 arg1,
1155 arg2,
1156 )
1157 })
1158 return _c
1159}
1160
1161func (_c *MockTagRepository_AssignToFavorite_Call) Return(err error) *MockTagRepository_AssignToFavorite_Call {
1162 _c.Call.Return(err)
1163 return _c
1164}
1165
1166func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call {
1167 _c.Call.Return(run)
1168 return _c
1169}
1170
1171// Delete provides a mock function for the type MockTagRepository
1172func (_mock *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error {
1173 ret := _mock.Called(ctx, id)
1174
1175 if len(ret) == 0 {
1176 panic("no return value specified for Delete")
1177 }
1178
1179 var r0 error
1180 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok {
1181 r0 = returnFunc(ctx, id)
1182 } else {
1183 r0 = ret.Error(0)
1184 }
1185 return r0
1186}
1187
1188// MockTagRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
1189type MockTagRepository_Delete_Call struct {
1190 *mock.Call
1191}
1192
1193// Delete is a helper method to define mock.On call
1194// - ctx context.Context
1195// - id entity.TagID
1196func (_e *MockTagRepository_Expecter) Delete(ctx interface{}, id interface{}) *MockTagRepository_Delete_Call {
1197 return &MockTagRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
1198}
1199
1200func (_c *MockTagRepository_Delete_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_Delete_Call {
1201 _c.Call.Run(func(args mock.Arguments) {
1202 var arg0 context.Context
1203 if args[0] != nil {
1204 arg0 = args[0].(context.Context)
1205 }
1206 var arg1 entity.TagID
1207 if args[1] != nil {
1208 arg1 = args[1].(entity.TagID)
1209 }
1210 run(
1211 arg0,
1212 arg1,
1213 )
1214 })
1215 return _c
1216}
1217
1218func (_c *MockTagRepository_Delete_Call) Return(err error) *MockTagRepository_Delete_Call {
1219 _c.Call.Return(err)
1220 return _c
1221}
1222
1223func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockTagRepository_Delete_Call {
1224 _c.Call.Return(run)
1225 return _c
1226}
1227
1228// FindByID provides a mock function for the type MockTagRepository
1229func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) {
1230 ret := _mock.Called(ctx, id)
1231
1232 if len(ret) == 0 {
1233 panic("no return value specified for FindByID")
1234 }
1235
1236 var r0 *entity.Tag
1237 var r1 error
1238 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok {
1239 return returnFunc(ctx, id)
1240 }
1241 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok {
1242 r0 = returnFunc(ctx, id)
1243 } else {
1244 if ret.Get(0) != nil {
1245 r0 = ret.Get(0).(*entity.Tag)
1246 }
1247 }
1248 if returnFunc, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok {
1249 r1 = returnFunc(ctx, id)
1250 } else {
1251 r1 = ret.Error(1)
1252 }
1253 return r0, r1
1254}
1255
1256// MockTagRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
1257type MockTagRepository_FindByID_Call struct {
1258 *mock.Call
1259}
1260
1261// FindByID is a helper method to define mock.On call
1262// - ctx context.Context
1263// - id entity.TagID
1264func (_e *MockTagRepository_Expecter) FindByID(ctx interface{}, id interface{}) *MockTagRepository_FindByID_Call {
1265 return &MockTagRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
1266}
1267
1268func (_c *MockTagRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_FindByID_Call {
1269 _c.Call.Run(func(args mock.Arguments) {
1270 var arg0 context.Context
1271 if args[0] != nil {
1272 arg0 = args[0].(context.Context)
1273 }
1274 var arg1 entity.TagID
1275 if args[1] != nil {
1276 arg1 = args[1].(entity.TagID)
1277 }
1278 run(
1279 arg0,
1280 arg1,
1281 )
1282 })
1283 return _c
1284}
1285
1286func (_c *MockTagRepository_FindByID_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByID_Call {
1287 _c.Call.Return(tag, err)
1288 return _c
1289}
1290
1291func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call {
1292 _c.Call.Return(run)
1293 return _c
1294}
1295
1296// FindByName provides a mock function for the type MockTagRepository
1297func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) {
1298 ret := _mock.Called(ctx, name)
1299
1300 if len(ret) == 0 {
1301 panic("no return value specified for FindByName")
1302 }
1303
1304 var r0 *entity.Tag
1305 var r1 error
1306 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok {
1307 return returnFunc(ctx, name)
1308 }
1309 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok {
1310 r0 = returnFunc(ctx, name)
1311 } else {
1312 if ret.Get(0) != nil {
1313 r0 = ret.Get(0).(*entity.Tag)
1314 }
1315 }
1316 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
1317 r1 = returnFunc(ctx, name)
1318 } else {
1319 r1 = ret.Error(1)
1320 }
1321 return r0, r1
1322}
1323
1324// MockTagRepository_FindByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByName'
1325type MockTagRepository_FindByName_Call struct {
1326 *mock.Call
1327}
1328
1329// FindByName is a helper method to define mock.On call
1330// - ctx context.Context
1331// - name string
1332func (_e *MockTagRepository_Expecter) FindByName(ctx interface{}, name interface{}) *MockTagRepository_FindByName_Call {
1333 return &MockTagRepository_FindByName_Call{Call: _e.mock.On("FindByName", ctx, name)}
1334}
1335
1336func (_c *MockTagRepository_FindByName_Call) Run(run func(ctx context.Context, name string)) *MockTagRepository_FindByName_Call {
1337 _c.Call.Run(func(args mock.Arguments) {
1338 var arg0 context.Context
1339 if args[0] != nil {
1340 arg0 = args[0].(context.Context)
1341 }
1342 var arg1 string
1343 if args[1] != nil {
1344 arg1 = args[1].(string)
1345 }
1346 run(
1347 arg0,
1348 arg1,
1349 )
1350 })
1351 return _c
1352}
1353
1354func (_c *MockTagRepository_FindByName_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByName_Call {
1355 _c.Call.Return(tag, err)
1356 return _c
1357}
1358
1359func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(ctx context.Context, name string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call {
1360 _c.Call.Return(run)
1361 return _c
1362}
1363
1364// GetAll provides a mock function for the type MockTagRepository
1365func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) {
1366 ret := _mock.Called(ctx)
1367
1368 if len(ret) == 0 {
1369 panic("no return value specified for GetAll")
1370 }
1371
1372 var r0 []*entity.Tag
1373 var r1 error
1374 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok {
1375 return returnFunc(ctx)
1376 }
1377 if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok {
1378 r0 = returnFunc(ctx)
1379 } else {
1380 if ret.Get(0) != nil {
1381 r0 = ret.Get(0).([]*entity.Tag)
1382 }
1383 }
1384 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1385 r1 = returnFunc(ctx)
1386 } else {
1387 r1 = ret.Error(1)
1388 }
1389 return r0, r1
1390}
1391
1392// MockTagRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
1393type MockTagRepository_GetAll_Call struct {
1394 *mock.Call
1395}
1396
1397// GetAll is a helper method to define mock.On call
1398// - ctx context.Context
1399func (_e *MockTagRepository_Expecter) GetAll(ctx interface{}) *MockTagRepository_GetAll_Call {
1400 return &MockTagRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
1401}
1402
1403func (_c *MockTagRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockTagRepository_GetAll_Call {
1404 _c.Call.Run(func(args mock.Arguments) {
1405 var arg0 context.Context
1406 if args[0] != nil {
1407 arg0 = args[0].(context.Context)
1408 }
1409 run(
1410 arg0,
1411 )
1412 })
1413 return _c
1414}
1415
1416func (_c *MockTagRepository_GetAll_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetAll_Call {
1417 _c.Call.Return(tags, err)
1418 return _c
1419}
1420
1421func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call {
1422 _c.Call.Return(run)
1423 return _c
1424}
1425
1426// GetForFavorite provides a mock function for the type MockTagRepository
1427func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) {
1428 ret := _mock.Called(ctx, favID)
1429
1430 if len(ret) == 0 {
1431 panic("no return value specified for GetForFavorite")
1432 }
1433
1434 var r0 []*entity.Tag
1435 var r1 error
1436 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok {
1437 return returnFunc(ctx, favID)
1438 }
1439 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok {
1440 r0 = returnFunc(ctx, favID)
1441 } else {
1442 if ret.Get(0) != nil {
1443 r0 = ret.Get(0).([]*entity.Tag)
1444 }
1445 }
1446 if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
1447 r1 = returnFunc(ctx, favID)
1448 } else {
1449 r1 = ret.Error(1)
1450 }
1451 return r0, r1
1452}
1453
1454// MockTagRepository_GetForFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForFavorite'
1455type MockTagRepository_GetForFavorite_Call struct {
1456 *mock.Call
1457}
1458
1459// GetForFavorite is a helper method to define mock.On call
1460// - ctx context.Context
1461// - favID entity.FavoriteID
1462func (_e *MockTagRepository_Expecter) GetForFavorite(ctx interface{}, favID interface{}) *MockTagRepository_GetForFavorite_Call {
1463 return &MockTagRepository_GetForFavorite_Call{Call: _e.mock.On("GetForFavorite", ctx, favID)}
1464}
1465
1466func (_c *MockTagRepository_GetForFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID)) *MockTagRepository_GetForFavorite_Call {
1467 _c.Call.Run(func(args mock.Arguments) {
1468 var arg0 context.Context
1469 if args[0] != nil {
1470 arg0 = args[0].(context.Context)
1471 }
1472 var arg1 entity.FavoriteID
1473 if args[1] != nil {
1474 arg1 = args[1].(entity.FavoriteID)
1475 }
1476 run(
1477 arg0,
1478 arg1,
1479 )
1480 })
1481 return _c
1482}
1483
1484func (_c *MockTagRepository_GetForFavorite_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetForFavorite_Call {
1485 _c.Call.Return(tags, err)
1486 return _c
1487}
1488
1489func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call {
1490 _c.Call.Return(run)
1491 return _c
1492}
1493
1494// RemoveFromFavorite provides a mock function for the type MockTagRepository
1495func (_mock *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
1496 ret := _mock.Called(ctx, tagID, favID)
1497
1498 if len(ret) == 0 {
1499 panic("no return value specified for RemoveFromFavorite")
1500 }
1501
1502 var r0 error
1503 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
1504 r0 = returnFunc(ctx, tagID, favID)
1505 } else {
1506 r0 = ret.Error(0)
1507 }
1508 return r0
1509}
1510
1511// MockTagRepository_RemoveFromFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveFromFavorite'
1512type MockTagRepository_RemoveFromFavorite_Call struct {
1513 *mock.Call
1514}
1515
1516// RemoveFromFavorite is a helper method to define mock.On call
1517// - ctx context.Context
1518// - tagID entity.TagID
1519// - favID entity.FavoriteID
1520func (_e *MockTagRepository_Expecter) RemoveFromFavorite(ctx interface{}, tagID interface{}, favID interface{}) *MockTagRepository_RemoveFromFavorite_Call {
1521 return &MockTagRepository_RemoveFromFavorite_Call{Call: _e.mock.On("RemoveFromFavorite", ctx, tagID, favID)}
1522}
1523
1524func (_c *MockTagRepository_RemoveFromFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_RemoveFromFavorite_Call {
1525 _c.Call.Run(func(args mock.Arguments) {
1526 var arg0 context.Context
1527 if args[0] != nil {
1528 arg0 = args[0].(context.Context)
1529 }
1530 var arg1 entity.TagID
1531 if args[1] != nil {
1532 arg1 = args[1].(entity.TagID)
1533 }
1534 var arg2 entity.FavoriteID
1535 if args[2] != nil {
1536 arg2 = args[2].(entity.FavoriteID)
1537 }
1538 run(
1539 arg0,
1540 arg1,
1541 arg2,
1542 )
1543 })
1544 return _c
1545}
1546
1547func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(err error) *MockTagRepository_RemoveFromFavorite_Call {
1548 _c.Call.Return(err)
1549 return _c
1550}
1551
1552func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call {
1553 _c.Call.Return(run)
1554 return _c
1555}
1556
1557// Save provides a mock function for the type MockTagRepository
1558func (_mock *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error {
1559 ret := _mock.Called(ctx, tag)
1560
1561 if len(ret) == 0 {
1562 panic("no return value specified for Save")
1563 }
1564
1565 var r0 error
1566 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok {
1567 r0 = returnFunc(ctx, tag)
1568 } else {
1569 r0 = ret.Error(0)
1570 }
1571 return r0
1572}
1573
1574// MockTagRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
1575type MockTagRepository_Save_Call struct {
1576 *mock.Call
1577}
1578
1579// Save is a helper method to define mock.On call
1580// - ctx context.Context
1581// - tag *entity.Tag
1582func (_e *MockTagRepository_Expecter) Save(ctx interface{}, tag interface{}) *MockTagRepository_Save_Call {
1583 return &MockTagRepository_Save_Call{Call: _e.mock.On("Save", ctx, tag)}
1584}
1585
1586func (_c *MockTagRepository_Save_Call) Run(run func(ctx context.Context, tag *entity.Tag)) *MockTagRepository_Save_Call {
1587 _c.Call.Run(func(args mock.Arguments) {
1588 var arg0 context.Context
1589 if args[0] != nil {
1590 arg0 = args[0].(context.Context)
1591 }
1592 var arg1 *entity.Tag
1593 if args[1] != nil {
1594 arg1 = args[1].(*entity.Tag)
1595 }
1596 run(
1597 arg0,
1598 arg1,
1599 )
1600 })
1601 return _c
1602}
1603
1604func (_c *MockTagRepository_Save_Call) Return(err error) *MockTagRepository_Save_Call {
1605 _c.Call.Return(err)
1606 return _c
1607}
1608
1609func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(ctx context.Context, tag *entity.Tag) error) *MockTagRepository_Save_Call {
1610 _c.Call.Return(run)
1611 return _c
1612}
1613
1614// NewMockContentWhitelistRepository creates a new instance of MockContentWhitelistRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1615// The first argument is typically a *testing.T value.
1616func NewMockContentWhitelistRepository(t interface {
1617 mock.TestingT
1618 Cleanup(func())
1619}) *MockContentWhitelistRepository {
1620 mock := &MockContentWhitelistRepository{}
1621 mock.Mock.Test(t)
1622
1623 t.Cleanup(func() { mock.AssertExpectations(t) })
1624
1625 return mock
1626}
1627
1628// MockContentWhitelistRepository is an autogenerated mock type for the ContentWhitelistRepository type
1629type MockContentWhitelistRepository struct {
1630 mock.Mock
1631}
1632
1633type MockContentWhitelistRepository_Expecter struct {
1634 mock *mock.Mock
1635}
1636
1637func (_m *MockContentWhitelistRepository) EXPECT() *MockContentWhitelistRepository_Expecter {
1638 return &MockContentWhitelistRepository_Expecter{mock: &_m.Mock}
1639}
1640
1641// Add provides a mock function for the type MockContentWhitelistRepository
1642func (_mock *MockContentWhitelistRepository) Add(ctx context.Context, domain string) error {
1643 ret := _mock.Called(ctx, domain)
1644
1645 if len(ret) == 0 {
1646 panic("no return value specified for Add")
1647 }
1648
1649 var r0 error
1650 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
1651 r0 = returnFunc(ctx, domain)
1652 } else {
1653 r0 = ret.Error(0)
1654 }
1655 return r0
1656}
1657
1658// MockContentWhitelistRepository_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
1659type MockContentWhitelistRepository_Add_Call struct {
1660 *mock.Call
1661}
1662
1663// Add is a helper method to define mock.On call
1664// - ctx context.Context
1665// - domain string
1666func (_e *MockContentWhitelistRepository_Expecter) Add(ctx interface{}, domain interface{}) *MockContentWhitelistRepository_Add_Call {
1667 return &MockContentWhitelistRepository_Add_Call{Call: _e.mock.On("Add", ctx, domain)}
1668}
1669
1670func (_c *MockContentWhitelistRepository_Add_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Add_Call {
1671 _c.Call.Run(func(args mock.Arguments) {
1672 var arg0 context.Context
1673 if args[0] != nil {
1674 arg0 = args[0].(context.Context)
1675 }
1676 var arg1 string
1677 if args[1] != nil {
1678 arg1 = args[1].(string)
1679 }
1680 run(
1681 arg0,
1682 arg1,
1683 )
1684 })
1685 return _c
1686}
1687
1688func (_c *MockContentWhitelistRepository_Add_Call) Return(err error) *MockContentWhitelistRepository_Add_Call {
1689 _c.Call.Return(err)
1690 return _c
1691}
1692
1693func (_c *MockContentWhitelistRepository_Add_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Add_Call {
1694 _c.Call.Return(run)
1695 return _c
1696}
1697
1698// Contains provides a mock function for the type MockContentWhitelistRepository
1699func (_mock *MockContentWhitelistRepository) Contains(ctx context.Context, domain string) (bool, error) {
1700 ret := _mock.Called(ctx, domain)
1701
1702 if len(ret) == 0 {
1703 panic("no return value specified for Contains")
1704 }
1705
1706 var r0 bool
1707 var r1 error
1708 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
1709 return returnFunc(ctx, domain)
1710 }
1711 if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
1712 r0 = returnFunc(ctx, domain)
1713 } else {
1714 r0 = ret.Get(0).(bool)
1715 }
1716 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
1717 r1 = returnFunc(ctx, domain)
1718 } else {
1719 r1 = ret.Error(1)
1720 }
1721 return r0, r1
1722}
1723
1724// MockContentWhitelistRepository_Contains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Contains'
1725type MockContentWhitelistRepository_Contains_Call struct {
1726 *mock.Call
1727}
1728
1729// Contains is a helper method to define mock.On call
1730// - ctx context.Context
1731// - domain string
1732func (_e *MockContentWhitelistRepository_Expecter) Contains(ctx interface{}, domain interface{}) *MockContentWhitelistRepository_Contains_Call {
1733 return &MockContentWhitelistRepository_Contains_Call{Call: _e.mock.On("Contains", ctx, domain)}
1734}
1735
1736func (_c *MockContentWhitelistRepository_Contains_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Contains_Call {
1737 _c.Call.Run(func(args mock.Arguments) {
1738 var arg0 context.Context
1739 if args[0] != nil {
1740 arg0 = args[0].(context.Context)
1741 }
1742 var arg1 string
1743 if args[1] != nil {
1744 arg1 = args[1].(string)
1745 }
1746 run(
1747 arg0,
1748 arg1,
1749 )
1750 })
1751 return _c
1752}
1753
1754func (_c *MockContentWhitelistRepository_Contains_Call) Return(b bool, err error) *MockContentWhitelistRepository_Contains_Call {
1755 _c.Call.Return(b, err)
1756 return _c
1757}
1758
1759func (_c *MockContentWhitelistRepository_Contains_Call) RunAndReturn(run func(ctx context.Context, domain string) (bool, error)) *MockContentWhitelistRepository_Contains_Call {
1760 _c.Call.Return(run)
1761 return _c
1762}
1763
1764// GetAll provides a mock function for the type MockContentWhitelistRepository
1765func (_mock *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]string, error) {
1766 ret := _mock.Called(ctx)
1767
1768 if len(ret) == 0 {
1769 panic("no return value specified for GetAll")
1770 }
1771
1772 var r0 []string
1773 var r1 error
1774 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
1775 return returnFunc(ctx)
1776 }
1777 if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
1778 r0 = returnFunc(ctx)
1779 } else {
1780 if ret.Get(0) != nil {
1781 r0 = ret.Get(0).([]string)
1782 }
1783 }
1784 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1785 r1 = returnFunc(ctx)
1786 } else {
1787 r1 = ret.Error(1)
1788 }
1789 return r0, r1
1790}
1791
1792// MockContentWhitelistRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
1793type MockContentWhitelistRepository_GetAll_Call struct {
1794 *mock.Call
1795}
1796
1797// GetAll is a helper method to define mock.On call
1798// - ctx context.Context
1799func (_e *MockContentWhitelistRepository_Expecter) GetAll(ctx interface{}) *MockContentWhitelistRepository_GetAll_Call {
1800 return &MockContentWhitelistRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
1801}
1802
1803func (_c *MockContentWhitelistRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockContentWhitelistRepository_GetAll_Call {
1804 _c.Call.Run(func(args mock.Arguments) {
1805 var arg0 context.Context
1806 if args[0] != nil {
1807 arg0 = args[0].(context.Context)
1808 }
1809 run(
1810 arg0,
1811 )
1812 })
1813 return _c
1814}
1815
1816func (_c *MockContentWhitelistRepository_GetAll_Call) Return(strings []string, err error) *MockContentWhitelistRepository_GetAll_Call {
1817 _c.Call.Return(strings, err)
1818 return _c
1819}
1820
1821func (_c *MockContentWhitelistRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockContentWhitelistRepository_GetAll_Call {
1822 _c.Call.Return(run)
1823 return _c
1824}
1825
1826// Remove provides a mock function for the type MockContentWhitelistRepository
1827func (_mock *MockContentWhitelistRepository) Remove(ctx context.Context, domain string) error {
1828 ret := _mock.Called(ctx, domain)
1829
1830 if len(ret) == 0 {
1831 panic("no return value specified for Remove")
1832 }
1833
1834 var r0 error
1835 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
1836 r0 = returnFunc(ctx, domain)
1837 } else {
1838 r0 = ret.Error(0)
1839 }
1840 return r0
1841}
1842
1843// MockContentWhitelistRepository_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
1844type MockContentWhitelistRepository_Remove_Call struct {
1845 *mock.Call
1846}
1847
1848// Remove is a helper method to define mock.On call
1849// - ctx context.Context
1850// - domain string
1851func (_e *MockContentWhitelistRepository_Expecter) Remove(ctx interface{}, domain interface{}) *MockContentWhitelistRepository_Remove_Call {
1852 return &MockContentWhitelistRepository_Remove_Call{Call: _e.mock.On("Remove", ctx, domain)}
1853}
1854
1855func (_c *MockContentWhitelistRepository_Remove_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Remove_Call {
1856 _c.Call.Run(func(args mock.Arguments) {
1857 var arg0 context.Context
1858 if args[0] != nil {
1859 arg0 = args[0].(context.Context)
1860 }
1861 var arg1 string
1862 if args[1] != nil {
1863 arg1 = args[1].(string)
1864 }
1865 run(
1866 arg0,
1867 arg1,
1868 )
1869 })
1870 return _c
1871}
1872
1873func (_c *MockContentWhitelistRepository_Remove_Call) Return(err error) *MockContentWhitelistRepository_Remove_Call {
1874 _c.Call.Return(err)
1875 return _c
1876}
1877
1878func (_c *MockContentWhitelistRepository_Remove_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Remove_Call {
1879 _c.Call.Return(run)
1880 return _c
1881}
1882
1883// NewMockHistoryRepository creates a new instance of MockHistoryRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1884// The first argument is typically a *testing.T value.
1885func NewMockHistoryRepository(t interface {
1886 mock.TestingT
1887 Cleanup(func())
1888}) *MockHistoryRepository {
1889 mock := &MockHistoryRepository{}
1890 mock.Mock.Test(t)
1891
1892 t.Cleanup(func() { mock.AssertExpectations(t) })
1893
1894 return mock
1895}
1896
1897// MockHistoryRepository is an autogenerated mock type for the HistoryRepository type
1898type MockHistoryRepository struct {
1899 mock.Mock
1900}
1901
1902type MockHistoryRepository_Expecter struct {
1903 mock *mock.Mock
1904}
1905
1906func (_m *MockHistoryRepository) EXPECT() *MockHistoryRepository_Expecter {
1907 return &MockHistoryRepository_Expecter{mock: &_m.Mock}
1908}
1909
1910// Delete provides a mock function for the type MockHistoryRepository
1911func (_mock *MockHistoryRepository) Delete(ctx context.Context, id int64) error {
1912 ret := _mock.Called(ctx, id)
1913
1914 if len(ret) == 0 {
1915 panic("no return value specified for Delete")
1916 }
1917
1918 var r0 error
1919 if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
1920 r0 = returnFunc(ctx, id)
1921 } else {
1922 r0 = ret.Error(0)
1923 }
1924 return r0
1925}
1926
1927// MockHistoryRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
1928type MockHistoryRepository_Delete_Call struct {
1929 *mock.Call
1930}
1931
1932// Delete is a helper method to define mock.On call
1933// - ctx context.Context
1934// - id int64
1935func (_e *MockHistoryRepository_Expecter) Delete(ctx interface{}, id interface{}) *MockHistoryRepository_Delete_Call {
1936 return &MockHistoryRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
1937}
1938
1939func (_c *MockHistoryRepository_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistoryRepository_Delete_Call {
1940 _c.Call.Run(func(args mock.Arguments) {
1941 var arg0 context.Context
1942 if args[0] != nil {
1943 arg0 = args[0].(context.Context)
1944 }
1945 var arg1 int64
1946 if args[1] != nil {
1947 arg1 = args[1].(int64)
1948 }
1949 run(
1950 arg0,
1951 arg1,
1952 )
1953 })
1954 return _c
1955}
1956
1957func (_c *MockHistoryRepository_Delete_Call) Return(err error) *MockHistoryRepository_Delete_Call {
1958 _c.Call.Return(err)
1959 return _c
1960}
1961
1962func (_c *MockHistoryRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistoryRepository_Delete_Call {
1963 _c.Call.Return(run)
1964 return _c
1965}
1966
1967// DeleteAll provides a mock function for the type MockHistoryRepository
1968func (_mock *MockHistoryRepository) DeleteAll(ctx context.Context) error {
1969 ret := _mock.Called(ctx)
1970
1971 if len(ret) == 0 {
1972 panic("no return value specified for DeleteAll")
1973 }
1974
1975 var r0 error
1976 if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
1977 r0 = returnFunc(ctx)
1978 } else {
1979 r0 = ret.Error(0)
1980 }
1981 return r0
1982}
1983
1984// MockHistoryRepository_DeleteAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAll'
1985type MockHistoryRepository_DeleteAll_Call struct {
1986 *mock.Call
1987}
1988
1989// DeleteAll is a helper method to define mock.On call
1990// - ctx context.Context
1991func (_e *MockHistoryRepository_Expecter) DeleteAll(ctx interface{}) *MockHistoryRepository_DeleteAll_Call {
1992 return &MockHistoryRepository_DeleteAll_Call{Call: _e.mock.On("DeleteAll", ctx)}
1993}
1994
1995func (_c *MockHistoryRepository_DeleteAll_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_DeleteAll_Call {
1996 _c.Call.Run(func(args mock.Arguments) {
1997 var arg0 context.Context
1998 if args[0] != nil {
1999 arg0 = args[0].(context.Context)
2000 }
2001 run(
2002 arg0,
2003 )
2004 })
2005 return _c
2006}
2007
2008func (_c *MockHistoryRepository_DeleteAll_Call) Return(err error) *MockHistoryRepository_DeleteAll_Call {
2009 _c.Call.Return(err)
2010 return _c
2011}
2012
2013func (_c *MockHistoryRepository_DeleteAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHistoryRepository_DeleteAll_Call {
2014 _c.Call.Return(run)
2015 return _c
2016}
2017
2018// DeleteByDomain provides a mock function for the type MockHistoryRepository
2019func (_mock *MockHistoryRepository) DeleteByDomain(ctx context.Context, domain string) error {
2020 ret := _mock.Called(ctx, domain)
2021
2022 if len(ret) == 0 {
2023 panic("no return value specified for DeleteByDomain")
2024 }
2025
2026 var r0 error
2027 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
2028 r0 = returnFunc(ctx, domain)
2029 } else {
2030 r0 = ret.Error(0)
2031 }
2032 return r0
2033}
2034
2035// MockHistoryRepository_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain'
2036type MockHistoryRepository_DeleteByDomain_Call struct {
2037 *mock.Call
2038}
2039
2040// DeleteByDomain is a helper method to define mock.On call
2041// - ctx context.Context
2042// - domain string
2043func (_e *MockHistoryRepository_Expecter) DeleteByDomain(ctx interface{}, domain interface{}) *MockHistoryRepository_DeleteByDomain_Call {
2044 return &MockHistoryRepository_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)}
2045}
2046
2047func (_c *MockHistoryRepository_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHistoryRepository_DeleteByDomain_Call {
2048 _c.Call.Run(func(args mock.Arguments) {
2049 var arg0 context.Context
2050 if args[0] != nil {
2051 arg0 = args[0].(context.Context)
2052 }
2053 var arg1 string
2054 if args[1] != nil {
2055 arg1 = args[1].(string)
2056 }
2057 run(
2058 arg0,
2059 arg1,
2060 )
2061 })
2062 return _c
2063}
2064
2065func (_c *MockHistoryRepository_DeleteByDomain_Call) Return(err error) *MockHistoryRepository_DeleteByDomain_Call {
2066 _c.Call.Return(err)
2067 return _c
2068}
2069
2070func (_c *MockHistoryRepository_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHistoryRepository_DeleteByDomain_Call {
2071 _c.Call.Return(run)
2072 return _c
2073}
2074
2075// DeleteOlderThan provides a mock function for the type MockHistoryRepository
2076func (_mock *MockHistoryRepository) DeleteOlderThan(ctx context.Context, before time.Time) error {
2077 ret := _mock.Called(ctx, before)
2078
2079 if len(ret) == 0 {
2080 panic("no return value specified for DeleteOlderThan")
2081 }
2082
2083 var r0 error
2084 if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
2085 r0 = returnFunc(ctx, before)
2086 } else {
2087 r0 = ret.Error(0)
2088 }
2089 return r0
2090}
2091
2092// MockHistoryRepository_DeleteOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOlderThan'
2093type MockHistoryRepository_DeleteOlderThan_Call struct {
2094 *mock.Call
2095}
2096
2097// DeleteOlderThan is a helper method to define mock.On call
2098// - ctx context.Context
2099// - before time.Time
2100func (_e *MockHistoryRepository_Expecter) DeleteOlderThan(ctx interface{}, before interface{}) *MockHistoryRepository_DeleteOlderThan_Call {
2101 return &MockHistoryRepository_DeleteOlderThan_Call{Call: _e.mock.On("DeleteOlderThan", ctx, before)}
2102}
2103
2104func (_c *MockHistoryRepository_DeleteOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHistoryRepository_DeleteOlderThan_Call {
2105 _c.Call.Run(func(args mock.Arguments) {
2106 var arg0 context.Context
2107 if args[0] != nil {
2108 arg0 = args[0].(context.Context)
2109 }
2110 var arg1 time.Time
2111 if args[1] != nil {
2112 arg1 = args[1].(time.Time)
2113 }
2114 run(
2115 arg0,
2116 arg1,
2117 )
2118 })
2119 return _c
2120}
2121
2122func (_c *MockHistoryRepository_DeleteOlderThan_Call) Return(err error) *MockHistoryRepository_DeleteOlderThan_Call {
2123 _c.Call.Return(err)
2124 return _c
2125}
2126
2127func (_c *MockHistoryRepository_DeleteOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHistoryRepository_DeleteOlderThan_Call {
2128 _c.Call.Return(run)
2129 return _c
2130}
2131
2132// FindByURL provides a mock function for the type MockHistoryRepository
2133func (_mock *MockHistoryRepository) FindByURL(ctx context.Context, url string) (*entity.HistoryEntry, error) {
2134 ret := _mock.Called(ctx, url)
2135
2136 if len(ret) == 0 {
2137 panic("no return value specified for FindByURL")
2138 }
2139
2140 var r0 *entity.HistoryEntry
2141 var r1 error
2142 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.HistoryEntry, error)); ok {
2143 return returnFunc(ctx, url)
2144 }
2145 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.HistoryEntry); ok {
2146 r0 = returnFunc(ctx, url)
2147 } else {
2148 if ret.Get(0) != nil {
2149 r0 = ret.Get(0).(*entity.HistoryEntry)
2150 }
2151 }
2152 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
2153 r1 = returnFunc(ctx, url)
2154 } else {
2155 r1 = ret.Error(1)
2156 }
2157 return r0, r1
2158}
2159
2160// MockHistoryRepository_FindByURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByURL'
2161type MockHistoryRepository_FindByURL_Call struct {
2162 *mock.Call
2163}
2164
2165// FindByURL is a helper method to define mock.On call
2166// - ctx context.Context
2167// - url string
2168func (_e *MockHistoryRepository_Expecter) FindByURL(ctx interface{}, url interface{}) *MockHistoryRepository_FindByURL_Call {
2169 return &MockHistoryRepository_FindByURL_Call{Call: _e.mock.On("FindByURL", ctx, url)}
2170}
2171
2172func (_c *MockHistoryRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_FindByURL_Call {
2173 _c.Call.Run(func(args mock.Arguments) {
2174 var arg0 context.Context
2175 if args[0] != nil {
2176 arg0 = args[0].(context.Context)
2177 }
2178 var arg1 string
2179 if args[1] != nil {
2180 arg1 = args[1].(string)
2181 }
2182 run(
2183 arg0,
2184 arg1,
2185 )
2186 })
2187 return _c
2188}
2189
2190func (_c *MockHistoryRepository_FindByURL_Call) Return(historyEntry *entity.HistoryEntry, err error) *MockHistoryRepository_FindByURL_Call {
2191 _c.Call.Return(historyEntry, err)
2192 return _c
2193}
2194
2195func (_c *MockHistoryRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.HistoryEntry, error)) *MockHistoryRepository_FindByURL_Call {
2196 _c.Call.Return(run)
2197 return _c
2198}
2199
2200// GetDailyVisitCount provides a mock function for the type MockHistoryRepository
2201func (_mock *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error) {
2202 ret := _mock.Called(ctx, daysAgo)
2203
2204 if len(ret) == 0 {
2205 panic("no return value specified for GetDailyVisitCount")
2206 }
2207
2208 var r0 []*entity.DailyVisitCount
2209 var r1 error
2210 if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.DailyVisitCount, error)); ok {
2211 return returnFunc(ctx, daysAgo)
2212 }
2213 if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.DailyVisitCount); ok {
2214 r0 = returnFunc(ctx, daysAgo)
2215 } else {
2216 if ret.Get(0) != nil {
2217 r0 = ret.Get(0).([]*entity.DailyVisitCount)
2218 }
2219 }
2220 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
2221 r1 = returnFunc(ctx, daysAgo)
2222 } else {
2223 r1 = ret.Error(1)
2224 }
2225 return r0, r1
2226}
2227
2228// MockHistoryRepository_GetDailyVisitCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDailyVisitCount'
2229type MockHistoryRepository_GetDailyVisitCount_Call struct {
2230 *mock.Call
2231}
2232
2233// GetDailyVisitCount is a helper method to define mock.On call
2234// - ctx context.Context
2235// - daysAgo string
2236func (_e *MockHistoryRepository_Expecter) GetDailyVisitCount(ctx interface{}, daysAgo interface{}) *MockHistoryRepository_GetDailyVisitCount_Call {
2237 return &MockHistoryRepository_GetDailyVisitCount_Call{Call: _e.mock.On("GetDailyVisitCount", ctx, daysAgo)}
2238}
2239
2240func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Run(run func(ctx context.Context, daysAgo string)) *MockHistoryRepository_GetDailyVisitCount_Call {
2241 _c.Call.Run(func(args mock.Arguments) {
2242 var arg0 context.Context
2243 if args[0] != nil {
2244 arg0 = args[0].(context.Context)
2245 }
2246 var arg1 string
2247 if args[1] != nil {
2248 arg1 = args[1].(string)
2249 }
2250 run(
2251 arg0,
2252 arg1,
2253 )
2254 })
2255 return _c
2256}
2257
2258func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Return(dailyVisitCounts []*entity.DailyVisitCount, err error) *MockHistoryRepository_GetDailyVisitCount_Call {
2259 _c.Call.Return(dailyVisitCounts, err)
2260 return _c
2261}
2262
2263func (_c *MockHistoryRepository_GetDailyVisitCount_Call) RunAndReturn(run func(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error)) *MockHistoryRepository_GetDailyVisitCount_Call {
2264 _c.Call.Return(run)
2265 return _c
2266}
2267
2268// GetDomainStats provides a mock function for the type MockHistoryRepository
2269func (_mock *MockHistoryRepository) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) {
2270 ret := _mock.Called(ctx, limit)
2271
2272 if len(ret) == 0 {
2273 panic("no return value specified for GetDomainStats")
2274 }
2275
2276 var r0 []*entity.DomainStat
2277 var r1 error
2278 if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok {
2279 return returnFunc(ctx, limit)
2280 }
2281 if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok {
2282 r0 = returnFunc(ctx, limit)
2283 } else {
2284 if ret.Get(0) != nil {
2285 r0 = ret.Get(0).([]*entity.DomainStat)
2286 }
2287 }
2288 if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
2289 r1 = returnFunc(ctx, limit)
2290 } else {
2291 r1 = ret.Error(1)
2292 }
2293 return r0, r1
2294}
2295
2296// MockHistoryRepository_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats'
2297type MockHistoryRepository_GetDomainStats_Call struct {
2298 *mock.Call
2299}
2300
2301// GetDomainStats is a helper method to define mock.On call
2302// - ctx context.Context
2303// - limit int
2304func (_e *MockHistoryRepository_Expecter) GetDomainStats(ctx interface{}, limit interface{}) *MockHistoryRepository_GetDomainStats_Call {
2305 return &MockHistoryRepository_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)}
2306}
2307
2308func (_c *MockHistoryRepository_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHistoryRepository_GetDomainStats_Call {
2309 _c.Call.Run(func(args mock.Arguments) {
2310 var arg0 context.Context
2311 if args[0] != nil {
2312 arg0 = args[0].(context.Context)
2313 }
2314 var arg1 int
2315 if args[1] != nil {
2316 arg1 = args[1].(int)
2317 }
2318 run(
2319 arg0,
2320 arg1,
2321 )
2322 })
2323 return _c
2324}
2325
2326func (_c *MockHistoryRepository_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHistoryRepository_GetDomainStats_Call {
2327 _c.Call.Return(domainStats, err)
2328 return _c
2329}
2330
2331func (_c *MockHistoryRepository_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHistoryRepository_GetDomainStats_Call {
2332 _c.Call.Return(run)
2333 return _c
2334}
2335
2336// GetHourlyDistribution provides a mock function for the type MockHistoryRepository
2337func (_mock *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ([]*entity.HourlyDistribution, error) {
2338 ret := _mock.Called(ctx)
2339
2340 if len(ret) == 0 {
2341 panic("no return value specified for GetHourlyDistribution")
2342 }
2343
2344 var r0 []*entity.HourlyDistribution
2345 var r1 error
2346 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HourlyDistribution, error)); ok {
2347 return returnFunc(ctx)
2348 }
2349 if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HourlyDistribution); ok {
2350 r0 = returnFunc(ctx)
2351 } else {
2352 if ret.Get(0) != nil {
2353 r0 = ret.Get(0).([]*entity.HourlyDistribution)
2354 }
2355 }
2356 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
2357 r1 = returnFunc(ctx)
2358 } else {
2359 r1 = ret.Error(1)
2360 }
2361 return r0, r1
2362}
2363
2364// MockHistoryRepository_GetHourlyDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHourlyDistribution'
2365type MockHistoryRepository_GetHourlyDistribution_Call struct {
2366 *mock.Call
2367}
2368
2369// GetHourlyDistribution is a helper method to define mock.On call
2370// - ctx context.Context
2371func (_e *MockHistoryRepository_Expecter) GetHourlyDistribution(ctx interface{}) *MockHistoryRepository_GetHourlyDistribution_Call {
2372 return &MockHistoryRepository_GetHourlyDistribution_Call{Call: _e.mock.On("GetHourlyDistribution", ctx)}
2373}
2374
2375func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetHourlyDistribution_Call {
2376 _c.Call.Run(func(args mock.Arguments) {
2377 var arg0 context.Context
2378 if args[0] != nil {
2379 arg0 = args[0].(context.Context)
2380 }
2381 run(
2382 arg0,
2383 )
2384 })
2385 return _c
2386}
2387
2388func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Return(hourlyDistributions []*entity.HourlyDistribution, err error) *MockHistoryRepository_GetHourlyDistribution_Call {
2389 _c.Call.Return(hourlyDistributions, err)
2390 return _c
2391}
2392
2393func (_c *MockHistoryRepository_GetHourlyDistribution_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HourlyDistribution, error)) *MockHistoryRepository_GetHourlyDistribution_Call {
2394 _c.Call.Return(run)
2395 return _c
2396}
2397
2398// GetRecent provides a mock function for the type MockHistoryRepository
2399func (_mock *MockHistoryRepository) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
2400 ret := _mock.Called(ctx, limit, offset)
2401
2402 if len(ret) == 0 {
2403 panic("no return value specified for GetRecent")
2404 }
2405
2406 var r0 []*entity.HistoryEntry
2407 var r1 error
2408 if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
2409 return returnFunc(ctx, limit, offset)
2410 }
2411 if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
2412 r0 = returnFunc(ctx, limit, offset)
2413 } else {
2414 if ret.Get(0) != nil {
2415 r0 = ret.Get(0).([]*entity.HistoryEntry)
2416 }
2417 }
2418 if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
2419 r1 = returnFunc(ctx, limit, offset)
2420 } else {
2421 r1 = ret.Error(1)
2422 }
2423 return r0, r1
2424}
2425
2426// MockHistoryRepository_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
2427type MockHistoryRepository_GetRecent_Call struct {
2428 *mock.Call
2429}
2430
2431// GetRecent is a helper method to define mock.On call
2432// - ctx context.Context
2433// - limit int
2434// - offset int
2435func (_e *MockHistoryRepository_Expecter) GetRecent(ctx interface{}, limit interface{}, offset interface{}) *MockHistoryRepository_GetRecent_Call {
2436 return &MockHistoryRepository_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)}
2437}
2438
2439func (_c *MockHistoryRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistoryRepository_GetRecent_Call {
2440 _c.Call.Run(func(args mock.Arguments) {
2441 var arg0 context.Context
2442 if args[0] != nil {
2443 arg0 = args[0].(context.Context)
2444 }
2445 var arg1 int
2446 if args[1] != nil {
2447 arg1 = args[1].(int)
2448 }
2449 var arg2 int
2450 if args[2] != nil {
2451 arg2 = args[2].(int)
2452 }
2453 run(
2454 arg0,
2455 arg1,
2456 arg2,
2457 )
2458 })
2459 return _c
2460}
2461
2462func (_c *MockHistoryRepository_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecent_Call {
2463 _c.Call.Return(historyEntrys, err)
2464 return _c
2465}
2466
2467func (_c *MockHistoryRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecent_Call {
2468 _c.Call.Return(run)
2469 return _c
2470}
2471
2472// GetStats provides a mock function for the type MockHistoryRepository
2473func (_mock *MockHistoryRepository) GetStats(ctx context.Context) (*entity.HistoryStats, error) {
2474 ret := _mock.Called(ctx)
2475
2476 if len(ret) == 0 {
2477 panic("no return value specified for GetStats")
2478 }
2479
2480 var r0 *entity.HistoryStats
2481 var r1 error
2482 if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok {
2483 return returnFunc(ctx)
2484 }
2485 if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok {
2486 r0 = returnFunc(ctx)
2487 } else {
2488 if ret.Get(0) != nil {
2489 r0 = ret.Get(0).(*entity.HistoryStats)
2490 }
2491 }
2492 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
2493 r1 = returnFunc(ctx)
2494 } else {
2495 r1 = ret.Error(1)
2496 }
2497 return r0, r1
2498}
2499
2500// MockHistoryRepository_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats'
2501type MockHistoryRepository_GetStats_Call struct {
2502 *mock.Call
2503}
2504
2505// GetStats is a helper method to define mock.On call
2506// - ctx context.Context
2507func (_e *MockHistoryRepository_Expecter) GetStats(ctx interface{}) *MockHistoryRepository_GetStats_Call {
2508 return &MockHistoryRepository_GetStats_Call{Call: _e.mock.On("GetStats", ctx)}
2509}
2510
2511func (_c *MockHistoryRepository_GetStats_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetStats_Call {
2512 _c.Call.Run(func(args mock.Arguments) {
2513 var arg0 context.Context
2514 if args[0] != nil {
2515 arg0 = args[0].(context.Context)
2516 }
2517 run(
2518 arg0,
2519 )
2520 })
2521 return _c
2522}
2523
2524func (_c *MockHistoryRepository_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHistoryRepository_GetStats_Call {
2525 _c.Call.Return(historyStats, err)
2526 return _c
2527}
2528
2529func (_c *MockHistoryRepository_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHistoryRepository_GetStats_Call {
2530 _c.Call.Return(run)
2531 return _c
2532}
2533
2534// IncrementVisitCount provides a mock function for the type MockHistoryRepository
2535func (_mock *MockHistoryRepository) IncrementVisitCount(ctx context.Context, url string) error {
2536 ret := _mock.Called(ctx, url)
2537
2538 if len(ret) == 0 {
2539 panic("no return value specified for IncrementVisitCount")
2540 }
2541
2542 var r0 error
2543 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
2544 r0 = returnFunc(ctx, url)
2545 } else {
2546 r0 = ret.Error(0)
2547 }
2548 return r0
2549}
2550
2551// MockHistoryRepository_IncrementVisitCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementVisitCount'
2552type MockHistoryRepository_IncrementVisitCount_Call struct {
2553 *mock.Call
2554}
2555
2556// IncrementVisitCount is a helper method to define mock.On call
2557// - ctx context.Context
2558// - url string
2559func (_e *MockHistoryRepository_Expecter) IncrementVisitCount(ctx interface{}, url interface{}) *MockHistoryRepository_IncrementVisitCount_Call {
2560 return &MockHistoryRepository_IncrementVisitCount_Call{Call: _e.mock.On("IncrementVisitCount", ctx, url)}
2561}
2562
2563func (_c *MockHistoryRepository_IncrementVisitCount_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_IncrementVisitCount_Call {
2564 _c.Call.Run(func(args mock.Arguments) {
2565 var arg0 context.Context
2566 if args[0] != nil {
2567 arg0 = args[0].(context.Context)
2568 }
2569 var arg1 string
2570 if args[1] != nil {
2571 arg1 = args[1].(string)
2572 }
2573 run(
2574 arg0,
2575 arg1,
2576 )
2577 })
2578 return _c
2579}
2580
2581func (_c *MockHistoryRepository_IncrementVisitCount_Call) Return(err error) *MockHistoryRepository_IncrementVisitCount_Call {
2582 _c.Call.Return(err)
2583 return _c
2584}
2585
2586func (_c *MockHistoryRepository_IncrementVisitCount_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockHistoryRepository_IncrementVisitCount_Call {
2587 _c.Call.Return(run)
2588 return _c
2589}
2590
2591// Save provides a mock function for the type MockHistoryRepository
2592func (_mock *MockHistoryRepository) Save(ctx context.Context, entry *entity.HistoryEntry) error {
2593 ret := _mock.Called(ctx, entry)
2594
2595 if len(ret) == 0 {
2596 panic("no return value specified for Save")
2597 }
2598
2599 var r0 error
2600 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.HistoryEntry) error); ok {
2601 r0 = returnFunc(ctx, entry)
2602 } else {
2603 r0 = ret.Error(0)
2604 }
2605 return r0
2606}
2607
2608// MockHistoryRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
2609type MockHistoryRepository_Save_Call struct {
2610 *mock.Call
2611}
2612
2613// Save is a helper method to define mock.On call
2614// - ctx context.Context
2615// - entry *entity.HistoryEntry
2616func (_e *MockHistoryRepository_Expecter) Save(ctx interface{}, entry interface{}) *MockHistoryRepository_Save_Call {
2617 return &MockHistoryRepository_Save_Call{Call: _e.mock.On("Save", ctx, entry)}
2618}
2619
2620func (_c *MockHistoryRepository_Save_Call) Run(run func(ctx context.Context, entry *entity.HistoryEntry)) *MockHistoryRepository_Save_Call {
2621 _c.Call.Run(func(args mock.Arguments) {
2622 var arg0 context.Context
2623 if args[0] != nil {
2624 arg0 = args[0].(context.Context)
2625 }
2626 var arg1 *entity.HistoryEntry
2627 if args[1] != nil {
2628 arg1 = args[1].(*entity.HistoryEntry)
2629 }
2630 run(
2631 arg0,
2632 arg1,
2633 )
2634 })
2635 return _c
2636}
2637
2638func (_c *MockHistoryRepository_Save_Call) Return(err error) *MockHistoryRepository_Save_Call {
2639 _c.Call.Return(err)
2640 return _c
2641}
2642
2643func (_c *MockHistoryRepository_Save_Call) RunAndReturn(run func(ctx context.Context, entry *entity.HistoryEntry) error) *MockHistoryRepository_Save_Call {
2644 _c.Call.Return(run)
2645 return _c
2646}
2647
2648// Search provides a mock function for the type MockHistoryRepository
2649func (_mock *MockHistoryRepository) Search(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error) {
2650 ret := _mock.Called(ctx, query, limit)
2651
2652 if len(ret) == 0 {
2653 panic("no return value specified for Search")
2654 }
2655
2656 var r0 []entity.HistoryMatch
2657 var r1 error
2658 if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]entity.HistoryMatch, error)); ok {
2659 return returnFunc(ctx, query, limit)
2660 }
2661 if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []entity.HistoryMatch); ok {
2662 r0 = returnFunc(ctx, query, limit)
2663 } else {
2664 if ret.Get(0) != nil {
2665 r0 = ret.Get(0).([]entity.HistoryMatch)
2666 }
2667 }
2668 if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok {
2669 r1 = returnFunc(ctx, query, limit)
2670 } else {
2671 r1 = ret.Error(1)
2672 }
2673 return r0, r1
2674}
2675
2676// MockHistoryRepository_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
2677type MockHistoryRepository_Search_Call struct {
2678 *mock.Call
2679}
2680
2681// Search is a helper method to define mock.On call
2682// - ctx context.Context
2683// - query string
2684// - limit int
2685func (_e *MockHistoryRepository_Expecter) Search(ctx interface{}, query interface{}, limit interface{}) *MockHistoryRepository_Search_Call {
2686 return &MockHistoryRepository_Search_Call{Call: _e.mock.On("Search", ctx, query, limit)}
2687}
2688
2689func (_c *MockHistoryRepository_Search_Call) Run(run func(ctx context.Context, query string, limit int)) *MockHistoryRepository_Search_Call {
2690 _c.Call.Run(func(args mock.Arguments) {
2691 var arg0 context.Context
2692 if args[0] != nil {
2693 arg0 = args[0].(context.Context)
2694 }
2695 var arg1 string
2696 if args[1] != nil {
2697 arg1 = args[1].(string)
2698 }
2699 var arg2 int
2700 if args[2] != nil {
2701 arg2 = args[2].(int)
2702 }
2703 run(
2704 arg0,
2705 arg1,
2706 arg2,
2707 )
2708 })
2709 return _c
2710}
2711
2712func (_c *MockHistoryRepository_Search_Call) Return(historyMatchs []entity.HistoryMatch, err error) *MockHistoryRepository_Search_Call {
2713 _c.Call.Return(historyMatchs, err)
2714 return _c
2715}
2716
2717func (_c *MockHistoryRepository_Search_Call) RunAndReturn(run func(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error)) *MockHistoryRepository_Search_Call {
2718 _c.Call.Return(run)
2719 return _c
2720}
2721
2722// NewMockSessionRepository creates a new instance of MockSessionRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2723// The first argument is typically a *testing.T value.
2724func NewMockSessionRepository(t interface {
2725 mock.TestingT
2726 Cleanup(func())
2727}) *MockSessionRepository {
2728 mock := &MockSessionRepository{}
2729 mock.Mock.Test(t)
2730
2731 t.Cleanup(func() { mock.AssertExpectations(t) })
2732
2733 return mock
2734}
2735
2736// MockSessionRepository is an autogenerated mock type for the SessionRepository type
2737type MockSessionRepository struct {
2738 mock.Mock
2739}
2740
2741type MockSessionRepository_Expecter struct {
2742 mock *mock.Mock
2743}
2744
2745func (_m *MockSessionRepository) EXPECT() *MockSessionRepository_Expecter {
2746 return &MockSessionRepository_Expecter{mock: &_m.Mock}
2747}
2748
2749// FindByID provides a mock function for the type MockSessionRepository
2750func (_mock *MockSessionRepository) FindByID(ctx context.Context, id entity.SessionID) (*entity.Session, error) {
2751 ret := _mock.Called(ctx, id)
2752
2753 if len(ret) == 0 {
2754 panic("no return value specified for FindByID")
2755 }
2756
2757 var r0 *entity.Session
2758 var r1 error
2759 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) (*entity.Session, error)); ok {
2760 return returnFunc(ctx, id)
2761 }
2762 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) *entity.Session); ok {
2763 r0 = returnFunc(ctx, id)
2764 } else {
2765 if ret.Get(0) != nil {
2766 r0 = ret.Get(0).(*entity.Session)
2767 }
2768 }
2769 if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID) error); ok {
2770 r1 = returnFunc(ctx, id)
2771 } else {
2772 r1 = ret.Error(1)
2773 }
2774 return r0, r1
2775}
2776
2777// MockSessionRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
2778type MockSessionRepository_FindByID_Call struct {
2779 *mock.Call
2780}
2781
2782// FindByID is a helper method to define mock.On call
2783// - ctx context.Context
2784// - id entity.SessionID
2785func (_e *MockSessionRepository_Expecter) FindByID(ctx interface{}, id interface{}) *MockSessionRepository_FindByID_Call {
2786 return &MockSessionRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
2787}
2788
2789func (_c *MockSessionRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.SessionID)) *MockSessionRepository_FindByID_Call {
2790 _c.Call.Run(func(args mock.Arguments) {
2791 var arg0 context.Context
2792 if args[0] != nil {
2793 arg0 = args[0].(context.Context)
2794 }
2795 var arg1 entity.SessionID
2796 if args[1] != nil {
2797 arg1 = args[1].(entity.SessionID)
2798 }
2799 run(
2800 arg0,
2801 arg1,
2802 )
2803 })
2804 return _c
2805}
2806
2807func (_c *MockSessionRepository_FindByID_Call) Return(session *entity.Session, err error) *MockSessionRepository_FindByID_Call {
2808 _c.Call.Return(session, err)
2809 return _c
2810}
2811
2812func (_c *MockSessionRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID) (*entity.Session, error)) *MockSessionRepository_FindByID_Call {
2813 _c.Call.Return(run)
2814 return _c
2815}
2816
2817// GetActive provides a mock function for the type MockSessionRepository
2818func (_mock *MockSessionRepository) GetActive(ctx context.Context) (*entity.Session, error) {
2819 ret := _mock.Called(ctx)
2820
2821 if len(ret) == 0 {
2822 panic("no return value specified for GetActive")
2823 }
2824
2825 var r0 *entity.Session
2826 var r1 error
2827 if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.Session, error)); ok {
2828 return returnFunc(ctx)
2829 }
2830 if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.Session); ok {
2831 r0 = returnFunc(ctx)
2832 } else {
2833 if ret.Get(0) != nil {
2834 r0 = ret.Get(0).(*entity.Session)
2835 }
2836 }
2837 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
2838 r1 = returnFunc(ctx)
2839 } else {
2840 r1 = ret.Error(1)
2841 }
2842 return r0, r1
2843}
2844
2845// MockSessionRepository_GetActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActive'
2846type MockSessionRepository_GetActive_Call struct {
2847 *mock.Call
2848}
2849
2850// GetActive is a helper method to define mock.On call
2851// - ctx context.Context
2852func (_e *MockSessionRepository_Expecter) GetActive(ctx interface{}) *MockSessionRepository_GetActive_Call {
2853 return &MockSessionRepository_GetActive_Call{Call: _e.mock.On("GetActive", ctx)}
2854}
2855
2856func (_c *MockSessionRepository_GetActive_Call) Run(run func(ctx context.Context)) *MockSessionRepository_GetActive_Call {
2857 _c.Call.Run(func(args mock.Arguments) {
2858 var arg0 context.Context
2859 if args[0] != nil {
2860 arg0 = args[0].(context.Context)
2861 }
2862 run(
2863 arg0,
2864 )
2865 })
2866 return _c
2867}
2868
2869func (_c *MockSessionRepository_GetActive_Call) Return(session *entity.Session, err error) *MockSessionRepository_GetActive_Call {
2870 _c.Call.Return(session, err)
2871 return _c
2872}
2873
2874func (_c *MockSessionRepository_GetActive_Call) RunAndReturn(run func(ctx context.Context) (*entity.Session, error)) *MockSessionRepository_GetActive_Call {
2875 _c.Call.Return(run)
2876 return _c
2877}
2878
2879// GetRecent provides a mock function for the type MockSessionRepository
2880func (_mock *MockSessionRepository) GetRecent(ctx context.Context, limit int) ([]*entity.Session, error) {
2881 ret := _mock.Called(ctx, limit)
2882
2883 if len(ret) == 0 {
2884 panic("no return value specified for GetRecent")
2885 }
2886
2887 var r0 []*entity.Session
2888 var r1 error
2889 if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.Session, error)); ok {
2890 return returnFunc(ctx, limit)
2891 }
2892 if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.Session); ok {
2893 r0 = returnFunc(ctx, limit)
2894 } else {
2895 if ret.Get(0) != nil {
2896 r0 = ret.Get(0).([]*entity.Session)
2897 }
2898 }
2899 if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
2900 r1 = returnFunc(ctx, limit)
2901 } else {
2902 r1 = ret.Error(1)
2903 }
2904 return r0, r1
2905}
2906
2907// MockSessionRepository_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
2908type MockSessionRepository_GetRecent_Call struct {
2909 *mock.Call
2910}
2911
2912// GetRecent is a helper method to define mock.On call
2913// - ctx context.Context
2914// - limit int
2915func (_e *MockSessionRepository_Expecter) GetRecent(ctx interface{}, limit interface{}) *MockSessionRepository_GetRecent_Call {
2916 return &MockSessionRepository_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit)}
2917}
2918
2919func (_c *MockSessionRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int)) *MockSessionRepository_GetRecent_Call {
2920 _c.Call.Run(func(args mock.Arguments) {
2921 var arg0 context.Context
2922 if args[0] != nil {
2923 arg0 = args[0].(context.Context)
2924 }
2925 var arg1 int
2926 if args[1] != nil {
2927 arg1 = args[1].(int)
2928 }
2929 run(
2930 arg0,
2931 arg1,
2932 )
2933 })
2934 return _c
2935}
2936
2937func (_c *MockSessionRepository_GetRecent_Call) Return(sessions []*entity.Session, err error) *MockSessionRepository_GetRecent_Call {
2938 _c.Call.Return(sessions, err)
2939 return _c
2940}
2941
2942func (_c *MockSessionRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.Session, error)) *MockSessionRepository_GetRecent_Call {
2943 _c.Call.Return(run)
2944 return _c
2945}
2946
2947// MarkEnded provides a mock function for the type MockSessionRepository
2948func (_mock *MockSessionRepository) MarkEnded(ctx context.Context, id entity.SessionID, endedAt time.Time) error {
2949 ret := _mock.Called(ctx, id, endedAt)
2950
2951 if len(ret) == 0 {
2952 panic("no return value specified for MarkEnded")
2953 }
2954
2955 var r0 error
2956 if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, time.Time) error); ok {
2957 r0 = returnFunc(ctx, id, endedAt)
2958 } else {
2959 r0 = ret.Error(0)
2960 }
2961 return r0
2962}
2963
2964// MockSessionRepository_MarkEnded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkEnded'
2965type MockSessionRepository_MarkEnded_Call struct {
2966 *mock.Call
2967}
2968
2969// MarkEnded is a helper method to define mock.On call
2970// - ctx context.Context
2971// - id entity.SessionID
2972// - endedAt time.Time
2973func (_e *MockSessionRepository_Expecter) MarkEnded(ctx interface{}, id interface{}, endedAt interface{}) *MockSessionRepository_MarkEnded_Call {
2974 return &MockSessionRepository_MarkEnded_Call{Call: _e.mock.On("MarkEnded", ctx, id, endedAt)}
2975}
2976
2977func (_c *MockSessionRepository_MarkEnded_Call) Run(run func(ctx context.Context, id entity.SessionID, endedAt time.Time)) *MockSessionRepository_MarkEnded_Call {
2978 _c.Call.Run(func(args mock.Arguments) {
2979 var arg0 context.Context
2980 if args[0] != nil {
2981 arg0 = args[0].(context.Context)
2982 }
2983 var arg1 entity.SessionID
2984 if args[1] != nil {
2985 arg1 = args[1].(entity.SessionID)
2986 }
2987 var arg2 time.Time
2988 if args[2] != nil {
2989 arg2 = args[2].(time.Time)
2990 }
2991 run(
2992 arg0,
2993 arg1,
2994 arg2,
2995 )
2996 })
2997 return _c
2998}
2999
3000func (_c *MockSessionRepository_MarkEnded_Call) Return(err error) *MockSessionRepository_MarkEnded_Call {
3001 _c.Call.Return(err)
3002 return _c
3003}
3004
3005func (_c *MockSessionRepository_MarkEnded_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID, endedAt time.Time) error) *MockSessionRepository_MarkEnded_Call {
3006 _c.Call.Return(run)
3007 return _c
3008}
3009
3010// Save provides a mock function for the type MockSessionRepository
3011func (_mock *MockSessionRepository) Save(ctx context.Context, session *entity.Session) error {
3012 ret := _mock.Called(ctx, session)
3013
3014 if len(ret) == 0 {
3015 panic("no return value specified for Save")
3016 }
3017
3018 var r0 error
3019 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Session) error); ok {
3020 r0 = returnFunc(ctx, session)
3021 } else {
3022 r0 = ret.Error(0)
3023 }
3024 return r0
3025}
3026
3027// MockSessionRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
3028type MockSessionRepository_Save_Call struct {
3029 *mock.Call
3030}
3031
3032// Save is a helper method to define mock.On call
3033// - ctx context.Context
3034// - session *entity.Session
3035func (_e *MockSessionRepository_Expecter) Save(ctx interface{}, session interface{}) *MockSessionRepository_Save_Call {
3036 return &MockSessionRepository_Save_Call{Call: _e.mock.On("Save", ctx, session)}
3037}
3038
3039func (_c *MockSessionRepository_Save_Call) Run(run func(ctx context.Context, session *entity.Session)) *MockSessionRepository_Save_Call {
3040 _c.Call.Run(func(args mock.Arguments) {
3041 var arg0 context.Context
3042 if args[0] != nil {
3043 arg0 = args[0].(context.Context)
3044 }
3045 var arg1 *entity.Session
3046 if args[1] != nil {
3047 arg1 = args[1].(*entity.Session)
3048 }
3049 run(
3050 arg0,
3051 arg1,
3052 )
3053 })
3054 return _c
3055}
3056
3057func (_c *MockSessionRepository_Save_Call) Return(err error) *MockSessionRepository_Save_Call {
3058 _c.Call.Return(err)
3059 return _c
3060}
3061
3062func (_c *MockSessionRepository_Save_Call) RunAndReturn(run func(ctx context.Context, session *entity.Session) error) *MockSessionRepository_Save_Call {
3063 _c.Call.Return(run)
3064 return _c
3065}
3066
3067// NewMockZoomRepository creates a new instance of MockZoomRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
3068// The first argument is typically a *testing.T value.
3069func NewMockZoomRepository(t interface {
3070 mock.TestingT
3071 Cleanup(func())
3072}) *MockZoomRepository {
3073 mock := &MockZoomRepository{}
3074 mock.Mock.Test(t)
3075
3076 t.Cleanup(func() { mock.AssertExpectations(t) })
3077
3078 return mock
3079}
3080
3081// MockZoomRepository is an autogenerated mock type for the ZoomRepository type
3082type MockZoomRepository struct {
3083 mock.Mock
3084}
3085
3086type MockZoomRepository_Expecter struct {
3087 mock *mock.Mock
3088}
3089
3090func (_m *MockZoomRepository) EXPECT() *MockZoomRepository_Expecter {
3091 return &MockZoomRepository_Expecter{mock: &_m.Mock}
3092}
3093
3094// Delete provides a mock function for the type MockZoomRepository
3095func (_mock *MockZoomRepository) Delete(ctx context.Context, domain string) error {
3096 ret := _mock.Called(ctx, domain)
3097
3098 if len(ret) == 0 {
3099 panic("no return value specified for Delete")
3100 }
3101
3102 var r0 error
3103 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
3104 r0 = returnFunc(ctx, domain)
3105 } else {
3106 r0 = ret.Error(0)
3107 }
3108 return r0
3109}
3110
3111// MockZoomRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
3112type MockZoomRepository_Delete_Call struct {
3113 *mock.Call
3114}
3115
3116// Delete is a helper method to define mock.On call
3117// - ctx context.Context
3118// - domain string
3119func (_e *MockZoomRepository_Expecter) Delete(ctx interface{}, domain interface{}) *MockZoomRepository_Delete_Call {
3120 return &MockZoomRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, domain)}
3121}
3122
3123func (_c *MockZoomRepository_Delete_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Delete_Call {
3124 _c.Call.Run(func(args mock.Arguments) {
3125 var arg0 context.Context
3126 if args[0] != nil {
3127 arg0 = args[0].(context.Context)
3128 }
3129 var arg1 string
3130 if args[1] != nil {
3131 arg1 = args[1].(string)
3132 }
3133 run(
3134 arg0,
3135 arg1,
3136 )
3137 })
3138 return _c
3139}
3140
3141func (_c *MockZoomRepository_Delete_Call) Return(err error) *MockZoomRepository_Delete_Call {
3142 _c.Call.Return(err)
3143 return _c
3144}
3145
3146func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockZoomRepository_Delete_Call {
3147 _c.Call.Return(run)
3148 return _c
3149}
3150
3151// Get provides a mock function for the type MockZoomRepository
3152func (_mock *MockZoomRepository) Get(ctx context.Context, domain string) (*entity.ZoomLevel, error) {
3153 ret := _mock.Called(ctx, domain)
3154
3155 if len(ret) == 0 {
3156 panic("no return value specified for Get")
3157 }
3158
3159 var r0 *entity.ZoomLevel
3160 var r1 error
3161 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok {
3162 return returnFunc(ctx, domain)
3163 }
3164 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok {
3165 r0 = returnFunc(ctx, domain)
3166 } else {
3167 if ret.Get(0) != nil {
3168 r0 = ret.Get(0).(*entity.ZoomLevel)
3169 }
3170 }
3171 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
3172 r1 = returnFunc(ctx, domain)
3173 } else {
3174 r1 = ret.Error(1)
3175 }
3176 return r0, r1
3177}
3178
3179// MockZoomRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
3180type MockZoomRepository_Get_Call struct {
3181 *mock.Call
3182}
3183
3184// Get is a helper method to define mock.On call
3185// - ctx context.Context
3186// - domain string
3187func (_e *MockZoomRepository_Expecter) Get(ctx interface{}, domain interface{}) *MockZoomRepository_Get_Call {
3188 return &MockZoomRepository_Get_Call{Call: _e.mock.On("Get", ctx, domain)}
3189}
3190
3191func (_c *MockZoomRepository_Get_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Get_Call {
3192 _c.Call.Run(func(args mock.Arguments) {
3193 var arg0 context.Context
3194 if args[0] != nil {
3195 arg0 = args[0].(context.Context)
3196 }
3197 var arg1 string
3198 if args[1] != nil {
3199 arg1 = args[1].(string)
3200 }
3201 run(
3202 arg0,
3203 arg1,
3204 )
3205 })
3206 return _c
3207}
3208
3209func (_c *MockZoomRepository_Get_Call) Return(zoomLevel *entity.ZoomLevel, err error) *MockZoomRepository_Get_Call {
3210 _c.Call.Return(zoomLevel, err)
3211 return _c
3212}
3213
3214func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call {
3215 _c.Call.Return(run)
3216 return _c
3217}
3218
3219// GetAll provides a mock function for the type MockZoomRepository
3220func (_mock *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLevel, error) {
3221 ret := _mock.Called(ctx)
3222
3223 if len(ret) == 0 {
3224 panic("no return value specified for GetAll")
3225 }
3226
3227 var r0 []*entity.ZoomLevel
3228 var r1 error
3229 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok {
3230 return returnFunc(ctx)
3231 }
3232 if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok {
3233 r0 = returnFunc(ctx)
3234 } else {
3235 if ret.Get(0) != nil {
3236 r0 = ret.Get(0).([]*entity.ZoomLevel)
3237 }
3238 }
3239 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
3240 r1 = returnFunc(ctx)
3241 } else {
3242 r1 = ret.Error(1)
3243 }
3244 return r0, r1
3245}
3246
3247// MockZoomRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
3248type MockZoomRepository_GetAll_Call struct {
3249 *mock.Call
3250}
3251
3252// GetAll is a helper method to define mock.On call
3253// - ctx context.Context
3254func (_e *MockZoomRepository_Expecter) GetAll(ctx interface{}) *MockZoomRepository_GetAll_Call {
3255 return &MockZoomRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
3256}
3257
3258func (_c *MockZoomRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockZoomRepository_GetAll_Call {
3259 _c.Call.Run(func(args mock.Arguments) {
3260 var arg0 context.Context
3261 if args[0] != nil {
3262 arg0 = args[0].(context.Context)
3263 }
3264 run(
3265 arg0,
3266 )
3267 })
3268 return _c
3269}
3270
3271func (_c *MockZoomRepository_GetAll_Call) Return(zoomLevels []*entity.ZoomLevel, err error) *MockZoomRepository_GetAll_Call {
3272 _c.Call.Return(zoomLevels, err)
3273 return _c
3274}
3275
3276func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call {
3277 _c.Call.Return(run)
3278 return _c
3279}
3280
3281// Set provides a mock function for the type MockZoomRepository
3282func (_mock *MockZoomRepository) Set(ctx context.Context, level *entity.ZoomLevel) error {
3283 ret := _mock.Called(ctx, level)
3284
3285 if len(ret) == 0 {
3286 panic("no return value specified for Set")
3287 }
3288
3289 var r0 error
3290 if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok {
3291 r0 = returnFunc(ctx, level)
3292 } else {
3293 r0 = ret.Error(0)
3294 }
3295 return r0
3296}
3297
3298// MockZoomRepository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
3299type MockZoomRepository_Set_Call struct {
3300 *mock.Call
3301}
3302
3303// Set is a helper method to define mock.On call
3304// - ctx context.Context
3305// - level *entity.ZoomLevel
3306func (_e *MockZoomRepository_Expecter) Set(ctx interface{}, level interface{}) *MockZoomRepository_Set_Call {
3307 return &MockZoomRepository_Set_Call{Call: _e.mock.On("Set", ctx, level)}
3308}
3309
3310func (_c *MockZoomRepository_Set_Call) Run(run func(ctx context.Context, level *entity.ZoomLevel)) *MockZoomRepository_Set_Call {
3311 _c.Call.Run(func(args mock.Arguments) {
3312 var arg0 context.Context
3313 if args[0] != nil {
3314 arg0 = args[0].(context.Context)
3315 }
3316 var arg1 *entity.ZoomLevel
3317 if args[1] != nil {
3318 arg1 = args[1].(*entity.ZoomLevel)
3319 }
3320 run(
3321 arg0,
3322 arg1,
3323 )
3324 })
3325 return _c
3326}
3327
3328func (_c *MockZoomRepository_Set_Call) Return(err error) *MockZoomRepository_Set_Call {
3329 _c.Call.Return(err)
3330 return _c
3331}
3332
3333func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(ctx context.Context, level *entity.ZoomLevel) error) *MockZoomRepository_Set_Call {
3334 _c.Call.Return(run)
3335 return _c
3336}