1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "bnema.dev/ermite/internal/domain"
11 "bnema.dev/ermite/internal/ports"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// 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.
16// The first argument is typically a *testing.T value.
17func NewSessionService(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *SessionService {
21 if helper, ok := t.(interface{ Helper() }); ok {
22 helper.Helper()
23 }
24
25 mock := &SessionService{}
26 mock.Mock.Test(t)
27
28 t.Cleanup(func() {
29 if helper, ok := t.(interface{ Helper() }); ok {
30 helper.Helper()
31 }
32 mock.AssertExpectations(t)
33 })
34
35 return mock
36}
37
38// SessionService is an autogenerated mock type for the SessionService type
39type SessionService struct {
40 mock.Mock
41}
42
43type SessionService_Expecter struct {
44 mock *mock.Mock
45}
46
47func (_m *SessionService) EXPECT() *SessionService_Expecter {
48 return &SessionService_Expecter{mock: &_m.Mock}
49}
50
51// CreateLoginLink provides a mock function for the type SessionService
52func (_mock *SessionService) CreateLoginLink(ctx context.Context, p domain.Principal) (ports.LoginLink, error) {
53 ret := _mock.Called(ctx, p)
54
55 if len(ret) == 0 {
56 panic("no return value specified for CreateLoginLink")
57 }
58
59 var r0 ports.LoginLink
60 var r1 error
61 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) (ports.LoginLink, error)); ok {
62 return returnFunc(ctx, p)
63 }
64 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) ports.LoginLink); ok {
65 r0 = returnFunc(ctx, p)
66 } else {
67 r0 = ret.Get(0).(ports.LoginLink)
68 }
69 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok {
70 r1 = returnFunc(ctx, p)
71 } else {
72 r1 = ret.Error(1)
73 }
74 return r0, r1
75}
76
77// SessionService_CreateLoginLink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLoginLink'
78type SessionService_CreateLoginLink_Call struct {
79 *mock.Call
80}
81
82// CreateLoginLink is a helper method to define mock.On call
83// - ctx context.Context
84// - p domain.Principal
85func (_e *SessionService_Expecter) CreateLoginLink(ctx any, p any) *SessionService_CreateLoginLink_Call {
86 return &SessionService_CreateLoginLink_Call{Call: _e.mock.On("CreateLoginLink", ctx, p)}
87}
88
89func (_c *SessionService_CreateLoginLink_Call) Run(run func(ctx context.Context, p domain.Principal)) *SessionService_CreateLoginLink_Call {
90 _c.Call.Run(func(args mock.Arguments) {
91 var arg0 context.Context
92 if args[0] != nil {
93 arg0 = args[0].(context.Context)
94 }
95 var arg1 domain.Principal
96 if args[1] != nil {
97 arg1 = args[1].(domain.Principal)
98 }
99 run(
100 arg0,
101 arg1,
102 )
103 })
104 return _c
105}
106
107func (_c *SessionService_CreateLoginLink_Call) Return(loginLink ports.LoginLink, err error) *SessionService_CreateLoginLink_Call {
108 _c.Call.Return(loginLink, err)
109 return _c
110}
111
112func (_c *SessionService_CreateLoginLink_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) (ports.LoginLink, error)) *SessionService_CreateLoginLink_Call {
113 _c.Call.Return(run)
114 return _c
115}
116
117// SignOutEverywhere provides a mock function for the type SessionService
118func (_mock *SessionService) SignOutEverywhere(ctx context.Context, p domain.Principal) error {
119 ret := _mock.Called(ctx, p)
120
121 if len(ret) == 0 {
122 panic("no return value specified for SignOutEverywhere")
123 }
124
125 var r0 error
126 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) error); ok {
127 r0 = returnFunc(ctx, p)
128 } else {
129 r0 = ret.Error(0)
130 }
131 return r0
132}
133
134// SessionService_SignOutEverywhere_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignOutEverywhere'
135type SessionService_SignOutEverywhere_Call struct {
136 *mock.Call
137}
138
139// SignOutEverywhere is a helper method to define mock.On call
140// - ctx context.Context
141// - p domain.Principal
142func (_e *SessionService_Expecter) SignOutEverywhere(ctx any, p any) *SessionService_SignOutEverywhere_Call {
143 return &SessionService_SignOutEverywhere_Call{Call: _e.mock.On("SignOutEverywhere", ctx, p)}
144}
145
146func (_c *SessionService_SignOutEverywhere_Call) Run(run func(ctx context.Context, p domain.Principal)) *SessionService_SignOutEverywhere_Call {
147 _c.Call.Run(func(args mock.Arguments) {
148 var arg0 context.Context
149 if args[0] != nil {
150 arg0 = args[0].(context.Context)
151 }
152 var arg1 domain.Principal
153 if args[1] != nil {
154 arg1 = args[1].(domain.Principal)
155 }
156 run(
157 arg0,
158 arg1,
159 )
160 })
161 return _c
162}
163
164func (_c *SessionService_SignOutEverywhere_Call) Return(err error) *SessionService_SignOutEverywhere_Call {
165 _c.Call.Return(err)
166 return _c
167}
168
169func (_c *SessionService_SignOutEverywhere_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) error) *SessionService_SignOutEverywhere_Call {
170 _c.Call.Return(run)
171 return _c
172}