// 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" ) // NewMockSessionManager creates a new instance of MockSessionManager. 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 NewMockSessionManager(t interface { mock.TestingT Cleanup(func()) }) *MockSessionManager { mock := &MockSessionManager{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockSessionManager is an autogenerated mock type for the sessionManager type type MockSessionManager struct { mock.Mock } type MockSessionManager_Expecter struct { mock *mock.Mock } func (_m *MockSessionManager) EXPECT() *MockSessionManager_Expecter { return &MockSessionManager_Expecter{mock: &_m.Mock} } // GetRecentSessions provides a mock function for the type MockSessionManager func (_mock *MockSessionManager) GetRecentSessions(ctx context.Context, limit int) ([]*entity.Session, error) { ret := _mock.Called(ctx, limit) if len(ret) == 0 { panic("no return value specified for GetRecentSessions") } var r0 []*entity.Session var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.Session, error)); ok { return returnFunc(ctx, limit) } if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.Session); ok { r0 = returnFunc(ctx, limit) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*entity.Session) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = returnFunc(ctx, limit) } else { r1 = ret.Error(1) } return r0, r1 } // MockSessionManager_GetRecentSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentSessions' type MockSessionManager_GetRecentSessions_Call struct { *mock.Call } // GetRecentSessions is a helper method to define mock.On call // - ctx context.Context // - limit int func (_e *MockSessionManager_Expecter) GetRecentSessions(ctx any, limit any) *MockSessionManager_GetRecentSessions_Call { return &MockSessionManager_GetRecentSessions_Call{Call: _e.mock.On("GetRecentSessions", ctx, limit)} } func (_c *MockSessionManager_GetRecentSessions_Call) Run(run func(ctx context.Context, limit int)) *MockSessionManager_GetRecentSessions_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 *MockSessionManager_GetRecentSessions_Call) Return(sessions []*entity.Session, err error) *MockSessionManager_GetRecentSessions_Call { _c.Call.Return(sessions, err) return _c } func (_c *MockSessionManager_GetRecentSessions_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.Session, error)) *MockSessionManager_GetRecentSessions_Call { _c.Call.Return(run) return _c }