// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewSessionService creates a new instance of SessionService. 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 NewSessionService(t interface { mock.TestingT Cleanup(func()) }) *SessionService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &SessionService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // SessionService is an autogenerated mock type for the SessionService type type SessionService struct { mock.Mock } type SessionService_Expecter struct { mock *mock.Mock } func (_m *SessionService) EXPECT() *SessionService_Expecter { return &SessionService_Expecter{mock: &_m.Mock} } // CreateLoginLink provides a mock function for the type SessionService func (_mock *SessionService) CreateLoginLink(ctx context.Context, p domain.Principal) (ports.LoginLink, error) { ret := _mock.Called(ctx, p) if len(ret) == 0 { panic("no return value specified for CreateLoginLink") } var r0 ports.LoginLink var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) (ports.LoginLink, error)); ok { return returnFunc(ctx, p) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) ports.LoginLink); ok { r0 = returnFunc(ctx, p) } else { r0 = ret.Get(0).(ports.LoginLink) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok { r1 = returnFunc(ctx, p) } else { r1 = ret.Error(1) } return r0, r1 } // SessionService_CreateLoginLink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLoginLink' type SessionService_CreateLoginLink_Call struct { *mock.Call } // CreateLoginLink is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal func (_e *SessionService_Expecter) CreateLoginLink(ctx any, p any) *SessionService_CreateLoginLink_Call { return &SessionService_CreateLoginLink_Call{Call: _e.mock.On("CreateLoginLink", ctx, p)} } func (_c *SessionService_CreateLoginLink_Call) Run(run func(ctx context.Context, p domain.Principal)) *SessionService_CreateLoginLink_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } run( arg0, arg1, ) }) return _c } func (_c *SessionService_CreateLoginLink_Call) Return(loginLink ports.LoginLink, err error) *SessionService_CreateLoginLink_Call { _c.Call.Return(loginLink, err) return _c } func (_c *SessionService_CreateLoginLink_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) (ports.LoginLink, error)) *SessionService_CreateLoginLink_Call { _c.Call.Return(run) return _c } // SignOutEverywhere provides a mock function for the type SessionService func (_mock *SessionService) SignOutEverywhere(ctx context.Context, p domain.Principal) error { ret := _mock.Called(ctx, p) if len(ret) == 0 { panic("no return value specified for SignOutEverywhere") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) error); ok { r0 = returnFunc(ctx, p) } else { r0 = ret.Error(0) } return r0 } // SessionService_SignOutEverywhere_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignOutEverywhere' type SessionService_SignOutEverywhere_Call struct { *mock.Call } // SignOutEverywhere is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal func (_e *SessionService_Expecter) SignOutEverywhere(ctx any, p any) *SessionService_SignOutEverywhere_Call { return &SessionService_SignOutEverywhere_Call{Call: _e.mock.On("SignOutEverywhere", ctx, p)} } func (_c *SessionService_SignOutEverywhere_Call) Run(run func(ctx context.Context, p domain.Principal)) *SessionService_SignOutEverywhere_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } run( arg0, arg1, ) }) return _c } func (_c *SessionService_SignOutEverywhere_Call) Return(err error) *SessionService_SignOutEverywhere_Call { _c.Call.Return(err) return _c } func (_c *SessionService_SignOutEverywhere_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) error) *SessionService_SignOutEverywhere_Call { _c.Call.Return(run) return _c }