// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/dumber/internal/application/port" mock "github.com/stretchr/testify/mock" ) // NewMockFaviconFetcher creates a new instance of MockFaviconFetcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockFaviconFetcher(t interface { mock.TestingT Cleanup(func()) }) *MockFaviconFetcher { mock := &MockFaviconFetcher{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockFaviconFetcher is an autogenerated mock type for the FaviconFetcher type type MockFaviconFetcher struct { mock.Mock } type MockFaviconFetcher_Expecter struct { mock *mock.Mock } func (_m *MockFaviconFetcher) EXPECT() *MockFaviconFetcher_Expecter { return &MockFaviconFetcher_Expecter{mock: &_m.Mock} } // Fetch provides a mock function for the type MockFaviconFetcher func (_mock *MockFaviconFetcher) Fetch(ctx context.Context, request port.FaviconFetchRequest) (*port.FaviconFetchedIcon, error) { ret := _mock.Called(ctx, request) if len(ret) == 0 { panic("no return value specified for Fetch") } var r0 *port.FaviconFetchedIcon var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, port.FaviconFetchRequest) (*port.FaviconFetchedIcon, error)); ok { return returnFunc(ctx, request) } if returnFunc, ok := ret.Get(0).(func(context.Context, port.FaviconFetchRequest) *port.FaviconFetchedIcon); ok { r0 = returnFunc(ctx, request) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*port.FaviconFetchedIcon) } } if returnFunc, ok := ret.Get(1).(func(context.Context, port.FaviconFetchRequest) error); ok { r1 = returnFunc(ctx, request) } else { r1 = ret.Error(1) } return r0, r1 } // MockFaviconFetcher_Fetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fetch' type MockFaviconFetcher_Fetch_Call struct { *mock.Call } // Fetch is a helper method to define mock.On call // - ctx context.Context // - request port.FaviconFetchRequest func (_e *MockFaviconFetcher_Expecter) Fetch(ctx any, request any) *MockFaviconFetcher_Fetch_Call { return &MockFaviconFetcher_Fetch_Call{Call: _e.mock.On("Fetch", ctx, request)} } func (_c *MockFaviconFetcher_Fetch_Call) Run(run func(ctx context.Context, request port.FaviconFetchRequest)) *MockFaviconFetcher_Fetch_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 port.FaviconFetchRequest if args[1] != nil { arg1 = args[1].(port.FaviconFetchRequest) } run( arg0, arg1, ) }) return _c } func (_c *MockFaviconFetcher_Fetch_Call) Return(faviconFetchedIcon *port.FaviconFetchedIcon, err error) *MockFaviconFetcher_Fetch_Call { _c.Call.Return(faviconFetchedIcon, err) return _c } func (_c *MockFaviconFetcher_Fetch_Call) RunAndReturn(run func(ctx context.Context, request port.FaviconFetchRequest) (*port.FaviconFetchedIcon, error)) *MockFaviconFetcher_Fetch_Call { _c.Call.Return(run) return _c }