// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/dumber/internal/application/dto" "github.com/bnema/dumber/internal/domain/entity" mock "github.com/stretchr/testify/mock" ) // NewMockHistorySidebarHistory creates a new instance of MockHistorySidebarHistory. 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 NewMockHistorySidebarHistory(t interface { mock.TestingT Cleanup(func()) }) *MockHistorySidebarHistory { mock := &MockHistorySidebarHistory{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockHistorySidebarHistory is an autogenerated mock type for the HistorySidebarHistory type type MockHistorySidebarHistory struct { mock.Mock } type MockHistorySidebarHistory_Expecter struct { mock *mock.Mock } func (_m *MockHistorySidebarHistory) EXPECT() *MockHistorySidebarHistory_Expecter { return &MockHistorySidebarHistory_Expecter{mock: &_m.Mock} } // Delete provides a mock function for the type MockHistorySidebarHistory func (_mock *MockHistorySidebarHistory) Delete(ctx context.Context, id int64) 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, int64) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // MockHistorySidebarHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type MockHistorySidebarHistory_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - id int64 func (_e *MockHistorySidebarHistory_Expecter) Delete(ctx any, id any) *MockHistorySidebarHistory_Delete_Call { return &MockHistorySidebarHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} } func (_c *MockHistorySidebarHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistorySidebarHistory_Delete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int64 if args[1] != nil { arg1 = args[1].(int64) } run( arg0, arg1, ) }) return _c } func (_c *MockHistorySidebarHistory_Delete_Call) Return(err error) *MockHistorySidebarHistory_Delete_Call { _c.Call.Return(err) return _c } func (_c *MockHistorySidebarHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistorySidebarHistory_Delete_Call { _c.Call.Return(run) return _c } // GetRecent provides a mock function for the type MockHistorySidebarHistory func (_mock *MockHistorySidebarHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) { ret := _mock.Called(ctx, limit, offset) if len(ret) == 0 { panic("no return value specified for GetRecent") } var r0 []*entity.HistoryEntry var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok { return returnFunc(ctx, limit, offset) } if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok { r0 = returnFunc(ctx, limit, offset) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.HistoryEntry) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok { r1 = returnFunc(ctx, limit, offset) } else { r1 = ret.Error(1) } return r0, r1 } // MockHistorySidebarHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent' type MockHistorySidebarHistory_GetRecent_Call struct { *mock.Call } // GetRecent is a helper method to define mock.On call // - ctx context.Context // - limit int // - offset int func (_e *MockHistorySidebarHistory_Expecter) GetRecent(ctx any, limit any, offset any) *MockHistorySidebarHistory_GetRecent_Call { return &MockHistorySidebarHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)} } func (_c *MockHistorySidebarHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistorySidebarHistory_GetRecent_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) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockHistorySidebarHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistorySidebarHistory_GetRecent_Call { _c.Call.Return(historyEntrys, err) return _c } func (_c *MockHistorySidebarHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistorySidebarHistory_GetRecent_Call { _c.Call.Return(run) return _c } // Search provides a mock function for the type MockHistorySidebarHistory func (_mock *MockHistorySidebarHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) { ret := _mock.Called(ctx, input) if len(ret) == 0 { panic("no return value specified for Search") } var r0 *dto.HistorySearchOutput var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok { return returnFunc(ctx, input) } if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok { r0 = returnFunc(ctx, input) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*dto.HistorySearchOutput) } } if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok { r1 = returnFunc(ctx, input) } else { r1 = ret.Error(1) } return r0, r1 } // MockHistorySidebarHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' type MockHistorySidebarHistory_Search_Call struct { *mock.Call } // Search is a helper method to define mock.On call // - ctx context.Context // - input dto.HistorySearchInput func (_e *MockHistorySidebarHistory_Expecter) Search(ctx any, input any) *MockHistorySidebarHistory_Search_Call { return &MockHistorySidebarHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)} } func (_c *MockHistorySidebarHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHistorySidebarHistory_Search_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 dto.HistorySearchInput if args[1] != nil { arg1 = args[1].(dto.HistorySearchInput) } run( arg0, arg1, ) }) return _c } func (_c *MockHistorySidebarHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHistorySidebarHistory_Search_Call { _c.Call.Return(historySearchOutput, err) return _c } func (_c *MockHistorySidebarHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHistorySidebarHistory_Search_Call { _c.Call.Return(run) return _c }