// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/dumber/internal/domain/entity" mock "github.com/stretchr/testify/mock" ) // 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. // The first argument is typically a *testing.T value. func NewMockFavoriteRepository(t interface { mock.TestingT Cleanup(func()) }) *MockFavoriteRepository { mock := &MockFavoriteRepository{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockFavoriteRepository is an autogenerated mock type for the FavoriteRepository type type MockFavoriteRepository struct { mock.Mock } type MockFavoriteRepository_Expecter struct { mock *mock.Mock } func (_m *MockFavoriteRepository) EXPECT() *MockFavoriteRepository_Expecter { return &MockFavoriteRepository_Expecter{mock: &_m.Mock} } // Delete provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) Delete(ctx context.Context, id entity.FavoriteID) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // MockFavoriteRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type MockFavoriteRepository_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - id entity.FavoriteID func (_e *MockFavoriteRepository_Expecter) Delete(ctx any, id any) *MockFavoriteRepository_Delete_Call { return &MockFavoriteRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} } func (_c *MockFavoriteRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_Delete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } run( arg0, arg1, ) }) return _c } func (_c *MockFavoriteRepository_Delete_Call) Return(err error) *MockFavoriteRepository_Delete_Call { _c.Call.Return(err) return _c } func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call { _c.Call.Return(run) return _c } // FindByID provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) FindByID(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error) { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for FindByID") } var r0 *entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok { return returnFunc(ctx, id) } if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok { r0 = returnFunc(ctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { r1 = returnFunc(ctx, id) } else { r1 = ret.Error(1) } return r0, r1 } // MockFavoriteRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID' type MockFavoriteRepository_FindByID_Call struct { *mock.Call } // FindByID is a helper method to define mock.On call // - ctx context.Context // - id entity.FavoriteID func (_e *MockFavoriteRepository_Expecter) FindByID(ctx any, id any) *MockFavoriteRepository_FindByID_Call { return &MockFavoriteRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)} } func (_c *MockFavoriteRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_FindByID_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } run( arg0, arg1, ) }) return _c } func (_c *MockFavoriteRepository_FindByID_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByID_Call { _c.Call.Return(favorite, err) return _c } func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call { _c.Call.Return(run) return _c } // FindByURL provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) FindByURL(ctx context.Context, url string) (*entity.Favorite, error) { ret := _mock.Called(ctx, url) if len(ret) == 0 { panic("no return value specified for FindByURL") } var r0 *entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok { return returnFunc(ctx, url) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok { r0 = returnFunc(ctx, url) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, url) } else { r1 = ret.Error(1) } return r0, r1 } // MockFavoriteRepository_FindByURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByURL' type MockFavoriteRepository_FindByURL_Call struct { *mock.Call } // FindByURL is a helper method to define mock.On call // - ctx context.Context // - url string func (_e *MockFavoriteRepository_Expecter) FindByURL(ctx any, url any) *MockFavoriteRepository_FindByURL_Call { return &MockFavoriteRepository_FindByURL_Call{Call: _e.mock.On("FindByURL", ctx, url)} } func (_c *MockFavoriteRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockFavoriteRepository_FindByURL_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockFavoriteRepository_FindByURL_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByURL_Call { _c.Call.Return(favorite, err) return _c } func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call { _c.Call.Return(run) return _c } // GetAll provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favorite, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetAll") } var r0 []*entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockFavoriteRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' type MockFavoriteRepository_GetAll_Call struct { *mock.Call } // GetAll is a helper method to define mock.On call // - ctx context.Context func (_e *MockFavoriteRepository_Expecter) GetAll(ctx any) *MockFavoriteRepository_GetAll_Call { return &MockFavoriteRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} } func (_c *MockFavoriteRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFavoriteRepository_GetAll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockFavoriteRepository_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetAll_Call { _c.Call.Return(favorites, err) return _c } func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call { _c.Call.Return(run) return _c } // GetByShortcut provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) { ret := _mock.Called(ctx, key) if len(ret) == 0 { panic("no return value specified for GetByShortcut") } var r0 *entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok { return returnFunc(ctx, key) } if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok { r0 = returnFunc(ctx, key) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = returnFunc(ctx, key) } else { r1 = ret.Error(1) } return r0, r1 } // MockFavoriteRepository_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut' type MockFavoriteRepository_GetByShortcut_Call struct { *mock.Call } // GetByShortcut is a helper method to define mock.On call // - ctx context.Context // - key int func (_e *MockFavoriteRepository_Expecter) GetByShortcut(ctx any, key any) *MockFavoriteRepository_GetByShortcut_Call { return &MockFavoriteRepository_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)} } func (_c *MockFavoriteRepository_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockFavoriteRepository_GetByShortcut_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } run( arg0, arg1, ) }) return _c } func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_GetByShortcut_Call { _c.Call.Return(favorite, err) return _c } func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call { _c.Call.Return(run) return _c } // GetByTag provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) GetByTag(ctx context.Context, tagID entity.TagID) ([]*entity.Favorite, error) { ret := _mock.Called(ctx, tagID) if len(ret) == 0 { panic("no return value specified for GetByTag") } var r0 []*entity.Favorite var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) ([]*entity.Favorite, error)); ok { return returnFunc(ctx, tagID) } if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) []*entity.Favorite); ok { r0 = returnFunc(ctx, tagID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.Favorite) } } if returnFunc, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok { r1 = returnFunc(ctx, tagID) } else { r1 = ret.Error(1) } return r0, r1 } // MockFavoriteRepository_GetByTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByTag' type MockFavoriteRepository_GetByTag_Call struct { *mock.Call } // GetByTag is a helper method to define mock.On call // - ctx context.Context // - tagID entity.TagID func (_e *MockFavoriteRepository_Expecter) GetByTag(ctx any, tagID any) *MockFavoriteRepository_GetByTag_Call { return &MockFavoriteRepository_GetByTag_Call{Call: _e.mock.On("GetByTag", ctx, tagID)} } func (_c *MockFavoriteRepository_GetByTag_Call) Run(run func(ctx context.Context, tagID entity.TagID)) *MockFavoriteRepository_GetByTag_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.TagID if args[1] != nil { arg1 = args[1].(entity.TagID) } run( arg0, arg1, ) }) return _c } func (_c *MockFavoriteRepository_GetByTag_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetByTag_Call { _c.Call.Return(favorites, err) return _c } func (_c *MockFavoriteRepository_GetByTag_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByTag_Call { _c.Call.Return(run) return _c } // Save provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) Save(ctx context.Context, fav *entity.Favorite) error { ret := _mock.Called(ctx, fav) if len(ret) == 0 { panic("no return value specified for Save") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok { r0 = returnFunc(ctx, fav) } else { r0 = ret.Error(0) } return r0 } // MockFavoriteRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' type MockFavoriteRepository_Save_Call struct { *mock.Call } // Save is a helper method to define mock.On call // - ctx context.Context // - fav *entity.Favorite func (_e *MockFavoriteRepository_Expecter) Save(ctx any, fav any) *MockFavoriteRepository_Save_Call { return &MockFavoriteRepository_Save_Call{Call: _e.mock.On("Save", ctx, fav)} } func (_c *MockFavoriteRepository_Save_Call) Run(run func(ctx context.Context, fav *entity.Favorite)) *MockFavoriteRepository_Save_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 *entity.Favorite if args[1] != nil { arg1 = args[1].(*entity.Favorite) } run( arg0, arg1, ) }) return _c } func (_c *MockFavoriteRepository_Save_Call) Return(err error) *MockFavoriteRepository_Save_Call { _c.Call.Return(err) return _c } func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(ctx context.Context, fav *entity.Favorite) error) *MockFavoriteRepository_Save_Call { _c.Call.Return(run) return _c } // SetShortcut provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error { ret := _mock.Called(ctx, id, key) if len(ret) == 0 { panic("no return value specified for SetShortcut") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok { r0 = returnFunc(ctx, id, key) } else { r0 = ret.Error(0) } return r0 } // MockFavoriteRepository_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut' type MockFavoriteRepository_SetShortcut_Call struct { *mock.Call } // SetShortcut is a helper method to define mock.On call // - ctx context.Context // - id entity.FavoriteID // - key *int func (_e *MockFavoriteRepository_Expecter) SetShortcut(ctx any, id any, key any) *MockFavoriteRepository_SetShortcut_Call { return &MockFavoriteRepository_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)} } func (_c *MockFavoriteRepository_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockFavoriteRepository_SetShortcut_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } var arg2 *int if args[2] != nil { arg2 = args[2].(*int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockFavoriteRepository_SetShortcut_Call) Return(err error) *MockFavoriteRepository_SetShortcut_Call { _c.Call.Return(err) return _c } func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockFavoriteRepository_SetShortcut_Call { _c.Call.Return(run) return _c } // UpdatePosition provides a mock function for the type MockFavoriteRepository func (_mock *MockFavoriteRepository) UpdatePosition(ctx context.Context, id entity.FavoriteID, position int) error { ret := _mock.Called(ctx, id, position) if len(ret) == 0 { panic("no return value specified for UpdatePosition") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok { r0 = returnFunc(ctx, id, position) } else { r0 = ret.Error(0) } return r0 } // MockFavoriteRepository_UpdatePosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePosition' type MockFavoriteRepository_UpdatePosition_Call struct { *mock.Call } // UpdatePosition is a helper method to define mock.On call // - ctx context.Context // - id entity.FavoriteID // - position int func (_e *MockFavoriteRepository_Expecter) UpdatePosition(ctx any, id any, position any) *MockFavoriteRepository_UpdatePosition_Call { return &MockFavoriteRepository_UpdatePosition_Call{Call: _e.mock.On("UpdatePosition", ctx, id, position)} } func (_c *MockFavoriteRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FavoriteID, position int)) *MockFavoriteRepository_UpdatePosition_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(err error) *MockFavoriteRepository_UpdatePosition_Call { _c.Call.Return(err) return _c } func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, position int) error) *MockFavoriteRepository_UpdatePosition_Call { _c.Call.Return(run) return _c } // 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. // The first argument is typically a *testing.T value. func NewMockTagRepository(t interface { mock.TestingT Cleanup(func()) }) *MockTagRepository { mock := &MockTagRepository{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockTagRepository is an autogenerated mock type for the TagRepository type type MockTagRepository struct { mock.Mock } type MockTagRepository_Expecter struct { mock *mock.Mock } func (_m *MockTagRepository) EXPECT() *MockTagRepository_Expecter { return &MockTagRepository_Expecter{mock: &_m.Mock} } // AssignToFavorite provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { ret := _mock.Called(ctx, tagID, favID) if len(ret) == 0 { panic("no return value specified for AssignToFavorite") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { r0 = returnFunc(ctx, tagID, favID) } else { r0 = ret.Error(0) } return r0 } // MockTagRepository_AssignToFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssignToFavorite' type MockTagRepository_AssignToFavorite_Call struct { *mock.Call } // AssignToFavorite is a helper method to define mock.On call // - ctx context.Context // - tagID entity.TagID // - favID entity.FavoriteID func (_e *MockTagRepository_Expecter) AssignToFavorite(ctx any, tagID any, favID any) *MockTagRepository_AssignToFavorite_Call { return &MockTagRepository_AssignToFavorite_Call{Call: _e.mock.On("AssignToFavorite", ctx, tagID, favID)} } func (_c *MockTagRepository_AssignToFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_AssignToFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.TagID if args[1] != nil { arg1 = args[1].(entity.TagID) } var arg2 entity.FavoriteID if args[2] != nil { arg2 = args[2].(entity.FavoriteID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockTagRepository_AssignToFavorite_Call) Return(err error) *MockTagRepository_AssignToFavorite_Call { _c.Call.Return(err) return _c } func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call { _c.Call.Return(run) return _c } // Delete provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // MockTagRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type MockTagRepository_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - id entity.TagID func (_e *MockTagRepository_Expecter) Delete(ctx any, id any) *MockTagRepository_Delete_Call { return &MockTagRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} } func (_c *MockTagRepository_Delete_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_Delete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.TagID if args[1] != nil { arg1 = args[1].(entity.TagID) } run( arg0, arg1, ) }) return _c } func (_c *MockTagRepository_Delete_Call) Return(err error) *MockTagRepository_Delete_Call { _c.Call.Return(err) return _c } func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockTagRepository_Delete_Call { _c.Call.Return(run) return _c } // FindByID provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for FindByID") } var r0 *entity.Tag var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok { return returnFunc(ctx, id) } if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok { r0 = returnFunc(ctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Tag) } } if returnFunc, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok { r1 = returnFunc(ctx, id) } else { r1 = ret.Error(1) } return r0, r1 } // MockTagRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID' type MockTagRepository_FindByID_Call struct { *mock.Call } // FindByID is a helper method to define mock.On call // - ctx context.Context // - id entity.TagID func (_e *MockTagRepository_Expecter) FindByID(ctx any, id any) *MockTagRepository_FindByID_Call { return &MockTagRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)} } func (_c *MockTagRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_FindByID_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.TagID if args[1] != nil { arg1 = args[1].(entity.TagID) } run( arg0, arg1, ) }) return _c } func (_c *MockTagRepository_FindByID_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByID_Call { _c.Call.Return(tag, err) return _c } func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call { _c.Call.Return(run) return _c } // FindByName provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for FindByName") } var r0 *entity.Tag var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok { return returnFunc(ctx, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok { r0 = returnFunc(ctx, name) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*entity.Tag) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } return r0, r1 } // MockTagRepository_FindByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByName' type MockTagRepository_FindByName_Call struct { *mock.Call } // FindByName is a helper method to define mock.On call // - ctx context.Context // - name string func (_e *MockTagRepository_Expecter) FindByName(ctx any, name any) *MockTagRepository_FindByName_Call { return &MockTagRepository_FindByName_Call{Call: _e.mock.On("FindByName", ctx, name)} } func (_c *MockTagRepository_FindByName_Call) Run(run func(ctx context.Context, name string)) *MockTagRepository_FindByName_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockTagRepository_FindByName_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByName_Call { _c.Call.Return(tag, err) return _c } func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(ctx context.Context, name string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call { _c.Call.Return(run) return _c } // GetAll provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetAll") } var r0 []*entity.Tag var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.Tag) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockTagRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' type MockTagRepository_GetAll_Call struct { *mock.Call } // GetAll is a helper method to define mock.On call // - ctx context.Context func (_e *MockTagRepository_Expecter) GetAll(ctx any) *MockTagRepository_GetAll_Call { return &MockTagRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} } func (_c *MockTagRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockTagRepository_GetAll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockTagRepository_GetAll_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetAll_Call { _c.Call.Return(tags, err) return _c } func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call { _c.Call.Return(run) return _c } // GetForFavorite provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) { ret := _mock.Called(ctx, favID) if len(ret) == 0 { panic("no return value specified for GetForFavorite") } var r0 []*entity.Tag var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok { return returnFunc(ctx, favID) } if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok { r0 = returnFunc(ctx, favID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.Tag) } } if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { r1 = returnFunc(ctx, favID) } else { r1 = ret.Error(1) } return r0, r1 } // MockTagRepository_GetForFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForFavorite' type MockTagRepository_GetForFavorite_Call struct { *mock.Call } // GetForFavorite is a helper method to define mock.On call // - ctx context.Context // - favID entity.FavoriteID func (_e *MockTagRepository_Expecter) GetForFavorite(ctx any, favID any) *MockTagRepository_GetForFavorite_Call { return &MockTagRepository_GetForFavorite_Call{Call: _e.mock.On("GetForFavorite", ctx, favID)} } func (_c *MockTagRepository_GetForFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID)) *MockTagRepository_GetForFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.FavoriteID if args[1] != nil { arg1 = args[1].(entity.FavoriteID) } run( arg0, arg1, ) }) return _c } func (_c *MockTagRepository_GetForFavorite_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetForFavorite_Call { _c.Call.Return(tags, err) return _c } func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call { _c.Call.Return(run) return _c } // RemoveFromFavorite provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { ret := _mock.Called(ctx, tagID, favID) if len(ret) == 0 { panic("no return value specified for RemoveFromFavorite") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { r0 = returnFunc(ctx, tagID, favID) } else { r0 = ret.Error(0) } return r0 } // MockTagRepository_RemoveFromFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveFromFavorite' type MockTagRepository_RemoveFromFavorite_Call struct { *mock.Call } // RemoveFromFavorite is a helper method to define mock.On call // - ctx context.Context // - tagID entity.TagID // - favID entity.FavoriteID func (_e *MockTagRepository_Expecter) RemoveFromFavorite(ctx any, tagID any, favID any) *MockTagRepository_RemoveFromFavorite_Call { return &MockTagRepository_RemoveFromFavorite_Call{Call: _e.mock.On("RemoveFromFavorite", ctx, tagID, favID)} } func (_c *MockTagRepository_RemoveFromFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_RemoveFromFavorite_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 entity.TagID if args[1] != nil { arg1 = args[1].(entity.TagID) } var arg2 entity.FavoriteID if args[2] != nil { arg2 = args[2].(entity.FavoriteID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(err error) *MockTagRepository_RemoveFromFavorite_Call { _c.Call.Return(err) return _c } func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call { _c.Call.Return(run) return _c } // Save provides a mock function for the type MockTagRepository func (_mock *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error { ret := _mock.Called(ctx, tag) if len(ret) == 0 { panic("no return value specified for Save") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok { r0 = returnFunc(ctx, tag) } else { r0 = ret.Error(0) } return r0 } // MockTagRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' type MockTagRepository_Save_Call struct { *mock.Call } // Save is a helper method to define mock.On call // - ctx context.Context // - tag *entity.Tag func (_e *MockTagRepository_Expecter) Save(ctx any, tag any) *MockTagRepository_Save_Call { return &MockTagRepository_Save_Call{Call: _e.mock.On("Save", ctx, tag)} } func (_c *MockTagRepository_Save_Call) Run(run func(ctx context.Context, tag *entity.Tag)) *MockTagRepository_Save_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 *entity.Tag if args[1] != nil { arg1 = args[1].(*entity.Tag) } run( arg0, arg1, ) }) return _c } func (_c *MockTagRepository_Save_Call) Return(err error) *MockTagRepository_Save_Call { _c.Call.Return(err) return _c } func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(ctx context.Context, tag *entity.Tag) error) *MockTagRepository_Save_Call { _c.Call.Return(run) return _c }