favicon_scheduler.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "github.com/bnema/dumber/internal/domain/favicon"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockFaviconRefreshScheduler creates a new instance of MockFaviconRefreshScheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockFaviconRefreshScheduler(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MockFaviconRefreshScheduler {
20 mock := &MockFaviconRefreshScheduler{}
21 mock.Mock.Test(t)
22
23 t.Cleanup(func() { mock.AssertExpectations(t) })
24
25 return mock
26}
27
28// MockFaviconRefreshScheduler is an autogenerated mock type for the FaviconRefreshScheduler type
29type MockFaviconRefreshScheduler struct {
30 mock.Mock
31}
32
33type MockFaviconRefreshScheduler_Expecter struct {
34 mock *mock.Mock
35}
36
37func (_m *MockFaviconRefreshScheduler) EXPECT() *MockFaviconRefreshScheduler_Expecter {
38 return &MockFaviconRefreshScheduler_Expecter{mock: &_m.Mock}
39}
40
41// Schedule provides a mock function for the type MockFaviconRefreshScheduler
42func (_mock *MockFaviconRefreshScheduler) Schedule(ctx context.Context, key favicon.Key, work func(context.Context)) bool {
43 ret := _mock.Called(ctx, key, work)
44
45 if len(ret) == 0 {
46 panic("no return value specified for Schedule")
47 }
48
49 var r0 bool
50 if returnFunc, ok := ret.Get(0).(func(context.Context, favicon.Key, func(context.Context)) bool); ok {
51 r0 = returnFunc(ctx, key, work)
52 } else {
53 r0 = ret.Get(0).(bool)
54 }
55 return r0
56}
57
58// MockFaviconRefreshScheduler_Schedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Schedule'
59type MockFaviconRefreshScheduler_Schedule_Call struct {
60 *mock.Call
61}
62
63// Schedule is a helper method to define mock.On call
64// - ctx context.Context
65// - key favicon.Key
66// - work func(context.Context)
67func (_e *MockFaviconRefreshScheduler_Expecter) Schedule(ctx any, key any, work any) *MockFaviconRefreshScheduler_Schedule_Call {
68 return &MockFaviconRefreshScheduler_Schedule_Call{Call: _e.mock.On("Schedule", ctx, key, work)}
69}
70
71func (_c *MockFaviconRefreshScheduler_Schedule_Call) Run(run func(ctx context.Context, key favicon.Key, work func(context.Context))) *MockFaviconRefreshScheduler_Schedule_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 favicon.Key
78 if args[1] != nil {
79 arg1 = args[1].(favicon.Key)
80 }
81 var arg2 func(context.Context)
82 if args[2] != nil {
83 arg2 = args[2].(func(context.Context))
84 }
85 run(
86 arg0,
87 arg1,
88 arg2,
89 )
90 })
91 return _c
92}
93
94func (_c *MockFaviconRefreshScheduler_Schedule_Call) Return(b bool) *MockFaviconRefreshScheduler_Schedule_Call {
95 _c.Call.Return(b)
96 return _c
97}
98
99func (_c *MockFaviconRefreshScheduler_Schedule_Call) RunAndReturn(run func(ctx context.Context, key favicon.Key, work func(context.Context)) bool) *MockFaviconRefreshScheduler_Schedule_Call {
100 _c.Call.Return(run)
101 return _c
102}