detached 94cc600

chore(mockery): split generated mocks by source file

commit
94cc600f25c33b702cb7b1d7c8598bc0a288500f
author
brice · · 2026-06-23 14:53 UTC
committer
brice · · 2026-06-23 20:01 UTC
parent
3a44e8a
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
54 files · +21873 -21353
M .mockery.yaml +6 -7
@@ -5,7 +5,7 @@ packages:
55 github.com/bnema/dumber/internal/application/port:
66 config:
77 dir: '{{.InterfaceDir}}/mocks'
8- filename: mocks.go
8+ filename: '{{ .InterfaceFile | base }}'
99 pkgname: mocks
1010 interfaces:
1111 ConfigMigrator: {}
@@ -75,9 +75,8 @@ packages:
7575 NativeWidgetProvider: {}
7676 Notification: {}
7777 RenderingEnvManager: {}
78- RuntimeConfigProvider:
79- config:
80- filename: runtime_config_provider.go
78+ FaviconResolver: {}
79+ RuntimeConfigProvider: {}
8180 RuntimeVersionProbe: {}
8281 ScriptRefresher: {}
8382 SnapshotService: {}
@@ -98,7 +97,7 @@ packages:
9897 github.com/bnema/dumber/internal/domain/repository:
9998 config:
10099 dir: '{{.InterfaceDir}}/mocks'
101- filename: mocks.go
100+ filename: '{{ .InterfaceFile | base }}'
102101 pkgname: mocks
103102 interfaces:
104103 ContentWhitelistRepository: {}
@@ -112,7 +111,7 @@ packages:
112111 github.com/bnema/dumber/internal/infrastructure/filtering:
113112 config:
114113 dir: '{{.InterfaceDir}}/mocks'
115- filename: mocks.go
114+ filename: '{{ .InterfaceFile | base }}'
116115 pkgname: mocks
117116 interfaces:
118117 FilterDownloader: {}
@@ -120,7 +119,7 @@ packages:
120119 github.com/bnema/dumber/internal/ui/layout:
121120 config:
122121 dir: '{{.InterfaceDir}}/mocks'
123- filename: mocks.go
122+ filename: '{{ .InterfaceFile | base }}'
124123 pkgname: mocks
125124 interfaces:
126125 BoxWidget: {}
A internal/application/port/mocks/accent_picker.go +165 -0
@@ -0,0 +1,165 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ mock "github.com/stretchr/testify/mock"
9+)
10+
11+// NewMockAccentPickerUI creates a new instance of MockAccentPickerUI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12+// The first argument is typically a *testing.T value.
13+func NewMockAccentPickerUI(t interface {
14+ mock.TestingT
15+ Cleanup(func())
16+}) *MockAccentPickerUI {
17+ mock := &MockAccentPickerUI{}
18+ mock.Mock.Test(t)
19+
20+ t.Cleanup(func() { mock.AssertExpectations(t) })
21+
22+ return mock
23+}
24+
25+// MockAccentPickerUI is an autogenerated mock type for the AccentPickerUI type
26+type MockAccentPickerUI struct {
27+ mock.Mock
28+}
29+
30+type MockAccentPickerUI_Expecter struct {
31+ mock *mock.Mock
32+}
33+
34+func (_m *MockAccentPickerUI) EXPECT() *MockAccentPickerUI_Expecter {
35+ return &MockAccentPickerUI_Expecter{mock: &_m.Mock}
36+}
37+
38+// Hide provides a mock function for the type MockAccentPickerUI
39+func (_mock *MockAccentPickerUI) Hide() {
40+ _mock.Called()
41+ return
42+}
43+
44+// MockAccentPickerUI_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
45+type MockAccentPickerUI_Hide_Call struct {
46+ *mock.Call
47+}
48+
49+// Hide is a helper method to define mock.On call
50+func (_e *MockAccentPickerUI_Expecter) Hide() *MockAccentPickerUI_Hide_Call {
51+ return &MockAccentPickerUI_Hide_Call{Call: _e.mock.On("Hide")}
52+}
53+
54+func (_c *MockAccentPickerUI_Hide_Call) Run(run func()) *MockAccentPickerUI_Hide_Call {
55+ _c.Call.Run(func(args mock.Arguments) {
56+ run()
57+ })
58+ return _c
59+}
60+
61+func (_c *MockAccentPickerUI_Hide_Call) Return() *MockAccentPickerUI_Hide_Call {
62+ _c.Call.Return()
63+ return _c
64+}
65+
66+func (_c *MockAccentPickerUI_Hide_Call) RunAndReturn(run func()) *MockAccentPickerUI_Hide_Call {
67+ _c.Run(run)
68+ return _c
69+}
70+
71+// IsVisible provides a mock function for the type MockAccentPickerUI
72+func (_mock *MockAccentPickerUI) IsVisible() bool {
73+ ret := _mock.Called()
74+
75+ if len(ret) == 0 {
76+ panic("no return value specified for IsVisible")
77+ }
78+
79+ var r0 bool
80+ if returnFunc, ok := ret.Get(0).(func() bool); ok {
81+ r0 = returnFunc()
82+ } else {
83+ r0 = ret.Get(0).(bool)
84+ }
85+ return r0
86+}
87+
88+// MockAccentPickerUI_IsVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsVisible'
89+type MockAccentPickerUI_IsVisible_Call struct {
90+ *mock.Call
91+}
92+
93+// IsVisible is a helper method to define mock.On call
94+func (_e *MockAccentPickerUI_Expecter) IsVisible() *MockAccentPickerUI_IsVisible_Call {
95+ return &MockAccentPickerUI_IsVisible_Call{Call: _e.mock.On("IsVisible")}
96+}
97+
98+func (_c *MockAccentPickerUI_IsVisible_Call) Run(run func()) *MockAccentPickerUI_IsVisible_Call {
99+ _c.Call.Run(func(args mock.Arguments) {
100+ run()
101+ })
102+ return _c
103+}
104+
105+func (_c *MockAccentPickerUI_IsVisible_Call) Return(b bool) *MockAccentPickerUI_IsVisible_Call {
106+ _c.Call.Return(b)
107+ return _c
108+}
109+
110+func (_c *MockAccentPickerUI_IsVisible_Call) RunAndReturn(run func() bool) *MockAccentPickerUI_IsVisible_Call {
111+ _c.Call.Return(run)
112+ return _c
113+}
114+
115+// Show provides a mock function for the type MockAccentPickerUI
116+func (_mock *MockAccentPickerUI) Show(accents []rune, selectedCallback func(accent rune), cancelCallback func()) {
117+ _mock.Called(accents, selectedCallback, cancelCallback)
118+ return
119+}
120+
121+// MockAccentPickerUI_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
122+type MockAccentPickerUI_Show_Call struct {
123+ *mock.Call
124+}
125+
126+// Show is a helper method to define mock.On call
127+// - accents []rune
128+// - selectedCallback func(accent rune)
129+// - cancelCallback func()
130+func (_e *MockAccentPickerUI_Expecter) Show(accents any, selectedCallback any, cancelCallback any) *MockAccentPickerUI_Show_Call {
131+ return &MockAccentPickerUI_Show_Call{Call: _e.mock.On("Show", accents, selectedCallback, cancelCallback)}
132+}
133+
134+func (_c *MockAccentPickerUI_Show_Call) Run(run func(accents []rune, selectedCallback func(accent rune), cancelCallback func())) *MockAccentPickerUI_Show_Call {
135+ _c.Call.Run(func(args mock.Arguments) {
136+ var arg0 []rune
137+ if args[0] != nil {
138+ arg0 = args[0].([]rune)
139+ }
140+ var arg1 func(accent rune)
141+ if args[1] != nil {
142+ arg1 = args[1].(func(accent rune))
143+ }
144+ var arg2 func()
145+ if args[2] != nil {
146+ arg2 = args[2].(func())
147+ }
148+ run(
149+ arg0,
150+ arg1,
151+ arg2,
152+ )
153+ })
154+ return _c
155+}
156+
157+func (_c *MockAccentPickerUI_Show_Call) Return() *MockAccentPickerUI_Show_Call {
158+ _c.Call.Return()
159+ return _c
160+}
161+
162+func (_c *MockAccentPickerUI_Show_Call) RunAndReturn(run func(accents []rune, selectedCallback func(accent rune), cancelCallback func())) *MockAccentPickerUI_Show_Call {
163+ _c.Run(run)
164+ return _c
165+}
A internal/application/port/mocks/browser_launch.go +258 -0
@@ -0,0 +1,258 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+ "io"
10+
11+ "github.com/bnema/dumber/internal/application/port"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// NewMockBrowserWindowOpener creates a new instance of MockBrowserWindowOpener. 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.
17+func NewMockBrowserWindowOpener(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockBrowserWindowOpener {
21+ mock := &MockBrowserWindowOpener{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockBrowserWindowOpener is an autogenerated mock type for the BrowserWindowOpener type
30+type MockBrowserWindowOpener struct {
31+ mock.Mock
32+}
33+
34+type MockBrowserWindowOpener_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockBrowserWindowOpener) EXPECT() *MockBrowserWindowOpener_Expecter {
39+ return &MockBrowserWindowOpener_Expecter{mock: &_m.Mock}
40+}
41+
42+// OpenFreshWindow provides a mock function for the type MockBrowserWindowOpener
43+func (_mock *MockBrowserWindowOpener) OpenFreshWindow(ctx context.Context, url string) error {
44+ ret := _mock.Called(ctx, url)
45+
46+ if len(ret) == 0 {
47+ panic("no return value specified for OpenFreshWindow")
48+ }
49+
50+ var r0 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
52+ r0 = returnFunc(ctx, url)
53+ } else {
54+ r0 = ret.Error(0)
55+ }
56+ return r0
57+}
58+
59+// MockBrowserWindowOpener_OpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFreshWindow'
60+type MockBrowserWindowOpener_OpenFreshWindow_Call struct {
61+ *mock.Call
62+}
63+
64+// OpenFreshWindow is a helper method to define mock.On call
65+// - ctx context.Context
66+// - url string
67+func (_e *MockBrowserWindowOpener_Expecter) OpenFreshWindow(ctx any, url any) *MockBrowserWindowOpener_OpenFreshWindow_Call {
68+ return &MockBrowserWindowOpener_OpenFreshWindow_Call{Call: _e.mock.On("OpenFreshWindow", ctx, url)}
69+}
70+
71+func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserWindowOpener_OpenFreshWindow_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ var arg1 string
78+ if args[1] != nil {
79+ arg1 = args[1].(string)
80+ }
81+ run(
82+ arg0,
83+ arg1,
84+ )
85+ })
86+ return _c
87+}
88+
89+func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Return(err error) *MockBrowserWindowOpener_OpenFreshWindow_Call {
90+ _c.Call.Return(err)
91+ return _c
92+}
93+
94+func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockBrowserWindowOpener_OpenFreshWindow_Call {
95+ _c.Call.Return(run)
96+ return _c
97+}
98+
99+// NewMockBrowserLaunchRelay creates a new instance of MockBrowserLaunchRelay. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
100+// The first argument is typically a *testing.T value.
101+func NewMockBrowserLaunchRelay(t interface {
102+ mock.TestingT
103+ Cleanup(func())
104+}) *MockBrowserLaunchRelay {
105+ mock := &MockBrowserLaunchRelay{}
106+ mock.Mock.Test(t)
107+
108+ t.Cleanup(func() { mock.AssertExpectations(t) })
109+
110+ return mock
111+}
112+
113+// MockBrowserLaunchRelay is an autogenerated mock type for the BrowserLaunchRelay type
114+type MockBrowserLaunchRelay struct {
115+ mock.Mock
116+}
117+
118+type MockBrowserLaunchRelay_Expecter struct {
119+ mock *mock.Mock
120+}
121+
122+func (_m *MockBrowserLaunchRelay) EXPECT() *MockBrowserLaunchRelay_Expecter {
123+ return &MockBrowserLaunchRelay_Expecter{mock: &_m.Mock}
124+}
125+
126+// DeliverOpenFreshWindow provides a mock function for the type MockBrowserLaunchRelay
127+func (_mock *MockBrowserLaunchRelay) DeliverOpenFreshWindow(ctx context.Context, url string) (bool, error) {
128+ ret := _mock.Called(ctx, url)
129+
130+ if len(ret) == 0 {
131+ panic("no return value specified for DeliverOpenFreshWindow")
132+ }
133+
134+ var r0 bool
135+ var r1 error
136+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
137+ return returnFunc(ctx, url)
138+ }
139+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
140+ r0 = returnFunc(ctx, url)
141+ } else {
142+ r0 = ret.Get(0).(bool)
143+ }
144+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
145+ r1 = returnFunc(ctx, url)
146+ } else {
147+ r1 = ret.Error(1)
148+ }
149+ return r0, r1
150+}
151+
152+// MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeliverOpenFreshWindow'
153+type MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call struct {
154+ *mock.Call
155+}
156+
157+// DeliverOpenFreshWindow is a helper method to define mock.On call
158+// - ctx context.Context
159+// - url string
160+func (_e *MockBrowserLaunchRelay_Expecter) DeliverOpenFreshWindow(ctx any, url any) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
161+ return &MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call{Call: _e.mock.On("DeliverOpenFreshWindow", ctx, url)}
162+}
163+
164+func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
165+ _c.Call.Run(func(args mock.Arguments) {
166+ var arg0 context.Context
167+ if args[0] != nil {
168+ arg0 = args[0].(context.Context)
169+ }
170+ var arg1 string
171+ if args[1] != nil {
172+ arg1 = args[1].(string)
173+ }
174+ run(
175+ arg0,
176+ arg1,
177+ )
178+ })
179+ return _c
180+}
181+
182+func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Return(b bool, err error) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
183+ _c.Call.Return(b, err)
184+ return _c
185+}
186+
187+func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) (bool, error)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
188+ _c.Call.Return(run)
189+ return _c
190+}
191+
192+// Listen provides a mock function for the type MockBrowserLaunchRelay
193+func (_mock *MockBrowserLaunchRelay) Listen(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error) {
194+ ret := _mock.Called(ctx, opener)
195+
196+ if len(ret) == 0 {
197+ panic("no return value specified for Listen")
198+ }
199+
200+ var r0 io.Closer
201+ var r1 error
202+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) (io.Closer, error)); ok {
203+ return returnFunc(ctx, opener)
204+ }
205+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) io.Closer); ok {
206+ r0 = returnFunc(ctx, opener)
207+ } else {
208+ if ret.Get(0) != nil {
209+ r0 = ret.Get(0).(io.Closer)
210+ }
211+ }
212+ if returnFunc, ok := ret.Get(1).(func(context.Context, port.BrowserWindowOpener) error); ok {
213+ r1 = returnFunc(ctx, opener)
214+ } else {
215+ r1 = ret.Error(1)
216+ }
217+ return r0, r1
218+}
219+
220+// MockBrowserLaunchRelay_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'
221+type MockBrowserLaunchRelay_Listen_Call struct {
222+ *mock.Call
223+}
224+
225+// Listen is a helper method to define mock.On call
226+// - ctx context.Context
227+// - opener port.BrowserWindowOpener
228+func (_e *MockBrowserLaunchRelay_Expecter) Listen(ctx any, opener any) *MockBrowserLaunchRelay_Listen_Call {
229+ return &MockBrowserLaunchRelay_Listen_Call{Call: _e.mock.On("Listen", ctx, opener)}
230+}
231+
232+func (_c *MockBrowserLaunchRelay_Listen_Call) Run(run func(ctx context.Context, opener port.BrowserWindowOpener)) *MockBrowserLaunchRelay_Listen_Call {
233+ _c.Call.Run(func(args mock.Arguments) {
234+ var arg0 context.Context
235+ if args[0] != nil {
236+ arg0 = args[0].(context.Context)
237+ }
238+ var arg1 port.BrowserWindowOpener
239+ if args[1] != nil {
240+ arg1 = args[1].(port.BrowserWindowOpener)
241+ }
242+ run(
243+ arg0,
244+ arg1,
245+ )
246+ })
247+ return _c
248+}
249+
250+func (_c *MockBrowserLaunchRelay_Listen_Call) Return(closer io.Closer, err error) *MockBrowserLaunchRelay_Listen_Call {
251+ _c.Call.Return(closer, err)
252+ return _c
253+}
254+
255+func (_c *MockBrowserLaunchRelay_Listen_Call) RunAndReturn(run func(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error)) *MockBrowserLaunchRelay_Listen_Call {
256+ _c.Call.Return(run)
257+ return _c
258+}
A internal/application/port/mocks/clipboard.go +324 -0
@@ -0,0 +1,324 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/domain/entity"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockClipboard creates a new instance of MockClipboard. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockClipboard(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockClipboard {
20+ mock := &MockClipboard{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockClipboard is an autogenerated mock type for the Clipboard type
29+type MockClipboard struct {
30+ mock.Mock
31+}
32+
33+type MockClipboard_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockClipboard) EXPECT() *MockClipboard_Expecter {
38+ return &MockClipboard_Expecter{mock: &_m.Mock}
39+}
40+
41+// Clear provides a mock function for the type MockClipboard
42+func (_mock *MockClipboard) Clear(ctx context.Context) error {
43+ ret := _mock.Called(ctx)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Clear")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
51+ r0 = returnFunc(ctx)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockClipboard_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
59+type MockClipboard_Clear_Call struct {
60+ *mock.Call
61+}
62+
63+// Clear is a helper method to define mock.On call
64+// - ctx context.Context
65+func (_e *MockClipboard_Expecter) Clear(ctx any) *MockClipboard_Clear_Call {
66+ return &MockClipboard_Clear_Call{Call: _e.mock.On("Clear", ctx)}
67+}
68+
69+func (_c *MockClipboard_Clear_Call) Run(run func(ctx context.Context)) *MockClipboard_Clear_Call {
70+ _c.Call.Run(func(args mock.Arguments) {
71+ var arg0 context.Context
72+ if args[0] != nil {
73+ arg0 = args[0].(context.Context)
74+ }
75+ run(
76+ arg0,
77+ )
78+ })
79+ return _c
80+}
81+
82+func (_c *MockClipboard_Clear_Call) Return(err error) *MockClipboard_Clear_Call {
83+ _c.Call.Return(err)
84+ return _c
85+}
86+
87+func (_c *MockClipboard_Clear_Call) RunAndReturn(run func(ctx context.Context) error) *MockClipboard_Clear_Call {
88+ _c.Call.Return(run)
89+ return _c
90+}
91+
92+// HasText provides a mock function for the type MockClipboard
93+func (_mock *MockClipboard) HasText(ctx context.Context) (bool, error) {
94+ ret := _mock.Called(ctx)
95+
96+ if len(ret) == 0 {
97+ panic("no return value specified for HasText")
98+ }
99+
100+ var r0 bool
101+ var r1 error
102+ if returnFunc, ok := ret.Get(0).(func(context.Context) (bool, error)); ok {
103+ return returnFunc(ctx)
104+ }
105+ if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
106+ r0 = returnFunc(ctx)
107+ } else {
108+ r0 = ret.Get(0).(bool)
109+ }
110+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
111+ r1 = returnFunc(ctx)
112+ } else {
113+ r1 = ret.Error(1)
114+ }
115+ return r0, r1
116+}
117+
118+// MockClipboard_HasText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasText'
119+type MockClipboard_HasText_Call struct {
120+ *mock.Call
121+}
122+
123+// HasText is a helper method to define mock.On call
124+// - ctx context.Context
125+func (_e *MockClipboard_Expecter) HasText(ctx any) *MockClipboard_HasText_Call {
126+ return &MockClipboard_HasText_Call{Call: _e.mock.On("HasText", ctx)}
127+}
128+
129+func (_c *MockClipboard_HasText_Call) Run(run func(ctx context.Context)) *MockClipboard_HasText_Call {
130+ _c.Call.Run(func(args mock.Arguments) {
131+ var arg0 context.Context
132+ if args[0] != nil {
133+ arg0 = args[0].(context.Context)
134+ }
135+ run(
136+ arg0,
137+ )
138+ })
139+ return _c
140+}
141+
142+func (_c *MockClipboard_HasText_Call) Return(b bool, err error) *MockClipboard_HasText_Call {
143+ _c.Call.Return(b, err)
144+ return _c
145+}
146+
147+func (_c *MockClipboard_HasText_Call) RunAndReturn(run func(ctx context.Context) (bool, error)) *MockClipboard_HasText_Call {
148+ _c.Call.Return(run)
149+ return _c
150+}
151+
152+// ReadText provides a mock function for the type MockClipboard
153+func (_mock *MockClipboard) ReadText(ctx context.Context) (string, error) {
154+ ret := _mock.Called(ctx)
155+
156+ if len(ret) == 0 {
157+ panic("no return value specified for ReadText")
158+ }
159+
160+ var r0 string
161+ var r1 error
162+ if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
163+ return returnFunc(ctx)
164+ }
165+ if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
166+ r0 = returnFunc(ctx)
167+ } else {
168+ r0 = ret.Get(0).(string)
169+ }
170+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
171+ r1 = returnFunc(ctx)
172+ } else {
173+ r1 = ret.Error(1)
174+ }
175+ return r0, r1
176+}
177+
178+// MockClipboard_ReadText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadText'
179+type MockClipboard_ReadText_Call struct {
180+ *mock.Call
181+}
182+
183+// ReadText is a helper method to define mock.On call
184+// - ctx context.Context
185+func (_e *MockClipboard_Expecter) ReadText(ctx any) *MockClipboard_ReadText_Call {
186+ return &MockClipboard_ReadText_Call{Call: _e.mock.On("ReadText", ctx)}
187+}
188+
189+func (_c *MockClipboard_ReadText_Call) Run(run func(ctx context.Context)) *MockClipboard_ReadText_Call {
190+ _c.Call.Run(func(args mock.Arguments) {
191+ var arg0 context.Context
192+ if args[0] != nil {
193+ arg0 = args[0].(context.Context)
194+ }
195+ run(
196+ arg0,
197+ )
198+ })
199+ return _c
200+}
201+
202+func (_c *MockClipboard_ReadText_Call) Return(s string, err error) *MockClipboard_ReadText_Call {
203+ _c.Call.Return(s, err)
204+ return _c
205+}
206+
207+func (_c *MockClipboard_ReadText_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockClipboard_ReadText_Call {
208+ _c.Call.Return(run)
209+ return _c
210+}
211+
212+// WriteImage provides a mock function for the type MockClipboard
213+func (_mock *MockClipboard) WriteImage(ctx context.Context, image entity.ImageData) error {
214+ ret := _mock.Called(ctx, image)
215+
216+ if len(ret) == 0 {
217+ panic("no return value specified for WriteImage")
218+ }
219+
220+ var r0 error
221+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.ImageData) error); ok {
222+ r0 = returnFunc(ctx, image)
223+ } else {
224+ r0 = ret.Error(0)
225+ }
226+ return r0
227+}
228+
229+// MockClipboard_WriteImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteImage'
230+type MockClipboard_WriteImage_Call struct {
231+ *mock.Call
232+}
233+
234+// WriteImage is a helper method to define mock.On call
235+// - ctx context.Context
236+// - image entity.ImageData
237+func (_e *MockClipboard_Expecter) WriteImage(ctx any, image any) *MockClipboard_WriteImage_Call {
238+ return &MockClipboard_WriteImage_Call{Call: _e.mock.On("WriteImage", ctx, image)}
239+}
240+
241+func (_c *MockClipboard_WriteImage_Call) Run(run func(ctx context.Context, image entity.ImageData)) *MockClipboard_WriteImage_Call {
242+ _c.Call.Run(func(args mock.Arguments) {
243+ var arg0 context.Context
244+ if args[0] != nil {
245+ arg0 = args[0].(context.Context)
246+ }
247+ var arg1 entity.ImageData
248+ if args[1] != nil {
249+ arg1 = args[1].(entity.ImageData)
250+ }
251+ run(
252+ arg0,
253+ arg1,
254+ )
255+ })
256+ return _c
257+}
258+
259+func (_c *MockClipboard_WriteImage_Call) Return(err error) *MockClipboard_WriteImage_Call {
260+ _c.Call.Return(err)
261+ return _c
262+}
263+
264+func (_c *MockClipboard_WriteImage_Call) RunAndReturn(run func(ctx context.Context, image entity.ImageData) error) *MockClipboard_WriteImage_Call {
265+ _c.Call.Return(run)
266+ return _c
267+}
268+
269+// WriteText provides a mock function for the type MockClipboard
270+func (_mock *MockClipboard) WriteText(ctx context.Context, text string) error {
271+ ret := _mock.Called(ctx, text)
272+
273+ if len(ret) == 0 {
274+ panic("no return value specified for WriteText")
275+ }
276+
277+ var r0 error
278+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
279+ r0 = returnFunc(ctx, text)
280+ } else {
281+ r0 = ret.Error(0)
282+ }
283+ return r0
284+}
285+
286+// MockClipboard_WriteText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteText'
287+type MockClipboard_WriteText_Call struct {
288+ *mock.Call
289+}
290+
291+// WriteText is a helper method to define mock.On call
292+// - ctx context.Context
293+// - text string
294+func (_e *MockClipboard_Expecter) WriteText(ctx any, text any) *MockClipboard_WriteText_Call {
295+ return &MockClipboard_WriteText_Call{Call: _e.mock.On("WriteText", ctx, text)}
296+}
297+
298+func (_c *MockClipboard_WriteText_Call) Run(run func(ctx context.Context, text string)) *MockClipboard_WriteText_Call {
299+ _c.Call.Run(func(args mock.Arguments) {
300+ var arg0 context.Context
301+ if args[0] != nil {
302+ arg0 = args[0].(context.Context)
303+ }
304+ var arg1 string
305+ if args[1] != nil {
306+ arg1 = args[1].(string)
307+ }
308+ run(
309+ arg0,
310+ arg1,
311+ )
312+ })
313+ return _c
314+}
315+
316+func (_c *MockClipboard_WriteText_Call) Return(err error) *MockClipboard_WriteText_Call {
317+ _c.Call.Return(err)
318+ return _c
319+}
320+
321+func (_c *MockClipboard_WriteText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockClipboard_WriteText_Call {
322+ _c.Call.Return(run)
323+ return _c
324+}
A internal/application/port/mocks/clipboard_events.go +153 -0
@@ -0,0 +1,153 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/dto"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockClipboardTextOrchestrator creates a new instance of MockClipboardTextOrchestrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockClipboardTextOrchestrator(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockClipboardTextOrchestrator {
20+ mock := &MockClipboardTextOrchestrator{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockClipboardTextOrchestrator is an autogenerated mock type for the ClipboardTextOrchestrator type
29+type MockClipboardTextOrchestrator struct {
30+ mock.Mock
31+}
32+
33+type MockClipboardTextOrchestrator_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockClipboardTextOrchestrator) EXPECT() *MockClipboardTextOrchestrator_Expecter {
38+ return &MockClipboardTextOrchestrator_Expecter{mock: &_m.Mock}
39+}
40+
41+// HandleExplicitCopy provides a mock function for the type MockClipboardTextOrchestrator
42+func (_mock *MockClipboardTextOrchestrator) HandleExplicitCopy(ctx context.Context, input dto.ExplicitClipboardInput) error {
43+ ret := _mock.Called(ctx, input)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for HandleExplicitCopy")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.ExplicitClipboardInput) error); ok {
51+ r0 = returnFunc(ctx, input)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockClipboardTextOrchestrator_HandleExplicitCopy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleExplicitCopy'
59+type MockClipboardTextOrchestrator_HandleExplicitCopy_Call struct {
60+ *mock.Call
61+}
62+
63+// HandleExplicitCopy is a helper method to define mock.On call
64+// - ctx context.Context
65+// - input dto.ExplicitClipboardInput
66+func (_e *MockClipboardTextOrchestrator_Expecter) HandleExplicitCopy(ctx any, input any) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
67+ return &MockClipboardTextOrchestrator_HandleExplicitCopy_Call{Call: _e.mock.On("HandleExplicitCopy", ctx, input)}
68+}
69+
70+func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) Run(run func(ctx context.Context, input dto.ExplicitClipboardInput)) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 context.Context
73+ if args[0] != nil {
74+ arg0 = args[0].(context.Context)
75+ }
76+ var arg1 dto.ExplicitClipboardInput
77+ if args[1] != nil {
78+ arg1 = args[1].(dto.ExplicitClipboardInput)
79+ }
80+ run(
81+ arg0,
82+ arg1,
83+ )
84+ })
85+ return _c
86+}
87+
88+func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) Return(err error) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
89+ _c.Call.Return(err)
90+ return _c
91+}
92+
93+func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) RunAndReturn(run func(ctx context.Context, input dto.ExplicitClipboardInput) error) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
94+ _c.Call.Return(run)
95+ return _c
96+}
97+
98+// HandleSelectionUpdate provides a mock function for the type MockClipboardTextOrchestrator
99+func (_mock *MockClipboardTextOrchestrator) HandleSelectionUpdate(ctx context.Context, input dto.SelectionClipboardInput) error {
100+ ret := _mock.Called(ctx, input)
101+
102+ if len(ret) == 0 {
103+ panic("no return value specified for HandleSelectionUpdate")
104+ }
105+
106+ var r0 error
107+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.SelectionClipboardInput) error); ok {
108+ r0 = returnFunc(ctx, input)
109+ } else {
110+ r0 = ret.Error(0)
111+ }
112+ return r0
113+}
114+
115+// MockClipboardTextOrchestrator_HandleSelectionUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleSelectionUpdate'
116+type MockClipboardTextOrchestrator_HandleSelectionUpdate_Call struct {
117+ *mock.Call
118+}
119+
120+// HandleSelectionUpdate is a helper method to define mock.On call
121+// - ctx context.Context
122+// - input dto.SelectionClipboardInput
123+func (_e *MockClipboardTextOrchestrator_Expecter) HandleSelectionUpdate(ctx any, input any) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
124+ return &MockClipboardTextOrchestrator_HandleSelectionUpdate_Call{Call: _e.mock.On("HandleSelectionUpdate", ctx, input)}
125+}
126+
127+func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) Run(run func(ctx context.Context, input dto.SelectionClipboardInput)) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
128+ _c.Call.Run(func(args mock.Arguments) {
129+ var arg0 context.Context
130+ if args[0] != nil {
131+ arg0 = args[0].(context.Context)
132+ }
133+ var arg1 dto.SelectionClipboardInput
134+ if args[1] != nil {
135+ arg1 = args[1].(dto.SelectionClipboardInput)
136+ }
137+ run(
138+ arg0,
139+ arg1,
140+ )
141+ })
142+ return _c
143+}
144+
145+func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) Return(err error) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
146+ _c.Call.Return(err)
147+ return _c
148+}
149+
150+func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) RunAndReturn(run func(ctx context.Context, input dto.SelectionClipboardInput) error) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
151+ _c.Call.Return(run)
152+ return _c
153+}
A internal/application/port/mocks/color_scheme.go +490 -0
@@ -0,0 +1,490 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "github.com/bnema/dumber/internal/application/port"
9+ mock "github.com/stretchr/testify/mock"
10+)
11+
12+// NewMockColorSchemeDetector creates a new instance of MockColorSchemeDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13+// The first argument is typically a *testing.T value.
14+func NewMockColorSchemeDetector(t interface {
15+ mock.TestingT
16+ Cleanup(func())
17+}) *MockColorSchemeDetector {
18+ mock := &MockColorSchemeDetector{}
19+ mock.Mock.Test(t)
20+
21+ t.Cleanup(func() { mock.AssertExpectations(t) })
22+
23+ return mock
24+}
25+
26+// MockColorSchemeDetector is an autogenerated mock type for the ColorSchemeDetector type
27+type MockColorSchemeDetector struct {
28+ mock.Mock
29+}
30+
31+type MockColorSchemeDetector_Expecter struct {
32+ mock *mock.Mock
33+}
34+
35+func (_m *MockColorSchemeDetector) EXPECT() *MockColorSchemeDetector_Expecter {
36+ return &MockColorSchemeDetector_Expecter{mock: &_m.Mock}
37+}
38+
39+// Available provides a mock function for the type MockColorSchemeDetector
40+func (_mock *MockColorSchemeDetector) Available() bool {
41+ ret := _mock.Called()
42+
43+ if len(ret) == 0 {
44+ panic("no return value specified for Available")
45+ }
46+
47+ var r0 bool
48+ if returnFunc, ok := ret.Get(0).(func() bool); ok {
49+ r0 = returnFunc()
50+ } else {
51+ r0 = ret.Get(0).(bool)
52+ }
53+ return r0
54+}
55+
56+// MockColorSchemeDetector_Available_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Available'
57+type MockColorSchemeDetector_Available_Call struct {
58+ *mock.Call
59+}
60+
61+// Available is a helper method to define mock.On call
62+func (_e *MockColorSchemeDetector_Expecter) Available() *MockColorSchemeDetector_Available_Call {
63+ return &MockColorSchemeDetector_Available_Call{Call: _e.mock.On("Available")}
64+}
65+
66+func (_c *MockColorSchemeDetector_Available_Call) Run(run func()) *MockColorSchemeDetector_Available_Call {
67+ _c.Call.Run(func(args mock.Arguments) {
68+ run()
69+ })
70+ return _c
71+}
72+
73+func (_c *MockColorSchemeDetector_Available_Call) Return(b bool) *MockColorSchemeDetector_Available_Call {
74+ _c.Call.Return(b)
75+ return _c
76+}
77+
78+func (_c *MockColorSchemeDetector_Available_Call) RunAndReturn(run func() bool) *MockColorSchemeDetector_Available_Call {
79+ _c.Call.Return(run)
80+ return _c
81+}
82+
83+// Detect provides a mock function for the type MockColorSchemeDetector
84+func (_mock *MockColorSchemeDetector) Detect() (bool, bool) {
85+ ret := _mock.Called()
86+
87+ if len(ret) == 0 {
88+ panic("no return value specified for Detect")
89+ }
90+
91+ var r0 bool
92+ var r1 bool
93+ if returnFunc, ok := ret.Get(0).(func() (bool, bool)); ok {
94+ return returnFunc()
95+ }
96+ if returnFunc, ok := ret.Get(0).(func() bool); ok {
97+ r0 = returnFunc()
98+ } else {
99+ r0 = ret.Get(0).(bool)
100+ }
101+ if returnFunc, ok := ret.Get(1).(func() bool); ok {
102+ r1 = returnFunc()
103+ } else {
104+ r1 = ret.Get(1).(bool)
105+ }
106+ return r0, r1
107+}
108+
109+// MockColorSchemeDetector_Detect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Detect'
110+type MockColorSchemeDetector_Detect_Call struct {
111+ *mock.Call
112+}
113+
114+// Detect is a helper method to define mock.On call
115+func (_e *MockColorSchemeDetector_Expecter) Detect() *MockColorSchemeDetector_Detect_Call {
116+ return &MockColorSchemeDetector_Detect_Call{Call: _e.mock.On("Detect")}
117+}
118+
119+func (_c *MockColorSchemeDetector_Detect_Call) Run(run func()) *MockColorSchemeDetector_Detect_Call {
120+ _c.Call.Run(func(args mock.Arguments) {
121+ run()
122+ })
123+ return _c
124+}
125+
126+func (_c *MockColorSchemeDetector_Detect_Call) Return(prefersDark bool, ok bool) *MockColorSchemeDetector_Detect_Call {
127+ _c.Call.Return(prefersDark, ok)
128+ return _c
129+}
130+
131+func (_c *MockColorSchemeDetector_Detect_Call) RunAndReturn(run func() (bool, bool)) *MockColorSchemeDetector_Detect_Call {
132+ _c.Call.Return(run)
133+ return _c
134+}
135+
136+// Name provides a mock function for the type MockColorSchemeDetector
137+func (_mock *MockColorSchemeDetector) Name() string {
138+ ret := _mock.Called()
139+
140+ if len(ret) == 0 {
141+ panic("no return value specified for Name")
142+ }
143+
144+ var r0 string
145+ if returnFunc, ok := ret.Get(0).(func() string); ok {
146+ r0 = returnFunc()
147+ } else {
148+ r0 = ret.Get(0).(string)
149+ }
150+ return r0
151+}
152+
153+// MockColorSchemeDetector_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
154+type MockColorSchemeDetector_Name_Call struct {
155+ *mock.Call
156+}
157+
158+// Name is a helper method to define mock.On call
159+func (_e *MockColorSchemeDetector_Expecter) Name() *MockColorSchemeDetector_Name_Call {
160+ return &MockColorSchemeDetector_Name_Call{Call: _e.mock.On("Name")}
161+}
162+
163+func (_c *MockColorSchemeDetector_Name_Call) Run(run func()) *MockColorSchemeDetector_Name_Call {
164+ _c.Call.Run(func(args mock.Arguments) {
165+ run()
166+ })
167+ return _c
168+}
169+
170+func (_c *MockColorSchemeDetector_Name_Call) Return(s string) *MockColorSchemeDetector_Name_Call {
171+ _c.Call.Return(s)
172+ return _c
173+}
174+
175+func (_c *MockColorSchemeDetector_Name_Call) RunAndReturn(run func() string) *MockColorSchemeDetector_Name_Call {
176+ _c.Call.Return(run)
177+ return _c
178+}
179+
180+// Priority provides a mock function for the type MockColorSchemeDetector
181+func (_mock *MockColorSchemeDetector) Priority() int {
182+ ret := _mock.Called()
183+
184+ if len(ret) == 0 {
185+ panic("no return value specified for Priority")
186+ }
187+
188+ var r0 int
189+ if returnFunc, ok := ret.Get(0).(func() int); ok {
190+ r0 = returnFunc()
191+ } else {
192+ r0 = ret.Get(0).(int)
193+ }
194+ return r0
195+}
196+
197+// MockColorSchemeDetector_Priority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Priority'
198+type MockColorSchemeDetector_Priority_Call struct {
199+ *mock.Call
200+}
201+
202+// Priority is a helper method to define mock.On call
203+func (_e *MockColorSchemeDetector_Expecter) Priority() *MockColorSchemeDetector_Priority_Call {
204+ return &MockColorSchemeDetector_Priority_Call{Call: _e.mock.On("Priority")}
205+}
206+
207+func (_c *MockColorSchemeDetector_Priority_Call) Run(run func()) *MockColorSchemeDetector_Priority_Call {
208+ _c.Call.Run(func(args mock.Arguments) {
209+ run()
210+ })
211+ return _c
212+}
213+
214+func (_c *MockColorSchemeDetector_Priority_Call) Return(n int) *MockColorSchemeDetector_Priority_Call {
215+ _c.Call.Return(n)
216+ return _c
217+}
218+
219+func (_c *MockColorSchemeDetector_Priority_Call) RunAndReturn(run func() int) *MockColorSchemeDetector_Priority_Call {
220+ _c.Call.Return(run)
221+ return _c
222+}
223+
224+// NewMockToolkitAvailabilityNotifier creates a new instance of MockToolkitAvailabilityNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
225+// The first argument is typically a *testing.T value.
226+func NewMockToolkitAvailabilityNotifier(t interface {
227+ mock.TestingT
228+ Cleanup(func())
229+}) *MockToolkitAvailabilityNotifier {
230+ mock := &MockToolkitAvailabilityNotifier{}
231+ mock.Mock.Test(t)
232+
233+ t.Cleanup(func() { mock.AssertExpectations(t) })
234+
235+ return mock
236+}
237+
238+// MockToolkitAvailabilityNotifier is an autogenerated mock type for the ToolkitAvailabilityNotifier type
239+type MockToolkitAvailabilityNotifier struct {
240+ mock.Mock
241+}
242+
243+type MockToolkitAvailabilityNotifier_Expecter struct {
244+ mock *mock.Mock
245+}
246+
247+func (_m *MockToolkitAvailabilityNotifier) EXPECT() *MockToolkitAvailabilityNotifier_Expecter {
248+ return &MockToolkitAvailabilityNotifier_Expecter{mock: &_m.Mock}
249+}
250+
251+// MarkAvailable provides a mock function for the type MockToolkitAvailabilityNotifier
252+func (_mock *MockToolkitAvailabilityNotifier) MarkAvailable() {
253+ _mock.Called()
254+ return
255+}
256+
257+// MockToolkitAvailabilityNotifier_MarkAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkAvailable'
258+type MockToolkitAvailabilityNotifier_MarkAvailable_Call struct {
259+ *mock.Call
260+}
261+
262+// MarkAvailable is a helper method to define mock.On call
263+func (_e *MockToolkitAvailabilityNotifier_Expecter) MarkAvailable() *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
264+ return &MockToolkitAvailabilityNotifier_MarkAvailable_Call{Call: _e.mock.On("MarkAvailable")}
265+}
266+
267+func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) Run(run func()) *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
268+ _c.Call.Run(func(args mock.Arguments) {
269+ run()
270+ })
271+ return _c
272+}
273+
274+func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) Return() *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
275+ _c.Call.Return()
276+ return _c
277+}
278+
279+func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) RunAndReturn(run func()) *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
280+ _c.Run(run)
281+ return _c
282+}
283+
284+// NewMockColorSchemeResolver creates a new instance of MockColorSchemeResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
285+// The first argument is typically a *testing.T value.
286+func NewMockColorSchemeResolver(t interface {
287+ mock.TestingT
288+ Cleanup(func())
289+}) *MockColorSchemeResolver {
290+ mock := &MockColorSchemeResolver{}
291+ mock.Mock.Test(t)
292+
293+ t.Cleanup(func() { mock.AssertExpectations(t) })
294+
295+ return mock
296+}
297+
298+// MockColorSchemeResolver is an autogenerated mock type for the ColorSchemeResolver type
299+type MockColorSchemeResolver struct {
300+ mock.Mock
301+}
302+
303+type MockColorSchemeResolver_Expecter struct {
304+ mock *mock.Mock
305+}
306+
307+func (_m *MockColorSchemeResolver) EXPECT() *MockColorSchemeResolver_Expecter {
308+ return &MockColorSchemeResolver_Expecter{mock: &_m.Mock}
309+}
310+
311+// OnChange provides a mock function for the type MockColorSchemeResolver
312+func (_mock *MockColorSchemeResolver) OnChange(callback func(port.ColorSchemePreference)) func() {
313+ ret := _mock.Called(callback)
314+
315+ if len(ret) == 0 {
316+ panic("no return value specified for OnChange")
317+ }
318+
319+ var r0 func()
320+ if returnFunc, ok := ret.Get(0).(func(func(port.ColorSchemePreference)) func()); ok {
321+ r0 = returnFunc(callback)
322+ } else {
323+ if ret.Get(0) != nil {
324+ r0 = ret.Get(0).(func())
325+ }
326+ }
327+ return r0
328+}
329+
330+// MockColorSchemeResolver_OnChange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnChange'
331+type MockColorSchemeResolver_OnChange_Call struct {
332+ *mock.Call
333+}
334+
335+// OnChange is a helper method to define mock.On call
336+// - callback func(port.ColorSchemePreference)
337+func (_e *MockColorSchemeResolver_Expecter) OnChange(callback any) *MockColorSchemeResolver_OnChange_Call {
338+ return &MockColorSchemeResolver_OnChange_Call{Call: _e.mock.On("OnChange", callback)}
339+}
340+
341+func (_c *MockColorSchemeResolver_OnChange_Call) Run(run func(callback func(port.ColorSchemePreference))) *MockColorSchemeResolver_OnChange_Call {
342+ _c.Call.Run(func(args mock.Arguments) {
343+ var arg0 func(port.ColorSchemePreference)
344+ if args[0] != nil {
345+ arg0 = args[0].(func(port.ColorSchemePreference))
346+ }
347+ run(
348+ arg0,
349+ )
350+ })
351+ return _c
352+}
353+
354+func (_c *MockColorSchemeResolver_OnChange_Call) Return(fn func()) *MockColorSchemeResolver_OnChange_Call {
355+ _c.Call.Return(fn)
356+ return _c
357+}
358+
359+func (_c *MockColorSchemeResolver_OnChange_Call) RunAndReturn(run func(callback func(port.ColorSchemePreference)) func()) *MockColorSchemeResolver_OnChange_Call {
360+ _c.Call.Return(run)
361+ return _c
362+}
363+
364+// Refresh provides a mock function for the type MockColorSchemeResolver
365+func (_mock *MockColorSchemeResolver) Refresh() port.ColorSchemePreference {
366+ ret := _mock.Called()
367+
368+ if len(ret) == 0 {
369+ panic("no return value specified for Refresh")
370+ }
371+
372+ var r0 port.ColorSchemePreference
373+ if returnFunc, ok := ret.Get(0).(func() port.ColorSchemePreference); ok {
374+ r0 = returnFunc()
375+ } else {
376+ r0 = ret.Get(0).(port.ColorSchemePreference)
377+ }
378+ return r0
379+}
380+
381+// MockColorSchemeResolver_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh'
382+type MockColorSchemeResolver_Refresh_Call struct {
383+ *mock.Call
384+}
385+
386+// Refresh is a helper method to define mock.On call
387+func (_e *MockColorSchemeResolver_Expecter) Refresh() *MockColorSchemeResolver_Refresh_Call {
388+ return &MockColorSchemeResolver_Refresh_Call{Call: _e.mock.On("Refresh")}
389+}
390+
391+func (_c *MockColorSchemeResolver_Refresh_Call) Run(run func()) *MockColorSchemeResolver_Refresh_Call {
392+ _c.Call.Run(func(args mock.Arguments) {
393+ run()
394+ })
395+ return _c
396+}
397+
398+func (_c *MockColorSchemeResolver_Refresh_Call) Return(colorSchemePreference port.ColorSchemePreference) *MockColorSchemeResolver_Refresh_Call {
399+ _c.Call.Return(colorSchemePreference)
400+ return _c
401+}
402+
403+func (_c *MockColorSchemeResolver_Refresh_Call) RunAndReturn(run func() port.ColorSchemePreference) *MockColorSchemeResolver_Refresh_Call {
404+ _c.Call.Return(run)
405+ return _c
406+}
407+
408+// RegisterDetector provides a mock function for the type MockColorSchemeResolver
409+func (_mock *MockColorSchemeResolver) RegisterDetector(detector port.ColorSchemeDetector) {
410+ _mock.Called(detector)
411+ return
412+}
413+
414+// MockColorSchemeResolver_RegisterDetector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterDetector'
415+type MockColorSchemeResolver_RegisterDetector_Call struct {
416+ *mock.Call
417+}
418+
419+// RegisterDetector is a helper method to define mock.On call
420+// - detector port.ColorSchemeDetector
421+func (_e *MockColorSchemeResolver_Expecter) RegisterDetector(detector any) *MockColorSchemeResolver_RegisterDetector_Call {
422+ return &MockColorSchemeResolver_RegisterDetector_Call{Call: _e.mock.On("RegisterDetector", detector)}
423+}
424+
425+func (_c *MockColorSchemeResolver_RegisterDetector_Call) Run(run func(detector port.ColorSchemeDetector)) *MockColorSchemeResolver_RegisterDetector_Call {
426+ _c.Call.Run(func(args mock.Arguments) {
427+ var arg0 port.ColorSchemeDetector
428+ if args[0] != nil {
429+ arg0 = args[0].(port.ColorSchemeDetector)
430+ }
431+ run(
432+ arg0,
433+ )
434+ })
435+ return _c
436+}
437+
438+func (_c *MockColorSchemeResolver_RegisterDetector_Call) Return() *MockColorSchemeResolver_RegisterDetector_Call {
439+ _c.Call.Return()
440+ return _c
441+}
442+
443+func (_c *MockColorSchemeResolver_RegisterDetector_Call) RunAndReturn(run func(detector port.ColorSchemeDetector)) *MockColorSchemeResolver_RegisterDetector_Call {
444+ _c.Run(run)
445+ return _c
446+}
447+
448+// Resolve provides a mock function for the type MockColorSchemeResolver
449+func (_mock *MockColorSchemeResolver) Resolve() port.ColorSchemePreference {
450+ ret := _mock.Called()
451+
452+ if len(ret) == 0 {
453+ panic("no return value specified for Resolve")
454+ }
455+
456+ var r0 port.ColorSchemePreference
457+ if returnFunc, ok := ret.Get(0).(func() port.ColorSchemePreference); ok {
458+ r0 = returnFunc()
459+ } else {
460+ r0 = ret.Get(0).(port.ColorSchemePreference)
461+ }
462+ return r0
463+}
464+
465+// MockColorSchemeResolver_Resolve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resolve'
466+type MockColorSchemeResolver_Resolve_Call struct {
467+ *mock.Call
468+}
469+
470+// Resolve is a helper method to define mock.On call
471+func (_e *MockColorSchemeResolver_Expecter) Resolve() *MockColorSchemeResolver_Resolve_Call {
472+ return &MockColorSchemeResolver_Resolve_Call{Call: _e.mock.On("Resolve")}
473+}
474+
475+func (_c *MockColorSchemeResolver_Resolve_Call) Run(run func()) *MockColorSchemeResolver_Resolve_Call {
476+ _c.Call.Run(func(args mock.Arguments) {
477+ run()
478+ })
479+ return _c
480+}
481+
482+func (_c *MockColorSchemeResolver_Resolve_Call) Return(colorSchemePreference port.ColorSchemePreference) *MockColorSchemeResolver_Resolve_Call {
483+ _c.Call.Return(colorSchemePreference)
484+ return _c
485+}
486+
487+func (_c *MockColorSchemeResolver_Resolve_Call) RunAndReturn(run func() port.ColorSchemePreference) *MockColorSchemeResolver_Resolve_Call {
488+ _c.Call.Return(run)
489+ return _c
490+}
A internal/application/port/mocks/config_migrator.go +384 -0
@@ -0,0 +1,384 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "github.com/bnema/dumber/internal/application/port"
9+ mock "github.com/stretchr/testify/mock"
10+)
11+
12+// NewMockConfigMigrator creates a new instance of MockConfigMigrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13+// The first argument is typically a *testing.T value.
14+func NewMockConfigMigrator(t interface {
15+ mock.TestingT
16+ Cleanup(func())
17+}) *MockConfigMigrator {
18+ mock := &MockConfigMigrator{}
19+ mock.Mock.Test(t)
20+
21+ t.Cleanup(func() { mock.AssertExpectations(t) })
22+
23+ return mock
24+}
25+
26+// MockConfigMigrator is an autogenerated mock type for the ConfigMigrator type
27+type MockConfigMigrator struct {
28+ mock.Mock
29+}
30+
31+type MockConfigMigrator_Expecter struct {
32+ mock *mock.Mock
33+}
34+
35+func (_m *MockConfigMigrator) EXPECT() *MockConfigMigrator_Expecter {
36+ return &MockConfigMigrator_Expecter{mock: &_m.Mock}
37+}
38+
39+// CheckMigration provides a mock function for the type MockConfigMigrator
40+func (_mock *MockConfigMigrator) CheckMigration() (*port.MigrationResult, error) {
41+ ret := _mock.Called()
42+
43+ if len(ret) == 0 {
44+ panic("no return value specified for CheckMigration")
45+ }
46+
47+ var r0 *port.MigrationResult
48+ var r1 error
49+ if returnFunc, ok := ret.Get(0).(func() (*port.MigrationResult, error)); ok {
50+ return returnFunc()
51+ }
52+ if returnFunc, ok := ret.Get(0).(func() *port.MigrationResult); ok {
53+ r0 = returnFunc()
54+ } else {
55+ if ret.Get(0) != nil {
56+ r0 = ret.Get(0).(*port.MigrationResult)
57+ }
58+ }
59+ if returnFunc, ok := ret.Get(1).(func() error); ok {
60+ r1 = returnFunc()
61+ } else {
62+ r1 = ret.Error(1)
63+ }
64+ return r0, r1
65+}
66+
67+// MockConfigMigrator_CheckMigration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckMigration'
68+type MockConfigMigrator_CheckMigration_Call struct {
69+ *mock.Call
70+}
71+
72+// CheckMigration is a helper method to define mock.On call
73+func (_e *MockConfigMigrator_Expecter) CheckMigration() *MockConfigMigrator_CheckMigration_Call {
74+ return &MockConfigMigrator_CheckMigration_Call{Call: _e.mock.On("CheckMigration")}
75+}
76+
77+func (_c *MockConfigMigrator_CheckMigration_Call) Run(run func()) *MockConfigMigrator_CheckMigration_Call {
78+ _c.Call.Run(func(args mock.Arguments) {
79+ run()
80+ })
81+ return _c
82+}
83+
84+func (_c *MockConfigMigrator_CheckMigration_Call) Return(migrationResult *port.MigrationResult, err error) *MockConfigMigrator_CheckMigration_Call {
85+ _c.Call.Return(migrationResult, err)
86+ return _c
87+}
88+
89+func (_c *MockConfigMigrator_CheckMigration_Call) RunAndReturn(run func() (*port.MigrationResult, error)) *MockConfigMigrator_CheckMigration_Call {
90+ _c.Call.Return(run)
91+ return _c
92+}
93+
94+// DetectChanges provides a mock function for the type MockConfigMigrator
95+func (_mock *MockConfigMigrator) DetectChanges() ([]port.KeyChange, error) {
96+ ret := _mock.Called()
97+
98+ if len(ret) == 0 {
99+ panic("no return value specified for DetectChanges")
100+ }
101+
102+ var r0 []port.KeyChange
103+ var r1 error
104+ if returnFunc, ok := ret.Get(0).(func() ([]port.KeyChange, error)); ok {
105+ return returnFunc()
106+ }
107+ if returnFunc, ok := ret.Get(0).(func() []port.KeyChange); ok {
108+ r0 = returnFunc()
109+ } else {
110+ if ret.Get(0) != nil {
111+ r0 = ret.Get(0).([]port.KeyChange)
112+ }
113+ }
114+ if returnFunc, ok := ret.Get(1).(func() error); ok {
115+ r1 = returnFunc()
116+ } else {
117+ r1 = ret.Error(1)
118+ }
119+ return r0, r1
120+}
121+
122+// MockConfigMigrator_DetectChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectChanges'
123+type MockConfigMigrator_DetectChanges_Call struct {
124+ *mock.Call
125+}
126+
127+// DetectChanges is a helper method to define mock.On call
128+func (_e *MockConfigMigrator_Expecter) DetectChanges() *MockConfigMigrator_DetectChanges_Call {
129+ return &MockConfigMigrator_DetectChanges_Call{Call: _e.mock.On("DetectChanges")}
130+}
131+
132+func (_c *MockConfigMigrator_DetectChanges_Call) Run(run func()) *MockConfigMigrator_DetectChanges_Call {
133+ _c.Call.Run(func(args mock.Arguments) {
134+ run()
135+ })
136+ return _c
137+}
138+
139+func (_c *MockConfigMigrator_DetectChanges_Call) Return(keyChanges []port.KeyChange, err error) *MockConfigMigrator_DetectChanges_Call {
140+ _c.Call.Return(keyChanges, err)
141+ return _c
142+}
143+
144+func (_c *MockConfigMigrator_DetectChanges_Call) RunAndReturn(run func() ([]port.KeyChange, error)) *MockConfigMigrator_DetectChanges_Call {
145+ _c.Call.Return(run)
146+ return _c
147+}
148+
149+// GetConfigFile provides a mock function for the type MockConfigMigrator
150+func (_mock *MockConfigMigrator) GetConfigFile() (string, error) {
151+ ret := _mock.Called()
152+
153+ if len(ret) == 0 {
154+ panic("no return value specified for GetConfigFile")
155+ }
156+
157+ var r0 string
158+ var r1 error
159+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
160+ return returnFunc()
161+ }
162+ if returnFunc, ok := ret.Get(0).(func() string); ok {
163+ r0 = returnFunc()
164+ } else {
165+ r0 = ret.Get(0).(string)
166+ }
167+ if returnFunc, ok := ret.Get(1).(func() error); ok {
168+ r1 = returnFunc()
169+ } else {
170+ r1 = ret.Error(1)
171+ }
172+ return r0, r1
173+}
174+
175+// MockConfigMigrator_GetConfigFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfigFile'
176+type MockConfigMigrator_GetConfigFile_Call struct {
177+ *mock.Call
178+}
179+
180+// GetConfigFile is a helper method to define mock.On call
181+func (_e *MockConfigMigrator_Expecter) GetConfigFile() *MockConfigMigrator_GetConfigFile_Call {
182+ return &MockConfigMigrator_GetConfigFile_Call{Call: _e.mock.On("GetConfigFile")}
183+}
184+
185+func (_c *MockConfigMigrator_GetConfigFile_Call) Run(run func()) *MockConfigMigrator_GetConfigFile_Call {
186+ _c.Call.Run(func(args mock.Arguments) {
187+ run()
188+ })
189+ return _c
190+}
191+
192+func (_c *MockConfigMigrator_GetConfigFile_Call) Return(s string, err error) *MockConfigMigrator_GetConfigFile_Call {
193+ _c.Call.Return(s, err)
194+ return _c
195+}
196+
197+func (_c *MockConfigMigrator_GetConfigFile_Call) RunAndReturn(run func() (string, error)) *MockConfigMigrator_GetConfigFile_Call {
198+ _c.Call.Return(run)
199+ return _c
200+}
201+
202+// GetKeyInfo provides a mock function for the type MockConfigMigrator
203+func (_mock *MockConfigMigrator) GetKeyInfo(key string) port.KeyInfo {
204+ ret := _mock.Called(key)
205+
206+ if len(ret) == 0 {
207+ panic("no return value specified for GetKeyInfo")
208+ }
209+
210+ var r0 port.KeyInfo
211+ if returnFunc, ok := ret.Get(0).(func(string) port.KeyInfo); ok {
212+ r0 = returnFunc(key)
213+ } else {
214+ r0 = ret.Get(0).(port.KeyInfo)
215+ }
216+ return r0
217+}
218+
219+// MockConfigMigrator_GetKeyInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyInfo'
220+type MockConfigMigrator_GetKeyInfo_Call struct {
221+ *mock.Call
222+}
223+
224+// GetKeyInfo is a helper method to define mock.On call
225+// - key string
226+func (_e *MockConfigMigrator_Expecter) GetKeyInfo(key any) *MockConfigMigrator_GetKeyInfo_Call {
227+ return &MockConfigMigrator_GetKeyInfo_Call{Call: _e.mock.On("GetKeyInfo", key)}
228+}
229+
230+func (_c *MockConfigMigrator_GetKeyInfo_Call) Run(run func(key string)) *MockConfigMigrator_GetKeyInfo_Call {
231+ _c.Call.Run(func(args mock.Arguments) {
232+ var arg0 string
233+ if args[0] != nil {
234+ arg0 = args[0].(string)
235+ }
236+ run(
237+ arg0,
238+ )
239+ })
240+ return _c
241+}
242+
243+func (_c *MockConfigMigrator_GetKeyInfo_Call) Return(keyInfo port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call {
244+ _c.Call.Return(keyInfo)
245+ return _c
246+}
247+
248+func (_c *MockConfigMigrator_GetKeyInfo_Call) RunAndReturn(run func(key string) port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call {
249+ _c.Call.Return(run)
250+ return _c
251+}
252+
253+// Migrate provides a mock function for the type MockConfigMigrator
254+func (_mock *MockConfigMigrator) Migrate() ([]string, error) {
255+ ret := _mock.Called()
256+
257+ if len(ret) == 0 {
258+ panic("no return value specified for Migrate")
259+ }
260+
261+ var r0 []string
262+ var r1 error
263+ if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok {
264+ return returnFunc()
265+ }
266+ if returnFunc, ok := ret.Get(0).(func() []string); ok {
267+ r0 = returnFunc()
268+ } else {
269+ if ret.Get(0) != nil {
270+ r0 = ret.Get(0).([]string)
271+ }
272+ }
273+ if returnFunc, ok := ret.Get(1).(func() error); ok {
274+ r1 = returnFunc()
275+ } else {
276+ r1 = ret.Error(1)
277+ }
278+ return r0, r1
279+}
280+
281+// MockConfigMigrator_Migrate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Migrate'
282+type MockConfigMigrator_Migrate_Call struct {
283+ *mock.Call
284+}
285+
286+// Migrate is a helper method to define mock.On call
287+func (_e *MockConfigMigrator_Expecter) Migrate() *MockConfigMigrator_Migrate_Call {
288+ return &MockConfigMigrator_Migrate_Call{Call: _e.mock.On("Migrate")}
289+}
290+
291+func (_c *MockConfigMigrator_Migrate_Call) Run(run func()) *MockConfigMigrator_Migrate_Call {
292+ _c.Call.Run(func(args mock.Arguments) {
293+ run()
294+ })
295+ return _c
296+}
297+
298+func (_c *MockConfigMigrator_Migrate_Call) Return(strings []string, err error) *MockConfigMigrator_Migrate_Call {
299+ _c.Call.Return(strings, err)
300+ return _c
301+}
302+
303+func (_c *MockConfigMigrator_Migrate_Call) RunAndReturn(run func() ([]string, error)) *MockConfigMigrator_Migrate_Call {
304+ _c.Call.Return(run)
305+ return _c
306+}
307+
308+// NewMockDiffFormatter creates a new instance of MockDiffFormatter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
309+// The first argument is typically a *testing.T value.
310+func NewMockDiffFormatter(t interface {
311+ mock.TestingT
312+ Cleanup(func())
313+}) *MockDiffFormatter {
314+ mock := &MockDiffFormatter{}
315+ mock.Mock.Test(t)
316+
317+ t.Cleanup(func() { mock.AssertExpectations(t) })
318+
319+ return mock
320+}
321+
322+// MockDiffFormatter is an autogenerated mock type for the DiffFormatter type
323+type MockDiffFormatter struct {
324+ mock.Mock
325+}
326+
327+type MockDiffFormatter_Expecter struct {
328+ mock *mock.Mock
329+}
330+
331+func (_m *MockDiffFormatter) EXPECT() *MockDiffFormatter_Expecter {
332+ return &MockDiffFormatter_Expecter{mock: &_m.Mock}
333+}
334+
335+// FormatChangesAsDiff provides a mock function for the type MockDiffFormatter
336+func (_mock *MockDiffFormatter) FormatChangesAsDiff(changes []port.KeyChange) string {
337+ ret := _mock.Called(changes)
338+
339+ if len(ret) == 0 {
340+ panic("no return value specified for FormatChangesAsDiff")
341+ }
342+
343+ var r0 string
344+ if returnFunc, ok := ret.Get(0).(func([]port.KeyChange) string); ok {
345+ r0 = returnFunc(changes)
346+ } else {
347+ r0 = ret.Get(0).(string)
348+ }
349+ return r0
350+}
351+
352+// MockDiffFormatter_FormatChangesAsDiff_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FormatChangesAsDiff'
353+type MockDiffFormatter_FormatChangesAsDiff_Call struct {
354+ *mock.Call
355+}
356+
357+// FormatChangesAsDiff is a helper method to define mock.On call
358+// - changes []port.KeyChange
359+func (_e *MockDiffFormatter_Expecter) FormatChangesAsDiff(changes any) *MockDiffFormatter_FormatChangesAsDiff_Call {
360+ return &MockDiffFormatter_FormatChangesAsDiff_Call{Call: _e.mock.On("FormatChangesAsDiff", changes)}
361+}
362+
363+func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Run(run func(changes []port.KeyChange)) *MockDiffFormatter_FormatChangesAsDiff_Call {
364+ _c.Call.Run(func(args mock.Arguments) {
365+ var arg0 []port.KeyChange
366+ if args[0] != nil {
367+ arg0 = args[0].([]port.KeyChange)
368+ }
369+ run(
370+ arg0,
371+ )
372+ })
373+ return _c
374+}
375+
376+func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Return(s string) *MockDiffFormatter_FormatChangesAsDiff_Call {
377+ _c.Call.Return(s)
378+ return _c
379+}
380+
381+func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) RunAndReturn(run func(changes []port.KeyChange) string) *MockDiffFormatter_FormatChangesAsDiff_Call {
382+ _c.Call.Return(run)
383+ return _c
384+}
A internal/application/port/mocks/config_schema.go +83 -0
@@ -0,0 +1,83 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "github.com/bnema/dumber/internal/domain/entity"
9+ mock "github.com/stretchr/testify/mock"
10+)
11+
12+// NewMockConfigSchemaProvider creates a new instance of MockConfigSchemaProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13+// The first argument is typically a *testing.T value.
14+func NewMockConfigSchemaProvider(t interface {
15+ mock.TestingT
16+ Cleanup(func())
17+}) *MockConfigSchemaProvider {
18+ mock := &MockConfigSchemaProvider{}
19+ mock.Mock.Test(t)
20+
21+ t.Cleanup(func() { mock.AssertExpectations(t) })
22+
23+ return mock
24+}
25+
26+// MockConfigSchemaProvider is an autogenerated mock type for the ConfigSchemaProvider type
27+type MockConfigSchemaProvider struct {
28+ mock.Mock
29+}
30+
31+type MockConfigSchemaProvider_Expecter struct {
32+ mock *mock.Mock
33+}
34+
35+func (_m *MockConfigSchemaProvider) EXPECT() *MockConfigSchemaProvider_Expecter {
36+ return &MockConfigSchemaProvider_Expecter{mock: &_m.Mock}
37+}
38+
39+// GetSchema provides a mock function for the type MockConfigSchemaProvider
40+func (_mock *MockConfigSchemaProvider) GetSchema() []entity.ConfigKeyInfo {
41+ ret := _mock.Called()
42+
43+ if len(ret) == 0 {
44+ panic("no return value specified for GetSchema")
45+ }
46+
47+ var r0 []entity.ConfigKeyInfo
48+ if returnFunc, ok := ret.Get(0).(func() []entity.ConfigKeyInfo); ok {
49+ r0 = returnFunc()
50+ } else {
51+ if ret.Get(0) != nil {
52+ r0 = ret.Get(0).([]entity.ConfigKeyInfo)
53+ }
54+ }
55+ return r0
56+}
57+
58+// MockConfigSchemaProvider_GetSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchema'
59+type MockConfigSchemaProvider_GetSchema_Call struct {
60+ *mock.Call
61+}
62+
63+// GetSchema is a helper method to define mock.On call
64+func (_e *MockConfigSchemaProvider_Expecter) GetSchema() *MockConfigSchemaProvider_GetSchema_Call {
65+ return &MockConfigSchemaProvider_GetSchema_Call{Call: _e.mock.On("GetSchema")}
66+}
67+
68+func (_c *MockConfigSchemaProvider_GetSchema_Call) Run(run func()) *MockConfigSchemaProvider_GetSchema_Call {
69+ _c.Call.Run(func(args mock.Arguments) {
70+ run()
71+ })
72+ return _c
73+}
74+
75+func (_c *MockConfigSchemaProvider_GetSchema_Call) Return(configKeyInfos []entity.ConfigKeyInfo) *MockConfigSchemaProvider_GetSchema_Call {
76+ _c.Call.Return(configKeyInfos)
77+ return _c
78+}
79+
80+func (_c *MockConfigSchemaProvider_GetSchema_Call) RunAndReturn(run func() []entity.ConfigKeyInfo) *MockConfigSchemaProvider_GetSchema_Call {
81+ _c.Call.Return(run)
82+ return _c
83+}
A internal/application/port/mocks/config_transformer.go +116 -0
@@ -0,0 +1,116 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ mock "github.com/stretchr/testify/mock"
9+)
10+
11+// NewMockConfigTransformer creates a new instance of MockConfigTransformer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12+// The first argument is typically a *testing.T value.
13+func NewMockConfigTransformer(t interface {
14+ mock.TestingT
15+ Cleanup(func())
16+}) *MockConfigTransformer {
17+ mock := &MockConfigTransformer{}
18+ mock.Mock.Test(t)
19+
20+ t.Cleanup(func() { mock.AssertExpectations(t) })
21+
22+ return mock
23+}
24+
25+// MockConfigTransformer is an autogenerated mock type for the ConfigTransformer type
26+type MockConfigTransformer struct {
27+ mock.Mock
28+}
29+
30+type MockConfigTransformer_Expecter struct {
31+ mock *mock.Mock
32+}
33+
34+func (_m *MockConfigTransformer) EXPECT() *MockConfigTransformer_Expecter {
35+ return &MockConfigTransformer_Expecter{mock: &_m.Mock}
36+}
37+
38+// TransformLegacyActions provides a mock function for the type MockConfigTransformer
39+func (_mock *MockConfigTransformer) TransformLegacyActions(rawConfig map[string]any) {
40+ _mock.Called(rawConfig)
41+ return
42+}
43+
44+// MockConfigTransformer_TransformLegacyActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransformLegacyActions'
45+type MockConfigTransformer_TransformLegacyActions_Call struct {
46+ *mock.Call
47+}
48+
49+// TransformLegacyActions is a helper method to define mock.On call
50+// - rawConfig map[string]any
51+func (_e *MockConfigTransformer_Expecter) TransformLegacyActions(rawConfig any) *MockConfigTransformer_TransformLegacyActions_Call {
52+ return &MockConfigTransformer_TransformLegacyActions_Call{Call: _e.mock.On("TransformLegacyActions", rawConfig)}
53+}
54+
55+func (_c *MockConfigTransformer_TransformLegacyActions_Call) Run(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyActions_Call {
56+ _c.Call.Run(func(args mock.Arguments) {
57+ var arg0 map[string]any
58+ if args[0] != nil {
59+ arg0 = args[0].(map[string]any)
60+ }
61+ run(
62+ arg0,
63+ )
64+ })
65+ return _c
66+}
67+
68+func (_c *MockConfigTransformer_TransformLegacyActions_Call) Return() *MockConfigTransformer_TransformLegacyActions_Call {
69+ _c.Call.Return()
70+ return _c
71+}
72+
73+func (_c *MockConfigTransformer_TransformLegacyActions_Call) RunAndReturn(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyActions_Call {
74+ _c.Run(run)
75+ return _c
76+}
77+
78+// TransformLegacyEngineConfig provides a mock function for the type MockConfigTransformer
79+func (_mock *MockConfigTransformer) TransformLegacyEngineConfig(rawConfig map[string]any) {
80+ _mock.Called(rawConfig)
81+ return
82+}
83+
84+// MockConfigTransformer_TransformLegacyEngineConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransformLegacyEngineConfig'
85+type MockConfigTransformer_TransformLegacyEngineConfig_Call struct {
86+ *mock.Call
87+}
88+
89+// TransformLegacyEngineConfig is a helper method to define mock.On call
90+// - rawConfig map[string]any
91+func (_e *MockConfigTransformer_Expecter) TransformLegacyEngineConfig(rawConfig any) *MockConfigTransformer_TransformLegacyEngineConfig_Call {
92+ return &MockConfigTransformer_TransformLegacyEngineConfig_Call{Call: _e.mock.On("TransformLegacyEngineConfig", rawConfig)}
93+}
94+
95+func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) Run(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyEngineConfig_Call {
96+ _c.Call.Run(func(args mock.Arguments) {
97+ var arg0 map[string]any
98+ if args[0] != nil {
99+ arg0 = args[0].(map[string]any)
100+ }
101+ run(
102+ arg0,
103+ )
104+ })
105+ return _c
106+}
107+
108+func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) Return() *MockConfigTransformer_TransformLegacyEngineConfig_Call {
109+ _c.Call.Return()
110+ return _c
111+}
112+
113+func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) RunAndReturn(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyEngineConfig_Call {
114+ _c.Run(run)
115+ return _c
116+}
A internal/application/port/mocks/content_injector.go +210 -0
@@ -0,0 +1,210 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockContentInjector creates a new instance of MockContentInjector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockContentInjector(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockContentInjector {
20+ mock := &MockContentInjector{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockContentInjector is an autogenerated mock type for the ContentInjector type
29+type MockContentInjector struct {
30+ mock.Mock
31+}
32+
33+type MockContentInjector_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockContentInjector) EXPECT() *MockContentInjector_Expecter {
38+ return &MockContentInjector_Expecter{mock: &_m.Mock}
39+}
40+
41+// InjectFindHighlightCSS provides a mock function for the type MockContentInjector
42+func (_mock *MockContentInjector) InjectFindHighlightCSS(ctx context.Context, css string) error {
43+ ret := _mock.Called(ctx, css)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for InjectFindHighlightCSS")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
51+ r0 = returnFunc(ctx, css)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockContentInjector_InjectFindHighlightCSS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InjectFindHighlightCSS'
59+type MockContentInjector_InjectFindHighlightCSS_Call struct {
60+ *mock.Call
61+}
62+
63+// InjectFindHighlightCSS is a helper method to define mock.On call
64+// - ctx context.Context
65+// - css string
66+func (_e *MockContentInjector_Expecter) InjectFindHighlightCSS(ctx any, css any) *MockContentInjector_InjectFindHighlightCSS_Call {
67+ return &MockContentInjector_InjectFindHighlightCSS_Call{Call: _e.mock.On("InjectFindHighlightCSS", ctx, css)}
68+}
69+
70+func (_c *MockContentInjector_InjectFindHighlightCSS_Call) Run(run func(ctx context.Context, css string)) *MockContentInjector_InjectFindHighlightCSS_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 context.Context
73+ if args[0] != nil {
74+ arg0 = args[0].(context.Context)
75+ }
76+ var arg1 string
77+ if args[1] != nil {
78+ arg1 = args[1].(string)
79+ }
80+ run(
81+ arg0,
82+ arg1,
83+ )
84+ })
85+ return _c
86+}
87+
88+func (_c *MockContentInjector_InjectFindHighlightCSS_Call) Return(err error) *MockContentInjector_InjectFindHighlightCSS_Call {
89+ _c.Call.Return(err)
90+ return _c
91+}
92+
93+func (_c *MockContentInjector_InjectFindHighlightCSS_Call) RunAndReturn(run func(ctx context.Context, css string) error) *MockContentInjector_InjectFindHighlightCSS_Call {
94+ _c.Call.Return(run)
95+ return _c
96+}
97+
98+// InjectThemeCSS provides a mock function for the type MockContentInjector
99+func (_mock *MockContentInjector) InjectThemeCSS(ctx context.Context, css string) error {
100+ ret := _mock.Called(ctx, css)
101+
102+ if len(ret) == 0 {
103+ panic("no return value specified for InjectThemeCSS")
104+ }
105+
106+ var r0 error
107+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
108+ r0 = returnFunc(ctx, css)
109+ } else {
110+ r0 = ret.Error(0)
111+ }
112+ return r0
113+}
114+
115+// MockContentInjector_InjectThemeCSS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InjectThemeCSS'
116+type MockContentInjector_InjectThemeCSS_Call struct {
117+ *mock.Call
118+}
119+
120+// InjectThemeCSS is a helper method to define mock.On call
121+// - ctx context.Context
122+// - css string
123+func (_e *MockContentInjector_Expecter) InjectThemeCSS(ctx any, css any) *MockContentInjector_InjectThemeCSS_Call {
124+ return &MockContentInjector_InjectThemeCSS_Call{Call: _e.mock.On("InjectThemeCSS", ctx, css)}
125+}
126+
127+func (_c *MockContentInjector_InjectThemeCSS_Call) Run(run func(ctx context.Context, css string)) *MockContentInjector_InjectThemeCSS_Call {
128+ _c.Call.Run(func(args mock.Arguments) {
129+ var arg0 context.Context
130+ if args[0] != nil {
131+ arg0 = args[0].(context.Context)
132+ }
133+ var arg1 string
134+ if args[1] != nil {
135+ arg1 = args[1].(string)
136+ }
137+ run(
138+ arg0,
139+ arg1,
140+ )
141+ })
142+ return _c
143+}
144+
145+func (_c *MockContentInjector_InjectThemeCSS_Call) Return(err error) *MockContentInjector_InjectThemeCSS_Call {
146+ _c.Call.Return(err)
147+ return _c
148+}
149+
150+func (_c *MockContentInjector_InjectThemeCSS_Call) RunAndReturn(run func(ctx context.Context, css string) error) *MockContentInjector_InjectThemeCSS_Call {
151+ _c.Call.Return(run)
152+ return _c
153+}
154+
155+// RefreshScripts provides a mock function for the type MockContentInjector
156+func (_mock *MockContentInjector) RefreshScripts(ctx context.Context, wv port.WebView) error {
157+ ret := _mock.Called(ctx, wv)
158+
159+ if len(ret) == 0 {
160+ panic("no return value specified for RefreshScripts")
161+ }
162+
163+ var r0 error
164+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebView) error); ok {
165+ r0 = returnFunc(ctx, wv)
166+ } else {
167+ r0 = ret.Error(0)
168+ }
169+ return r0
170+}
171+
172+// MockContentInjector_RefreshScripts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshScripts'
173+type MockContentInjector_RefreshScripts_Call struct {
174+ *mock.Call
175+}
176+
177+// RefreshScripts is a helper method to define mock.On call
178+// - ctx context.Context
179+// - wv port.WebView
180+func (_e *MockContentInjector_Expecter) RefreshScripts(ctx any, wv any) *MockContentInjector_RefreshScripts_Call {
181+ return &MockContentInjector_RefreshScripts_Call{Call: _e.mock.On("RefreshScripts", ctx, wv)}
182+}
183+
184+func (_c *MockContentInjector_RefreshScripts_Call) Run(run func(ctx context.Context, wv port.WebView)) *MockContentInjector_RefreshScripts_Call {
185+ _c.Call.Run(func(args mock.Arguments) {
186+ var arg0 context.Context
187+ if args[0] != nil {
188+ arg0 = args[0].(context.Context)
189+ }
190+ var arg1 port.WebView
191+ if args[1] != nil {
192+ arg1 = args[1].(port.WebView)
193+ }
194+ run(
195+ arg0,
196+ arg1,
197+ )
198+ })
199+ return _c
200+}
201+
202+func (_c *MockContentInjector_RefreshScripts_Call) Return(err error) *MockContentInjector_RefreshScripts_Call {
203+ _c.Call.Return(err)
204+ return _c
205+}
206+
207+func (_c *MockContentInjector_RefreshScripts_Call) RunAndReturn(run func(ctx context.Context, wv port.WebView) error) *MockContentInjector_RefreshScripts_Call {
208+ _c.Call.Return(run)
209+ return _c
210+}
A internal/application/port/mocks/context_menu.go +376 -0
@@ -0,0 +1,376 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockContextMenuBuilder creates a new instance of MockContextMenuBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockContextMenuBuilder(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockContextMenuBuilder {
20+ mock := &MockContextMenuBuilder{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockContextMenuBuilder is an autogenerated mock type for the ContextMenuBuilder type
29+type MockContextMenuBuilder struct {
30+ mock.Mock
31+}
32+
33+type MockContextMenuBuilder_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockContextMenuBuilder) EXPECT() *MockContextMenuBuilder_Expecter {
38+ return &MockContextMenuBuilder_Expecter{mock: &_m.Mock}
39+}
40+
41+// Build provides a mock function for the type MockContextMenuBuilder
42+func (_mock *MockContextMenuBuilder) Build(ctx context.Context, menuContext port.MenuContext) []port.MenuItem {
43+ ret := _mock.Called(ctx, menuContext)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Build")
47+ }
48+
49+ var r0 []port.MenuItem
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuContext) []port.MenuItem); ok {
51+ r0 = returnFunc(ctx, menuContext)
52+ } else {
53+ if ret.Get(0) != nil {
54+ r0 = ret.Get(0).([]port.MenuItem)
55+ }
56+ }
57+ return r0
58+}
59+
60+// MockContextMenuBuilder_Build_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Build'
61+type MockContextMenuBuilder_Build_Call struct {
62+ *mock.Call
63+}
64+
65+// Build is a helper method to define mock.On call
66+// - ctx context.Context
67+// - menuContext port.MenuContext
68+func (_e *MockContextMenuBuilder_Expecter) Build(ctx any, menuContext any) *MockContextMenuBuilder_Build_Call {
69+ return &MockContextMenuBuilder_Build_Call{Call: _e.mock.On("Build", ctx, menuContext)}
70+}
71+
72+func (_c *MockContextMenuBuilder_Build_Call) Run(run func(ctx context.Context, menuContext port.MenuContext)) *MockContextMenuBuilder_Build_Call {
73+ _c.Call.Run(func(args mock.Arguments) {
74+ var arg0 context.Context
75+ if args[0] != nil {
76+ arg0 = args[0].(context.Context)
77+ }
78+ var arg1 port.MenuContext
79+ if args[1] != nil {
80+ arg1 = args[1].(port.MenuContext)
81+ }
82+ run(
83+ arg0,
84+ arg1,
85+ )
86+ })
87+ return _c
88+}
89+
90+func (_c *MockContextMenuBuilder_Build_Call) Return(menuItems []port.MenuItem) *MockContextMenuBuilder_Build_Call {
91+ _c.Call.Return(menuItems)
92+ return _c
93+}
94+
95+func (_c *MockContextMenuBuilder_Build_Call) RunAndReturn(run func(ctx context.Context, menuContext port.MenuContext) []port.MenuItem) *MockContextMenuBuilder_Build_Call {
96+ _c.Call.Return(run)
97+ return _c
98+}
99+
100+// NewMockContextMenuActionExecutor creates a new instance of MockContextMenuActionExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
101+// The first argument is typically a *testing.T value.
102+func NewMockContextMenuActionExecutor(t interface {
103+ mock.TestingT
104+ Cleanup(func())
105+}) *MockContextMenuActionExecutor {
106+ mock := &MockContextMenuActionExecutor{}
107+ mock.Mock.Test(t)
108+
109+ t.Cleanup(func() { mock.AssertExpectations(t) })
110+
111+ return mock
112+}
113+
114+// MockContextMenuActionExecutor is an autogenerated mock type for the ContextMenuActionExecutor type
115+type MockContextMenuActionExecutor struct {
116+ mock.Mock
117+}
118+
119+type MockContextMenuActionExecutor_Expecter struct {
120+ mock *mock.Mock
121+}
122+
123+func (_m *MockContextMenuActionExecutor) EXPECT() *MockContextMenuActionExecutor_Expecter {
124+ return &MockContextMenuActionExecutor_Expecter{mock: &_m.Mock}
125+}
126+
127+// ExecuteMenuAction provides a mock function for the type MockContextMenuActionExecutor
128+func (_mock *MockContextMenuActionExecutor) ExecuteMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error {
129+ ret := _mock.Called(ctx, action, menuContext)
130+
131+ if len(ret) == 0 {
132+ panic("no return value specified for ExecuteMenuAction")
133+ }
134+
135+ var r0 error
136+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok {
137+ r0 = returnFunc(ctx, action, menuContext)
138+ } else {
139+ r0 = ret.Error(0)
140+ }
141+ return r0
142+}
143+
144+// MockContextMenuActionExecutor_ExecuteMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteMenuAction'
145+type MockContextMenuActionExecutor_ExecuteMenuAction_Call struct {
146+ *mock.Call
147+}
148+
149+// ExecuteMenuAction is a helper method to define mock.On call
150+// - ctx context.Context
151+// - action port.MenuAction
152+// - menuContext port.MenuContext
153+func (_e *MockContextMenuActionExecutor_Expecter) ExecuteMenuAction(ctx any, action any, menuContext any) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
154+ return &MockContextMenuActionExecutor_ExecuteMenuAction_Call{Call: _e.mock.On("ExecuteMenuAction", ctx, action, menuContext)}
155+}
156+
157+func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
158+ _c.Call.Run(func(args mock.Arguments) {
159+ var arg0 context.Context
160+ if args[0] != nil {
161+ arg0 = args[0].(context.Context)
162+ }
163+ var arg1 port.MenuAction
164+ if args[1] != nil {
165+ arg1 = args[1].(port.MenuAction)
166+ }
167+ var arg2 port.MenuContext
168+ if args[2] != nil {
169+ arg2 = args[2].(port.MenuContext)
170+ }
171+ run(
172+ arg0,
173+ arg1,
174+ arg2,
175+ )
176+ })
177+ return _c
178+}
179+
180+func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Return(err error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
181+ _c.Call.Return(err)
182+ return _c
183+}
184+
185+func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
186+ _c.Call.Return(run)
187+ return _c
188+}
189+
190+// NewMockContextMenuActionExecutorFactory creates a new instance of MockContextMenuActionExecutorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
191+// The first argument is typically a *testing.T value.
192+func NewMockContextMenuActionExecutorFactory(t interface {
193+ mock.TestingT
194+ Cleanup(func())
195+}) *MockContextMenuActionExecutorFactory {
196+ mock := &MockContextMenuActionExecutorFactory{}
197+ mock.Mock.Test(t)
198+
199+ t.Cleanup(func() { mock.AssertExpectations(t) })
200+
201+ return mock
202+}
203+
204+// MockContextMenuActionExecutorFactory is an autogenerated mock type for the ContextMenuActionExecutorFactory type
205+type MockContextMenuActionExecutorFactory struct {
206+ mock.Mock
207+}
208+
209+type MockContextMenuActionExecutorFactory_Expecter struct {
210+ mock *mock.Mock
211+}
212+
213+func (_m *MockContextMenuActionExecutorFactory) EXPECT() *MockContextMenuActionExecutorFactory_Expecter {
214+ return &MockContextMenuActionExecutorFactory_Expecter{mock: &_m.Mock}
215+}
216+
217+// NewContextMenuActionExecutor provides a mock function for the type MockContextMenuActionExecutorFactory
218+func (_mock *MockContextMenuActionExecutorFactory) NewContextMenuActionExecutor(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor {
219+ ret := _mock.Called(clipboard, resolver, saver, delegator)
220+
221+ if len(ret) == 0 {
222+ panic("no return value specified for NewContextMenuActionExecutor")
223+ }
224+
225+ var r0 port.ContextMenuActionExecutor
226+ if returnFunc, ok := ret.Get(0).(func(port.Clipboard, port.ImageDataResolver, port.ResolvedImageSaver, port.MenuActionDelegator) port.ContextMenuActionExecutor); ok {
227+ r0 = returnFunc(clipboard, resolver, saver, delegator)
228+ } else {
229+ if ret.Get(0) != nil {
230+ r0 = ret.Get(0).(port.ContextMenuActionExecutor)
231+ }
232+ }
233+ return r0
234+}
235+
236+// MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewContextMenuActionExecutor'
237+type MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call struct {
238+ *mock.Call
239+}
240+
241+// NewContextMenuActionExecutor is a helper method to define mock.On call
242+// - clipboard port.Clipboard
243+// - resolver port.ImageDataResolver
244+// - saver port.ResolvedImageSaver
245+// - delegator port.MenuActionDelegator
246+func (_e *MockContextMenuActionExecutorFactory_Expecter) NewContextMenuActionExecutor(clipboard any, resolver any, saver any, delegator any) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
247+ return &MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call{Call: _e.mock.On("NewContextMenuActionExecutor", clipboard, resolver, saver, delegator)}
248+}
249+
250+func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Run(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator)) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
251+ _c.Call.Run(func(args mock.Arguments) {
252+ var arg0 port.Clipboard
253+ if args[0] != nil {
254+ arg0 = args[0].(port.Clipboard)
255+ }
256+ var arg1 port.ImageDataResolver
257+ if args[1] != nil {
258+ arg1 = args[1].(port.ImageDataResolver)
259+ }
260+ var arg2 port.ResolvedImageSaver
261+ if args[2] != nil {
262+ arg2 = args[2].(port.ResolvedImageSaver)
263+ }
264+ var arg3 port.MenuActionDelegator
265+ if args[3] != nil {
266+ arg3 = args[3].(port.MenuActionDelegator)
267+ }
268+ run(
269+ arg0,
270+ arg1,
271+ arg2,
272+ arg3,
273+ )
274+ })
275+ return _c
276+}
277+
278+func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Return(contextMenuActionExecutor port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
279+ _c.Call.Return(contextMenuActionExecutor)
280+ return _c
281+}
282+
283+func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) RunAndReturn(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
284+ _c.Call.Return(run)
285+ return _c
286+}
287+
288+// NewMockMenuActionDelegator creates a new instance of MockMenuActionDelegator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
289+// The first argument is typically a *testing.T value.
290+func NewMockMenuActionDelegator(t interface {
291+ mock.TestingT
292+ Cleanup(func())
293+}) *MockMenuActionDelegator {
294+ mock := &MockMenuActionDelegator{}
295+ mock.Mock.Test(t)
296+
297+ t.Cleanup(func() { mock.AssertExpectations(t) })
298+
299+ return mock
300+}
301+
302+// MockMenuActionDelegator is an autogenerated mock type for the MenuActionDelegator type
303+type MockMenuActionDelegator struct {
304+ mock.Mock
305+}
306+
307+type MockMenuActionDelegator_Expecter struct {
308+ mock *mock.Mock
309+}
310+
311+func (_m *MockMenuActionDelegator) EXPECT() *MockMenuActionDelegator_Expecter {
312+ return &MockMenuActionDelegator_Expecter{mock: &_m.Mock}
313+}
314+
315+// DelegateMenuAction provides a mock function for the type MockMenuActionDelegator
316+func (_mock *MockMenuActionDelegator) DelegateMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error {
317+ ret := _mock.Called(ctx, action, menuContext)
318+
319+ if len(ret) == 0 {
320+ panic("no return value specified for DelegateMenuAction")
321+ }
322+
323+ var r0 error
324+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok {
325+ r0 = returnFunc(ctx, action, menuContext)
326+ } else {
327+ r0 = ret.Error(0)
328+ }
329+ return r0
330+}
331+
332+// MockMenuActionDelegator_DelegateMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegateMenuAction'
333+type MockMenuActionDelegator_DelegateMenuAction_Call struct {
334+ *mock.Call
335+}
336+
337+// DelegateMenuAction is a helper method to define mock.On call
338+// - ctx context.Context
339+// - action port.MenuAction
340+// - menuContext port.MenuContext
341+func (_e *MockMenuActionDelegator_Expecter) DelegateMenuAction(ctx any, action any, menuContext any) *MockMenuActionDelegator_DelegateMenuAction_Call {
342+ return &MockMenuActionDelegator_DelegateMenuAction_Call{Call: _e.mock.On("DelegateMenuAction", ctx, action, menuContext)}
343+}
344+
345+func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockMenuActionDelegator_DelegateMenuAction_Call {
346+ _c.Call.Run(func(args mock.Arguments) {
347+ var arg0 context.Context
348+ if args[0] != nil {
349+ arg0 = args[0].(context.Context)
350+ }
351+ var arg1 port.MenuAction
352+ if args[1] != nil {
353+ arg1 = args[1].(port.MenuAction)
354+ }
355+ var arg2 port.MenuContext
356+ if args[2] != nil {
357+ arg2 = args[2].(port.MenuContext)
358+ }
359+ run(
360+ arg0,
361+ arg1,
362+ arg2,
363+ )
364+ })
365+ return _c
366+}
367+
368+func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Return(err error) *MockMenuActionDelegator_DelegateMenuAction_Call {
369+ _c.Call.Return(err)
370+ return _c
371+}
372+
373+func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockMenuActionDelegator_DelegateMenuAction_Call {
374+ _c.Call.Return(run)
375+ return _c
376+}
A internal/application/port/mocks/database.go +189 -0
@@ -0,0 +1,189 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+ "database/sql"
10+
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockDatabaseProvider creates a new instance of MockDatabaseProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockDatabaseProvider(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockDatabaseProvider {
20+ mock := &MockDatabaseProvider{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockDatabaseProvider is an autogenerated mock type for the DatabaseProvider type
29+type MockDatabaseProvider struct {
30+ mock.Mock
31+}
32+
33+type MockDatabaseProvider_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockDatabaseProvider) EXPECT() *MockDatabaseProvider_Expecter {
38+ return &MockDatabaseProvider_Expecter{mock: &_m.Mock}
39+}
40+
41+// Close provides a mock function for the type MockDatabaseProvider
42+func (_mock *MockDatabaseProvider) Close() error {
43+ ret := _mock.Called()
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Close")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func() error); ok {
51+ r0 = returnFunc()
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockDatabaseProvider_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
59+type MockDatabaseProvider_Close_Call struct {
60+ *mock.Call
61+}
62+
63+// Close is a helper method to define mock.On call
64+func (_e *MockDatabaseProvider_Expecter) Close() *MockDatabaseProvider_Close_Call {
65+ return &MockDatabaseProvider_Close_Call{Call: _e.mock.On("Close")}
66+}
67+
68+func (_c *MockDatabaseProvider_Close_Call) Run(run func()) *MockDatabaseProvider_Close_Call {
69+ _c.Call.Run(func(args mock.Arguments) {
70+ run()
71+ })
72+ return _c
73+}
74+
75+func (_c *MockDatabaseProvider_Close_Call) Return(err error) *MockDatabaseProvider_Close_Call {
76+ _c.Call.Return(err)
77+ return _c
78+}
79+
80+func (_c *MockDatabaseProvider_Close_Call) RunAndReturn(run func() error) *MockDatabaseProvider_Close_Call {
81+ _c.Call.Return(run)
82+ return _c
83+}
84+
85+// DB provides a mock function for the type MockDatabaseProvider
86+func (_mock *MockDatabaseProvider) DB(ctx context.Context) (*sql.DB, error) {
87+ ret := _mock.Called(ctx)
88+
89+ if len(ret) == 0 {
90+ panic("no return value specified for DB")
91+ }
92+
93+ var r0 *sql.DB
94+ var r1 error
95+ if returnFunc, ok := ret.Get(0).(func(context.Context) (*sql.DB, error)); ok {
96+ return returnFunc(ctx)
97+ }
98+ if returnFunc, ok := ret.Get(0).(func(context.Context) *sql.DB); ok {
99+ r0 = returnFunc(ctx)
100+ } else {
101+ if ret.Get(0) != nil {
102+ r0 = ret.Get(0).(*sql.DB)
103+ }
104+ }
105+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
106+ r1 = returnFunc(ctx)
107+ } else {
108+ r1 = ret.Error(1)
109+ }
110+ return r0, r1
111+}
112+
113+// MockDatabaseProvider_DB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DB'
114+type MockDatabaseProvider_DB_Call struct {
115+ *mock.Call
116+}
117+
118+// DB is a helper method to define mock.On call
119+// - ctx context.Context
120+func (_e *MockDatabaseProvider_Expecter) DB(ctx any) *MockDatabaseProvider_DB_Call {
121+ return &MockDatabaseProvider_DB_Call{Call: _e.mock.On("DB", ctx)}
122+}
123+
124+func (_c *MockDatabaseProvider_DB_Call) Run(run func(ctx context.Context)) *MockDatabaseProvider_DB_Call {
125+ _c.Call.Run(func(args mock.Arguments) {
126+ var arg0 context.Context
127+ if args[0] != nil {
128+ arg0 = args[0].(context.Context)
129+ }
130+ run(
131+ arg0,
132+ )
133+ })
134+ return _c
135+}
136+
137+func (_c *MockDatabaseProvider_DB_Call) Return(dB *sql.DB, err error) *MockDatabaseProvider_DB_Call {
138+ _c.Call.Return(dB, err)
139+ return _c
140+}
141+
142+func (_c *MockDatabaseProvider_DB_Call) RunAndReturn(run func(ctx context.Context) (*sql.DB, error)) *MockDatabaseProvider_DB_Call {
143+ _c.Call.Return(run)
144+ return _c
145+}
146+
147+// IsInitialized provides a mock function for the type MockDatabaseProvider
148+func (_mock *MockDatabaseProvider) IsInitialized() bool {
149+ ret := _mock.Called()
150+
151+ if len(ret) == 0 {
152+ panic("no return value specified for IsInitialized")
153+ }
154+
155+ var r0 bool
156+ if returnFunc, ok := ret.Get(0).(func() bool); ok {
157+ r0 = returnFunc()
158+ } else {
159+ r0 = ret.Get(0).(bool)
160+ }
161+ return r0
162+}
163+
164+// MockDatabaseProvider_IsInitialized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInitialized'
165+type MockDatabaseProvider_IsInitialized_Call struct {
166+ *mock.Call
167+}
168+
169+// IsInitialized is a helper method to define mock.On call
170+func (_e *MockDatabaseProvider_Expecter) IsInitialized() *MockDatabaseProvider_IsInitialized_Call {
171+ return &MockDatabaseProvider_IsInitialized_Call{Call: _e.mock.On("IsInitialized")}
172+}
173+
174+func (_c *MockDatabaseProvider_IsInitialized_Call) Run(run func()) *MockDatabaseProvider_IsInitialized_Call {
175+ _c.Call.Run(func(args mock.Arguments) {
176+ run()
177+ })
178+ return _c
179+}
180+
181+func (_c *MockDatabaseProvider_IsInitialized_Call) Return(b bool) *MockDatabaseProvider_IsInitialized_Call {
182+ _c.Call.Return(b)
183+ return _c
184+}
185+
186+func (_c *MockDatabaseProvider_IsInitialized_Call) RunAndReturn(run func() bool) *MockDatabaseProvider_IsInitialized_Call {
187+ _c.Call.Return(run)
188+ return _c
189+}
A internal/application/port/mocks/desktop.go +431 -0
@@ -0,0 +1,431 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockDesktopIntegration creates a new instance of MockDesktopIntegration. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockDesktopIntegration(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockDesktopIntegration {
20+ mock := &MockDesktopIntegration{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockDesktopIntegration is an autogenerated mock type for the DesktopIntegration type
29+type MockDesktopIntegration struct {
30+ mock.Mock
31+}
32+
33+type MockDesktopIntegration_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockDesktopIntegration) EXPECT() *MockDesktopIntegration_Expecter {
38+ return &MockDesktopIntegration_Expecter{mock: &_m.Mock}
39+}
40+
41+// GetStatus provides a mock function for the type MockDesktopIntegration
42+func (_mock *MockDesktopIntegration) GetStatus(ctx context.Context) (*port.DesktopIntegrationStatus, error) {
43+ ret := _mock.Called(ctx)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for GetStatus")
47+ }
48+
49+ var r0 *port.DesktopIntegrationStatus
50+ var r1 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context) (*port.DesktopIntegrationStatus, error)); ok {
52+ return returnFunc(ctx)
53+ }
54+ if returnFunc, ok := ret.Get(0).(func(context.Context) *port.DesktopIntegrationStatus); ok {
55+ r0 = returnFunc(ctx)
56+ } else {
57+ if ret.Get(0) != nil {
58+ r0 = ret.Get(0).(*port.DesktopIntegrationStatus)
59+ }
60+ }
61+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
62+ r1 = returnFunc(ctx)
63+ } else {
64+ r1 = ret.Error(1)
65+ }
66+ return r0, r1
67+}
68+
69+// MockDesktopIntegration_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus'
70+type MockDesktopIntegration_GetStatus_Call struct {
71+ *mock.Call
72+}
73+
74+// GetStatus is a helper method to define mock.On call
75+// - ctx context.Context
76+func (_e *MockDesktopIntegration_Expecter) GetStatus(ctx any) *MockDesktopIntegration_GetStatus_Call {
77+ return &MockDesktopIntegration_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx)}
78+}
79+
80+func (_c *MockDesktopIntegration_GetStatus_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_GetStatus_Call {
81+ _c.Call.Run(func(args mock.Arguments) {
82+ var arg0 context.Context
83+ if args[0] != nil {
84+ arg0 = args[0].(context.Context)
85+ }
86+ run(
87+ arg0,
88+ )
89+ })
90+ return _c
91+}
92+
93+func (_c *MockDesktopIntegration_GetStatus_Call) Return(desktopIntegrationStatus *port.DesktopIntegrationStatus, err error) *MockDesktopIntegration_GetStatus_Call {
94+ _c.Call.Return(desktopIntegrationStatus, err)
95+ return _c
96+}
97+
98+func (_c *MockDesktopIntegration_GetStatus_Call) RunAndReturn(run func(ctx context.Context) (*port.DesktopIntegrationStatus, error)) *MockDesktopIntegration_GetStatus_Call {
99+ _c.Call.Return(run)
100+ return _c
101+}
102+
103+// InstallDesktopFile provides a mock function for the type MockDesktopIntegration
104+func (_mock *MockDesktopIntegration) InstallDesktopFile(ctx context.Context) (string, error) {
105+ ret := _mock.Called(ctx)
106+
107+ if len(ret) == 0 {
108+ panic("no return value specified for InstallDesktopFile")
109+ }
110+
111+ var r0 string
112+ var r1 error
113+ if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
114+ return returnFunc(ctx)
115+ }
116+ if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
117+ r0 = returnFunc(ctx)
118+ } else {
119+ r0 = ret.Get(0).(string)
120+ }
121+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
122+ r1 = returnFunc(ctx)
123+ } else {
124+ r1 = ret.Error(1)
125+ }
126+ return r0, r1
127+}
128+
129+// MockDesktopIntegration_InstallDesktopFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallDesktopFile'
130+type MockDesktopIntegration_InstallDesktopFile_Call struct {
131+ *mock.Call
132+}
133+
134+// InstallDesktopFile is a helper method to define mock.On call
135+// - ctx context.Context
136+func (_e *MockDesktopIntegration_Expecter) InstallDesktopFile(ctx any) *MockDesktopIntegration_InstallDesktopFile_Call {
137+ return &MockDesktopIntegration_InstallDesktopFile_Call{Call: _e.mock.On("InstallDesktopFile", ctx)}
138+}
139+
140+func (_c *MockDesktopIntegration_InstallDesktopFile_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_InstallDesktopFile_Call {
141+ _c.Call.Run(func(args mock.Arguments) {
142+ var arg0 context.Context
143+ if args[0] != nil {
144+ arg0 = args[0].(context.Context)
145+ }
146+ run(
147+ arg0,
148+ )
149+ })
150+ return _c
151+}
152+
153+func (_c *MockDesktopIntegration_InstallDesktopFile_Call) Return(s string, err error) *MockDesktopIntegration_InstallDesktopFile_Call {
154+ _c.Call.Return(s, err)
155+ return _c
156+}
157+
158+func (_c *MockDesktopIntegration_InstallDesktopFile_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockDesktopIntegration_InstallDesktopFile_Call {
159+ _c.Call.Return(run)
160+ return _c
161+}
162+
163+// InstallIcon provides a mock function for the type MockDesktopIntegration
164+func (_mock *MockDesktopIntegration) InstallIcon(ctx context.Context, svgData []byte) (string, error) {
165+ ret := _mock.Called(ctx, svgData)
166+
167+ if len(ret) == 0 {
168+ panic("no return value specified for InstallIcon")
169+ }
170+
171+ var r0 string
172+ var r1 error
173+ if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) (string, error)); ok {
174+ return returnFunc(ctx, svgData)
175+ }
176+ if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) string); ok {
177+ r0 = returnFunc(ctx, svgData)
178+ } else {
179+ r0 = ret.Get(0).(string)
180+ }
181+ if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok {
182+ r1 = returnFunc(ctx, svgData)
183+ } else {
184+ r1 = ret.Error(1)
185+ }
186+ return r0, r1
187+}
188+
189+// MockDesktopIntegration_InstallIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallIcon'
190+type MockDesktopIntegration_InstallIcon_Call struct {
191+ *mock.Call
192+}
193+
194+// InstallIcon is a helper method to define mock.On call
195+// - ctx context.Context
196+// - svgData []byte
197+func (_e *MockDesktopIntegration_Expecter) InstallIcon(ctx any, svgData any) *MockDesktopIntegration_InstallIcon_Call {
198+ return &MockDesktopIntegration_InstallIcon_Call{Call: _e.mock.On("InstallIcon", ctx, svgData)}
199+}
200+
201+func (_c *MockDesktopIntegration_InstallIcon_Call) Run(run func(ctx context.Context, svgData []byte)) *MockDesktopIntegration_InstallIcon_Call {
202+ _c.Call.Run(func(args mock.Arguments) {
203+ var arg0 context.Context
204+ if args[0] != nil {
205+ arg0 = args[0].(context.Context)
206+ }
207+ var arg1 []byte
208+ if args[1] != nil {
209+ arg1 = args[1].([]byte)
210+ }
211+ run(
212+ arg0,
213+ arg1,
214+ )
215+ })
216+ return _c
217+}
218+
219+func (_c *MockDesktopIntegration_InstallIcon_Call) Return(s string, err error) *MockDesktopIntegration_InstallIcon_Call {
220+ _c.Call.Return(s, err)
221+ return _c
222+}
223+
224+func (_c *MockDesktopIntegration_InstallIcon_Call) RunAndReturn(run func(ctx context.Context, svgData []byte) (string, error)) *MockDesktopIntegration_InstallIcon_Call {
225+ _c.Call.Return(run)
226+ return _c
227+}
228+
229+// RemoveDesktopFile provides a mock function for the type MockDesktopIntegration
230+func (_mock *MockDesktopIntegration) RemoveDesktopFile(ctx context.Context) error {
231+ ret := _mock.Called(ctx)
232+
233+ if len(ret) == 0 {
234+ panic("no return value specified for RemoveDesktopFile")
235+ }
236+
237+ var r0 error
238+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
239+ r0 = returnFunc(ctx)
240+ } else {
241+ r0 = ret.Error(0)
242+ }
243+ return r0
244+}
245+
246+// MockDesktopIntegration_RemoveDesktopFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDesktopFile'
247+type MockDesktopIntegration_RemoveDesktopFile_Call struct {
248+ *mock.Call
249+}
250+
251+// RemoveDesktopFile is a helper method to define mock.On call
252+// - ctx context.Context
253+func (_e *MockDesktopIntegration_Expecter) RemoveDesktopFile(ctx any) *MockDesktopIntegration_RemoveDesktopFile_Call {
254+ return &MockDesktopIntegration_RemoveDesktopFile_Call{Call: _e.mock.On("RemoveDesktopFile", ctx)}
255+}
256+
257+func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_RemoveDesktopFile_Call {
258+ _c.Call.Run(func(args mock.Arguments) {
259+ var arg0 context.Context
260+ if args[0] != nil {
261+ arg0 = args[0].(context.Context)
262+ }
263+ run(
264+ arg0,
265+ )
266+ })
267+ return _c
268+}
269+
270+func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) Return(err error) *MockDesktopIntegration_RemoveDesktopFile_Call {
271+ _c.Call.Return(err)
272+ return _c
273+}
274+
275+func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_RemoveDesktopFile_Call {
276+ _c.Call.Return(run)
277+ return _c
278+}
279+
280+// RemoveIcon provides a mock function for the type MockDesktopIntegration
281+func (_mock *MockDesktopIntegration) RemoveIcon(ctx context.Context) error {
282+ ret := _mock.Called(ctx)
283+
284+ if len(ret) == 0 {
285+ panic("no return value specified for RemoveIcon")
286+ }
287+
288+ var r0 error
289+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
290+ r0 = returnFunc(ctx)
291+ } else {
292+ r0 = ret.Error(0)
293+ }
294+ return r0
295+}
296+
297+// MockDesktopIntegration_RemoveIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveIcon'
298+type MockDesktopIntegration_RemoveIcon_Call struct {
299+ *mock.Call
300+}
301+
302+// RemoveIcon is a helper method to define mock.On call
303+// - ctx context.Context
304+func (_e *MockDesktopIntegration_Expecter) RemoveIcon(ctx any) *MockDesktopIntegration_RemoveIcon_Call {
305+ return &MockDesktopIntegration_RemoveIcon_Call{Call: _e.mock.On("RemoveIcon", ctx)}
306+}
307+
308+func (_c *MockDesktopIntegration_RemoveIcon_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_RemoveIcon_Call {
309+ _c.Call.Run(func(args mock.Arguments) {
310+ var arg0 context.Context
311+ if args[0] != nil {
312+ arg0 = args[0].(context.Context)
313+ }
314+ run(
315+ arg0,
316+ )
317+ })
318+ return _c
319+}
320+
321+func (_c *MockDesktopIntegration_RemoveIcon_Call) Return(err error) *MockDesktopIntegration_RemoveIcon_Call {
322+ _c.Call.Return(err)
323+ return _c
324+}
325+
326+func (_c *MockDesktopIntegration_RemoveIcon_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_RemoveIcon_Call {
327+ _c.Call.Return(run)
328+ return _c
329+}
330+
331+// SetAsDefaultBrowser provides a mock function for the type MockDesktopIntegration
332+func (_mock *MockDesktopIntegration) SetAsDefaultBrowser(ctx context.Context) error {
333+ ret := _mock.Called(ctx)
334+
335+ if len(ret) == 0 {
336+ panic("no return value specified for SetAsDefaultBrowser")
337+ }
338+
339+ var r0 error
340+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
341+ r0 = returnFunc(ctx)
342+ } else {
343+ r0 = ret.Error(0)
344+ }
345+ return r0
346+}
347+
348+// MockDesktopIntegration_SetAsDefaultBrowser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAsDefaultBrowser'
349+type MockDesktopIntegration_SetAsDefaultBrowser_Call struct {
350+ *mock.Call
351+}
352+
353+// SetAsDefaultBrowser is a helper method to define mock.On call
354+// - ctx context.Context
355+func (_e *MockDesktopIntegration_Expecter) SetAsDefaultBrowser(ctx any) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
356+ return &MockDesktopIntegration_SetAsDefaultBrowser_Call{Call: _e.mock.On("SetAsDefaultBrowser", ctx)}
357+}
358+
359+func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
360+ _c.Call.Run(func(args mock.Arguments) {
361+ var arg0 context.Context
362+ if args[0] != nil {
363+ arg0 = args[0].(context.Context)
364+ }
365+ run(
366+ arg0,
367+ )
368+ })
369+ return _c
370+}
371+
372+func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) Return(err error) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
373+ _c.Call.Return(err)
374+ return _c
375+}
376+
377+func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
378+ _c.Call.Return(run)
379+ return _c
380+}
381+
382+// UnsetAsDefaultBrowser provides a mock function for the type MockDesktopIntegration
383+func (_mock *MockDesktopIntegration) UnsetAsDefaultBrowser(ctx context.Context) error {
384+ ret := _mock.Called(ctx)
385+
386+ if len(ret) == 0 {
387+ panic("no return value specified for UnsetAsDefaultBrowser")
388+ }
389+
390+ var r0 error
391+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
392+ r0 = returnFunc(ctx)
393+ } else {
394+ r0 = ret.Error(0)
395+ }
396+ return r0
397+}
398+
399+// MockDesktopIntegration_UnsetAsDefaultBrowser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsetAsDefaultBrowser'
400+type MockDesktopIntegration_UnsetAsDefaultBrowser_Call struct {
401+ *mock.Call
402+}
403+
404+// UnsetAsDefaultBrowser is a helper method to define mock.On call
405+// - ctx context.Context
406+func (_e *MockDesktopIntegration_Expecter) UnsetAsDefaultBrowser(ctx any) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
407+ return &MockDesktopIntegration_UnsetAsDefaultBrowser_Call{Call: _e.mock.On("UnsetAsDefaultBrowser", ctx)}
408+}
409+
410+func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
411+ _c.Call.Run(func(args mock.Arguments) {
412+ var arg0 context.Context
413+ if args[0] != nil {
414+ arg0 = args[0].(context.Context)
415+ }
416+ run(
417+ arg0,
418+ )
419+ })
420+ return _c
421+}
422+
423+func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) Return(err error) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
424+ _c.Call.Return(err)
425+ return _c
426+}
427+
428+func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
429+ _c.Call.Return(run)
430+ return _c
431+}
A internal/application/port/mocks/download.go +244 -0
@@ -0,0 +1,244 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockDownloadEventHandler creates a new instance of MockDownloadEventHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockDownloadEventHandler(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockDownloadEventHandler {
20+ mock := &MockDownloadEventHandler{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockDownloadEventHandler is an autogenerated mock type for the DownloadEventHandler type
29+type MockDownloadEventHandler struct {
30+ mock.Mock
31+}
32+
33+type MockDownloadEventHandler_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockDownloadEventHandler) EXPECT() *MockDownloadEventHandler_Expecter {
38+ return &MockDownloadEventHandler_Expecter{mock: &_m.Mock}
39+}
40+
41+// OnDownloadEvent provides a mock function for the type MockDownloadEventHandler
42+func (_mock *MockDownloadEventHandler) OnDownloadEvent(ctx context.Context, event port.DownloadEvent) {
43+ _mock.Called(ctx, event)
44+ return
45+}
46+
47+// MockDownloadEventHandler_OnDownloadEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnDownloadEvent'
48+type MockDownloadEventHandler_OnDownloadEvent_Call struct {
49+ *mock.Call
50+}
51+
52+// OnDownloadEvent is a helper method to define mock.On call
53+// - ctx context.Context
54+// - event port.DownloadEvent
55+func (_e *MockDownloadEventHandler_Expecter) OnDownloadEvent(ctx any, event any) *MockDownloadEventHandler_OnDownloadEvent_Call {
56+ return &MockDownloadEventHandler_OnDownloadEvent_Call{Call: _e.mock.On("OnDownloadEvent", ctx, event)}
57+}
58+
59+func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Run(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call {
60+ _c.Call.Run(func(args mock.Arguments) {
61+ var arg0 context.Context
62+ if args[0] != nil {
63+ arg0 = args[0].(context.Context)
64+ }
65+ var arg1 port.DownloadEvent
66+ if args[1] != nil {
67+ arg1 = args[1].(port.DownloadEvent)
68+ }
69+ run(
70+ arg0,
71+ arg1,
72+ )
73+ })
74+ return _c
75+}
76+
77+func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Return() *MockDownloadEventHandler_OnDownloadEvent_Call {
78+ _c.Call.Return()
79+ return _c
80+}
81+
82+func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) RunAndReturn(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call {
83+ _c.Run(run)
84+ return _c
85+}
86+
87+// NewMockDownloadResponse creates a new instance of MockDownloadResponse. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
88+// The first argument is typically a *testing.T value.
89+func NewMockDownloadResponse(t interface {
90+ mock.TestingT
91+ Cleanup(func())
92+}) *MockDownloadResponse {
93+ mock := &MockDownloadResponse{}
94+ mock.Mock.Test(t)
95+
96+ t.Cleanup(func() { mock.AssertExpectations(t) })
97+
98+ return mock
99+}
100+
101+// MockDownloadResponse is an autogenerated mock type for the DownloadResponse type
102+type MockDownloadResponse struct {
103+ mock.Mock
104+}
105+
106+type MockDownloadResponse_Expecter struct {
107+ mock *mock.Mock
108+}
109+
110+func (_m *MockDownloadResponse) EXPECT() *MockDownloadResponse_Expecter {
111+ return &MockDownloadResponse_Expecter{mock: &_m.Mock}
112+}
113+
114+// GetMimeType provides a mock function for the type MockDownloadResponse
115+func (_mock *MockDownloadResponse) GetMimeType() string {
116+ ret := _mock.Called()
117+
118+ if len(ret) == 0 {
119+ panic("no return value specified for GetMimeType")
120+ }
121+
122+ var r0 string
123+ if returnFunc, ok := ret.Get(0).(func() string); ok {
124+ r0 = returnFunc()
125+ } else {
126+ r0 = ret.Get(0).(string)
127+ }
128+ return r0
129+}
130+
131+// MockDownloadResponse_GetMimeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMimeType'
132+type MockDownloadResponse_GetMimeType_Call struct {
133+ *mock.Call
134+}
135+
136+// GetMimeType is a helper method to define mock.On call
137+func (_e *MockDownloadResponse_Expecter) GetMimeType() *MockDownloadResponse_GetMimeType_Call {
138+ return &MockDownloadResponse_GetMimeType_Call{Call: _e.mock.On("GetMimeType")}
139+}
140+
141+func (_c *MockDownloadResponse_GetMimeType_Call) Run(run func()) *MockDownloadResponse_GetMimeType_Call {
142+ _c.Call.Run(func(args mock.Arguments) {
143+ run()
144+ })
145+ return _c
146+}
147+
148+func (_c *MockDownloadResponse_GetMimeType_Call) Return(s string) *MockDownloadResponse_GetMimeType_Call {
149+ _c.Call.Return(s)
150+ return _c
151+}
152+
153+func (_c *MockDownloadResponse_GetMimeType_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetMimeType_Call {
154+ _c.Call.Return(run)
155+ return _c
156+}
157+
158+// GetSuggestedFilename provides a mock function for the type MockDownloadResponse
159+func (_mock *MockDownloadResponse) GetSuggestedFilename() string {
160+ ret := _mock.Called()
161+
162+ if len(ret) == 0 {
163+ panic("no return value specified for GetSuggestedFilename")
164+ }
165+
166+ var r0 string
167+ if returnFunc, ok := ret.Get(0).(func() string); ok {
168+ r0 = returnFunc()
169+ } else {
170+ r0 = ret.Get(0).(string)
171+ }
172+ return r0
173+}
174+
175+// MockDownloadResponse_GetSuggestedFilename_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSuggestedFilename'
176+type MockDownloadResponse_GetSuggestedFilename_Call struct {
177+ *mock.Call
178+}
179+
180+// GetSuggestedFilename is a helper method to define mock.On call
181+func (_e *MockDownloadResponse_Expecter) GetSuggestedFilename() *MockDownloadResponse_GetSuggestedFilename_Call {
182+ return &MockDownloadResponse_GetSuggestedFilename_Call{Call: _e.mock.On("GetSuggestedFilename")}
183+}
184+
185+func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Run(run func()) *MockDownloadResponse_GetSuggestedFilename_Call {
186+ _c.Call.Run(func(args mock.Arguments) {
187+ run()
188+ })
189+ return _c
190+}
191+
192+func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Return(s string) *MockDownloadResponse_GetSuggestedFilename_Call {
193+ _c.Call.Return(s)
194+ return _c
195+}
196+
197+func (_c *MockDownloadResponse_GetSuggestedFilename_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetSuggestedFilename_Call {
198+ _c.Call.Return(run)
199+ return _c
200+}
201+
202+// GetUri provides a mock function for the type MockDownloadResponse
203+func (_mock *MockDownloadResponse) GetUri() string {
204+ ret := _mock.Called()
205+
206+ if len(ret) == 0 {
207+ panic("no return value specified for GetUri")
208+ }
209+
210+ var r0 string
211+ if returnFunc, ok := ret.Get(0).(func() string); ok {
212+ r0 = returnFunc()
213+ } else {
214+ r0 = ret.Get(0).(string)
215+ }
216+ return r0
217+}
218+
219+// MockDownloadResponse_GetUri_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUri'
220+type MockDownloadResponse_GetUri_Call struct {
221+ *mock.Call
222+}
223+
224+// GetUri is a helper method to define mock.On call
225+func (_e *MockDownloadResponse_Expecter) GetUri() *MockDownloadResponse_GetUri_Call {
226+ return &MockDownloadResponse_GetUri_Call{Call: _e.mock.On("GetUri")}
227+}
228+
229+func (_c *MockDownloadResponse_GetUri_Call) Run(run func()) *MockDownloadResponse_GetUri_Call {
230+ _c.Call.Run(func(args mock.Arguments) {
231+ run()
232+ })
233+ return _c
234+}
235+
236+func (_c *MockDownloadResponse_GetUri_Call) Return(s string) *MockDownloadResponse_GetUri_Call {
237+ _c.Call.Return(s)
238+ return _c
239+}
240+
241+func (_c *MockDownloadResponse_GetUri_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetUri_Call {
242+ _c.Call.Return(run)
243+ return _c
244+}
A internal/application/port/mocks/engine.go +1658 -0
@@ -0,0 +1,1658 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+ "encoding/json"
10+
11+ "github.com/bnema/dumber/internal/application/port"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// NewMockMemoryPressureApplier creates a new instance of MockMemoryPressureApplier. 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.
17+func NewMockMemoryPressureApplier(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockMemoryPressureApplier {
21+ mock := &MockMemoryPressureApplier{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockMemoryPressureApplier is an autogenerated mock type for the MemoryPressureApplier type
30+type MockMemoryPressureApplier struct {
31+ mock.Mock
32+}
33+
34+type MockMemoryPressureApplier_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockMemoryPressureApplier) EXPECT() *MockMemoryPressureApplier_Expecter {
39+ return &MockMemoryPressureApplier_Expecter{mock: &_m.Mock}
40+}
41+
42+// ApplyNetworkProcessSettings provides a mock function for the type MockMemoryPressureApplier
43+func (_mock *MockMemoryPressureApplier) ApplyNetworkProcessSettings(ctx context.Context, cfg *port.MemoryPressureConfig) error {
44+ ret := _mock.Called(ctx, cfg)
45+
46+ if len(ret) == 0 {
47+ panic("no return value specified for ApplyNetworkProcessSettings")
48+ }
49+
50+ var r0 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) error); ok {
52+ r0 = returnFunc(ctx, cfg)
53+ } else {
54+ r0 = ret.Error(0)
55+ }
56+ return r0
57+}
58+
59+// MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyNetworkProcessSettings'
60+type MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call struct {
61+ *mock.Call
62+}
63+
64+// ApplyNetworkProcessSettings is a helper method to define mock.On call
65+// - ctx context.Context
66+// - cfg *port.MemoryPressureConfig
67+func (_e *MockMemoryPressureApplier_Expecter) ApplyNetworkProcessSettings(ctx any, cfg any) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
68+ return &MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call{Call: _e.mock.On("ApplyNetworkProcessSettings", ctx, cfg)}
69+}
70+
71+func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) Run(run func(ctx context.Context, cfg *port.MemoryPressureConfig)) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ var arg1 *port.MemoryPressureConfig
78+ if args[1] != nil {
79+ arg1 = args[1].(*port.MemoryPressureConfig)
80+ }
81+ run(
82+ arg0,
83+ arg1,
84+ )
85+ })
86+ return _c
87+}
88+
89+func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) Return(err error) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
90+ _c.Call.Return(err)
91+ return _c
92+}
93+
94+func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) RunAndReturn(run func(ctx context.Context, cfg *port.MemoryPressureConfig) error) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
95+ _c.Call.Return(run)
96+ return _c
97+}
98+
99+// ApplyWebProcessSettings provides a mock function for the type MockMemoryPressureApplier
100+func (_mock *MockMemoryPressureApplier) ApplyWebProcessSettings(ctx context.Context, cfg *port.MemoryPressureConfig) (any, error) {
101+ ret := _mock.Called(ctx, cfg)
102+
103+ if len(ret) == 0 {
104+ panic("no return value specified for ApplyWebProcessSettings")
105+ }
106+
107+ var r0 any
108+ var r1 error
109+ if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) (any, error)); ok {
110+ return returnFunc(ctx, cfg)
111+ }
112+ if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) any); ok {
113+ r0 = returnFunc(ctx, cfg)
114+ } else {
115+ if ret.Get(0) != nil {
116+ r0 = ret.Get(0).(any)
117+ }
118+ }
119+ if returnFunc, ok := ret.Get(1).(func(context.Context, *port.MemoryPressureConfig) error); ok {
120+ r1 = returnFunc(ctx, cfg)
121+ } else {
122+ r1 = ret.Error(1)
123+ }
124+ return r0, r1
125+}
126+
127+// MockMemoryPressureApplier_ApplyWebProcessSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyWebProcessSettings'
128+type MockMemoryPressureApplier_ApplyWebProcessSettings_Call struct {
129+ *mock.Call
130+}
131+
132+// ApplyWebProcessSettings is a helper method to define mock.On call
133+// - ctx context.Context
134+// - cfg *port.MemoryPressureConfig
135+func (_e *MockMemoryPressureApplier_Expecter) ApplyWebProcessSettings(ctx any, cfg any) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
136+ return &MockMemoryPressureApplier_ApplyWebProcessSettings_Call{Call: _e.mock.On("ApplyWebProcessSettings", ctx, cfg)}
137+}
138+
139+func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) Run(run func(ctx context.Context, cfg *port.MemoryPressureConfig)) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
140+ _c.Call.Run(func(args mock.Arguments) {
141+ var arg0 context.Context
142+ if args[0] != nil {
143+ arg0 = args[0].(context.Context)
144+ }
145+ var arg1 *port.MemoryPressureConfig
146+ if args[1] != nil {
147+ arg1 = args[1].(*port.MemoryPressureConfig)
148+ }
149+ run(
150+ arg0,
151+ arg1,
152+ )
153+ })
154+ return _c
155+}
156+
157+func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) Return(v any, err error) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
158+ _c.Call.Return(v, err)
159+ return _c
160+}
161+
162+func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) RunAndReturn(run func(ctx context.Context, cfg *port.MemoryPressureConfig) (any, error)) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
163+ _c.Call.Return(run)
164+ return _c
165+}
166+
167+// NewMockEngine creates a new instance of MockEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
168+// The first argument is typically a *testing.T value.
169+func NewMockEngine(t interface {
170+ mock.TestingT
171+ Cleanup(func())
172+}) *MockEngine {
173+ mock := &MockEngine{}
174+ mock.Mock.Test(t)
175+
176+ t.Cleanup(func() { mock.AssertExpectations(t) })
177+
178+ return mock
179+}
180+
181+// MockEngine is an autogenerated mock type for the Engine type
182+type MockEngine struct {
183+ mock.Mock
184+}
185+
186+type MockEngine_Expecter struct {
187+ mock *mock.Mock
188+}
189+
190+func (_m *MockEngine) EXPECT() *MockEngine_Expecter {
191+ return &MockEngine_Expecter{mock: &_m.Mock}
192+}
193+
194+// Close provides a mock function for the type MockEngine
195+func (_mock *MockEngine) Close() error {
196+ ret := _mock.Called()
197+
198+ if len(ret) == 0 {
199+ panic("no return value specified for Close")
200+ }
201+
202+ var r0 error
203+ if returnFunc, ok := ret.Get(0).(func() error); ok {
204+ r0 = returnFunc()
205+ } else {
206+ r0 = ret.Error(0)
207+ }
208+ return r0
209+}
210+
211+// MockEngine_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
212+type MockEngine_Close_Call struct {
213+ *mock.Call
214+}
215+
216+// Close is a helper method to define mock.On call
217+func (_e *MockEngine_Expecter) Close() *MockEngine_Close_Call {
218+ return &MockEngine_Close_Call{Call: _e.mock.On("Close")}
219+}
220+
221+func (_c *MockEngine_Close_Call) Run(run func()) *MockEngine_Close_Call {
222+ _c.Call.Run(func(args mock.Arguments) {
223+ run()
224+ })
225+ return _c
226+}
227+
228+func (_c *MockEngine_Close_Call) Return(err error) *MockEngine_Close_Call {
229+ _c.Call.Return(err)
230+ return _c
231+}
232+
233+func (_c *MockEngine_Close_Call) RunAndReturn(run func() error) *MockEngine_Close_Call {
234+ _c.Call.Return(run)
235+ return _c
236+}
237+
238+// ConfigureDownloads provides a mock function for the type MockEngine
239+func (_mock *MockEngine) ConfigureDownloads(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer) error {
240+ ret := _mock.Called(ctx, downloadPath, eventHandler, preparer)
241+
242+ if len(ret) == 0 {
243+ panic("no return value specified for ConfigureDownloads")
244+ }
245+
246+ var r0 error
247+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, port.DownloadEventHandler, port.DownloadPreparer) error); ok {
248+ r0 = returnFunc(ctx, downloadPath, eventHandler, preparer)
249+ } else {
250+ r0 = ret.Error(0)
251+ }
252+ return r0
253+}
254+
255+// MockEngine_ConfigureDownloads_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigureDownloads'
256+type MockEngine_ConfigureDownloads_Call struct {
257+ *mock.Call
258+}
259+
260+// ConfigureDownloads is a helper method to define mock.On call
261+// - ctx context.Context
262+// - downloadPath string
263+// - eventHandler port.DownloadEventHandler
264+// - preparer port.DownloadPreparer
265+func (_e *MockEngine_Expecter) ConfigureDownloads(ctx any, downloadPath any, eventHandler any, preparer any) *MockEngine_ConfigureDownloads_Call {
266+ return &MockEngine_ConfigureDownloads_Call{Call: _e.mock.On("ConfigureDownloads", ctx, downloadPath, eventHandler, preparer)}
267+}
268+
269+func (_c *MockEngine_ConfigureDownloads_Call) Run(run func(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer)) *MockEngine_ConfigureDownloads_Call {
270+ _c.Call.Run(func(args mock.Arguments) {
271+ var arg0 context.Context
272+ if args[0] != nil {
273+ arg0 = args[0].(context.Context)
274+ }
275+ var arg1 string
276+ if args[1] != nil {
277+ arg1 = args[1].(string)
278+ }
279+ var arg2 port.DownloadEventHandler
280+ if args[2] != nil {
281+ arg2 = args[2].(port.DownloadEventHandler)
282+ }
283+ var arg3 port.DownloadPreparer
284+ if args[3] != nil {
285+ arg3 = args[3].(port.DownloadPreparer)
286+ }
287+ run(
288+ arg0,
289+ arg1,
290+ arg2,
291+ arg3,
292+ )
293+ })
294+ return _c
295+}
296+
297+func (_c *MockEngine_ConfigureDownloads_Call) Return(err error) *MockEngine_ConfigureDownloads_Call {
298+ _c.Call.Return(err)
299+ return _c
300+}
301+
302+func (_c *MockEngine_ConfigureDownloads_Call) RunAndReturn(run func(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer) error) *MockEngine_ConfigureDownloads_Call {
303+ _c.Call.Return(run)
304+ return _c
305+}
306+
307+// ContentInjector provides a mock function for the type MockEngine
308+func (_mock *MockEngine) ContentInjector() port.ContentInjector {
309+ ret := _mock.Called()
310+
311+ if len(ret) == 0 {
312+ panic("no return value specified for ContentInjector")
313+ }
314+
315+ var r0 port.ContentInjector
316+ if returnFunc, ok := ret.Get(0).(func() port.ContentInjector); ok {
317+ r0 = returnFunc()
318+ } else {
319+ if ret.Get(0) != nil {
320+ r0 = ret.Get(0).(port.ContentInjector)
321+ }
322+ }
323+ return r0
324+}
325+
326+// MockEngine_ContentInjector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContentInjector'
327+type MockEngine_ContentInjector_Call struct {
328+ *mock.Call
329+}
330+
331+// ContentInjector is a helper method to define mock.On call
332+func (_e *MockEngine_Expecter) ContentInjector() *MockEngine_ContentInjector_Call {
333+ return &MockEngine_ContentInjector_Call{Call: _e.mock.On("ContentInjector")}
334+}
335+
336+func (_c *MockEngine_ContentInjector_Call) Run(run func()) *MockEngine_ContentInjector_Call {
337+ _c.Call.Run(func(args mock.Arguments) {
338+ run()
339+ })
340+ return _c
341+}
342+
343+func (_c *MockEngine_ContentInjector_Call) Return(contentInjector port.ContentInjector) *MockEngine_ContentInjector_Call {
344+ _c.Call.Return(contentInjector)
345+ return _c
346+}
347+
348+func (_c *MockEngine_ContentInjector_Call) RunAndReturn(run func() port.ContentInjector) *MockEngine_ContentInjector_Call {
349+ _c.Call.Return(run)
350+ return _c
351+}
352+
353+// Factory provides a mock function for the type MockEngine
354+func (_mock *MockEngine) Factory() port.WebViewFactory {
355+ ret := _mock.Called()
356+
357+ if len(ret) == 0 {
358+ panic("no return value specified for Factory")
359+ }
360+
361+ var r0 port.WebViewFactory
362+ if returnFunc, ok := ret.Get(0).(func() port.WebViewFactory); ok {
363+ r0 = returnFunc()
364+ } else {
365+ if ret.Get(0) != nil {
366+ r0 = ret.Get(0).(port.WebViewFactory)
367+ }
368+ }
369+ return r0
370+}
371+
372+// MockEngine_Factory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Factory'
373+type MockEngine_Factory_Call struct {
374+ *mock.Call
375+}
376+
377+// Factory is a helper method to define mock.On call
378+func (_e *MockEngine_Expecter) Factory() *MockEngine_Factory_Call {
379+ return &MockEngine_Factory_Call{Call: _e.mock.On("Factory")}
380+}
381+
382+func (_c *MockEngine_Factory_Call) Run(run func()) *MockEngine_Factory_Call {
383+ _c.Call.Run(func(args mock.Arguments) {
384+ run()
385+ })
386+ return _c
387+}
388+
389+func (_c *MockEngine_Factory_Call) Return(webViewFactory port.WebViewFactory) *MockEngine_Factory_Call {
390+ _c.Call.Return(webViewFactory)
391+ return _c
392+}
393+
394+func (_c *MockEngine_Factory_Call) RunAndReturn(run func() port.WebViewFactory) *MockEngine_Factory_Call {
395+ _c.Call.Return(run)
396+ return _c
397+}
398+
399+// FaviconDatabase provides a mock function for the type MockEngine
400+func (_mock *MockEngine) FaviconDatabase() port.FaviconDatabase {
401+ ret := _mock.Called()
402+
403+ if len(ret) == 0 {
404+ panic("no return value specified for FaviconDatabase")
405+ }
406+
407+ var r0 port.FaviconDatabase
408+ if returnFunc, ok := ret.Get(0).(func() port.FaviconDatabase); ok {
409+ r0 = returnFunc()
410+ } else {
411+ if ret.Get(0) != nil {
412+ r0 = ret.Get(0).(port.FaviconDatabase)
413+ }
414+ }
415+ return r0
416+}
417+
418+// MockEngine_FaviconDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FaviconDatabase'
419+type MockEngine_FaviconDatabase_Call struct {
420+ *mock.Call
421+}
422+
423+// FaviconDatabase is a helper method to define mock.On call
424+func (_e *MockEngine_Expecter) FaviconDatabase() *MockEngine_FaviconDatabase_Call {
425+ return &MockEngine_FaviconDatabase_Call{Call: _e.mock.On("FaviconDatabase")}
426+}
427+
428+func (_c *MockEngine_FaviconDatabase_Call) Run(run func()) *MockEngine_FaviconDatabase_Call {
429+ _c.Call.Run(func(args mock.Arguments) {
430+ run()
431+ })
432+ return _c
433+}
434+
435+func (_c *MockEngine_FaviconDatabase_Call) Return(faviconDatabase port.FaviconDatabase) *MockEngine_FaviconDatabase_Call {
436+ _c.Call.Return(faviconDatabase)
437+ return _c
438+}
439+
440+func (_c *MockEngine_FaviconDatabase_Call) RunAndReturn(run func() port.FaviconDatabase) *MockEngine_FaviconDatabase_Call {
441+ _c.Call.Return(run)
442+ return _c
443+}
444+
445+// FilterApplier provides a mock function for the type MockEngine
446+func (_mock *MockEngine) FilterApplier() port.FilterApplier {
447+ ret := _mock.Called()
448+
449+ if len(ret) == 0 {
450+ panic("no return value specified for FilterApplier")
451+ }
452+
453+ var r0 port.FilterApplier
454+ if returnFunc, ok := ret.Get(0).(func() port.FilterApplier); ok {
455+ r0 = returnFunc()
456+ } else {
457+ if ret.Get(0) != nil {
458+ r0 = ret.Get(0).(port.FilterApplier)
459+ }
460+ }
461+ return r0
462+}
463+
464+// MockEngine_FilterApplier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterApplier'
465+type MockEngine_FilterApplier_Call struct {
466+ *mock.Call
467+}
468+
469+// FilterApplier is a helper method to define mock.On call
470+func (_e *MockEngine_Expecter) FilterApplier() *MockEngine_FilterApplier_Call {
471+ return &MockEngine_FilterApplier_Call{Call: _e.mock.On("FilterApplier")}
472+}
473+
474+func (_c *MockEngine_FilterApplier_Call) Run(run func()) *MockEngine_FilterApplier_Call {
475+ _c.Call.Run(func(args mock.Arguments) {
476+ run()
477+ })
478+ return _c
479+}
480+
481+func (_c *MockEngine_FilterApplier_Call) Return(filterApplier port.FilterApplier) *MockEngine_FilterApplier_Call {
482+ _c.Call.Return(filterApplier)
483+ return _c
484+}
485+
486+func (_c *MockEngine_FilterApplier_Call) RunAndReturn(run func() port.FilterApplier) *MockEngine_FilterApplier_Call {
487+ _c.Call.Return(run)
488+ return _c
489+}
490+
491+// InternalSchemePath provides a mock function for the type MockEngine
492+func (_mock *MockEngine) InternalSchemePath() string {
493+ ret := _mock.Called()
494+
495+ if len(ret) == 0 {
496+ panic("no return value specified for InternalSchemePath")
497+ }
498+
499+ var r0 string
500+ if returnFunc, ok := ret.Get(0).(func() string); ok {
501+ r0 = returnFunc()
502+ } else {
503+ r0 = ret.Get(0).(string)
504+ }
505+ return r0
506+}
507+
508+// MockEngine_InternalSchemePath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InternalSchemePath'
509+type MockEngine_InternalSchemePath_Call struct {
510+ *mock.Call
511+}
512+
513+// InternalSchemePath is a helper method to define mock.On call
514+func (_e *MockEngine_Expecter) InternalSchemePath() *MockEngine_InternalSchemePath_Call {
515+ return &MockEngine_InternalSchemePath_Call{Call: _e.mock.On("InternalSchemePath")}
516+}
517+
518+func (_c *MockEngine_InternalSchemePath_Call) Run(run func()) *MockEngine_InternalSchemePath_Call {
519+ _c.Call.Run(func(args mock.Arguments) {
520+ run()
521+ })
522+ return _c
523+}
524+
525+func (_c *MockEngine_InternalSchemePath_Call) Return(s string) *MockEngine_InternalSchemePath_Call {
526+ _c.Call.Return(s)
527+ return _c
528+}
529+
530+func (_c *MockEngine_InternalSchemePath_Call) RunAndReturn(run func() string) *MockEngine_InternalSchemePath_Call {
531+ _c.Call.Return(run)
532+ return _c
533+}
534+
535+// OnToolkitReady provides a mock function for the type MockEngine
536+func (_mock *MockEngine) OnToolkitReady(ctx context.Context) error {
537+ ret := _mock.Called(ctx)
538+
539+ if len(ret) == 0 {
540+ panic("no return value specified for OnToolkitReady")
541+ }
542+
543+ var r0 error
544+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
545+ r0 = returnFunc(ctx)
546+ } else {
547+ r0 = ret.Error(0)
548+ }
549+ return r0
550+}
551+
552+// MockEngine_OnToolkitReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnToolkitReady'
553+type MockEngine_OnToolkitReady_Call struct {
554+ *mock.Call
555+}
556+
557+// OnToolkitReady is a helper method to define mock.On call
558+// - ctx context.Context
559+func (_e *MockEngine_Expecter) OnToolkitReady(ctx any) *MockEngine_OnToolkitReady_Call {
560+ return &MockEngine_OnToolkitReady_Call{Call: _e.mock.On("OnToolkitReady", ctx)}
561+}
562+
563+func (_c *MockEngine_OnToolkitReady_Call) Run(run func(ctx context.Context)) *MockEngine_OnToolkitReady_Call {
564+ _c.Call.Run(func(args mock.Arguments) {
565+ var arg0 context.Context
566+ if args[0] != nil {
567+ arg0 = args[0].(context.Context)
568+ }
569+ run(
570+ arg0,
571+ )
572+ })
573+ return _c
574+}
575+
576+func (_c *MockEngine_OnToolkitReady_Call) Return(err error) *MockEngine_OnToolkitReady_Call {
577+ _c.Call.Return(err)
578+ return _c
579+}
580+
581+func (_c *MockEngine_OnToolkitReady_Call) RunAndReturn(run func(ctx context.Context) error) *MockEngine_OnToolkitReady_Call {
582+ _c.Call.Return(run)
583+ return _c
584+}
585+
586+// Pool provides a mock function for the type MockEngine
587+func (_mock *MockEngine) Pool() port.WebViewPool {
588+ ret := _mock.Called()
589+
590+ if len(ret) == 0 {
591+ panic("no return value specified for Pool")
592+ }
593+
594+ var r0 port.WebViewPool
595+ if returnFunc, ok := ret.Get(0).(func() port.WebViewPool); ok {
596+ r0 = returnFunc()
597+ } else {
598+ if ret.Get(0) != nil {
599+ r0 = ret.Get(0).(port.WebViewPool)
600+ }
601+ }
602+ return r0
603+}
604+
605+// MockEngine_Pool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pool'
606+type MockEngine_Pool_Call struct {
607+ *mock.Call
608+}
609+
610+// Pool is a helper method to define mock.On call
611+func (_e *MockEngine_Expecter) Pool() *MockEngine_Pool_Call {
612+ return &MockEngine_Pool_Call{Call: _e.mock.On("Pool")}
613+}
614+
615+func (_c *MockEngine_Pool_Call) Run(run func()) *MockEngine_Pool_Call {
616+ _c.Call.Run(func(args mock.Arguments) {
617+ run()
618+ })
619+ return _c
620+}
621+
622+func (_c *MockEngine_Pool_Call) Return(webViewPool port.WebViewPool) *MockEngine_Pool_Call {
623+ _c.Call.Return(webViewPool)
624+ return _c
625+}
626+
627+func (_c *MockEngine_Pool_Call) RunAndReturn(run func() port.WebViewPool) *MockEngine_Pool_Call {
628+ _c.Call.Return(run)
629+ return _c
630+}
631+
632+// RegisterAccentHandlers provides a mock function for the type MockEngine
633+func (_mock *MockEngine) RegisterAccentHandlers(ctx context.Context, handler port.AccentKeyHandler) error {
634+ ret := _mock.Called(ctx, handler)
635+
636+ if len(ret) == 0 {
637+ panic("no return value specified for RegisterAccentHandlers")
638+ }
639+
640+ var r0 error
641+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.AccentKeyHandler) error); ok {
642+ r0 = returnFunc(ctx, handler)
643+ } else {
644+ r0 = ret.Error(0)
645+ }
646+ return r0
647+}
648+
649+// MockEngine_RegisterAccentHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterAccentHandlers'
650+type MockEngine_RegisterAccentHandlers_Call struct {
651+ *mock.Call
652+}
653+
654+// RegisterAccentHandlers is a helper method to define mock.On call
655+// - ctx context.Context
656+// - handler port.AccentKeyHandler
657+func (_e *MockEngine_Expecter) RegisterAccentHandlers(ctx any, handler any) *MockEngine_RegisterAccentHandlers_Call {
658+ return &MockEngine_RegisterAccentHandlers_Call{Call: _e.mock.On("RegisterAccentHandlers", ctx, handler)}
659+}
660+
661+func (_c *MockEngine_RegisterAccentHandlers_Call) Run(run func(ctx context.Context, handler port.AccentKeyHandler)) *MockEngine_RegisterAccentHandlers_Call {
662+ _c.Call.Run(func(args mock.Arguments) {
663+ var arg0 context.Context
664+ if args[0] != nil {
665+ arg0 = args[0].(context.Context)
666+ }
667+ var arg1 port.AccentKeyHandler
668+ if args[1] != nil {
669+ arg1 = args[1].(port.AccentKeyHandler)
670+ }
671+ run(
672+ arg0,
673+ arg1,
674+ )
675+ })
676+ return _c
677+}
678+
679+func (_c *MockEngine_RegisterAccentHandlers_Call) Return(err error) *MockEngine_RegisterAccentHandlers_Call {
680+ _c.Call.Return(err)
681+ return _c
682+}
683+
684+func (_c *MockEngine_RegisterAccentHandlers_Call) RunAndReturn(run func(ctx context.Context, handler port.AccentKeyHandler) error) *MockEngine_RegisterAccentHandlers_Call {
685+ _c.Call.Return(run)
686+ return _c
687+}
688+
689+// RegisterHandlers provides a mock function for the type MockEngine
690+func (_mock *MockEngine) RegisterHandlers(ctx context.Context, deps port.HandlerDependencies) error {
691+ ret := _mock.Called(ctx, deps)
692+
693+ if len(ret) == 0 {
694+ panic("no return value specified for RegisterHandlers")
695+ }
696+
697+ var r0 error
698+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.HandlerDependencies) error); ok {
699+ r0 = returnFunc(ctx, deps)
700+ } else {
701+ r0 = ret.Error(0)
702+ }
703+ return r0
704+}
705+
706+// MockEngine_RegisterHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandlers'
707+type MockEngine_RegisterHandlers_Call struct {
708+ *mock.Call
709+}
710+
711+// RegisterHandlers is a helper method to define mock.On call
712+// - ctx context.Context
713+// - deps port.HandlerDependencies
714+func (_e *MockEngine_Expecter) RegisterHandlers(ctx any, deps any) *MockEngine_RegisterHandlers_Call {
715+ return &MockEngine_RegisterHandlers_Call{Call: _e.mock.On("RegisterHandlers", ctx, deps)}
716+}
717+
718+func (_c *MockEngine_RegisterHandlers_Call) Run(run func(ctx context.Context, deps port.HandlerDependencies)) *MockEngine_RegisterHandlers_Call {
719+ _c.Call.Run(func(args mock.Arguments) {
720+ var arg0 context.Context
721+ if args[0] != nil {
722+ arg0 = args[0].(context.Context)
723+ }
724+ var arg1 port.HandlerDependencies
725+ if args[1] != nil {
726+ arg1 = args[1].(port.HandlerDependencies)
727+ }
728+ run(
729+ arg0,
730+ arg1,
731+ )
732+ })
733+ return _c
734+}
735+
736+func (_c *MockEngine_RegisterHandlers_Call) Return(err error) *MockEngine_RegisterHandlers_Call {
737+ _c.Call.Return(err)
738+ return _c
739+}
740+
741+func (_c *MockEngine_RegisterHandlers_Call) RunAndReturn(run func(ctx context.Context, deps port.HandlerDependencies) error) *MockEngine_RegisterHandlers_Call {
742+ _c.Call.Return(run)
743+ return _c
744+}
745+
746+// SetHandlerContext provides a mock function for the type MockEngine
747+func (_mock *MockEngine) SetHandlerContext(ctx context.Context) {
748+ _mock.Called(ctx)
749+ return
750+}
751+
752+// MockEngine_SetHandlerContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHandlerContext'
753+type MockEngine_SetHandlerContext_Call struct {
754+ *mock.Call
755+}
756+
757+// SetHandlerContext is a helper method to define mock.On call
758+// - ctx context.Context
759+func (_e *MockEngine_Expecter) SetHandlerContext(ctx any) *MockEngine_SetHandlerContext_Call {
760+ return &MockEngine_SetHandlerContext_Call{Call: _e.mock.On("SetHandlerContext", ctx)}
761+}
762+
763+func (_c *MockEngine_SetHandlerContext_Call) Run(run func(ctx context.Context)) *MockEngine_SetHandlerContext_Call {
764+ _c.Call.Run(func(args mock.Arguments) {
765+ var arg0 context.Context
766+ if args[0] != nil {
767+ arg0 = args[0].(context.Context)
768+ }
769+ run(
770+ arg0,
771+ )
772+ })
773+ return _c
774+}
775+
776+func (_c *MockEngine_SetHandlerContext_Call) Return() *MockEngine_SetHandlerContext_Call {
777+ _c.Call.Return()
778+ return _c
779+}
780+
781+func (_c *MockEngine_SetHandlerContext_Call) RunAndReturn(run func(ctx context.Context)) *MockEngine_SetHandlerContext_Call {
782+ _c.Run(run)
783+ return _c
784+}
785+
786+// SettingsApplier provides a mock function for the type MockEngine
787+func (_mock *MockEngine) SettingsApplier() port.SettingsApplier {
788+ ret := _mock.Called()
789+
790+ if len(ret) == 0 {
791+ panic("no return value specified for SettingsApplier")
792+ }
793+
794+ var r0 port.SettingsApplier
795+ if returnFunc, ok := ret.Get(0).(func() port.SettingsApplier); ok {
796+ r0 = returnFunc()
797+ } else {
798+ if ret.Get(0) != nil {
799+ r0 = ret.Get(0).(port.SettingsApplier)
800+ }
801+ }
802+ return r0
803+}
804+
805+// MockEngine_SettingsApplier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SettingsApplier'
806+type MockEngine_SettingsApplier_Call struct {
807+ *mock.Call
808+}
809+
810+// SettingsApplier is a helper method to define mock.On call
811+func (_e *MockEngine_Expecter) SettingsApplier() *MockEngine_SettingsApplier_Call {
812+ return &MockEngine_SettingsApplier_Call{Call: _e.mock.On("SettingsApplier")}
813+}
814+
815+func (_c *MockEngine_SettingsApplier_Call) Run(run func()) *MockEngine_SettingsApplier_Call {
816+ _c.Call.Run(func(args mock.Arguments) {
817+ run()
818+ })
819+ return _c
820+}
821+
822+func (_c *MockEngine_SettingsApplier_Call) Return(settingsApplier port.SettingsApplier) *MockEngine_SettingsApplier_Call {
823+ _c.Call.Return(settingsApplier)
824+ return _c
825+}
826+
827+func (_c *MockEngine_SettingsApplier_Call) RunAndReturn(run func() port.SettingsApplier) *MockEngine_SettingsApplier_Call {
828+ _c.Call.Return(run)
829+ return _c
830+}
831+
832+// UpdateAppearance provides a mock function for the type MockEngine
833+func (_mock *MockEngine) UpdateAppearance(ctx context.Context, r float64, g float64, b float64, alpha float64) error {
834+ ret := _mock.Called(ctx, r, g, b, alpha)
835+
836+ if len(ret) == 0 {
837+ panic("no return value specified for UpdateAppearance")
838+ }
839+
840+ var r0 error
841+ if returnFunc, ok := ret.Get(0).(func(context.Context, float64, float64, float64, float64) error); ok {
842+ r0 = returnFunc(ctx, r, g, b, alpha)
843+ } else {
844+ r0 = ret.Error(0)
845+ }
846+ return r0
847+}
848+
849+// MockEngine_UpdateAppearance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAppearance'
850+type MockEngine_UpdateAppearance_Call struct {
851+ *mock.Call
852+}
853+
854+// UpdateAppearance is a helper method to define mock.On call
855+// - ctx context.Context
856+// - r float64
857+// - g float64
858+// - b float64
859+// - alpha float64
860+func (_e *MockEngine_Expecter) UpdateAppearance(ctx any, r any, g any, b any, alpha any) *MockEngine_UpdateAppearance_Call {
861+ return &MockEngine_UpdateAppearance_Call{Call: _e.mock.On("UpdateAppearance", ctx, r, g, b, alpha)}
862+}
863+
864+func (_c *MockEngine_UpdateAppearance_Call) Run(run func(ctx context.Context, r float64, g float64, b float64, alpha float64)) *MockEngine_UpdateAppearance_Call {
865+ _c.Call.Run(func(args mock.Arguments) {
866+ var arg0 context.Context
867+ if args[0] != nil {
868+ arg0 = args[0].(context.Context)
869+ }
870+ var arg1 float64
871+ if args[1] != nil {
872+ arg1 = args[1].(float64)
873+ }
874+ var arg2 float64
875+ if args[2] != nil {
876+ arg2 = args[2].(float64)
877+ }
878+ var arg3 float64
879+ if args[3] != nil {
880+ arg3 = args[3].(float64)
881+ }
882+ var arg4 float64
883+ if args[4] != nil {
884+ arg4 = args[4].(float64)
885+ }
886+ run(
887+ arg0,
888+ arg1,
889+ arg2,
890+ arg3,
891+ arg4,
892+ )
893+ })
894+ return _c
895+}
896+
897+func (_c *MockEngine_UpdateAppearance_Call) Return(err error) *MockEngine_UpdateAppearance_Call {
898+ _c.Call.Return(err)
899+ return _c
900+}
901+
902+func (_c *MockEngine_UpdateAppearance_Call) RunAndReturn(run func(ctx context.Context, r float64, g float64, b float64, alpha float64) error) *MockEngine_UpdateAppearance_Call {
903+ _c.Call.Return(run)
904+ return _c
905+}
906+
907+// UpdateSettings provides a mock function for the type MockEngine
908+func (_mock *MockEngine) UpdateSettings(ctx context.Context, update port.EngineSettingsUpdate) error {
909+ ret := _mock.Called(ctx, update)
910+
911+ if len(ret) == 0 {
912+ panic("no return value specified for UpdateSettings")
913+ }
914+
915+ var r0 error
916+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.EngineSettingsUpdate) error); ok {
917+ r0 = returnFunc(ctx, update)
918+ } else {
919+ r0 = ret.Error(0)
920+ }
921+ return r0
922+}
923+
924+// MockEngine_UpdateSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSettings'
925+type MockEngine_UpdateSettings_Call struct {
926+ *mock.Call
927+}
928+
929+// UpdateSettings is a helper method to define mock.On call
930+// - ctx context.Context
931+// - update port.EngineSettingsUpdate
932+func (_e *MockEngine_Expecter) UpdateSettings(ctx any, update any) *MockEngine_UpdateSettings_Call {
933+ return &MockEngine_UpdateSettings_Call{Call: _e.mock.On("UpdateSettings", ctx, update)}
934+}
935+
936+func (_c *MockEngine_UpdateSettings_Call) Run(run func(ctx context.Context, update port.EngineSettingsUpdate)) *MockEngine_UpdateSettings_Call {
937+ _c.Call.Run(func(args mock.Arguments) {
938+ var arg0 context.Context
939+ if args[0] != nil {
940+ arg0 = args[0].(context.Context)
941+ }
942+ var arg1 port.EngineSettingsUpdate
943+ if args[1] != nil {
944+ arg1 = args[1].(port.EngineSettingsUpdate)
945+ }
946+ run(
947+ arg0,
948+ arg1,
949+ )
950+ })
951+ return _c
952+}
953+
954+func (_c *MockEngine_UpdateSettings_Call) Return(err error) *MockEngine_UpdateSettings_Call {
955+ _c.Call.Return(err)
956+ return _c
957+}
958+
959+func (_c *MockEngine_UpdateSettings_Call) RunAndReturn(run func(ctx context.Context, update port.EngineSettingsUpdate) error) *MockEngine_UpdateSettings_Call {
960+ _c.Call.Return(run)
961+ return _c
962+}
963+
964+// NewMockWebUIMessageHandler creates a new instance of MockWebUIMessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
965+// The first argument is typically a *testing.T value.
966+func NewMockWebUIMessageHandler(t interface {
967+ mock.TestingT
968+ Cleanup(func())
969+}) *MockWebUIMessageHandler {
970+ mock := &MockWebUIMessageHandler{}
971+ mock.Mock.Test(t)
972+
973+ t.Cleanup(func() { mock.AssertExpectations(t) })
974+
975+ return mock
976+}
977+
978+// MockWebUIMessageHandler is an autogenerated mock type for the WebUIMessageHandler type
979+type MockWebUIMessageHandler struct {
980+ mock.Mock
981+}
982+
983+type MockWebUIMessageHandler_Expecter struct {
984+ mock *mock.Mock
985+}
986+
987+func (_m *MockWebUIMessageHandler) EXPECT() *MockWebUIMessageHandler_Expecter {
988+ return &MockWebUIMessageHandler_Expecter{mock: &_m.Mock}
989+}
990+
991+// Handle provides a mock function for the type MockWebUIMessageHandler
992+func (_mock *MockWebUIMessageHandler) Handle(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage) (any, error) {
993+ ret := _mock.Called(ctx, webviewID, payload)
994+
995+ if len(ret) == 0 {
996+ panic("no return value specified for Handle")
997+ }
998+
999+ var r0 any
1000+ var r1 error
1001+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID, json.RawMessage) (any, error)); ok {
1002+ return returnFunc(ctx, webviewID, payload)
1003+ }
1004+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID, json.RawMessage) any); ok {
1005+ r0 = returnFunc(ctx, webviewID, payload)
1006+ } else {
1007+ if ret.Get(0) != nil {
1008+ r0 = ret.Get(0).(any)
1009+ }
1010+ }
1011+ if returnFunc, ok := ret.Get(1).(func(context.Context, port.WebViewID, json.RawMessage) error); ok {
1012+ r1 = returnFunc(ctx, webviewID, payload)
1013+ } else {
1014+ r1 = ret.Error(1)
1015+ }
1016+ return r0, r1
1017+}
1018+
1019+// MockWebUIMessageHandler_Handle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handle'
1020+type MockWebUIMessageHandler_Handle_Call struct {
1021+ *mock.Call
1022+}
1023+
1024+// Handle is a helper method to define mock.On call
1025+// - ctx context.Context
1026+// - webviewID port.WebViewID
1027+// - payload json.RawMessage
1028+func (_e *MockWebUIMessageHandler_Expecter) Handle(ctx any, webviewID any, payload any) *MockWebUIMessageHandler_Handle_Call {
1029+ return &MockWebUIMessageHandler_Handle_Call{Call: _e.mock.On("Handle", ctx, webviewID, payload)}
1030+}
1031+
1032+func (_c *MockWebUIMessageHandler_Handle_Call) Run(run func(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage)) *MockWebUIMessageHandler_Handle_Call {
1033+ _c.Call.Run(func(args mock.Arguments) {
1034+ var arg0 context.Context
1035+ if args[0] != nil {
1036+ arg0 = args[0].(context.Context)
1037+ }
1038+ var arg1 port.WebViewID
1039+ if args[1] != nil {
1040+ arg1 = args[1].(port.WebViewID)
1041+ }
1042+ var arg2 json.RawMessage
1043+ if args[2] != nil {
1044+ arg2 = args[2].(json.RawMessage)
1045+ }
1046+ run(
1047+ arg0,
1048+ arg1,
1049+ arg2,
1050+ )
1051+ })
1052+ return _c
1053+}
1054+
1055+func (_c *MockWebUIMessageHandler_Handle_Call) Return(v any, err error) *MockWebUIMessageHandler_Handle_Call {
1056+ _c.Call.Return(v, err)
1057+ return _c
1058+}
1059+
1060+func (_c *MockWebUIMessageHandler_Handle_Call) RunAndReturn(run func(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage) (any, error)) *MockWebUIMessageHandler_Handle_Call {
1061+ _c.Call.Return(run)
1062+ return _c
1063+}
1064+
1065+// NewMockWebUIHandlerRouter creates a new instance of MockWebUIHandlerRouter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1066+// The first argument is typically a *testing.T value.
1067+func NewMockWebUIHandlerRouter(t interface {
1068+ mock.TestingT
1069+ Cleanup(func())
1070+}) *MockWebUIHandlerRouter {
1071+ mock := &MockWebUIHandlerRouter{}
1072+ mock.Mock.Test(t)
1073+
1074+ t.Cleanup(func() { mock.AssertExpectations(t) })
1075+
1076+ return mock
1077+}
1078+
1079+// MockWebUIHandlerRouter is an autogenerated mock type for the WebUIHandlerRouter type
1080+type MockWebUIHandlerRouter struct {
1081+ mock.Mock
1082+}
1083+
1084+type MockWebUIHandlerRouter_Expecter struct {
1085+ mock *mock.Mock
1086+}
1087+
1088+func (_m *MockWebUIHandlerRouter) EXPECT() *MockWebUIHandlerRouter_Expecter {
1089+ return &MockWebUIHandlerRouter_Expecter{mock: &_m.Mock}
1090+}
1091+
1092+// RegisterHandler provides a mock function for the type MockWebUIHandlerRouter
1093+func (_mock *MockWebUIHandlerRouter) RegisterHandler(msgType string, handler port.WebUIMessageHandler) error {
1094+ ret := _mock.Called(msgType, handler)
1095+
1096+ if len(ret) == 0 {
1097+ panic("no return value specified for RegisterHandler")
1098+ }
1099+
1100+ var r0 error
1101+ if returnFunc, ok := ret.Get(0).(func(string, port.WebUIMessageHandler) error); ok {
1102+ r0 = returnFunc(msgType, handler)
1103+ } else {
1104+ r0 = ret.Error(0)
1105+ }
1106+ return r0
1107+}
1108+
1109+// MockWebUIHandlerRouter_RegisterHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandler'
1110+type MockWebUIHandlerRouter_RegisterHandler_Call struct {
1111+ *mock.Call
1112+}
1113+
1114+// RegisterHandler is a helper method to define mock.On call
1115+// - msgType string
1116+// - handler port.WebUIMessageHandler
1117+func (_e *MockWebUIHandlerRouter_Expecter) RegisterHandler(msgType any, handler any) *MockWebUIHandlerRouter_RegisterHandler_Call {
1118+ return &MockWebUIHandlerRouter_RegisterHandler_Call{Call: _e.mock.On("RegisterHandler", msgType, handler)}
1119+}
1120+
1121+func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) Run(run func(msgType string, handler port.WebUIMessageHandler)) *MockWebUIHandlerRouter_RegisterHandler_Call {
1122+ _c.Call.Run(func(args mock.Arguments) {
1123+ var arg0 string
1124+ if args[0] != nil {
1125+ arg0 = args[0].(string)
1126+ }
1127+ var arg1 port.WebUIMessageHandler
1128+ if args[1] != nil {
1129+ arg1 = args[1].(port.WebUIMessageHandler)
1130+ }
1131+ run(
1132+ arg0,
1133+ arg1,
1134+ )
1135+ })
1136+ return _c
1137+}
1138+
1139+func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) Return(err error) *MockWebUIHandlerRouter_RegisterHandler_Call {
1140+ _c.Call.Return(err)
1141+ return _c
1142+}
1143+
1144+func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) RunAndReturn(run func(msgType string, handler port.WebUIMessageHandler) error) *MockWebUIHandlerRouter_RegisterHandler_Call {
1145+ _c.Call.Return(run)
1146+ return _c
1147+}
1148+
1149+// RegisterHandlerWithCallbacks provides a mock function for the type MockWebUIHandlerRouter
1150+func (_mock *MockWebUIHandlerRouter) RegisterHandlerWithCallbacks(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler) error {
1151+ ret := _mock.Called(msgType, callback, errorCallback, worldName, handler)
1152+
1153+ if len(ret) == 0 {
1154+ panic("no return value specified for RegisterHandlerWithCallbacks")
1155+ }
1156+
1157+ var r0 error
1158+ if returnFunc, ok := ret.Get(0).(func(string, string, string, string, port.WebUIMessageHandler) error); ok {
1159+ r0 = returnFunc(msgType, callback, errorCallback, worldName, handler)
1160+ } else {
1161+ r0 = ret.Error(0)
1162+ }
1163+ return r0
1164+}
1165+
1166+// MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandlerWithCallbacks'
1167+type MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call struct {
1168+ *mock.Call
1169+}
1170+
1171+// RegisterHandlerWithCallbacks is a helper method to define mock.On call
1172+// - msgType string
1173+// - callback string
1174+// - errorCallback string
1175+// - worldName string
1176+// - handler port.WebUIMessageHandler
1177+func (_e *MockWebUIHandlerRouter_Expecter) RegisterHandlerWithCallbacks(msgType any, callback any, errorCallback any, worldName any, handler any) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
1178+ return &MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call{Call: _e.mock.On("RegisterHandlerWithCallbacks", msgType, callback, errorCallback, worldName, handler)}
1179+}
1180+
1181+func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) Run(run func(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler)) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
1182+ _c.Call.Run(func(args mock.Arguments) {
1183+ var arg0 string
1184+ if args[0] != nil {
1185+ arg0 = args[0].(string)
1186+ }
1187+ var arg1 string
1188+ if args[1] != nil {
1189+ arg1 = args[1].(string)
1190+ }
1191+ var arg2 string
1192+ if args[2] != nil {
1193+ arg2 = args[2].(string)
1194+ }
1195+ var arg3 string
1196+ if args[3] != nil {
1197+ arg3 = args[3].(string)
1198+ }
1199+ var arg4 port.WebUIMessageHandler
1200+ if args[4] != nil {
1201+ arg4 = args[4].(port.WebUIMessageHandler)
1202+ }
1203+ run(
1204+ arg0,
1205+ arg1,
1206+ arg2,
1207+ arg3,
1208+ arg4,
1209+ )
1210+ })
1211+ return _c
1212+}
1213+
1214+func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) Return(err error) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
1215+ _c.Call.Return(err)
1216+ return _c
1217+}
1218+
1219+func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) RunAndReturn(run func(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler) error) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
1220+ _c.Call.Return(run)
1221+ return _c
1222+}
1223+
1224+// NewMockSchemeHandler creates a new instance of MockSchemeHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1225+// The first argument is typically a *testing.T value.
1226+func NewMockSchemeHandler(t interface {
1227+ mock.TestingT
1228+ Cleanup(func())
1229+}) *MockSchemeHandler {
1230+ mock := &MockSchemeHandler{}
1231+ mock.Mock.Test(t)
1232+
1233+ t.Cleanup(func() { mock.AssertExpectations(t) })
1234+
1235+ return mock
1236+}
1237+
1238+// MockSchemeHandler is an autogenerated mock type for the SchemeHandler type
1239+type MockSchemeHandler struct {
1240+ mock.Mock
1241+}
1242+
1243+type MockSchemeHandler_Expecter struct {
1244+ mock *mock.Mock
1245+}
1246+
1247+func (_m *MockSchemeHandler) EXPECT() *MockSchemeHandler_Expecter {
1248+ return &MockSchemeHandler_Expecter{mock: &_m.Mock}
1249+}
1250+
1251+// RegisterScheme provides a mock function for the type MockSchemeHandler
1252+func (_mock *MockSchemeHandler) RegisterScheme(scheme string, handler func(uri string) ([]byte, string, error)) {
1253+ _mock.Called(scheme, handler)
1254+ return
1255+}
1256+
1257+// MockSchemeHandler_RegisterScheme_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterScheme'
1258+type MockSchemeHandler_RegisterScheme_Call struct {
1259+ *mock.Call
1260+}
1261+
1262+// RegisterScheme is a helper method to define mock.On call
1263+// - scheme string
1264+// - handler func(uri string) ([]byte, string, error)
1265+func (_e *MockSchemeHandler_Expecter) RegisterScheme(scheme any, handler any) *MockSchemeHandler_RegisterScheme_Call {
1266+ return &MockSchemeHandler_RegisterScheme_Call{Call: _e.mock.On("RegisterScheme", scheme, handler)}
1267+}
1268+
1269+func (_c *MockSchemeHandler_RegisterScheme_Call) Run(run func(scheme string, handler func(uri string) ([]byte, string, error))) *MockSchemeHandler_RegisterScheme_Call {
1270+ _c.Call.Run(func(args mock.Arguments) {
1271+ var arg0 string
1272+ if args[0] != nil {
1273+ arg0 = args[0].(string)
1274+ }
1275+ var arg1 func(uri string) ([]byte, string, error)
1276+ if args[1] != nil {
1277+ arg1 = args[1].(func(uri string) ([]byte, string, error))
1278+ }
1279+ run(
1280+ arg0,
1281+ arg1,
1282+ )
1283+ })
1284+ return _c
1285+}
1286+
1287+func (_c *MockSchemeHandler_RegisterScheme_Call) Return() *MockSchemeHandler_RegisterScheme_Call {
1288+ _c.Call.Return()
1289+ return _c
1290+}
1291+
1292+func (_c *MockSchemeHandler_RegisterScheme_Call) RunAndReturn(run func(scheme string, handler func(uri string) ([]byte, string, error))) *MockSchemeHandler_RegisterScheme_Call {
1293+ _c.Run(run)
1294+ return _c
1295+}
1296+
1297+// NewMockSettingsApplier creates a new instance of MockSettingsApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1298+// The first argument is typically a *testing.T value.
1299+func NewMockSettingsApplier(t interface {
1300+ mock.TestingT
1301+ Cleanup(func())
1302+}) *MockSettingsApplier {
1303+ mock := &MockSettingsApplier{}
1304+ mock.Mock.Test(t)
1305+
1306+ t.Cleanup(func() { mock.AssertExpectations(t) })
1307+
1308+ return mock
1309+}
1310+
1311+// MockSettingsApplier is an autogenerated mock type for the SettingsApplier type
1312+type MockSettingsApplier struct {
1313+ mock.Mock
1314+}
1315+
1316+type MockSettingsApplier_Expecter struct {
1317+ mock *mock.Mock
1318+}
1319+
1320+func (_m *MockSettingsApplier) EXPECT() *MockSettingsApplier_Expecter {
1321+ return &MockSettingsApplier_Expecter{mock: &_m.Mock}
1322+}
1323+
1324+// ApplyToAll provides a mock function for the type MockSettingsApplier
1325+func (_mock *MockSettingsApplier) ApplyToAll(ctx context.Context, webviews []port.WebView) {
1326+ _mock.Called(ctx, webviews)
1327+ return
1328+}
1329+
1330+// MockSettingsApplier_ApplyToAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyToAll'
1331+type MockSettingsApplier_ApplyToAll_Call struct {
1332+ *mock.Call
1333+}
1334+
1335+// ApplyToAll is a helper method to define mock.On call
1336+// - ctx context.Context
1337+// - webviews []port.WebView
1338+func (_e *MockSettingsApplier_Expecter) ApplyToAll(ctx any, webviews any) *MockSettingsApplier_ApplyToAll_Call {
1339+ return &MockSettingsApplier_ApplyToAll_Call{Call: _e.mock.On("ApplyToAll", ctx, webviews)}
1340+}
1341+
1342+func (_c *MockSettingsApplier_ApplyToAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockSettingsApplier_ApplyToAll_Call {
1343+ _c.Call.Run(func(args mock.Arguments) {
1344+ var arg0 context.Context
1345+ if args[0] != nil {
1346+ arg0 = args[0].(context.Context)
1347+ }
1348+ var arg1 []port.WebView
1349+ if args[1] != nil {
1350+ arg1 = args[1].([]port.WebView)
1351+ }
1352+ run(
1353+ arg0,
1354+ arg1,
1355+ )
1356+ })
1357+ return _c
1358+}
1359+
1360+func (_c *MockSettingsApplier_ApplyToAll_Call) Return() *MockSettingsApplier_ApplyToAll_Call {
1361+ _c.Call.Return()
1362+ return _c
1363+}
1364+
1365+func (_c *MockSettingsApplier_ApplyToAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockSettingsApplier_ApplyToAll_Call {
1366+ _c.Run(run)
1367+ return _c
1368+}
1369+
1370+// NewMockFilterApplier creates a new instance of MockFilterApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1371+// The first argument is typically a *testing.T value.
1372+func NewMockFilterApplier(t interface {
1373+ mock.TestingT
1374+ Cleanup(func())
1375+}) *MockFilterApplier {
1376+ mock := &MockFilterApplier{}
1377+ mock.Mock.Test(t)
1378+
1379+ t.Cleanup(func() { mock.AssertExpectations(t) })
1380+
1381+ return mock
1382+}
1383+
1384+// MockFilterApplier is an autogenerated mock type for the FilterApplier type
1385+type MockFilterApplier struct {
1386+ mock.Mock
1387+}
1388+
1389+type MockFilterApplier_Expecter struct {
1390+ mock *mock.Mock
1391+}
1392+
1393+func (_m *MockFilterApplier) EXPECT() *MockFilterApplier_Expecter {
1394+ return &MockFilterApplier_Expecter{mock: &_m.Mock}
1395+}
1396+
1397+// ApplyToAll provides a mock function for the type MockFilterApplier
1398+func (_mock *MockFilterApplier) ApplyToAll(ctx context.Context, webviews []port.WebView) {
1399+ _mock.Called(ctx, webviews)
1400+ return
1401+}
1402+
1403+// MockFilterApplier_ApplyToAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyToAll'
1404+type MockFilterApplier_ApplyToAll_Call struct {
1405+ *mock.Call
1406+}
1407+
1408+// ApplyToAll is a helper method to define mock.On call
1409+// - ctx context.Context
1410+// - webviews []port.WebView
1411+func (_e *MockFilterApplier_Expecter) ApplyToAll(ctx any, webviews any) *MockFilterApplier_ApplyToAll_Call {
1412+ return &MockFilterApplier_ApplyToAll_Call{Call: _e.mock.On("ApplyToAll", ctx, webviews)}
1413+}
1414+
1415+func (_c *MockFilterApplier_ApplyToAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockFilterApplier_ApplyToAll_Call {
1416+ _c.Call.Run(func(args mock.Arguments) {
1417+ var arg0 context.Context
1418+ if args[0] != nil {
1419+ arg0 = args[0].(context.Context)
1420+ }
1421+ var arg1 []port.WebView
1422+ if args[1] != nil {
1423+ arg1 = args[1].([]port.WebView)
1424+ }
1425+ run(
1426+ arg0,
1427+ arg1,
1428+ )
1429+ })
1430+ return _c
1431+}
1432+
1433+func (_c *MockFilterApplier_ApplyToAll_Call) Return() *MockFilterApplier_ApplyToAll_Call {
1434+ _c.Call.Return()
1435+ return _c
1436+}
1437+
1438+func (_c *MockFilterApplier_ApplyToAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockFilterApplier_ApplyToAll_Call {
1439+ _c.Run(run)
1440+ return _c
1441+}
1442+
1443+// NewMockFaviconDatabase creates a new instance of MockFaviconDatabase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1444+// The first argument is typically a *testing.T value.
1445+func NewMockFaviconDatabase(t interface {
1446+ mock.TestingT
1447+ Cleanup(func())
1448+}) *MockFaviconDatabase {
1449+ mock := &MockFaviconDatabase{}
1450+ mock.Mock.Test(t)
1451+
1452+ t.Cleanup(func() { mock.AssertExpectations(t) })
1453+
1454+ return mock
1455+}
1456+
1457+// MockFaviconDatabase is an autogenerated mock type for the FaviconDatabase type
1458+type MockFaviconDatabase struct {
1459+ mock.Mock
1460+}
1461+
1462+type MockFaviconDatabase_Expecter struct {
1463+ mock *mock.Mock
1464+}
1465+
1466+func (_m *MockFaviconDatabase) EXPECT() *MockFaviconDatabase_Expecter {
1467+ return &MockFaviconDatabase_Expecter{mock: &_m.Mock}
1468+}
1469+
1470+// GetFaviconAsync provides a mock function for the type MockFaviconDatabase
1471+func (_mock *MockFaviconDatabase) GetFaviconAsync(pageURL string, callback func(port.Texture)) {
1472+ _mock.Called(pageURL, callback)
1473+ return
1474+}
1475+
1476+// MockFaviconDatabase_GetFaviconAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFaviconAsync'
1477+type MockFaviconDatabase_GetFaviconAsync_Call struct {
1478+ *mock.Call
1479+}
1480+
1481+// GetFaviconAsync is a helper method to define mock.On call
1482+// - pageURL string
1483+// - callback func(port.Texture)
1484+func (_e *MockFaviconDatabase_Expecter) GetFaviconAsync(pageURL any, callback any) *MockFaviconDatabase_GetFaviconAsync_Call {
1485+ return &MockFaviconDatabase_GetFaviconAsync_Call{Call: _e.mock.On("GetFaviconAsync", pageURL, callback)}
1486+}
1487+
1488+func (_c *MockFaviconDatabase_GetFaviconAsync_Call) Run(run func(pageURL string, callback func(port.Texture))) *MockFaviconDatabase_GetFaviconAsync_Call {
1489+ _c.Call.Run(func(args mock.Arguments) {
1490+ var arg0 string
1491+ if args[0] != nil {
1492+ arg0 = args[0].(string)
1493+ }
1494+ var arg1 func(port.Texture)
1495+ if args[1] != nil {
1496+ arg1 = args[1].(func(port.Texture))
1497+ }
1498+ run(
1499+ arg0,
1500+ arg1,
1501+ )
1502+ })
1503+ return _c
1504+}
1505+
1506+func (_c *MockFaviconDatabase_GetFaviconAsync_Call) Return() *MockFaviconDatabase_GetFaviconAsync_Call {
1507+ _c.Call.Return()
1508+ return _c
1509+}
1510+
1511+func (_c *MockFaviconDatabase_GetFaviconAsync_Call) RunAndReturn(run func(pageURL string, callback func(port.Texture))) *MockFaviconDatabase_GetFaviconAsync_Call {
1512+ _c.Run(run)
1513+ return _c
1514+}
1515+
1516+// NewMockScriptRefresher creates a new instance of MockScriptRefresher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1517+// The first argument is typically a *testing.T value.
1518+func NewMockScriptRefresher(t interface {
1519+ mock.TestingT
1520+ Cleanup(func())
1521+}) *MockScriptRefresher {
1522+ mock := &MockScriptRefresher{}
1523+ mock.Mock.Test(t)
1524+
1525+ t.Cleanup(func() { mock.AssertExpectations(t) })
1526+
1527+ return mock
1528+}
1529+
1530+// MockScriptRefresher is an autogenerated mock type for the ScriptRefresher type
1531+type MockScriptRefresher struct {
1532+ mock.Mock
1533+}
1534+
1535+type MockScriptRefresher_Expecter struct {
1536+ mock *mock.Mock
1537+}
1538+
1539+func (_m *MockScriptRefresher) EXPECT() *MockScriptRefresher_Expecter {
1540+ return &MockScriptRefresher_Expecter{mock: &_m.Mock}
1541+}
1542+
1543+// RefreshAll provides a mock function for the type MockScriptRefresher
1544+func (_mock *MockScriptRefresher) RefreshAll(ctx context.Context, webviews []port.WebView) {
1545+ _mock.Called(ctx, webviews)
1546+ return
1547+}
1548+
1549+// MockScriptRefresher_RefreshAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshAll'
1550+type MockScriptRefresher_RefreshAll_Call struct {
1551+ *mock.Call
1552+}
1553+
1554+// RefreshAll is a helper method to define mock.On call
1555+// - ctx context.Context
1556+// - webviews []port.WebView
1557+func (_e *MockScriptRefresher_Expecter) RefreshAll(ctx any, webviews any) *MockScriptRefresher_RefreshAll_Call {
1558+ return &MockScriptRefresher_RefreshAll_Call{Call: _e.mock.On("RefreshAll", ctx, webviews)}
1559+}
1560+
1561+func (_c *MockScriptRefresher_RefreshAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockScriptRefresher_RefreshAll_Call {
1562+ _c.Call.Run(func(args mock.Arguments) {
1563+ var arg0 context.Context
1564+ if args[0] != nil {
1565+ arg0 = args[0].(context.Context)
1566+ }
1567+ var arg1 []port.WebView
1568+ if args[1] != nil {
1569+ arg1 = args[1].([]port.WebView)
1570+ }
1571+ run(
1572+ arg0,
1573+ arg1,
1574+ )
1575+ })
1576+ return _c
1577+}
1578+
1579+func (_c *MockScriptRefresher_RefreshAll_Call) Return() *MockScriptRefresher_RefreshAll_Call {
1580+ _c.Call.Return()
1581+ return _c
1582+}
1583+
1584+func (_c *MockScriptRefresher_RefreshAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockScriptRefresher_RefreshAll_Call {
1585+ _c.Run(run)
1586+ return _c
1587+}
1588+
1589+// NewMockNativeWidgetProvider creates a new instance of MockNativeWidgetProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1590+// The first argument is typically a *testing.T value.
1591+func NewMockNativeWidgetProvider(t interface {
1592+ mock.TestingT
1593+ Cleanup(func())
1594+}) *MockNativeWidgetProvider {
1595+ mock := &MockNativeWidgetProvider{}
1596+ mock.Mock.Test(t)
1597+
1598+ t.Cleanup(func() { mock.AssertExpectations(t) })
1599+
1600+ return mock
1601+}
1602+
1603+// MockNativeWidgetProvider is an autogenerated mock type for the NativeWidgetProvider type
1604+type MockNativeWidgetProvider struct {
1605+ mock.Mock
1606+}
1607+
1608+type MockNativeWidgetProvider_Expecter struct {
1609+ mock *mock.Mock
1610+}
1611+
1612+func (_m *MockNativeWidgetProvider) EXPECT() *MockNativeWidgetProvider_Expecter {
1613+ return &MockNativeWidgetProvider_Expecter{mock: &_m.Mock}
1614+}
1615+
1616+// NativeWidget provides a mock function for the type MockNativeWidgetProvider
1617+func (_mock *MockNativeWidgetProvider) NativeWidget() uintptr {
1618+ ret := _mock.Called()
1619+
1620+ if len(ret) == 0 {
1621+ panic("no return value specified for NativeWidget")
1622+ }
1623+
1624+ var r0 uintptr
1625+ if returnFunc, ok := ret.Get(0).(func() uintptr); ok {
1626+ r0 = returnFunc()
1627+ } else {
1628+ r0 = ret.Get(0).(uintptr)
1629+ }
1630+ return r0
1631+}
1632+
1633+// MockNativeWidgetProvider_NativeWidget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NativeWidget'
1634+type MockNativeWidgetProvider_NativeWidget_Call struct {
1635+ *mock.Call
1636+}
1637+
1638+// NativeWidget is a helper method to define mock.On call
1639+func (_e *MockNativeWidgetProvider_Expecter) NativeWidget() *MockNativeWidgetProvider_NativeWidget_Call {
1640+ return &MockNativeWidgetProvider_NativeWidget_Call{Call: _e.mock.On("NativeWidget")}
1641+}
1642+
1643+func (_c *MockNativeWidgetProvider_NativeWidget_Call) Run(run func()) *MockNativeWidgetProvider_NativeWidget_Call {
1644+ _c.Call.Run(func(args mock.Arguments) {
1645+ run()
1646+ })
1647+ return _c
1648+}
1649+
1650+func (_c *MockNativeWidgetProvider_NativeWidget_Call) Return(v uintptr) *MockNativeWidgetProvider_NativeWidget_Call {
1651+ _c.Call.Return(v)
1652+ return _c
1653+}
1654+
1655+func (_c *MockNativeWidgetProvider_NativeWidget_Call) RunAndReturn(run func() uintptr) *MockNativeWidgetProvider_NativeWidget_Call {
1656+ _c.Call.Return(run)
1657+ return _c
1658+}
M internal/application/port/mocks/favicon_resolver.go +6 -6
@@ -65,7 +65,7 @@ type MockFaviconResolver_EnsureSized_Call struct {
6565 // - ctx context.Context
6666 // - key favicon.Key
6767 // - size int
68-func (_e *MockFaviconResolver_Expecter) EnsureSized(ctx interface{}, key interface{}, size interface{}) *MockFaviconResolver_EnsureSized_Call {
68+func (_e *MockFaviconResolver_Expecter) EnsureSized(ctx any, key any, size any) *MockFaviconResolver_EnsureSized_Call {
6969 return &MockFaviconResolver_EnsureSized_Call{Call: _e.mock.On("EnsureSized", ctx, key, size)}
7070 }
7171
@@ -127,7 +127,7 @@ type MockFaviconResolver_Invalidate_Call struct {
127127 // Invalidate is a helper method to define mock.On call
128128 // - ctx context.Context
129129 // - key favicon.Key
130-func (_e *MockFaviconResolver_Expecter) Invalidate(ctx interface{}, key interface{}) *MockFaviconResolver_Invalidate_Call {
130+func (_e *MockFaviconResolver_Expecter) Invalidate(ctx any, key any) *MockFaviconResolver_Invalidate_Call {
131131 return &MockFaviconResolver_Invalidate_Call{Call: _e.mock.On("Invalidate", ctx, key)}
132132 }
133133
@@ -199,7 +199,7 @@ type MockFaviconResolver_Observe_Call struct {
199199 // - bytes []byte
200200 // - source favicon.Source
201201 // - contentType string
202-func (_e *MockFaviconResolver_Expecter) Observe(ctx interface{}, pageURL interface{}, iconURL interface{}, bytes interface{}, source interface{}, contentType interface{}) *MockFaviconResolver_Observe_Call {
202+func (_e *MockFaviconResolver_Expecter) Observe(ctx any, pageURL any, iconURL any, bytes any, source any, contentType any) *MockFaviconResolver_Observe_Call {
203203 return &MockFaviconResolver_Observe_Call{Call: _e.mock.On("Observe", ctx, pageURL, iconURL, bytes, source, contentType)}
204204 }
205205
@@ -277,7 +277,7 @@ type MockFaviconResolver_RefreshFromIconURLs_Call struct {
277277 // - ctx context.Context
278278 // - pageURL string
279279 // - iconURLs []string
280-func (_e *MockFaviconResolver_Expecter) RefreshFromIconURLs(ctx interface{}, pageURL interface{}, iconURLs interface{}) *MockFaviconResolver_RefreshFromIconURLs_Call {
280+func (_e *MockFaviconResolver_Expecter) RefreshFromIconURLs(ctx any, pageURL any, iconURLs any) *MockFaviconResolver_RefreshFromIconURLs_Call {
281281 return &MockFaviconResolver_RefreshFromIconURLs_Call{Call: _e.mock.On("RefreshFromIconURLs", ctx, pageURL, iconURLs)}
282282 }
283283
@@ -352,7 +352,7 @@ type MockFaviconResolver_Resolve_Call struct {
352352 // - rawURLOrDomain string
353353 // - size int
354354 // - options port.FaviconResolveOptions
355-func (_e *MockFaviconResolver_Expecter) Resolve(ctx interface{}, rawURLOrDomain interface{}, size interface{}, options interface{}) *MockFaviconResolver_Resolve_Call {
355+func (_e *MockFaviconResolver_Expecter) Resolve(ctx any, rawURLOrDomain any, size any, options any) *MockFaviconResolver_Resolve_Call {
356356 return &MockFaviconResolver_Resolve_Call{Call: _e.mock.On("Resolve", ctx, rawURLOrDomain, size, options)}
357357 }
358358
@@ -431,7 +431,7 @@ type MockFaviconResolver_ResolveSystemviewIcon_Call struct {
431431 // - ctx context.Context
432432 // - rawDomain string
433433 // - size int
434-func (_e *MockFaviconResolver_Expecter) ResolveSystemviewIcon(ctx interface{}, rawDomain interface{}, size interface{}) *MockFaviconResolver_ResolveSystemviewIcon_Call {
434+func (_e *MockFaviconResolver_Expecter) ResolveSystemviewIcon(ctx any, rawDomain any, size any) *MockFaviconResolver_ResolveSystemviewIcon_Call {
435435 return &MockFaviconResolver_ResolveSystemviewIcon_Call{Call: _e.mock.On("ResolveSystemviewIcon", ctx, rawDomain, size)}
436436 }
437437
A internal/application/port/mocks/favicon_service.go +576 -0
@@ -0,0 +1,576 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockFaviconService creates a new instance of MockFaviconService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockFaviconService(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockFaviconService {
19+ mock := &MockFaviconService{}
20+ mock.Mock.Test(t)
21+
22+ t.Cleanup(func() { mock.AssertExpectations(t) })
23+
24+ return mock
25+}
26+
27+// MockFaviconService is an autogenerated mock type for the FaviconService type
28+type MockFaviconService struct {
29+ mock.Mock
30+}
31+
32+type MockFaviconService_Expecter struct {
33+ mock *mock.Mock
34+}
35+
36+func (_m *MockFaviconService) EXPECT() *MockFaviconService_Expecter {
37+ return &MockFaviconService_Expecter{mock: &_m.Mock}
38+}
39+
40+// Close provides a mock function for the type MockFaviconService
41+func (_mock *MockFaviconService) Close() {
42+ _mock.Called()
43+ return
44+}
45+
46+// MockFaviconService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
47+type MockFaviconService_Close_Call struct {
48+ *mock.Call
49+}
50+
51+// Close is a helper method to define mock.On call
52+func (_e *MockFaviconService_Expecter) Close() *MockFaviconService_Close_Call {
53+ return &MockFaviconService_Close_Call{Call: _e.mock.On("Close")}
54+}
55+
56+func (_c *MockFaviconService_Close_Call) Run(run func()) *MockFaviconService_Close_Call {
57+ _c.Call.Run(func(args mock.Arguments) {
58+ run()
59+ })
60+ return _c
61+}
62+
63+func (_c *MockFaviconService_Close_Call) Return() *MockFaviconService_Close_Call {
64+ _c.Call.Return()
65+ return _c
66+}
67+
68+func (_c *MockFaviconService_Close_Call) RunAndReturn(run func()) *MockFaviconService_Close_Call {
69+ _c.Run(run)
70+ return _c
71+}
72+
73+// DiskPathPNG provides a mock function for the type MockFaviconService
74+func (_mock *MockFaviconService) DiskPathPNG(domain string) string {
75+ ret := _mock.Called(domain)
76+
77+ if len(ret) == 0 {
78+ panic("no return value specified for DiskPathPNG")
79+ }
80+
81+ var r0 string
82+ if returnFunc, ok := ret.Get(0).(func(string) string); ok {
83+ r0 = returnFunc(domain)
84+ } else {
85+ r0 = ret.Get(0).(string)
86+ }
87+ return r0
88+}
89+
90+// MockFaviconService_DiskPathPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNG'
91+type MockFaviconService_DiskPathPNG_Call struct {
92+ *mock.Call
93+}
94+
95+// DiskPathPNG is a helper method to define mock.On call
96+// - domain string
97+func (_e *MockFaviconService_Expecter) DiskPathPNG(domain any) *MockFaviconService_DiskPathPNG_Call {
98+ return &MockFaviconService_DiskPathPNG_Call{Call: _e.mock.On("DiskPathPNG", domain)}
99+}
100+
101+func (_c *MockFaviconService_DiskPathPNG_Call) Run(run func(domain string)) *MockFaviconService_DiskPathPNG_Call {
102+ _c.Call.Run(func(args mock.Arguments) {
103+ var arg0 string
104+ if args[0] != nil {
105+ arg0 = args[0].(string)
106+ }
107+ run(
108+ arg0,
109+ )
110+ })
111+ return _c
112+}
113+
114+func (_c *MockFaviconService_DiskPathPNG_Call) Return(s string) *MockFaviconService_DiskPathPNG_Call {
115+ _c.Call.Return(s)
116+ return _c
117+}
118+
119+func (_c *MockFaviconService_DiskPathPNG_Call) RunAndReturn(run func(domain string) string) *MockFaviconService_DiskPathPNG_Call {
120+ _c.Call.Return(run)
121+ return _c
122+}
123+
124+// DiskPathPNGSized provides a mock function for the type MockFaviconService
125+func (_mock *MockFaviconService) DiskPathPNGSized(domain string, size int) string {
126+ ret := _mock.Called(domain, size)
127+
128+ if len(ret) == 0 {
129+ panic("no return value specified for DiskPathPNGSized")
130+ }
131+
132+ var r0 string
133+ if returnFunc, ok := ret.Get(0).(func(string, int) string); ok {
134+ r0 = returnFunc(domain, size)
135+ } else {
136+ r0 = ret.Get(0).(string)
137+ }
138+ return r0
139+}
140+
141+// MockFaviconService_DiskPathPNGSized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNGSized'
142+type MockFaviconService_DiskPathPNGSized_Call struct {
143+ *mock.Call
144+}
145+
146+// DiskPathPNGSized is a helper method to define mock.On call
147+// - domain string
148+// - size int
149+func (_e *MockFaviconService_Expecter) DiskPathPNGSized(domain any, size any) *MockFaviconService_DiskPathPNGSized_Call {
150+ return &MockFaviconService_DiskPathPNGSized_Call{Call: _e.mock.On("DiskPathPNGSized", domain, size)}
151+}
152+
153+func (_c *MockFaviconService_DiskPathPNGSized_Call) Run(run func(domain string, size int)) *MockFaviconService_DiskPathPNGSized_Call {
154+ _c.Call.Run(func(args mock.Arguments) {
155+ var arg0 string
156+ if args[0] != nil {
157+ arg0 = args[0].(string)
158+ }
159+ var arg1 int
160+ if args[1] != nil {
161+ arg1 = args[1].(int)
162+ }
163+ run(
164+ arg0,
165+ arg1,
166+ )
167+ })
168+ return _c
169+}
170+
171+func (_c *MockFaviconService_DiskPathPNGSized_Call) Return(s string) *MockFaviconService_DiskPathPNGSized_Call {
172+ _c.Call.Return(s)
173+ return _c
174+}
175+
176+func (_c *MockFaviconService_DiskPathPNGSized_Call) RunAndReturn(run func(domain string, size int) string) *MockFaviconService_DiskPathPNGSized_Call {
177+ _c.Call.Return(run)
178+ return _c
179+}
180+
181+// EnsureCacheDir provides a mock function for the type MockFaviconService
182+func (_mock *MockFaviconService) EnsureCacheDir() error {
183+ ret := _mock.Called()
184+
185+ if len(ret) == 0 {
186+ panic("no return value specified for EnsureCacheDir")
187+ }
188+
189+ var r0 error
190+ if returnFunc, ok := ret.Get(0).(func() error); ok {
191+ r0 = returnFunc()
192+ } else {
193+ r0 = ret.Error(0)
194+ }
195+ return r0
196+}
197+
198+// MockFaviconService_EnsureCacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureCacheDir'
199+type MockFaviconService_EnsureCacheDir_Call struct {
200+ *mock.Call
201+}
202+
203+// EnsureCacheDir is a helper method to define mock.On call
204+func (_e *MockFaviconService_Expecter) EnsureCacheDir() *MockFaviconService_EnsureCacheDir_Call {
205+ return &MockFaviconService_EnsureCacheDir_Call{Call: _e.mock.On("EnsureCacheDir")}
206+}
207+
208+func (_c *MockFaviconService_EnsureCacheDir_Call) Run(run func()) *MockFaviconService_EnsureCacheDir_Call {
209+ _c.Call.Run(func(args mock.Arguments) {
210+ run()
211+ })
212+ return _c
213+}
214+
215+func (_c *MockFaviconService_EnsureCacheDir_Call) Return(err error) *MockFaviconService_EnsureCacheDir_Call {
216+ _c.Call.Return(err)
217+ return _c
218+}
219+
220+func (_c *MockFaviconService_EnsureCacheDir_Call) RunAndReturn(run func() error) *MockFaviconService_EnsureCacheDir_Call {
221+ _c.Call.Return(run)
222+ return _c
223+}
224+
225+// EnsureDiskCache provides a mock function for the type MockFaviconService
226+func (_mock *MockFaviconService) EnsureDiskCache(ctx context.Context, domain string) {
227+ _mock.Called(ctx, domain)
228+ return
229+}
230+
231+// MockFaviconService_EnsureDiskCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureDiskCache'
232+type MockFaviconService_EnsureDiskCache_Call struct {
233+ *mock.Call
234+}
235+
236+// EnsureDiskCache is a helper method to define mock.On call
237+// - ctx context.Context
238+// - domain string
239+func (_e *MockFaviconService_Expecter) EnsureDiskCache(ctx any, domain any) *MockFaviconService_EnsureDiskCache_Call {
240+ return &MockFaviconService_EnsureDiskCache_Call{Call: _e.mock.On("EnsureDiskCache", ctx, domain)}
241+}
242+
243+func (_c *MockFaviconService_EnsureDiskCache_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call {
244+ _c.Call.Run(func(args mock.Arguments) {
245+ var arg0 context.Context
246+ if args[0] != nil {
247+ arg0 = args[0].(context.Context)
248+ }
249+ var arg1 string
250+ if args[1] != nil {
251+ arg1 = args[1].(string)
252+ }
253+ run(
254+ arg0,
255+ arg1,
256+ )
257+ })
258+ return _c
259+}
260+
261+func (_c *MockFaviconService_EnsureDiskCache_Call) Return() *MockFaviconService_EnsureDiskCache_Call {
262+ _c.Call.Return()
263+ return _c
264+}
265+
266+func (_c *MockFaviconService_EnsureDiskCache_Call) RunAndReturn(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call {
267+ _c.Run(run)
268+ return _c
269+}
270+
271+// EnsureSizedPNG provides a mock function for the type MockFaviconService
272+func (_mock *MockFaviconService) EnsureSizedPNG(ctx context.Context, domain string, size int) error {
273+ ret := _mock.Called(ctx, domain, size)
274+
275+ if len(ret) == 0 {
276+ panic("no return value specified for EnsureSizedPNG")
277+ }
278+
279+ var r0 error
280+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) error); ok {
281+ r0 = returnFunc(ctx, domain, size)
282+ } else {
283+ r0 = ret.Error(0)
284+ }
285+ return r0
286+}
287+
288+// MockFaviconService_EnsureSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureSizedPNG'
289+type MockFaviconService_EnsureSizedPNG_Call struct {
290+ *mock.Call
291+}
292+
293+// EnsureSizedPNG is a helper method to define mock.On call
294+// - ctx context.Context
295+// - domain string
296+// - size int
297+func (_e *MockFaviconService_Expecter) EnsureSizedPNG(ctx any, domain any, size any) *MockFaviconService_EnsureSizedPNG_Call {
298+ return &MockFaviconService_EnsureSizedPNG_Call{Call: _e.mock.On("EnsureSizedPNG", ctx, domain, size)}
299+}
300+
301+func (_c *MockFaviconService_EnsureSizedPNG_Call) Run(run func(ctx context.Context, domain string, size int)) *MockFaviconService_EnsureSizedPNG_Call {
302+ _c.Call.Run(func(args mock.Arguments) {
303+ var arg0 context.Context
304+ if args[0] != nil {
305+ arg0 = args[0].(context.Context)
306+ }
307+ var arg1 string
308+ if args[1] != nil {
309+ arg1 = args[1].(string)
310+ }
311+ var arg2 int
312+ if args[2] != nil {
313+ arg2 = args[2].(int)
314+ }
315+ run(
316+ arg0,
317+ arg1,
318+ arg2,
319+ )
320+ })
321+ return _c
322+}
323+
324+func (_c *MockFaviconService_EnsureSizedPNG_Call) Return(err error) *MockFaviconService_EnsureSizedPNG_Call {
325+ _c.Call.Return(err)
326+ return _c
327+}
328+
329+func (_c *MockFaviconService_EnsureSizedPNG_Call) RunAndReturn(run func(ctx context.Context, domain string, size int) error) *MockFaviconService_EnsureSizedPNG_Call {
330+ _c.Call.Return(run)
331+ return _c
332+}
333+
334+// Get provides a mock function for the type MockFaviconService
335+func (_mock *MockFaviconService) Get(ctx context.Context, domain string) ([]byte, error) {
336+ ret := _mock.Called(ctx, domain)
337+
338+ if len(ret) == 0 {
339+ panic("no return value specified for Get")
340+ }
341+
342+ var r0 []byte
343+ var r1 error
344+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
345+ return returnFunc(ctx, domain)
346+ }
347+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
348+ r0 = returnFunc(ctx, domain)
349+ } else {
350+ if ret.Get(0) != nil {
351+ r0 = ret.Get(0).([]byte)
352+ }
353+ }
354+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
355+ r1 = returnFunc(ctx, domain)
356+ } else {
357+ r1 = ret.Error(1)
358+ }
359+ return r0, r1
360+}
361+
362+// MockFaviconService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
363+type MockFaviconService_Get_Call struct {
364+ *mock.Call
365+}
366+
367+// Get is a helper method to define mock.On call
368+// - ctx context.Context
369+// - domain string
370+func (_e *MockFaviconService_Expecter) Get(ctx any, domain any) *MockFaviconService_Get_Call {
371+ return &MockFaviconService_Get_Call{Call: _e.mock.On("Get", ctx, domain)}
372+}
373+
374+func (_c *MockFaviconService_Get_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_Get_Call {
375+ _c.Call.Run(func(args mock.Arguments) {
376+ var arg0 context.Context
377+ if args[0] != nil {
378+ arg0 = args[0].(context.Context)
379+ }
380+ var arg1 string
381+ if args[1] != nil {
382+ arg1 = args[1].(string)
383+ }
384+ run(
385+ arg0,
386+ arg1,
387+ )
388+ })
389+ return _c
390+}
391+
392+func (_c *MockFaviconService_Get_Call) Return(bytes []byte, err error) *MockFaviconService_Get_Call {
393+ _c.Call.Return(bytes, err)
394+ return _c
395+}
396+
397+func (_c *MockFaviconService_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, error)) *MockFaviconService_Get_Call {
398+ _c.Call.Return(run)
399+ return _c
400+}
401+
402+// GetCached provides a mock function for the type MockFaviconService
403+func (_mock *MockFaviconService) GetCached(ctx context.Context, domain string) ([]byte, bool) {
404+ ret := _mock.Called(ctx, domain)
405+
406+ if len(ret) == 0 {
407+ panic("no return value specified for GetCached")
408+ }
409+
410+ var r0 []byte
411+ var r1 bool
412+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, bool)); ok {
413+ return returnFunc(ctx, domain)
414+ }
415+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
416+ r0 = returnFunc(ctx, domain)
417+ } else {
418+ if ret.Get(0) != nil {
419+ r0 = ret.Get(0).([]byte)
420+ }
421+ }
422+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok {
423+ r1 = returnFunc(ctx, domain)
424+ } else {
425+ r1 = ret.Get(1).(bool)
426+ }
427+ return r0, r1
428+}
429+
430+// MockFaviconService_GetCached_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCached'
431+type MockFaviconService_GetCached_Call struct {
432+ *mock.Call
433+}
434+
435+// GetCached is a helper method to define mock.On call
436+// - ctx context.Context
437+// - domain string
438+func (_e *MockFaviconService_Expecter) GetCached(ctx any, domain any) *MockFaviconService_GetCached_Call {
439+ return &MockFaviconService_GetCached_Call{Call: _e.mock.On("GetCached", ctx, domain)}
440+}
441+
442+func (_c *MockFaviconService_GetCached_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_GetCached_Call {
443+ _c.Call.Run(func(args mock.Arguments) {
444+ var arg0 context.Context
445+ if args[0] != nil {
446+ arg0 = args[0].(context.Context)
447+ }
448+ var arg1 string
449+ if args[1] != nil {
450+ arg1 = args[1].(string)
451+ }
452+ run(
453+ arg0,
454+ arg1,
455+ )
456+ })
457+ return _c
458+}
459+
460+func (_c *MockFaviconService_GetCached_Call) Return(bytes []byte, b bool) *MockFaviconService_GetCached_Call {
461+ _c.Call.Return(bytes, b)
462+ return _c
463+}
464+
465+func (_c *MockFaviconService_GetCached_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, bool)) *MockFaviconService_GetCached_Call {
466+ _c.Call.Return(run)
467+ return _c
468+}
469+
470+// HasPNGOnDisk provides a mock function for the type MockFaviconService
471+func (_mock *MockFaviconService) HasPNGOnDisk(domain string) bool {
472+ ret := _mock.Called(domain)
473+
474+ if len(ret) == 0 {
475+ panic("no return value specified for HasPNGOnDisk")
476+ }
477+
478+ var r0 bool
479+ if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
480+ r0 = returnFunc(domain)
481+ } else {
482+ r0 = ret.Get(0).(bool)
483+ }
484+ return r0
485+}
486+
487+// MockFaviconService_HasPNGOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGOnDisk'
488+type MockFaviconService_HasPNGOnDisk_Call struct {
489+ *mock.Call
490+}
491+
492+// HasPNGOnDisk is a helper method to define mock.On call
493+// - domain string
494+func (_e *MockFaviconService_Expecter) HasPNGOnDisk(domain any) *MockFaviconService_HasPNGOnDisk_Call {
495+ return &MockFaviconService_HasPNGOnDisk_Call{Call: _e.mock.On("HasPNGOnDisk", domain)}
496+}
497+
498+func (_c *MockFaviconService_HasPNGOnDisk_Call) Run(run func(domain string)) *MockFaviconService_HasPNGOnDisk_Call {
499+ _c.Call.Run(func(args mock.Arguments) {
500+ var arg0 string
501+ if args[0] != nil {
502+ arg0 = args[0].(string)
503+ }
504+ run(
505+ arg0,
506+ )
507+ })
508+ return _c
509+}
510+
511+func (_c *MockFaviconService_HasPNGOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGOnDisk_Call {
512+ _c.Call.Return(b)
513+ return _c
514+}
515+
516+func (_c *MockFaviconService_HasPNGOnDisk_Call) RunAndReturn(run func(domain string) bool) *MockFaviconService_HasPNGOnDisk_Call {
517+ _c.Call.Return(run)
518+ return _c
519+}
520+
521+// HasPNGSizedOnDisk provides a mock function for the type MockFaviconService
522+func (_mock *MockFaviconService) HasPNGSizedOnDisk(domain string, size int) bool {
523+ ret := _mock.Called(domain, size)
524+
525+ if len(ret) == 0 {
526+ panic("no return value specified for HasPNGSizedOnDisk")
527+ }
528+
529+ var r0 bool
530+ if returnFunc, ok := ret.Get(0).(func(string, int) bool); ok {
531+ r0 = returnFunc(domain, size)
532+ } else {
533+ r0 = ret.Get(0).(bool)
534+ }
535+ return r0
536+}
537+
538+// MockFaviconService_HasPNGSizedOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGSizedOnDisk'
539+type MockFaviconService_HasPNGSizedOnDisk_Call struct {
540+ *mock.Call
541+}
542+
543+// HasPNGSizedOnDisk is a helper method to define mock.On call
544+// - domain string
545+// - size int
546+func (_e *MockFaviconService_Expecter) HasPNGSizedOnDisk(domain any, size any) *MockFaviconService_HasPNGSizedOnDisk_Call {
547+ return &MockFaviconService_HasPNGSizedOnDisk_Call{Call: _e.mock.On("HasPNGSizedOnDisk", domain, size)}
548+}
549+
550+func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Run(run func(domain string, size int)) *MockFaviconService_HasPNGSizedOnDisk_Call {
551+ _c.Call.Run(func(args mock.Arguments) {
552+ var arg0 string
553+ if args[0] != nil {
554+ arg0 = args[0].(string)
555+ }
556+ var arg1 int
557+ if args[1] != nil {
558+ arg1 = args[1].(int)
559+ }
560+ run(
561+ arg0,
562+ arg1,
563+ )
564+ })
565+ return _c
566+}
567+
568+func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGSizedOnDisk_Call {
569+ _c.Call.Return(b)
570+ return _c
571+}
572+
573+func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) RunAndReturn(run func(domain string, size int) bool) *MockFaviconService_HasPNGSizedOnDisk_Call {
574+ _c.Call.Return(run)
575+ return _c
576+}
A internal/application/port/mocks/filesystem.go +293 -0
@@ -0,0 +1,293 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockFileSystem creates a new instance of MockFileSystem. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockFileSystem(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockFileSystem {
19+ mock := &MockFileSystem{}
20+ mock.Mock.Test(t)
21+
22+ t.Cleanup(func() { mock.AssertExpectations(t) })
23+
24+ return mock
25+}
26+
27+// MockFileSystem is an autogenerated mock type for the FileSystem type
28+type MockFileSystem struct {
29+ mock.Mock
30+}
31+
32+type MockFileSystem_Expecter struct {
33+ mock *mock.Mock
34+}
35+
36+func (_m *MockFileSystem) EXPECT() *MockFileSystem_Expecter {
37+ return &MockFileSystem_Expecter{mock: &_m.Mock}
38+}
39+
40+// Exists provides a mock function for the type MockFileSystem
41+func (_mock *MockFileSystem) Exists(ctx context.Context, path string) (bool, error) {
42+ ret := _mock.Called(ctx, path)
43+
44+ if len(ret) == 0 {
45+ panic("no return value specified for Exists")
46+ }
47+
48+ var r0 bool
49+ var r1 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
51+ return returnFunc(ctx, path)
52+ }
53+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
54+ r0 = returnFunc(ctx, path)
55+ } else {
56+ r0 = ret.Get(0).(bool)
57+ }
58+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
59+ r1 = returnFunc(ctx, path)
60+ } else {
61+ r1 = ret.Error(1)
62+ }
63+ return r0, r1
64+}
65+
66+// MockFileSystem_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists'
67+type MockFileSystem_Exists_Call struct {
68+ *mock.Call
69+}
70+
71+// Exists is a helper method to define mock.On call
72+// - ctx context.Context
73+// - path string
74+func (_e *MockFileSystem_Expecter) Exists(ctx any, path any) *MockFileSystem_Exists_Call {
75+ return &MockFileSystem_Exists_Call{Call: _e.mock.On("Exists", ctx, path)}
76+}
77+
78+func (_c *MockFileSystem_Exists_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_Exists_Call {
79+ _c.Call.Run(func(args mock.Arguments) {
80+ var arg0 context.Context
81+ if args[0] != nil {
82+ arg0 = args[0].(context.Context)
83+ }
84+ var arg1 string
85+ if args[1] != nil {
86+ arg1 = args[1].(string)
87+ }
88+ run(
89+ arg0,
90+ arg1,
91+ )
92+ })
93+ return _c
94+}
95+
96+func (_c *MockFileSystem_Exists_Call) Return(b bool, err error) *MockFileSystem_Exists_Call {
97+ _c.Call.Return(b, err)
98+ return _c
99+}
100+
101+func (_c *MockFileSystem_Exists_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_Exists_Call {
102+ _c.Call.Return(run)
103+ return _c
104+}
105+
106+// GetSize provides a mock function for the type MockFileSystem
107+func (_mock *MockFileSystem) GetSize(ctx context.Context, path string) (int64, error) {
108+ ret := _mock.Called(ctx, path)
109+
110+ if len(ret) == 0 {
111+ panic("no return value specified for GetSize")
112+ }
113+
114+ var r0 int64
115+ var r1 error
116+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok {
117+ return returnFunc(ctx, path)
118+ }
119+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) int64); ok {
120+ r0 = returnFunc(ctx, path)
121+ } else {
122+ r0 = ret.Get(0).(int64)
123+ }
124+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
125+ r1 = returnFunc(ctx, path)
126+ } else {
127+ r1 = ret.Error(1)
128+ }
129+ return r0, r1
130+}
131+
132+// MockFileSystem_GetSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSize'
133+type MockFileSystem_GetSize_Call struct {
134+ *mock.Call
135+}
136+
137+// GetSize is a helper method to define mock.On call
138+// - ctx context.Context
139+// - path string
140+func (_e *MockFileSystem_Expecter) GetSize(ctx any, path any) *MockFileSystem_GetSize_Call {
141+ return &MockFileSystem_GetSize_Call{Call: _e.mock.On("GetSize", ctx, path)}
142+}
143+
144+func (_c *MockFileSystem_GetSize_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_GetSize_Call {
145+ _c.Call.Run(func(args mock.Arguments) {
146+ var arg0 context.Context
147+ if args[0] != nil {
148+ arg0 = args[0].(context.Context)
149+ }
150+ var arg1 string
151+ if args[1] != nil {
152+ arg1 = args[1].(string)
153+ }
154+ run(
155+ arg0,
156+ arg1,
157+ )
158+ })
159+ return _c
160+}
161+
162+func (_c *MockFileSystem_GetSize_Call) Return(n int64, err error) *MockFileSystem_GetSize_Call {
163+ _c.Call.Return(n, err)
164+ return _c
165+}
166+
167+func (_c *MockFileSystem_GetSize_Call) RunAndReturn(run func(ctx context.Context, path string) (int64, error)) *MockFileSystem_GetSize_Call {
168+ _c.Call.Return(run)
169+ return _c
170+}
171+
172+// IsDirectory provides a mock function for the type MockFileSystem
173+func (_mock *MockFileSystem) IsDirectory(ctx context.Context, path string) (bool, error) {
174+ ret := _mock.Called(ctx, path)
175+
176+ if len(ret) == 0 {
177+ panic("no return value specified for IsDirectory")
178+ }
179+
180+ var r0 bool
181+ var r1 error
182+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
183+ return returnFunc(ctx, path)
184+ }
185+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
186+ r0 = returnFunc(ctx, path)
187+ } else {
188+ r0 = ret.Get(0).(bool)
189+ }
190+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
191+ r1 = returnFunc(ctx, path)
192+ } else {
193+ r1 = ret.Error(1)
194+ }
195+ return r0, r1
196+}
197+
198+// MockFileSystem_IsDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDirectory'
199+type MockFileSystem_IsDirectory_Call struct {
200+ *mock.Call
201+}
202+
203+// IsDirectory is a helper method to define mock.On call
204+// - ctx context.Context
205+// - path string
206+func (_e *MockFileSystem_Expecter) IsDirectory(ctx any, path any) *MockFileSystem_IsDirectory_Call {
207+ return &MockFileSystem_IsDirectory_Call{Call: _e.mock.On("IsDirectory", ctx, path)}
208+}
209+
210+func (_c *MockFileSystem_IsDirectory_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_IsDirectory_Call {
211+ _c.Call.Run(func(args mock.Arguments) {
212+ var arg0 context.Context
213+ if args[0] != nil {
214+ arg0 = args[0].(context.Context)
215+ }
216+ var arg1 string
217+ if args[1] != nil {
218+ arg1 = args[1].(string)
219+ }
220+ run(
221+ arg0,
222+ arg1,
223+ )
224+ })
225+ return _c
226+}
227+
228+func (_c *MockFileSystem_IsDirectory_Call) Return(b bool, err error) *MockFileSystem_IsDirectory_Call {
229+ _c.Call.Return(b, err)
230+ return _c
231+}
232+
233+func (_c *MockFileSystem_IsDirectory_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_IsDirectory_Call {
234+ _c.Call.Return(run)
235+ return _c
236+}
237+
238+// RemoveAll provides a mock function for the type MockFileSystem
239+func (_mock *MockFileSystem) RemoveAll(ctx context.Context, path string) error {
240+ ret := _mock.Called(ctx, path)
241+
242+ if len(ret) == 0 {
243+ panic("no return value specified for RemoveAll")
244+ }
245+
246+ var r0 error
247+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
248+ r0 = returnFunc(ctx, path)
249+ } else {
250+ r0 = ret.Error(0)
251+ }
252+ return r0
253+}
254+
255+// MockFileSystem_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll'
256+type MockFileSystem_RemoveAll_Call struct {
257+ *mock.Call
258+}
259+
260+// RemoveAll is a helper method to define mock.On call
261+// - ctx context.Context
262+// - path string
263+func (_e *MockFileSystem_Expecter) RemoveAll(ctx any, path any) *MockFileSystem_RemoveAll_Call {
264+ return &MockFileSystem_RemoveAll_Call{Call: _e.mock.On("RemoveAll", ctx, path)}
265+}
266+
267+func (_c *MockFileSystem_RemoveAll_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_RemoveAll_Call {
268+ _c.Call.Run(func(args mock.Arguments) {
269+ var arg0 context.Context
270+ if args[0] != nil {
271+ arg0 = args[0].(context.Context)
272+ }
273+ var arg1 string
274+ if args[1] != nil {
275+ arg1 = args[1].(string)
276+ }
277+ run(
278+ arg0,
279+ arg1,
280+ )
281+ })
282+ return _c
283+}
284+
285+func (_c *MockFileSystem_RemoveAll_Call) Return(err error) *MockFileSystem_RemoveAll_Call {
286+ _c.Call.Return(err)
287+ return _c
288+}
289+
290+func (_c *MockFileSystem_RemoveAll_Call) RunAndReturn(run func(ctx context.Context, path string) error) *MockFileSystem_RemoveAll_Call {
291+ _c.Call.Return(run)
292+ return _c
293+}
A internal/application/port/mocks/filter_manager.go +119 -0
@@ -0,0 +1,119 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockFilterManager creates a new instance of MockFilterManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockFilterManager(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockFilterManager {
20+ mock := &MockFilterManager{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockFilterManager is an autogenerated mock type for the FilterManager type
29+type MockFilterManager struct {
30+ mock.Mock
31+}
32+
33+type MockFilterManager_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockFilterManager) EXPECT() *MockFilterManager_Expecter {
38+ return &MockFilterManager_Expecter{mock: &_m.Mock}
39+}
40+
41+// LoadAsync provides a mock function for the type MockFilterManager
42+func (_mock *MockFilterManager) LoadAsync(ctx context.Context) {
43+ _mock.Called(ctx)
44+ return
45+}
46+
47+// MockFilterManager_LoadAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadAsync'
48+type MockFilterManager_LoadAsync_Call struct {
49+ *mock.Call
50+}
51+
52+// LoadAsync is a helper method to define mock.On call
53+// - ctx context.Context
54+func (_e *MockFilterManager_Expecter) LoadAsync(ctx any) *MockFilterManager_LoadAsync_Call {
55+ return &MockFilterManager_LoadAsync_Call{Call: _e.mock.On("LoadAsync", ctx)}
56+}
57+
58+func (_c *MockFilterManager_LoadAsync_Call) Run(run func(ctx context.Context)) *MockFilterManager_LoadAsync_Call {
59+ _c.Call.Run(func(args mock.Arguments) {
60+ var arg0 context.Context
61+ if args[0] != nil {
62+ arg0 = args[0].(context.Context)
63+ }
64+ run(
65+ arg0,
66+ )
67+ })
68+ return _c
69+}
70+
71+func (_c *MockFilterManager_LoadAsync_Call) Return() *MockFilterManager_LoadAsync_Call {
72+ _c.Call.Return()
73+ return _c
74+}
75+
76+func (_c *MockFilterManager_LoadAsync_Call) RunAndReturn(run func(ctx context.Context)) *MockFilterManager_LoadAsync_Call {
77+ _c.Run(run)
78+ return _c
79+}
80+
81+// SetStatusCallback provides a mock function for the type MockFilterManager
82+func (_mock *MockFilterManager) SetStatusCallback(fn func(port.FilterStatus)) {
83+ _mock.Called(fn)
84+ return
85+}
86+
87+// MockFilterManager_SetStatusCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStatusCallback'
88+type MockFilterManager_SetStatusCallback_Call struct {
89+ *mock.Call
90+}
91+
92+// SetStatusCallback is a helper method to define mock.On call
93+// - fn func(port.FilterStatus)
94+func (_e *MockFilterManager_Expecter) SetStatusCallback(fn any) *MockFilterManager_SetStatusCallback_Call {
95+ return &MockFilterManager_SetStatusCallback_Call{Call: _e.mock.On("SetStatusCallback", fn)}
96+}
97+
98+func (_c *MockFilterManager_SetStatusCallback_Call) Run(run func(fn func(port.FilterStatus))) *MockFilterManager_SetStatusCallback_Call {
99+ _c.Call.Run(func(args mock.Arguments) {
100+ var arg0 func(port.FilterStatus)
101+ if args[0] != nil {
102+ arg0 = args[0].(func(port.FilterStatus))
103+ }
104+ run(
105+ arg0,
106+ )
107+ })
108+ return _c
109+}
110+
111+func (_c *MockFilterManager_SetStatusCallback_Call) Return() *MockFilterManager_SetStatusCallback_Call {
112+ _c.Call.Return()
113+ return _c
114+}
115+
116+func (_c *MockFilterManager_SetStatusCallback_Call) RunAndReturn(run func(fn func(port.FilterStatus))) *MockFilterManager_SetStatusCallback_Call {
117+ _c.Run(run)
118+ return _c
119+}
A internal/application/port/mocks/font_detector.go +215 -0
@@ -0,0 +1,215 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockFontDetector creates a new instance of MockFontDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockFontDetector(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockFontDetector {
20+ mock := &MockFontDetector{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockFontDetector is an autogenerated mock type for the FontDetector type
29+type MockFontDetector struct {
30+ mock.Mock
31+}
32+
33+type MockFontDetector_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockFontDetector) EXPECT() *MockFontDetector_Expecter {
38+ return &MockFontDetector_Expecter{mock: &_m.Mock}
39+}
40+
41+// GetAvailableFonts provides a mock function for the type MockFontDetector
42+func (_mock *MockFontDetector) GetAvailableFonts(ctx context.Context) ([]string, error) {
43+ ret := _mock.Called(ctx)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for GetAvailableFonts")
47+ }
48+
49+ var r0 []string
50+ var r1 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
52+ return returnFunc(ctx)
53+ }
54+ if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
55+ r0 = returnFunc(ctx)
56+ } else {
57+ if ret.Get(0) != nil {
58+ r0 = ret.Get(0).([]string)
59+ }
60+ }
61+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
62+ r1 = returnFunc(ctx)
63+ } else {
64+ r1 = ret.Error(1)
65+ }
66+ return r0, r1
67+}
68+
69+// MockFontDetector_GetAvailableFonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAvailableFonts'
70+type MockFontDetector_GetAvailableFonts_Call struct {
71+ *mock.Call
72+}
73+
74+// GetAvailableFonts is a helper method to define mock.On call
75+// - ctx context.Context
76+func (_e *MockFontDetector_Expecter) GetAvailableFonts(ctx any) *MockFontDetector_GetAvailableFonts_Call {
77+ return &MockFontDetector_GetAvailableFonts_Call{Call: _e.mock.On("GetAvailableFonts", ctx)}
78+}
79+
80+func (_c *MockFontDetector_GetAvailableFonts_Call) Run(run func(ctx context.Context)) *MockFontDetector_GetAvailableFonts_Call {
81+ _c.Call.Run(func(args mock.Arguments) {
82+ var arg0 context.Context
83+ if args[0] != nil {
84+ arg0 = args[0].(context.Context)
85+ }
86+ run(
87+ arg0,
88+ )
89+ })
90+ return _c
91+}
92+
93+func (_c *MockFontDetector_GetAvailableFonts_Call) Return(strings []string, err error) *MockFontDetector_GetAvailableFonts_Call {
94+ _c.Call.Return(strings, err)
95+ return _c
96+}
97+
98+func (_c *MockFontDetector_GetAvailableFonts_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockFontDetector_GetAvailableFonts_Call {
99+ _c.Call.Return(run)
100+ return _c
101+}
102+
103+// IsAvailable provides a mock function for the type MockFontDetector
104+func (_mock *MockFontDetector) IsAvailable(ctx context.Context) bool {
105+ ret := _mock.Called(ctx)
106+
107+ if len(ret) == 0 {
108+ panic("no return value specified for IsAvailable")
109+ }
110+
111+ var r0 bool
112+ if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
113+ r0 = returnFunc(ctx)
114+ } else {
115+ r0 = ret.Get(0).(bool)
116+ }
117+ return r0
118+}
119+
120+// MockFontDetector_IsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAvailable'
121+type MockFontDetector_IsAvailable_Call struct {
122+ *mock.Call
123+}
124+
125+// IsAvailable is a helper method to define mock.On call
126+// - ctx context.Context
127+func (_e *MockFontDetector_Expecter) IsAvailable(ctx any) *MockFontDetector_IsAvailable_Call {
128+ return &MockFontDetector_IsAvailable_Call{Call: _e.mock.On("IsAvailable", ctx)}
129+}
130+
131+func (_c *MockFontDetector_IsAvailable_Call) Run(run func(ctx context.Context)) *MockFontDetector_IsAvailable_Call {
132+ _c.Call.Run(func(args mock.Arguments) {
133+ var arg0 context.Context
134+ if args[0] != nil {
135+ arg0 = args[0].(context.Context)
136+ }
137+ run(
138+ arg0,
139+ )
140+ })
141+ return _c
142+}
143+
144+func (_c *MockFontDetector_IsAvailable_Call) Return(b bool) *MockFontDetector_IsAvailable_Call {
145+ _c.Call.Return(b)
146+ return _c
147+}
148+
149+func (_c *MockFontDetector_IsAvailable_Call) RunAndReturn(run func(ctx context.Context) bool) *MockFontDetector_IsAvailable_Call {
150+ _c.Call.Return(run)
151+ return _c
152+}
153+
154+// SelectBestFont provides a mock function for the type MockFontDetector
155+func (_mock *MockFontDetector) SelectBestFont(ctx context.Context, category port.FontCategory, fallbackChain []string) string {
156+ ret := _mock.Called(ctx, category, fallbackChain)
157+
158+ if len(ret) == 0 {
159+ panic("no return value specified for SelectBestFont")
160+ }
161+
162+ var r0 string
163+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.FontCategory, []string) string); ok {
164+ r0 = returnFunc(ctx, category, fallbackChain)
165+ } else {
166+ r0 = ret.Get(0).(string)
167+ }
168+ return r0
169+}
170+
171+// MockFontDetector_SelectBestFont_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectBestFont'
172+type MockFontDetector_SelectBestFont_Call struct {
173+ *mock.Call
174+}
175+
176+// SelectBestFont is a helper method to define mock.On call
177+// - ctx context.Context
178+// - category port.FontCategory
179+// - fallbackChain []string
180+func (_e *MockFontDetector_Expecter) SelectBestFont(ctx any, category any, fallbackChain any) *MockFontDetector_SelectBestFont_Call {
181+ return &MockFontDetector_SelectBestFont_Call{Call: _e.mock.On("SelectBestFont", ctx, category, fallbackChain)}
182+}
183+
184+func (_c *MockFontDetector_SelectBestFont_Call) Run(run func(ctx context.Context, category port.FontCategory, fallbackChain []string)) *MockFontDetector_SelectBestFont_Call {
185+ _c.Call.Run(func(args mock.Arguments) {
186+ var arg0 context.Context
187+ if args[0] != nil {
188+ arg0 = args[0].(context.Context)
189+ }
190+ var arg1 port.FontCategory
191+ if args[1] != nil {
192+ arg1 = args[1].(port.FontCategory)
193+ }
194+ var arg2 []string
195+ if args[2] != nil {
196+ arg2 = args[2].([]string)
197+ }
198+ run(
199+ arg0,
200+ arg1,
201+ arg2,
202+ )
203+ })
204+ return _c
205+}
206+
207+func (_c *MockFontDetector_SelectBestFont_Call) Return(s string) *MockFontDetector_SelectBestFont_Call {
208+ _c.Call.Return(s)
209+ return _c
210+}
211+
212+func (_c *MockFontDetector_SelectBestFont_Call) RunAndReturn(run func(ctx context.Context, category port.FontCategory, fallbackChain []string) string) *MockFontDetector_SelectBestFont_Call {
213+ _c.Call.Return(run)
214+ return _c
215+}
A internal/application/port/mocks/handler_deps.go +305 -0
@@ -0,0 +1,305 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockAccentKeyHandler creates a new instance of MockAccentKeyHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockAccentKeyHandler(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockAccentKeyHandler {
20+ mock := &MockAccentKeyHandler{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockAccentKeyHandler is an autogenerated mock type for the AccentKeyHandler type
29+type MockAccentKeyHandler struct {
30+ mock.Mock
31+}
32+
33+type MockAccentKeyHandler_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockAccentKeyHandler) EXPECT() *MockAccentKeyHandler_Expecter {
38+ return &MockAccentKeyHandler_Expecter{mock: &_m.Mock}
39+}
40+
41+// OnKeyPressed provides a mock function for the type MockAccentKeyHandler
42+func (_mock *MockAccentKeyHandler) OnKeyPressed(ctx context.Context, char rune, shiftHeld bool) bool {
43+ ret := _mock.Called(ctx, char, shiftHeld)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for OnKeyPressed")
47+ }
48+
49+ var r0 bool
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, rune, bool) bool); ok {
51+ r0 = returnFunc(ctx, char, shiftHeld)
52+ } else {
53+ r0 = ret.Get(0).(bool)
54+ }
55+ return r0
56+}
57+
58+// MockAccentKeyHandler_OnKeyPressed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnKeyPressed'
59+type MockAccentKeyHandler_OnKeyPressed_Call struct {
60+ *mock.Call
61+}
62+
63+// OnKeyPressed is a helper method to define mock.On call
64+// - ctx context.Context
65+// - char rune
66+// - shiftHeld bool
67+func (_e *MockAccentKeyHandler_Expecter) OnKeyPressed(ctx any, char any, shiftHeld any) *MockAccentKeyHandler_OnKeyPressed_Call {
68+ return &MockAccentKeyHandler_OnKeyPressed_Call{Call: _e.mock.On("OnKeyPressed", ctx, char, shiftHeld)}
69+}
70+
71+func (_c *MockAccentKeyHandler_OnKeyPressed_Call) Run(run func(ctx context.Context, char rune, shiftHeld bool)) *MockAccentKeyHandler_OnKeyPressed_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ var arg1 rune
78+ if args[1] != nil {
79+ arg1 = args[1].(rune)
80+ }
81+ var arg2 bool
82+ if args[2] != nil {
83+ arg2 = args[2].(bool)
84+ }
85+ run(
86+ arg0,
87+ arg1,
88+ arg2,
89+ )
90+ })
91+ return _c
92+}
93+
94+func (_c *MockAccentKeyHandler_OnKeyPressed_Call) Return(b bool) *MockAccentKeyHandler_OnKeyPressed_Call {
95+ _c.Call.Return(b)
96+ return _c
97+}
98+
99+func (_c *MockAccentKeyHandler_OnKeyPressed_Call) RunAndReturn(run func(ctx context.Context, char rune, shiftHeld bool) bool) *MockAccentKeyHandler_OnKeyPressed_Call {
100+ _c.Call.Return(run)
101+ return _c
102+}
103+
104+// OnKeyReleased provides a mock function for the type MockAccentKeyHandler
105+func (_mock *MockAccentKeyHandler) OnKeyReleased(ctx context.Context, char rune) {
106+ _mock.Called(ctx, char)
107+ return
108+}
109+
110+// MockAccentKeyHandler_OnKeyReleased_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnKeyReleased'
111+type MockAccentKeyHandler_OnKeyReleased_Call struct {
112+ *mock.Call
113+}
114+
115+// OnKeyReleased is a helper method to define mock.On call
116+// - ctx context.Context
117+// - char rune
118+func (_e *MockAccentKeyHandler_Expecter) OnKeyReleased(ctx any, char any) *MockAccentKeyHandler_OnKeyReleased_Call {
119+ return &MockAccentKeyHandler_OnKeyReleased_Call{Call: _e.mock.On("OnKeyReleased", ctx, char)}
120+}
121+
122+func (_c *MockAccentKeyHandler_OnKeyReleased_Call) Run(run func(ctx context.Context, char rune)) *MockAccentKeyHandler_OnKeyReleased_Call {
123+ _c.Call.Run(func(args mock.Arguments) {
124+ var arg0 context.Context
125+ if args[0] != nil {
126+ arg0 = args[0].(context.Context)
127+ }
128+ var arg1 rune
129+ if args[1] != nil {
130+ arg1 = args[1].(rune)
131+ }
132+ run(
133+ arg0,
134+ arg1,
135+ )
136+ })
137+ return _c
138+}
139+
140+func (_c *MockAccentKeyHandler_OnKeyReleased_Call) Return() *MockAccentKeyHandler_OnKeyReleased_Call {
141+ _c.Call.Return()
142+ return _c
143+}
144+
145+func (_c *MockAccentKeyHandler_OnKeyReleased_Call) RunAndReturn(run func(ctx context.Context, char rune)) *MockAccentKeyHandler_OnKeyReleased_Call {
146+ _c.Run(run)
147+ return _c
148+}
149+
150+// NewMockDownloadPreparer creates a new instance of MockDownloadPreparer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
151+// The first argument is typically a *testing.T value.
152+func NewMockDownloadPreparer(t interface {
153+ mock.TestingT
154+ Cleanup(func())
155+}) *MockDownloadPreparer {
156+ mock := &MockDownloadPreparer{}
157+ mock.Mock.Test(t)
158+
159+ t.Cleanup(func() { mock.AssertExpectations(t) })
160+
161+ return mock
162+}
163+
164+// MockDownloadPreparer is an autogenerated mock type for the DownloadPreparer type
165+type MockDownloadPreparer struct {
166+ mock.Mock
167+}
168+
169+type MockDownloadPreparer_Expecter struct {
170+ mock *mock.Mock
171+}
172+
173+func (_m *MockDownloadPreparer) EXPECT() *MockDownloadPreparer_Expecter {
174+ return &MockDownloadPreparer_Expecter{mock: &_m.Mock}
175+}
176+
177+// Execute provides a mock function for the type MockDownloadPreparer
178+func (_mock *MockDownloadPreparer) Execute(ctx context.Context, input port.DownloadPrepareInput) *port.DownloadPrepareOutput {
179+ ret := _mock.Called(ctx, input)
180+
181+ if len(ret) == 0 {
182+ panic("no return value specified for Execute")
183+ }
184+
185+ var r0 *port.DownloadPrepareOutput
186+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.DownloadPrepareInput) *port.DownloadPrepareOutput); ok {
187+ r0 = returnFunc(ctx, input)
188+ } else {
189+ if ret.Get(0) != nil {
190+ r0 = ret.Get(0).(*port.DownloadPrepareOutput)
191+ }
192+ }
193+ return r0
194+}
195+
196+// MockDownloadPreparer_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
197+type MockDownloadPreparer_Execute_Call struct {
198+ *mock.Call
199+}
200+
201+// Execute is a helper method to define mock.On call
202+// - ctx context.Context
203+// - input port.DownloadPrepareInput
204+func (_e *MockDownloadPreparer_Expecter) Execute(ctx any, input any) *MockDownloadPreparer_Execute_Call {
205+ return &MockDownloadPreparer_Execute_Call{Call: _e.mock.On("Execute", ctx, input)}
206+}
207+
208+func (_c *MockDownloadPreparer_Execute_Call) Run(run func(ctx context.Context, input port.DownloadPrepareInput)) *MockDownloadPreparer_Execute_Call {
209+ _c.Call.Run(func(args mock.Arguments) {
210+ var arg0 context.Context
211+ if args[0] != nil {
212+ arg0 = args[0].(context.Context)
213+ }
214+ var arg1 port.DownloadPrepareInput
215+ if args[1] != nil {
216+ arg1 = args[1].(port.DownloadPrepareInput)
217+ }
218+ run(
219+ arg0,
220+ arg1,
221+ )
222+ })
223+ return _c
224+}
225+
226+func (_c *MockDownloadPreparer_Execute_Call) Return(downloadPrepareOutput *port.DownloadPrepareOutput) *MockDownloadPreparer_Execute_Call {
227+ _c.Call.Return(downloadPrepareOutput)
228+ return _c
229+}
230+
231+func (_c *MockDownloadPreparer_Execute_Call) RunAndReturn(run func(ctx context.Context, input port.DownloadPrepareInput) *port.DownloadPrepareOutput) *MockDownloadPreparer_Execute_Call {
232+ _c.Call.Return(run)
233+ return _c
234+}
235+
236+// NewMockAutoCopyConfig creates a new instance of MockAutoCopyConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
237+// The first argument is typically a *testing.T value.
238+func NewMockAutoCopyConfig(t interface {
239+ mock.TestingT
240+ Cleanup(func())
241+}) *MockAutoCopyConfig {
242+ mock := &MockAutoCopyConfig{}
243+ mock.Mock.Test(t)
244+
245+ t.Cleanup(func() { mock.AssertExpectations(t) })
246+
247+ return mock
248+}
249+
250+// MockAutoCopyConfig is an autogenerated mock type for the AutoCopyConfig type
251+type MockAutoCopyConfig struct {
252+ mock.Mock
253+}
254+
255+type MockAutoCopyConfig_Expecter struct {
256+ mock *mock.Mock
257+}
258+
259+func (_m *MockAutoCopyConfig) EXPECT() *MockAutoCopyConfig_Expecter {
260+ return &MockAutoCopyConfig_Expecter{mock: &_m.Mock}
261+}
262+
263+// IsAutoCopyEnabled provides a mock function for the type MockAutoCopyConfig
264+func (_mock *MockAutoCopyConfig) IsAutoCopyEnabled() bool {
265+ ret := _mock.Called()
266+
267+ if len(ret) == 0 {
268+ panic("no return value specified for IsAutoCopyEnabled")
269+ }
270+
271+ var r0 bool
272+ if returnFunc, ok := ret.Get(0).(func() bool); ok {
273+ r0 = returnFunc()
274+ } else {
275+ r0 = ret.Get(0).(bool)
276+ }
277+ return r0
278+}
279+
280+// MockAutoCopyConfig_IsAutoCopyEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAutoCopyEnabled'
281+type MockAutoCopyConfig_IsAutoCopyEnabled_Call struct {
282+ *mock.Call
283+}
284+
285+// IsAutoCopyEnabled is a helper method to define mock.On call
286+func (_e *MockAutoCopyConfig_Expecter) IsAutoCopyEnabled() *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
287+ return &MockAutoCopyConfig_IsAutoCopyEnabled_Call{Call: _e.mock.On("IsAutoCopyEnabled")}
288+}
289+
290+func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) Run(run func()) *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
291+ _c.Call.Run(func(args mock.Arguments) {
292+ run()
293+ })
294+ return _c
295+}
296+
297+func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) Return(b bool) *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
298+ _c.Call.Return(b)
299+ return _c
300+}
301+
302+func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) RunAndReturn(run func() bool) *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
303+ _c.Call.Return(run)
304+ return _c
305+}
A internal/application/port/mocks/hardware.go +90 -0
@@ -0,0 +1,90 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockHardwareSurveyor creates a new instance of MockHardwareSurveyor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockHardwareSurveyor(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockHardwareSurveyor {
20+ mock := &MockHardwareSurveyor{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockHardwareSurveyor is an autogenerated mock type for the HardwareSurveyor type
29+type MockHardwareSurveyor struct {
30+ mock.Mock
31+}
32+
33+type MockHardwareSurveyor_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockHardwareSurveyor) EXPECT() *MockHardwareSurveyor_Expecter {
38+ return &MockHardwareSurveyor_Expecter{mock: &_m.Mock}
39+}
40+
41+// Survey provides a mock function for the type MockHardwareSurveyor
42+func (_mock *MockHardwareSurveyor) Survey(ctx context.Context) port.HardwareInfo {
43+ ret := _mock.Called(ctx)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Survey")
47+ }
48+
49+ var r0 port.HardwareInfo
50+ if returnFunc, ok := ret.Get(0).(func(context.Context) port.HardwareInfo); ok {
51+ r0 = returnFunc(ctx)
52+ } else {
53+ r0 = ret.Get(0).(port.HardwareInfo)
54+ }
55+ return r0
56+}
57+
58+// MockHardwareSurveyor_Survey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Survey'
59+type MockHardwareSurveyor_Survey_Call struct {
60+ *mock.Call
61+}
62+
63+// Survey is a helper method to define mock.On call
64+// - ctx context.Context
65+func (_e *MockHardwareSurveyor_Expecter) Survey(ctx any) *MockHardwareSurveyor_Survey_Call {
66+ return &MockHardwareSurveyor_Survey_Call{Call: _e.mock.On("Survey", ctx)}
67+}
68+
69+func (_c *MockHardwareSurveyor_Survey_Call) Run(run func(ctx context.Context)) *MockHardwareSurveyor_Survey_Call {
70+ _c.Call.Run(func(args mock.Arguments) {
71+ var arg0 context.Context
72+ if args[0] != nil {
73+ arg0 = args[0].(context.Context)
74+ }
75+ run(
76+ arg0,
77+ )
78+ })
79+ return _c
80+}
81+
82+func (_c *MockHardwareSurveyor_Survey_Call) Return(hardwareInfo port.HardwareInfo) *MockHardwareSurveyor_Survey_Call {
83+ _c.Call.Return(hardwareInfo)
84+ return _c
85+}
86+
87+func (_c *MockHardwareSurveyor_Survey_Call) RunAndReturn(run func(ctx context.Context) port.HardwareInfo) *MockHardwareSurveyor_Survey_Call {
88+ _c.Call.Return(run)
89+ return _c
90+}
A internal/application/port/mocks/history_sidebar.go +239 -0
@@ -0,0 +1,239 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/dto"
11+ "github.com/bnema/dumber/internal/domain/entity"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// 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.
16+// The first argument is typically a *testing.T value.
17+func NewMockHistorySidebarHistory(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockHistorySidebarHistory {
21+ mock := &MockHistorySidebarHistory{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockHistorySidebarHistory is an autogenerated mock type for the HistorySidebarHistory type
30+type MockHistorySidebarHistory struct {
31+ mock.Mock
32+}
33+
34+type MockHistorySidebarHistory_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockHistorySidebarHistory) EXPECT() *MockHistorySidebarHistory_Expecter {
39+ return &MockHistorySidebarHistory_Expecter{mock: &_m.Mock}
40+}
41+
42+// Delete provides a mock function for the type MockHistorySidebarHistory
43+func (_mock *MockHistorySidebarHistory) Delete(ctx context.Context, id int64) error {
44+ ret := _mock.Called(ctx, id)
45+
46+ if len(ret) == 0 {
47+ panic("no return value specified for Delete")
48+ }
49+
50+ var r0 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
52+ r0 = returnFunc(ctx, id)
53+ } else {
54+ r0 = ret.Error(0)
55+ }
56+ return r0
57+}
58+
59+// MockHistorySidebarHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
60+type MockHistorySidebarHistory_Delete_Call struct {
61+ *mock.Call
62+}
63+
64+// Delete is a helper method to define mock.On call
65+// - ctx context.Context
66+// - id int64
67+func (_e *MockHistorySidebarHistory_Expecter) Delete(ctx any, id any) *MockHistorySidebarHistory_Delete_Call {
68+ return &MockHistorySidebarHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
69+}
70+
71+func (_c *MockHistorySidebarHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistorySidebarHistory_Delete_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ var arg1 int64
78+ if args[1] != nil {
79+ arg1 = args[1].(int64)
80+ }
81+ run(
82+ arg0,
83+ arg1,
84+ )
85+ })
86+ return _c
87+}
88+
89+func (_c *MockHistorySidebarHistory_Delete_Call) Return(err error) *MockHistorySidebarHistory_Delete_Call {
90+ _c.Call.Return(err)
91+ return _c
92+}
93+
94+func (_c *MockHistorySidebarHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistorySidebarHistory_Delete_Call {
95+ _c.Call.Return(run)
96+ return _c
97+}
98+
99+// GetRecent provides a mock function for the type MockHistorySidebarHistory
100+func (_mock *MockHistorySidebarHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
101+ ret := _mock.Called(ctx, limit, offset)
102+
103+ if len(ret) == 0 {
104+ panic("no return value specified for GetRecent")
105+ }
106+
107+ var r0 []*entity.HistoryEntry
108+ var r1 error
109+ if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
110+ return returnFunc(ctx, limit, offset)
111+ }
112+ if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
113+ r0 = returnFunc(ctx, limit, offset)
114+ } else {
115+ if ret.Get(0) != nil {
116+ r0 = ret.Get(0).([]*entity.HistoryEntry)
117+ }
118+ }
119+ if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
120+ r1 = returnFunc(ctx, limit, offset)
121+ } else {
122+ r1 = ret.Error(1)
123+ }
124+ return r0, r1
125+}
126+
127+// MockHistorySidebarHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
128+type MockHistorySidebarHistory_GetRecent_Call struct {
129+ *mock.Call
130+}
131+
132+// GetRecent is a helper method to define mock.On call
133+// - ctx context.Context
134+// - limit int
135+// - offset int
136+func (_e *MockHistorySidebarHistory_Expecter) GetRecent(ctx any, limit any, offset any) *MockHistorySidebarHistory_GetRecent_Call {
137+ return &MockHistorySidebarHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)}
138+}
139+
140+func (_c *MockHistorySidebarHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistorySidebarHistory_GetRecent_Call {
141+ _c.Call.Run(func(args mock.Arguments) {
142+ var arg0 context.Context
143+ if args[0] != nil {
144+ arg0 = args[0].(context.Context)
145+ }
146+ var arg1 int
147+ if args[1] != nil {
148+ arg1 = args[1].(int)
149+ }
150+ var arg2 int
151+ if args[2] != nil {
152+ arg2 = args[2].(int)
153+ }
154+ run(
155+ arg0,
156+ arg1,
157+ arg2,
158+ )
159+ })
160+ return _c
161+}
162+
163+func (_c *MockHistorySidebarHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistorySidebarHistory_GetRecent_Call {
164+ _c.Call.Return(historyEntrys, err)
165+ return _c
166+}
167+
168+func (_c *MockHistorySidebarHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistorySidebarHistory_GetRecent_Call {
169+ _c.Call.Return(run)
170+ return _c
171+}
172+
173+// Search provides a mock function for the type MockHistorySidebarHistory
174+func (_mock *MockHistorySidebarHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) {
175+ ret := _mock.Called(ctx, input)
176+
177+ if len(ret) == 0 {
178+ panic("no return value specified for Search")
179+ }
180+
181+ var r0 *dto.HistorySearchOutput
182+ var r1 error
183+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok {
184+ return returnFunc(ctx, input)
185+ }
186+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok {
187+ r0 = returnFunc(ctx, input)
188+ } else {
189+ if ret.Get(0) != nil {
190+ r0 = ret.Get(0).(*dto.HistorySearchOutput)
191+ }
192+ }
193+ if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok {
194+ r1 = returnFunc(ctx, input)
195+ } else {
196+ r1 = ret.Error(1)
197+ }
198+ return r0, r1
199+}
200+
201+// MockHistorySidebarHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
202+type MockHistorySidebarHistory_Search_Call struct {
203+ *mock.Call
204+}
205+
206+// Search is a helper method to define mock.On call
207+// - ctx context.Context
208+// - input dto.HistorySearchInput
209+func (_e *MockHistorySidebarHistory_Expecter) Search(ctx any, input any) *MockHistorySidebarHistory_Search_Call {
210+ return &MockHistorySidebarHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)}
211+}
212+
213+func (_c *MockHistorySidebarHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHistorySidebarHistory_Search_Call {
214+ _c.Call.Run(func(args mock.Arguments) {
215+ var arg0 context.Context
216+ if args[0] != nil {
217+ arg0 = args[0].(context.Context)
218+ }
219+ var arg1 dto.HistorySearchInput
220+ if args[1] != nil {
221+ arg1 = args[1].(dto.HistorySearchInput)
222+ }
223+ run(
224+ arg0,
225+ arg1,
226+ )
227+ })
228+ return _c
229+}
230+
231+func (_c *MockHistorySidebarHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHistorySidebarHistory_Search_Call {
232+ _c.Call.Return(historySearchOutput, err)
233+ return _c
234+}
235+
236+func (_c *MockHistorySidebarHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHistorySidebarHistory_Search_Call {
237+ _c.Call.Return(run)
238+ return _c
239+}
A internal/application/port/mocks/homepage.go +1940 -0
@@ -0,0 +1,1940 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+ "time"
10+
11+ "github.com/bnema/dumber/internal/application/dto"
12+ "github.com/bnema/dumber/internal/domain/entity"
13+ mock "github.com/stretchr/testify/mock"
14+)
15+
16+// NewMockHomepageHistory creates a new instance of MockHomepageHistory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
17+// The first argument is typically a *testing.T value.
18+func NewMockHomepageHistory(t interface {
19+ mock.TestingT
20+ Cleanup(func())
21+}) *MockHomepageHistory {
22+ mock := &MockHomepageHistory{}
23+ mock.Mock.Test(t)
24+
25+ t.Cleanup(func() { mock.AssertExpectations(t) })
26+
27+ return mock
28+}
29+
30+// MockHomepageHistory is an autogenerated mock type for the HomepageHistory type
31+type MockHomepageHistory struct {
32+ mock.Mock
33+}
34+
35+type MockHomepageHistory_Expecter struct {
36+ mock *mock.Mock
37+}
38+
39+func (_m *MockHomepageHistory) EXPECT() *MockHomepageHistory_Expecter {
40+ return &MockHomepageHistory_Expecter{mock: &_m.Mock}
41+}
42+
43+// ClearAll provides a mock function for the type MockHomepageHistory
44+func (_mock *MockHomepageHistory) ClearAll(ctx context.Context) error {
45+ ret := _mock.Called(ctx)
46+
47+ if len(ret) == 0 {
48+ panic("no return value specified for ClearAll")
49+ }
50+
51+ var r0 error
52+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
53+ r0 = returnFunc(ctx)
54+ } else {
55+ r0 = ret.Error(0)
56+ }
57+ return r0
58+}
59+
60+// MockHomepageHistory_ClearAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearAll'
61+type MockHomepageHistory_ClearAll_Call struct {
62+ *mock.Call
63+}
64+
65+// ClearAll is a helper method to define mock.On call
66+// - ctx context.Context
67+func (_e *MockHomepageHistory_Expecter) ClearAll(ctx any) *MockHomepageHistory_ClearAll_Call {
68+ return &MockHomepageHistory_ClearAll_Call{Call: _e.mock.On("ClearAll", ctx)}
69+}
70+
71+func (_c *MockHomepageHistory_ClearAll_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_ClearAll_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ run(
78+ arg0,
79+ )
80+ })
81+ return _c
82+}
83+
84+func (_c *MockHomepageHistory_ClearAll_Call) Return(err error) *MockHomepageHistory_ClearAll_Call {
85+ _c.Call.Return(err)
86+ return _c
87+}
88+
89+func (_c *MockHomepageHistory_ClearAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHomepageHistory_ClearAll_Call {
90+ _c.Call.Return(run)
91+ return _c
92+}
93+
94+// ClearOlderThan provides a mock function for the type MockHomepageHistory
95+func (_mock *MockHomepageHistory) ClearOlderThan(ctx context.Context, before time.Time) error {
96+ ret := _mock.Called(ctx, before)
97+
98+ if len(ret) == 0 {
99+ panic("no return value specified for ClearOlderThan")
100+ }
101+
102+ var r0 error
103+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
104+ r0 = returnFunc(ctx, before)
105+ } else {
106+ r0 = ret.Error(0)
107+ }
108+ return r0
109+}
110+
111+// MockHomepageHistory_ClearOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearOlderThan'
112+type MockHomepageHistory_ClearOlderThan_Call struct {
113+ *mock.Call
114+}
115+
116+// ClearOlderThan is a helper method to define mock.On call
117+// - ctx context.Context
118+// - before time.Time
119+func (_e *MockHomepageHistory_Expecter) ClearOlderThan(ctx any, before any) *MockHomepageHistory_ClearOlderThan_Call {
120+ return &MockHomepageHistory_ClearOlderThan_Call{Call: _e.mock.On("ClearOlderThan", ctx, before)}
121+}
122+
123+func (_c *MockHomepageHistory_ClearOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHomepageHistory_ClearOlderThan_Call {
124+ _c.Call.Run(func(args mock.Arguments) {
125+ var arg0 context.Context
126+ if args[0] != nil {
127+ arg0 = args[0].(context.Context)
128+ }
129+ var arg1 time.Time
130+ if args[1] != nil {
131+ arg1 = args[1].(time.Time)
132+ }
133+ run(
134+ arg0,
135+ arg1,
136+ )
137+ })
138+ return _c
139+}
140+
141+func (_c *MockHomepageHistory_ClearOlderThan_Call) Return(err error) *MockHomepageHistory_ClearOlderThan_Call {
142+ _c.Call.Return(err)
143+ return _c
144+}
145+
146+func (_c *MockHomepageHistory_ClearOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHomepageHistory_ClearOlderThan_Call {
147+ _c.Call.Return(run)
148+ return _c
149+}
150+
151+// ClearRange provides a mock function for the type MockHomepageHistory
152+func (_mock *MockHomepageHistory) ClearRange(ctx context.Context, rangeID string) error {
153+ ret := _mock.Called(ctx, rangeID)
154+
155+ if len(ret) == 0 {
156+ panic("no return value specified for ClearRange")
157+ }
158+
159+ var r0 error
160+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
161+ r0 = returnFunc(ctx, rangeID)
162+ } else {
163+ r0 = ret.Error(0)
164+ }
165+ return r0
166+}
167+
168+// MockHomepageHistory_ClearRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearRange'
169+type MockHomepageHistory_ClearRange_Call struct {
170+ *mock.Call
171+}
172+
173+// ClearRange is a helper method to define mock.On call
174+// - ctx context.Context
175+// - rangeID string
176+func (_e *MockHomepageHistory_Expecter) ClearRange(ctx any, rangeID any) *MockHomepageHistory_ClearRange_Call {
177+ return &MockHomepageHistory_ClearRange_Call{Call: _e.mock.On("ClearRange", ctx, rangeID)}
178+}
179+
180+func (_c *MockHomepageHistory_ClearRange_Call) Run(run func(ctx context.Context, rangeID string)) *MockHomepageHistory_ClearRange_Call {
181+ _c.Call.Run(func(args mock.Arguments) {
182+ var arg0 context.Context
183+ if args[0] != nil {
184+ arg0 = args[0].(context.Context)
185+ }
186+ var arg1 string
187+ if args[1] != nil {
188+ arg1 = args[1].(string)
189+ }
190+ run(
191+ arg0,
192+ arg1,
193+ )
194+ })
195+ return _c
196+}
197+
198+func (_c *MockHomepageHistory_ClearRange_Call) Return(err error) *MockHomepageHistory_ClearRange_Call {
199+ _c.Call.Return(err)
200+ return _c
201+}
202+
203+func (_c *MockHomepageHistory_ClearRange_Call) RunAndReturn(run func(ctx context.Context, rangeID string) error) *MockHomepageHistory_ClearRange_Call {
204+ _c.Call.Return(run)
205+ return _c
206+}
207+
208+// Delete provides a mock function for the type MockHomepageHistory
209+func (_mock *MockHomepageHistory) Delete(ctx context.Context, id int64) error {
210+ ret := _mock.Called(ctx, id)
211+
212+ if len(ret) == 0 {
213+ panic("no return value specified for Delete")
214+ }
215+
216+ var r0 error
217+ if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
218+ r0 = returnFunc(ctx, id)
219+ } else {
220+ r0 = ret.Error(0)
221+ }
222+ return r0
223+}
224+
225+// MockHomepageHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
226+type MockHomepageHistory_Delete_Call struct {
227+ *mock.Call
228+}
229+
230+// Delete is a helper method to define mock.On call
231+// - ctx context.Context
232+// - id int64
233+func (_e *MockHomepageHistory_Expecter) Delete(ctx any, id any) *MockHomepageHistory_Delete_Call {
234+ return &MockHomepageHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
235+}
236+
237+func (_c *MockHomepageHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHomepageHistory_Delete_Call {
238+ _c.Call.Run(func(args mock.Arguments) {
239+ var arg0 context.Context
240+ if args[0] != nil {
241+ arg0 = args[0].(context.Context)
242+ }
243+ var arg1 int64
244+ if args[1] != nil {
245+ arg1 = args[1].(int64)
246+ }
247+ run(
248+ arg0,
249+ arg1,
250+ )
251+ })
252+ return _c
253+}
254+
255+func (_c *MockHomepageHistory_Delete_Call) Return(err error) *MockHomepageHistory_Delete_Call {
256+ _c.Call.Return(err)
257+ return _c
258+}
259+
260+func (_c *MockHomepageHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHomepageHistory_Delete_Call {
261+ _c.Call.Return(run)
262+ return _c
263+}
264+
265+// DeleteByDomain provides a mock function for the type MockHomepageHistory
266+func (_mock *MockHomepageHistory) DeleteByDomain(ctx context.Context, domain string) error {
267+ ret := _mock.Called(ctx, domain)
268+
269+ if len(ret) == 0 {
270+ panic("no return value specified for DeleteByDomain")
271+ }
272+
273+ var r0 error
274+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
275+ r0 = returnFunc(ctx, domain)
276+ } else {
277+ r0 = ret.Error(0)
278+ }
279+ return r0
280+}
281+
282+// MockHomepageHistory_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain'
283+type MockHomepageHistory_DeleteByDomain_Call struct {
284+ *mock.Call
285+}
286+
287+// DeleteByDomain is a helper method to define mock.On call
288+// - ctx context.Context
289+// - domain string
290+func (_e *MockHomepageHistory_Expecter) DeleteByDomain(ctx any, domain any) *MockHomepageHistory_DeleteByDomain_Call {
291+ return &MockHomepageHistory_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)}
292+}
293+
294+func (_c *MockHomepageHistory_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHomepageHistory_DeleteByDomain_Call {
295+ _c.Call.Run(func(args mock.Arguments) {
296+ var arg0 context.Context
297+ if args[0] != nil {
298+ arg0 = args[0].(context.Context)
299+ }
300+ var arg1 string
301+ if args[1] != nil {
302+ arg1 = args[1].(string)
303+ }
304+ run(
305+ arg0,
306+ arg1,
307+ )
308+ })
309+ return _c
310+}
311+
312+func (_c *MockHomepageHistory_DeleteByDomain_Call) Return(err error) *MockHomepageHistory_DeleteByDomain_Call {
313+ _c.Call.Return(err)
314+ return _c
315+}
316+
317+func (_c *MockHomepageHistory_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHomepageHistory_DeleteByDomain_Call {
318+ _c.Call.Return(run)
319+ return _c
320+}
321+
322+// GetAnalytics provides a mock function for the type MockHomepageHistory
323+func (_mock *MockHomepageHistory) GetAnalytics(ctx context.Context) (*entity.HistoryAnalytics, error) {
324+ ret := _mock.Called(ctx)
325+
326+ if len(ret) == 0 {
327+ panic("no return value specified for GetAnalytics")
328+ }
329+
330+ var r0 *entity.HistoryAnalytics
331+ var r1 error
332+ if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryAnalytics, error)); ok {
333+ return returnFunc(ctx)
334+ }
335+ if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryAnalytics); ok {
336+ r0 = returnFunc(ctx)
337+ } else {
338+ if ret.Get(0) != nil {
339+ r0 = ret.Get(0).(*entity.HistoryAnalytics)
340+ }
341+ }
342+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
343+ r1 = returnFunc(ctx)
344+ } else {
345+ r1 = ret.Error(1)
346+ }
347+ return r0, r1
348+}
349+
350+// MockHomepageHistory_GetAnalytics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnalytics'
351+type MockHomepageHistory_GetAnalytics_Call struct {
352+ *mock.Call
353+}
354+
355+// GetAnalytics is a helper method to define mock.On call
356+// - ctx context.Context
357+func (_e *MockHomepageHistory_Expecter) GetAnalytics(ctx any) *MockHomepageHistory_GetAnalytics_Call {
358+ return &MockHomepageHistory_GetAnalytics_Call{Call: _e.mock.On("GetAnalytics", ctx)}
359+}
360+
361+func (_c *MockHomepageHistory_GetAnalytics_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetAnalytics_Call {
362+ _c.Call.Run(func(args mock.Arguments) {
363+ var arg0 context.Context
364+ if args[0] != nil {
365+ arg0 = args[0].(context.Context)
366+ }
367+ run(
368+ arg0,
369+ )
370+ })
371+ return _c
372+}
373+
374+func (_c *MockHomepageHistory_GetAnalytics_Call) Return(historyAnalytics *entity.HistoryAnalytics, err error) *MockHomepageHistory_GetAnalytics_Call {
375+ _c.Call.Return(historyAnalytics, err)
376+ return _c
377+}
378+
379+func (_c *MockHomepageHistory_GetAnalytics_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryAnalytics, error)) *MockHomepageHistory_GetAnalytics_Call {
380+ _c.Call.Return(run)
381+ return _c
382+}
383+
384+// GetDomainStats provides a mock function for the type MockHomepageHistory
385+func (_mock *MockHomepageHistory) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) {
386+ ret := _mock.Called(ctx, limit)
387+
388+ if len(ret) == 0 {
389+ panic("no return value specified for GetDomainStats")
390+ }
391+
392+ var r0 []*entity.DomainStat
393+ var r1 error
394+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok {
395+ return returnFunc(ctx, limit)
396+ }
397+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok {
398+ r0 = returnFunc(ctx, limit)
399+ } else {
400+ if ret.Get(0) != nil {
401+ r0 = ret.Get(0).([]*entity.DomainStat)
402+ }
403+ }
404+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
405+ r1 = returnFunc(ctx, limit)
406+ } else {
407+ r1 = ret.Error(1)
408+ }
409+ return r0, r1
410+}
411+
412+// MockHomepageHistory_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats'
413+type MockHomepageHistory_GetDomainStats_Call struct {
414+ *mock.Call
415+}
416+
417+// GetDomainStats is a helper method to define mock.On call
418+// - ctx context.Context
419+// - limit int
420+func (_e *MockHomepageHistory_Expecter) GetDomainStats(ctx any, limit any) *MockHomepageHistory_GetDomainStats_Call {
421+ return &MockHomepageHistory_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)}
422+}
423+
424+func (_c *MockHomepageHistory_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHomepageHistory_GetDomainStats_Call {
425+ _c.Call.Run(func(args mock.Arguments) {
426+ var arg0 context.Context
427+ if args[0] != nil {
428+ arg0 = args[0].(context.Context)
429+ }
430+ var arg1 int
431+ if args[1] != nil {
432+ arg1 = args[1].(int)
433+ }
434+ run(
435+ arg0,
436+ arg1,
437+ )
438+ })
439+ return _c
440+}
441+
442+func (_c *MockHomepageHistory_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHomepageHistory_GetDomainStats_Call {
443+ _c.Call.Return(domainStats, err)
444+ return _c
445+}
446+
447+func (_c *MockHomepageHistory_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHomepageHistory_GetDomainStats_Call {
448+ _c.Call.Return(run)
449+ return _c
450+}
451+
452+// GetRecent provides a mock function for the type MockHomepageHistory
453+func (_mock *MockHomepageHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
454+ ret := _mock.Called(ctx, limit, offset)
455+
456+ if len(ret) == 0 {
457+ panic("no return value specified for GetRecent")
458+ }
459+
460+ var r0 []*entity.HistoryEntry
461+ var r1 error
462+ if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
463+ return returnFunc(ctx, limit, offset)
464+ }
465+ if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
466+ r0 = returnFunc(ctx, limit, offset)
467+ } else {
468+ if ret.Get(0) != nil {
469+ r0 = ret.Get(0).([]*entity.HistoryEntry)
470+ }
471+ }
472+ if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
473+ r1 = returnFunc(ctx, limit, offset)
474+ } else {
475+ r1 = ret.Error(1)
476+ }
477+ return r0, r1
478+}
479+
480+// MockHomepageHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
481+type MockHomepageHistory_GetRecent_Call struct {
482+ *mock.Call
483+}
484+
485+// GetRecent is a helper method to define mock.On call
486+// - ctx context.Context
487+// - limit int
488+// - offset int
489+func (_e *MockHomepageHistory_Expecter) GetRecent(ctx any, limit any, offset any) *MockHomepageHistory_GetRecent_Call {
490+ return &MockHomepageHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)}
491+}
492+
493+func (_c *MockHomepageHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHomepageHistory_GetRecent_Call {
494+ _c.Call.Run(func(args mock.Arguments) {
495+ var arg0 context.Context
496+ if args[0] != nil {
497+ arg0 = args[0].(context.Context)
498+ }
499+ var arg1 int
500+ if args[1] != nil {
501+ arg1 = args[1].(int)
502+ }
503+ var arg2 int
504+ if args[2] != nil {
505+ arg2 = args[2].(int)
506+ }
507+ run(
508+ arg0,
509+ arg1,
510+ arg2,
511+ )
512+ })
513+ return _c
514+}
515+
516+func (_c *MockHomepageHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecent_Call {
517+ _c.Call.Return(historyEntrys, err)
518+ return _c
519+}
520+
521+func (_c *MockHomepageHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecent_Call {
522+ _c.Call.Return(run)
523+ return _c
524+}
525+
526+// GetRecentByDomain provides a mock function for the type MockHomepageHistory
527+func (_mock *MockHomepageHistory) GetRecentByDomain(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error) {
528+ ret := _mock.Called(ctx, domain, limit, offset)
529+
530+ if len(ret) == 0 {
531+ panic("no return value specified for GetRecentByDomain")
532+ }
533+
534+ var r0 []*entity.HistoryEntry
535+ var r1 error
536+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) ([]*entity.HistoryEntry, error)); ok {
537+ return returnFunc(ctx, domain, limit, offset)
538+ }
539+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) []*entity.HistoryEntry); ok {
540+ r0 = returnFunc(ctx, domain, limit, offset)
541+ } else {
542+ if ret.Get(0) != nil {
543+ r0 = ret.Get(0).([]*entity.HistoryEntry)
544+ }
545+ }
546+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, int, int) error); ok {
547+ r1 = returnFunc(ctx, domain, limit, offset)
548+ } else {
549+ r1 = ret.Error(1)
550+ }
551+ return r0, r1
552+}
553+
554+// MockHomepageHistory_GetRecentByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentByDomain'
555+type MockHomepageHistory_GetRecentByDomain_Call struct {
556+ *mock.Call
557+}
558+
559+// GetRecentByDomain is a helper method to define mock.On call
560+// - ctx context.Context
561+// - domain string
562+// - limit int
563+// - offset int
564+func (_e *MockHomepageHistory_Expecter) GetRecentByDomain(ctx any, domain any, limit any, offset any) *MockHomepageHistory_GetRecentByDomain_Call {
565+ return &MockHomepageHistory_GetRecentByDomain_Call{Call: _e.mock.On("GetRecentByDomain", ctx, domain, limit, offset)}
566+}
567+
568+func (_c *MockHomepageHistory_GetRecentByDomain_Call) Run(run func(ctx context.Context, domain string, limit int, offset int)) *MockHomepageHistory_GetRecentByDomain_Call {
569+ _c.Call.Run(func(args mock.Arguments) {
570+ var arg0 context.Context
571+ if args[0] != nil {
572+ arg0 = args[0].(context.Context)
573+ }
574+ var arg1 string
575+ if args[1] != nil {
576+ arg1 = args[1].(string)
577+ }
578+ var arg2 int
579+ if args[2] != nil {
580+ arg2 = args[2].(int)
581+ }
582+ var arg3 int
583+ if args[3] != nil {
584+ arg3 = args[3].(int)
585+ }
586+ run(
587+ arg0,
588+ arg1,
589+ arg2,
590+ arg3,
591+ )
592+ })
593+ return _c
594+}
595+
596+func (_c *MockHomepageHistory_GetRecentByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecentByDomain_Call {
597+ _c.Call.Return(historyEntrys, err)
598+ return _c
599+}
600+
601+func (_c *MockHomepageHistory_GetRecentByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecentByDomain_Call {
602+ _c.Call.Return(run)
603+ return _c
604+}
605+
606+// GetRecentWindow provides a mock function for the type MockHomepageHistory
607+func (_mock *MockHomepageHistory) GetRecentWindow(ctx context.Context, before time.Time, domain string) (*entity.HistoryWindow, error) {
608+ ret := _mock.Called(ctx, before, domain)
609+
610+ if len(ret) == 0 {
611+ panic("no return value specified for GetRecentWindow")
612+ }
613+
614+ var r0 *entity.HistoryWindow
615+ var r1 error
616+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, string) (*entity.HistoryWindow, error)); ok {
617+ return returnFunc(ctx, before, domain)
618+ }
619+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, string) *entity.HistoryWindow); ok {
620+ r0 = returnFunc(ctx, before, domain)
621+ } else {
622+ if ret.Get(0) != nil {
623+ r0 = ret.Get(0).(*entity.HistoryWindow)
624+ }
625+ }
626+ if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time, string) error); ok {
627+ r1 = returnFunc(ctx, before, domain)
628+ } else {
629+ r1 = ret.Error(1)
630+ }
631+ return r0, r1
632+}
633+
634+// MockHomepageHistory_GetRecentWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindow'
635+type MockHomepageHistory_GetRecentWindow_Call struct {
636+ *mock.Call
637+}
638+
639+// GetRecentWindow is a helper method to define mock.On call
640+// - ctx context.Context
641+// - before time.Time
642+// - domain string
643+func (_e *MockHomepageHistory_Expecter) GetRecentWindow(ctx any, before any, domain any) *MockHomepageHistory_GetRecentWindow_Call {
644+ return &MockHomepageHistory_GetRecentWindow_Call{Call: _e.mock.On("GetRecentWindow", ctx, before, domain)}
645+}
646+
647+func (_c *MockHomepageHistory_GetRecentWindow_Call) Run(run func(ctx context.Context, before time.Time, domain string)) *MockHomepageHistory_GetRecentWindow_Call {
648+ _c.Call.Run(func(args mock.Arguments) {
649+ var arg0 context.Context
650+ if args[0] != nil {
651+ arg0 = args[0].(context.Context)
652+ }
653+ var arg1 time.Time
654+ if args[1] != nil {
655+ arg1 = args[1].(time.Time)
656+ }
657+ var arg2 string
658+ if args[2] != nil {
659+ arg2 = args[2].(string)
660+ }
661+ run(
662+ arg0,
663+ arg1,
664+ arg2,
665+ )
666+ })
667+ return _c
668+}
669+
670+func (_c *MockHomepageHistory_GetRecentWindow_Call) Return(historyWindow *entity.HistoryWindow, err error) *MockHomepageHistory_GetRecentWindow_Call {
671+ _c.Call.Return(historyWindow, err)
672+ return _c
673+}
674+
675+func (_c *MockHomepageHistory_GetRecentWindow_Call) RunAndReturn(run func(ctx context.Context, before time.Time, domain string) (*entity.HistoryWindow, error)) *MockHomepageHistory_GetRecentWindow_Call {
676+ _c.Call.Return(run)
677+ return _c
678+}
679+
680+// GetStats provides a mock function for the type MockHomepageHistory
681+func (_mock *MockHomepageHistory) GetStats(ctx context.Context) (*entity.HistoryStats, error) {
682+ ret := _mock.Called(ctx)
683+
684+ if len(ret) == 0 {
685+ panic("no return value specified for GetStats")
686+ }
687+
688+ var r0 *entity.HistoryStats
689+ var r1 error
690+ if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok {
691+ return returnFunc(ctx)
692+ }
693+ if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok {
694+ r0 = returnFunc(ctx)
695+ } else {
696+ if ret.Get(0) != nil {
697+ r0 = ret.Get(0).(*entity.HistoryStats)
698+ }
699+ }
700+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
701+ r1 = returnFunc(ctx)
702+ } else {
703+ r1 = ret.Error(1)
704+ }
705+ return r0, r1
706+}
707+
708+// MockHomepageHistory_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats'
709+type MockHomepageHistory_GetStats_Call struct {
710+ *mock.Call
711+}
712+
713+// GetStats is a helper method to define mock.On call
714+// - ctx context.Context
715+func (_e *MockHomepageHistory_Expecter) GetStats(ctx any) *MockHomepageHistory_GetStats_Call {
716+ return &MockHomepageHistory_GetStats_Call{Call: _e.mock.On("GetStats", ctx)}
717+}
718+
719+func (_c *MockHomepageHistory_GetStats_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetStats_Call {
720+ _c.Call.Run(func(args mock.Arguments) {
721+ var arg0 context.Context
722+ if args[0] != nil {
723+ arg0 = args[0].(context.Context)
724+ }
725+ run(
726+ arg0,
727+ )
728+ })
729+ return _c
730+}
731+
732+func (_c *MockHomepageHistory_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHomepageHistory_GetStats_Call {
733+ _c.Call.Return(historyStats, err)
734+ return _c
735+}
736+
737+func (_c *MockHomepageHistory_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHomepageHistory_GetStats_Call {
738+ _c.Call.Return(run)
739+ return _c
740+}
741+
742+// Search provides a mock function for the type MockHomepageHistory
743+func (_mock *MockHomepageHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) {
744+ ret := _mock.Called(ctx, input)
745+
746+ if len(ret) == 0 {
747+ panic("no return value specified for Search")
748+ }
749+
750+ var r0 *dto.HistorySearchOutput
751+ var r1 error
752+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok {
753+ return returnFunc(ctx, input)
754+ }
755+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok {
756+ r0 = returnFunc(ctx, input)
757+ } else {
758+ if ret.Get(0) != nil {
759+ r0 = ret.Get(0).(*dto.HistorySearchOutput)
760+ }
761+ }
762+ if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok {
763+ r1 = returnFunc(ctx, input)
764+ } else {
765+ r1 = ret.Error(1)
766+ }
767+ return r0, r1
768+}
769+
770+// MockHomepageHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
771+type MockHomepageHistory_Search_Call struct {
772+ *mock.Call
773+}
774+
775+// Search is a helper method to define mock.On call
776+// - ctx context.Context
777+// - input dto.HistorySearchInput
778+func (_e *MockHomepageHistory_Expecter) Search(ctx any, input any) *MockHomepageHistory_Search_Call {
779+ return &MockHomepageHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)}
780+}
781+
782+func (_c *MockHomepageHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHomepageHistory_Search_Call {
783+ _c.Call.Run(func(args mock.Arguments) {
784+ var arg0 context.Context
785+ if args[0] != nil {
786+ arg0 = args[0].(context.Context)
787+ }
788+ var arg1 dto.HistorySearchInput
789+ if args[1] != nil {
790+ arg1 = args[1].(dto.HistorySearchInput)
791+ }
792+ run(
793+ arg0,
794+ arg1,
795+ )
796+ })
797+ return _c
798+}
799+
800+func (_c *MockHomepageHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHomepageHistory_Search_Call {
801+ _c.Call.Return(historySearchOutput, err)
802+ return _c
803+}
804+
805+func (_c *MockHomepageHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHomepageHistory_Search_Call {
806+ _c.Call.Return(run)
807+ return _c
808+}
809+
810+// NewMockHomepageFavorites creates a new instance of MockHomepageFavorites. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
811+// The first argument is typically a *testing.T value.
812+func NewMockHomepageFavorites(t interface {
813+ mock.TestingT
814+ Cleanup(func())
815+}) *MockHomepageFavorites {
816+ mock := &MockHomepageFavorites{}
817+ mock.Mock.Test(t)
818+
819+ t.Cleanup(func() { mock.AssertExpectations(t) })
820+
821+ return mock
822+}
823+
824+// MockHomepageFavorites is an autogenerated mock type for the HomepageFavorites type
825+type MockHomepageFavorites struct {
826+ mock.Mock
827+}
828+
829+type MockHomepageFavorites_Expecter struct {
830+ mock *mock.Mock
831+}
832+
833+func (_m *MockHomepageFavorites) EXPECT() *MockHomepageFavorites_Expecter {
834+ return &MockHomepageFavorites_Expecter{mock: &_m.Mock}
835+}
836+
837+// AddFavorite provides a mock function for the type MockHomepageFavorites
838+func (_mock *MockHomepageFavorites) AddFavorite(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error) {
839+ ret := _mock.Called(ctx, input)
840+
841+ if len(ret) == 0 {
842+ panic("no return value specified for AddFavorite")
843+ }
844+
845+ var r0 *entity.Favorite
846+ var r1 error
847+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) (*entity.Favorite, error)); ok {
848+ return returnFunc(ctx, input)
849+ }
850+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) *entity.Favorite); ok {
851+ r0 = returnFunc(ctx, input)
852+ } else {
853+ if ret.Get(0) != nil {
854+ r0 = ret.Get(0).(*entity.Favorite)
855+ }
856+ }
857+ if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteCreateInput) error); ok {
858+ r1 = returnFunc(ctx, input)
859+ } else {
860+ r1 = ret.Error(1)
861+ }
862+ return r0, r1
863+}
864+
865+// MockHomepageFavorites_AddFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddFavorite'
866+type MockHomepageFavorites_AddFavorite_Call struct {
867+ *mock.Call
868+}
869+
870+// AddFavorite is a helper method to define mock.On call
871+// - ctx context.Context
872+// - input dto.FavoriteCreateInput
873+func (_e *MockHomepageFavorites_Expecter) AddFavorite(ctx any, input any) *MockHomepageFavorites_AddFavorite_Call {
874+ return &MockHomepageFavorites_AddFavorite_Call{Call: _e.mock.On("AddFavorite", ctx, input)}
875+}
876+
877+func (_c *MockHomepageFavorites_AddFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteCreateInput)) *MockHomepageFavorites_AddFavorite_Call {
878+ _c.Call.Run(func(args mock.Arguments) {
879+ var arg0 context.Context
880+ if args[0] != nil {
881+ arg0 = args[0].(context.Context)
882+ }
883+ var arg1 dto.FavoriteCreateInput
884+ if args[1] != nil {
885+ arg1 = args[1].(dto.FavoriteCreateInput)
886+ }
887+ run(
888+ arg0,
889+ arg1,
890+ )
891+ })
892+ return _c
893+}
894+
895+func (_c *MockHomepageFavorites_AddFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_AddFavorite_Call {
896+ _c.Call.Return(favorite, err)
897+ return _c
898+}
899+
900+func (_c *MockHomepageFavorites_AddFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error)) *MockHomepageFavorites_AddFavorite_Call {
901+ _c.Call.Return(run)
902+ return _c
903+}
904+
905+// AddTag provides a mock function for the type MockHomepageFavorites
906+func (_mock *MockHomepageFavorites) AddTag(ctx context.Context, name string, color string) (*entity.Tag, error) {
907+ ret := _mock.Called(ctx, name, color)
908+
909+ if len(ret) == 0 {
910+ panic("no return value specified for AddTag")
911+ }
912+
913+ var r0 *entity.Tag
914+ var r1 error
915+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*entity.Tag, error)); ok {
916+ return returnFunc(ctx, name, color)
917+ }
918+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *entity.Tag); ok {
919+ r0 = returnFunc(ctx, name, color)
920+ } else {
921+ if ret.Get(0) != nil {
922+ r0 = ret.Get(0).(*entity.Tag)
923+ }
924+ }
925+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
926+ r1 = returnFunc(ctx, name, color)
927+ } else {
928+ r1 = ret.Error(1)
929+ }
930+ return r0, r1
931+}
932+
933+// MockHomepageFavorites_AddTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddTag'
934+type MockHomepageFavorites_AddTag_Call struct {
935+ *mock.Call
936+}
937+
938+// AddTag is a helper method to define mock.On call
939+// - ctx context.Context
940+// - name string
941+// - color string
942+func (_e *MockHomepageFavorites_Expecter) AddTag(ctx any, name any, color any) *MockHomepageFavorites_AddTag_Call {
943+ return &MockHomepageFavorites_AddTag_Call{Call: _e.mock.On("AddTag", ctx, name, color)}
944+}
945+
946+func (_c *MockHomepageFavorites_AddTag_Call) Run(run func(ctx context.Context, name string, color string)) *MockHomepageFavorites_AddTag_Call {
947+ _c.Call.Run(func(args mock.Arguments) {
948+ var arg0 context.Context
949+ if args[0] != nil {
950+ arg0 = args[0].(context.Context)
951+ }
952+ var arg1 string
953+ if args[1] != nil {
954+ arg1 = args[1].(string)
955+ }
956+ var arg2 string
957+ if args[2] != nil {
958+ arg2 = args[2].(string)
959+ }
960+ run(
961+ arg0,
962+ arg1,
963+ arg2,
964+ )
965+ })
966+ return _c
967+}
968+
969+func (_c *MockHomepageFavorites_AddTag_Call) Return(tag *entity.Tag, err error) *MockHomepageFavorites_AddTag_Call {
970+ _c.Call.Return(tag, err)
971+ return _c
972+}
973+
974+func (_c *MockHomepageFavorites_AddTag_Call) RunAndReturn(run func(ctx context.Context, name string, color string) (*entity.Tag, error)) *MockHomepageFavorites_AddTag_Call {
975+ _c.Call.Return(run)
976+ return _c
977+}
978+
979+// CreateFolder provides a mock function for the type MockHomepageFavorites
980+func (_mock *MockHomepageFavorites) CreateFolder(ctx context.Context, name string, icon string, parentID *entity.FolderID) (*entity.Folder, error) {
981+ ret := _mock.Called(ctx, name, icon, parentID)
982+
983+ if len(ret) == 0 {
984+ panic("no return value specified for CreateFolder")
985+ }
986+
987+ var r0 *entity.Folder
988+ var r1 error
989+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, *entity.FolderID) (*entity.Folder, error)); ok {
990+ return returnFunc(ctx, name, icon, parentID)
991+ }
992+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, *entity.FolderID) *entity.Folder); ok {
993+ r0 = returnFunc(ctx, name, icon, parentID)
994+ } else {
995+ if ret.Get(0) != nil {
996+ r0 = ret.Get(0).(*entity.Folder)
997+ }
998+ }
999+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, *entity.FolderID) error); ok {
1000+ r1 = returnFunc(ctx, name, icon, parentID)
1001+ } else {
1002+ r1 = ret.Error(1)
1003+ }
1004+ return r0, r1
1005+}
1006+
1007+// MockHomepageFavorites_CreateFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateFolder'
1008+type MockHomepageFavorites_CreateFolder_Call struct {
1009+ *mock.Call
1010+}
1011+
1012+// CreateFolder is a helper method to define mock.On call
1013+// - ctx context.Context
1014+// - name string
1015+// - icon string
1016+// - parentID *entity.FolderID
1017+func (_e *MockHomepageFavorites_Expecter) CreateFolder(ctx any, name any, icon any, parentID any) *MockHomepageFavorites_CreateFolder_Call {
1018+ return &MockHomepageFavorites_CreateFolder_Call{Call: _e.mock.On("CreateFolder", ctx, name, icon, parentID)}
1019+}
1020+
1021+func (_c *MockHomepageFavorites_CreateFolder_Call) Run(run func(ctx context.Context, name string, icon string, parentID *entity.FolderID)) *MockHomepageFavorites_CreateFolder_Call {
1022+ _c.Call.Run(func(args mock.Arguments) {
1023+ var arg0 context.Context
1024+ if args[0] != nil {
1025+ arg0 = args[0].(context.Context)
1026+ }
1027+ var arg1 string
1028+ if args[1] != nil {
1029+ arg1 = args[1].(string)
1030+ }
1031+ var arg2 string
1032+ if args[2] != nil {
1033+ arg2 = args[2].(string)
1034+ }
1035+ var arg3 *entity.FolderID
1036+ if args[3] != nil {
1037+ arg3 = args[3].(*entity.FolderID)
1038+ }
1039+ run(
1040+ arg0,
1041+ arg1,
1042+ arg2,
1043+ arg3,
1044+ )
1045+ })
1046+ return _c
1047+}
1048+
1049+func (_c *MockHomepageFavorites_CreateFolder_Call) Return(folder *entity.Folder, err error) *MockHomepageFavorites_CreateFolder_Call {
1050+ _c.Call.Return(folder, err)
1051+ return _c
1052+}
1053+
1054+func (_c *MockHomepageFavorites_CreateFolder_Call) RunAndReturn(run func(ctx context.Context, name string, icon string, parentID *entity.FolderID) (*entity.Folder, error)) *MockHomepageFavorites_CreateFolder_Call {
1055+ _c.Call.Return(run)
1056+ return _c
1057+}
1058+
1059+// DeleteFavorite provides a mock function for the type MockHomepageFavorites
1060+func (_mock *MockHomepageFavorites) DeleteFavorite(ctx context.Context, id entity.FavoriteID) error {
1061+ ret := _mock.Called(ctx, id)
1062+
1063+ if len(ret) == 0 {
1064+ panic("no return value specified for DeleteFavorite")
1065+ }
1066+
1067+ var r0 error
1068+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok {
1069+ r0 = returnFunc(ctx, id)
1070+ } else {
1071+ r0 = ret.Error(0)
1072+ }
1073+ return r0
1074+}
1075+
1076+// MockHomepageFavorites_DeleteFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFavorite'
1077+type MockHomepageFavorites_DeleteFavorite_Call struct {
1078+ *mock.Call
1079+}
1080+
1081+// DeleteFavorite is a helper method to define mock.On call
1082+// - ctx context.Context
1083+// - id entity.FavoriteID
1084+func (_e *MockHomepageFavorites_Expecter) DeleteFavorite(ctx any, id any) *MockHomepageFavorites_DeleteFavorite_Call {
1085+ return &MockHomepageFavorites_DeleteFavorite_Call{Call: _e.mock.On("DeleteFavorite", ctx, id)}
1086+}
1087+
1088+func (_c *MockHomepageFavorites_DeleteFavorite_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockHomepageFavorites_DeleteFavorite_Call {
1089+ _c.Call.Run(func(args mock.Arguments) {
1090+ var arg0 context.Context
1091+ if args[0] != nil {
1092+ arg0 = args[0].(context.Context)
1093+ }
1094+ var arg1 entity.FavoriteID
1095+ if args[1] != nil {
1096+ arg1 = args[1].(entity.FavoriteID)
1097+ }
1098+ run(
1099+ arg0,
1100+ arg1,
1101+ )
1102+ })
1103+ return _c
1104+}
1105+
1106+func (_c *MockHomepageFavorites_DeleteFavorite_Call) Return(err error) *MockHomepageFavorites_DeleteFavorite_Call {
1107+ _c.Call.Return(err)
1108+ return _c
1109+}
1110+
1111+func (_c *MockHomepageFavorites_DeleteFavorite_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockHomepageFavorites_DeleteFavorite_Call {
1112+ _c.Call.Return(run)
1113+ return _c
1114+}
1115+
1116+// DeleteFolder provides a mock function for the type MockHomepageFavorites
1117+func (_mock *MockHomepageFavorites) DeleteFolder(ctx context.Context, id entity.FolderID) error {
1118+ ret := _mock.Called(ctx, id)
1119+
1120+ if len(ret) == 0 {
1121+ panic("no return value specified for DeleteFolder")
1122+ }
1123+
1124+ var r0 error
1125+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok {
1126+ r0 = returnFunc(ctx, id)
1127+ } else {
1128+ r0 = ret.Error(0)
1129+ }
1130+ return r0
1131+}
1132+
1133+// MockHomepageFavorites_DeleteFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFolder'
1134+type MockHomepageFavorites_DeleteFolder_Call struct {
1135+ *mock.Call
1136+}
1137+
1138+// DeleteFolder is a helper method to define mock.On call
1139+// - ctx context.Context
1140+// - id entity.FolderID
1141+func (_e *MockHomepageFavorites_Expecter) DeleteFolder(ctx any, id any) *MockHomepageFavorites_DeleteFolder_Call {
1142+ return &MockHomepageFavorites_DeleteFolder_Call{Call: _e.mock.On("DeleteFolder", ctx, id)}
1143+}
1144+
1145+func (_c *MockHomepageFavorites_DeleteFolder_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockHomepageFavorites_DeleteFolder_Call {
1146+ _c.Call.Run(func(args mock.Arguments) {
1147+ var arg0 context.Context
1148+ if args[0] != nil {
1149+ arg0 = args[0].(context.Context)
1150+ }
1151+ var arg1 entity.FolderID
1152+ if args[1] != nil {
1153+ arg1 = args[1].(entity.FolderID)
1154+ }
1155+ run(
1156+ arg0,
1157+ arg1,
1158+ )
1159+ })
1160+ return _c
1161+}
1162+
1163+func (_c *MockHomepageFavorites_DeleteFolder_Call) Return(err error) *MockHomepageFavorites_DeleteFolder_Call {
1164+ _c.Call.Return(err)
1165+ return _c
1166+}
1167+
1168+func (_c *MockHomepageFavorites_DeleteFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockHomepageFavorites_DeleteFolder_Call {
1169+ _c.Call.Return(run)
1170+ return _c
1171+}
1172+
1173+// DeleteTag provides a mock function for the type MockHomepageFavorites
1174+func (_mock *MockHomepageFavorites) DeleteTag(ctx context.Context, id entity.TagID) error {
1175+ ret := _mock.Called(ctx, id)
1176+
1177+ if len(ret) == 0 {
1178+ panic("no return value specified for DeleteTag")
1179+ }
1180+
1181+ var r0 error
1182+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok {
1183+ r0 = returnFunc(ctx, id)
1184+ } else {
1185+ r0 = ret.Error(0)
1186+ }
1187+ return r0
1188+}
1189+
1190+// MockHomepageFavorites_DeleteTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTag'
1191+type MockHomepageFavorites_DeleteTag_Call struct {
1192+ *mock.Call
1193+}
1194+
1195+// DeleteTag is a helper method to define mock.On call
1196+// - ctx context.Context
1197+// - id entity.TagID
1198+func (_e *MockHomepageFavorites_Expecter) DeleteTag(ctx any, id any) *MockHomepageFavorites_DeleteTag_Call {
1199+ return &MockHomepageFavorites_DeleteTag_Call{Call: _e.mock.On("DeleteTag", ctx, id)}
1200+}
1201+
1202+func (_c *MockHomepageFavorites_DeleteTag_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockHomepageFavorites_DeleteTag_Call {
1203+ _c.Call.Run(func(args mock.Arguments) {
1204+ var arg0 context.Context
1205+ if args[0] != nil {
1206+ arg0 = args[0].(context.Context)
1207+ }
1208+ var arg1 entity.TagID
1209+ if args[1] != nil {
1210+ arg1 = args[1].(entity.TagID)
1211+ }
1212+ run(
1213+ arg0,
1214+ arg1,
1215+ )
1216+ })
1217+ return _c
1218+}
1219+
1220+func (_c *MockHomepageFavorites_DeleteTag_Call) Return(err error) *MockHomepageFavorites_DeleteTag_Call {
1221+ _c.Call.Return(err)
1222+ return _c
1223+}
1224+
1225+func (_c *MockHomepageFavorites_DeleteTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockHomepageFavorites_DeleteTag_Call {
1226+ _c.Call.Return(run)
1227+ return _c
1228+}
1229+
1230+// GetAll provides a mock function for the type MockHomepageFavorites
1231+func (_mock *MockHomepageFavorites) GetAll(ctx context.Context) ([]*entity.Favorite, error) {
1232+ ret := _mock.Called(ctx)
1233+
1234+ if len(ret) == 0 {
1235+ panic("no return value specified for GetAll")
1236+ }
1237+
1238+ var r0 []*entity.Favorite
1239+ var r1 error
1240+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok {
1241+ return returnFunc(ctx)
1242+ }
1243+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok {
1244+ r0 = returnFunc(ctx)
1245+ } else {
1246+ if ret.Get(0) != nil {
1247+ r0 = ret.Get(0).([]*entity.Favorite)
1248+ }
1249+ }
1250+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1251+ r1 = returnFunc(ctx)
1252+ } else {
1253+ r1 = ret.Error(1)
1254+ }
1255+ return r0, r1
1256+}
1257+
1258+// MockHomepageFavorites_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
1259+type MockHomepageFavorites_GetAll_Call struct {
1260+ *mock.Call
1261+}
1262+
1263+// GetAll is a helper method to define mock.On call
1264+// - ctx context.Context
1265+func (_e *MockHomepageFavorites_Expecter) GetAll(ctx any) *MockHomepageFavorites_GetAll_Call {
1266+ return &MockHomepageFavorites_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
1267+}
1268+
1269+func (_c *MockHomepageFavorites_GetAll_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAll_Call {
1270+ _c.Call.Run(func(args mock.Arguments) {
1271+ var arg0 context.Context
1272+ if args[0] != nil {
1273+ arg0 = args[0].(context.Context)
1274+ }
1275+ run(
1276+ arg0,
1277+ )
1278+ })
1279+ return _c
1280+}
1281+
1282+func (_c *MockHomepageFavorites_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockHomepageFavorites_GetAll_Call {
1283+ _c.Call.Return(favorites, err)
1284+ return _c
1285+}
1286+
1287+func (_c *MockHomepageFavorites_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockHomepageFavorites_GetAll_Call {
1288+ _c.Call.Return(run)
1289+ return _c
1290+}
1291+
1292+// GetAllFolders provides a mock function for the type MockHomepageFavorites
1293+func (_mock *MockHomepageFavorites) GetAllFolders(ctx context.Context) ([]*entity.Folder, error) {
1294+ ret := _mock.Called(ctx)
1295+
1296+ if len(ret) == 0 {
1297+ panic("no return value specified for GetAllFolders")
1298+ }
1299+
1300+ var r0 []*entity.Folder
1301+ var r1 error
1302+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok {
1303+ return returnFunc(ctx)
1304+ }
1305+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok {
1306+ r0 = returnFunc(ctx)
1307+ } else {
1308+ if ret.Get(0) != nil {
1309+ r0 = ret.Get(0).([]*entity.Folder)
1310+ }
1311+ }
1312+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1313+ r1 = returnFunc(ctx)
1314+ } else {
1315+ r1 = ret.Error(1)
1316+ }
1317+ return r0, r1
1318+}
1319+
1320+// MockHomepageFavorites_GetAllFolders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllFolders'
1321+type MockHomepageFavorites_GetAllFolders_Call struct {
1322+ *mock.Call
1323+}
1324+
1325+// GetAllFolders is a helper method to define mock.On call
1326+// - ctx context.Context
1327+func (_e *MockHomepageFavorites_Expecter) GetAllFolders(ctx any) *MockHomepageFavorites_GetAllFolders_Call {
1328+ return &MockHomepageFavorites_GetAllFolders_Call{Call: _e.mock.On("GetAllFolders", ctx)}
1329+}
1330+
1331+func (_c *MockHomepageFavorites_GetAllFolders_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllFolders_Call {
1332+ _c.Call.Run(func(args mock.Arguments) {
1333+ var arg0 context.Context
1334+ if args[0] != nil {
1335+ arg0 = args[0].(context.Context)
1336+ }
1337+ run(
1338+ arg0,
1339+ )
1340+ })
1341+ return _c
1342+}
1343+
1344+func (_c *MockHomepageFavorites_GetAllFolders_Call) Return(folders []*entity.Folder, err error) *MockHomepageFavorites_GetAllFolders_Call {
1345+ _c.Call.Return(folders, err)
1346+ return _c
1347+}
1348+
1349+func (_c *MockHomepageFavorites_GetAllFolders_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockHomepageFavorites_GetAllFolders_Call {
1350+ _c.Call.Return(run)
1351+ return _c
1352+}
1353+
1354+// GetAllTags provides a mock function for the type MockHomepageFavorites
1355+func (_mock *MockHomepageFavorites) GetAllTags(ctx context.Context) ([]*entity.Tag, error) {
1356+ ret := _mock.Called(ctx)
1357+
1358+ if len(ret) == 0 {
1359+ panic("no return value specified for GetAllTags")
1360+ }
1361+
1362+ var r0 []*entity.Tag
1363+ var r1 error
1364+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok {
1365+ return returnFunc(ctx)
1366+ }
1367+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok {
1368+ r0 = returnFunc(ctx)
1369+ } else {
1370+ if ret.Get(0) != nil {
1371+ r0 = ret.Get(0).([]*entity.Tag)
1372+ }
1373+ }
1374+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1375+ r1 = returnFunc(ctx)
1376+ } else {
1377+ r1 = ret.Error(1)
1378+ }
1379+ return r0, r1
1380+}
1381+
1382+// MockHomepageFavorites_GetAllTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllTags'
1383+type MockHomepageFavorites_GetAllTags_Call struct {
1384+ *mock.Call
1385+}
1386+
1387+// GetAllTags is a helper method to define mock.On call
1388+// - ctx context.Context
1389+func (_e *MockHomepageFavorites_Expecter) GetAllTags(ctx any) *MockHomepageFavorites_GetAllTags_Call {
1390+ return &MockHomepageFavorites_GetAllTags_Call{Call: _e.mock.On("GetAllTags", ctx)}
1391+}
1392+
1393+func (_c *MockHomepageFavorites_GetAllTags_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllTags_Call {
1394+ _c.Call.Run(func(args mock.Arguments) {
1395+ var arg0 context.Context
1396+ if args[0] != nil {
1397+ arg0 = args[0].(context.Context)
1398+ }
1399+ run(
1400+ arg0,
1401+ )
1402+ })
1403+ return _c
1404+}
1405+
1406+func (_c *MockHomepageFavorites_GetAllTags_Call) Return(tags []*entity.Tag, err error) *MockHomepageFavorites_GetAllTags_Call {
1407+ _c.Call.Return(tags, err)
1408+ return _c
1409+}
1410+
1411+func (_c *MockHomepageFavorites_GetAllTags_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockHomepageFavorites_GetAllTags_Call {
1412+ _c.Call.Return(run)
1413+ return _c
1414+}
1415+
1416+// GetByShortcut provides a mock function for the type MockHomepageFavorites
1417+func (_mock *MockHomepageFavorites) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) {
1418+ ret := _mock.Called(ctx, key)
1419+
1420+ if len(ret) == 0 {
1421+ panic("no return value specified for GetByShortcut")
1422+ }
1423+
1424+ var r0 *entity.Favorite
1425+ var r1 error
1426+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok {
1427+ return returnFunc(ctx, key)
1428+ }
1429+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok {
1430+ r0 = returnFunc(ctx, key)
1431+ } else {
1432+ if ret.Get(0) != nil {
1433+ r0 = ret.Get(0).(*entity.Favorite)
1434+ }
1435+ }
1436+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
1437+ r1 = returnFunc(ctx, key)
1438+ } else {
1439+ r1 = ret.Error(1)
1440+ }
1441+ return r0, r1
1442+}
1443+
1444+// MockHomepageFavorites_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut'
1445+type MockHomepageFavorites_GetByShortcut_Call struct {
1446+ *mock.Call
1447+}
1448+
1449+// GetByShortcut is a helper method to define mock.On call
1450+// - ctx context.Context
1451+// - key int
1452+func (_e *MockHomepageFavorites_Expecter) GetByShortcut(ctx any, key any) *MockHomepageFavorites_GetByShortcut_Call {
1453+ return &MockHomepageFavorites_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)}
1454+}
1455+
1456+func (_c *MockHomepageFavorites_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockHomepageFavorites_GetByShortcut_Call {
1457+ _c.Call.Run(func(args mock.Arguments) {
1458+ var arg0 context.Context
1459+ if args[0] != nil {
1460+ arg0 = args[0].(context.Context)
1461+ }
1462+ var arg1 int
1463+ if args[1] != nil {
1464+ arg1 = args[1].(int)
1465+ }
1466+ run(
1467+ arg0,
1468+ arg1,
1469+ )
1470+ })
1471+ return _c
1472+}
1473+
1474+func (_c *MockHomepageFavorites_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_GetByShortcut_Call {
1475+ _c.Call.Return(favorite, err)
1476+ return _c
1477+}
1478+
1479+func (_c *MockHomepageFavorites_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockHomepageFavorites_GetByShortcut_Call {
1480+ _c.Call.Return(run)
1481+ return _c
1482+}
1483+
1484+// Move provides a mock function for the type MockHomepageFavorites
1485+func (_mock *MockHomepageFavorites) Move(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error {
1486+ ret := _mock.Called(ctx, id, folderID)
1487+
1488+ if len(ret) == 0 {
1489+ panic("no return value specified for Move")
1490+ }
1491+
1492+ var r0 error
1493+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok {
1494+ r0 = returnFunc(ctx, id, folderID)
1495+ } else {
1496+ r0 = ret.Error(0)
1497+ }
1498+ return r0
1499+}
1500+
1501+// MockHomepageFavorites_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move'
1502+type MockHomepageFavorites_Move_Call struct {
1503+ *mock.Call
1504+}
1505+
1506+// Move is a helper method to define mock.On call
1507+// - ctx context.Context
1508+// - id entity.FavoriteID
1509+// - folderID *entity.FolderID
1510+func (_e *MockHomepageFavorites_Expecter) Move(ctx any, id any, folderID any) *MockHomepageFavorites_Move_Call {
1511+ return &MockHomepageFavorites_Move_Call{Call: _e.mock.On("Move", ctx, id, folderID)}
1512+}
1513+
1514+func (_c *MockHomepageFavorites_Move_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockHomepageFavorites_Move_Call {
1515+ _c.Call.Run(func(args mock.Arguments) {
1516+ var arg0 context.Context
1517+ if args[0] != nil {
1518+ arg0 = args[0].(context.Context)
1519+ }
1520+ var arg1 entity.FavoriteID
1521+ if args[1] != nil {
1522+ arg1 = args[1].(entity.FavoriteID)
1523+ }
1524+ var arg2 *entity.FolderID
1525+ if args[2] != nil {
1526+ arg2 = args[2].(*entity.FolderID)
1527+ }
1528+ run(
1529+ arg0,
1530+ arg1,
1531+ arg2,
1532+ )
1533+ })
1534+ return _c
1535+}
1536+
1537+func (_c *MockHomepageFavorites_Move_Call) Return(err error) *MockHomepageFavorites_Move_Call {
1538+ _c.Call.Return(err)
1539+ return _c
1540+}
1541+
1542+func (_c *MockHomepageFavorites_Move_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockHomepageFavorites_Move_Call {
1543+ _c.Call.Return(run)
1544+ return _c
1545+}
1546+
1547+// SetShortcut provides a mock function for the type MockHomepageFavorites
1548+func (_mock *MockHomepageFavorites) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error {
1549+ ret := _mock.Called(ctx, id, key)
1550+
1551+ if len(ret) == 0 {
1552+ panic("no return value specified for SetShortcut")
1553+ }
1554+
1555+ var r0 error
1556+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok {
1557+ r0 = returnFunc(ctx, id, key)
1558+ } else {
1559+ r0 = ret.Error(0)
1560+ }
1561+ return r0
1562+}
1563+
1564+// MockHomepageFavorites_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut'
1565+type MockHomepageFavorites_SetShortcut_Call struct {
1566+ *mock.Call
1567+}
1568+
1569+// SetShortcut is a helper method to define mock.On call
1570+// - ctx context.Context
1571+// - id entity.FavoriteID
1572+// - key *int
1573+func (_e *MockHomepageFavorites_Expecter) SetShortcut(ctx any, id any, key any) *MockHomepageFavorites_SetShortcut_Call {
1574+ return &MockHomepageFavorites_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)}
1575+}
1576+
1577+func (_c *MockHomepageFavorites_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockHomepageFavorites_SetShortcut_Call {
1578+ _c.Call.Run(func(args mock.Arguments) {
1579+ var arg0 context.Context
1580+ if args[0] != nil {
1581+ arg0 = args[0].(context.Context)
1582+ }
1583+ var arg1 entity.FavoriteID
1584+ if args[1] != nil {
1585+ arg1 = args[1].(entity.FavoriteID)
1586+ }
1587+ var arg2 *int
1588+ if args[2] != nil {
1589+ arg2 = args[2].(*int)
1590+ }
1591+ run(
1592+ arg0,
1593+ arg1,
1594+ arg2,
1595+ )
1596+ })
1597+ return _c
1598+}
1599+
1600+func (_c *MockHomepageFavorites_SetShortcut_Call) Return(err error) *MockHomepageFavorites_SetShortcut_Call {
1601+ _c.Call.Return(err)
1602+ return _c
1603+}
1604+
1605+func (_c *MockHomepageFavorites_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockHomepageFavorites_SetShortcut_Call {
1606+ _c.Call.Return(run)
1607+ return _c
1608+}
1609+
1610+// TagFavorite provides a mock function for the type MockHomepageFavorites
1611+func (_mock *MockHomepageFavorites) TagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error {
1612+ ret := _mock.Called(ctx, favID, tagID)
1613+
1614+ if len(ret) == 0 {
1615+ panic("no return value specified for TagFavorite")
1616+ }
1617+
1618+ var r0 error
1619+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok {
1620+ r0 = returnFunc(ctx, favID, tagID)
1621+ } else {
1622+ r0 = ret.Error(0)
1623+ }
1624+ return r0
1625+}
1626+
1627+// MockHomepageFavorites_TagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TagFavorite'
1628+type MockHomepageFavorites_TagFavorite_Call struct {
1629+ *mock.Call
1630+}
1631+
1632+// TagFavorite is a helper method to define mock.On call
1633+// - ctx context.Context
1634+// - favID entity.FavoriteID
1635+// - tagID entity.TagID
1636+func (_e *MockHomepageFavorites_Expecter) TagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_TagFavorite_Call {
1637+ return &MockHomepageFavorites_TagFavorite_Call{Call: _e.mock.On("TagFavorite", ctx, favID, tagID)}
1638+}
1639+
1640+func (_c *MockHomepageFavorites_TagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_TagFavorite_Call {
1641+ _c.Call.Run(func(args mock.Arguments) {
1642+ var arg0 context.Context
1643+ if args[0] != nil {
1644+ arg0 = args[0].(context.Context)
1645+ }
1646+ var arg1 entity.FavoriteID
1647+ if args[1] != nil {
1648+ arg1 = args[1].(entity.FavoriteID)
1649+ }
1650+ var arg2 entity.TagID
1651+ if args[2] != nil {
1652+ arg2 = args[2].(entity.TagID)
1653+ }
1654+ run(
1655+ arg0,
1656+ arg1,
1657+ arg2,
1658+ )
1659+ })
1660+ return _c
1661+}
1662+
1663+func (_c *MockHomepageFavorites_TagFavorite_Call) Return(err error) *MockHomepageFavorites_TagFavorite_Call {
1664+ _c.Call.Return(err)
1665+ return _c
1666+}
1667+
1668+func (_c *MockHomepageFavorites_TagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_TagFavorite_Call {
1669+ _c.Call.Return(run)
1670+ return _c
1671+}
1672+
1673+// UntagFavorite provides a mock function for the type MockHomepageFavorites
1674+func (_mock *MockHomepageFavorites) UntagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error {
1675+ ret := _mock.Called(ctx, favID, tagID)
1676+
1677+ if len(ret) == 0 {
1678+ panic("no return value specified for UntagFavorite")
1679+ }
1680+
1681+ var r0 error
1682+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok {
1683+ r0 = returnFunc(ctx, favID, tagID)
1684+ } else {
1685+ r0 = ret.Error(0)
1686+ }
1687+ return r0
1688+}
1689+
1690+// MockHomepageFavorites_UntagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UntagFavorite'
1691+type MockHomepageFavorites_UntagFavorite_Call struct {
1692+ *mock.Call
1693+}
1694+
1695+// UntagFavorite is a helper method to define mock.On call
1696+// - ctx context.Context
1697+// - favID entity.FavoriteID
1698+// - tagID entity.TagID
1699+func (_e *MockHomepageFavorites_Expecter) UntagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_UntagFavorite_Call {
1700+ return &MockHomepageFavorites_UntagFavorite_Call{Call: _e.mock.On("UntagFavorite", ctx, favID, tagID)}
1701+}
1702+
1703+func (_c *MockHomepageFavorites_UntagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_UntagFavorite_Call {
1704+ _c.Call.Run(func(args mock.Arguments) {
1705+ var arg0 context.Context
1706+ if args[0] != nil {
1707+ arg0 = args[0].(context.Context)
1708+ }
1709+ var arg1 entity.FavoriteID
1710+ if args[1] != nil {
1711+ arg1 = args[1].(entity.FavoriteID)
1712+ }
1713+ var arg2 entity.TagID
1714+ if args[2] != nil {
1715+ arg2 = args[2].(entity.TagID)
1716+ }
1717+ run(
1718+ arg0,
1719+ arg1,
1720+ arg2,
1721+ )
1722+ })
1723+ return _c
1724+}
1725+
1726+func (_c *MockHomepageFavorites_UntagFavorite_Call) Return(err error) *MockHomepageFavorites_UntagFavorite_Call {
1727+ _c.Call.Return(err)
1728+ return _c
1729+}
1730+
1731+func (_c *MockHomepageFavorites_UntagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_UntagFavorite_Call {
1732+ _c.Call.Return(run)
1733+ return _c
1734+}
1735+
1736+// UpdateFavorite provides a mock function for the type MockHomepageFavorites
1737+func (_mock *MockHomepageFavorites) UpdateFavorite(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error) {
1738+ ret := _mock.Called(ctx, input)
1739+
1740+ if len(ret) == 0 {
1741+ panic("no return value specified for UpdateFavorite")
1742+ }
1743+
1744+ var r0 *entity.Favorite
1745+ var r1 error
1746+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) (*entity.Favorite, error)); ok {
1747+ return returnFunc(ctx, input)
1748+ }
1749+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) *entity.Favorite); ok {
1750+ r0 = returnFunc(ctx, input)
1751+ } else {
1752+ if ret.Get(0) != nil {
1753+ r0 = ret.Get(0).(*entity.Favorite)
1754+ }
1755+ }
1756+ if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteUpdateInput) error); ok {
1757+ r1 = returnFunc(ctx, input)
1758+ } else {
1759+ r1 = ret.Error(1)
1760+ }
1761+ return r0, r1
1762+}
1763+
1764+// MockHomepageFavorites_UpdateFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFavorite'
1765+type MockHomepageFavorites_UpdateFavorite_Call struct {
1766+ *mock.Call
1767+}
1768+
1769+// UpdateFavorite is a helper method to define mock.On call
1770+// - ctx context.Context
1771+// - input dto.FavoriteUpdateInput
1772+func (_e *MockHomepageFavorites_Expecter) UpdateFavorite(ctx any, input any) *MockHomepageFavorites_UpdateFavorite_Call {
1773+ return &MockHomepageFavorites_UpdateFavorite_Call{Call: _e.mock.On("UpdateFavorite", ctx, input)}
1774+}
1775+
1776+func (_c *MockHomepageFavorites_UpdateFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteUpdateInput)) *MockHomepageFavorites_UpdateFavorite_Call {
1777+ _c.Call.Run(func(args mock.Arguments) {
1778+ var arg0 context.Context
1779+ if args[0] != nil {
1780+ arg0 = args[0].(context.Context)
1781+ }
1782+ var arg1 dto.FavoriteUpdateInput
1783+ if args[1] != nil {
1784+ arg1 = args[1].(dto.FavoriteUpdateInput)
1785+ }
1786+ run(
1787+ arg0,
1788+ arg1,
1789+ )
1790+ })
1791+ return _c
1792+}
1793+
1794+func (_c *MockHomepageFavorites_UpdateFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_UpdateFavorite_Call {
1795+ _c.Call.Return(favorite, err)
1796+ return _c
1797+}
1798+
1799+func (_c *MockHomepageFavorites_UpdateFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error)) *MockHomepageFavorites_UpdateFavorite_Call {
1800+ _c.Call.Return(run)
1801+ return _c
1802+}
1803+
1804+// UpdateFolder provides a mock function for the type MockHomepageFavorites
1805+func (_mock *MockHomepageFavorites) UpdateFolder(ctx context.Context, id entity.FolderID, name string, icon string) error {
1806+ ret := _mock.Called(ctx, id, name, icon)
1807+
1808+ if len(ret) == 0 {
1809+ panic("no return value specified for UpdateFolder")
1810+ }
1811+
1812+ var r0 error
1813+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, string, string) error); ok {
1814+ r0 = returnFunc(ctx, id, name, icon)
1815+ } else {
1816+ r0 = ret.Error(0)
1817+ }
1818+ return r0
1819+}
1820+
1821+// MockHomepageFavorites_UpdateFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFolder'
1822+type MockHomepageFavorites_UpdateFolder_Call struct {
1823+ *mock.Call
1824+}
1825+
1826+// UpdateFolder is a helper method to define mock.On call
1827+// - ctx context.Context
1828+// - id entity.FolderID
1829+// - name string
1830+// - icon string
1831+func (_e *MockHomepageFavorites_Expecter) UpdateFolder(ctx any, id any, name any, icon any) *MockHomepageFavorites_UpdateFolder_Call {
1832+ return &MockHomepageFavorites_UpdateFolder_Call{Call: _e.mock.On("UpdateFolder", ctx, id, name, icon)}
1833+}
1834+
1835+func (_c *MockHomepageFavorites_UpdateFolder_Call) Run(run func(ctx context.Context, id entity.FolderID, name string, icon string)) *MockHomepageFavorites_UpdateFolder_Call {
1836+ _c.Call.Run(func(args mock.Arguments) {
1837+ var arg0 context.Context
1838+ if args[0] != nil {
1839+ arg0 = args[0].(context.Context)
1840+ }
1841+ var arg1 entity.FolderID
1842+ if args[1] != nil {
1843+ arg1 = args[1].(entity.FolderID)
1844+ }
1845+ var arg2 string
1846+ if args[2] != nil {
1847+ arg2 = args[2].(string)
1848+ }
1849+ var arg3 string
1850+ if args[3] != nil {
1851+ arg3 = args[3].(string)
1852+ }
1853+ run(
1854+ arg0,
1855+ arg1,
1856+ arg2,
1857+ arg3,
1858+ )
1859+ })
1860+ return _c
1861+}
1862+
1863+func (_c *MockHomepageFavorites_UpdateFolder_Call) Return(err error) *MockHomepageFavorites_UpdateFolder_Call {
1864+ _c.Call.Return(err)
1865+ return _c
1866+}
1867+
1868+func (_c *MockHomepageFavorites_UpdateFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, name string, icon string) error) *MockHomepageFavorites_UpdateFolder_Call {
1869+ _c.Call.Return(run)
1870+ return _c
1871+}
1872+
1873+// UpdateTag provides a mock function for the type MockHomepageFavorites
1874+func (_mock *MockHomepageFavorites) UpdateTag(ctx context.Context, id entity.TagID, name string, color string) error {
1875+ ret := _mock.Called(ctx, id, name, color)
1876+
1877+ if len(ret) == 0 {
1878+ panic("no return value specified for UpdateTag")
1879+ }
1880+
1881+ var r0 error
1882+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, string, string) error); ok {
1883+ r0 = returnFunc(ctx, id, name, color)
1884+ } else {
1885+ r0 = ret.Error(0)
1886+ }
1887+ return r0
1888+}
1889+
1890+// MockHomepageFavorites_UpdateTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTag'
1891+type MockHomepageFavorites_UpdateTag_Call struct {
1892+ *mock.Call
1893+}
1894+
1895+// UpdateTag is a helper method to define mock.On call
1896+// - ctx context.Context
1897+// - id entity.TagID
1898+// - name string
1899+// - color string
1900+func (_e *MockHomepageFavorites_Expecter) UpdateTag(ctx any, id any, name any, color any) *MockHomepageFavorites_UpdateTag_Call {
1901+ return &MockHomepageFavorites_UpdateTag_Call{Call: _e.mock.On("UpdateTag", ctx, id, name, color)}
1902+}
1903+
1904+func (_c *MockHomepageFavorites_UpdateTag_Call) Run(run func(ctx context.Context, id entity.TagID, name string, color string)) *MockHomepageFavorites_UpdateTag_Call {
1905+ _c.Call.Run(func(args mock.Arguments) {
1906+ var arg0 context.Context
1907+ if args[0] != nil {
1908+ arg0 = args[0].(context.Context)
1909+ }
1910+ var arg1 entity.TagID
1911+ if args[1] != nil {
1912+ arg1 = args[1].(entity.TagID)
1913+ }
1914+ var arg2 string
1915+ if args[2] != nil {
1916+ arg2 = args[2].(string)
1917+ }
1918+ var arg3 string
1919+ if args[3] != nil {
1920+ arg3 = args[3].(string)
1921+ }
1922+ run(
1923+ arg0,
1924+ arg1,
1925+ arg2,
1926+ arg3,
1927+ )
1928+ })
1929+ return _c
1930+}
1931+
1932+func (_c *MockHomepageFavorites_UpdateTag_Call) Return(err error) *MockHomepageFavorites_UpdateTag_Call {
1933+ _c.Call.Return(err)
1934+ return _c
1935+}
1936+
1937+func (_c *MockHomepageFavorites_UpdateTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID, name string, color string) error) *MockHomepageFavorites_UpdateTag_Call {
1938+ _c.Call.Return(run)
1939+ return _c
1940+}
A internal/application/port/mocks/idle_inhibit.go +234 -0
@@ -0,0 +1,234 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockIdleInhibitor creates a new instance of MockIdleInhibitor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockIdleInhibitor(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockIdleInhibitor {
19+ mock := &MockIdleInhibitor{}
20+ mock.Mock.Test(t)
21+
22+ t.Cleanup(func() { mock.AssertExpectations(t) })
23+
24+ return mock
25+}
26+
27+// MockIdleInhibitor is an autogenerated mock type for the IdleInhibitor type
28+type MockIdleInhibitor struct {
29+ mock.Mock
30+}
31+
32+type MockIdleInhibitor_Expecter struct {
33+ mock *mock.Mock
34+}
35+
36+func (_m *MockIdleInhibitor) EXPECT() *MockIdleInhibitor_Expecter {
37+ return &MockIdleInhibitor_Expecter{mock: &_m.Mock}
38+}
39+
40+// Close provides a mock function for the type MockIdleInhibitor
41+func (_mock *MockIdleInhibitor) Close() error {
42+ ret := _mock.Called()
43+
44+ if len(ret) == 0 {
45+ panic("no return value specified for Close")
46+ }
47+
48+ var r0 error
49+ if returnFunc, ok := ret.Get(0).(func() error); ok {
50+ r0 = returnFunc()
51+ } else {
52+ r0 = ret.Error(0)
53+ }
54+ return r0
55+}
56+
57+// MockIdleInhibitor_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
58+type MockIdleInhibitor_Close_Call struct {
59+ *mock.Call
60+}
61+
62+// Close is a helper method to define mock.On call
63+func (_e *MockIdleInhibitor_Expecter) Close() *MockIdleInhibitor_Close_Call {
64+ return &MockIdleInhibitor_Close_Call{Call: _e.mock.On("Close")}
65+}
66+
67+func (_c *MockIdleInhibitor_Close_Call) Run(run func()) *MockIdleInhibitor_Close_Call {
68+ _c.Call.Run(func(args mock.Arguments) {
69+ run()
70+ })
71+ return _c
72+}
73+
74+func (_c *MockIdleInhibitor_Close_Call) Return(err error) *MockIdleInhibitor_Close_Call {
75+ _c.Call.Return(err)
76+ return _c
77+}
78+
79+func (_c *MockIdleInhibitor_Close_Call) RunAndReturn(run func() error) *MockIdleInhibitor_Close_Call {
80+ _c.Call.Return(run)
81+ return _c
82+}
83+
84+// Inhibit provides a mock function for the type MockIdleInhibitor
85+func (_mock *MockIdleInhibitor) Inhibit(ctx context.Context, reason string) error {
86+ ret := _mock.Called(ctx, reason)
87+
88+ if len(ret) == 0 {
89+ panic("no return value specified for Inhibit")
90+ }
91+
92+ var r0 error
93+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
94+ r0 = returnFunc(ctx, reason)
95+ } else {
96+ r0 = ret.Error(0)
97+ }
98+ return r0
99+}
100+
101+// MockIdleInhibitor_Inhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inhibit'
102+type MockIdleInhibitor_Inhibit_Call struct {
103+ *mock.Call
104+}
105+
106+// Inhibit is a helper method to define mock.On call
107+// - ctx context.Context
108+// - reason string
109+func (_e *MockIdleInhibitor_Expecter) Inhibit(ctx any, reason any) *MockIdleInhibitor_Inhibit_Call {
110+ return &MockIdleInhibitor_Inhibit_Call{Call: _e.mock.On("Inhibit", ctx, reason)}
111+}
112+
113+func (_c *MockIdleInhibitor_Inhibit_Call) Run(run func(ctx context.Context, reason string)) *MockIdleInhibitor_Inhibit_Call {
114+ _c.Call.Run(func(args mock.Arguments) {
115+ var arg0 context.Context
116+ if args[0] != nil {
117+ arg0 = args[0].(context.Context)
118+ }
119+ var arg1 string
120+ if args[1] != nil {
121+ arg1 = args[1].(string)
122+ }
123+ run(
124+ arg0,
125+ arg1,
126+ )
127+ })
128+ return _c
129+}
130+
131+func (_c *MockIdleInhibitor_Inhibit_Call) Return(err error) *MockIdleInhibitor_Inhibit_Call {
132+ _c.Call.Return(err)
133+ return _c
134+}
135+
136+func (_c *MockIdleInhibitor_Inhibit_Call) RunAndReturn(run func(ctx context.Context, reason string) error) *MockIdleInhibitor_Inhibit_Call {
137+ _c.Call.Return(run)
138+ return _c
139+}
140+
141+// IsInhibited provides a mock function for the type MockIdleInhibitor
142+func (_mock *MockIdleInhibitor) IsInhibited() bool {
143+ ret := _mock.Called()
144+
145+ if len(ret) == 0 {
146+ panic("no return value specified for IsInhibited")
147+ }
148+
149+ var r0 bool
150+ if returnFunc, ok := ret.Get(0).(func() bool); ok {
151+ r0 = returnFunc()
152+ } else {
153+ r0 = ret.Get(0).(bool)
154+ }
155+ return r0
156+}
157+
158+// MockIdleInhibitor_IsInhibited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInhibited'
159+type MockIdleInhibitor_IsInhibited_Call struct {
160+ *mock.Call
161+}
162+
163+// IsInhibited is a helper method to define mock.On call
164+func (_e *MockIdleInhibitor_Expecter) IsInhibited() *MockIdleInhibitor_IsInhibited_Call {
165+ return &MockIdleInhibitor_IsInhibited_Call{Call: _e.mock.On("IsInhibited")}
166+}
167+
168+func (_c *MockIdleInhibitor_IsInhibited_Call) Run(run func()) *MockIdleInhibitor_IsInhibited_Call {
169+ _c.Call.Run(func(args mock.Arguments) {
170+ run()
171+ })
172+ return _c
173+}
174+
175+func (_c *MockIdleInhibitor_IsInhibited_Call) Return(b bool) *MockIdleInhibitor_IsInhibited_Call {
176+ _c.Call.Return(b)
177+ return _c
178+}
179+
180+func (_c *MockIdleInhibitor_IsInhibited_Call) RunAndReturn(run func() bool) *MockIdleInhibitor_IsInhibited_Call {
181+ _c.Call.Return(run)
182+ return _c
183+}
184+
185+// Uninhibit provides a mock function for the type MockIdleInhibitor
186+func (_mock *MockIdleInhibitor) Uninhibit(ctx context.Context) error {
187+ ret := _mock.Called(ctx)
188+
189+ if len(ret) == 0 {
190+ panic("no return value specified for Uninhibit")
191+ }
192+
193+ var r0 error
194+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
195+ r0 = returnFunc(ctx)
196+ } else {
197+ r0 = ret.Error(0)
198+ }
199+ return r0
200+}
201+
202+// MockIdleInhibitor_Uninhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninhibit'
203+type MockIdleInhibitor_Uninhibit_Call struct {
204+ *mock.Call
205+}
206+
207+// Uninhibit is a helper method to define mock.On call
208+// - ctx context.Context
209+func (_e *MockIdleInhibitor_Expecter) Uninhibit(ctx any) *MockIdleInhibitor_Uninhibit_Call {
210+ return &MockIdleInhibitor_Uninhibit_Call{Call: _e.mock.On("Uninhibit", ctx)}
211+}
212+
213+func (_c *MockIdleInhibitor_Uninhibit_Call) Run(run func(ctx context.Context)) *MockIdleInhibitor_Uninhibit_Call {
214+ _c.Call.Run(func(args mock.Arguments) {
215+ var arg0 context.Context
216+ if args[0] != nil {
217+ arg0 = args[0].(context.Context)
218+ }
219+ run(
220+ arg0,
221+ )
222+ })
223+ return _c
224+}
225+
226+func (_c *MockIdleInhibitor_Uninhibit_Call) Return(err error) *MockIdleInhibitor_Uninhibit_Call {
227+ _c.Call.Return(err)
228+ return _c
229+}
230+
231+func (_c *MockIdleInhibitor_Uninhibit_Call) RunAndReturn(run func(ctx context.Context) error) *MockIdleInhibitor_Uninhibit_Call {
232+ _c.Call.Return(run)
233+ return _c
234+}
A internal/application/port/mocks/image_data.go +196 -0
@@ -0,0 +1,196 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ "github.com/bnema/dumber/internal/domain/entity"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// NewMockImageDataResolver creates a new instance of MockImageDataResolver. 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.
17+func NewMockImageDataResolver(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockImageDataResolver {
21+ mock := &MockImageDataResolver{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockImageDataResolver is an autogenerated mock type for the ImageDataResolver type
30+type MockImageDataResolver struct {
31+ mock.Mock
32+}
33+
34+type MockImageDataResolver_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockImageDataResolver) EXPECT() *MockImageDataResolver_Expecter {
39+ return &MockImageDataResolver_Expecter{mock: &_m.Mock}
40+}
41+
42+// ResolveImageData provides a mock function for the type MockImageDataResolver
43+func (_mock *MockImageDataResolver) ResolveImageData(ctx context.Context, uri string) (entity.ImageData, error) {
44+ ret := _mock.Called(ctx, uri)
45+
46+ if len(ret) == 0 {
47+ panic("no return value specified for ResolveImageData")
48+ }
49+
50+ var r0 entity.ImageData
51+ var r1 error
52+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (entity.ImageData, error)); ok {
53+ return returnFunc(ctx, uri)
54+ }
55+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) entity.ImageData); ok {
56+ r0 = returnFunc(ctx, uri)
57+ } else {
58+ r0 = ret.Get(0).(entity.ImageData)
59+ }
60+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
61+ r1 = returnFunc(ctx, uri)
62+ } else {
63+ r1 = ret.Error(1)
64+ }
65+ return r0, r1
66+}
67+
68+// MockImageDataResolver_ResolveImageData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveImageData'
69+type MockImageDataResolver_ResolveImageData_Call struct {
70+ *mock.Call
71+}
72+
73+// ResolveImageData is a helper method to define mock.On call
74+// - ctx context.Context
75+// - uri string
76+func (_e *MockImageDataResolver_Expecter) ResolveImageData(ctx any, uri any) *MockImageDataResolver_ResolveImageData_Call {
77+ return &MockImageDataResolver_ResolveImageData_Call{Call: _e.mock.On("ResolveImageData", ctx, uri)}
78+}
79+
80+func (_c *MockImageDataResolver_ResolveImageData_Call) Run(run func(ctx context.Context, uri string)) *MockImageDataResolver_ResolveImageData_Call {
81+ _c.Call.Run(func(args mock.Arguments) {
82+ var arg0 context.Context
83+ if args[0] != nil {
84+ arg0 = args[0].(context.Context)
85+ }
86+ var arg1 string
87+ if args[1] != nil {
88+ arg1 = args[1].(string)
89+ }
90+ run(
91+ arg0,
92+ arg1,
93+ )
94+ })
95+ return _c
96+}
97+
98+func (_c *MockImageDataResolver_ResolveImageData_Call) Return(imageData entity.ImageData, err error) *MockImageDataResolver_ResolveImageData_Call {
99+ _c.Call.Return(imageData, err)
100+ return _c
101+}
102+
103+func (_c *MockImageDataResolver_ResolveImageData_Call) RunAndReturn(run func(ctx context.Context, uri string) (entity.ImageData, error)) *MockImageDataResolver_ResolveImageData_Call {
104+ _c.Call.Return(run)
105+ return _c
106+}
107+
108+// NewMockResolvedImageSaver creates a new instance of MockResolvedImageSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
109+// The first argument is typically a *testing.T value.
110+func NewMockResolvedImageSaver(t interface {
111+ mock.TestingT
112+ Cleanup(func())
113+}) *MockResolvedImageSaver {
114+ mock := &MockResolvedImageSaver{}
115+ mock.Mock.Test(t)
116+
117+ t.Cleanup(func() { mock.AssertExpectations(t) })
118+
119+ return mock
120+}
121+
122+// MockResolvedImageSaver is an autogenerated mock type for the ResolvedImageSaver type
123+type MockResolvedImageSaver struct {
124+ mock.Mock
125+}
126+
127+type MockResolvedImageSaver_Expecter struct {
128+ mock *mock.Mock
129+}
130+
131+func (_m *MockResolvedImageSaver) EXPECT() *MockResolvedImageSaver_Expecter {
132+ return &MockResolvedImageSaver_Expecter{mock: &_m.Mock}
133+}
134+
135+// SaveResolvedImage provides a mock function for the type MockResolvedImageSaver
136+func (_mock *MockResolvedImageSaver) SaveResolvedImage(ctx context.Context, image entity.ImageData, menuContext port.MenuContext) error {
137+ ret := _mock.Called(ctx, image, menuContext)
138+
139+ if len(ret) == 0 {
140+ panic("no return value specified for SaveResolvedImage")
141+ }
142+
143+ var r0 error
144+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.ImageData, port.MenuContext) error); ok {
145+ r0 = returnFunc(ctx, image, menuContext)
146+ } else {
147+ r0 = ret.Error(0)
148+ }
149+ return r0
150+}
151+
152+// MockResolvedImageSaver_SaveResolvedImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveResolvedImage'
153+type MockResolvedImageSaver_SaveResolvedImage_Call struct {
154+ *mock.Call
155+}
156+
157+// SaveResolvedImage is a helper method to define mock.On call
158+// - ctx context.Context
159+// - image entity.ImageData
160+// - menuContext port.MenuContext
161+func (_e *MockResolvedImageSaver_Expecter) SaveResolvedImage(ctx any, image any, menuContext any) *MockResolvedImageSaver_SaveResolvedImage_Call {
162+ return &MockResolvedImageSaver_SaveResolvedImage_Call{Call: _e.mock.On("SaveResolvedImage", ctx, image, menuContext)}
163+}
164+
165+func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) Run(run func(ctx context.Context, image entity.ImageData, menuContext port.MenuContext)) *MockResolvedImageSaver_SaveResolvedImage_Call {
166+ _c.Call.Run(func(args mock.Arguments) {
167+ var arg0 context.Context
168+ if args[0] != nil {
169+ arg0 = args[0].(context.Context)
170+ }
171+ var arg1 entity.ImageData
172+ if args[1] != nil {
173+ arg1 = args[1].(entity.ImageData)
174+ }
175+ var arg2 port.MenuContext
176+ if args[2] != nil {
177+ arg2 = args[2].(port.MenuContext)
178+ }
179+ run(
180+ arg0,
181+ arg1,
182+ arg2,
183+ )
184+ })
185+ return _c
186+}
187+
188+func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) Return(err error) *MockResolvedImageSaver_SaveResolvedImage_Call {
189+ _c.Call.Return(err)
190+ return _c
191+}
192+
193+func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) RunAndReturn(run func(ctx context.Context, image entity.ImageData, menuContext port.MenuContext) error) *MockResolvedImageSaver_SaveResolvedImage_Call {
194+ _c.Call.Return(run)
195+ return _c
196+}
A internal/application/port/mocks/keybindings.go +773 -0
@@ -0,0 +1,773 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockKeybindingsProvider creates a new instance of MockKeybindingsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockKeybindingsProvider(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockKeybindingsProvider {
20+ mock := &MockKeybindingsProvider{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockKeybindingsProvider is an autogenerated mock type for the KeybindingsProvider type
29+type MockKeybindingsProvider struct {
30+ mock.Mock
31+}
32+
33+type MockKeybindingsProvider_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockKeybindingsProvider) EXPECT() *MockKeybindingsProvider_Expecter {
38+ return &MockKeybindingsProvider_Expecter{mock: &_m.Mock}
39+}
40+
41+// CheckConflicts provides a mock function for the type MockKeybindingsProvider
42+func (_mock *MockKeybindingsProvider) CheckConflicts(ctx context.Context, mode string, action string, keys []string) ([]port.KeybindingConflict, error) {
43+ ret := _mock.Called(ctx, mode, action, keys)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for CheckConflicts")
47+ }
48+
49+ var r0 []port.KeybindingConflict
50+ var r1 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []string) ([]port.KeybindingConflict, error)); ok {
52+ return returnFunc(ctx, mode, action, keys)
53+ }
54+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []string) []port.KeybindingConflict); ok {
55+ r0 = returnFunc(ctx, mode, action, keys)
56+ } else {
57+ if ret.Get(0) != nil {
58+ r0 = ret.Get(0).([]port.KeybindingConflict)
59+ }
60+ }
61+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, []string) error); ok {
62+ r1 = returnFunc(ctx, mode, action, keys)
63+ } else {
64+ r1 = ret.Error(1)
65+ }
66+ return r0, r1
67+}
68+
69+// MockKeybindingsProvider_CheckConflicts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckConflicts'
70+type MockKeybindingsProvider_CheckConflicts_Call struct {
71+ *mock.Call
72+}
73+
74+// CheckConflicts is a helper method to define mock.On call
75+// - ctx context.Context
76+// - mode string
77+// - action string
78+// - keys []string
79+func (_e *MockKeybindingsProvider_Expecter) CheckConflicts(ctx any, mode any, action any, keys any) *MockKeybindingsProvider_CheckConflicts_Call {
80+ return &MockKeybindingsProvider_CheckConflicts_Call{Call: _e.mock.On("CheckConflicts", ctx, mode, action, keys)}
81+}
82+
83+func (_c *MockKeybindingsProvider_CheckConflicts_Call) Run(run func(ctx context.Context, mode string, action string, keys []string)) *MockKeybindingsProvider_CheckConflicts_Call {
84+ _c.Call.Run(func(args mock.Arguments) {
85+ var arg0 context.Context
86+ if args[0] != nil {
87+ arg0 = args[0].(context.Context)
88+ }
89+ var arg1 string
90+ if args[1] != nil {
91+ arg1 = args[1].(string)
92+ }
93+ var arg2 string
94+ if args[2] != nil {
95+ arg2 = args[2].(string)
96+ }
97+ var arg3 []string
98+ if args[3] != nil {
99+ arg3 = args[3].([]string)
100+ }
101+ run(
102+ arg0,
103+ arg1,
104+ arg2,
105+ arg3,
106+ )
107+ })
108+ return _c
109+}
110+
111+func (_c *MockKeybindingsProvider_CheckConflicts_Call) Return(keybindingConflicts []port.KeybindingConflict, err error) *MockKeybindingsProvider_CheckConflicts_Call {
112+ _c.Call.Return(keybindingConflicts, err)
113+ return _c
114+}
115+
116+func (_c *MockKeybindingsProvider_CheckConflicts_Call) RunAndReturn(run func(ctx context.Context, mode string, action string, keys []string) ([]port.KeybindingConflict, error)) *MockKeybindingsProvider_CheckConflicts_Call {
117+ _c.Call.Return(run)
118+ return _c
119+}
120+
121+// GetDefaultKeybindings provides a mock function for the type MockKeybindingsProvider
122+func (_mock *MockKeybindingsProvider) GetDefaultKeybindings(ctx context.Context) (port.KeybindingsConfig, error) {
123+ ret := _mock.Called(ctx)
124+
125+ if len(ret) == 0 {
126+ panic("no return value specified for GetDefaultKeybindings")
127+ }
128+
129+ var r0 port.KeybindingsConfig
130+ var r1 error
131+ if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok {
132+ return returnFunc(ctx)
133+ }
134+ if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok {
135+ r0 = returnFunc(ctx)
136+ } else {
137+ r0 = ret.Get(0).(port.KeybindingsConfig)
138+ }
139+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
140+ r1 = returnFunc(ctx)
141+ } else {
142+ r1 = ret.Error(1)
143+ }
144+ return r0, r1
145+}
146+
147+// MockKeybindingsProvider_GetDefaultKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultKeybindings'
148+type MockKeybindingsProvider_GetDefaultKeybindings_Call struct {
149+ *mock.Call
150+}
151+
152+// GetDefaultKeybindings is a helper method to define mock.On call
153+// - ctx context.Context
154+func (_e *MockKeybindingsProvider_Expecter) GetDefaultKeybindings(ctx any) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
155+ return &MockKeybindingsProvider_GetDefaultKeybindings_Call{Call: _e.mock.On("GetDefaultKeybindings", ctx)}
156+}
157+
158+func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
159+ _c.Call.Run(func(args mock.Arguments) {
160+ var arg0 context.Context
161+ if args[0] != nil {
162+ arg0 = args[0].(context.Context)
163+ }
164+ run(
165+ arg0,
166+ )
167+ })
168+ return _c
169+}
170+
171+func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
172+ _c.Call.Return(keybindingsConfig, err)
173+ return _c
174+}
175+
176+func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
177+ _c.Call.Return(run)
178+ return _c
179+}
180+
181+// GetKeybindings provides a mock function for the type MockKeybindingsProvider
182+func (_mock *MockKeybindingsProvider) GetKeybindings(ctx context.Context) (port.KeybindingsConfig, error) {
183+ ret := _mock.Called(ctx)
184+
185+ if len(ret) == 0 {
186+ panic("no return value specified for GetKeybindings")
187+ }
188+
189+ var r0 port.KeybindingsConfig
190+ var r1 error
191+ if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok {
192+ return returnFunc(ctx)
193+ }
194+ if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok {
195+ r0 = returnFunc(ctx)
196+ } else {
197+ r0 = ret.Get(0).(port.KeybindingsConfig)
198+ }
199+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
200+ r1 = returnFunc(ctx)
201+ } else {
202+ r1 = ret.Error(1)
203+ }
204+ return r0, r1
205+}
206+
207+// MockKeybindingsProvider_GetKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeybindings'
208+type MockKeybindingsProvider_GetKeybindings_Call struct {
209+ *mock.Call
210+}
211+
212+// GetKeybindings is a helper method to define mock.On call
213+// - ctx context.Context
214+func (_e *MockKeybindingsProvider_Expecter) GetKeybindings(ctx any) *MockKeybindingsProvider_GetKeybindings_Call {
215+ return &MockKeybindingsProvider_GetKeybindings_Call{Call: _e.mock.On("GetKeybindings", ctx)}
216+}
217+
218+func (_c *MockKeybindingsProvider_GetKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsProvider_GetKeybindings_Call {
219+ _c.Call.Run(func(args mock.Arguments) {
220+ var arg0 context.Context
221+ if args[0] != nil {
222+ arg0 = args[0].(context.Context)
223+ }
224+ run(
225+ arg0,
226+ )
227+ })
228+ return _c
229+}
230+
231+func (_c *MockKeybindingsProvider_GetKeybindings_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsProvider_GetKeybindings_Call {
232+ _c.Call.Return(keybindingsConfig, err)
233+ return _c
234+}
235+
236+func (_c *MockKeybindingsProvider_GetKeybindings_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsProvider_GetKeybindings_Call {
237+ _c.Call.Return(run)
238+ return _c
239+}
240+
241+// NewMockKeybindingsSaver creates a new instance of MockKeybindingsSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
242+// The first argument is typically a *testing.T value.
243+func NewMockKeybindingsSaver(t interface {
244+ mock.TestingT
245+ Cleanup(func())
246+}) *MockKeybindingsSaver {
247+ mock := &MockKeybindingsSaver{}
248+ mock.Mock.Test(t)
249+
250+ t.Cleanup(func() { mock.AssertExpectations(t) })
251+
252+ return mock
253+}
254+
255+// MockKeybindingsSaver is an autogenerated mock type for the KeybindingsSaver type
256+type MockKeybindingsSaver struct {
257+ mock.Mock
258+}
259+
260+type MockKeybindingsSaver_Expecter struct {
261+ mock *mock.Mock
262+}
263+
264+func (_m *MockKeybindingsSaver) EXPECT() *MockKeybindingsSaver_Expecter {
265+ return &MockKeybindingsSaver_Expecter{mock: &_m.Mock}
266+}
267+
268+// ResetAllKeybindings provides a mock function for the type MockKeybindingsSaver
269+func (_mock *MockKeybindingsSaver) ResetAllKeybindings(ctx context.Context) error {
270+ ret := _mock.Called(ctx)
271+
272+ if len(ret) == 0 {
273+ panic("no return value specified for ResetAllKeybindings")
274+ }
275+
276+ var r0 error
277+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
278+ r0 = returnFunc(ctx)
279+ } else {
280+ r0 = ret.Error(0)
281+ }
282+ return r0
283+}
284+
285+// MockKeybindingsSaver_ResetAllKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetAllKeybindings'
286+type MockKeybindingsSaver_ResetAllKeybindings_Call struct {
287+ *mock.Call
288+}
289+
290+// ResetAllKeybindings is a helper method to define mock.On call
291+// - ctx context.Context
292+func (_e *MockKeybindingsSaver_Expecter) ResetAllKeybindings(ctx any) *MockKeybindingsSaver_ResetAllKeybindings_Call {
293+ return &MockKeybindingsSaver_ResetAllKeybindings_Call{Call: _e.mock.On("ResetAllKeybindings", ctx)}
294+}
295+
296+func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsSaver_ResetAllKeybindings_Call {
297+ _c.Call.Run(func(args mock.Arguments) {
298+ var arg0 context.Context
299+ if args[0] != nil {
300+ arg0 = args[0].(context.Context)
301+ }
302+ run(
303+ arg0,
304+ )
305+ })
306+ return _c
307+}
308+
309+func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) Return(err error) *MockKeybindingsSaver_ResetAllKeybindings_Call {
310+ _c.Call.Return(err)
311+ return _c
312+}
313+
314+func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) RunAndReturn(run func(ctx context.Context) error) *MockKeybindingsSaver_ResetAllKeybindings_Call {
315+ _c.Call.Return(run)
316+ return _c
317+}
318+
319+// ResetKeybinding provides a mock function for the type MockKeybindingsSaver
320+func (_mock *MockKeybindingsSaver) ResetKeybinding(ctx context.Context, req port.ResetKeybindingRequest) error {
321+ ret := _mock.Called(ctx, req)
322+
323+ if len(ret) == 0 {
324+ panic("no return value specified for ResetKeybinding")
325+ }
326+
327+ var r0 error
328+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.ResetKeybindingRequest) error); ok {
329+ r0 = returnFunc(ctx, req)
330+ } else {
331+ r0 = ret.Error(0)
332+ }
333+ return r0
334+}
335+
336+// MockKeybindingsSaver_ResetKeybinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetKeybinding'
337+type MockKeybindingsSaver_ResetKeybinding_Call struct {
338+ *mock.Call
339+}
340+
341+// ResetKeybinding is a helper method to define mock.On call
342+// - ctx context.Context
343+// - req port.ResetKeybindingRequest
344+func (_e *MockKeybindingsSaver_Expecter) ResetKeybinding(ctx any, req any) *MockKeybindingsSaver_ResetKeybinding_Call {
345+ return &MockKeybindingsSaver_ResetKeybinding_Call{Call: _e.mock.On("ResetKeybinding", ctx, req)}
346+}
347+
348+func (_c *MockKeybindingsSaver_ResetKeybinding_Call) Run(run func(ctx context.Context, req port.ResetKeybindingRequest)) *MockKeybindingsSaver_ResetKeybinding_Call {
349+ _c.Call.Run(func(args mock.Arguments) {
350+ var arg0 context.Context
351+ if args[0] != nil {
352+ arg0 = args[0].(context.Context)
353+ }
354+ var arg1 port.ResetKeybindingRequest
355+ if args[1] != nil {
356+ arg1 = args[1].(port.ResetKeybindingRequest)
357+ }
358+ run(
359+ arg0,
360+ arg1,
361+ )
362+ })
363+ return _c
364+}
365+
366+func (_c *MockKeybindingsSaver_ResetKeybinding_Call) Return(err error) *MockKeybindingsSaver_ResetKeybinding_Call {
367+ _c.Call.Return(err)
368+ return _c
369+}
370+
371+func (_c *MockKeybindingsSaver_ResetKeybinding_Call) RunAndReturn(run func(ctx context.Context, req port.ResetKeybindingRequest) error) *MockKeybindingsSaver_ResetKeybinding_Call {
372+ _c.Call.Return(run)
373+ return _c
374+}
375+
376+// SetKeybinding provides a mock function for the type MockKeybindingsSaver
377+func (_mock *MockKeybindingsSaver) SetKeybinding(ctx context.Context, req port.SetKeybindingRequest) error {
378+ ret := _mock.Called(ctx, req)
379+
380+ if len(ret) == 0 {
381+ panic("no return value specified for SetKeybinding")
382+ }
383+
384+ var r0 error
385+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) error); ok {
386+ r0 = returnFunc(ctx, req)
387+ } else {
388+ r0 = ret.Error(0)
389+ }
390+ return r0
391+}
392+
393+// MockKeybindingsSaver_SetKeybinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetKeybinding'
394+type MockKeybindingsSaver_SetKeybinding_Call struct {
395+ *mock.Call
396+}
397+
398+// SetKeybinding is a helper method to define mock.On call
399+// - ctx context.Context
400+// - req port.SetKeybindingRequest
401+func (_e *MockKeybindingsSaver_Expecter) SetKeybinding(ctx any, req any) *MockKeybindingsSaver_SetKeybinding_Call {
402+ return &MockKeybindingsSaver_SetKeybinding_Call{Call: _e.mock.On("SetKeybinding", ctx, req)}
403+}
404+
405+func (_c *MockKeybindingsSaver_SetKeybinding_Call) Run(run func(ctx context.Context, req port.SetKeybindingRequest)) *MockKeybindingsSaver_SetKeybinding_Call {
406+ _c.Call.Run(func(args mock.Arguments) {
407+ var arg0 context.Context
408+ if args[0] != nil {
409+ arg0 = args[0].(context.Context)
410+ }
411+ var arg1 port.SetKeybindingRequest
412+ if args[1] != nil {
413+ arg1 = args[1].(port.SetKeybindingRequest)
414+ }
415+ run(
416+ arg0,
417+ arg1,
418+ )
419+ })
420+ return _c
421+}
422+
423+func (_c *MockKeybindingsSaver_SetKeybinding_Call) Return(err error) *MockKeybindingsSaver_SetKeybinding_Call {
424+ _c.Call.Return(err)
425+ return _c
426+}
427+
428+func (_c *MockKeybindingsSaver_SetKeybinding_Call) RunAndReturn(run func(ctx context.Context, req port.SetKeybindingRequest) error) *MockKeybindingsSaver_SetKeybinding_Call {
429+ _c.Call.Return(run)
430+ return _c
431+}
432+
433+// NewMockKeybindingsGetter creates a new instance of MockKeybindingsGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
434+// The first argument is typically a *testing.T value.
435+func NewMockKeybindingsGetter(t interface {
436+ mock.TestingT
437+ Cleanup(func())
438+}) *MockKeybindingsGetter {
439+ mock := &MockKeybindingsGetter{}
440+ mock.Mock.Test(t)
441+
442+ t.Cleanup(func() { mock.AssertExpectations(t) })
443+
444+ return mock
445+}
446+
447+// MockKeybindingsGetter is an autogenerated mock type for the KeybindingsGetter type
448+type MockKeybindingsGetter struct {
449+ mock.Mock
450+}
451+
452+type MockKeybindingsGetter_Expecter struct {
453+ mock *mock.Mock
454+}
455+
456+func (_m *MockKeybindingsGetter) EXPECT() *MockKeybindingsGetter_Expecter {
457+ return &MockKeybindingsGetter_Expecter{mock: &_m.Mock}
458+}
459+
460+// Execute provides a mock function for the type MockKeybindingsGetter
461+func (_mock *MockKeybindingsGetter) Execute(ctx context.Context) (port.KeybindingsConfig, error) {
462+ ret := _mock.Called(ctx)
463+
464+ if len(ret) == 0 {
465+ panic("no return value specified for Execute")
466+ }
467+
468+ var r0 port.KeybindingsConfig
469+ var r1 error
470+ if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok {
471+ return returnFunc(ctx)
472+ }
473+ if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok {
474+ r0 = returnFunc(ctx)
475+ } else {
476+ r0 = ret.Get(0).(port.KeybindingsConfig)
477+ }
478+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
479+ r1 = returnFunc(ctx)
480+ } else {
481+ r1 = ret.Error(1)
482+ }
483+ return r0, r1
484+}
485+
486+// MockKeybindingsGetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
487+type MockKeybindingsGetter_Execute_Call struct {
488+ *mock.Call
489+}
490+
491+// Execute is a helper method to define mock.On call
492+// - ctx context.Context
493+func (_e *MockKeybindingsGetter_Expecter) Execute(ctx any) *MockKeybindingsGetter_Execute_Call {
494+ return &MockKeybindingsGetter_Execute_Call{Call: _e.mock.On("Execute", ctx)}
495+}
496+
497+func (_c *MockKeybindingsGetter_Execute_Call) Run(run func(ctx context.Context)) *MockKeybindingsGetter_Execute_Call {
498+ _c.Call.Run(func(args mock.Arguments) {
499+ var arg0 context.Context
500+ if args[0] != nil {
501+ arg0 = args[0].(context.Context)
502+ }
503+ run(
504+ arg0,
505+ )
506+ })
507+ return _c
508+}
509+
510+func (_c *MockKeybindingsGetter_Execute_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsGetter_Execute_Call {
511+ _c.Call.Return(keybindingsConfig, err)
512+ return _c
513+}
514+
515+func (_c *MockKeybindingsGetter_Execute_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsGetter_Execute_Call {
516+ _c.Call.Return(run)
517+ return _c
518+}
519+
520+// NewMockKeybindingSetter creates a new instance of MockKeybindingSetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
521+// The first argument is typically a *testing.T value.
522+func NewMockKeybindingSetter(t interface {
523+ mock.TestingT
524+ Cleanup(func())
525+}) *MockKeybindingSetter {
526+ mock := &MockKeybindingSetter{}
527+ mock.Mock.Test(t)
528+
529+ t.Cleanup(func() { mock.AssertExpectations(t) })
530+
531+ return mock
532+}
533+
534+// MockKeybindingSetter is an autogenerated mock type for the KeybindingSetter type
535+type MockKeybindingSetter struct {
536+ mock.Mock
537+}
538+
539+type MockKeybindingSetter_Expecter struct {
540+ mock *mock.Mock
541+}
542+
543+func (_m *MockKeybindingSetter) EXPECT() *MockKeybindingSetter_Expecter {
544+ return &MockKeybindingSetter_Expecter{mock: &_m.Mock}
545+}
546+
547+// Execute provides a mock function for the type MockKeybindingSetter
548+func (_mock *MockKeybindingSetter) Execute(ctx context.Context, req port.SetKeybindingRequest) (port.SetKeybindingResponse, error) {
549+ ret := _mock.Called(ctx, req)
550+
551+ if len(ret) == 0 {
552+ panic("no return value specified for Execute")
553+ }
554+
555+ var r0 port.SetKeybindingResponse
556+ var r1 error
557+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) (port.SetKeybindingResponse, error)); ok {
558+ return returnFunc(ctx, req)
559+ }
560+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) port.SetKeybindingResponse); ok {
561+ r0 = returnFunc(ctx, req)
562+ } else {
563+ r0 = ret.Get(0).(port.SetKeybindingResponse)
564+ }
565+ if returnFunc, ok := ret.Get(1).(func(context.Context, port.SetKeybindingRequest) error); ok {
566+ r1 = returnFunc(ctx, req)
567+ } else {
568+ r1 = ret.Error(1)
569+ }
570+ return r0, r1
571+}
572+
573+// MockKeybindingSetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
574+type MockKeybindingSetter_Execute_Call struct {
575+ *mock.Call
576+}
577+
578+// Execute is a helper method to define mock.On call
579+// - ctx context.Context
580+// - req port.SetKeybindingRequest
581+func (_e *MockKeybindingSetter_Expecter) Execute(ctx any, req any) *MockKeybindingSetter_Execute_Call {
582+ return &MockKeybindingSetter_Execute_Call{Call: _e.mock.On("Execute", ctx, req)}
583+}
584+
585+func (_c *MockKeybindingSetter_Execute_Call) Run(run func(ctx context.Context, req port.SetKeybindingRequest)) *MockKeybindingSetter_Execute_Call {
586+ _c.Call.Run(func(args mock.Arguments) {
587+ var arg0 context.Context
588+ if args[0] != nil {
589+ arg0 = args[0].(context.Context)
590+ }
591+ var arg1 port.SetKeybindingRequest
592+ if args[1] != nil {
593+ arg1 = args[1].(port.SetKeybindingRequest)
594+ }
595+ run(
596+ arg0,
597+ arg1,
598+ )
599+ })
600+ return _c
601+}
602+
603+func (_c *MockKeybindingSetter_Execute_Call) Return(setKeybindingResponse port.SetKeybindingResponse, err error) *MockKeybindingSetter_Execute_Call {
604+ _c.Call.Return(setKeybindingResponse, err)
605+ return _c
606+}
607+
608+func (_c *MockKeybindingSetter_Execute_Call) RunAndReturn(run func(ctx context.Context, req port.SetKeybindingRequest) (port.SetKeybindingResponse, error)) *MockKeybindingSetter_Execute_Call {
609+ _c.Call.Return(run)
610+ return _c
611+}
612+
613+// NewMockKeybindingResetter creates a new instance of MockKeybindingResetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
614+// The first argument is typically a *testing.T value.
615+func NewMockKeybindingResetter(t interface {
616+ mock.TestingT
617+ Cleanup(func())
618+}) *MockKeybindingResetter {
619+ mock := &MockKeybindingResetter{}
620+ mock.Mock.Test(t)
621+
622+ t.Cleanup(func() { mock.AssertExpectations(t) })
623+
624+ return mock
625+}
626+
627+// MockKeybindingResetter is an autogenerated mock type for the KeybindingResetter type
628+type MockKeybindingResetter struct {
629+ mock.Mock
630+}
631+
632+type MockKeybindingResetter_Expecter struct {
633+ mock *mock.Mock
634+}
635+
636+func (_m *MockKeybindingResetter) EXPECT() *MockKeybindingResetter_Expecter {
637+ return &MockKeybindingResetter_Expecter{mock: &_m.Mock}
638+}
639+
640+// Execute provides a mock function for the type MockKeybindingResetter
641+func (_mock *MockKeybindingResetter) Execute(ctx context.Context, req port.ResetKeybindingRequest) error {
642+ ret := _mock.Called(ctx, req)
643+
644+ if len(ret) == 0 {
645+ panic("no return value specified for Execute")
646+ }
647+
648+ var r0 error
649+ if returnFunc, ok := ret.Get(0).(func(context.Context, port.ResetKeybindingRequest) error); ok {
650+ r0 = returnFunc(ctx, req)
651+ } else {
652+ r0 = ret.Error(0)
653+ }
654+ return r0
655+}
656+
657+// MockKeybindingResetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
658+type MockKeybindingResetter_Execute_Call struct {
659+ *mock.Call
660+}
661+
662+// Execute is a helper method to define mock.On call
663+// - ctx context.Context
664+// - req port.ResetKeybindingRequest
665+func (_e *MockKeybindingResetter_Expecter) Execute(ctx any, req any) *MockKeybindingResetter_Execute_Call {
666+ return &MockKeybindingResetter_Execute_Call{Call: _e.mock.On("Execute", ctx, req)}
667+}
668+
669+func (_c *MockKeybindingResetter_Execute_Call) Run(run func(ctx context.Context, req port.ResetKeybindingRequest)) *MockKeybindingResetter_Execute_Call {
670+ _c.Call.Run(func(args mock.Arguments) {
671+ var arg0 context.Context
672+ if args[0] != nil {
673+ arg0 = args[0].(context.Context)
674+ }
675+ var arg1 port.ResetKeybindingRequest
676+ if args[1] != nil {
677+ arg1 = args[1].(port.ResetKeybindingRequest)
678+ }
679+ run(
680+ arg0,
681+ arg1,
682+ )
683+ })
684+ return _c
685+}
686+
687+func (_c *MockKeybindingResetter_Execute_Call) Return(err error) *MockKeybindingResetter_Execute_Call {
688+ _c.Call.Return(err)
689+ return _c
690+}
691+
692+func (_c *MockKeybindingResetter_Execute_Call) RunAndReturn(run func(ctx context.Context, req port.ResetKeybindingRequest) error) *MockKeybindingResetter_Execute_Call {
693+ _c.Call.Return(run)
694+ return _c
695+}
696+
697+// NewMockAllKeybindingsResetter creates a new instance of MockAllKeybindingsResetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
698+// The first argument is typically a *testing.T value.
699+func NewMockAllKeybindingsResetter(t interface {
700+ mock.TestingT
701+ Cleanup(func())
702+}) *MockAllKeybindingsResetter {
703+ mock := &MockAllKeybindingsResetter{}
704+ mock.Mock.Test(t)
705+
706+ t.Cleanup(func() { mock.AssertExpectations(t) })
707+
708+ return mock
709+}
710+
711+// MockAllKeybindingsResetter is an autogenerated mock type for the AllKeybindingsResetter type
712+type MockAllKeybindingsResetter struct {
713+ mock.Mock
714+}
715+
716+type MockAllKeybindingsResetter_Expecter struct {
717+ mock *mock.Mock
718+}
719+
720+func (_m *MockAllKeybindingsResetter) EXPECT() *MockAllKeybindingsResetter_Expecter {
721+ return &MockAllKeybindingsResetter_Expecter{mock: &_m.Mock}
722+}
723+
724+// Execute provides a mock function for the type MockAllKeybindingsResetter
725+func (_mock *MockAllKeybindingsResetter) Execute(ctx context.Context) error {
726+ ret := _mock.Called(ctx)
727+
728+ if len(ret) == 0 {
729+ panic("no return value specified for Execute")
730+ }
731+
732+ var r0 error
733+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
734+ r0 = returnFunc(ctx)
735+ } else {
736+ r0 = ret.Error(0)
737+ }
738+ return r0
739+}
740+
741+// MockAllKeybindingsResetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
742+type MockAllKeybindingsResetter_Execute_Call struct {
743+ *mock.Call
744+}
745+
746+// Execute is a helper method to define mock.On call
747+// - ctx context.Context
748+func (_e *MockAllKeybindingsResetter_Expecter) Execute(ctx any) *MockAllKeybindingsResetter_Execute_Call {
749+ return &MockAllKeybindingsResetter_Execute_Call{Call: _e.mock.On("Execute", ctx)}
750+}
751+
752+func (_c *MockAllKeybindingsResetter_Execute_Call) Run(run func(ctx context.Context)) *MockAllKeybindingsResetter_Execute_Call {
753+ _c.Call.Run(func(args mock.Arguments) {
754+ var arg0 context.Context
755+ if args[0] != nil {
756+ arg0 = args[0].(context.Context)
757+ }
758+ run(
759+ arg0,
760+ )
761+ })
762+ return _c
763+}
764+
765+func (_c *MockAllKeybindingsResetter_Execute_Call) Return(err error) *MockAllKeybindingsResetter_Execute_Call {
766+ _c.Call.Return(err)
767+ return _c
768+}
769+
770+func (_c *MockAllKeybindingsResetter_Execute_Call) RunAndReturn(run func(ctx context.Context) error) *MockAllKeybindingsResetter_Execute_Call {
771+ _c.Call.Return(run)
772+ return _c
773+}
A internal/application/port/mocks/media.go +92 -0
@@ -0,0 +1,92 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockMediaDiagnostics creates a new instance of MockMediaDiagnostics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockMediaDiagnostics(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockMediaDiagnostics {
20+ mock := &MockMediaDiagnostics{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockMediaDiagnostics is an autogenerated mock type for the MediaDiagnostics type
29+type MockMediaDiagnostics struct {
30+ mock.Mock
31+}
32+
33+type MockMediaDiagnostics_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockMediaDiagnostics) EXPECT() *MockMediaDiagnostics_Expecter {
38+ return &MockMediaDiagnostics_Expecter{mock: &_m.Mock}
39+}
40+
41+// RunDiagnostics provides a mock function for the type MockMediaDiagnostics
42+func (_mock *MockMediaDiagnostics) RunDiagnostics(ctx context.Context) *port.MediaDiagnosticsResult {
43+ ret := _mock.Called(ctx)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for RunDiagnostics")
47+ }
48+
49+ var r0 *port.MediaDiagnosticsResult
50+ if returnFunc, ok := ret.Get(0).(func(context.Context) *port.MediaDiagnosticsResult); ok {
51+ r0 = returnFunc(ctx)
52+ } else {
53+ if ret.Get(0) != nil {
54+ r0 = ret.Get(0).(*port.MediaDiagnosticsResult)
55+ }
56+ }
57+ return r0
58+}
59+
60+// MockMediaDiagnostics_RunDiagnostics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunDiagnostics'
61+type MockMediaDiagnostics_RunDiagnostics_Call struct {
62+ *mock.Call
63+}
64+
65+// RunDiagnostics is a helper method to define mock.On call
66+// - ctx context.Context
67+func (_e *MockMediaDiagnostics_Expecter) RunDiagnostics(ctx any) *MockMediaDiagnostics_RunDiagnostics_Call {
68+ return &MockMediaDiagnostics_RunDiagnostics_Call{Call: _e.mock.On("RunDiagnostics", ctx)}
69+}
70+
71+func (_c *MockMediaDiagnostics_RunDiagnostics_Call) Run(run func(ctx context.Context)) *MockMediaDiagnostics_RunDiagnostics_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ run(
78+ arg0,
79+ )
80+ })
81+ return _c
82+}
83+
84+func (_c *MockMediaDiagnostics_RunDiagnostics_Call) Return(mediaDiagnosticsResult *port.MediaDiagnosticsResult) *MockMediaDiagnostics_RunDiagnostics_Call {
85+ _c.Call.Return(mediaDiagnosticsResult)
86+ return _c
87+}
88+
89+func (_c *MockMediaDiagnostics_RunDiagnostics_Call) RunAndReturn(run func(ctx context.Context) *port.MediaDiagnosticsResult) *MockMediaDiagnostics_RunDiagnostics_Call {
90+ _c.Call.Return(run)
91+ return _c
92+}
D internal/application/port/mocks/mocks.go +0 -16515
@@ -1,16515 +0,0 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
4-
5-package mocks
6-
7-import (
8- "context"
9- "database/sql"
10- "encoding/json"
11- "io"
12- "time"
13-
14- "github.com/bnema/dumber/internal/application/dto"
15- "github.com/bnema/dumber/internal/application/port"
16- "github.com/bnema/dumber/internal/domain/entity"
17- "github.com/rs/zerolog"
18- mock "github.com/stretchr/testify/mock"
19-)
20-
21-// NewMockAccentPickerUI creates a new instance of MockAccentPickerUI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
22-// The first argument is typically a *testing.T value.
23-func NewMockAccentPickerUI(t interface {
24- mock.TestingT
25- Cleanup(func())
26-}) *MockAccentPickerUI {
27- mock := &MockAccentPickerUI{}
28- mock.Mock.Test(t)
29-
30- t.Cleanup(func() { mock.AssertExpectations(t) })
31-
32- return mock
33-}
34-
35-// MockAccentPickerUI is an autogenerated mock type for the AccentPickerUI type
36-type MockAccentPickerUI struct {
37- mock.Mock
38-}
39-
40-type MockAccentPickerUI_Expecter struct {
41- mock *mock.Mock
42-}
43-
44-func (_m *MockAccentPickerUI) EXPECT() *MockAccentPickerUI_Expecter {
45- return &MockAccentPickerUI_Expecter{mock: &_m.Mock}
46-}
47-
48-// Hide provides a mock function for the type MockAccentPickerUI
49-func (_mock *MockAccentPickerUI) Hide() {
50- _mock.Called()
51- return
52-}
53-
54-// MockAccentPickerUI_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
55-type MockAccentPickerUI_Hide_Call struct {
56- *mock.Call
57-}
58-
59-// Hide is a helper method to define mock.On call
60-func (_e *MockAccentPickerUI_Expecter) Hide() *MockAccentPickerUI_Hide_Call {
61- return &MockAccentPickerUI_Hide_Call{Call: _e.mock.On("Hide")}
62-}
63-
64-func (_c *MockAccentPickerUI_Hide_Call) Run(run func()) *MockAccentPickerUI_Hide_Call {
65- _c.Call.Run(func(args mock.Arguments) {
66- run()
67- })
68- return _c
69-}
70-
71-func (_c *MockAccentPickerUI_Hide_Call) Return() *MockAccentPickerUI_Hide_Call {
72- _c.Call.Return()
73- return _c
74-}
75-
76-func (_c *MockAccentPickerUI_Hide_Call) RunAndReturn(run func()) *MockAccentPickerUI_Hide_Call {
77- _c.Run(run)
78- return _c
79-}
80-
81-// IsVisible provides a mock function for the type MockAccentPickerUI
82-func (_mock *MockAccentPickerUI) IsVisible() bool {
83- ret := _mock.Called()
84-
85- if len(ret) == 0 {
86- panic("no return value specified for IsVisible")
87- }
88-
89- var r0 bool
90- if returnFunc, ok := ret.Get(0).(func() bool); ok {
91- r0 = returnFunc()
92- } else {
93- r0 = ret.Get(0).(bool)
94- }
95- return r0
96-}
97-
98-// MockAccentPickerUI_IsVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsVisible'
99-type MockAccentPickerUI_IsVisible_Call struct {
100- *mock.Call
101-}
102-
103-// IsVisible is a helper method to define mock.On call
104-func (_e *MockAccentPickerUI_Expecter) IsVisible() *MockAccentPickerUI_IsVisible_Call {
105- return &MockAccentPickerUI_IsVisible_Call{Call: _e.mock.On("IsVisible")}
106-}
107-
108-func (_c *MockAccentPickerUI_IsVisible_Call) Run(run func()) *MockAccentPickerUI_IsVisible_Call {
109- _c.Call.Run(func(args mock.Arguments) {
110- run()
111- })
112- return _c
113-}
114-
115-func (_c *MockAccentPickerUI_IsVisible_Call) Return(b bool) *MockAccentPickerUI_IsVisible_Call {
116- _c.Call.Return(b)
117- return _c
118-}
119-
120-func (_c *MockAccentPickerUI_IsVisible_Call) RunAndReturn(run func() bool) *MockAccentPickerUI_IsVisible_Call {
121- _c.Call.Return(run)
122- return _c
123-}
124-
125-// Show provides a mock function for the type MockAccentPickerUI
126-func (_mock *MockAccentPickerUI) Show(accents []rune, selectedCallback func(accent rune), cancelCallback func()) {
127- _mock.Called(accents, selectedCallback, cancelCallback)
128- return
129-}
130-
131-// MockAccentPickerUI_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
132-type MockAccentPickerUI_Show_Call struct {
133- *mock.Call
134-}
135-
136-// Show is a helper method to define mock.On call
137-// - accents []rune
138-// - selectedCallback func(accent rune)
139-// - cancelCallback func()
140-func (_e *MockAccentPickerUI_Expecter) Show(accents interface{}, selectedCallback interface{}, cancelCallback interface{}) *MockAccentPickerUI_Show_Call {
141- return &MockAccentPickerUI_Show_Call{Call: _e.mock.On("Show", accents, selectedCallback, cancelCallback)}
142-}
143-
144-func (_c *MockAccentPickerUI_Show_Call) Run(run func(accents []rune, selectedCallback func(accent rune), cancelCallback func())) *MockAccentPickerUI_Show_Call {
145- _c.Call.Run(func(args mock.Arguments) {
146- var arg0 []rune
147- if args[0] != nil {
148- arg0 = args[0].([]rune)
149- }
150- var arg1 func(accent rune)
151- if args[1] != nil {
152- arg1 = args[1].(func(accent rune))
153- }
154- var arg2 func()
155- if args[2] != nil {
156- arg2 = args[2].(func())
157- }
158- run(
159- arg0,
160- arg1,
161- arg2,
162- )
163- })
164- return _c
165-}
166-
167-func (_c *MockAccentPickerUI_Show_Call) Return() *MockAccentPickerUI_Show_Call {
168- _c.Call.Return()
169- return _c
170-}
171-
172-func (_c *MockAccentPickerUI_Show_Call) RunAndReturn(run func(accents []rune, selectedCallback func(accent rune), cancelCallback func())) *MockAccentPickerUI_Show_Call {
173- _c.Run(run)
174- return _c
175-}
176-
177-// NewMockBrowserWindowOpener creates a new instance of MockBrowserWindowOpener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
178-// The first argument is typically a *testing.T value.
179-func NewMockBrowserWindowOpener(t interface {
180- mock.TestingT
181- Cleanup(func())
182-}) *MockBrowserWindowOpener {
183- mock := &MockBrowserWindowOpener{}
184- mock.Mock.Test(t)
185-
186- t.Cleanup(func() { mock.AssertExpectations(t) })
187-
188- return mock
189-}
190-
191-// MockBrowserWindowOpener is an autogenerated mock type for the BrowserWindowOpener type
192-type MockBrowserWindowOpener struct {
193- mock.Mock
194-}
195-
196-type MockBrowserWindowOpener_Expecter struct {
197- mock *mock.Mock
198-}
199-
200-func (_m *MockBrowserWindowOpener) EXPECT() *MockBrowserWindowOpener_Expecter {
201- return &MockBrowserWindowOpener_Expecter{mock: &_m.Mock}
202-}
203-
204-// OpenFreshWindow provides a mock function for the type MockBrowserWindowOpener
205-func (_mock *MockBrowserWindowOpener) OpenFreshWindow(ctx context.Context, url string) error {
206- ret := _mock.Called(ctx, url)
207-
208- if len(ret) == 0 {
209- panic("no return value specified for OpenFreshWindow")
210- }
211-
212- var r0 error
213- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
214- r0 = returnFunc(ctx, url)
215- } else {
216- r0 = ret.Error(0)
217- }
218- return r0
219-}
220-
221-// MockBrowserWindowOpener_OpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFreshWindow'
222-type MockBrowserWindowOpener_OpenFreshWindow_Call struct {
223- *mock.Call
224-}
225-
226-// OpenFreshWindow is a helper method to define mock.On call
227-// - ctx context.Context
228-// - url string
229-func (_e *MockBrowserWindowOpener_Expecter) OpenFreshWindow(ctx interface{}, url interface{}) *MockBrowserWindowOpener_OpenFreshWindow_Call {
230- return &MockBrowserWindowOpener_OpenFreshWindow_Call{Call: _e.mock.On("OpenFreshWindow", ctx, url)}
231-}
232-
233-func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserWindowOpener_OpenFreshWindow_Call {
234- _c.Call.Run(func(args mock.Arguments) {
235- var arg0 context.Context
236- if args[0] != nil {
237- arg0 = args[0].(context.Context)
238- }
239- var arg1 string
240- if args[1] != nil {
241- arg1 = args[1].(string)
242- }
243- run(
244- arg0,
245- arg1,
246- )
247- })
248- return _c
249-}
250-
251-func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Return(err error) *MockBrowserWindowOpener_OpenFreshWindow_Call {
252- _c.Call.Return(err)
253- return _c
254-}
255-
256-func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockBrowserWindowOpener_OpenFreshWindow_Call {
257- _c.Call.Return(run)
258- return _c
259-}
260-
261-// NewMockBrowserLaunchRelay creates a new instance of MockBrowserLaunchRelay. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
262-// The first argument is typically a *testing.T value.
263-func NewMockBrowserLaunchRelay(t interface {
264- mock.TestingT
265- Cleanup(func())
266-}) *MockBrowserLaunchRelay {
267- mock := &MockBrowserLaunchRelay{}
268- mock.Mock.Test(t)
269-
270- t.Cleanup(func() { mock.AssertExpectations(t) })
271-
272- return mock
273-}
274-
275-// MockBrowserLaunchRelay is an autogenerated mock type for the BrowserLaunchRelay type
276-type MockBrowserLaunchRelay struct {
277- mock.Mock
278-}
279-
280-type MockBrowserLaunchRelay_Expecter struct {
281- mock *mock.Mock
282-}
283-
284-func (_m *MockBrowserLaunchRelay) EXPECT() *MockBrowserLaunchRelay_Expecter {
285- return &MockBrowserLaunchRelay_Expecter{mock: &_m.Mock}
286-}
287-
288-// DeliverOpenFreshWindow provides a mock function for the type MockBrowserLaunchRelay
289-func (_mock *MockBrowserLaunchRelay) DeliverOpenFreshWindow(ctx context.Context, url string) (bool, error) {
290- ret := _mock.Called(ctx, url)
291-
292- if len(ret) == 0 {
293- panic("no return value specified for DeliverOpenFreshWindow")
294- }
295-
296- var r0 bool
297- var r1 error
298- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
299- return returnFunc(ctx, url)
300- }
301- if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
302- r0 = returnFunc(ctx, url)
303- } else {
304- r0 = ret.Get(0).(bool)
305- }
306- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
307- r1 = returnFunc(ctx, url)
308- } else {
309- r1 = ret.Error(1)
310- }
311- return r0, r1
312-}
313-
314-// MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeliverOpenFreshWindow'
315-type MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call struct {
316- *mock.Call
317-}
318-
319-// DeliverOpenFreshWindow is a helper method to define mock.On call
320-// - ctx context.Context
321-// - url string
322-func (_e *MockBrowserLaunchRelay_Expecter) DeliverOpenFreshWindow(ctx interface{}, url interface{}) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
323- return &MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call{Call: _e.mock.On("DeliverOpenFreshWindow", ctx, url)}
324-}
325-
326-func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
327- _c.Call.Run(func(args mock.Arguments) {
328- var arg0 context.Context
329- if args[0] != nil {
330- arg0 = args[0].(context.Context)
331- }
332- var arg1 string
333- if args[1] != nil {
334- arg1 = args[1].(string)
335- }
336- run(
337- arg0,
338- arg1,
339- )
340- })
341- return _c
342-}
343-
344-func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Return(b bool, err error) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
345- _c.Call.Return(b, err)
346- return _c
347-}
348-
349-func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) (bool, error)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call {
350- _c.Call.Return(run)
351- return _c
352-}
353-
354-// Listen provides a mock function for the type MockBrowserLaunchRelay
355-func (_mock *MockBrowserLaunchRelay) Listen(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error) {
356- ret := _mock.Called(ctx, opener)
357-
358- if len(ret) == 0 {
359- panic("no return value specified for Listen")
360- }
361-
362- var r0 io.Closer
363- var r1 error
364- if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) (io.Closer, error)); ok {
365- return returnFunc(ctx, opener)
366- }
367- if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) io.Closer); ok {
368- r0 = returnFunc(ctx, opener)
369- } else {
370- if ret.Get(0) != nil {
371- r0 = ret.Get(0).(io.Closer)
372- }
373- }
374- if returnFunc, ok := ret.Get(1).(func(context.Context, port.BrowserWindowOpener) error); ok {
375- r1 = returnFunc(ctx, opener)
376- } else {
377- r1 = ret.Error(1)
378- }
379- return r0, r1
380-}
381-
382-// MockBrowserLaunchRelay_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'
383-type MockBrowserLaunchRelay_Listen_Call struct {
384- *mock.Call
385-}
386-
387-// Listen is a helper method to define mock.On call
388-// - ctx context.Context
389-// - opener port.BrowserWindowOpener
390-func (_e *MockBrowserLaunchRelay_Expecter) Listen(ctx interface{}, opener interface{}) *MockBrowserLaunchRelay_Listen_Call {
391- return &MockBrowserLaunchRelay_Listen_Call{Call: _e.mock.On("Listen", ctx, opener)}
392-}
393-
394-func (_c *MockBrowserLaunchRelay_Listen_Call) Run(run func(ctx context.Context, opener port.BrowserWindowOpener)) *MockBrowserLaunchRelay_Listen_Call {
395- _c.Call.Run(func(args mock.Arguments) {
396- var arg0 context.Context
397- if args[0] != nil {
398- arg0 = args[0].(context.Context)
399- }
400- var arg1 port.BrowserWindowOpener
401- if args[1] != nil {
402- arg1 = args[1].(port.BrowserWindowOpener)
403- }
404- run(
405- arg0,
406- arg1,
407- )
408- })
409- return _c
410-}
411-
412-func (_c *MockBrowserLaunchRelay_Listen_Call) Return(closer io.Closer, err error) *MockBrowserLaunchRelay_Listen_Call {
413- _c.Call.Return(closer, err)
414- return _c
415-}
416-
417-func (_c *MockBrowserLaunchRelay_Listen_Call) RunAndReturn(run func(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error)) *MockBrowserLaunchRelay_Listen_Call {
418- _c.Call.Return(run)
419- return _c
420-}
421-
422-// NewMockClipboard creates a new instance of MockClipboard. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
423-// The first argument is typically a *testing.T value.
424-func NewMockClipboard(t interface {
425- mock.TestingT
426- Cleanup(func())
427-}) *MockClipboard {
428- mock := &MockClipboard{}
429- mock.Mock.Test(t)
430-
431- t.Cleanup(func() { mock.AssertExpectations(t) })
432-
433- return mock
434-}
435-
436-// MockClipboard is an autogenerated mock type for the Clipboard type
437-type MockClipboard struct {
438- mock.Mock
439-}
440-
441-type MockClipboard_Expecter struct {
442- mock *mock.Mock
443-}
444-
445-func (_m *MockClipboard) EXPECT() *MockClipboard_Expecter {
446- return &MockClipboard_Expecter{mock: &_m.Mock}
447-}
448-
449-// Clear provides a mock function for the type MockClipboard
450-func (_mock *MockClipboard) Clear(ctx context.Context) error {
451- ret := _mock.Called(ctx)
452-
453- if len(ret) == 0 {
454- panic("no return value specified for Clear")
455- }
456-
457- var r0 error
458- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
459- r0 = returnFunc(ctx)
460- } else {
461- r0 = ret.Error(0)
462- }
463- return r0
464-}
465-
466-// MockClipboard_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
467-type MockClipboard_Clear_Call struct {
468- *mock.Call
469-}
470-
471-// Clear is a helper method to define mock.On call
472-// - ctx context.Context
473-func (_e *MockClipboard_Expecter) Clear(ctx interface{}) *MockClipboard_Clear_Call {
474- return &MockClipboard_Clear_Call{Call: _e.mock.On("Clear", ctx)}
475-}
476-
477-func (_c *MockClipboard_Clear_Call) Run(run func(ctx context.Context)) *MockClipboard_Clear_Call {
478- _c.Call.Run(func(args mock.Arguments) {
479- var arg0 context.Context
480- if args[0] != nil {
481- arg0 = args[0].(context.Context)
482- }
483- run(
484- arg0,
485- )
486- })
487- return _c
488-}
489-
490-func (_c *MockClipboard_Clear_Call) Return(err error) *MockClipboard_Clear_Call {
491- _c.Call.Return(err)
492- return _c
493-}
494-
495-func (_c *MockClipboard_Clear_Call) RunAndReturn(run func(ctx context.Context) error) *MockClipboard_Clear_Call {
496- _c.Call.Return(run)
497- return _c
498-}
499-
500-// HasText provides a mock function for the type MockClipboard
501-func (_mock *MockClipboard) HasText(ctx context.Context) (bool, error) {
502- ret := _mock.Called(ctx)
503-
504- if len(ret) == 0 {
505- panic("no return value specified for HasText")
506- }
507-
508- var r0 bool
509- var r1 error
510- if returnFunc, ok := ret.Get(0).(func(context.Context) (bool, error)); ok {
511- return returnFunc(ctx)
512- }
513- if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
514- r0 = returnFunc(ctx)
515- } else {
516- r0 = ret.Get(0).(bool)
517- }
518- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
519- r1 = returnFunc(ctx)
520- } else {
521- r1 = ret.Error(1)
522- }
523- return r0, r1
524-}
525-
526-// MockClipboard_HasText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasText'
527-type MockClipboard_HasText_Call struct {
528- *mock.Call
529-}
530-
531-// HasText is a helper method to define mock.On call
532-// - ctx context.Context
533-func (_e *MockClipboard_Expecter) HasText(ctx interface{}) *MockClipboard_HasText_Call {
534- return &MockClipboard_HasText_Call{Call: _e.mock.On("HasText", ctx)}
535-}
536-
537-func (_c *MockClipboard_HasText_Call) Run(run func(ctx context.Context)) *MockClipboard_HasText_Call {
538- _c.Call.Run(func(args mock.Arguments) {
539- var arg0 context.Context
540- if args[0] != nil {
541- arg0 = args[0].(context.Context)
542- }
543- run(
544- arg0,
545- )
546- })
547- return _c
548-}
549-
550-func (_c *MockClipboard_HasText_Call) Return(b bool, err error) *MockClipboard_HasText_Call {
551- _c.Call.Return(b, err)
552- return _c
553-}
554-
555-func (_c *MockClipboard_HasText_Call) RunAndReturn(run func(ctx context.Context) (bool, error)) *MockClipboard_HasText_Call {
556- _c.Call.Return(run)
557- return _c
558-}
559-
560-// ReadText provides a mock function for the type MockClipboard
561-func (_mock *MockClipboard) ReadText(ctx context.Context) (string, error) {
562- ret := _mock.Called(ctx)
563-
564- if len(ret) == 0 {
565- panic("no return value specified for ReadText")
566- }
567-
568- var r0 string
569- var r1 error
570- if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
571- return returnFunc(ctx)
572- }
573- if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
574- r0 = returnFunc(ctx)
575- } else {
576- r0 = ret.Get(0).(string)
577- }
578- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
579- r1 = returnFunc(ctx)
580- } else {
581- r1 = ret.Error(1)
582- }
583- return r0, r1
584-}
585-
586-// MockClipboard_ReadText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadText'
587-type MockClipboard_ReadText_Call struct {
588- *mock.Call
589-}
590-
591-// ReadText is a helper method to define mock.On call
592-// - ctx context.Context
593-func (_e *MockClipboard_Expecter) ReadText(ctx interface{}) *MockClipboard_ReadText_Call {
594- return &MockClipboard_ReadText_Call{Call: _e.mock.On("ReadText", ctx)}
595-}
596-
597-func (_c *MockClipboard_ReadText_Call) Run(run func(ctx context.Context)) *MockClipboard_ReadText_Call {
598- _c.Call.Run(func(args mock.Arguments) {
599- var arg0 context.Context
600- if args[0] != nil {
601- arg0 = args[0].(context.Context)
602- }
603- run(
604- arg0,
605- )
606- })
607- return _c
608-}
609-
610-func (_c *MockClipboard_ReadText_Call) Return(s string, err error) *MockClipboard_ReadText_Call {
611- _c.Call.Return(s, err)
612- return _c
613-}
614-
615-func (_c *MockClipboard_ReadText_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockClipboard_ReadText_Call {
616- _c.Call.Return(run)
617- return _c
618-}
619-
620-// WriteImage provides a mock function for the type MockClipboard
621-func (_mock *MockClipboard) WriteImage(ctx context.Context, image entity.ImageData) error {
622- ret := _mock.Called(ctx, image)
623-
624- if len(ret) == 0 {
625- panic("no return value specified for WriteImage")
626- }
627-
628- var r0 error
629- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.ImageData) error); ok {
630- r0 = returnFunc(ctx, image)
631- } else {
632- r0 = ret.Error(0)
633- }
634- return r0
635-}
636-
637-// MockClipboard_WriteImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteImage'
638-type MockClipboard_WriteImage_Call struct {
639- *mock.Call
640-}
641-
642-// WriteImage is a helper method to define mock.On call
643-// - ctx context.Context
644-// - image entity.ImageData
645-func (_e *MockClipboard_Expecter) WriteImage(ctx interface{}, image interface{}) *MockClipboard_WriteImage_Call {
646- return &MockClipboard_WriteImage_Call{Call: _e.mock.On("WriteImage", ctx, image)}
647-}
648-
649-func (_c *MockClipboard_WriteImage_Call) Run(run func(ctx context.Context, image entity.ImageData)) *MockClipboard_WriteImage_Call {
650- _c.Call.Run(func(args mock.Arguments) {
651- var arg0 context.Context
652- if args[0] != nil {
653- arg0 = args[0].(context.Context)
654- }
655- var arg1 entity.ImageData
656- if args[1] != nil {
657- arg1 = args[1].(entity.ImageData)
658- }
659- run(
660- arg0,
661- arg1,
662- )
663- })
664- return _c
665-}
666-
667-func (_c *MockClipboard_WriteImage_Call) Return(err error) *MockClipboard_WriteImage_Call {
668- _c.Call.Return(err)
669- return _c
670-}
671-
672-func (_c *MockClipboard_WriteImage_Call) RunAndReturn(run func(ctx context.Context, image entity.ImageData) error) *MockClipboard_WriteImage_Call {
673- _c.Call.Return(run)
674- return _c
675-}
676-
677-// WriteText provides a mock function for the type MockClipboard
678-func (_mock *MockClipboard) WriteText(ctx context.Context, text string) error {
679- ret := _mock.Called(ctx, text)
680-
681- if len(ret) == 0 {
682- panic("no return value specified for WriteText")
683- }
684-
685- var r0 error
686- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
687- r0 = returnFunc(ctx, text)
688- } else {
689- r0 = ret.Error(0)
690- }
691- return r0
692-}
693-
694-// MockClipboard_WriteText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteText'
695-type MockClipboard_WriteText_Call struct {
696- *mock.Call
697-}
698-
699-// WriteText is a helper method to define mock.On call
700-// - ctx context.Context
701-// - text string
702-func (_e *MockClipboard_Expecter) WriteText(ctx interface{}, text interface{}) *MockClipboard_WriteText_Call {
703- return &MockClipboard_WriteText_Call{Call: _e.mock.On("WriteText", ctx, text)}
704-}
705-
706-func (_c *MockClipboard_WriteText_Call) Run(run func(ctx context.Context, text string)) *MockClipboard_WriteText_Call {
707- _c.Call.Run(func(args mock.Arguments) {
708- var arg0 context.Context
709- if args[0] != nil {
710- arg0 = args[0].(context.Context)
711- }
712- var arg1 string
713- if args[1] != nil {
714- arg1 = args[1].(string)
715- }
716- run(
717- arg0,
718- arg1,
719- )
720- })
721- return _c
722-}
723-
724-func (_c *MockClipboard_WriteText_Call) Return(err error) *MockClipboard_WriteText_Call {
725- _c.Call.Return(err)
726- return _c
727-}
728-
729-func (_c *MockClipboard_WriteText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockClipboard_WriteText_Call {
730- _c.Call.Return(run)
731- return _c
732-}
733-
734-// NewMockClipboardTextOrchestrator creates a new instance of MockClipboardTextOrchestrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
735-// The first argument is typically a *testing.T value.
736-func NewMockClipboardTextOrchestrator(t interface {
737- mock.TestingT
738- Cleanup(func())
739-}) *MockClipboardTextOrchestrator {
740- mock := &MockClipboardTextOrchestrator{}
741- mock.Mock.Test(t)
742-
743- t.Cleanup(func() { mock.AssertExpectations(t) })
744-
745- return mock
746-}
747-
748-// MockClipboardTextOrchestrator is an autogenerated mock type for the ClipboardTextOrchestrator type
749-type MockClipboardTextOrchestrator struct {
750- mock.Mock
751-}
752-
753-type MockClipboardTextOrchestrator_Expecter struct {
754- mock *mock.Mock
755-}
756-
757-func (_m *MockClipboardTextOrchestrator) EXPECT() *MockClipboardTextOrchestrator_Expecter {
758- return &MockClipboardTextOrchestrator_Expecter{mock: &_m.Mock}
759-}
760-
761-// HandleExplicitCopy provides a mock function for the type MockClipboardTextOrchestrator
762-func (_mock *MockClipboardTextOrchestrator) HandleExplicitCopy(ctx context.Context, input dto.ExplicitClipboardInput) error {
763- ret := _mock.Called(ctx, input)
764-
765- if len(ret) == 0 {
766- panic("no return value specified for HandleExplicitCopy")
767- }
768-
769- var r0 error
770- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.ExplicitClipboardInput) error); ok {
771- r0 = returnFunc(ctx, input)
772- } else {
773- r0 = ret.Error(0)
774- }
775- return r0
776-}
777-
778-// MockClipboardTextOrchestrator_HandleExplicitCopy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleExplicitCopy'
779-type MockClipboardTextOrchestrator_HandleExplicitCopy_Call struct {
780- *mock.Call
781-}
782-
783-// HandleExplicitCopy is a helper method to define mock.On call
784-// - ctx context.Context
785-// - input dto.ExplicitClipboardInput
786-func (_e *MockClipboardTextOrchestrator_Expecter) HandleExplicitCopy(ctx interface{}, input interface{}) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
787- return &MockClipboardTextOrchestrator_HandleExplicitCopy_Call{Call: _e.mock.On("HandleExplicitCopy", ctx, input)}
788-}
789-
790-func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) Run(run func(ctx context.Context, input dto.ExplicitClipboardInput)) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
791- _c.Call.Run(func(args mock.Arguments) {
792- var arg0 context.Context
793- if args[0] != nil {
794- arg0 = args[0].(context.Context)
795- }
796- var arg1 dto.ExplicitClipboardInput
797- if args[1] != nil {
798- arg1 = args[1].(dto.ExplicitClipboardInput)
799- }
800- run(
801- arg0,
802- arg1,
803- )
804- })
805- return _c
806-}
807-
808-func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) Return(err error) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
809- _c.Call.Return(err)
810- return _c
811-}
812-
813-func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) RunAndReturn(run func(ctx context.Context, input dto.ExplicitClipboardInput) error) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call {
814- _c.Call.Return(run)
815- return _c
816-}
817-
818-// HandleSelectionUpdate provides a mock function for the type MockClipboardTextOrchestrator
819-func (_mock *MockClipboardTextOrchestrator) HandleSelectionUpdate(ctx context.Context, input dto.SelectionClipboardInput) error {
820- ret := _mock.Called(ctx, input)
821-
822- if len(ret) == 0 {
823- panic("no return value specified for HandleSelectionUpdate")
824- }
825-
826- var r0 error
827- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.SelectionClipboardInput) error); ok {
828- r0 = returnFunc(ctx, input)
829- } else {
830- r0 = ret.Error(0)
831- }
832- return r0
833-}
834-
835-// MockClipboardTextOrchestrator_HandleSelectionUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleSelectionUpdate'
836-type MockClipboardTextOrchestrator_HandleSelectionUpdate_Call struct {
837- *mock.Call
838-}
839-
840-// HandleSelectionUpdate is a helper method to define mock.On call
841-// - ctx context.Context
842-// - input dto.SelectionClipboardInput
843-func (_e *MockClipboardTextOrchestrator_Expecter) HandleSelectionUpdate(ctx interface{}, input interface{}) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
844- return &MockClipboardTextOrchestrator_HandleSelectionUpdate_Call{Call: _e.mock.On("HandleSelectionUpdate", ctx, input)}
845-}
846-
847-func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) Run(run func(ctx context.Context, input dto.SelectionClipboardInput)) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
848- _c.Call.Run(func(args mock.Arguments) {
849- var arg0 context.Context
850- if args[0] != nil {
851- arg0 = args[0].(context.Context)
852- }
853- var arg1 dto.SelectionClipboardInput
854- if args[1] != nil {
855- arg1 = args[1].(dto.SelectionClipboardInput)
856- }
857- run(
858- arg0,
859- arg1,
860- )
861- })
862- return _c
863-}
864-
865-func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) Return(err error) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
866- _c.Call.Return(err)
867- return _c
868-}
869-
870-func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) RunAndReturn(run func(ctx context.Context, input dto.SelectionClipboardInput) error) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call {
871- _c.Call.Return(run)
872- return _c
873-}
874-
875-// NewMockColorSchemeDetector creates a new instance of MockColorSchemeDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
876-// The first argument is typically a *testing.T value.
877-func NewMockColorSchemeDetector(t interface {
878- mock.TestingT
879- Cleanup(func())
880-}) *MockColorSchemeDetector {
881- mock := &MockColorSchemeDetector{}
882- mock.Mock.Test(t)
883-
884- t.Cleanup(func() { mock.AssertExpectations(t) })
885-
886- return mock
887-}
888-
889-// MockColorSchemeDetector is an autogenerated mock type for the ColorSchemeDetector type
890-type MockColorSchemeDetector struct {
891- mock.Mock
892-}
893-
894-type MockColorSchemeDetector_Expecter struct {
895- mock *mock.Mock
896-}
897-
898-func (_m *MockColorSchemeDetector) EXPECT() *MockColorSchemeDetector_Expecter {
899- return &MockColorSchemeDetector_Expecter{mock: &_m.Mock}
900-}
901-
902-// Available provides a mock function for the type MockColorSchemeDetector
903-func (_mock *MockColorSchemeDetector) Available() bool {
904- ret := _mock.Called()
905-
906- if len(ret) == 0 {
907- panic("no return value specified for Available")
908- }
909-
910- var r0 bool
911- if returnFunc, ok := ret.Get(0).(func() bool); ok {
912- r0 = returnFunc()
913- } else {
914- r0 = ret.Get(0).(bool)
915- }
916- return r0
917-}
918-
919-// MockColorSchemeDetector_Available_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Available'
920-type MockColorSchemeDetector_Available_Call struct {
921- *mock.Call
922-}
923-
924-// Available is a helper method to define mock.On call
925-func (_e *MockColorSchemeDetector_Expecter) Available() *MockColorSchemeDetector_Available_Call {
926- return &MockColorSchemeDetector_Available_Call{Call: _e.mock.On("Available")}
927-}
928-
929-func (_c *MockColorSchemeDetector_Available_Call) Run(run func()) *MockColorSchemeDetector_Available_Call {
930- _c.Call.Run(func(args mock.Arguments) {
931- run()
932- })
933- return _c
934-}
935-
936-func (_c *MockColorSchemeDetector_Available_Call) Return(b bool) *MockColorSchemeDetector_Available_Call {
937- _c.Call.Return(b)
938- return _c
939-}
940-
941-func (_c *MockColorSchemeDetector_Available_Call) RunAndReturn(run func() bool) *MockColorSchemeDetector_Available_Call {
942- _c.Call.Return(run)
943- return _c
944-}
945-
946-// Detect provides a mock function for the type MockColorSchemeDetector
947-func (_mock *MockColorSchemeDetector) Detect() (bool, bool) {
948- ret := _mock.Called()
949-
950- if len(ret) == 0 {
951- panic("no return value specified for Detect")
952- }
953-
954- var r0 bool
955- var r1 bool
956- if returnFunc, ok := ret.Get(0).(func() (bool, bool)); ok {
957- return returnFunc()
958- }
959- if returnFunc, ok := ret.Get(0).(func() bool); ok {
960- r0 = returnFunc()
961- } else {
962- r0 = ret.Get(0).(bool)
963- }
964- if returnFunc, ok := ret.Get(1).(func() bool); ok {
965- r1 = returnFunc()
966- } else {
967- r1 = ret.Get(1).(bool)
968- }
969- return r0, r1
970-}
971-
972-// MockColorSchemeDetector_Detect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Detect'
973-type MockColorSchemeDetector_Detect_Call struct {
974- *mock.Call
975-}
976-
977-// Detect is a helper method to define mock.On call
978-func (_e *MockColorSchemeDetector_Expecter) Detect() *MockColorSchemeDetector_Detect_Call {
979- return &MockColorSchemeDetector_Detect_Call{Call: _e.mock.On("Detect")}
980-}
981-
982-func (_c *MockColorSchemeDetector_Detect_Call) Run(run func()) *MockColorSchemeDetector_Detect_Call {
983- _c.Call.Run(func(args mock.Arguments) {
984- run()
985- })
986- return _c
987-}
988-
989-func (_c *MockColorSchemeDetector_Detect_Call) Return(prefersDark bool, ok bool) *MockColorSchemeDetector_Detect_Call {
990- _c.Call.Return(prefersDark, ok)
991- return _c
992-}
993-
994-func (_c *MockColorSchemeDetector_Detect_Call) RunAndReturn(run func() (bool, bool)) *MockColorSchemeDetector_Detect_Call {
995- _c.Call.Return(run)
996- return _c
997-}
998-
999-// Name provides a mock function for the type MockColorSchemeDetector
1000-func (_mock *MockColorSchemeDetector) Name() string {
1001- ret := _mock.Called()
1002-
1003- if len(ret) == 0 {
1004- panic("no return value specified for Name")
1005- }
1006-
1007- var r0 string
1008- if returnFunc, ok := ret.Get(0).(func() string); ok {
1009- r0 = returnFunc()
1010- } else {
1011- r0 = ret.Get(0).(string)
1012- }
1013- return r0
1014-}
1015-
1016-// MockColorSchemeDetector_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
1017-type MockColorSchemeDetector_Name_Call struct {
1018- *mock.Call
1019-}
1020-
1021-// Name is a helper method to define mock.On call
1022-func (_e *MockColorSchemeDetector_Expecter) Name() *MockColorSchemeDetector_Name_Call {
1023- return &MockColorSchemeDetector_Name_Call{Call: _e.mock.On("Name")}
1024-}
1025-
1026-func (_c *MockColorSchemeDetector_Name_Call) Run(run func()) *MockColorSchemeDetector_Name_Call {
1027- _c.Call.Run(func(args mock.Arguments) {
1028- run()
1029- })
1030- return _c
1031-}
1032-
1033-func (_c *MockColorSchemeDetector_Name_Call) Return(s string) *MockColorSchemeDetector_Name_Call {
1034- _c.Call.Return(s)
1035- return _c
1036-}
1037-
1038-func (_c *MockColorSchemeDetector_Name_Call) RunAndReturn(run func() string) *MockColorSchemeDetector_Name_Call {
1039- _c.Call.Return(run)
1040- return _c
1041-}
1042-
1043-// Priority provides a mock function for the type MockColorSchemeDetector
1044-func (_mock *MockColorSchemeDetector) Priority() int {
1045- ret := _mock.Called()
1046-
1047- if len(ret) == 0 {
1048- panic("no return value specified for Priority")
1049- }
1050-
1051- var r0 int
1052- if returnFunc, ok := ret.Get(0).(func() int); ok {
1053- r0 = returnFunc()
1054- } else {
1055- r0 = ret.Get(0).(int)
1056- }
1057- return r0
1058-}
1059-
1060-// MockColorSchemeDetector_Priority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Priority'
1061-type MockColorSchemeDetector_Priority_Call struct {
1062- *mock.Call
1063-}
1064-
1065-// Priority is a helper method to define mock.On call
1066-func (_e *MockColorSchemeDetector_Expecter) Priority() *MockColorSchemeDetector_Priority_Call {
1067- return &MockColorSchemeDetector_Priority_Call{Call: _e.mock.On("Priority")}
1068-}
1069-
1070-func (_c *MockColorSchemeDetector_Priority_Call) Run(run func()) *MockColorSchemeDetector_Priority_Call {
1071- _c.Call.Run(func(args mock.Arguments) {
1072- run()
1073- })
1074- return _c
1075-}
1076-
1077-func (_c *MockColorSchemeDetector_Priority_Call) Return(n int) *MockColorSchemeDetector_Priority_Call {
1078- _c.Call.Return(n)
1079- return _c
1080-}
1081-
1082-func (_c *MockColorSchemeDetector_Priority_Call) RunAndReturn(run func() int) *MockColorSchemeDetector_Priority_Call {
1083- _c.Call.Return(run)
1084- return _c
1085-}
1086-
1087-// NewMockToolkitAvailabilityNotifier creates a new instance of MockToolkitAvailabilityNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1088-// The first argument is typically a *testing.T value.
1089-func NewMockToolkitAvailabilityNotifier(t interface {
1090- mock.TestingT
1091- Cleanup(func())
1092-}) *MockToolkitAvailabilityNotifier {
1093- mock := &MockToolkitAvailabilityNotifier{}
1094- mock.Mock.Test(t)
1095-
1096- t.Cleanup(func() { mock.AssertExpectations(t) })
1097-
1098- return mock
1099-}
1100-
1101-// MockToolkitAvailabilityNotifier is an autogenerated mock type for the ToolkitAvailabilityNotifier type
1102-type MockToolkitAvailabilityNotifier struct {
1103- mock.Mock
1104-}
1105-
1106-type MockToolkitAvailabilityNotifier_Expecter struct {
1107- mock *mock.Mock
1108-}
1109-
1110-func (_m *MockToolkitAvailabilityNotifier) EXPECT() *MockToolkitAvailabilityNotifier_Expecter {
1111- return &MockToolkitAvailabilityNotifier_Expecter{mock: &_m.Mock}
1112-}
1113-
1114-// MarkAvailable provides a mock function for the type MockToolkitAvailabilityNotifier
1115-func (_mock *MockToolkitAvailabilityNotifier) MarkAvailable() {
1116- _mock.Called()
1117- return
1118-}
1119-
1120-// MockToolkitAvailabilityNotifier_MarkAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkAvailable'
1121-type MockToolkitAvailabilityNotifier_MarkAvailable_Call struct {
1122- *mock.Call
1123-}
1124-
1125-// MarkAvailable is a helper method to define mock.On call
1126-func (_e *MockToolkitAvailabilityNotifier_Expecter) MarkAvailable() *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
1127- return &MockToolkitAvailabilityNotifier_MarkAvailable_Call{Call: _e.mock.On("MarkAvailable")}
1128-}
1129-
1130-func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) Run(run func()) *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
1131- _c.Call.Run(func(args mock.Arguments) {
1132- run()
1133- })
1134- return _c
1135-}
1136-
1137-func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) Return() *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
1138- _c.Call.Return()
1139- return _c
1140-}
1141-
1142-func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) RunAndReturn(run func()) *MockToolkitAvailabilityNotifier_MarkAvailable_Call {
1143- _c.Run(run)
1144- return _c
1145-}
1146-
1147-// NewMockColorSchemeResolver creates a new instance of MockColorSchemeResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1148-// The first argument is typically a *testing.T value.
1149-func NewMockColorSchemeResolver(t interface {
1150- mock.TestingT
1151- Cleanup(func())
1152-}) *MockColorSchemeResolver {
1153- mock := &MockColorSchemeResolver{}
1154- mock.Mock.Test(t)
1155-
1156- t.Cleanup(func() { mock.AssertExpectations(t) })
1157-
1158- return mock
1159-}
1160-
1161-// MockColorSchemeResolver is an autogenerated mock type for the ColorSchemeResolver type
1162-type MockColorSchemeResolver struct {
1163- mock.Mock
1164-}
1165-
1166-type MockColorSchemeResolver_Expecter struct {
1167- mock *mock.Mock
1168-}
1169-
1170-func (_m *MockColorSchemeResolver) EXPECT() *MockColorSchemeResolver_Expecter {
1171- return &MockColorSchemeResolver_Expecter{mock: &_m.Mock}
1172-}
1173-
1174-// OnChange provides a mock function for the type MockColorSchemeResolver
1175-func (_mock *MockColorSchemeResolver) OnChange(callback func(port.ColorSchemePreference)) func() {
1176- ret := _mock.Called(callback)
1177-
1178- if len(ret) == 0 {
1179- panic("no return value specified for OnChange")
1180- }
1181-
1182- var r0 func()
1183- if returnFunc, ok := ret.Get(0).(func(func(port.ColorSchemePreference)) func()); ok {
1184- r0 = returnFunc(callback)
1185- } else {
1186- if ret.Get(0) != nil {
1187- r0 = ret.Get(0).(func())
1188- }
1189- }
1190- return r0
1191-}
1192-
1193-// MockColorSchemeResolver_OnChange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnChange'
1194-type MockColorSchemeResolver_OnChange_Call struct {
1195- *mock.Call
1196-}
1197-
1198-// OnChange is a helper method to define mock.On call
1199-// - callback func(port.ColorSchemePreference)
1200-func (_e *MockColorSchemeResolver_Expecter) OnChange(callback interface{}) *MockColorSchemeResolver_OnChange_Call {
1201- return &MockColorSchemeResolver_OnChange_Call{Call: _e.mock.On("OnChange", callback)}
1202-}
1203-
1204-func (_c *MockColorSchemeResolver_OnChange_Call) Run(run func(callback func(port.ColorSchemePreference))) *MockColorSchemeResolver_OnChange_Call {
1205- _c.Call.Run(func(args mock.Arguments) {
1206- var arg0 func(port.ColorSchemePreference)
1207- if args[0] != nil {
1208- arg0 = args[0].(func(port.ColorSchemePreference))
1209- }
1210- run(
1211- arg0,
1212- )
1213- })
1214- return _c
1215-}
1216-
1217-func (_c *MockColorSchemeResolver_OnChange_Call) Return(fn func()) *MockColorSchemeResolver_OnChange_Call {
1218- _c.Call.Return(fn)
1219- return _c
1220-}
1221-
1222-func (_c *MockColorSchemeResolver_OnChange_Call) RunAndReturn(run func(callback func(port.ColorSchemePreference)) func()) *MockColorSchemeResolver_OnChange_Call {
1223- _c.Call.Return(run)
1224- return _c
1225-}
1226-
1227-// Refresh provides a mock function for the type MockColorSchemeResolver
1228-func (_mock *MockColorSchemeResolver) Refresh() port.ColorSchemePreference {
1229- ret := _mock.Called()
1230-
1231- if len(ret) == 0 {
1232- panic("no return value specified for Refresh")
1233- }
1234-
1235- var r0 port.ColorSchemePreference
1236- if returnFunc, ok := ret.Get(0).(func() port.ColorSchemePreference); ok {
1237- r0 = returnFunc()
1238- } else {
1239- r0 = ret.Get(0).(port.ColorSchemePreference)
1240- }
1241- return r0
1242-}
1243-
1244-// MockColorSchemeResolver_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh'
1245-type MockColorSchemeResolver_Refresh_Call struct {
1246- *mock.Call
1247-}
1248-
1249-// Refresh is a helper method to define mock.On call
1250-func (_e *MockColorSchemeResolver_Expecter) Refresh() *MockColorSchemeResolver_Refresh_Call {
1251- return &MockColorSchemeResolver_Refresh_Call{Call: _e.mock.On("Refresh")}
1252-}
1253-
1254-func (_c *MockColorSchemeResolver_Refresh_Call) Run(run func()) *MockColorSchemeResolver_Refresh_Call {
1255- _c.Call.Run(func(args mock.Arguments) {
1256- run()
1257- })
1258- return _c
1259-}
1260-
1261-func (_c *MockColorSchemeResolver_Refresh_Call) Return(colorSchemePreference port.ColorSchemePreference) *MockColorSchemeResolver_Refresh_Call {
1262- _c.Call.Return(colorSchemePreference)
1263- return _c
1264-}
1265-
1266-func (_c *MockColorSchemeResolver_Refresh_Call) RunAndReturn(run func() port.ColorSchemePreference) *MockColorSchemeResolver_Refresh_Call {
1267- _c.Call.Return(run)
1268- return _c
1269-}
1270-
1271-// RegisterDetector provides a mock function for the type MockColorSchemeResolver
1272-func (_mock *MockColorSchemeResolver) RegisterDetector(detector port.ColorSchemeDetector) {
1273- _mock.Called(detector)
1274- return
1275-}
1276-
1277-// MockColorSchemeResolver_RegisterDetector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterDetector'
1278-type MockColorSchemeResolver_RegisterDetector_Call struct {
1279- *mock.Call
1280-}
1281-
1282-// RegisterDetector is a helper method to define mock.On call
1283-// - detector port.ColorSchemeDetector
1284-func (_e *MockColorSchemeResolver_Expecter) RegisterDetector(detector interface{}) *MockColorSchemeResolver_RegisterDetector_Call {
1285- return &MockColorSchemeResolver_RegisterDetector_Call{Call: _e.mock.On("RegisterDetector", detector)}
1286-}
1287-
1288-func (_c *MockColorSchemeResolver_RegisterDetector_Call) Run(run func(detector port.ColorSchemeDetector)) *MockColorSchemeResolver_RegisterDetector_Call {
1289- _c.Call.Run(func(args mock.Arguments) {
1290- var arg0 port.ColorSchemeDetector
1291- if args[0] != nil {
1292- arg0 = args[0].(port.ColorSchemeDetector)
1293- }
1294- run(
1295- arg0,
1296- )
1297- })
1298- return _c
1299-}
1300-
1301-func (_c *MockColorSchemeResolver_RegisterDetector_Call) Return() *MockColorSchemeResolver_RegisterDetector_Call {
1302- _c.Call.Return()
1303- return _c
1304-}
1305-
1306-func (_c *MockColorSchemeResolver_RegisterDetector_Call) RunAndReturn(run func(detector port.ColorSchemeDetector)) *MockColorSchemeResolver_RegisterDetector_Call {
1307- _c.Run(run)
1308- return _c
1309-}
1310-
1311-// Resolve provides a mock function for the type MockColorSchemeResolver
1312-func (_mock *MockColorSchemeResolver) Resolve() port.ColorSchemePreference {
1313- ret := _mock.Called()
1314-
1315- if len(ret) == 0 {
1316- panic("no return value specified for Resolve")
1317- }
1318-
1319- var r0 port.ColorSchemePreference
1320- if returnFunc, ok := ret.Get(0).(func() port.ColorSchemePreference); ok {
1321- r0 = returnFunc()
1322- } else {
1323- r0 = ret.Get(0).(port.ColorSchemePreference)
1324- }
1325- return r0
1326-}
1327-
1328-// MockColorSchemeResolver_Resolve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resolve'
1329-type MockColorSchemeResolver_Resolve_Call struct {
1330- *mock.Call
1331-}
1332-
1333-// Resolve is a helper method to define mock.On call
1334-func (_e *MockColorSchemeResolver_Expecter) Resolve() *MockColorSchemeResolver_Resolve_Call {
1335- return &MockColorSchemeResolver_Resolve_Call{Call: _e.mock.On("Resolve")}
1336-}
1337-
1338-func (_c *MockColorSchemeResolver_Resolve_Call) Run(run func()) *MockColorSchemeResolver_Resolve_Call {
1339- _c.Call.Run(func(args mock.Arguments) {
1340- run()
1341- })
1342- return _c
1343-}
1344-
1345-func (_c *MockColorSchemeResolver_Resolve_Call) Return(colorSchemePreference port.ColorSchemePreference) *MockColorSchemeResolver_Resolve_Call {
1346- _c.Call.Return(colorSchemePreference)
1347- return _c
1348-}
1349-
1350-func (_c *MockColorSchemeResolver_Resolve_Call) RunAndReturn(run func() port.ColorSchemePreference) *MockColorSchemeResolver_Resolve_Call {
1351- _c.Call.Return(run)
1352- return _c
1353-}
1354-
1355-// NewMockConfigMigrator creates a new instance of MockConfigMigrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1356-// The first argument is typically a *testing.T value.
1357-func NewMockConfigMigrator(t interface {
1358- mock.TestingT
1359- Cleanup(func())
1360-}) *MockConfigMigrator {
1361- mock := &MockConfigMigrator{}
1362- mock.Mock.Test(t)
1363-
1364- t.Cleanup(func() { mock.AssertExpectations(t) })
1365-
1366- return mock
1367-}
1368-
1369-// MockConfigMigrator is an autogenerated mock type for the ConfigMigrator type
1370-type MockConfigMigrator struct {
1371- mock.Mock
1372-}
1373-
1374-type MockConfigMigrator_Expecter struct {
1375- mock *mock.Mock
1376-}
1377-
1378-func (_m *MockConfigMigrator) EXPECT() *MockConfigMigrator_Expecter {
1379- return &MockConfigMigrator_Expecter{mock: &_m.Mock}
1380-}
1381-
1382-// CheckMigration provides a mock function for the type MockConfigMigrator
1383-func (_mock *MockConfigMigrator) CheckMigration() (*port.MigrationResult, error) {
1384- ret := _mock.Called()
1385-
1386- if len(ret) == 0 {
1387- panic("no return value specified for CheckMigration")
1388- }
1389-
1390- var r0 *port.MigrationResult
1391- var r1 error
1392- if returnFunc, ok := ret.Get(0).(func() (*port.MigrationResult, error)); ok {
1393- return returnFunc()
1394- }
1395- if returnFunc, ok := ret.Get(0).(func() *port.MigrationResult); ok {
1396- r0 = returnFunc()
1397- } else {
1398- if ret.Get(0) != nil {
1399- r0 = ret.Get(0).(*port.MigrationResult)
1400- }
1401- }
1402- if returnFunc, ok := ret.Get(1).(func() error); ok {
1403- r1 = returnFunc()
1404- } else {
1405- r1 = ret.Error(1)
1406- }
1407- return r0, r1
1408-}
1409-
1410-// MockConfigMigrator_CheckMigration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckMigration'
1411-type MockConfigMigrator_CheckMigration_Call struct {
1412- *mock.Call
1413-}
1414-
1415-// CheckMigration is a helper method to define mock.On call
1416-func (_e *MockConfigMigrator_Expecter) CheckMigration() *MockConfigMigrator_CheckMigration_Call {
1417- return &MockConfigMigrator_CheckMigration_Call{Call: _e.mock.On("CheckMigration")}
1418-}
1419-
1420-func (_c *MockConfigMigrator_CheckMigration_Call) Run(run func()) *MockConfigMigrator_CheckMigration_Call {
1421- _c.Call.Run(func(args mock.Arguments) {
1422- run()
1423- })
1424- return _c
1425-}
1426-
1427-func (_c *MockConfigMigrator_CheckMigration_Call) Return(migrationResult *port.MigrationResult, err error) *MockConfigMigrator_CheckMigration_Call {
1428- _c.Call.Return(migrationResult, err)
1429- return _c
1430-}
1431-
1432-func (_c *MockConfigMigrator_CheckMigration_Call) RunAndReturn(run func() (*port.MigrationResult, error)) *MockConfigMigrator_CheckMigration_Call {
1433- _c.Call.Return(run)
1434- return _c
1435-}
1436-
1437-// DetectChanges provides a mock function for the type MockConfigMigrator
1438-func (_mock *MockConfigMigrator) DetectChanges() ([]port.KeyChange, error) {
1439- ret := _mock.Called()
1440-
1441- if len(ret) == 0 {
1442- panic("no return value specified for DetectChanges")
1443- }
1444-
1445- var r0 []port.KeyChange
1446- var r1 error
1447- if returnFunc, ok := ret.Get(0).(func() ([]port.KeyChange, error)); ok {
1448- return returnFunc()
1449- }
1450- if returnFunc, ok := ret.Get(0).(func() []port.KeyChange); ok {
1451- r0 = returnFunc()
1452- } else {
1453- if ret.Get(0) != nil {
1454- r0 = ret.Get(0).([]port.KeyChange)
1455- }
1456- }
1457- if returnFunc, ok := ret.Get(1).(func() error); ok {
1458- r1 = returnFunc()
1459- } else {
1460- r1 = ret.Error(1)
1461- }
1462- return r0, r1
1463-}
1464-
1465-// MockConfigMigrator_DetectChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectChanges'
1466-type MockConfigMigrator_DetectChanges_Call struct {
1467- *mock.Call
1468-}
1469-
1470-// DetectChanges is a helper method to define mock.On call
1471-func (_e *MockConfigMigrator_Expecter) DetectChanges() *MockConfigMigrator_DetectChanges_Call {
1472- return &MockConfigMigrator_DetectChanges_Call{Call: _e.mock.On("DetectChanges")}
1473-}
1474-
1475-func (_c *MockConfigMigrator_DetectChanges_Call) Run(run func()) *MockConfigMigrator_DetectChanges_Call {
1476- _c.Call.Run(func(args mock.Arguments) {
1477- run()
1478- })
1479- return _c
1480-}
1481-
1482-func (_c *MockConfigMigrator_DetectChanges_Call) Return(keyChanges []port.KeyChange, err error) *MockConfigMigrator_DetectChanges_Call {
1483- _c.Call.Return(keyChanges, err)
1484- return _c
1485-}
1486-
1487-func (_c *MockConfigMigrator_DetectChanges_Call) RunAndReturn(run func() ([]port.KeyChange, error)) *MockConfigMigrator_DetectChanges_Call {
1488- _c.Call.Return(run)
1489- return _c
1490-}
1491-
1492-// GetConfigFile provides a mock function for the type MockConfigMigrator
1493-func (_mock *MockConfigMigrator) GetConfigFile() (string, error) {
1494- ret := _mock.Called()
1495-
1496- if len(ret) == 0 {
1497- panic("no return value specified for GetConfigFile")
1498- }
1499-
1500- var r0 string
1501- var r1 error
1502- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
1503- return returnFunc()
1504- }
1505- if returnFunc, ok := ret.Get(0).(func() string); ok {
1506- r0 = returnFunc()
1507- } else {
1508- r0 = ret.Get(0).(string)
1509- }
1510- if returnFunc, ok := ret.Get(1).(func() error); ok {
1511- r1 = returnFunc()
1512- } else {
1513- r1 = ret.Error(1)
1514- }
1515- return r0, r1
1516-}
1517-
1518-// MockConfigMigrator_GetConfigFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfigFile'
1519-type MockConfigMigrator_GetConfigFile_Call struct {
1520- *mock.Call
1521-}
1522-
1523-// GetConfigFile is a helper method to define mock.On call
1524-func (_e *MockConfigMigrator_Expecter) GetConfigFile() *MockConfigMigrator_GetConfigFile_Call {
1525- return &MockConfigMigrator_GetConfigFile_Call{Call: _e.mock.On("GetConfigFile")}
1526-}
1527-
1528-func (_c *MockConfigMigrator_GetConfigFile_Call) Run(run func()) *MockConfigMigrator_GetConfigFile_Call {
1529- _c.Call.Run(func(args mock.Arguments) {
1530- run()
1531- })
1532- return _c
1533-}
1534-
1535-func (_c *MockConfigMigrator_GetConfigFile_Call) Return(s string, err error) *MockConfigMigrator_GetConfigFile_Call {
1536- _c.Call.Return(s, err)
1537- return _c
1538-}
1539-
1540-func (_c *MockConfigMigrator_GetConfigFile_Call) RunAndReturn(run func() (string, error)) *MockConfigMigrator_GetConfigFile_Call {
1541- _c.Call.Return(run)
1542- return _c
1543-}
1544-
1545-// GetKeyInfo provides a mock function for the type MockConfigMigrator
1546-func (_mock *MockConfigMigrator) GetKeyInfo(key string) port.KeyInfo {
1547- ret := _mock.Called(key)
1548-
1549- if len(ret) == 0 {
1550- panic("no return value specified for GetKeyInfo")
1551- }
1552-
1553- var r0 port.KeyInfo
1554- if returnFunc, ok := ret.Get(0).(func(string) port.KeyInfo); ok {
1555- r0 = returnFunc(key)
1556- } else {
1557- r0 = ret.Get(0).(port.KeyInfo)
1558- }
1559- return r0
1560-}
1561-
1562-// MockConfigMigrator_GetKeyInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyInfo'
1563-type MockConfigMigrator_GetKeyInfo_Call struct {
1564- *mock.Call
1565-}
1566-
1567-// GetKeyInfo is a helper method to define mock.On call
1568-// - key string
1569-func (_e *MockConfigMigrator_Expecter) GetKeyInfo(key interface{}) *MockConfigMigrator_GetKeyInfo_Call {
1570- return &MockConfigMigrator_GetKeyInfo_Call{Call: _e.mock.On("GetKeyInfo", key)}
1571-}
1572-
1573-func (_c *MockConfigMigrator_GetKeyInfo_Call) Run(run func(key string)) *MockConfigMigrator_GetKeyInfo_Call {
1574- _c.Call.Run(func(args mock.Arguments) {
1575- var arg0 string
1576- if args[0] != nil {
1577- arg0 = args[0].(string)
1578- }
1579- run(
1580- arg0,
1581- )
1582- })
1583- return _c
1584-}
1585-
1586-func (_c *MockConfigMigrator_GetKeyInfo_Call) Return(keyInfo port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call {
1587- _c.Call.Return(keyInfo)
1588- return _c
1589-}
1590-
1591-func (_c *MockConfigMigrator_GetKeyInfo_Call) RunAndReturn(run func(key string) port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call {
1592- _c.Call.Return(run)
1593- return _c
1594-}
1595-
1596-// Migrate provides a mock function for the type MockConfigMigrator
1597-func (_mock *MockConfigMigrator) Migrate() ([]string, error) {
1598- ret := _mock.Called()
1599-
1600- if len(ret) == 0 {
1601- panic("no return value specified for Migrate")
1602- }
1603-
1604- var r0 []string
1605- var r1 error
1606- if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok {
1607- return returnFunc()
1608- }
1609- if returnFunc, ok := ret.Get(0).(func() []string); ok {
1610- r0 = returnFunc()
1611- } else {
1612- if ret.Get(0) != nil {
1613- r0 = ret.Get(0).([]string)
1614- }
1615- }
1616- if returnFunc, ok := ret.Get(1).(func() error); ok {
1617- r1 = returnFunc()
1618- } else {
1619- r1 = ret.Error(1)
1620- }
1621- return r0, r1
1622-}
1623-
1624-// MockConfigMigrator_Migrate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Migrate'
1625-type MockConfigMigrator_Migrate_Call struct {
1626- *mock.Call
1627-}
1628-
1629-// Migrate is a helper method to define mock.On call
1630-func (_e *MockConfigMigrator_Expecter) Migrate() *MockConfigMigrator_Migrate_Call {
1631- return &MockConfigMigrator_Migrate_Call{Call: _e.mock.On("Migrate")}
1632-}
1633-
1634-func (_c *MockConfigMigrator_Migrate_Call) Run(run func()) *MockConfigMigrator_Migrate_Call {
1635- _c.Call.Run(func(args mock.Arguments) {
1636- run()
1637- })
1638- return _c
1639-}
1640-
1641-func (_c *MockConfigMigrator_Migrate_Call) Return(strings []string, err error) *MockConfigMigrator_Migrate_Call {
1642- _c.Call.Return(strings, err)
1643- return _c
1644-}
1645-
1646-func (_c *MockConfigMigrator_Migrate_Call) RunAndReturn(run func() ([]string, error)) *MockConfigMigrator_Migrate_Call {
1647- _c.Call.Return(run)
1648- return _c
1649-}
1650-
1651-// NewMockDiffFormatter creates a new instance of MockDiffFormatter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1652-// The first argument is typically a *testing.T value.
1653-func NewMockDiffFormatter(t interface {
1654- mock.TestingT
1655- Cleanup(func())
1656-}) *MockDiffFormatter {
1657- mock := &MockDiffFormatter{}
1658- mock.Mock.Test(t)
1659-
1660- t.Cleanup(func() { mock.AssertExpectations(t) })
1661-
1662- return mock
1663-}
1664-
1665-// MockDiffFormatter is an autogenerated mock type for the DiffFormatter type
1666-type MockDiffFormatter struct {
1667- mock.Mock
1668-}
1669-
1670-type MockDiffFormatter_Expecter struct {
1671- mock *mock.Mock
1672-}
1673-
1674-func (_m *MockDiffFormatter) EXPECT() *MockDiffFormatter_Expecter {
1675- return &MockDiffFormatter_Expecter{mock: &_m.Mock}
1676-}
1677-
1678-// FormatChangesAsDiff provides a mock function for the type MockDiffFormatter
1679-func (_mock *MockDiffFormatter) FormatChangesAsDiff(changes []port.KeyChange) string {
1680- ret := _mock.Called(changes)
1681-
1682- if len(ret) == 0 {
1683- panic("no return value specified for FormatChangesAsDiff")
1684- }
1685-
1686- var r0 string
1687- if returnFunc, ok := ret.Get(0).(func([]port.KeyChange) string); ok {
1688- r0 = returnFunc(changes)
1689- } else {
1690- r0 = ret.Get(0).(string)
1691- }
1692- return r0
1693-}
1694-
1695-// MockDiffFormatter_FormatChangesAsDiff_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FormatChangesAsDiff'
1696-type MockDiffFormatter_FormatChangesAsDiff_Call struct {
1697- *mock.Call
1698-}
1699-
1700-// FormatChangesAsDiff is a helper method to define mock.On call
1701-// - changes []port.KeyChange
1702-func (_e *MockDiffFormatter_Expecter) FormatChangesAsDiff(changes interface{}) *MockDiffFormatter_FormatChangesAsDiff_Call {
1703- return &MockDiffFormatter_FormatChangesAsDiff_Call{Call: _e.mock.On("FormatChangesAsDiff", changes)}
1704-}
1705-
1706-func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Run(run func(changes []port.KeyChange)) *MockDiffFormatter_FormatChangesAsDiff_Call {
1707- _c.Call.Run(func(args mock.Arguments) {
1708- var arg0 []port.KeyChange
1709- if args[0] != nil {
1710- arg0 = args[0].([]port.KeyChange)
1711- }
1712- run(
1713- arg0,
1714- )
1715- })
1716- return _c
1717-}
1718-
1719-func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Return(s string) *MockDiffFormatter_FormatChangesAsDiff_Call {
1720- _c.Call.Return(s)
1721- return _c
1722-}
1723-
1724-func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) RunAndReturn(run func(changes []port.KeyChange) string) *MockDiffFormatter_FormatChangesAsDiff_Call {
1725- _c.Call.Return(run)
1726- return _c
1727-}
1728-
1729-// NewMockConfigSchemaProvider creates a new instance of MockConfigSchemaProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1730-// The first argument is typically a *testing.T value.
1731-func NewMockConfigSchemaProvider(t interface {
1732- mock.TestingT
1733- Cleanup(func())
1734-}) *MockConfigSchemaProvider {
1735- mock := &MockConfigSchemaProvider{}
1736- mock.Mock.Test(t)
1737-
1738- t.Cleanup(func() { mock.AssertExpectations(t) })
1739-
1740- return mock
1741-}
1742-
1743-// MockConfigSchemaProvider is an autogenerated mock type for the ConfigSchemaProvider type
1744-type MockConfigSchemaProvider struct {
1745- mock.Mock
1746-}
1747-
1748-type MockConfigSchemaProvider_Expecter struct {
1749- mock *mock.Mock
1750-}
1751-
1752-func (_m *MockConfigSchemaProvider) EXPECT() *MockConfigSchemaProvider_Expecter {
1753- return &MockConfigSchemaProvider_Expecter{mock: &_m.Mock}
1754-}
1755-
1756-// GetSchema provides a mock function for the type MockConfigSchemaProvider
1757-func (_mock *MockConfigSchemaProvider) GetSchema() []entity.ConfigKeyInfo {
1758- ret := _mock.Called()
1759-
1760- if len(ret) == 0 {
1761- panic("no return value specified for GetSchema")
1762- }
1763-
1764- var r0 []entity.ConfigKeyInfo
1765- if returnFunc, ok := ret.Get(0).(func() []entity.ConfigKeyInfo); ok {
1766- r0 = returnFunc()
1767- } else {
1768- if ret.Get(0) != nil {
1769- r0 = ret.Get(0).([]entity.ConfigKeyInfo)
1770- }
1771- }
1772- return r0
1773-}
1774-
1775-// MockConfigSchemaProvider_GetSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchema'
1776-type MockConfigSchemaProvider_GetSchema_Call struct {
1777- *mock.Call
1778-}
1779-
1780-// GetSchema is a helper method to define mock.On call
1781-func (_e *MockConfigSchemaProvider_Expecter) GetSchema() *MockConfigSchemaProvider_GetSchema_Call {
1782- return &MockConfigSchemaProvider_GetSchema_Call{Call: _e.mock.On("GetSchema")}
1783-}
1784-
1785-func (_c *MockConfigSchemaProvider_GetSchema_Call) Run(run func()) *MockConfigSchemaProvider_GetSchema_Call {
1786- _c.Call.Run(func(args mock.Arguments) {
1787- run()
1788- })
1789- return _c
1790-}
1791-
1792-func (_c *MockConfigSchemaProvider_GetSchema_Call) Return(configKeyInfos []entity.ConfigKeyInfo) *MockConfigSchemaProvider_GetSchema_Call {
1793- _c.Call.Return(configKeyInfos)
1794- return _c
1795-}
1796-
1797-func (_c *MockConfigSchemaProvider_GetSchema_Call) RunAndReturn(run func() []entity.ConfigKeyInfo) *MockConfigSchemaProvider_GetSchema_Call {
1798- _c.Call.Return(run)
1799- return _c
1800-}
1801-
1802-// NewMockConfigTransformer creates a new instance of MockConfigTransformer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1803-// The first argument is typically a *testing.T value.
1804-func NewMockConfigTransformer(t interface {
1805- mock.TestingT
1806- Cleanup(func())
1807-}) *MockConfigTransformer {
1808- mock := &MockConfigTransformer{}
1809- mock.Mock.Test(t)
1810-
1811- t.Cleanup(func() { mock.AssertExpectations(t) })
1812-
1813- return mock
1814-}
1815-
1816-// MockConfigTransformer is an autogenerated mock type for the ConfigTransformer type
1817-type MockConfigTransformer struct {
1818- mock.Mock
1819-}
1820-
1821-type MockConfigTransformer_Expecter struct {
1822- mock *mock.Mock
1823-}
1824-
1825-func (_m *MockConfigTransformer) EXPECT() *MockConfigTransformer_Expecter {
1826- return &MockConfigTransformer_Expecter{mock: &_m.Mock}
1827-}
1828-
1829-// TransformLegacyActions provides a mock function for the type MockConfigTransformer
1830-func (_mock *MockConfigTransformer) TransformLegacyActions(rawConfig map[string]any) {
1831- _mock.Called(rawConfig)
1832- return
1833-}
1834-
1835-// MockConfigTransformer_TransformLegacyActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransformLegacyActions'
1836-type MockConfigTransformer_TransformLegacyActions_Call struct {
1837- *mock.Call
1838-}
1839-
1840-// TransformLegacyActions is a helper method to define mock.On call
1841-// - rawConfig map[string]any
1842-func (_e *MockConfigTransformer_Expecter) TransformLegacyActions(rawConfig interface{}) *MockConfigTransformer_TransformLegacyActions_Call {
1843- return &MockConfigTransformer_TransformLegacyActions_Call{Call: _e.mock.On("TransformLegacyActions", rawConfig)}
1844-}
1845-
1846-func (_c *MockConfigTransformer_TransformLegacyActions_Call) Run(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyActions_Call {
1847- _c.Call.Run(func(args mock.Arguments) {
1848- var arg0 map[string]any
1849- if args[0] != nil {
1850- arg0 = args[0].(map[string]any)
1851- }
1852- run(
1853- arg0,
1854- )
1855- })
1856- return _c
1857-}
1858-
1859-func (_c *MockConfigTransformer_TransformLegacyActions_Call) Return() *MockConfigTransformer_TransformLegacyActions_Call {
1860- _c.Call.Return()
1861- return _c
1862-}
1863-
1864-func (_c *MockConfigTransformer_TransformLegacyActions_Call) RunAndReturn(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyActions_Call {
1865- _c.Run(run)
1866- return _c
1867-}
1868-
1869-// TransformLegacyEngineConfig provides a mock function for the type MockConfigTransformer
1870-func (_mock *MockConfigTransformer) TransformLegacyEngineConfig(rawConfig map[string]any) {
1871- _mock.Called(rawConfig)
1872- return
1873-}
1874-
1875-// MockConfigTransformer_TransformLegacyEngineConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransformLegacyEngineConfig'
1876-type MockConfigTransformer_TransformLegacyEngineConfig_Call struct {
1877- *mock.Call
1878-}
1879-
1880-// TransformLegacyEngineConfig is a helper method to define mock.On call
1881-// - rawConfig map[string]any
1882-func (_e *MockConfigTransformer_Expecter) TransformLegacyEngineConfig(rawConfig interface{}) *MockConfigTransformer_TransformLegacyEngineConfig_Call {
1883- return &MockConfigTransformer_TransformLegacyEngineConfig_Call{Call: _e.mock.On("TransformLegacyEngineConfig", rawConfig)}
1884-}
1885-
1886-func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) Run(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyEngineConfig_Call {
1887- _c.Call.Run(func(args mock.Arguments) {
1888- var arg0 map[string]any
1889- if args[0] != nil {
1890- arg0 = args[0].(map[string]any)
1891- }
1892- run(
1893- arg0,
1894- )
1895- })
1896- return _c
1897-}
1898-
1899-func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) Return() *MockConfigTransformer_TransformLegacyEngineConfig_Call {
1900- _c.Call.Return()
1901- return _c
1902-}
1903-
1904-func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) RunAndReturn(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyEngineConfig_Call {
1905- _c.Run(run)
1906- return _c
1907-}
1908-
1909-// NewMockContentInjector creates a new instance of MockContentInjector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1910-// The first argument is typically a *testing.T value.
1911-func NewMockContentInjector(t interface {
1912- mock.TestingT
1913- Cleanup(func())
1914-}) *MockContentInjector {
1915- mock := &MockContentInjector{}
1916- mock.Mock.Test(t)
1917-
1918- t.Cleanup(func() { mock.AssertExpectations(t) })
1919-
1920- return mock
1921-}
1922-
1923-// MockContentInjector is an autogenerated mock type for the ContentInjector type
1924-type MockContentInjector struct {
1925- mock.Mock
1926-}
1927-
1928-type MockContentInjector_Expecter struct {
1929- mock *mock.Mock
1930-}
1931-
1932-func (_m *MockContentInjector) EXPECT() *MockContentInjector_Expecter {
1933- return &MockContentInjector_Expecter{mock: &_m.Mock}
1934-}
1935-
1936-// InjectFindHighlightCSS provides a mock function for the type MockContentInjector
1937-func (_mock *MockContentInjector) InjectFindHighlightCSS(ctx context.Context, css string) error {
1938- ret := _mock.Called(ctx, css)
1939-
1940- if len(ret) == 0 {
1941- panic("no return value specified for InjectFindHighlightCSS")
1942- }
1943-
1944- var r0 error
1945- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
1946- r0 = returnFunc(ctx, css)
1947- } else {
1948- r0 = ret.Error(0)
1949- }
1950- return r0
1951-}
1952-
1953-// MockContentInjector_InjectFindHighlightCSS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InjectFindHighlightCSS'
1954-type MockContentInjector_InjectFindHighlightCSS_Call struct {
1955- *mock.Call
1956-}
1957-
1958-// InjectFindHighlightCSS is a helper method to define mock.On call
1959-// - ctx context.Context
1960-// - css string
1961-func (_e *MockContentInjector_Expecter) InjectFindHighlightCSS(ctx interface{}, css interface{}) *MockContentInjector_InjectFindHighlightCSS_Call {
1962- return &MockContentInjector_InjectFindHighlightCSS_Call{Call: _e.mock.On("InjectFindHighlightCSS", ctx, css)}
1963-}
1964-
1965-func (_c *MockContentInjector_InjectFindHighlightCSS_Call) Run(run func(ctx context.Context, css string)) *MockContentInjector_InjectFindHighlightCSS_Call {
1966- _c.Call.Run(func(args mock.Arguments) {
1967- var arg0 context.Context
1968- if args[0] != nil {
1969- arg0 = args[0].(context.Context)
1970- }
1971- var arg1 string
1972- if args[1] != nil {
1973- arg1 = args[1].(string)
1974- }
1975- run(
1976- arg0,
1977- arg1,
1978- )
1979- })
1980- return _c
1981-}
1982-
1983-func (_c *MockContentInjector_InjectFindHighlightCSS_Call) Return(err error) *MockContentInjector_InjectFindHighlightCSS_Call {
1984- _c.Call.Return(err)
1985- return _c
1986-}
1987-
1988-func (_c *MockContentInjector_InjectFindHighlightCSS_Call) RunAndReturn(run func(ctx context.Context, css string) error) *MockContentInjector_InjectFindHighlightCSS_Call {
1989- _c.Call.Return(run)
1990- return _c
1991-}
1992-
1993-// InjectThemeCSS provides a mock function for the type MockContentInjector
1994-func (_mock *MockContentInjector) InjectThemeCSS(ctx context.Context, css string) error {
1995- ret := _mock.Called(ctx, css)
1996-
1997- if len(ret) == 0 {
1998- panic("no return value specified for InjectThemeCSS")
1999- }
2000-
2001- var r0 error
2002- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
2003- r0 = returnFunc(ctx, css)
2004- } else {
2005- r0 = ret.Error(0)
2006- }
2007- return r0
2008-}
2009-
2010-// MockContentInjector_InjectThemeCSS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InjectThemeCSS'
2011-type MockContentInjector_InjectThemeCSS_Call struct {
2012- *mock.Call
2013-}
2014-
2015-// InjectThemeCSS is a helper method to define mock.On call
2016-// - ctx context.Context
2017-// - css string
2018-func (_e *MockContentInjector_Expecter) InjectThemeCSS(ctx interface{}, css interface{}) *MockContentInjector_InjectThemeCSS_Call {
2019- return &MockContentInjector_InjectThemeCSS_Call{Call: _e.mock.On("InjectThemeCSS", ctx, css)}
2020-}
2021-
2022-func (_c *MockContentInjector_InjectThemeCSS_Call) Run(run func(ctx context.Context, css string)) *MockContentInjector_InjectThemeCSS_Call {
2023- _c.Call.Run(func(args mock.Arguments) {
2024- var arg0 context.Context
2025- if args[0] != nil {
2026- arg0 = args[0].(context.Context)
2027- }
2028- var arg1 string
2029- if args[1] != nil {
2030- arg1 = args[1].(string)
2031- }
2032- run(
2033- arg0,
2034- arg1,
2035- )
2036- })
2037- return _c
2038-}
2039-
2040-func (_c *MockContentInjector_InjectThemeCSS_Call) Return(err error) *MockContentInjector_InjectThemeCSS_Call {
2041- _c.Call.Return(err)
2042- return _c
2043-}
2044-
2045-func (_c *MockContentInjector_InjectThemeCSS_Call) RunAndReturn(run func(ctx context.Context, css string) error) *MockContentInjector_InjectThemeCSS_Call {
2046- _c.Call.Return(run)
2047- return _c
2048-}
2049-
2050-// RefreshScripts provides a mock function for the type MockContentInjector
2051-func (_mock *MockContentInjector) RefreshScripts(ctx context.Context, wv port.WebView) error {
2052- ret := _mock.Called(ctx, wv)
2053-
2054- if len(ret) == 0 {
2055- panic("no return value specified for RefreshScripts")
2056- }
2057-
2058- var r0 error
2059- if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebView) error); ok {
2060- r0 = returnFunc(ctx, wv)
2061- } else {
2062- r0 = ret.Error(0)
2063- }
2064- return r0
2065-}
2066-
2067-// MockContentInjector_RefreshScripts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshScripts'
2068-type MockContentInjector_RefreshScripts_Call struct {
2069- *mock.Call
2070-}
2071-
2072-// RefreshScripts is a helper method to define mock.On call
2073-// - ctx context.Context
2074-// - wv port.WebView
2075-func (_e *MockContentInjector_Expecter) RefreshScripts(ctx interface{}, wv interface{}) *MockContentInjector_RefreshScripts_Call {
2076- return &MockContentInjector_RefreshScripts_Call{Call: _e.mock.On("RefreshScripts", ctx, wv)}
2077-}
2078-
2079-func (_c *MockContentInjector_RefreshScripts_Call) Run(run func(ctx context.Context, wv port.WebView)) *MockContentInjector_RefreshScripts_Call {
2080- _c.Call.Run(func(args mock.Arguments) {
2081- var arg0 context.Context
2082- if args[0] != nil {
2083- arg0 = args[0].(context.Context)
2084- }
2085- var arg1 port.WebView
2086- if args[1] != nil {
2087- arg1 = args[1].(port.WebView)
2088- }
2089- run(
2090- arg0,
2091- arg1,
2092- )
2093- })
2094- return _c
2095-}
2096-
2097-func (_c *MockContentInjector_RefreshScripts_Call) Return(err error) *MockContentInjector_RefreshScripts_Call {
2098- _c.Call.Return(err)
2099- return _c
2100-}
2101-
2102-func (_c *MockContentInjector_RefreshScripts_Call) RunAndReturn(run func(ctx context.Context, wv port.WebView) error) *MockContentInjector_RefreshScripts_Call {
2103- _c.Call.Return(run)
2104- return _c
2105-}
2106-
2107-// NewMockContextMenuBuilder creates a new instance of MockContextMenuBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2108-// The first argument is typically a *testing.T value.
2109-func NewMockContextMenuBuilder(t interface {
2110- mock.TestingT
2111- Cleanup(func())
2112-}) *MockContextMenuBuilder {
2113- mock := &MockContextMenuBuilder{}
2114- mock.Mock.Test(t)
2115-
2116- t.Cleanup(func() { mock.AssertExpectations(t) })
2117-
2118- return mock
2119-}
2120-
2121-// MockContextMenuBuilder is an autogenerated mock type for the ContextMenuBuilder type
2122-type MockContextMenuBuilder struct {
2123- mock.Mock
2124-}
2125-
2126-type MockContextMenuBuilder_Expecter struct {
2127- mock *mock.Mock
2128-}
2129-
2130-func (_m *MockContextMenuBuilder) EXPECT() *MockContextMenuBuilder_Expecter {
2131- return &MockContextMenuBuilder_Expecter{mock: &_m.Mock}
2132-}
2133-
2134-// Build provides a mock function for the type MockContextMenuBuilder
2135-func (_mock *MockContextMenuBuilder) Build(ctx context.Context, menuContext port.MenuContext) []port.MenuItem {
2136- ret := _mock.Called(ctx, menuContext)
2137-
2138- if len(ret) == 0 {
2139- panic("no return value specified for Build")
2140- }
2141-
2142- var r0 []port.MenuItem
2143- if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuContext) []port.MenuItem); ok {
2144- r0 = returnFunc(ctx, menuContext)
2145- } else {
2146- if ret.Get(0) != nil {
2147- r0 = ret.Get(0).([]port.MenuItem)
2148- }
2149- }
2150- return r0
2151-}
2152-
2153-// MockContextMenuBuilder_Build_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Build'
2154-type MockContextMenuBuilder_Build_Call struct {
2155- *mock.Call
2156-}
2157-
2158-// Build is a helper method to define mock.On call
2159-// - ctx context.Context
2160-// - menuContext port.MenuContext
2161-func (_e *MockContextMenuBuilder_Expecter) Build(ctx interface{}, menuContext interface{}) *MockContextMenuBuilder_Build_Call {
2162- return &MockContextMenuBuilder_Build_Call{Call: _e.mock.On("Build", ctx, menuContext)}
2163-}
2164-
2165-func (_c *MockContextMenuBuilder_Build_Call) Run(run func(ctx context.Context, menuContext port.MenuContext)) *MockContextMenuBuilder_Build_Call {
2166- _c.Call.Run(func(args mock.Arguments) {
2167- var arg0 context.Context
2168- if args[0] != nil {
2169- arg0 = args[0].(context.Context)
2170- }
2171- var arg1 port.MenuContext
2172- if args[1] != nil {
2173- arg1 = args[1].(port.MenuContext)
2174- }
2175- run(
2176- arg0,
2177- arg1,
2178- )
2179- })
2180- return _c
2181-}
2182-
2183-func (_c *MockContextMenuBuilder_Build_Call) Return(menuItems []port.MenuItem) *MockContextMenuBuilder_Build_Call {
2184- _c.Call.Return(menuItems)
2185- return _c
2186-}
2187-
2188-func (_c *MockContextMenuBuilder_Build_Call) RunAndReturn(run func(ctx context.Context, menuContext port.MenuContext) []port.MenuItem) *MockContextMenuBuilder_Build_Call {
2189- _c.Call.Return(run)
2190- return _c
2191-}
2192-
2193-// NewMockContextMenuActionExecutor creates a new instance of MockContextMenuActionExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2194-// The first argument is typically a *testing.T value.
2195-func NewMockContextMenuActionExecutor(t interface {
2196- mock.TestingT
2197- Cleanup(func())
2198-}) *MockContextMenuActionExecutor {
2199- mock := &MockContextMenuActionExecutor{}
2200- mock.Mock.Test(t)
2201-
2202- t.Cleanup(func() { mock.AssertExpectations(t) })
2203-
2204- return mock
2205-}
2206-
2207-// MockContextMenuActionExecutor is an autogenerated mock type for the ContextMenuActionExecutor type
2208-type MockContextMenuActionExecutor struct {
2209- mock.Mock
2210-}
2211-
2212-type MockContextMenuActionExecutor_Expecter struct {
2213- mock *mock.Mock
2214-}
2215-
2216-func (_m *MockContextMenuActionExecutor) EXPECT() *MockContextMenuActionExecutor_Expecter {
2217- return &MockContextMenuActionExecutor_Expecter{mock: &_m.Mock}
2218-}
2219-
2220-// ExecuteMenuAction provides a mock function for the type MockContextMenuActionExecutor
2221-func (_mock *MockContextMenuActionExecutor) ExecuteMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error {
2222- ret := _mock.Called(ctx, action, menuContext)
2223-
2224- if len(ret) == 0 {
2225- panic("no return value specified for ExecuteMenuAction")
2226- }
2227-
2228- var r0 error
2229- if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok {
2230- r0 = returnFunc(ctx, action, menuContext)
2231- } else {
2232- r0 = ret.Error(0)
2233- }
2234- return r0
2235-}
2236-
2237-// MockContextMenuActionExecutor_ExecuteMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteMenuAction'
2238-type MockContextMenuActionExecutor_ExecuteMenuAction_Call struct {
2239- *mock.Call
2240-}
2241-
2242-// ExecuteMenuAction is a helper method to define mock.On call
2243-// - ctx context.Context
2244-// - action port.MenuAction
2245-// - menuContext port.MenuContext
2246-func (_e *MockContextMenuActionExecutor_Expecter) ExecuteMenuAction(ctx interface{}, action interface{}, menuContext interface{}) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
2247- return &MockContextMenuActionExecutor_ExecuteMenuAction_Call{Call: _e.mock.On("ExecuteMenuAction", ctx, action, menuContext)}
2248-}
2249-
2250-func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
2251- _c.Call.Run(func(args mock.Arguments) {
2252- var arg0 context.Context
2253- if args[0] != nil {
2254- arg0 = args[0].(context.Context)
2255- }
2256- var arg1 port.MenuAction
2257- if args[1] != nil {
2258- arg1 = args[1].(port.MenuAction)
2259- }
2260- var arg2 port.MenuContext
2261- if args[2] != nil {
2262- arg2 = args[2].(port.MenuContext)
2263- }
2264- run(
2265- arg0,
2266- arg1,
2267- arg2,
2268- )
2269- })
2270- return _c
2271-}
2272-
2273-func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Return(err error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
2274- _c.Call.Return(err)
2275- return _c
2276-}
2277-
2278-func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call {
2279- _c.Call.Return(run)
2280- return _c
2281-}
2282-
2283-// NewMockContextMenuActionExecutorFactory creates a new instance of MockContextMenuActionExecutorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2284-// The first argument is typically a *testing.T value.
2285-func NewMockContextMenuActionExecutorFactory(t interface {
2286- mock.TestingT
2287- Cleanup(func())
2288-}) *MockContextMenuActionExecutorFactory {
2289- mock := &MockContextMenuActionExecutorFactory{}
2290- mock.Mock.Test(t)
2291-
2292- t.Cleanup(func() { mock.AssertExpectations(t) })
2293-
2294- return mock
2295-}
2296-
2297-// MockContextMenuActionExecutorFactory is an autogenerated mock type for the ContextMenuActionExecutorFactory type
2298-type MockContextMenuActionExecutorFactory struct {
2299- mock.Mock
2300-}
2301-
2302-type MockContextMenuActionExecutorFactory_Expecter struct {
2303- mock *mock.Mock
2304-}
2305-
2306-func (_m *MockContextMenuActionExecutorFactory) EXPECT() *MockContextMenuActionExecutorFactory_Expecter {
2307- return &MockContextMenuActionExecutorFactory_Expecter{mock: &_m.Mock}
2308-}
2309-
2310-// NewContextMenuActionExecutor provides a mock function for the type MockContextMenuActionExecutorFactory
2311-func (_mock *MockContextMenuActionExecutorFactory) NewContextMenuActionExecutor(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor {
2312- ret := _mock.Called(clipboard, resolver, saver, delegator)
2313-
2314- if len(ret) == 0 {
2315- panic("no return value specified for NewContextMenuActionExecutor")
2316- }
2317-
2318- var r0 port.ContextMenuActionExecutor
2319- if returnFunc, ok := ret.Get(0).(func(port.Clipboard, port.ImageDataResolver, port.ResolvedImageSaver, port.MenuActionDelegator) port.ContextMenuActionExecutor); ok {
2320- r0 = returnFunc(clipboard, resolver, saver, delegator)
2321- } else {
2322- if ret.Get(0) != nil {
2323- r0 = ret.Get(0).(port.ContextMenuActionExecutor)
2324- }
2325- }
2326- return r0
2327-}
2328-
2329-// MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewContextMenuActionExecutor'
2330-type MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call struct {
2331- *mock.Call
2332-}
2333-
2334-// NewContextMenuActionExecutor is a helper method to define mock.On call
2335-// - clipboard port.Clipboard
2336-// - resolver port.ImageDataResolver
2337-// - saver port.ResolvedImageSaver
2338-// - delegator port.MenuActionDelegator
2339-func (_e *MockContextMenuActionExecutorFactory_Expecter) NewContextMenuActionExecutor(clipboard interface{}, resolver interface{}, saver interface{}, delegator interface{}) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
2340- return &MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call{Call: _e.mock.On("NewContextMenuActionExecutor", clipboard, resolver, saver, delegator)}
2341-}
2342-
2343-func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Run(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator)) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
2344- _c.Call.Run(func(args mock.Arguments) {
2345- var arg0 port.Clipboard
2346- if args[0] != nil {
2347- arg0 = args[0].(port.Clipboard)
2348- }
2349- var arg1 port.ImageDataResolver
2350- if args[1] != nil {
2351- arg1 = args[1].(port.ImageDataResolver)
2352- }
2353- var arg2 port.ResolvedImageSaver
2354- if args[2] != nil {
2355- arg2 = args[2].(port.ResolvedImageSaver)
2356- }
2357- var arg3 port.MenuActionDelegator
2358- if args[3] != nil {
2359- arg3 = args[3].(port.MenuActionDelegator)
2360- }
2361- run(
2362- arg0,
2363- arg1,
2364- arg2,
2365- arg3,
2366- )
2367- })
2368- return _c
2369-}
2370-
2371-func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Return(contextMenuActionExecutor port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
2372- _c.Call.Return(contextMenuActionExecutor)
2373- return _c
2374-}
2375-
2376-func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) RunAndReturn(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call {
2377- _c.Call.Return(run)
2378- return _c
2379-}
2380-
2381-// NewMockMenuActionDelegator creates a new instance of MockMenuActionDelegator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2382-// The first argument is typically a *testing.T value.
2383-func NewMockMenuActionDelegator(t interface {
2384- mock.TestingT
2385- Cleanup(func())
2386-}) *MockMenuActionDelegator {
2387- mock := &MockMenuActionDelegator{}
2388- mock.Mock.Test(t)
2389-
2390- t.Cleanup(func() { mock.AssertExpectations(t) })
2391-
2392- return mock
2393-}
2394-
2395-// MockMenuActionDelegator is an autogenerated mock type for the MenuActionDelegator type
2396-type MockMenuActionDelegator struct {
2397- mock.Mock
2398-}
2399-
2400-type MockMenuActionDelegator_Expecter struct {
2401- mock *mock.Mock
2402-}
2403-
2404-func (_m *MockMenuActionDelegator) EXPECT() *MockMenuActionDelegator_Expecter {
2405- return &MockMenuActionDelegator_Expecter{mock: &_m.Mock}
2406-}
2407-
2408-// DelegateMenuAction provides a mock function for the type MockMenuActionDelegator
2409-func (_mock *MockMenuActionDelegator) DelegateMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error {
2410- ret := _mock.Called(ctx, action, menuContext)
2411-
2412- if len(ret) == 0 {
2413- panic("no return value specified for DelegateMenuAction")
2414- }
2415-
2416- var r0 error
2417- if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok {
2418- r0 = returnFunc(ctx, action, menuContext)
2419- } else {
2420- r0 = ret.Error(0)
2421- }
2422- return r0
2423-}
2424-
2425-// MockMenuActionDelegator_DelegateMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegateMenuAction'
2426-type MockMenuActionDelegator_DelegateMenuAction_Call struct {
2427- *mock.Call
2428-}
2429-
2430-// DelegateMenuAction is a helper method to define mock.On call
2431-// - ctx context.Context
2432-// - action port.MenuAction
2433-// - menuContext port.MenuContext
2434-func (_e *MockMenuActionDelegator_Expecter) DelegateMenuAction(ctx interface{}, action interface{}, menuContext interface{}) *MockMenuActionDelegator_DelegateMenuAction_Call {
2435- return &MockMenuActionDelegator_DelegateMenuAction_Call{Call: _e.mock.On("DelegateMenuAction", ctx, action, menuContext)}
2436-}
2437-
2438-func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockMenuActionDelegator_DelegateMenuAction_Call {
2439- _c.Call.Run(func(args mock.Arguments) {
2440- var arg0 context.Context
2441- if args[0] != nil {
2442- arg0 = args[0].(context.Context)
2443- }
2444- var arg1 port.MenuAction
2445- if args[1] != nil {
2446- arg1 = args[1].(port.MenuAction)
2447- }
2448- var arg2 port.MenuContext
2449- if args[2] != nil {
2450- arg2 = args[2].(port.MenuContext)
2451- }
2452- run(
2453- arg0,
2454- arg1,
2455- arg2,
2456- )
2457- })
2458- return _c
2459-}
2460-
2461-func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Return(err error) *MockMenuActionDelegator_DelegateMenuAction_Call {
2462- _c.Call.Return(err)
2463- return _c
2464-}
2465-
2466-func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockMenuActionDelegator_DelegateMenuAction_Call {
2467- _c.Call.Return(run)
2468- return _c
2469-}
2470-
2471-// NewMockDatabaseProvider creates a new instance of MockDatabaseProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2472-// The first argument is typically a *testing.T value.
2473-func NewMockDatabaseProvider(t interface {
2474- mock.TestingT
2475- Cleanup(func())
2476-}) *MockDatabaseProvider {
2477- mock := &MockDatabaseProvider{}
2478- mock.Mock.Test(t)
2479-
2480- t.Cleanup(func() { mock.AssertExpectations(t) })
2481-
2482- return mock
2483-}
2484-
2485-// MockDatabaseProvider is an autogenerated mock type for the DatabaseProvider type
2486-type MockDatabaseProvider struct {
2487- mock.Mock
2488-}
2489-
2490-type MockDatabaseProvider_Expecter struct {
2491- mock *mock.Mock
2492-}
2493-
2494-func (_m *MockDatabaseProvider) EXPECT() *MockDatabaseProvider_Expecter {
2495- return &MockDatabaseProvider_Expecter{mock: &_m.Mock}
2496-}
2497-
2498-// Close provides a mock function for the type MockDatabaseProvider
2499-func (_mock *MockDatabaseProvider) Close() error {
2500- ret := _mock.Called()
2501-
2502- if len(ret) == 0 {
2503- panic("no return value specified for Close")
2504- }
2505-
2506- var r0 error
2507- if returnFunc, ok := ret.Get(0).(func() error); ok {
2508- r0 = returnFunc()
2509- } else {
2510- r0 = ret.Error(0)
2511- }
2512- return r0
2513-}
2514-
2515-// MockDatabaseProvider_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
2516-type MockDatabaseProvider_Close_Call struct {
2517- *mock.Call
2518-}
2519-
2520-// Close is a helper method to define mock.On call
2521-func (_e *MockDatabaseProvider_Expecter) Close() *MockDatabaseProvider_Close_Call {
2522- return &MockDatabaseProvider_Close_Call{Call: _e.mock.On("Close")}
2523-}
2524-
2525-func (_c *MockDatabaseProvider_Close_Call) Run(run func()) *MockDatabaseProvider_Close_Call {
2526- _c.Call.Run(func(args mock.Arguments) {
2527- run()
2528- })
2529- return _c
2530-}
2531-
2532-func (_c *MockDatabaseProvider_Close_Call) Return(err error) *MockDatabaseProvider_Close_Call {
2533- _c.Call.Return(err)
2534- return _c
2535-}
2536-
2537-func (_c *MockDatabaseProvider_Close_Call) RunAndReturn(run func() error) *MockDatabaseProvider_Close_Call {
2538- _c.Call.Return(run)
2539- return _c
2540-}
2541-
2542-// DB provides a mock function for the type MockDatabaseProvider
2543-func (_mock *MockDatabaseProvider) DB(ctx context.Context) (*sql.DB, error) {
2544- ret := _mock.Called(ctx)
2545-
2546- if len(ret) == 0 {
2547- panic("no return value specified for DB")
2548- }
2549-
2550- var r0 *sql.DB
2551- var r1 error
2552- if returnFunc, ok := ret.Get(0).(func(context.Context) (*sql.DB, error)); ok {
2553- return returnFunc(ctx)
2554- }
2555- if returnFunc, ok := ret.Get(0).(func(context.Context) *sql.DB); ok {
2556- r0 = returnFunc(ctx)
2557- } else {
2558- if ret.Get(0) != nil {
2559- r0 = ret.Get(0).(*sql.DB)
2560- }
2561- }
2562- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
2563- r1 = returnFunc(ctx)
2564- } else {
2565- r1 = ret.Error(1)
2566- }
2567- return r0, r1
2568-}
2569-
2570-// MockDatabaseProvider_DB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DB'
2571-type MockDatabaseProvider_DB_Call struct {
2572- *mock.Call
2573-}
2574-
2575-// DB is a helper method to define mock.On call
2576-// - ctx context.Context
2577-func (_e *MockDatabaseProvider_Expecter) DB(ctx interface{}) *MockDatabaseProvider_DB_Call {
2578- return &MockDatabaseProvider_DB_Call{Call: _e.mock.On("DB", ctx)}
2579-}
2580-
2581-func (_c *MockDatabaseProvider_DB_Call) Run(run func(ctx context.Context)) *MockDatabaseProvider_DB_Call {
2582- _c.Call.Run(func(args mock.Arguments) {
2583- var arg0 context.Context
2584- if args[0] != nil {
2585- arg0 = args[0].(context.Context)
2586- }
2587- run(
2588- arg0,
2589- )
2590- })
2591- return _c
2592-}
2593-
2594-func (_c *MockDatabaseProvider_DB_Call) Return(dB *sql.DB, err error) *MockDatabaseProvider_DB_Call {
2595- _c.Call.Return(dB, err)
2596- return _c
2597-}
2598-
2599-func (_c *MockDatabaseProvider_DB_Call) RunAndReturn(run func(ctx context.Context) (*sql.DB, error)) *MockDatabaseProvider_DB_Call {
2600- _c.Call.Return(run)
2601- return _c
2602-}
2603-
2604-// IsInitialized provides a mock function for the type MockDatabaseProvider
2605-func (_mock *MockDatabaseProvider) IsInitialized() bool {
2606- ret := _mock.Called()
2607-
2608- if len(ret) == 0 {
2609- panic("no return value specified for IsInitialized")
2610- }
2611-
2612- var r0 bool
2613- if returnFunc, ok := ret.Get(0).(func() bool); ok {
2614- r0 = returnFunc()
2615- } else {
2616- r0 = ret.Get(0).(bool)
2617- }
2618- return r0
2619-}
2620-
2621-// MockDatabaseProvider_IsInitialized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInitialized'
2622-type MockDatabaseProvider_IsInitialized_Call struct {
2623- *mock.Call
2624-}
2625-
2626-// IsInitialized is a helper method to define mock.On call
2627-func (_e *MockDatabaseProvider_Expecter) IsInitialized() *MockDatabaseProvider_IsInitialized_Call {
2628- return &MockDatabaseProvider_IsInitialized_Call{Call: _e.mock.On("IsInitialized")}
2629-}
2630-
2631-func (_c *MockDatabaseProvider_IsInitialized_Call) Run(run func()) *MockDatabaseProvider_IsInitialized_Call {
2632- _c.Call.Run(func(args mock.Arguments) {
2633- run()
2634- })
2635- return _c
2636-}
2637-
2638-func (_c *MockDatabaseProvider_IsInitialized_Call) Return(b bool) *MockDatabaseProvider_IsInitialized_Call {
2639- _c.Call.Return(b)
2640- return _c
2641-}
2642-
2643-func (_c *MockDatabaseProvider_IsInitialized_Call) RunAndReturn(run func() bool) *MockDatabaseProvider_IsInitialized_Call {
2644- _c.Call.Return(run)
2645- return _c
2646-}
2647-
2648-// NewMockDesktopIntegration creates a new instance of MockDesktopIntegration. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2649-// The first argument is typically a *testing.T value.
2650-func NewMockDesktopIntegration(t interface {
2651- mock.TestingT
2652- Cleanup(func())
2653-}) *MockDesktopIntegration {
2654- mock := &MockDesktopIntegration{}
2655- mock.Mock.Test(t)
2656-
2657- t.Cleanup(func() { mock.AssertExpectations(t) })
2658-
2659- return mock
2660-}
2661-
2662-// MockDesktopIntegration is an autogenerated mock type for the DesktopIntegration type
2663-type MockDesktopIntegration struct {
2664- mock.Mock
2665-}
2666-
2667-type MockDesktopIntegration_Expecter struct {
2668- mock *mock.Mock
2669-}
2670-
2671-func (_m *MockDesktopIntegration) EXPECT() *MockDesktopIntegration_Expecter {
2672- return &MockDesktopIntegration_Expecter{mock: &_m.Mock}
2673-}
2674-
2675-// GetStatus provides a mock function for the type MockDesktopIntegration
2676-func (_mock *MockDesktopIntegration) GetStatus(ctx context.Context) (*port.DesktopIntegrationStatus, error) {
2677- ret := _mock.Called(ctx)
2678-
2679- if len(ret) == 0 {
2680- panic("no return value specified for GetStatus")
2681- }
2682-
2683- var r0 *port.DesktopIntegrationStatus
2684- var r1 error
2685- if returnFunc, ok := ret.Get(0).(func(context.Context) (*port.DesktopIntegrationStatus, error)); ok {
2686- return returnFunc(ctx)
2687- }
2688- if returnFunc, ok := ret.Get(0).(func(context.Context) *port.DesktopIntegrationStatus); ok {
2689- r0 = returnFunc(ctx)
2690- } else {
2691- if ret.Get(0) != nil {
2692- r0 = ret.Get(0).(*port.DesktopIntegrationStatus)
2693- }
2694- }
2695- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
2696- r1 = returnFunc(ctx)
2697- } else {
2698- r1 = ret.Error(1)
2699- }
2700- return r0, r1
2701-}
2702-
2703-// MockDesktopIntegration_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus'
2704-type MockDesktopIntegration_GetStatus_Call struct {
2705- *mock.Call
2706-}
2707-
2708-// GetStatus is a helper method to define mock.On call
2709-// - ctx context.Context
2710-func (_e *MockDesktopIntegration_Expecter) GetStatus(ctx interface{}) *MockDesktopIntegration_GetStatus_Call {
2711- return &MockDesktopIntegration_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx)}
2712-}
2713-
2714-func (_c *MockDesktopIntegration_GetStatus_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_GetStatus_Call {
2715- _c.Call.Run(func(args mock.Arguments) {
2716- var arg0 context.Context
2717- if args[0] != nil {
2718- arg0 = args[0].(context.Context)
2719- }
2720- run(
2721- arg0,
2722- )
2723- })
2724- return _c
2725-}
2726-
2727-func (_c *MockDesktopIntegration_GetStatus_Call) Return(desktopIntegrationStatus *port.DesktopIntegrationStatus, err error) *MockDesktopIntegration_GetStatus_Call {
2728- _c.Call.Return(desktopIntegrationStatus, err)
2729- return _c
2730-}
2731-
2732-func (_c *MockDesktopIntegration_GetStatus_Call) RunAndReturn(run func(ctx context.Context) (*port.DesktopIntegrationStatus, error)) *MockDesktopIntegration_GetStatus_Call {
2733- _c.Call.Return(run)
2734- return _c
2735-}
2736-
2737-// InstallDesktopFile provides a mock function for the type MockDesktopIntegration
2738-func (_mock *MockDesktopIntegration) InstallDesktopFile(ctx context.Context) (string, error) {
2739- ret := _mock.Called(ctx)
2740-
2741- if len(ret) == 0 {
2742- panic("no return value specified for InstallDesktopFile")
2743- }
2744-
2745- var r0 string
2746- var r1 error
2747- if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
2748- return returnFunc(ctx)
2749- }
2750- if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
2751- r0 = returnFunc(ctx)
2752- } else {
2753- r0 = ret.Get(0).(string)
2754- }
2755- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
2756- r1 = returnFunc(ctx)
2757- } else {
2758- r1 = ret.Error(1)
2759- }
2760- return r0, r1
2761-}
2762-
2763-// MockDesktopIntegration_InstallDesktopFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallDesktopFile'
2764-type MockDesktopIntegration_InstallDesktopFile_Call struct {
2765- *mock.Call
2766-}
2767-
2768-// InstallDesktopFile is a helper method to define mock.On call
2769-// - ctx context.Context
2770-func (_e *MockDesktopIntegration_Expecter) InstallDesktopFile(ctx interface{}) *MockDesktopIntegration_InstallDesktopFile_Call {
2771- return &MockDesktopIntegration_InstallDesktopFile_Call{Call: _e.mock.On("InstallDesktopFile", ctx)}
2772-}
2773-
2774-func (_c *MockDesktopIntegration_InstallDesktopFile_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_InstallDesktopFile_Call {
2775- _c.Call.Run(func(args mock.Arguments) {
2776- var arg0 context.Context
2777- if args[0] != nil {
2778- arg0 = args[0].(context.Context)
2779- }
2780- run(
2781- arg0,
2782- )
2783- })
2784- return _c
2785-}
2786-
2787-func (_c *MockDesktopIntegration_InstallDesktopFile_Call) Return(s string, err error) *MockDesktopIntegration_InstallDesktopFile_Call {
2788- _c.Call.Return(s, err)
2789- return _c
2790-}
2791-
2792-func (_c *MockDesktopIntegration_InstallDesktopFile_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockDesktopIntegration_InstallDesktopFile_Call {
2793- _c.Call.Return(run)
2794- return _c
2795-}
2796-
2797-// InstallIcon provides a mock function for the type MockDesktopIntegration
2798-func (_mock *MockDesktopIntegration) InstallIcon(ctx context.Context, svgData []byte) (string, error) {
2799- ret := _mock.Called(ctx, svgData)
2800-
2801- if len(ret) == 0 {
2802- panic("no return value specified for InstallIcon")
2803- }
2804-
2805- var r0 string
2806- var r1 error
2807- if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) (string, error)); ok {
2808- return returnFunc(ctx, svgData)
2809- }
2810- if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) string); ok {
2811- r0 = returnFunc(ctx, svgData)
2812- } else {
2813- r0 = ret.Get(0).(string)
2814- }
2815- if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok {
2816- r1 = returnFunc(ctx, svgData)
2817- } else {
2818- r1 = ret.Error(1)
2819- }
2820- return r0, r1
2821-}
2822-
2823-// MockDesktopIntegration_InstallIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallIcon'
2824-type MockDesktopIntegration_InstallIcon_Call struct {
2825- *mock.Call
2826-}
2827-
2828-// InstallIcon is a helper method to define mock.On call
2829-// - ctx context.Context
2830-// - svgData []byte
2831-func (_e *MockDesktopIntegration_Expecter) InstallIcon(ctx interface{}, svgData interface{}) *MockDesktopIntegration_InstallIcon_Call {
2832- return &MockDesktopIntegration_InstallIcon_Call{Call: _e.mock.On("InstallIcon", ctx, svgData)}
2833-}
2834-
2835-func (_c *MockDesktopIntegration_InstallIcon_Call) Run(run func(ctx context.Context, svgData []byte)) *MockDesktopIntegration_InstallIcon_Call {
2836- _c.Call.Run(func(args mock.Arguments) {
2837- var arg0 context.Context
2838- if args[0] != nil {
2839- arg0 = args[0].(context.Context)
2840- }
2841- var arg1 []byte
2842- if args[1] != nil {
2843- arg1 = args[1].([]byte)
2844- }
2845- run(
2846- arg0,
2847- arg1,
2848- )
2849- })
2850- return _c
2851-}
2852-
2853-func (_c *MockDesktopIntegration_InstallIcon_Call) Return(s string, err error) *MockDesktopIntegration_InstallIcon_Call {
2854- _c.Call.Return(s, err)
2855- return _c
2856-}
2857-
2858-func (_c *MockDesktopIntegration_InstallIcon_Call) RunAndReturn(run func(ctx context.Context, svgData []byte) (string, error)) *MockDesktopIntegration_InstallIcon_Call {
2859- _c.Call.Return(run)
2860- return _c
2861-}
2862-
2863-// RemoveDesktopFile provides a mock function for the type MockDesktopIntegration
2864-func (_mock *MockDesktopIntegration) RemoveDesktopFile(ctx context.Context) error {
2865- ret := _mock.Called(ctx)
2866-
2867- if len(ret) == 0 {
2868- panic("no return value specified for RemoveDesktopFile")
2869- }
2870-
2871- var r0 error
2872- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
2873- r0 = returnFunc(ctx)
2874- } else {
2875- r0 = ret.Error(0)
2876- }
2877- return r0
2878-}
2879-
2880-// MockDesktopIntegration_RemoveDesktopFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDesktopFile'
2881-type MockDesktopIntegration_RemoveDesktopFile_Call struct {
2882- *mock.Call
2883-}
2884-
2885-// RemoveDesktopFile is a helper method to define mock.On call
2886-// - ctx context.Context
2887-func (_e *MockDesktopIntegration_Expecter) RemoveDesktopFile(ctx interface{}) *MockDesktopIntegration_RemoveDesktopFile_Call {
2888- return &MockDesktopIntegration_RemoveDesktopFile_Call{Call: _e.mock.On("RemoveDesktopFile", ctx)}
2889-}
2890-
2891-func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_RemoveDesktopFile_Call {
2892- _c.Call.Run(func(args mock.Arguments) {
2893- var arg0 context.Context
2894- if args[0] != nil {
2895- arg0 = args[0].(context.Context)
2896- }
2897- run(
2898- arg0,
2899- )
2900- })
2901- return _c
2902-}
2903-
2904-func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) Return(err error) *MockDesktopIntegration_RemoveDesktopFile_Call {
2905- _c.Call.Return(err)
2906- return _c
2907-}
2908-
2909-func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_RemoveDesktopFile_Call {
2910- _c.Call.Return(run)
2911- return _c
2912-}
2913-
2914-// RemoveIcon provides a mock function for the type MockDesktopIntegration
2915-func (_mock *MockDesktopIntegration) RemoveIcon(ctx context.Context) error {
2916- ret := _mock.Called(ctx)
2917-
2918- if len(ret) == 0 {
2919- panic("no return value specified for RemoveIcon")
2920- }
2921-
2922- var r0 error
2923- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
2924- r0 = returnFunc(ctx)
2925- } else {
2926- r0 = ret.Error(0)
2927- }
2928- return r0
2929-}
2930-
2931-// MockDesktopIntegration_RemoveIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveIcon'
2932-type MockDesktopIntegration_RemoveIcon_Call struct {
2933- *mock.Call
2934-}
2935-
2936-// RemoveIcon is a helper method to define mock.On call
2937-// - ctx context.Context
2938-func (_e *MockDesktopIntegration_Expecter) RemoveIcon(ctx interface{}) *MockDesktopIntegration_RemoveIcon_Call {
2939- return &MockDesktopIntegration_RemoveIcon_Call{Call: _e.mock.On("RemoveIcon", ctx)}
2940-}
2941-
2942-func (_c *MockDesktopIntegration_RemoveIcon_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_RemoveIcon_Call {
2943- _c.Call.Run(func(args mock.Arguments) {
2944- var arg0 context.Context
2945- if args[0] != nil {
2946- arg0 = args[0].(context.Context)
2947- }
2948- run(
2949- arg0,
2950- )
2951- })
2952- return _c
2953-}
2954-
2955-func (_c *MockDesktopIntegration_RemoveIcon_Call) Return(err error) *MockDesktopIntegration_RemoveIcon_Call {
2956- _c.Call.Return(err)
2957- return _c
2958-}
2959-
2960-func (_c *MockDesktopIntegration_RemoveIcon_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_RemoveIcon_Call {
2961- _c.Call.Return(run)
2962- return _c
2963-}
2964-
2965-// SetAsDefaultBrowser provides a mock function for the type MockDesktopIntegration
2966-func (_mock *MockDesktopIntegration) SetAsDefaultBrowser(ctx context.Context) error {
2967- ret := _mock.Called(ctx)
2968-
2969- if len(ret) == 0 {
2970- panic("no return value specified for SetAsDefaultBrowser")
2971- }
2972-
2973- var r0 error
2974- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
2975- r0 = returnFunc(ctx)
2976- } else {
2977- r0 = ret.Error(0)
2978- }
2979- return r0
2980-}
2981-
2982-// MockDesktopIntegration_SetAsDefaultBrowser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAsDefaultBrowser'
2983-type MockDesktopIntegration_SetAsDefaultBrowser_Call struct {
2984- *mock.Call
2985-}
2986-
2987-// SetAsDefaultBrowser is a helper method to define mock.On call
2988-// - ctx context.Context
2989-func (_e *MockDesktopIntegration_Expecter) SetAsDefaultBrowser(ctx interface{}) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
2990- return &MockDesktopIntegration_SetAsDefaultBrowser_Call{Call: _e.mock.On("SetAsDefaultBrowser", ctx)}
2991-}
2992-
2993-func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
2994- _c.Call.Run(func(args mock.Arguments) {
2995- var arg0 context.Context
2996- if args[0] != nil {
2997- arg0 = args[0].(context.Context)
2998- }
2999- run(
3000- arg0,
3001- )
3002- })
3003- return _c
3004-}
3005-
3006-func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) Return(err error) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
3007- _c.Call.Return(err)
3008- return _c
3009-}
3010-
3011-func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_SetAsDefaultBrowser_Call {
3012- _c.Call.Return(run)
3013- return _c
3014-}
3015-
3016-// UnsetAsDefaultBrowser provides a mock function for the type MockDesktopIntegration
3017-func (_mock *MockDesktopIntegration) UnsetAsDefaultBrowser(ctx context.Context) error {
3018- ret := _mock.Called(ctx)
3019-
3020- if len(ret) == 0 {
3021- panic("no return value specified for UnsetAsDefaultBrowser")
3022- }
3023-
3024- var r0 error
3025- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
3026- r0 = returnFunc(ctx)
3027- } else {
3028- r0 = ret.Error(0)
3029- }
3030- return r0
3031-}
3032-
3033-// MockDesktopIntegration_UnsetAsDefaultBrowser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsetAsDefaultBrowser'
3034-type MockDesktopIntegration_UnsetAsDefaultBrowser_Call struct {
3035- *mock.Call
3036-}
3037-
3038-// UnsetAsDefaultBrowser is a helper method to define mock.On call
3039-// - ctx context.Context
3040-func (_e *MockDesktopIntegration_Expecter) UnsetAsDefaultBrowser(ctx interface{}) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
3041- return &MockDesktopIntegration_UnsetAsDefaultBrowser_Call{Call: _e.mock.On("UnsetAsDefaultBrowser", ctx)}
3042-}
3043-
3044-func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
3045- _c.Call.Run(func(args mock.Arguments) {
3046- var arg0 context.Context
3047- if args[0] != nil {
3048- arg0 = args[0].(context.Context)
3049- }
3050- run(
3051- arg0,
3052- )
3053- })
3054- return _c
3055-}
3056-
3057-func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) Return(err error) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
3058- _c.Call.Return(err)
3059- return _c
3060-}
3061-
3062-func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call {
3063- _c.Call.Return(run)
3064- return _c
3065-}
3066-
3067-// NewMockDownloadEventHandler creates a new instance of MockDownloadEventHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
3068-// The first argument is typically a *testing.T value.
3069-func NewMockDownloadEventHandler(t interface {
3070- mock.TestingT
3071- Cleanup(func())
3072-}) *MockDownloadEventHandler {
3073- mock := &MockDownloadEventHandler{}
3074- mock.Mock.Test(t)
3075-
3076- t.Cleanup(func() { mock.AssertExpectations(t) })
3077-
3078- return mock
3079-}
3080-
3081-// MockDownloadEventHandler is an autogenerated mock type for the DownloadEventHandler type
3082-type MockDownloadEventHandler struct {
3083- mock.Mock
3084-}
3085-
3086-type MockDownloadEventHandler_Expecter struct {
3087- mock *mock.Mock
3088-}
3089-
3090-func (_m *MockDownloadEventHandler) EXPECT() *MockDownloadEventHandler_Expecter {
3091- return &MockDownloadEventHandler_Expecter{mock: &_m.Mock}
3092-}
3093-
3094-// OnDownloadEvent provides a mock function for the type MockDownloadEventHandler
3095-func (_mock *MockDownloadEventHandler) OnDownloadEvent(ctx context.Context, event port.DownloadEvent) {
3096- _mock.Called(ctx, event)
3097- return
3098-}
3099-
3100-// MockDownloadEventHandler_OnDownloadEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnDownloadEvent'
3101-type MockDownloadEventHandler_OnDownloadEvent_Call struct {
3102- *mock.Call
3103-}
3104-
3105-// OnDownloadEvent is a helper method to define mock.On call
3106-// - ctx context.Context
3107-// - event port.DownloadEvent
3108-func (_e *MockDownloadEventHandler_Expecter) OnDownloadEvent(ctx interface{}, event interface{}) *MockDownloadEventHandler_OnDownloadEvent_Call {
3109- return &MockDownloadEventHandler_OnDownloadEvent_Call{Call: _e.mock.On("OnDownloadEvent", ctx, event)}
3110-}
3111-
3112-func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Run(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call {
3113- _c.Call.Run(func(args mock.Arguments) {
3114- var arg0 context.Context
3115- if args[0] != nil {
3116- arg0 = args[0].(context.Context)
3117- }
3118- var arg1 port.DownloadEvent
3119- if args[1] != nil {
3120- arg1 = args[1].(port.DownloadEvent)
3121- }
3122- run(
3123- arg0,
3124- arg1,
3125- )
3126- })
3127- return _c
3128-}
3129-
3130-func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Return() *MockDownloadEventHandler_OnDownloadEvent_Call {
3131- _c.Call.Return()
3132- return _c
3133-}
3134-
3135-func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) RunAndReturn(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call {
3136- _c.Run(run)
3137- return _c
3138-}
3139-
3140-// NewMockDownloadResponse creates a new instance of MockDownloadResponse. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
3141-// The first argument is typically a *testing.T value.
3142-func NewMockDownloadResponse(t interface {
3143- mock.TestingT
3144- Cleanup(func())
3145-}) *MockDownloadResponse {
3146- mock := &MockDownloadResponse{}
3147- mock.Mock.Test(t)
3148-
3149- t.Cleanup(func() { mock.AssertExpectations(t) })
3150-
3151- return mock
3152-}
3153-
3154-// MockDownloadResponse is an autogenerated mock type for the DownloadResponse type
3155-type MockDownloadResponse struct {
3156- mock.Mock
3157-}
3158-
3159-type MockDownloadResponse_Expecter struct {
3160- mock *mock.Mock
3161-}
3162-
3163-func (_m *MockDownloadResponse) EXPECT() *MockDownloadResponse_Expecter {
3164- return &MockDownloadResponse_Expecter{mock: &_m.Mock}
3165-}
3166-
3167-// GetMimeType provides a mock function for the type MockDownloadResponse
3168-func (_mock *MockDownloadResponse) GetMimeType() string {
3169- ret := _mock.Called()
3170-
3171- if len(ret) == 0 {
3172- panic("no return value specified for GetMimeType")
3173- }
3174-
3175- var r0 string
3176- if returnFunc, ok := ret.Get(0).(func() string); ok {
3177- r0 = returnFunc()
3178- } else {
3179- r0 = ret.Get(0).(string)
3180- }
3181- return r0
3182-}
3183-
3184-// MockDownloadResponse_GetMimeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMimeType'
3185-type MockDownloadResponse_GetMimeType_Call struct {
3186- *mock.Call
3187-}
3188-
3189-// GetMimeType is a helper method to define mock.On call
3190-func (_e *MockDownloadResponse_Expecter) GetMimeType() *MockDownloadResponse_GetMimeType_Call {
3191- return &MockDownloadResponse_GetMimeType_Call{Call: _e.mock.On("GetMimeType")}
3192-}
3193-
3194-func (_c *MockDownloadResponse_GetMimeType_Call) Run(run func()) *MockDownloadResponse_GetMimeType_Call {
3195- _c.Call.Run(func(args mock.Arguments) {
3196- run()
3197- })
3198- return _c
3199-}
3200-
3201-func (_c *MockDownloadResponse_GetMimeType_Call) Return(s string) *MockDownloadResponse_GetMimeType_Call {
3202- _c.Call.Return(s)
3203- return _c
3204-}
3205-
3206-func (_c *MockDownloadResponse_GetMimeType_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetMimeType_Call {
3207- _c.Call.Return(run)
3208- return _c
3209-}
3210-
3211-// GetSuggestedFilename provides a mock function for the type MockDownloadResponse
3212-func (_mock *MockDownloadResponse) GetSuggestedFilename() string {
3213- ret := _mock.Called()
3214-
3215- if len(ret) == 0 {
3216- panic("no return value specified for GetSuggestedFilename")
3217- }
3218-
3219- var r0 string
3220- if returnFunc, ok := ret.Get(0).(func() string); ok {
3221- r0 = returnFunc()
3222- } else {
3223- r0 = ret.Get(0).(string)
3224- }
3225- return r0
3226-}
3227-
3228-// MockDownloadResponse_GetSuggestedFilename_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSuggestedFilename'
3229-type MockDownloadResponse_GetSuggestedFilename_Call struct {
3230- *mock.Call
3231-}
3232-
3233-// GetSuggestedFilename is a helper method to define mock.On call
3234-func (_e *MockDownloadResponse_Expecter) GetSuggestedFilename() *MockDownloadResponse_GetSuggestedFilename_Call {
3235- return &MockDownloadResponse_GetSuggestedFilename_Call{Call: _e.mock.On("GetSuggestedFilename")}
3236-}
3237-
3238-func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Run(run func()) *MockDownloadResponse_GetSuggestedFilename_Call {
3239- _c.Call.Run(func(args mock.Arguments) {
3240- run()
3241- })
3242- return _c
3243-}
3244-
3245-func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Return(s string) *MockDownloadResponse_GetSuggestedFilename_Call {
3246- _c.Call.Return(s)
3247- return _c
3248-}
3249-
3250-func (_c *MockDownloadResponse_GetSuggestedFilename_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetSuggestedFilename_Call {
3251- _c.Call.Return(run)
3252- return _c
3253-}
3254-
3255-// GetUri provides a mock function for the type MockDownloadResponse
3256-func (_mock *MockDownloadResponse) GetUri() string {
3257- ret := _mock.Called()
3258-
3259- if len(ret) == 0 {
3260- panic("no return value specified for GetUri")
3261- }
3262-
3263- var r0 string
3264- if returnFunc, ok := ret.Get(0).(func() string); ok {
3265- r0 = returnFunc()
3266- } else {
3267- r0 = ret.Get(0).(string)
3268- }
3269- return r0
3270-}
3271-
3272-// MockDownloadResponse_GetUri_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUri'
3273-type MockDownloadResponse_GetUri_Call struct {
3274- *mock.Call
3275-}
3276-
3277-// GetUri is a helper method to define mock.On call
3278-func (_e *MockDownloadResponse_Expecter) GetUri() *MockDownloadResponse_GetUri_Call {
3279- return &MockDownloadResponse_GetUri_Call{Call: _e.mock.On("GetUri")}
3280-}
3281-
3282-func (_c *MockDownloadResponse_GetUri_Call) Run(run func()) *MockDownloadResponse_GetUri_Call {
3283- _c.Call.Run(func(args mock.Arguments) {
3284- run()
3285- })
3286- return _c
3287-}
3288-
3289-func (_c *MockDownloadResponse_GetUri_Call) Return(s string) *MockDownloadResponse_GetUri_Call {
3290- _c.Call.Return(s)
3291- return _c
3292-}
3293-
3294-func (_c *MockDownloadResponse_GetUri_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetUri_Call {
3295- _c.Call.Return(run)
3296- return _c
3297-}
3298-
3299-// NewMockMemoryPressureApplier creates a new instance of MockMemoryPressureApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
3300-// The first argument is typically a *testing.T value.
3301-func NewMockMemoryPressureApplier(t interface {
3302- mock.TestingT
3303- Cleanup(func())
3304-}) *MockMemoryPressureApplier {
3305- mock := &MockMemoryPressureApplier{}
3306- mock.Mock.Test(t)
3307-
3308- t.Cleanup(func() { mock.AssertExpectations(t) })
3309-
3310- return mock
3311-}
3312-
3313-// MockMemoryPressureApplier is an autogenerated mock type for the MemoryPressureApplier type
3314-type MockMemoryPressureApplier struct {
3315- mock.Mock
3316-}
3317-
3318-type MockMemoryPressureApplier_Expecter struct {
3319- mock *mock.Mock
3320-}
3321-
3322-func (_m *MockMemoryPressureApplier) EXPECT() *MockMemoryPressureApplier_Expecter {
3323- return &MockMemoryPressureApplier_Expecter{mock: &_m.Mock}
3324-}
3325-
3326-// ApplyNetworkProcessSettings provides a mock function for the type MockMemoryPressureApplier
3327-func (_mock *MockMemoryPressureApplier) ApplyNetworkProcessSettings(ctx context.Context, cfg *port.MemoryPressureConfig) error {
3328- ret := _mock.Called(ctx, cfg)
3329-
3330- if len(ret) == 0 {
3331- panic("no return value specified for ApplyNetworkProcessSettings")
3332- }
3333-
3334- var r0 error
3335- if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) error); ok {
3336- r0 = returnFunc(ctx, cfg)
3337- } else {
3338- r0 = ret.Error(0)
3339- }
3340- return r0
3341-}
3342-
3343-// MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyNetworkProcessSettings'
3344-type MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call struct {
3345- *mock.Call
3346-}
3347-
3348-// ApplyNetworkProcessSettings is a helper method to define mock.On call
3349-// - ctx context.Context
3350-// - cfg *port.MemoryPressureConfig
3351-func (_e *MockMemoryPressureApplier_Expecter) ApplyNetworkProcessSettings(ctx interface{}, cfg interface{}) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
3352- return &MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call{Call: _e.mock.On("ApplyNetworkProcessSettings", ctx, cfg)}
3353-}
3354-
3355-func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) Run(run func(ctx context.Context, cfg *port.MemoryPressureConfig)) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
3356- _c.Call.Run(func(args mock.Arguments) {
3357- var arg0 context.Context
3358- if args[0] != nil {
3359- arg0 = args[0].(context.Context)
3360- }
3361- var arg1 *port.MemoryPressureConfig
3362- if args[1] != nil {
3363- arg1 = args[1].(*port.MemoryPressureConfig)
3364- }
3365- run(
3366- arg0,
3367- arg1,
3368- )
3369- })
3370- return _c
3371-}
3372-
3373-func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) Return(err error) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
3374- _c.Call.Return(err)
3375- return _c
3376-}
3377-
3378-func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) RunAndReturn(run func(ctx context.Context, cfg *port.MemoryPressureConfig) error) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call {
3379- _c.Call.Return(run)
3380- return _c
3381-}
3382-
3383-// ApplyWebProcessSettings provides a mock function for the type MockMemoryPressureApplier
3384-func (_mock *MockMemoryPressureApplier) ApplyWebProcessSettings(ctx context.Context, cfg *port.MemoryPressureConfig) (any, error) {
3385- ret := _mock.Called(ctx, cfg)
3386-
3387- if len(ret) == 0 {
3388- panic("no return value specified for ApplyWebProcessSettings")
3389- }
3390-
3391- var r0 any
3392- var r1 error
3393- if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) (any, error)); ok {
3394- return returnFunc(ctx, cfg)
3395- }
3396- if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) any); ok {
3397- r0 = returnFunc(ctx, cfg)
3398- } else {
3399- if ret.Get(0) != nil {
3400- r0 = ret.Get(0).(any)
3401- }
3402- }
3403- if returnFunc, ok := ret.Get(1).(func(context.Context, *port.MemoryPressureConfig) error); ok {
3404- r1 = returnFunc(ctx, cfg)
3405- } else {
3406- r1 = ret.Error(1)
3407- }
3408- return r0, r1
3409-}
3410-
3411-// MockMemoryPressureApplier_ApplyWebProcessSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyWebProcessSettings'
3412-type MockMemoryPressureApplier_ApplyWebProcessSettings_Call struct {
3413- *mock.Call
3414-}
3415-
3416-// ApplyWebProcessSettings is a helper method to define mock.On call
3417-// - ctx context.Context
3418-// - cfg *port.MemoryPressureConfig
3419-func (_e *MockMemoryPressureApplier_Expecter) ApplyWebProcessSettings(ctx interface{}, cfg interface{}) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
3420- return &MockMemoryPressureApplier_ApplyWebProcessSettings_Call{Call: _e.mock.On("ApplyWebProcessSettings", ctx, cfg)}
3421-}
3422-
3423-func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) Run(run func(ctx context.Context, cfg *port.MemoryPressureConfig)) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
3424- _c.Call.Run(func(args mock.Arguments) {
3425- var arg0 context.Context
3426- if args[0] != nil {
3427- arg0 = args[0].(context.Context)
3428- }
3429- var arg1 *port.MemoryPressureConfig
3430- if args[1] != nil {
3431- arg1 = args[1].(*port.MemoryPressureConfig)
3432- }
3433- run(
3434- arg0,
3435- arg1,
3436- )
3437- })
3438- return _c
3439-}
3440-
3441-func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) Return(v any, err error) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
3442- _c.Call.Return(v, err)
3443- return _c
3444-}
3445-
3446-func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) RunAndReturn(run func(ctx context.Context, cfg *port.MemoryPressureConfig) (any, error)) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call {
3447- _c.Call.Return(run)
3448- return _c
3449-}
3450-
3451-// NewMockEngine creates a new instance of MockEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
3452-// The first argument is typically a *testing.T value.
3453-func NewMockEngine(t interface {
3454- mock.TestingT
3455- Cleanup(func())
3456-}) *MockEngine {
3457- mock := &MockEngine{}
3458- mock.Mock.Test(t)
3459-
3460- t.Cleanup(func() { mock.AssertExpectations(t) })
3461-
3462- return mock
3463-}
3464-
3465-// MockEngine is an autogenerated mock type for the Engine type
3466-type MockEngine struct {
3467- mock.Mock
3468-}
3469-
3470-type MockEngine_Expecter struct {
3471- mock *mock.Mock
3472-}
3473-
3474-func (_m *MockEngine) EXPECT() *MockEngine_Expecter {
3475- return &MockEngine_Expecter{mock: &_m.Mock}
3476-}
3477-
3478-// Close provides a mock function for the type MockEngine
3479-func (_mock *MockEngine) Close() error {
3480- ret := _mock.Called()
3481-
3482- if len(ret) == 0 {
3483- panic("no return value specified for Close")
3484- }
3485-
3486- var r0 error
3487- if returnFunc, ok := ret.Get(0).(func() error); ok {
3488- r0 = returnFunc()
3489- } else {
3490- r0 = ret.Error(0)
3491- }
3492- return r0
3493-}
3494-
3495-// MockEngine_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
3496-type MockEngine_Close_Call struct {
3497- *mock.Call
3498-}
3499-
3500-// Close is a helper method to define mock.On call
3501-func (_e *MockEngine_Expecter) Close() *MockEngine_Close_Call {
3502- return &MockEngine_Close_Call{Call: _e.mock.On("Close")}
3503-}
3504-
3505-func (_c *MockEngine_Close_Call) Run(run func()) *MockEngine_Close_Call {
3506- _c.Call.Run(func(args mock.Arguments) {
3507- run()
3508- })
3509- return _c
3510-}
3511-
3512-func (_c *MockEngine_Close_Call) Return(err error) *MockEngine_Close_Call {
3513- _c.Call.Return(err)
3514- return _c
3515-}
3516-
3517-func (_c *MockEngine_Close_Call) RunAndReturn(run func() error) *MockEngine_Close_Call {
3518- _c.Call.Return(run)
3519- return _c
3520-}
3521-
3522-// ConfigureDownloads provides a mock function for the type MockEngine
3523-func (_mock *MockEngine) ConfigureDownloads(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer) error {
3524- ret := _mock.Called(ctx, downloadPath, eventHandler, preparer)
3525-
3526- if len(ret) == 0 {
3527- panic("no return value specified for ConfigureDownloads")
3528- }
3529-
3530- var r0 error
3531- if returnFunc, ok := ret.Get(0).(func(context.Context, string, port.DownloadEventHandler, port.DownloadPreparer) error); ok {
3532- r0 = returnFunc(ctx, downloadPath, eventHandler, preparer)
3533- } else {
3534- r0 = ret.Error(0)
3535- }
3536- return r0
3537-}
3538-
3539-// MockEngine_ConfigureDownloads_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigureDownloads'
3540-type MockEngine_ConfigureDownloads_Call struct {
3541- *mock.Call
3542-}
3543-
3544-// ConfigureDownloads is a helper method to define mock.On call
3545-// - ctx context.Context
3546-// - downloadPath string
3547-// - eventHandler port.DownloadEventHandler
3548-// - preparer port.DownloadPreparer
3549-func (_e *MockEngine_Expecter) ConfigureDownloads(ctx interface{}, downloadPath interface{}, eventHandler interface{}, preparer interface{}) *MockEngine_ConfigureDownloads_Call {
3550- return &MockEngine_ConfigureDownloads_Call{Call: _e.mock.On("ConfigureDownloads", ctx, downloadPath, eventHandler, preparer)}
3551-}
3552-
3553-func (_c *MockEngine_ConfigureDownloads_Call) Run(run func(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer)) *MockEngine_ConfigureDownloads_Call {
3554- _c.Call.Run(func(args mock.Arguments) {
3555- var arg0 context.Context
3556- if args[0] != nil {
3557- arg0 = args[0].(context.Context)
3558- }
3559- var arg1 string
3560- if args[1] != nil {
3561- arg1 = args[1].(string)
3562- }
3563- var arg2 port.DownloadEventHandler
3564- if args[2] != nil {
3565- arg2 = args[2].(port.DownloadEventHandler)
3566- }
3567- var arg3 port.DownloadPreparer
3568- if args[3] != nil {
3569- arg3 = args[3].(port.DownloadPreparer)
3570- }
3571- run(
3572- arg0,
3573- arg1,
3574- arg2,
3575- arg3,
3576- )
3577- })
3578- return _c
3579-}
3580-
3581-func (_c *MockEngine_ConfigureDownloads_Call) Return(err error) *MockEngine_ConfigureDownloads_Call {
3582- _c.Call.Return(err)
3583- return _c
3584-}
3585-
3586-func (_c *MockEngine_ConfigureDownloads_Call) RunAndReturn(run func(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer) error) *MockEngine_ConfigureDownloads_Call {
3587- _c.Call.Return(run)
3588- return _c
3589-}
3590-
3591-// ContentInjector provides a mock function for the type MockEngine
3592-func (_mock *MockEngine) ContentInjector() port.ContentInjector {
3593- ret := _mock.Called()
3594-
3595- if len(ret) == 0 {
3596- panic("no return value specified for ContentInjector")
3597- }
3598-
3599- var r0 port.ContentInjector
3600- if returnFunc, ok := ret.Get(0).(func() port.ContentInjector); ok {
3601- r0 = returnFunc()
3602- } else {
3603- if ret.Get(0) != nil {
3604- r0 = ret.Get(0).(port.ContentInjector)
3605- }
3606- }
3607- return r0
3608-}
3609-
3610-// MockEngine_ContentInjector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContentInjector'
3611-type MockEngine_ContentInjector_Call struct {
3612- *mock.Call
3613-}
3614-
3615-// ContentInjector is a helper method to define mock.On call
3616-func (_e *MockEngine_Expecter) ContentInjector() *MockEngine_ContentInjector_Call {
3617- return &MockEngine_ContentInjector_Call{Call: _e.mock.On("ContentInjector")}
3618-}
3619-
3620-func (_c *MockEngine_ContentInjector_Call) Run(run func()) *MockEngine_ContentInjector_Call {
3621- _c.Call.Run(func(args mock.Arguments) {
3622- run()
3623- })
3624- return _c
3625-}
3626-
3627-func (_c *MockEngine_ContentInjector_Call) Return(contentInjector port.ContentInjector) *MockEngine_ContentInjector_Call {
3628- _c.Call.Return(contentInjector)
3629- return _c
3630-}
3631-
3632-func (_c *MockEngine_ContentInjector_Call) RunAndReturn(run func() port.ContentInjector) *MockEngine_ContentInjector_Call {
3633- _c.Call.Return(run)
3634- return _c
3635-}
3636-
3637-// Factory provides a mock function for the type MockEngine
3638-func (_mock *MockEngine) Factory() port.WebViewFactory {
3639- ret := _mock.Called()
3640-
3641- if len(ret) == 0 {
3642- panic("no return value specified for Factory")
3643- }
3644-
3645- var r0 port.WebViewFactory
3646- if returnFunc, ok := ret.Get(0).(func() port.WebViewFactory); ok {
3647- r0 = returnFunc()
3648- } else {
3649- if ret.Get(0) != nil {
3650- r0 = ret.Get(0).(port.WebViewFactory)
3651- }
3652- }
3653- return r0
3654-}
3655-
3656-// MockEngine_Factory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Factory'
3657-type MockEngine_Factory_Call struct {
3658- *mock.Call
3659-}
3660-
3661-// Factory is a helper method to define mock.On call
3662-func (_e *MockEngine_Expecter) Factory() *MockEngine_Factory_Call {
3663- return &MockEngine_Factory_Call{Call: _e.mock.On("Factory")}
3664-}
3665-
3666-func (_c *MockEngine_Factory_Call) Run(run func()) *MockEngine_Factory_Call {
3667- _c.Call.Run(func(args mock.Arguments) {
3668- run()
3669- })
3670- return _c
3671-}
3672-
3673-func (_c *MockEngine_Factory_Call) Return(webViewFactory port.WebViewFactory) *MockEngine_Factory_Call {
3674- _c.Call.Return(webViewFactory)
3675- return _c
3676-}
3677-
3678-func (_c *MockEngine_Factory_Call) RunAndReturn(run func() port.WebViewFactory) *MockEngine_Factory_Call {
3679- _c.Call.Return(run)
3680- return _c
3681-}
3682-
3683-// FaviconDatabase provides a mock function for the type MockEngine
3684-func (_mock *MockEngine) FaviconDatabase() port.FaviconDatabase {
3685- ret := _mock.Called()
3686-
3687- if len(ret) == 0 {
3688- panic("no return value specified for FaviconDatabase")
3689- }
3690-
3691- var r0 port.FaviconDatabase
3692- if returnFunc, ok := ret.Get(0).(func() port.FaviconDatabase); ok {
3693- r0 = returnFunc()
3694- } else {
3695- if ret.Get(0) != nil {
3696- r0 = ret.Get(0).(port.FaviconDatabase)
3697- }
3698- }
3699- return r0
3700-}
3701-
3702-// MockEngine_FaviconDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FaviconDatabase'
3703-type MockEngine_FaviconDatabase_Call struct {
3704- *mock.Call
3705-}
3706-
3707-// FaviconDatabase is a helper method to define mock.On call
3708-func (_e *MockEngine_Expecter) FaviconDatabase() *MockEngine_FaviconDatabase_Call {
3709- return &MockEngine_FaviconDatabase_Call{Call: _e.mock.On("FaviconDatabase")}
3710-}
3711-
3712-func (_c *MockEngine_FaviconDatabase_Call) Run(run func()) *MockEngine_FaviconDatabase_Call {
3713- _c.Call.Run(func(args mock.Arguments) {
3714- run()
3715- })
3716- return _c
3717-}
3718-
3719-func (_c *MockEngine_FaviconDatabase_Call) Return(faviconDatabase port.FaviconDatabase) *MockEngine_FaviconDatabase_Call {
3720- _c.Call.Return(faviconDatabase)
3721- return _c
3722-}
3723-
3724-func (_c *MockEngine_FaviconDatabase_Call) RunAndReturn(run func() port.FaviconDatabase) *MockEngine_FaviconDatabase_Call {
3725- _c.Call.Return(run)
3726- return _c
3727-}
3728-
3729-// FilterApplier provides a mock function for the type MockEngine
3730-func (_mock *MockEngine) FilterApplier() port.FilterApplier {
3731- ret := _mock.Called()
3732-
3733- if len(ret) == 0 {
3734- panic("no return value specified for FilterApplier")
3735- }
3736-
3737- var r0 port.FilterApplier
3738- if returnFunc, ok := ret.Get(0).(func() port.FilterApplier); ok {
3739- r0 = returnFunc()
3740- } else {
3741- if ret.Get(0) != nil {
3742- r0 = ret.Get(0).(port.FilterApplier)
3743- }
3744- }
3745- return r0
3746-}
3747-
3748-// MockEngine_FilterApplier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterApplier'
3749-type MockEngine_FilterApplier_Call struct {
3750- *mock.Call
3751-}
3752-
3753-// FilterApplier is a helper method to define mock.On call
3754-func (_e *MockEngine_Expecter) FilterApplier() *MockEngine_FilterApplier_Call {
3755- return &MockEngine_FilterApplier_Call{Call: _e.mock.On("FilterApplier")}
3756-}
3757-
3758-func (_c *MockEngine_FilterApplier_Call) Run(run func()) *MockEngine_FilterApplier_Call {
3759- _c.Call.Run(func(args mock.Arguments) {
3760- run()
3761- })
3762- return _c
3763-}
3764-
3765-func (_c *MockEngine_FilterApplier_Call) Return(filterApplier port.FilterApplier) *MockEngine_FilterApplier_Call {
3766- _c.Call.Return(filterApplier)
3767- return _c
3768-}
3769-
3770-func (_c *MockEngine_FilterApplier_Call) RunAndReturn(run func() port.FilterApplier) *MockEngine_FilterApplier_Call {
3771- _c.Call.Return(run)
3772- return _c
3773-}
3774-
3775-// InternalSchemePath provides a mock function for the type MockEngine
3776-func (_mock *MockEngine) InternalSchemePath() string {
3777- ret := _mock.Called()
3778-
3779- if len(ret) == 0 {
3780- panic("no return value specified for InternalSchemePath")
3781- }
3782-
3783- var r0 string
3784- if returnFunc, ok := ret.Get(0).(func() string); ok {
3785- r0 = returnFunc()
3786- } else {
3787- r0 = ret.Get(0).(string)
3788- }
3789- return r0
3790-}
3791-
3792-// MockEngine_InternalSchemePath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InternalSchemePath'
3793-type MockEngine_InternalSchemePath_Call struct {
3794- *mock.Call
3795-}
3796-
3797-// InternalSchemePath is a helper method to define mock.On call
3798-func (_e *MockEngine_Expecter) InternalSchemePath() *MockEngine_InternalSchemePath_Call {
3799- return &MockEngine_InternalSchemePath_Call{Call: _e.mock.On("InternalSchemePath")}
3800-}
3801-
3802-func (_c *MockEngine_InternalSchemePath_Call) Run(run func()) *MockEngine_InternalSchemePath_Call {
3803- _c.Call.Run(func(args mock.Arguments) {
3804- run()
3805- })
3806- return _c
3807-}
3808-
3809-func (_c *MockEngine_InternalSchemePath_Call) Return(s string) *MockEngine_InternalSchemePath_Call {
3810- _c.Call.Return(s)
3811- return _c
3812-}
3813-
3814-func (_c *MockEngine_InternalSchemePath_Call) RunAndReturn(run func() string) *MockEngine_InternalSchemePath_Call {
3815- _c.Call.Return(run)
3816- return _c
3817-}
3818-
3819-// OnToolkitReady provides a mock function for the type MockEngine
3820-func (_mock *MockEngine) OnToolkitReady(ctx context.Context) error {
3821- ret := _mock.Called(ctx)
3822-
3823- if len(ret) == 0 {
3824- panic("no return value specified for OnToolkitReady")
3825- }
3826-
3827- var r0 error
3828- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
3829- r0 = returnFunc(ctx)
3830- } else {
3831- r0 = ret.Error(0)
3832- }
3833- return r0
3834-}
3835-
3836-// MockEngine_OnToolkitReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnToolkitReady'
3837-type MockEngine_OnToolkitReady_Call struct {
3838- *mock.Call
3839-}
3840-
3841-// OnToolkitReady is a helper method to define mock.On call
3842-// - ctx context.Context
3843-func (_e *MockEngine_Expecter) OnToolkitReady(ctx interface{}) *MockEngine_OnToolkitReady_Call {
3844- return &MockEngine_OnToolkitReady_Call{Call: _e.mock.On("OnToolkitReady", ctx)}
3845-}
3846-
3847-func (_c *MockEngine_OnToolkitReady_Call) Run(run func(ctx context.Context)) *MockEngine_OnToolkitReady_Call {
3848- _c.Call.Run(func(args mock.Arguments) {
3849- var arg0 context.Context
3850- if args[0] != nil {
3851- arg0 = args[0].(context.Context)
3852- }
3853- run(
3854- arg0,
3855- )
3856- })
3857- return _c
3858-}
3859-
3860-func (_c *MockEngine_OnToolkitReady_Call) Return(err error) *MockEngine_OnToolkitReady_Call {
3861- _c.Call.Return(err)
3862- return _c
3863-}
3864-
3865-func (_c *MockEngine_OnToolkitReady_Call) RunAndReturn(run func(ctx context.Context) error) *MockEngine_OnToolkitReady_Call {
3866- _c.Call.Return(run)
3867- return _c
3868-}
3869-
3870-// Pool provides a mock function for the type MockEngine
3871-func (_mock *MockEngine) Pool() port.WebViewPool {
3872- ret := _mock.Called()
3873-
3874- if len(ret) == 0 {
3875- panic("no return value specified for Pool")
3876- }
3877-
3878- var r0 port.WebViewPool
3879- if returnFunc, ok := ret.Get(0).(func() port.WebViewPool); ok {
3880- r0 = returnFunc()
3881- } else {
3882- if ret.Get(0) != nil {
3883- r0 = ret.Get(0).(port.WebViewPool)
3884- }
3885- }
3886- return r0
3887-}
3888-
3889-// MockEngine_Pool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pool'
3890-type MockEngine_Pool_Call struct {
3891- *mock.Call
3892-}
3893-
3894-// Pool is a helper method to define mock.On call
3895-func (_e *MockEngine_Expecter) Pool() *MockEngine_Pool_Call {
3896- return &MockEngine_Pool_Call{Call: _e.mock.On("Pool")}
3897-}
3898-
3899-func (_c *MockEngine_Pool_Call) Run(run func()) *MockEngine_Pool_Call {
3900- _c.Call.Run(func(args mock.Arguments) {
3901- run()
3902- })
3903- return _c
3904-}
3905-
3906-func (_c *MockEngine_Pool_Call) Return(webViewPool port.WebViewPool) *MockEngine_Pool_Call {
3907- _c.Call.Return(webViewPool)
3908- return _c
3909-}
3910-
3911-func (_c *MockEngine_Pool_Call) RunAndReturn(run func() port.WebViewPool) *MockEngine_Pool_Call {
3912- _c.Call.Return(run)
3913- return _c
3914-}
3915-
3916-// RegisterAccentHandlers provides a mock function for the type MockEngine
3917-func (_mock *MockEngine) RegisterAccentHandlers(ctx context.Context, handler port.AccentKeyHandler) error {
3918- ret := _mock.Called(ctx, handler)
3919-
3920- if len(ret) == 0 {
3921- panic("no return value specified for RegisterAccentHandlers")
3922- }
3923-
3924- var r0 error
3925- if returnFunc, ok := ret.Get(0).(func(context.Context, port.AccentKeyHandler) error); ok {
3926- r0 = returnFunc(ctx, handler)
3927- } else {
3928- r0 = ret.Error(0)
3929- }
3930- return r0
3931-}
3932-
3933-// MockEngine_RegisterAccentHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterAccentHandlers'
3934-type MockEngine_RegisterAccentHandlers_Call struct {
3935- *mock.Call
3936-}
3937-
3938-// RegisterAccentHandlers is a helper method to define mock.On call
3939-// - ctx context.Context
3940-// - handler port.AccentKeyHandler
3941-func (_e *MockEngine_Expecter) RegisterAccentHandlers(ctx interface{}, handler interface{}) *MockEngine_RegisterAccentHandlers_Call {
3942- return &MockEngine_RegisterAccentHandlers_Call{Call: _e.mock.On("RegisterAccentHandlers", ctx, handler)}
3943-}
3944-
3945-func (_c *MockEngine_RegisterAccentHandlers_Call) Run(run func(ctx context.Context, handler port.AccentKeyHandler)) *MockEngine_RegisterAccentHandlers_Call {
3946- _c.Call.Run(func(args mock.Arguments) {
3947- var arg0 context.Context
3948- if args[0] != nil {
3949- arg0 = args[0].(context.Context)
3950- }
3951- var arg1 port.AccentKeyHandler
3952- if args[1] != nil {
3953- arg1 = args[1].(port.AccentKeyHandler)
3954- }
3955- run(
3956- arg0,
3957- arg1,
3958- )
3959- })
3960- return _c
3961-}
3962-
3963-func (_c *MockEngine_RegisterAccentHandlers_Call) Return(err error) *MockEngine_RegisterAccentHandlers_Call {
3964- _c.Call.Return(err)
3965- return _c
3966-}
3967-
3968-func (_c *MockEngine_RegisterAccentHandlers_Call) RunAndReturn(run func(ctx context.Context, handler port.AccentKeyHandler) error) *MockEngine_RegisterAccentHandlers_Call {
3969- _c.Call.Return(run)
3970- return _c
3971-}
3972-
3973-// RegisterHandlers provides a mock function for the type MockEngine
3974-func (_mock *MockEngine) RegisterHandlers(ctx context.Context, deps port.HandlerDependencies) error {
3975- ret := _mock.Called(ctx, deps)
3976-
3977- if len(ret) == 0 {
3978- panic("no return value specified for RegisterHandlers")
3979- }
3980-
3981- var r0 error
3982- if returnFunc, ok := ret.Get(0).(func(context.Context, port.HandlerDependencies) error); ok {
3983- r0 = returnFunc(ctx, deps)
3984- } else {
3985- r0 = ret.Error(0)
3986- }
3987- return r0
3988-}
3989-
3990-// MockEngine_RegisterHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandlers'
3991-type MockEngine_RegisterHandlers_Call struct {
3992- *mock.Call
3993-}
3994-
3995-// RegisterHandlers is a helper method to define mock.On call
3996-// - ctx context.Context
3997-// - deps port.HandlerDependencies
3998-func (_e *MockEngine_Expecter) RegisterHandlers(ctx interface{}, deps interface{}) *MockEngine_RegisterHandlers_Call {
3999- return &MockEngine_RegisterHandlers_Call{Call: _e.mock.On("RegisterHandlers", ctx, deps)}
4000-}
4001-
4002-func (_c *MockEngine_RegisterHandlers_Call) Run(run func(ctx context.Context, deps port.HandlerDependencies)) *MockEngine_RegisterHandlers_Call {
4003- _c.Call.Run(func(args mock.Arguments) {
4004- var arg0 context.Context
4005- if args[0] != nil {
4006- arg0 = args[0].(context.Context)
4007- }
4008- var arg1 port.HandlerDependencies
4009- if args[1] != nil {
4010- arg1 = args[1].(port.HandlerDependencies)
4011- }
4012- run(
4013- arg0,
4014- arg1,
4015- )
4016- })
4017- return _c
4018-}
4019-
4020-func (_c *MockEngine_RegisterHandlers_Call) Return(err error) *MockEngine_RegisterHandlers_Call {
4021- _c.Call.Return(err)
4022- return _c
4023-}
4024-
4025-func (_c *MockEngine_RegisterHandlers_Call) RunAndReturn(run func(ctx context.Context, deps port.HandlerDependencies) error) *MockEngine_RegisterHandlers_Call {
4026- _c.Call.Return(run)
4027- return _c
4028-}
4029-
4030-// SetHandlerContext provides a mock function for the type MockEngine
4031-func (_mock *MockEngine) SetHandlerContext(ctx context.Context) {
4032- _mock.Called(ctx)
4033- return
4034-}
4035-
4036-// MockEngine_SetHandlerContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHandlerContext'
4037-type MockEngine_SetHandlerContext_Call struct {
4038- *mock.Call
4039-}
4040-
4041-// SetHandlerContext is a helper method to define mock.On call
4042-// - ctx context.Context
4043-func (_e *MockEngine_Expecter) SetHandlerContext(ctx interface{}) *MockEngine_SetHandlerContext_Call {
4044- return &MockEngine_SetHandlerContext_Call{Call: _e.mock.On("SetHandlerContext", ctx)}
4045-}
4046-
4047-func (_c *MockEngine_SetHandlerContext_Call) Run(run func(ctx context.Context)) *MockEngine_SetHandlerContext_Call {
4048- _c.Call.Run(func(args mock.Arguments) {
4049- var arg0 context.Context
4050- if args[0] != nil {
4051- arg0 = args[0].(context.Context)
4052- }
4053- run(
4054- arg0,
4055- )
4056- })
4057- return _c
4058-}
4059-
4060-func (_c *MockEngine_SetHandlerContext_Call) Return() *MockEngine_SetHandlerContext_Call {
4061- _c.Call.Return()
4062- return _c
4063-}
4064-
4065-func (_c *MockEngine_SetHandlerContext_Call) RunAndReturn(run func(ctx context.Context)) *MockEngine_SetHandlerContext_Call {
4066- _c.Run(run)
4067- return _c
4068-}
4069-
4070-// SettingsApplier provides a mock function for the type MockEngine
4071-func (_mock *MockEngine) SettingsApplier() port.SettingsApplier {
4072- ret := _mock.Called()
4073-
4074- if len(ret) == 0 {
4075- panic("no return value specified for SettingsApplier")
4076- }
4077-
4078- var r0 port.SettingsApplier
4079- if returnFunc, ok := ret.Get(0).(func() port.SettingsApplier); ok {
4080- r0 = returnFunc()
4081- } else {
4082- if ret.Get(0) != nil {
4083- r0 = ret.Get(0).(port.SettingsApplier)
4084- }
4085- }
4086- return r0
4087-}
4088-
4089-// MockEngine_SettingsApplier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SettingsApplier'
4090-type MockEngine_SettingsApplier_Call struct {
4091- *mock.Call
4092-}
4093-
4094-// SettingsApplier is a helper method to define mock.On call
4095-func (_e *MockEngine_Expecter) SettingsApplier() *MockEngine_SettingsApplier_Call {
4096- return &MockEngine_SettingsApplier_Call{Call: _e.mock.On("SettingsApplier")}
4097-}
4098-
4099-func (_c *MockEngine_SettingsApplier_Call) Run(run func()) *MockEngine_SettingsApplier_Call {
4100- _c.Call.Run(func(args mock.Arguments) {
4101- run()
4102- })
4103- return _c
4104-}
4105-
4106-func (_c *MockEngine_SettingsApplier_Call) Return(settingsApplier port.SettingsApplier) *MockEngine_SettingsApplier_Call {
4107- _c.Call.Return(settingsApplier)
4108- return _c
4109-}
4110-
4111-func (_c *MockEngine_SettingsApplier_Call) RunAndReturn(run func() port.SettingsApplier) *MockEngine_SettingsApplier_Call {
4112- _c.Call.Return(run)
4113- return _c
4114-}
4115-
4116-// UpdateAppearance provides a mock function for the type MockEngine
4117-func (_mock *MockEngine) UpdateAppearance(ctx context.Context, r float64, g float64, b float64, alpha float64) error {
4118- ret := _mock.Called(ctx, r, g, b, alpha)
4119-
4120- if len(ret) == 0 {
4121- panic("no return value specified for UpdateAppearance")
4122- }
4123-
4124- var r0 error
4125- if returnFunc, ok := ret.Get(0).(func(context.Context, float64, float64, float64, float64) error); ok {
4126- r0 = returnFunc(ctx, r, g, b, alpha)
4127- } else {
4128- r0 = ret.Error(0)
4129- }
4130- return r0
4131-}
4132-
4133-// MockEngine_UpdateAppearance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAppearance'
4134-type MockEngine_UpdateAppearance_Call struct {
4135- *mock.Call
4136-}
4137-
4138-// UpdateAppearance is a helper method to define mock.On call
4139-// - ctx context.Context
4140-// - r float64
4141-// - g float64
4142-// - b float64
4143-// - alpha float64
4144-func (_e *MockEngine_Expecter) UpdateAppearance(ctx interface{}, r interface{}, g interface{}, b interface{}, alpha interface{}) *MockEngine_UpdateAppearance_Call {
4145- return &MockEngine_UpdateAppearance_Call{Call: _e.mock.On("UpdateAppearance", ctx, r, g, b, alpha)}
4146-}
4147-
4148-func (_c *MockEngine_UpdateAppearance_Call) Run(run func(ctx context.Context, r float64, g float64, b float64, alpha float64)) *MockEngine_UpdateAppearance_Call {
4149- _c.Call.Run(func(args mock.Arguments) {
4150- var arg0 context.Context
4151- if args[0] != nil {
4152- arg0 = args[0].(context.Context)
4153- }
4154- var arg1 float64
4155- if args[1] != nil {
4156- arg1 = args[1].(float64)
4157- }
4158- var arg2 float64
4159- if args[2] != nil {
4160- arg2 = args[2].(float64)
4161- }
4162- var arg3 float64
4163- if args[3] != nil {
4164- arg3 = args[3].(float64)
4165- }
4166- var arg4 float64
4167- if args[4] != nil {
4168- arg4 = args[4].(float64)
4169- }
4170- run(
4171- arg0,
4172- arg1,
4173- arg2,
4174- arg3,
4175- arg4,
4176- )
4177- })
4178- return _c
4179-}
4180-
4181-func (_c *MockEngine_UpdateAppearance_Call) Return(err error) *MockEngine_UpdateAppearance_Call {
4182- _c.Call.Return(err)
4183- return _c
4184-}
4185-
4186-func (_c *MockEngine_UpdateAppearance_Call) RunAndReturn(run func(ctx context.Context, r float64, g float64, b float64, alpha float64) error) *MockEngine_UpdateAppearance_Call {
4187- _c.Call.Return(run)
4188- return _c
4189-}
4190-
4191-// UpdateSettings provides a mock function for the type MockEngine
4192-func (_mock *MockEngine) UpdateSettings(ctx context.Context, update port.EngineSettingsUpdate) error {
4193- ret := _mock.Called(ctx, update)
4194-
4195- if len(ret) == 0 {
4196- panic("no return value specified for UpdateSettings")
4197- }
4198-
4199- var r0 error
4200- if returnFunc, ok := ret.Get(0).(func(context.Context, port.EngineSettingsUpdate) error); ok {
4201- r0 = returnFunc(ctx, update)
4202- } else {
4203- r0 = ret.Error(0)
4204- }
4205- return r0
4206-}
4207-
4208-// MockEngine_UpdateSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSettings'
4209-type MockEngine_UpdateSettings_Call struct {
4210- *mock.Call
4211-}
4212-
4213-// UpdateSettings is a helper method to define mock.On call
4214-// - ctx context.Context
4215-// - update port.EngineSettingsUpdate
4216-func (_e *MockEngine_Expecter) UpdateSettings(ctx interface{}, update interface{}) *MockEngine_UpdateSettings_Call {
4217- return &MockEngine_UpdateSettings_Call{Call: _e.mock.On("UpdateSettings", ctx, update)}
4218-}
4219-
4220-func (_c *MockEngine_UpdateSettings_Call) Run(run func(ctx context.Context, update port.EngineSettingsUpdate)) *MockEngine_UpdateSettings_Call {
4221- _c.Call.Run(func(args mock.Arguments) {
4222- var arg0 context.Context
4223- if args[0] != nil {
4224- arg0 = args[0].(context.Context)
4225- }
4226- var arg1 port.EngineSettingsUpdate
4227- if args[1] != nil {
4228- arg1 = args[1].(port.EngineSettingsUpdate)
4229- }
4230- run(
4231- arg0,
4232- arg1,
4233- )
4234- })
4235- return _c
4236-}
4237-
4238-func (_c *MockEngine_UpdateSettings_Call) Return(err error) *MockEngine_UpdateSettings_Call {
4239- _c.Call.Return(err)
4240- return _c
4241-}
4242-
4243-func (_c *MockEngine_UpdateSettings_Call) RunAndReturn(run func(ctx context.Context, update port.EngineSettingsUpdate) error) *MockEngine_UpdateSettings_Call {
4244- _c.Call.Return(run)
4245- return _c
4246-}
4247-
4248-// NewMockWebUIMessageHandler creates a new instance of MockWebUIMessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4249-// The first argument is typically a *testing.T value.
4250-func NewMockWebUIMessageHandler(t interface {
4251- mock.TestingT
4252- Cleanup(func())
4253-}) *MockWebUIMessageHandler {
4254- mock := &MockWebUIMessageHandler{}
4255- mock.Mock.Test(t)
4256-
4257- t.Cleanup(func() { mock.AssertExpectations(t) })
4258-
4259- return mock
4260-}
4261-
4262-// MockWebUIMessageHandler is an autogenerated mock type for the WebUIMessageHandler type
4263-type MockWebUIMessageHandler struct {
4264- mock.Mock
4265-}
4266-
4267-type MockWebUIMessageHandler_Expecter struct {
4268- mock *mock.Mock
4269-}
4270-
4271-func (_m *MockWebUIMessageHandler) EXPECT() *MockWebUIMessageHandler_Expecter {
4272- return &MockWebUIMessageHandler_Expecter{mock: &_m.Mock}
4273-}
4274-
4275-// Handle provides a mock function for the type MockWebUIMessageHandler
4276-func (_mock *MockWebUIMessageHandler) Handle(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage) (any, error) {
4277- ret := _mock.Called(ctx, webviewID, payload)
4278-
4279- if len(ret) == 0 {
4280- panic("no return value specified for Handle")
4281- }
4282-
4283- var r0 any
4284- var r1 error
4285- if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID, json.RawMessage) (any, error)); ok {
4286- return returnFunc(ctx, webviewID, payload)
4287- }
4288- if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID, json.RawMessage) any); ok {
4289- r0 = returnFunc(ctx, webviewID, payload)
4290- } else {
4291- if ret.Get(0) != nil {
4292- r0 = ret.Get(0).(any)
4293- }
4294- }
4295- if returnFunc, ok := ret.Get(1).(func(context.Context, port.WebViewID, json.RawMessage) error); ok {
4296- r1 = returnFunc(ctx, webviewID, payload)
4297- } else {
4298- r1 = ret.Error(1)
4299- }
4300- return r0, r1
4301-}
4302-
4303-// MockWebUIMessageHandler_Handle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handle'
4304-type MockWebUIMessageHandler_Handle_Call struct {
4305- *mock.Call
4306-}
4307-
4308-// Handle is a helper method to define mock.On call
4309-// - ctx context.Context
4310-// - webviewID port.WebViewID
4311-// - payload json.RawMessage
4312-func (_e *MockWebUIMessageHandler_Expecter) Handle(ctx interface{}, webviewID interface{}, payload interface{}) *MockWebUIMessageHandler_Handle_Call {
4313- return &MockWebUIMessageHandler_Handle_Call{Call: _e.mock.On("Handle", ctx, webviewID, payload)}
4314-}
4315-
4316-func (_c *MockWebUIMessageHandler_Handle_Call) Run(run func(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage)) *MockWebUIMessageHandler_Handle_Call {
4317- _c.Call.Run(func(args mock.Arguments) {
4318- var arg0 context.Context
4319- if args[0] != nil {
4320- arg0 = args[0].(context.Context)
4321- }
4322- var arg1 port.WebViewID
4323- if args[1] != nil {
4324- arg1 = args[1].(port.WebViewID)
4325- }
4326- var arg2 json.RawMessage
4327- if args[2] != nil {
4328- arg2 = args[2].(json.RawMessage)
4329- }
4330- run(
4331- arg0,
4332- arg1,
4333- arg2,
4334- )
4335- })
4336- return _c
4337-}
4338-
4339-func (_c *MockWebUIMessageHandler_Handle_Call) Return(v any, err error) *MockWebUIMessageHandler_Handle_Call {
4340- _c.Call.Return(v, err)
4341- return _c
4342-}
4343-
4344-func (_c *MockWebUIMessageHandler_Handle_Call) RunAndReturn(run func(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage) (any, error)) *MockWebUIMessageHandler_Handle_Call {
4345- _c.Call.Return(run)
4346- return _c
4347-}
4348-
4349-// NewMockWebUIHandlerRouter creates a new instance of MockWebUIHandlerRouter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4350-// The first argument is typically a *testing.T value.
4351-func NewMockWebUIHandlerRouter(t interface {
4352- mock.TestingT
4353- Cleanup(func())
4354-}) *MockWebUIHandlerRouter {
4355- mock := &MockWebUIHandlerRouter{}
4356- mock.Mock.Test(t)
4357-
4358- t.Cleanup(func() { mock.AssertExpectations(t) })
4359-
4360- return mock
4361-}
4362-
4363-// MockWebUIHandlerRouter is an autogenerated mock type for the WebUIHandlerRouter type
4364-type MockWebUIHandlerRouter struct {
4365- mock.Mock
4366-}
4367-
4368-type MockWebUIHandlerRouter_Expecter struct {
4369- mock *mock.Mock
4370-}
4371-
4372-func (_m *MockWebUIHandlerRouter) EXPECT() *MockWebUIHandlerRouter_Expecter {
4373- return &MockWebUIHandlerRouter_Expecter{mock: &_m.Mock}
4374-}
4375-
4376-// RegisterHandler provides a mock function for the type MockWebUIHandlerRouter
4377-func (_mock *MockWebUIHandlerRouter) RegisterHandler(msgType string, handler port.WebUIMessageHandler) error {
4378- ret := _mock.Called(msgType, handler)
4379-
4380- if len(ret) == 0 {
4381- panic("no return value specified for RegisterHandler")
4382- }
4383-
4384- var r0 error
4385- if returnFunc, ok := ret.Get(0).(func(string, port.WebUIMessageHandler) error); ok {
4386- r0 = returnFunc(msgType, handler)
4387- } else {
4388- r0 = ret.Error(0)
4389- }
4390- return r0
4391-}
4392-
4393-// MockWebUIHandlerRouter_RegisterHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandler'
4394-type MockWebUIHandlerRouter_RegisterHandler_Call struct {
4395- *mock.Call
4396-}
4397-
4398-// RegisterHandler is a helper method to define mock.On call
4399-// - msgType string
4400-// - handler port.WebUIMessageHandler
4401-func (_e *MockWebUIHandlerRouter_Expecter) RegisterHandler(msgType interface{}, handler interface{}) *MockWebUIHandlerRouter_RegisterHandler_Call {
4402- return &MockWebUIHandlerRouter_RegisterHandler_Call{Call: _e.mock.On("RegisterHandler", msgType, handler)}
4403-}
4404-
4405-func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) Run(run func(msgType string, handler port.WebUIMessageHandler)) *MockWebUIHandlerRouter_RegisterHandler_Call {
4406- _c.Call.Run(func(args mock.Arguments) {
4407- var arg0 string
4408- if args[0] != nil {
4409- arg0 = args[0].(string)
4410- }
4411- var arg1 port.WebUIMessageHandler
4412- if args[1] != nil {
4413- arg1 = args[1].(port.WebUIMessageHandler)
4414- }
4415- run(
4416- arg0,
4417- arg1,
4418- )
4419- })
4420- return _c
4421-}
4422-
4423-func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) Return(err error) *MockWebUIHandlerRouter_RegisterHandler_Call {
4424- _c.Call.Return(err)
4425- return _c
4426-}
4427-
4428-func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) RunAndReturn(run func(msgType string, handler port.WebUIMessageHandler) error) *MockWebUIHandlerRouter_RegisterHandler_Call {
4429- _c.Call.Return(run)
4430- return _c
4431-}
4432-
4433-// RegisterHandlerWithCallbacks provides a mock function for the type MockWebUIHandlerRouter
4434-func (_mock *MockWebUIHandlerRouter) RegisterHandlerWithCallbacks(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler) error {
4435- ret := _mock.Called(msgType, callback, errorCallback, worldName, handler)
4436-
4437- if len(ret) == 0 {
4438- panic("no return value specified for RegisterHandlerWithCallbacks")
4439- }
4440-
4441- var r0 error
4442- if returnFunc, ok := ret.Get(0).(func(string, string, string, string, port.WebUIMessageHandler) error); ok {
4443- r0 = returnFunc(msgType, callback, errorCallback, worldName, handler)
4444- } else {
4445- r0 = ret.Error(0)
4446- }
4447- return r0
4448-}
4449-
4450-// MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandlerWithCallbacks'
4451-type MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call struct {
4452- *mock.Call
4453-}
4454-
4455-// RegisterHandlerWithCallbacks is a helper method to define mock.On call
4456-// - msgType string
4457-// - callback string
4458-// - errorCallback string
4459-// - worldName string
4460-// - handler port.WebUIMessageHandler
4461-func (_e *MockWebUIHandlerRouter_Expecter) RegisterHandlerWithCallbacks(msgType interface{}, callback interface{}, errorCallback interface{}, worldName interface{}, handler interface{}) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
4462- return &MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call{Call: _e.mock.On("RegisterHandlerWithCallbacks", msgType, callback, errorCallback, worldName, handler)}
4463-}
4464-
4465-func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) Run(run func(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler)) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
4466- _c.Call.Run(func(args mock.Arguments) {
4467- var arg0 string
4468- if args[0] != nil {
4469- arg0 = args[0].(string)
4470- }
4471- var arg1 string
4472- if args[1] != nil {
4473- arg1 = args[1].(string)
4474- }
4475- var arg2 string
4476- if args[2] != nil {
4477- arg2 = args[2].(string)
4478- }
4479- var arg3 string
4480- if args[3] != nil {
4481- arg3 = args[3].(string)
4482- }
4483- var arg4 port.WebUIMessageHandler
4484- if args[4] != nil {
4485- arg4 = args[4].(port.WebUIMessageHandler)
4486- }
4487- run(
4488- arg0,
4489- arg1,
4490- arg2,
4491- arg3,
4492- arg4,
4493- )
4494- })
4495- return _c
4496-}
4497-
4498-func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) Return(err error) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
4499- _c.Call.Return(err)
4500- return _c
4501-}
4502-
4503-func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) RunAndReturn(run func(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler) error) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call {
4504- _c.Call.Return(run)
4505- return _c
4506-}
4507-
4508-// NewMockSchemeHandler creates a new instance of MockSchemeHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4509-// The first argument is typically a *testing.T value.
4510-func NewMockSchemeHandler(t interface {
4511- mock.TestingT
4512- Cleanup(func())
4513-}) *MockSchemeHandler {
4514- mock := &MockSchemeHandler{}
4515- mock.Mock.Test(t)
4516-
4517- t.Cleanup(func() { mock.AssertExpectations(t) })
4518-
4519- return mock
4520-}
4521-
4522-// MockSchemeHandler is an autogenerated mock type for the SchemeHandler type
4523-type MockSchemeHandler struct {
4524- mock.Mock
4525-}
4526-
4527-type MockSchemeHandler_Expecter struct {
4528- mock *mock.Mock
4529-}
4530-
4531-func (_m *MockSchemeHandler) EXPECT() *MockSchemeHandler_Expecter {
4532- return &MockSchemeHandler_Expecter{mock: &_m.Mock}
4533-}
4534-
4535-// RegisterScheme provides a mock function for the type MockSchemeHandler
4536-func (_mock *MockSchemeHandler) RegisterScheme(scheme string, handler func(uri string) ([]byte, string, error)) {
4537- _mock.Called(scheme, handler)
4538- return
4539-}
4540-
4541-// MockSchemeHandler_RegisterScheme_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterScheme'
4542-type MockSchemeHandler_RegisterScheme_Call struct {
4543- *mock.Call
4544-}
4545-
4546-// RegisterScheme is a helper method to define mock.On call
4547-// - scheme string
4548-// - handler func(uri string) ([]byte, string, error)
4549-func (_e *MockSchemeHandler_Expecter) RegisterScheme(scheme interface{}, handler interface{}) *MockSchemeHandler_RegisterScheme_Call {
4550- return &MockSchemeHandler_RegisterScheme_Call{Call: _e.mock.On("RegisterScheme", scheme, handler)}
4551-}
4552-
4553-func (_c *MockSchemeHandler_RegisterScheme_Call) Run(run func(scheme string, handler func(uri string) ([]byte, string, error))) *MockSchemeHandler_RegisterScheme_Call {
4554- _c.Call.Run(func(args mock.Arguments) {
4555- var arg0 string
4556- if args[0] != nil {
4557- arg0 = args[0].(string)
4558- }
4559- var arg1 func(uri string) ([]byte, string, error)
4560- if args[1] != nil {
4561- arg1 = args[1].(func(uri string) ([]byte, string, error))
4562- }
4563- run(
4564- arg0,
4565- arg1,
4566- )
4567- })
4568- return _c
4569-}
4570-
4571-func (_c *MockSchemeHandler_RegisterScheme_Call) Return() *MockSchemeHandler_RegisterScheme_Call {
4572- _c.Call.Return()
4573- return _c
4574-}
4575-
4576-func (_c *MockSchemeHandler_RegisterScheme_Call) RunAndReturn(run func(scheme string, handler func(uri string) ([]byte, string, error))) *MockSchemeHandler_RegisterScheme_Call {
4577- _c.Run(run)
4578- return _c
4579-}
4580-
4581-// NewMockSettingsApplier creates a new instance of MockSettingsApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4582-// The first argument is typically a *testing.T value.
4583-func NewMockSettingsApplier(t interface {
4584- mock.TestingT
4585- Cleanup(func())
4586-}) *MockSettingsApplier {
4587- mock := &MockSettingsApplier{}
4588- mock.Mock.Test(t)
4589-
4590- t.Cleanup(func() { mock.AssertExpectations(t) })
4591-
4592- return mock
4593-}
4594-
4595-// MockSettingsApplier is an autogenerated mock type for the SettingsApplier type
4596-type MockSettingsApplier struct {
4597- mock.Mock
4598-}
4599-
4600-type MockSettingsApplier_Expecter struct {
4601- mock *mock.Mock
4602-}
4603-
4604-func (_m *MockSettingsApplier) EXPECT() *MockSettingsApplier_Expecter {
4605- return &MockSettingsApplier_Expecter{mock: &_m.Mock}
4606-}
4607-
4608-// ApplyToAll provides a mock function for the type MockSettingsApplier
4609-func (_mock *MockSettingsApplier) ApplyToAll(ctx context.Context, webviews []port.WebView) {
4610- _mock.Called(ctx, webviews)
4611- return
4612-}
4613-
4614-// MockSettingsApplier_ApplyToAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyToAll'
4615-type MockSettingsApplier_ApplyToAll_Call struct {
4616- *mock.Call
4617-}
4618-
4619-// ApplyToAll is a helper method to define mock.On call
4620-// - ctx context.Context
4621-// - webviews []port.WebView
4622-func (_e *MockSettingsApplier_Expecter) ApplyToAll(ctx interface{}, webviews interface{}) *MockSettingsApplier_ApplyToAll_Call {
4623- return &MockSettingsApplier_ApplyToAll_Call{Call: _e.mock.On("ApplyToAll", ctx, webviews)}
4624-}
4625-
4626-func (_c *MockSettingsApplier_ApplyToAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockSettingsApplier_ApplyToAll_Call {
4627- _c.Call.Run(func(args mock.Arguments) {
4628- var arg0 context.Context
4629- if args[0] != nil {
4630- arg0 = args[0].(context.Context)
4631- }
4632- var arg1 []port.WebView
4633- if args[1] != nil {
4634- arg1 = args[1].([]port.WebView)
4635- }
4636- run(
4637- arg0,
4638- arg1,
4639- )
4640- })
4641- return _c
4642-}
4643-
4644-func (_c *MockSettingsApplier_ApplyToAll_Call) Return() *MockSettingsApplier_ApplyToAll_Call {
4645- _c.Call.Return()
4646- return _c
4647-}
4648-
4649-func (_c *MockSettingsApplier_ApplyToAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockSettingsApplier_ApplyToAll_Call {
4650- _c.Run(run)
4651- return _c
4652-}
4653-
4654-// NewMockFilterApplier creates a new instance of MockFilterApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4655-// The first argument is typically a *testing.T value.
4656-func NewMockFilterApplier(t interface {
4657- mock.TestingT
4658- Cleanup(func())
4659-}) *MockFilterApplier {
4660- mock := &MockFilterApplier{}
4661- mock.Mock.Test(t)
4662-
4663- t.Cleanup(func() { mock.AssertExpectations(t) })
4664-
4665- return mock
4666-}
4667-
4668-// MockFilterApplier is an autogenerated mock type for the FilterApplier type
4669-type MockFilterApplier struct {
4670- mock.Mock
4671-}
4672-
4673-type MockFilterApplier_Expecter struct {
4674- mock *mock.Mock
4675-}
4676-
4677-func (_m *MockFilterApplier) EXPECT() *MockFilterApplier_Expecter {
4678- return &MockFilterApplier_Expecter{mock: &_m.Mock}
4679-}
4680-
4681-// ApplyToAll provides a mock function for the type MockFilterApplier
4682-func (_mock *MockFilterApplier) ApplyToAll(ctx context.Context, webviews []port.WebView) {
4683- _mock.Called(ctx, webviews)
4684- return
4685-}
4686-
4687-// MockFilterApplier_ApplyToAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyToAll'
4688-type MockFilterApplier_ApplyToAll_Call struct {
4689- *mock.Call
4690-}
4691-
4692-// ApplyToAll is a helper method to define mock.On call
4693-// - ctx context.Context
4694-// - webviews []port.WebView
4695-func (_e *MockFilterApplier_Expecter) ApplyToAll(ctx interface{}, webviews interface{}) *MockFilterApplier_ApplyToAll_Call {
4696- return &MockFilterApplier_ApplyToAll_Call{Call: _e.mock.On("ApplyToAll", ctx, webviews)}
4697-}
4698-
4699-func (_c *MockFilterApplier_ApplyToAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockFilterApplier_ApplyToAll_Call {
4700- _c.Call.Run(func(args mock.Arguments) {
4701- var arg0 context.Context
4702- if args[0] != nil {
4703- arg0 = args[0].(context.Context)
4704- }
4705- var arg1 []port.WebView
4706- if args[1] != nil {
4707- arg1 = args[1].([]port.WebView)
4708- }
4709- run(
4710- arg0,
4711- arg1,
4712- )
4713- })
4714- return _c
4715-}
4716-
4717-func (_c *MockFilterApplier_ApplyToAll_Call) Return() *MockFilterApplier_ApplyToAll_Call {
4718- _c.Call.Return()
4719- return _c
4720-}
4721-
4722-func (_c *MockFilterApplier_ApplyToAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockFilterApplier_ApplyToAll_Call {
4723- _c.Run(run)
4724- return _c
4725-}
4726-
4727-// NewMockFaviconDatabase creates a new instance of MockFaviconDatabase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4728-// The first argument is typically a *testing.T value.
4729-func NewMockFaviconDatabase(t interface {
4730- mock.TestingT
4731- Cleanup(func())
4732-}) *MockFaviconDatabase {
4733- mock := &MockFaviconDatabase{}
4734- mock.Mock.Test(t)
4735-
4736- t.Cleanup(func() { mock.AssertExpectations(t) })
4737-
4738- return mock
4739-}
4740-
4741-// MockFaviconDatabase is an autogenerated mock type for the FaviconDatabase type
4742-type MockFaviconDatabase struct {
4743- mock.Mock
4744-}
4745-
4746-type MockFaviconDatabase_Expecter struct {
4747- mock *mock.Mock
4748-}
4749-
4750-func (_m *MockFaviconDatabase) EXPECT() *MockFaviconDatabase_Expecter {
4751- return &MockFaviconDatabase_Expecter{mock: &_m.Mock}
4752-}
4753-
4754-// GetFaviconAsync provides a mock function for the type MockFaviconDatabase
4755-func (_mock *MockFaviconDatabase) GetFaviconAsync(pageURL string, callback func(port.Texture)) {
4756- _mock.Called(pageURL, callback)
4757- return
4758-}
4759-
4760-// MockFaviconDatabase_GetFaviconAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFaviconAsync'
4761-type MockFaviconDatabase_GetFaviconAsync_Call struct {
4762- *mock.Call
4763-}
4764-
4765-// GetFaviconAsync is a helper method to define mock.On call
4766-// - pageURL string
4767-// - callback func(port.Texture)
4768-func (_e *MockFaviconDatabase_Expecter) GetFaviconAsync(pageURL interface{}, callback interface{}) *MockFaviconDatabase_GetFaviconAsync_Call {
4769- return &MockFaviconDatabase_GetFaviconAsync_Call{Call: _e.mock.On("GetFaviconAsync", pageURL, callback)}
4770-}
4771-
4772-func (_c *MockFaviconDatabase_GetFaviconAsync_Call) Run(run func(pageURL string, callback func(port.Texture))) *MockFaviconDatabase_GetFaviconAsync_Call {
4773- _c.Call.Run(func(args mock.Arguments) {
4774- var arg0 string
4775- if args[0] != nil {
4776- arg0 = args[0].(string)
4777- }
4778- var arg1 func(port.Texture)
4779- if args[1] != nil {
4780- arg1 = args[1].(func(port.Texture))
4781- }
4782- run(
4783- arg0,
4784- arg1,
4785- )
4786- })
4787- return _c
4788-}
4789-
4790-func (_c *MockFaviconDatabase_GetFaviconAsync_Call) Return() *MockFaviconDatabase_GetFaviconAsync_Call {
4791- _c.Call.Return()
4792- return _c
4793-}
4794-
4795-func (_c *MockFaviconDatabase_GetFaviconAsync_Call) RunAndReturn(run func(pageURL string, callback func(port.Texture))) *MockFaviconDatabase_GetFaviconAsync_Call {
4796- _c.Run(run)
4797- return _c
4798-}
4799-
4800-// NewMockScriptRefresher creates a new instance of MockScriptRefresher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4801-// The first argument is typically a *testing.T value.
4802-func NewMockScriptRefresher(t interface {
4803- mock.TestingT
4804- Cleanup(func())
4805-}) *MockScriptRefresher {
4806- mock := &MockScriptRefresher{}
4807- mock.Mock.Test(t)
4808-
4809- t.Cleanup(func() { mock.AssertExpectations(t) })
4810-
4811- return mock
4812-}
4813-
4814-// MockScriptRefresher is an autogenerated mock type for the ScriptRefresher type
4815-type MockScriptRefresher struct {
4816- mock.Mock
4817-}
4818-
4819-type MockScriptRefresher_Expecter struct {
4820- mock *mock.Mock
4821-}
4822-
4823-func (_m *MockScriptRefresher) EXPECT() *MockScriptRefresher_Expecter {
4824- return &MockScriptRefresher_Expecter{mock: &_m.Mock}
4825-}
4826-
4827-// RefreshAll provides a mock function for the type MockScriptRefresher
4828-func (_mock *MockScriptRefresher) RefreshAll(ctx context.Context, webviews []port.WebView) {
4829- _mock.Called(ctx, webviews)
4830- return
4831-}
4832-
4833-// MockScriptRefresher_RefreshAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshAll'
4834-type MockScriptRefresher_RefreshAll_Call struct {
4835- *mock.Call
4836-}
4837-
4838-// RefreshAll is a helper method to define mock.On call
4839-// - ctx context.Context
4840-// - webviews []port.WebView
4841-func (_e *MockScriptRefresher_Expecter) RefreshAll(ctx interface{}, webviews interface{}) *MockScriptRefresher_RefreshAll_Call {
4842- return &MockScriptRefresher_RefreshAll_Call{Call: _e.mock.On("RefreshAll", ctx, webviews)}
4843-}
4844-
4845-func (_c *MockScriptRefresher_RefreshAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockScriptRefresher_RefreshAll_Call {
4846- _c.Call.Run(func(args mock.Arguments) {
4847- var arg0 context.Context
4848- if args[0] != nil {
4849- arg0 = args[0].(context.Context)
4850- }
4851- var arg1 []port.WebView
4852- if args[1] != nil {
4853- arg1 = args[1].([]port.WebView)
4854- }
4855- run(
4856- arg0,
4857- arg1,
4858- )
4859- })
4860- return _c
4861-}
4862-
4863-func (_c *MockScriptRefresher_RefreshAll_Call) Return() *MockScriptRefresher_RefreshAll_Call {
4864- _c.Call.Return()
4865- return _c
4866-}
4867-
4868-func (_c *MockScriptRefresher_RefreshAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockScriptRefresher_RefreshAll_Call {
4869- _c.Run(run)
4870- return _c
4871-}
4872-
4873-// NewMockNativeWidgetProvider creates a new instance of MockNativeWidgetProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4874-// The first argument is typically a *testing.T value.
4875-func NewMockNativeWidgetProvider(t interface {
4876- mock.TestingT
4877- Cleanup(func())
4878-}) *MockNativeWidgetProvider {
4879- mock := &MockNativeWidgetProvider{}
4880- mock.Mock.Test(t)
4881-
4882- t.Cleanup(func() { mock.AssertExpectations(t) })
4883-
4884- return mock
4885-}
4886-
4887-// MockNativeWidgetProvider is an autogenerated mock type for the NativeWidgetProvider type
4888-type MockNativeWidgetProvider struct {
4889- mock.Mock
4890-}
4891-
4892-type MockNativeWidgetProvider_Expecter struct {
4893- mock *mock.Mock
4894-}
4895-
4896-func (_m *MockNativeWidgetProvider) EXPECT() *MockNativeWidgetProvider_Expecter {
4897- return &MockNativeWidgetProvider_Expecter{mock: &_m.Mock}
4898-}
4899-
4900-// NativeWidget provides a mock function for the type MockNativeWidgetProvider
4901-func (_mock *MockNativeWidgetProvider) NativeWidget() uintptr {
4902- ret := _mock.Called()
4903-
4904- if len(ret) == 0 {
4905- panic("no return value specified for NativeWidget")
4906- }
4907-
4908- var r0 uintptr
4909- if returnFunc, ok := ret.Get(0).(func() uintptr); ok {
4910- r0 = returnFunc()
4911- } else {
4912- r0 = ret.Get(0).(uintptr)
4913- }
4914- return r0
4915-}
4916-
4917-// MockNativeWidgetProvider_NativeWidget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NativeWidget'
4918-type MockNativeWidgetProvider_NativeWidget_Call struct {
4919- *mock.Call
4920-}
4921-
4922-// NativeWidget is a helper method to define mock.On call
4923-func (_e *MockNativeWidgetProvider_Expecter) NativeWidget() *MockNativeWidgetProvider_NativeWidget_Call {
4924- return &MockNativeWidgetProvider_NativeWidget_Call{Call: _e.mock.On("NativeWidget")}
4925-}
4926-
4927-func (_c *MockNativeWidgetProvider_NativeWidget_Call) Run(run func()) *MockNativeWidgetProvider_NativeWidget_Call {
4928- _c.Call.Run(func(args mock.Arguments) {
4929- run()
4930- })
4931- return _c
4932-}
4933-
4934-func (_c *MockNativeWidgetProvider_NativeWidget_Call) Return(v uintptr) *MockNativeWidgetProvider_NativeWidget_Call {
4935- _c.Call.Return(v)
4936- return _c
4937-}
4938-
4939-func (_c *MockNativeWidgetProvider_NativeWidget_Call) RunAndReturn(run func() uintptr) *MockNativeWidgetProvider_NativeWidget_Call {
4940- _c.Call.Return(run)
4941- return _c
4942-}
4943-
4944-// NewMockFaviconService creates a new instance of MockFaviconService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
4945-// The first argument is typically a *testing.T value.
4946-func NewMockFaviconService(t interface {
4947- mock.TestingT
4948- Cleanup(func())
4949-}) *MockFaviconService {
4950- mock := &MockFaviconService{}
4951- mock.Mock.Test(t)
4952-
4953- t.Cleanup(func() { mock.AssertExpectations(t) })
4954-
4955- return mock
4956-}
4957-
4958-// MockFaviconService is an autogenerated mock type for the FaviconService type
4959-type MockFaviconService struct {
4960- mock.Mock
4961-}
4962-
4963-type MockFaviconService_Expecter struct {
4964- mock *mock.Mock
4965-}
4966-
4967-func (_m *MockFaviconService) EXPECT() *MockFaviconService_Expecter {
4968- return &MockFaviconService_Expecter{mock: &_m.Mock}
4969-}
4970-
4971-// Close provides a mock function for the type MockFaviconService
4972-func (_mock *MockFaviconService) Close() {
4973- _mock.Called()
4974- return
4975-}
4976-
4977-// MockFaviconService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
4978-type MockFaviconService_Close_Call struct {
4979- *mock.Call
4980-}
4981-
4982-// Close is a helper method to define mock.On call
4983-func (_e *MockFaviconService_Expecter) Close() *MockFaviconService_Close_Call {
4984- return &MockFaviconService_Close_Call{Call: _e.mock.On("Close")}
4985-}
4986-
4987-func (_c *MockFaviconService_Close_Call) Run(run func()) *MockFaviconService_Close_Call {
4988- _c.Call.Run(func(args mock.Arguments) {
4989- run()
4990- })
4991- return _c
4992-}
4993-
4994-func (_c *MockFaviconService_Close_Call) Return() *MockFaviconService_Close_Call {
4995- _c.Call.Return()
4996- return _c
4997-}
4998-
4999-func (_c *MockFaviconService_Close_Call) RunAndReturn(run func()) *MockFaviconService_Close_Call {
5000- _c.Run(run)
5001- return _c
5002-}
5003-
5004-// DiskPathPNG provides a mock function for the type MockFaviconService
5005-func (_mock *MockFaviconService) DiskPathPNG(domain string) string {
5006- ret := _mock.Called(domain)
5007-
5008- if len(ret) == 0 {
5009- panic("no return value specified for DiskPathPNG")
5010- }
5011-
5012- var r0 string
5013- if returnFunc, ok := ret.Get(0).(func(string) string); ok {
5014- r0 = returnFunc(domain)
5015- } else {
5016- r0 = ret.Get(0).(string)
5017- }
5018- return r0
5019-}
5020-
5021-// MockFaviconService_DiskPathPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNG'
5022-type MockFaviconService_DiskPathPNG_Call struct {
5023- *mock.Call
5024-}
5025-
5026-// DiskPathPNG is a helper method to define mock.On call
5027-// - domain string
5028-func (_e *MockFaviconService_Expecter) DiskPathPNG(domain interface{}) *MockFaviconService_DiskPathPNG_Call {
5029- return &MockFaviconService_DiskPathPNG_Call{Call: _e.mock.On("DiskPathPNG", domain)}
5030-}
5031-
5032-func (_c *MockFaviconService_DiskPathPNG_Call) Run(run func(domain string)) *MockFaviconService_DiskPathPNG_Call {
5033- _c.Call.Run(func(args mock.Arguments) {
5034- var arg0 string
5035- if args[0] != nil {
5036- arg0 = args[0].(string)
5037- }
5038- run(
5039- arg0,
5040- )
5041- })
5042- return _c
5043-}
5044-
5045-func (_c *MockFaviconService_DiskPathPNG_Call) Return(s string) *MockFaviconService_DiskPathPNG_Call {
5046- _c.Call.Return(s)
5047- return _c
5048-}
5049-
5050-func (_c *MockFaviconService_DiskPathPNG_Call) RunAndReturn(run func(domain string) string) *MockFaviconService_DiskPathPNG_Call {
5051- _c.Call.Return(run)
5052- return _c
5053-}
5054-
5055-// DiskPathPNGSized provides a mock function for the type MockFaviconService
5056-func (_mock *MockFaviconService) DiskPathPNGSized(domain string, size int) string {
5057- ret := _mock.Called(domain, size)
5058-
5059- if len(ret) == 0 {
5060- panic("no return value specified for DiskPathPNGSized")
5061- }
5062-
5063- var r0 string
5064- if returnFunc, ok := ret.Get(0).(func(string, int) string); ok {
5065- r0 = returnFunc(domain, size)
5066- } else {
5067- r0 = ret.Get(0).(string)
5068- }
5069- return r0
5070-}
5071-
5072-// MockFaviconService_DiskPathPNGSized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNGSized'
5073-type MockFaviconService_DiskPathPNGSized_Call struct {
5074- *mock.Call
5075-}
5076-
5077-// DiskPathPNGSized is a helper method to define mock.On call
5078-// - domain string
5079-// - size int
5080-func (_e *MockFaviconService_Expecter) DiskPathPNGSized(domain interface{}, size interface{}) *MockFaviconService_DiskPathPNGSized_Call {
5081- return &MockFaviconService_DiskPathPNGSized_Call{Call: _e.mock.On("DiskPathPNGSized", domain, size)}
5082-}
5083-
5084-func (_c *MockFaviconService_DiskPathPNGSized_Call) Run(run func(domain string, size int)) *MockFaviconService_DiskPathPNGSized_Call {
5085- _c.Call.Run(func(args mock.Arguments) {
5086- var arg0 string
5087- if args[0] != nil {
5088- arg0 = args[0].(string)
5089- }
5090- var arg1 int
5091- if args[1] != nil {
5092- arg1 = args[1].(int)
5093- }
5094- run(
5095- arg0,
5096- arg1,
5097- )
5098- })
5099- return _c
5100-}
5101-
5102-func (_c *MockFaviconService_DiskPathPNGSized_Call) Return(s string) *MockFaviconService_DiskPathPNGSized_Call {
5103- _c.Call.Return(s)
5104- return _c
5105-}
5106-
5107-func (_c *MockFaviconService_DiskPathPNGSized_Call) RunAndReturn(run func(domain string, size int) string) *MockFaviconService_DiskPathPNGSized_Call {
5108- _c.Call.Return(run)
5109- return _c
5110-}
5111-
5112-// EnsureCacheDir provides a mock function for the type MockFaviconService
5113-func (_mock *MockFaviconService) EnsureCacheDir() error {
5114- ret := _mock.Called()
5115-
5116- if len(ret) == 0 {
5117- panic("no return value specified for EnsureCacheDir")
5118- }
5119-
5120- var r0 error
5121- if returnFunc, ok := ret.Get(0).(func() error); ok {
5122- r0 = returnFunc()
5123- } else {
5124- r0 = ret.Error(0)
5125- }
5126- return r0
5127-}
5128-
5129-// MockFaviconService_EnsureCacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureCacheDir'
5130-type MockFaviconService_EnsureCacheDir_Call struct {
5131- *mock.Call
5132-}
5133-
5134-// EnsureCacheDir is a helper method to define mock.On call
5135-func (_e *MockFaviconService_Expecter) EnsureCacheDir() *MockFaviconService_EnsureCacheDir_Call {
5136- return &MockFaviconService_EnsureCacheDir_Call{Call: _e.mock.On("EnsureCacheDir")}
5137-}
5138-
5139-func (_c *MockFaviconService_EnsureCacheDir_Call) Run(run func()) *MockFaviconService_EnsureCacheDir_Call {
5140- _c.Call.Run(func(args mock.Arguments) {
5141- run()
5142- })
5143- return _c
5144-}
5145-
5146-func (_c *MockFaviconService_EnsureCacheDir_Call) Return(err error) *MockFaviconService_EnsureCacheDir_Call {
5147- _c.Call.Return(err)
5148- return _c
5149-}
5150-
5151-func (_c *MockFaviconService_EnsureCacheDir_Call) RunAndReturn(run func() error) *MockFaviconService_EnsureCacheDir_Call {
5152- _c.Call.Return(run)
5153- return _c
5154-}
5155-
5156-// EnsureDiskCache provides a mock function for the type MockFaviconService
5157-func (_mock *MockFaviconService) EnsureDiskCache(ctx context.Context, domain string) {
5158- _mock.Called(ctx, domain)
5159- return
5160-}
5161-
5162-// MockFaviconService_EnsureDiskCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureDiskCache'
5163-type MockFaviconService_EnsureDiskCache_Call struct {
5164- *mock.Call
5165-}
5166-
5167-// EnsureDiskCache is a helper method to define mock.On call
5168-// - ctx context.Context
5169-// - domain string
5170-func (_e *MockFaviconService_Expecter) EnsureDiskCache(ctx interface{}, domain interface{}) *MockFaviconService_EnsureDiskCache_Call {
5171- return &MockFaviconService_EnsureDiskCache_Call{Call: _e.mock.On("EnsureDiskCache", ctx, domain)}
5172-}
5173-
5174-func (_c *MockFaviconService_EnsureDiskCache_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call {
5175- _c.Call.Run(func(args mock.Arguments) {
5176- var arg0 context.Context
5177- if args[0] != nil {
5178- arg0 = args[0].(context.Context)
5179- }
5180- var arg1 string
5181- if args[1] != nil {
5182- arg1 = args[1].(string)
5183- }
5184- run(
5185- arg0,
5186- arg1,
5187- )
5188- })
5189- return _c
5190-}
5191-
5192-func (_c *MockFaviconService_EnsureDiskCache_Call) Return() *MockFaviconService_EnsureDiskCache_Call {
5193- _c.Call.Return()
5194- return _c
5195-}
5196-
5197-func (_c *MockFaviconService_EnsureDiskCache_Call) RunAndReturn(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call {
5198- _c.Run(run)
5199- return _c
5200-}
5201-
5202-// EnsureSizedPNG provides a mock function for the type MockFaviconService
5203-func (_mock *MockFaviconService) EnsureSizedPNG(ctx context.Context, domain string, size int) error {
5204- ret := _mock.Called(ctx, domain, size)
5205-
5206- if len(ret) == 0 {
5207- panic("no return value specified for EnsureSizedPNG")
5208- }
5209-
5210- var r0 error
5211- if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) error); ok {
5212- r0 = returnFunc(ctx, domain, size)
5213- } else {
5214- r0 = ret.Error(0)
5215- }
5216- return r0
5217-}
5218-
5219-// MockFaviconService_EnsureSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureSizedPNG'
5220-type MockFaviconService_EnsureSizedPNG_Call struct {
5221- *mock.Call
5222-}
5223-
5224-// EnsureSizedPNG is a helper method to define mock.On call
5225-// - ctx context.Context
5226-// - domain string
5227-// - size int
5228-func (_e *MockFaviconService_Expecter) EnsureSizedPNG(ctx interface{}, domain interface{}, size interface{}) *MockFaviconService_EnsureSizedPNG_Call {
5229- return &MockFaviconService_EnsureSizedPNG_Call{Call: _e.mock.On("EnsureSizedPNG", ctx, domain, size)}
5230-}
5231-
5232-func (_c *MockFaviconService_EnsureSizedPNG_Call) Run(run func(ctx context.Context, domain string, size int)) *MockFaviconService_EnsureSizedPNG_Call {
5233- _c.Call.Run(func(args mock.Arguments) {
5234- var arg0 context.Context
5235- if args[0] != nil {
5236- arg0 = args[0].(context.Context)
5237- }
5238- var arg1 string
5239- if args[1] != nil {
5240- arg1 = args[1].(string)
5241- }
5242- var arg2 int
5243- if args[2] != nil {
5244- arg2 = args[2].(int)
5245- }
5246- run(
5247- arg0,
5248- arg1,
5249- arg2,
5250- )
5251- })
5252- return _c
5253-}
5254-
5255-func (_c *MockFaviconService_EnsureSizedPNG_Call) Return(err error) *MockFaviconService_EnsureSizedPNG_Call {
5256- _c.Call.Return(err)
5257- return _c
5258-}
5259-
5260-func (_c *MockFaviconService_EnsureSizedPNG_Call) RunAndReturn(run func(ctx context.Context, domain string, size int) error) *MockFaviconService_EnsureSizedPNG_Call {
5261- _c.Call.Return(run)
5262- return _c
5263-}
5264-
5265-// Get provides a mock function for the type MockFaviconService
5266-func (_mock *MockFaviconService) Get(ctx context.Context, domain string) ([]byte, error) {
5267- ret := _mock.Called(ctx, domain)
5268-
5269- if len(ret) == 0 {
5270- panic("no return value specified for Get")
5271- }
5272-
5273- var r0 []byte
5274- var r1 error
5275- if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok {
5276- return returnFunc(ctx, domain)
5277- }
5278- if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
5279- r0 = returnFunc(ctx, domain)
5280- } else {
5281- if ret.Get(0) != nil {
5282- r0 = ret.Get(0).([]byte)
5283- }
5284- }
5285- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
5286- r1 = returnFunc(ctx, domain)
5287- } else {
5288- r1 = ret.Error(1)
5289- }
5290- return r0, r1
5291-}
5292-
5293-// MockFaviconService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
5294-type MockFaviconService_Get_Call struct {
5295- *mock.Call
5296-}
5297-
5298-// Get is a helper method to define mock.On call
5299-// - ctx context.Context
5300-// - domain string
5301-func (_e *MockFaviconService_Expecter) Get(ctx interface{}, domain interface{}) *MockFaviconService_Get_Call {
5302- return &MockFaviconService_Get_Call{Call: _e.mock.On("Get", ctx, domain)}
5303-}
5304-
5305-func (_c *MockFaviconService_Get_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_Get_Call {
5306- _c.Call.Run(func(args mock.Arguments) {
5307- var arg0 context.Context
5308- if args[0] != nil {
5309- arg0 = args[0].(context.Context)
5310- }
5311- var arg1 string
5312- if args[1] != nil {
5313- arg1 = args[1].(string)
5314- }
5315- run(
5316- arg0,
5317- arg1,
5318- )
5319- })
5320- return _c
5321-}
5322-
5323-func (_c *MockFaviconService_Get_Call) Return(bytes []byte, err error) *MockFaviconService_Get_Call {
5324- _c.Call.Return(bytes, err)
5325- return _c
5326-}
5327-
5328-func (_c *MockFaviconService_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, error)) *MockFaviconService_Get_Call {
5329- _c.Call.Return(run)
5330- return _c
5331-}
5332-
5333-// GetCached provides a mock function for the type MockFaviconService
5334-func (_mock *MockFaviconService) GetCached(ctx context.Context, domain string) ([]byte, bool) {
5335- ret := _mock.Called(ctx, domain)
5336-
5337- if len(ret) == 0 {
5338- panic("no return value specified for GetCached")
5339- }
5340-
5341- var r0 []byte
5342- var r1 bool
5343- if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, bool)); ok {
5344- return returnFunc(ctx, domain)
5345- }
5346- if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok {
5347- r0 = returnFunc(ctx, domain)
5348- } else {
5349- if ret.Get(0) != nil {
5350- r0 = ret.Get(0).([]byte)
5351- }
5352- }
5353- if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok {
5354- r1 = returnFunc(ctx, domain)
5355- } else {
5356- r1 = ret.Get(1).(bool)
5357- }
5358- return r0, r1
5359-}
5360-
5361-// MockFaviconService_GetCached_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCached'
5362-type MockFaviconService_GetCached_Call struct {
5363- *mock.Call
5364-}
5365-
5366-// GetCached is a helper method to define mock.On call
5367-// - ctx context.Context
5368-// - domain string
5369-func (_e *MockFaviconService_Expecter) GetCached(ctx interface{}, domain interface{}) *MockFaviconService_GetCached_Call {
5370- return &MockFaviconService_GetCached_Call{Call: _e.mock.On("GetCached", ctx, domain)}
5371-}
5372-
5373-func (_c *MockFaviconService_GetCached_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_GetCached_Call {
5374- _c.Call.Run(func(args mock.Arguments) {
5375- var arg0 context.Context
5376- if args[0] != nil {
5377- arg0 = args[0].(context.Context)
5378- }
5379- var arg1 string
5380- if args[1] != nil {
5381- arg1 = args[1].(string)
5382- }
5383- run(
5384- arg0,
5385- arg1,
5386- )
5387- })
5388- return _c
5389-}
5390-
5391-func (_c *MockFaviconService_GetCached_Call) Return(bytes []byte, b bool) *MockFaviconService_GetCached_Call {
5392- _c.Call.Return(bytes, b)
5393- return _c
5394-}
5395-
5396-func (_c *MockFaviconService_GetCached_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, bool)) *MockFaviconService_GetCached_Call {
5397- _c.Call.Return(run)
5398- return _c
5399-}
5400-
5401-// HasPNGOnDisk provides a mock function for the type MockFaviconService
5402-func (_mock *MockFaviconService) HasPNGOnDisk(domain string) bool {
5403- ret := _mock.Called(domain)
5404-
5405- if len(ret) == 0 {
5406- panic("no return value specified for HasPNGOnDisk")
5407- }
5408-
5409- var r0 bool
5410- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
5411- r0 = returnFunc(domain)
5412- } else {
5413- r0 = ret.Get(0).(bool)
5414- }
5415- return r0
5416-}
5417-
5418-// MockFaviconService_HasPNGOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGOnDisk'
5419-type MockFaviconService_HasPNGOnDisk_Call struct {
5420- *mock.Call
5421-}
5422-
5423-// HasPNGOnDisk is a helper method to define mock.On call
5424-// - domain string
5425-func (_e *MockFaviconService_Expecter) HasPNGOnDisk(domain interface{}) *MockFaviconService_HasPNGOnDisk_Call {
5426- return &MockFaviconService_HasPNGOnDisk_Call{Call: _e.mock.On("HasPNGOnDisk", domain)}
5427-}
5428-
5429-func (_c *MockFaviconService_HasPNGOnDisk_Call) Run(run func(domain string)) *MockFaviconService_HasPNGOnDisk_Call {
5430- _c.Call.Run(func(args mock.Arguments) {
5431- var arg0 string
5432- if args[0] != nil {
5433- arg0 = args[0].(string)
5434- }
5435- run(
5436- arg0,
5437- )
5438- })
5439- return _c
5440-}
5441-
5442-func (_c *MockFaviconService_HasPNGOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGOnDisk_Call {
5443- _c.Call.Return(b)
5444- return _c
5445-}
5446-
5447-func (_c *MockFaviconService_HasPNGOnDisk_Call) RunAndReturn(run func(domain string) bool) *MockFaviconService_HasPNGOnDisk_Call {
5448- _c.Call.Return(run)
5449- return _c
5450-}
5451-
5452-// HasPNGSizedOnDisk provides a mock function for the type MockFaviconService
5453-func (_mock *MockFaviconService) HasPNGSizedOnDisk(domain string, size int) bool {
5454- ret := _mock.Called(domain, size)
5455-
5456- if len(ret) == 0 {
5457- panic("no return value specified for HasPNGSizedOnDisk")
5458- }
5459-
5460- var r0 bool
5461- if returnFunc, ok := ret.Get(0).(func(string, int) bool); ok {
5462- r0 = returnFunc(domain, size)
5463- } else {
5464- r0 = ret.Get(0).(bool)
5465- }
5466- return r0
5467-}
5468-
5469-// MockFaviconService_HasPNGSizedOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGSizedOnDisk'
5470-type MockFaviconService_HasPNGSizedOnDisk_Call struct {
5471- *mock.Call
5472-}
5473-
5474-// HasPNGSizedOnDisk is a helper method to define mock.On call
5475-// - domain string
5476-// - size int
5477-func (_e *MockFaviconService_Expecter) HasPNGSizedOnDisk(domain interface{}, size interface{}) *MockFaviconService_HasPNGSizedOnDisk_Call {
5478- return &MockFaviconService_HasPNGSizedOnDisk_Call{Call: _e.mock.On("HasPNGSizedOnDisk", domain, size)}
5479-}
5480-
5481-func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Run(run func(domain string, size int)) *MockFaviconService_HasPNGSizedOnDisk_Call {
5482- _c.Call.Run(func(args mock.Arguments) {
5483- var arg0 string
5484- if args[0] != nil {
5485- arg0 = args[0].(string)
5486- }
5487- var arg1 int
5488- if args[1] != nil {
5489- arg1 = args[1].(int)
5490- }
5491- run(
5492- arg0,
5493- arg1,
5494- )
5495- })
5496- return _c
5497-}
5498-
5499-func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGSizedOnDisk_Call {
5500- _c.Call.Return(b)
5501- return _c
5502-}
5503-
5504-func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) RunAndReturn(run func(domain string, size int) bool) *MockFaviconService_HasPNGSizedOnDisk_Call {
5505- _c.Call.Return(run)
5506- return _c
5507-}
5508-
5509-// NewMockFileSystem creates a new instance of MockFileSystem. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
5510-// The first argument is typically a *testing.T value.
5511-func NewMockFileSystem(t interface {
5512- mock.TestingT
5513- Cleanup(func())
5514-}) *MockFileSystem {
5515- mock := &MockFileSystem{}
5516- mock.Mock.Test(t)
5517-
5518- t.Cleanup(func() { mock.AssertExpectations(t) })
5519-
5520- return mock
5521-}
5522-
5523-// MockFileSystem is an autogenerated mock type for the FileSystem type
5524-type MockFileSystem struct {
5525- mock.Mock
5526-}
5527-
5528-type MockFileSystem_Expecter struct {
5529- mock *mock.Mock
5530-}
5531-
5532-func (_m *MockFileSystem) EXPECT() *MockFileSystem_Expecter {
5533- return &MockFileSystem_Expecter{mock: &_m.Mock}
5534-}
5535-
5536-// Exists provides a mock function for the type MockFileSystem
5537-func (_mock *MockFileSystem) Exists(ctx context.Context, path string) (bool, error) {
5538- ret := _mock.Called(ctx, path)
5539-
5540- if len(ret) == 0 {
5541- panic("no return value specified for Exists")
5542- }
5543-
5544- var r0 bool
5545- var r1 error
5546- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
5547- return returnFunc(ctx, path)
5548- }
5549- if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
5550- r0 = returnFunc(ctx, path)
5551- } else {
5552- r0 = ret.Get(0).(bool)
5553- }
5554- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
5555- r1 = returnFunc(ctx, path)
5556- } else {
5557- r1 = ret.Error(1)
5558- }
5559- return r0, r1
5560-}
5561-
5562-// MockFileSystem_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists'
5563-type MockFileSystem_Exists_Call struct {
5564- *mock.Call
5565-}
5566-
5567-// Exists is a helper method to define mock.On call
5568-// - ctx context.Context
5569-// - path string
5570-func (_e *MockFileSystem_Expecter) Exists(ctx interface{}, path interface{}) *MockFileSystem_Exists_Call {
5571- return &MockFileSystem_Exists_Call{Call: _e.mock.On("Exists", ctx, path)}
5572-}
5573-
5574-func (_c *MockFileSystem_Exists_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_Exists_Call {
5575- _c.Call.Run(func(args mock.Arguments) {
5576- var arg0 context.Context
5577- if args[0] != nil {
5578- arg0 = args[0].(context.Context)
5579- }
5580- var arg1 string
5581- if args[1] != nil {
5582- arg1 = args[1].(string)
5583- }
5584- run(
5585- arg0,
5586- arg1,
5587- )
5588- })
5589- return _c
5590-}
5591-
5592-func (_c *MockFileSystem_Exists_Call) Return(b bool, err error) *MockFileSystem_Exists_Call {
5593- _c.Call.Return(b, err)
5594- return _c
5595-}
5596-
5597-func (_c *MockFileSystem_Exists_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_Exists_Call {
5598- _c.Call.Return(run)
5599- return _c
5600-}
5601-
5602-// GetSize provides a mock function for the type MockFileSystem
5603-func (_mock *MockFileSystem) GetSize(ctx context.Context, path string) (int64, error) {
5604- ret := _mock.Called(ctx, path)
5605-
5606- if len(ret) == 0 {
5607- panic("no return value specified for GetSize")
5608- }
5609-
5610- var r0 int64
5611- var r1 error
5612- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok {
5613- return returnFunc(ctx, path)
5614- }
5615- if returnFunc, ok := ret.Get(0).(func(context.Context, string) int64); ok {
5616- r0 = returnFunc(ctx, path)
5617- } else {
5618- r0 = ret.Get(0).(int64)
5619- }
5620- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
5621- r1 = returnFunc(ctx, path)
5622- } else {
5623- r1 = ret.Error(1)
5624- }
5625- return r0, r1
5626-}
5627-
5628-// MockFileSystem_GetSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSize'
5629-type MockFileSystem_GetSize_Call struct {
5630- *mock.Call
5631-}
5632-
5633-// GetSize is a helper method to define mock.On call
5634-// - ctx context.Context
5635-// - path string
5636-func (_e *MockFileSystem_Expecter) GetSize(ctx interface{}, path interface{}) *MockFileSystem_GetSize_Call {
5637- return &MockFileSystem_GetSize_Call{Call: _e.mock.On("GetSize", ctx, path)}
5638-}
5639-
5640-func (_c *MockFileSystem_GetSize_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_GetSize_Call {
5641- _c.Call.Run(func(args mock.Arguments) {
5642- var arg0 context.Context
5643- if args[0] != nil {
5644- arg0 = args[0].(context.Context)
5645- }
5646- var arg1 string
5647- if args[1] != nil {
5648- arg1 = args[1].(string)
5649- }
5650- run(
5651- arg0,
5652- arg1,
5653- )
5654- })
5655- return _c
5656-}
5657-
5658-func (_c *MockFileSystem_GetSize_Call) Return(n int64, err error) *MockFileSystem_GetSize_Call {
5659- _c.Call.Return(n, err)
5660- return _c
5661-}
5662-
5663-func (_c *MockFileSystem_GetSize_Call) RunAndReturn(run func(ctx context.Context, path string) (int64, error)) *MockFileSystem_GetSize_Call {
5664- _c.Call.Return(run)
5665- return _c
5666-}
5667-
5668-// IsDirectory provides a mock function for the type MockFileSystem
5669-func (_mock *MockFileSystem) IsDirectory(ctx context.Context, path string) (bool, error) {
5670- ret := _mock.Called(ctx, path)
5671-
5672- if len(ret) == 0 {
5673- panic("no return value specified for IsDirectory")
5674- }
5675-
5676- var r0 bool
5677- var r1 error
5678- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
5679- return returnFunc(ctx, path)
5680- }
5681- if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
5682- r0 = returnFunc(ctx, path)
5683- } else {
5684- r0 = ret.Get(0).(bool)
5685- }
5686- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
5687- r1 = returnFunc(ctx, path)
5688- } else {
5689- r1 = ret.Error(1)
5690- }
5691- return r0, r1
5692-}
5693-
5694-// MockFileSystem_IsDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDirectory'
5695-type MockFileSystem_IsDirectory_Call struct {
5696- *mock.Call
5697-}
5698-
5699-// IsDirectory is a helper method to define mock.On call
5700-// - ctx context.Context
5701-// - path string
5702-func (_e *MockFileSystem_Expecter) IsDirectory(ctx interface{}, path interface{}) *MockFileSystem_IsDirectory_Call {
5703- return &MockFileSystem_IsDirectory_Call{Call: _e.mock.On("IsDirectory", ctx, path)}
5704-}
5705-
5706-func (_c *MockFileSystem_IsDirectory_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_IsDirectory_Call {
5707- _c.Call.Run(func(args mock.Arguments) {
5708- var arg0 context.Context
5709- if args[0] != nil {
5710- arg0 = args[0].(context.Context)
5711- }
5712- var arg1 string
5713- if args[1] != nil {
5714- arg1 = args[1].(string)
5715- }
5716- run(
5717- arg0,
5718- arg1,
5719- )
5720- })
5721- return _c
5722-}
5723-
5724-func (_c *MockFileSystem_IsDirectory_Call) Return(b bool, err error) *MockFileSystem_IsDirectory_Call {
5725- _c.Call.Return(b, err)
5726- return _c
5727-}
5728-
5729-func (_c *MockFileSystem_IsDirectory_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_IsDirectory_Call {
5730- _c.Call.Return(run)
5731- return _c
5732-}
5733-
5734-// RemoveAll provides a mock function for the type MockFileSystem
5735-func (_mock *MockFileSystem) RemoveAll(ctx context.Context, path string) error {
5736- ret := _mock.Called(ctx, path)
5737-
5738- if len(ret) == 0 {
5739- panic("no return value specified for RemoveAll")
5740- }
5741-
5742- var r0 error
5743- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
5744- r0 = returnFunc(ctx, path)
5745- } else {
5746- r0 = ret.Error(0)
5747- }
5748- return r0
5749-}
5750-
5751-// MockFileSystem_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll'
5752-type MockFileSystem_RemoveAll_Call struct {
5753- *mock.Call
5754-}
5755-
5756-// RemoveAll is a helper method to define mock.On call
5757-// - ctx context.Context
5758-// - path string
5759-func (_e *MockFileSystem_Expecter) RemoveAll(ctx interface{}, path interface{}) *MockFileSystem_RemoveAll_Call {
5760- return &MockFileSystem_RemoveAll_Call{Call: _e.mock.On("RemoveAll", ctx, path)}
5761-}
5762-
5763-func (_c *MockFileSystem_RemoveAll_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_RemoveAll_Call {
5764- _c.Call.Run(func(args mock.Arguments) {
5765- var arg0 context.Context
5766- if args[0] != nil {
5767- arg0 = args[0].(context.Context)
5768- }
5769- var arg1 string
5770- if args[1] != nil {
5771- arg1 = args[1].(string)
5772- }
5773- run(
5774- arg0,
5775- arg1,
5776- )
5777- })
5778- return _c
5779-}
5780-
5781-func (_c *MockFileSystem_RemoveAll_Call) Return(err error) *MockFileSystem_RemoveAll_Call {
5782- _c.Call.Return(err)
5783- return _c
5784-}
5785-
5786-func (_c *MockFileSystem_RemoveAll_Call) RunAndReturn(run func(ctx context.Context, path string) error) *MockFileSystem_RemoveAll_Call {
5787- _c.Call.Return(run)
5788- return _c
5789-}
5790-
5791-// NewMockFilterManager creates a new instance of MockFilterManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
5792-// The first argument is typically a *testing.T value.
5793-func NewMockFilterManager(t interface {
5794- mock.TestingT
5795- Cleanup(func())
5796-}) *MockFilterManager {
5797- mock := &MockFilterManager{}
5798- mock.Mock.Test(t)
5799-
5800- t.Cleanup(func() { mock.AssertExpectations(t) })
5801-
5802- return mock
5803-}
5804-
5805-// MockFilterManager is an autogenerated mock type for the FilterManager type
5806-type MockFilterManager struct {
5807- mock.Mock
5808-}
5809-
5810-type MockFilterManager_Expecter struct {
5811- mock *mock.Mock
5812-}
5813-
5814-func (_m *MockFilterManager) EXPECT() *MockFilterManager_Expecter {
5815- return &MockFilterManager_Expecter{mock: &_m.Mock}
5816-}
5817-
5818-// LoadAsync provides a mock function for the type MockFilterManager
5819-func (_mock *MockFilterManager) LoadAsync(ctx context.Context) {
5820- _mock.Called(ctx)
5821- return
5822-}
5823-
5824-// MockFilterManager_LoadAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadAsync'
5825-type MockFilterManager_LoadAsync_Call struct {
5826- *mock.Call
5827-}
5828-
5829-// LoadAsync is a helper method to define mock.On call
5830-// - ctx context.Context
5831-func (_e *MockFilterManager_Expecter) LoadAsync(ctx interface{}) *MockFilterManager_LoadAsync_Call {
5832- return &MockFilterManager_LoadAsync_Call{Call: _e.mock.On("LoadAsync", ctx)}
5833-}
5834-
5835-func (_c *MockFilterManager_LoadAsync_Call) Run(run func(ctx context.Context)) *MockFilterManager_LoadAsync_Call {
5836- _c.Call.Run(func(args mock.Arguments) {
5837- var arg0 context.Context
5838- if args[0] != nil {
5839- arg0 = args[0].(context.Context)
5840- }
5841- run(
5842- arg0,
5843- )
5844- })
5845- return _c
5846-}
5847-
5848-func (_c *MockFilterManager_LoadAsync_Call) Return() *MockFilterManager_LoadAsync_Call {
5849- _c.Call.Return()
5850- return _c
5851-}
5852-
5853-func (_c *MockFilterManager_LoadAsync_Call) RunAndReturn(run func(ctx context.Context)) *MockFilterManager_LoadAsync_Call {
5854- _c.Run(run)
5855- return _c
5856-}
5857-
5858-// SetStatusCallback provides a mock function for the type MockFilterManager
5859-func (_mock *MockFilterManager) SetStatusCallback(fn func(port.FilterStatus)) {
5860- _mock.Called(fn)
5861- return
5862-}
5863-
5864-// MockFilterManager_SetStatusCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStatusCallback'
5865-type MockFilterManager_SetStatusCallback_Call struct {
5866- *mock.Call
5867-}
5868-
5869-// SetStatusCallback is a helper method to define mock.On call
5870-// - fn func(port.FilterStatus)
5871-func (_e *MockFilterManager_Expecter) SetStatusCallback(fn interface{}) *MockFilterManager_SetStatusCallback_Call {
5872- return &MockFilterManager_SetStatusCallback_Call{Call: _e.mock.On("SetStatusCallback", fn)}
5873-}
5874-
5875-func (_c *MockFilterManager_SetStatusCallback_Call) Run(run func(fn func(port.FilterStatus))) *MockFilterManager_SetStatusCallback_Call {
5876- _c.Call.Run(func(args mock.Arguments) {
5877- var arg0 func(port.FilterStatus)
5878- if args[0] != nil {
5879- arg0 = args[0].(func(port.FilterStatus))
5880- }
5881- run(
5882- arg0,
5883- )
5884- })
5885- return _c
5886-}
5887-
5888-func (_c *MockFilterManager_SetStatusCallback_Call) Return() *MockFilterManager_SetStatusCallback_Call {
5889- _c.Call.Return()
5890- return _c
5891-}
5892-
5893-func (_c *MockFilterManager_SetStatusCallback_Call) RunAndReturn(run func(fn func(port.FilterStatus))) *MockFilterManager_SetStatusCallback_Call {
5894- _c.Run(run)
5895- return _c
5896-}
5897-
5898-// NewMockFontDetector creates a new instance of MockFontDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
5899-// The first argument is typically a *testing.T value.
5900-func NewMockFontDetector(t interface {
5901- mock.TestingT
5902- Cleanup(func())
5903-}) *MockFontDetector {
5904- mock := &MockFontDetector{}
5905- mock.Mock.Test(t)
5906-
5907- t.Cleanup(func() { mock.AssertExpectations(t) })
5908-
5909- return mock
5910-}
5911-
5912-// MockFontDetector is an autogenerated mock type for the FontDetector type
5913-type MockFontDetector struct {
5914- mock.Mock
5915-}
5916-
5917-type MockFontDetector_Expecter struct {
5918- mock *mock.Mock
5919-}
5920-
5921-func (_m *MockFontDetector) EXPECT() *MockFontDetector_Expecter {
5922- return &MockFontDetector_Expecter{mock: &_m.Mock}
5923-}
5924-
5925-// GetAvailableFonts provides a mock function for the type MockFontDetector
5926-func (_mock *MockFontDetector) GetAvailableFonts(ctx context.Context) ([]string, error) {
5927- ret := _mock.Called(ctx)
5928-
5929- if len(ret) == 0 {
5930- panic("no return value specified for GetAvailableFonts")
5931- }
5932-
5933- var r0 []string
5934- var r1 error
5935- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
5936- return returnFunc(ctx)
5937- }
5938- if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
5939- r0 = returnFunc(ctx)
5940- } else {
5941- if ret.Get(0) != nil {
5942- r0 = ret.Get(0).([]string)
5943- }
5944- }
5945- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
5946- r1 = returnFunc(ctx)
5947- } else {
5948- r1 = ret.Error(1)
5949- }
5950- return r0, r1
5951-}
5952-
5953-// MockFontDetector_GetAvailableFonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAvailableFonts'
5954-type MockFontDetector_GetAvailableFonts_Call struct {
5955- *mock.Call
5956-}
5957-
5958-// GetAvailableFonts is a helper method to define mock.On call
5959-// - ctx context.Context
5960-func (_e *MockFontDetector_Expecter) GetAvailableFonts(ctx interface{}) *MockFontDetector_GetAvailableFonts_Call {
5961- return &MockFontDetector_GetAvailableFonts_Call{Call: _e.mock.On("GetAvailableFonts", ctx)}
5962-}
5963-
5964-func (_c *MockFontDetector_GetAvailableFonts_Call) Run(run func(ctx context.Context)) *MockFontDetector_GetAvailableFonts_Call {
5965- _c.Call.Run(func(args mock.Arguments) {
5966- var arg0 context.Context
5967- if args[0] != nil {
5968- arg0 = args[0].(context.Context)
5969- }
5970- run(
5971- arg0,
5972- )
5973- })
5974- return _c
5975-}
5976-
5977-func (_c *MockFontDetector_GetAvailableFonts_Call) Return(strings []string, err error) *MockFontDetector_GetAvailableFonts_Call {
5978- _c.Call.Return(strings, err)
5979- return _c
5980-}
5981-
5982-func (_c *MockFontDetector_GetAvailableFonts_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockFontDetector_GetAvailableFonts_Call {
5983- _c.Call.Return(run)
5984- return _c
5985-}
5986-
5987-// IsAvailable provides a mock function for the type MockFontDetector
5988-func (_mock *MockFontDetector) IsAvailable(ctx context.Context) bool {
5989- ret := _mock.Called(ctx)
5990-
5991- if len(ret) == 0 {
5992- panic("no return value specified for IsAvailable")
5993- }
5994-
5995- var r0 bool
5996- if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
5997- r0 = returnFunc(ctx)
5998- } else {
5999- r0 = ret.Get(0).(bool)
6000- }
6001- return r0
6002-}
6003-
6004-// MockFontDetector_IsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAvailable'
6005-type MockFontDetector_IsAvailable_Call struct {
6006- *mock.Call
6007-}
6008-
6009-// IsAvailable is a helper method to define mock.On call
6010-// - ctx context.Context
6011-func (_e *MockFontDetector_Expecter) IsAvailable(ctx interface{}) *MockFontDetector_IsAvailable_Call {
6012- return &MockFontDetector_IsAvailable_Call{Call: _e.mock.On("IsAvailable", ctx)}
6013-}
6014-
6015-func (_c *MockFontDetector_IsAvailable_Call) Run(run func(ctx context.Context)) *MockFontDetector_IsAvailable_Call {
6016- _c.Call.Run(func(args mock.Arguments) {
6017- var arg0 context.Context
6018- if args[0] != nil {
6019- arg0 = args[0].(context.Context)
6020- }
6021- run(
6022- arg0,
6023- )
6024- })
6025- return _c
6026-}
6027-
6028-func (_c *MockFontDetector_IsAvailable_Call) Return(b bool) *MockFontDetector_IsAvailable_Call {
6029- _c.Call.Return(b)
6030- return _c
6031-}
6032-
6033-func (_c *MockFontDetector_IsAvailable_Call) RunAndReturn(run func(ctx context.Context) bool) *MockFontDetector_IsAvailable_Call {
6034- _c.Call.Return(run)
6035- return _c
6036-}
6037-
6038-// SelectBestFont provides a mock function for the type MockFontDetector
6039-func (_mock *MockFontDetector) SelectBestFont(ctx context.Context, category port.FontCategory, fallbackChain []string) string {
6040- ret := _mock.Called(ctx, category, fallbackChain)
6041-
6042- if len(ret) == 0 {
6043- panic("no return value specified for SelectBestFont")
6044- }
6045-
6046- var r0 string
6047- if returnFunc, ok := ret.Get(0).(func(context.Context, port.FontCategory, []string) string); ok {
6048- r0 = returnFunc(ctx, category, fallbackChain)
6049- } else {
6050- r0 = ret.Get(0).(string)
6051- }
6052- return r0
6053-}
6054-
6055-// MockFontDetector_SelectBestFont_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectBestFont'
6056-type MockFontDetector_SelectBestFont_Call struct {
6057- *mock.Call
6058-}
6059-
6060-// SelectBestFont is a helper method to define mock.On call
6061-// - ctx context.Context
6062-// - category port.FontCategory
6063-// - fallbackChain []string
6064-func (_e *MockFontDetector_Expecter) SelectBestFont(ctx interface{}, category interface{}, fallbackChain interface{}) *MockFontDetector_SelectBestFont_Call {
6065- return &MockFontDetector_SelectBestFont_Call{Call: _e.mock.On("SelectBestFont", ctx, category, fallbackChain)}
6066-}
6067-
6068-func (_c *MockFontDetector_SelectBestFont_Call) Run(run func(ctx context.Context, category port.FontCategory, fallbackChain []string)) *MockFontDetector_SelectBestFont_Call {
6069- _c.Call.Run(func(args mock.Arguments) {
6070- var arg0 context.Context
6071- if args[0] != nil {
6072- arg0 = args[0].(context.Context)
6073- }
6074- var arg1 port.FontCategory
6075- if args[1] != nil {
6076- arg1 = args[1].(port.FontCategory)
6077- }
6078- var arg2 []string
6079- if args[2] != nil {
6080- arg2 = args[2].([]string)
6081- }
6082- run(
6083- arg0,
6084- arg1,
6085- arg2,
6086- )
6087- })
6088- return _c
6089-}
6090-
6091-func (_c *MockFontDetector_SelectBestFont_Call) Return(s string) *MockFontDetector_SelectBestFont_Call {
6092- _c.Call.Return(s)
6093- return _c
6094-}
6095-
6096-func (_c *MockFontDetector_SelectBestFont_Call) RunAndReturn(run func(ctx context.Context, category port.FontCategory, fallbackChain []string) string) *MockFontDetector_SelectBestFont_Call {
6097- _c.Call.Return(run)
6098- return _c
6099-}
6100-
6101-// NewMockAccentKeyHandler creates a new instance of MockAccentKeyHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
6102-// The first argument is typically a *testing.T value.
6103-func NewMockAccentKeyHandler(t interface {
6104- mock.TestingT
6105- Cleanup(func())
6106-}) *MockAccentKeyHandler {
6107- mock := &MockAccentKeyHandler{}
6108- mock.Mock.Test(t)
6109-
6110- t.Cleanup(func() { mock.AssertExpectations(t) })
6111-
6112- return mock
6113-}
6114-
6115-// MockAccentKeyHandler is an autogenerated mock type for the AccentKeyHandler type
6116-type MockAccentKeyHandler struct {
6117- mock.Mock
6118-}
6119-
6120-type MockAccentKeyHandler_Expecter struct {
6121- mock *mock.Mock
6122-}
6123-
6124-func (_m *MockAccentKeyHandler) EXPECT() *MockAccentKeyHandler_Expecter {
6125- return &MockAccentKeyHandler_Expecter{mock: &_m.Mock}
6126-}
6127-
6128-// OnKeyPressed provides a mock function for the type MockAccentKeyHandler
6129-func (_mock *MockAccentKeyHandler) OnKeyPressed(ctx context.Context, char rune, shiftHeld bool) bool {
6130- ret := _mock.Called(ctx, char, shiftHeld)
6131-
6132- if len(ret) == 0 {
6133- panic("no return value specified for OnKeyPressed")
6134- }
6135-
6136- var r0 bool
6137- if returnFunc, ok := ret.Get(0).(func(context.Context, rune, bool) bool); ok {
6138- r0 = returnFunc(ctx, char, shiftHeld)
6139- } else {
6140- r0 = ret.Get(0).(bool)
6141- }
6142- return r0
6143-}
6144-
6145-// MockAccentKeyHandler_OnKeyPressed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnKeyPressed'
6146-type MockAccentKeyHandler_OnKeyPressed_Call struct {
6147- *mock.Call
6148-}
6149-
6150-// OnKeyPressed is a helper method to define mock.On call
6151-// - ctx context.Context
6152-// - char rune
6153-// - shiftHeld bool
6154-func (_e *MockAccentKeyHandler_Expecter) OnKeyPressed(ctx interface{}, char interface{}, shiftHeld interface{}) *MockAccentKeyHandler_OnKeyPressed_Call {
6155- return &MockAccentKeyHandler_OnKeyPressed_Call{Call: _e.mock.On("OnKeyPressed", ctx, char, shiftHeld)}
6156-}
6157-
6158-func (_c *MockAccentKeyHandler_OnKeyPressed_Call) Run(run func(ctx context.Context, char rune, shiftHeld bool)) *MockAccentKeyHandler_OnKeyPressed_Call {
6159- _c.Call.Run(func(args mock.Arguments) {
6160- var arg0 context.Context
6161- if args[0] != nil {
6162- arg0 = args[0].(context.Context)
6163- }
6164- var arg1 rune
6165- if args[1] != nil {
6166- arg1 = args[1].(rune)
6167- }
6168- var arg2 bool
6169- if args[2] != nil {
6170- arg2 = args[2].(bool)
6171- }
6172- run(
6173- arg0,
6174- arg1,
6175- arg2,
6176- )
6177- })
6178- return _c
6179-}
6180-
6181-func (_c *MockAccentKeyHandler_OnKeyPressed_Call) Return(b bool) *MockAccentKeyHandler_OnKeyPressed_Call {
6182- _c.Call.Return(b)
6183- return _c
6184-}
6185-
6186-func (_c *MockAccentKeyHandler_OnKeyPressed_Call) RunAndReturn(run func(ctx context.Context, char rune, shiftHeld bool) bool) *MockAccentKeyHandler_OnKeyPressed_Call {
6187- _c.Call.Return(run)
6188- return _c
6189-}
6190-
6191-// OnKeyReleased provides a mock function for the type MockAccentKeyHandler
6192-func (_mock *MockAccentKeyHandler) OnKeyReleased(ctx context.Context, char rune) {
6193- _mock.Called(ctx, char)
6194- return
6195-}
6196-
6197-// MockAccentKeyHandler_OnKeyReleased_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnKeyReleased'
6198-type MockAccentKeyHandler_OnKeyReleased_Call struct {
6199- *mock.Call
6200-}
6201-
6202-// OnKeyReleased is a helper method to define mock.On call
6203-// - ctx context.Context
6204-// - char rune
6205-func (_e *MockAccentKeyHandler_Expecter) OnKeyReleased(ctx interface{}, char interface{}) *MockAccentKeyHandler_OnKeyReleased_Call {
6206- return &MockAccentKeyHandler_OnKeyReleased_Call{Call: _e.mock.On("OnKeyReleased", ctx, char)}
6207-}
6208-
6209-func (_c *MockAccentKeyHandler_OnKeyReleased_Call) Run(run func(ctx context.Context, char rune)) *MockAccentKeyHandler_OnKeyReleased_Call {
6210- _c.Call.Run(func(args mock.Arguments) {
6211- var arg0 context.Context
6212- if args[0] != nil {
6213- arg0 = args[0].(context.Context)
6214- }
6215- var arg1 rune
6216- if args[1] != nil {
6217- arg1 = args[1].(rune)
6218- }
6219- run(
6220- arg0,
6221- arg1,
6222- )
6223- })
6224- return _c
6225-}
6226-
6227-func (_c *MockAccentKeyHandler_OnKeyReleased_Call) Return() *MockAccentKeyHandler_OnKeyReleased_Call {
6228- _c.Call.Return()
6229- return _c
6230-}
6231-
6232-func (_c *MockAccentKeyHandler_OnKeyReleased_Call) RunAndReturn(run func(ctx context.Context, char rune)) *MockAccentKeyHandler_OnKeyReleased_Call {
6233- _c.Run(run)
6234- return _c
6235-}
6236-
6237-// NewMockDownloadPreparer creates a new instance of MockDownloadPreparer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
6238-// The first argument is typically a *testing.T value.
6239-func NewMockDownloadPreparer(t interface {
6240- mock.TestingT
6241- Cleanup(func())
6242-}) *MockDownloadPreparer {
6243- mock := &MockDownloadPreparer{}
6244- mock.Mock.Test(t)
6245-
6246- t.Cleanup(func() { mock.AssertExpectations(t) })
6247-
6248- return mock
6249-}
6250-
6251-// MockDownloadPreparer is an autogenerated mock type for the DownloadPreparer type
6252-type MockDownloadPreparer struct {
6253- mock.Mock
6254-}
6255-
6256-type MockDownloadPreparer_Expecter struct {
6257- mock *mock.Mock
6258-}
6259-
6260-func (_m *MockDownloadPreparer) EXPECT() *MockDownloadPreparer_Expecter {
6261- return &MockDownloadPreparer_Expecter{mock: &_m.Mock}
6262-}
6263-
6264-// Execute provides a mock function for the type MockDownloadPreparer
6265-func (_mock *MockDownloadPreparer) Execute(ctx context.Context, input port.DownloadPrepareInput) *port.DownloadPrepareOutput {
6266- ret := _mock.Called(ctx, input)
6267-
6268- if len(ret) == 0 {
6269- panic("no return value specified for Execute")
6270- }
6271-
6272- var r0 *port.DownloadPrepareOutput
6273- if returnFunc, ok := ret.Get(0).(func(context.Context, port.DownloadPrepareInput) *port.DownloadPrepareOutput); ok {
6274- r0 = returnFunc(ctx, input)
6275- } else {
6276- if ret.Get(0) != nil {
6277- r0 = ret.Get(0).(*port.DownloadPrepareOutput)
6278- }
6279- }
6280- return r0
6281-}
6282-
6283-// MockDownloadPreparer_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
6284-type MockDownloadPreparer_Execute_Call struct {
6285- *mock.Call
6286-}
6287-
6288-// Execute is a helper method to define mock.On call
6289-// - ctx context.Context
6290-// - input port.DownloadPrepareInput
6291-func (_e *MockDownloadPreparer_Expecter) Execute(ctx interface{}, input interface{}) *MockDownloadPreparer_Execute_Call {
6292- return &MockDownloadPreparer_Execute_Call{Call: _e.mock.On("Execute", ctx, input)}
6293-}
6294-
6295-func (_c *MockDownloadPreparer_Execute_Call) Run(run func(ctx context.Context, input port.DownloadPrepareInput)) *MockDownloadPreparer_Execute_Call {
6296- _c.Call.Run(func(args mock.Arguments) {
6297- var arg0 context.Context
6298- if args[0] != nil {
6299- arg0 = args[0].(context.Context)
6300- }
6301- var arg1 port.DownloadPrepareInput
6302- if args[1] != nil {
6303- arg1 = args[1].(port.DownloadPrepareInput)
6304- }
6305- run(
6306- arg0,
6307- arg1,
6308- )
6309- })
6310- return _c
6311-}
6312-
6313-func (_c *MockDownloadPreparer_Execute_Call) Return(downloadPrepareOutput *port.DownloadPrepareOutput) *MockDownloadPreparer_Execute_Call {
6314- _c.Call.Return(downloadPrepareOutput)
6315- return _c
6316-}
6317-
6318-func (_c *MockDownloadPreparer_Execute_Call) RunAndReturn(run func(ctx context.Context, input port.DownloadPrepareInput) *port.DownloadPrepareOutput) *MockDownloadPreparer_Execute_Call {
6319- _c.Call.Return(run)
6320- return _c
6321-}
6322-
6323-// NewMockAutoCopyConfig creates a new instance of MockAutoCopyConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
6324-// The first argument is typically a *testing.T value.
6325-func NewMockAutoCopyConfig(t interface {
6326- mock.TestingT
6327- Cleanup(func())
6328-}) *MockAutoCopyConfig {
6329- mock := &MockAutoCopyConfig{}
6330- mock.Mock.Test(t)
6331-
6332- t.Cleanup(func() { mock.AssertExpectations(t) })
6333-
6334- return mock
6335-}
6336-
6337-// MockAutoCopyConfig is an autogenerated mock type for the AutoCopyConfig type
6338-type MockAutoCopyConfig struct {
6339- mock.Mock
6340-}
6341-
6342-type MockAutoCopyConfig_Expecter struct {
6343- mock *mock.Mock
6344-}
6345-
6346-func (_m *MockAutoCopyConfig) EXPECT() *MockAutoCopyConfig_Expecter {
6347- return &MockAutoCopyConfig_Expecter{mock: &_m.Mock}
6348-}
6349-
6350-// IsAutoCopyEnabled provides a mock function for the type MockAutoCopyConfig
6351-func (_mock *MockAutoCopyConfig) IsAutoCopyEnabled() bool {
6352- ret := _mock.Called()
6353-
6354- if len(ret) == 0 {
6355- panic("no return value specified for IsAutoCopyEnabled")
6356- }
6357-
6358- var r0 bool
6359- if returnFunc, ok := ret.Get(0).(func() bool); ok {
6360- r0 = returnFunc()
6361- } else {
6362- r0 = ret.Get(0).(bool)
6363- }
6364- return r0
6365-}
6366-
6367-// MockAutoCopyConfig_IsAutoCopyEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAutoCopyEnabled'
6368-type MockAutoCopyConfig_IsAutoCopyEnabled_Call struct {
6369- *mock.Call
6370-}
6371-
6372-// IsAutoCopyEnabled is a helper method to define mock.On call
6373-func (_e *MockAutoCopyConfig_Expecter) IsAutoCopyEnabled() *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
6374- return &MockAutoCopyConfig_IsAutoCopyEnabled_Call{Call: _e.mock.On("IsAutoCopyEnabled")}
6375-}
6376-
6377-func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) Run(run func()) *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
6378- _c.Call.Run(func(args mock.Arguments) {
6379- run()
6380- })
6381- return _c
6382-}
6383-
6384-func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) Return(b bool) *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
6385- _c.Call.Return(b)
6386- return _c
6387-}
6388-
6389-func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) RunAndReturn(run func() bool) *MockAutoCopyConfig_IsAutoCopyEnabled_Call {
6390- _c.Call.Return(run)
6391- return _c
6392-}
6393-
6394-// NewMockHardwareSurveyor creates a new instance of MockHardwareSurveyor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
6395-// The first argument is typically a *testing.T value.
6396-func NewMockHardwareSurveyor(t interface {
6397- mock.TestingT
6398- Cleanup(func())
6399-}) *MockHardwareSurveyor {
6400- mock := &MockHardwareSurveyor{}
6401- mock.Mock.Test(t)
6402-
6403- t.Cleanup(func() { mock.AssertExpectations(t) })
6404-
6405- return mock
6406-}
6407-
6408-// MockHardwareSurveyor is an autogenerated mock type for the HardwareSurveyor type
6409-type MockHardwareSurveyor struct {
6410- mock.Mock
6411-}
6412-
6413-type MockHardwareSurveyor_Expecter struct {
6414- mock *mock.Mock
6415-}
6416-
6417-func (_m *MockHardwareSurveyor) EXPECT() *MockHardwareSurveyor_Expecter {
6418- return &MockHardwareSurveyor_Expecter{mock: &_m.Mock}
6419-}
6420-
6421-// Survey provides a mock function for the type MockHardwareSurveyor
6422-func (_mock *MockHardwareSurveyor) Survey(ctx context.Context) port.HardwareInfo {
6423- ret := _mock.Called(ctx)
6424-
6425- if len(ret) == 0 {
6426- panic("no return value specified for Survey")
6427- }
6428-
6429- var r0 port.HardwareInfo
6430- if returnFunc, ok := ret.Get(0).(func(context.Context) port.HardwareInfo); ok {
6431- r0 = returnFunc(ctx)
6432- } else {
6433- r0 = ret.Get(0).(port.HardwareInfo)
6434- }
6435- return r0
6436-}
6437-
6438-// MockHardwareSurveyor_Survey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Survey'
6439-type MockHardwareSurveyor_Survey_Call struct {
6440- *mock.Call
6441-}
6442-
6443-// Survey is a helper method to define mock.On call
6444-// - ctx context.Context
6445-func (_e *MockHardwareSurveyor_Expecter) Survey(ctx interface{}) *MockHardwareSurveyor_Survey_Call {
6446- return &MockHardwareSurveyor_Survey_Call{Call: _e.mock.On("Survey", ctx)}
6447-}
6448-
6449-func (_c *MockHardwareSurveyor_Survey_Call) Run(run func(ctx context.Context)) *MockHardwareSurveyor_Survey_Call {
6450- _c.Call.Run(func(args mock.Arguments) {
6451- var arg0 context.Context
6452- if args[0] != nil {
6453- arg0 = args[0].(context.Context)
6454- }
6455- run(
6456- arg0,
6457- )
6458- })
6459- return _c
6460-}
6461-
6462-func (_c *MockHardwareSurveyor_Survey_Call) Return(hardwareInfo port.HardwareInfo) *MockHardwareSurveyor_Survey_Call {
6463- _c.Call.Return(hardwareInfo)
6464- return _c
6465-}
6466-
6467-func (_c *MockHardwareSurveyor_Survey_Call) RunAndReturn(run func(ctx context.Context) port.HardwareInfo) *MockHardwareSurveyor_Survey_Call {
6468- _c.Call.Return(run)
6469- return _c
6470-}
6471-
6472-// 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.
6473-// The first argument is typically a *testing.T value.
6474-func NewMockHistorySidebarHistory(t interface {
6475- mock.TestingT
6476- Cleanup(func())
6477-}) *MockHistorySidebarHistory {
6478- mock := &MockHistorySidebarHistory{}
6479- mock.Mock.Test(t)
6480-
6481- t.Cleanup(func() { mock.AssertExpectations(t) })
6482-
6483- return mock
6484-}
6485-
6486-// MockHistorySidebarHistory is an autogenerated mock type for the HistorySidebarHistory type
6487-type MockHistorySidebarHistory struct {
6488- mock.Mock
6489-}
6490-
6491-type MockHistorySidebarHistory_Expecter struct {
6492- mock *mock.Mock
6493-}
6494-
6495-func (_m *MockHistorySidebarHistory) EXPECT() *MockHistorySidebarHistory_Expecter {
6496- return &MockHistorySidebarHistory_Expecter{mock: &_m.Mock}
6497-}
6498-
6499-// Delete provides a mock function for the type MockHistorySidebarHistory
6500-func (_mock *MockHistorySidebarHistory) Delete(ctx context.Context, id int64) error {
6501- ret := _mock.Called(ctx, id)
6502-
6503- if len(ret) == 0 {
6504- panic("no return value specified for Delete")
6505- }
6506-
6507- var r0 error
6508- if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
6509- r0 = returnFunc(ctx, id)
6510- } else {
6511- r0 = ret.Error(0)
6512- }
6513- return r0
6514-}
6515-
6516-// MockHistorySidebarHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
6517-type MockHistorySidebarHistory_Delete_Call struct {
6518- *mock.Call
6519-}
6520-
6521-// Delete is a helper method to define mock.On call
6522-// - ctx context.Context
6523-// - id int64
6524-func (_e *MockHistorySidebarHistory_Expecter) Delete(ctx interface{}, id interface{}) *MockHistorySidebarHistory_Delete_Call {
6525- return &MockHistorySidebarHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
6526-}
6527-
6528-func (_c *MockHistorySidebarHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistorySidebarHistory_Delete_Call {
6529- _c.Call.Run(func(args mock.Arguments) {
6530- var arg0 context.Context
6531- if args[0] != nil {
6532- arg0 = args[0].(context.Context)
6533- }
6534- var arg1 int64
6535- if args[1] != nil {
6536- arg1 = args[1].(int64)
6537- }
6538- run(
6539- arg0,
6540- arg1,
6541- )
6542- })
6543- return _c
6544-}
6545-
6546-func (_c *MockHistorySidebarHistory_Delete_Call) Return(err error) *MockHistorySidebarHistory_Delete_Call {
6547- _c.Call.Return(err)
6548- return _c
6549-}
6550-
6551-func (_c *MockHistorySidebarHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistorySidebarHistory_Delete_Call {
6552- _c.Call.Return(run)
6553- return _c
6554-}
6555-
6556-// GetRecent provides a mock function for the type MockHistorySidebarHistory
6557-func (_mock *MockHistorySidebarHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
6558- ret := _mock.Called(ctx, limit, offset)
6559-
6560- if len(ret) == 0 {
6561- panic("no return value specified for GetRecent")
6562- }
6563-
6564- var r0 []*entity.HistoryEntry
6565- var r1 error
6566- if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
6567- return returnFunc(ctx, limit, offset)
6568- }
6569- if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
6570- r0 = returnFunc(ctx, limit, offset)
6571- } else {
6572- if ret.Get(0) != nil {
6573- r0 = ret.Get(0).([]*entity.HistoryEntry)
6574- }
6575- }
6576- if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
6577- r1 = returnFunc(ctx, limit, offset)
6578- } else {
6579- r1 = ret.Error(1)
6580- }
6581- return r0, r1
6582-}
6583-
6584-// MockHistorySidebarHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
6585-type MockHistorySidebarHistory_GetRecent_Call struct {
6586- *mock.Call
6587-}
6588-
6589-// GetRecent is a helper method to define mock.On call
6590-// - ctx context.Context
6591-// - limit int
6592-// - offset int
6593-func (_e *MockHistorySidebarHistory_Expecter) GetRecent(ctx interface{}, limit interface{}, offset interface{}) *MockHistorySidebarHistory_GetRecent_Call {
6594- return &MockHistorySidebarHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)}
6595-}
6596-
6597-func (_c *MockHistorySidebarHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistorySidebarHistory_GetRecent_Call {
6598- _c.Call.Run(func(args mock.Arguments) {
6599- var arg0 context.Context
6600- if args[0] != nil {
6601- arg0 = args[0].(context.Context)
6602- }
6603- var arg1 int
6604- if args[1] != nil {
6605- arg1 = args[1].(int)
6606- }
6607- var arg2 int
6608- if args[2] != nil {
6609- arg2 = args[2].(int)
6610- }
6611- run(
6612- arg0,
6613- arg1,
6614- arg2,
6615- )
6616- })
6617- return _c
6618-}
6619-
6620-func (_c *MockHistorySidebarHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistorySidebarHistory_GetRecent_Call {
6621- _c.Call.Return(historyEntrys, err)
6622- return _c
6623-}
6624-
6625-func (_c *MockHistorySidebarHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistorySidebarHistory_GetRecent_Call {
6626- _c.Call.Return(run)
6627- return _c
6628-}
6629-
6630-// Search provides a mock function for the type MockHistorySidebarHistory
6631-func (_mock *MockHistorySidebarHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) {
6632- ret := _mock.Called(ctx, input)
6633-
6634- if len(ret) == 0 {
6635- panic("no return value specified for Search")
6636- }
6637-
6638- var r0 *dto.HistorySearchOutput
6639- var r1 error
6640- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok {
6641- return returnFunc(ctx, input)
6642- }
6643- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok {
6644- r0 = returnFunc(ctx, input)
6645- } else {
6646- if ret.Get(0) != nil {
6647- r0 = ret.Get(0).(*dto.HistorySearchOutput)
6648- }
6649- }
6650- if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok {
6651- r1 = returnFunc(ctx, input)
6652- } else {
6653- r1 = ret.Error(1)
6654- }
6655- return r0, r1
6656-}
6657-
6658-// MockHistorySidebarHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
6659-type MockHistorySidebarHistory_Search_Call struct {
6660- *mock.Call
6661-}
6662-
6663-// Search is a helper method to define mock.On call
6664-// - ctx context.Context
6665-// - input dto.HistorySearchInput
6666-func (_e *MockHistorySidebarHistory_Expecter) Search(ctx interface{}, input interface{}) *MockHistorySidebarHistory_Search_Call {
6667- return &MockHistorySidebarHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)}
6668-}
6669-
6670-func (_c *MockHistorySidebarHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHistorySidebarHistory_Search_Call {
6671- _c.Call.Run(func(args mock.Arguments) {
6672- var arg0 context.Context
6673- if args[0] != nil {
6674- arg0 = args[0].(context.Context)
6675- }
6676- var arg1 dto.HistorySearchInput
6677- if args[1] != nil {
6678- arg1 = args[1].(dto.HistorySearchInput)
6679- }
6680- run(
6681- arg0,
6682- arg1,
6683- )
6684- })
6685- return _c
6686-}
6687-
6688-func (_c *MockHistorySidebarHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHistorySidebarHistory_Search_Call {
6689- _c.Call.Return(historySearchOutput, err)
6690- return _c
6691-}
6692-
6693-func (_c *MockHistorySidebarHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHistorySidebarHistory_Search_Call {
6694- _c.Call.Return(run)
6695- return _c
6696-}
6697-
6698-// NewMockHomepageHistory creates a new instance of MockHomepageHistory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
6699-// The first argument is typically a *testing.T value.
6700-func NewMockHomepageHistory(t interface {
6701- mock.TestingT
6702- Cleanup(func())
6703-}) *MockHomepageHistory {
6704- mock := &MockHomepageHistory{}
6705- mock.Mock.Test(t)
6706-
6707- t.Cleanup(func() { mock.AssertExpectations(t) })
6708-
6709- return mock
6710-}
6711-
6712-// MockHomepageHistory is an autogenerated mock type for the HomepageHistory type
6713-type MockHomepageHistory struct {
6714- mock.Mock
6715-}
6716-
6717-type MockHomepageHistory_Expecter struct {
6718- mock *mock.Mock
6719-}
6720-
6721-func (_m *MockHomepageHistory) EXPECT() *MockHomepageHistory_Expecter {
6722- return &MockHomepageHistory_Expecter{mock: &_m.Mock}
6723-}
6724-
6725-// ClearAll provides a mock function for the type MockHomepageHistory
6726-func (_mock *MockHomepageHistory) ClearAll(ctx context.Context) error {
6727- ret := _mock.Called(ctx)
6728-
6729- if len(ret) == 0 {
6730- panic("no return value specified for ClearAll")
6731- }
6732-
6733- var r0 error
6734- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
6735- r0 = returnFunc(ctx)
6736- } else {
6737- r0 = ret.Error(0)
6738- }
6739- return r0
6740-}
6741-
6742-// MockHomepageHistory_ClearAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearAll'
6743-type MockHomepageHistory_ClearAll_Call struct {
6744- *mock.Call
6745-}
6746-
6747-// ClearAll is a helper method to define mock.On call
6748-// - ctx context.Context
6749-func (_e *MockHomepageHistory_Expecter) ClearAll(ctx interface{}) *MockHomepageHistory_ClearAll_Call {
6750- return &MockHomepageHistory_ClearAll_Call{Call: _e.mock.On("ClearAll", ctx)}
6751-}
6752-
6753-func (_c *MockHomepageHistory_ClearAll_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_ClearAll_Call {
6754- _c.Call.Run(func(args mock.Arguments) {
6755- var arg0 context.Context
6756- if args[0] != nil {
6757- arg0 = args[0].(context.Context)
6758- }
6759- run(
6760- arg0,
6761- )
6762- })
6763- return _c
6764-}
6765-
6766-func (_c *MockHomepageHistory_ClearAll_Call) Return(err error) *MockHomepageHistory_ClearAll_Call {
6767- _c.Call.Return(err)
6768- return _c
6769-}
6770-
6771-func (_c *MockHomepageHistory_ClearAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHomepageHistory_ClearAll_Call {
6772- _c.Call.Return(run)
6773- return _c
6774-}
6775-
6776-// ClearOlderThan provides a mock function for the type MockHomepageHistory
6777-func (_mock *MockHomepageHistory) ClearOlderThan(ctx context.Context, before time.Time) error {
6778- ret := _mock.Called(ctx, before)
6779-
6780- if len(ret) == 0 {
6781- panic("no return value specified for ClearOlderThan")
6782- }
6783-
6784- var r0 error
6785- if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
6786- r0 = returnFunc(ctx, before)
6787- } else {
6788- r0 = ret.Error(0)
6789- }
6790- return r0
6791-}
6792-
6793-// MockHomepageHistory_ClearOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearOlderThan'
6794-type MockHomepageHistory_ClearOlderThan_Call struct {
6795- *mock.Call
6796-}
6797-
6798-// ClearOlderThan is a helper method to define mock.On call
6799-// - ctx context.Context
6800-// - before time.Time
6801-func (_e *MockHomepageHistory_Expecter) ClearOlderThan(ctx interface{}, before interface{}) *MockHomepageHistory_ClearOlderThan_Call {
6802- return &MockHomepageHistory_ClearOlderThan_Call{Call: _e.mock.On("ClearOlderThan", ctx, before)}
6803-}
6804-
6805-func (_c *MockHomepageHistory_ClearOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHomepageHistory_ClearOlderThan_Call {
6806- _c.Call.Run(func(args mock.Arguments) {
6807- var arg0 context.Context
6808- if args[0] != nil {
6809- arg0 = args[0].(context.Context)
6810- }
6811- var arg1 time.Time
6812- if args[1] != nil {
6813- arg1 = args[1].(time.Time)
6814- }
6815- run(
6816- arg0,
6817- arg1,
6818- )
6819- })
6820- return _c
6821-}
6822-
6823-func (_c *MockHomepageHistory_ClearOlderThan_Call) Return(err error) *MockHomepageHistory_ClearOlderThan_Call {
6824- _c.Call.Return(err)
6825- return _c
6826-}
6827-
6828-func (_c *MockHomepageHistory_ClearOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHomepageHistory_ClearOlderThan_Call {
6829- _c.Call.Return(run)
6830- return _c
6831-}
6832-
6833-// ClearRange provides a mock function for the type MockHomepageHistory
6834-func (_mock *MockHomepageHistory) ClearRange(ctx context.Context, rangeID string) error {
6835- ret := _mock.Called(ctx, rangeID)
6836-
6837- if len(ret) == 0 {
6838- panic("no return value specified for ClearRange")
6839- }
6840-
6841- var r0 error
6842- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
6843- r0 = returnFunc(ctx, rangeID)
6844- } else {
6845- r0 = ret.Error(0)
6846- }
6847- return r0
6848-}
6849-
6850-// MockHomepageHistory_ClearRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearRange'
6851-type MockHomepageHistory_ClearRange_Call struct {
6852- *mock.Call
6853-}
6854-
6855-// ClearRange is a helper method to define mock.On call
6856-// - ctx context.Context
6857-// - rangeID string
6858-func (_e *MockHomepageHistory_Expecter) ClearRange(ctx interface{}, rangeID interface{}) *MockHomepageHistory_ClearRange_Call {
6859- return &MockHomepageHistory_ClearRange_Call{Call: _e.mock.On("ClearRange", ctx, rangeID)}
6860-}
6861-
6862-func (_c *MockHomepageHistory_ClearRange_Call) Run(run func(ctx context.Context, rangeID string)) *MockHomepageHistory_ClearRange_Call {
6863- _c.Call.Run(func(args mock.Arguments) {
6864- var arg0 context.Context
6865- if args[0] != nil {
6866- arg0 = args[0].(context.Context)
6867- }
6868- var arg1 string
6869- if args[1] != nil {
6870- arg1 = args[1].(string)
6871- }
6872- run(
6873- arg0,
6874- arg1,
6875- )
6876- })
6877- return _c
6878-}
6879-
6880-func (_c *MockHomepageHistory_ClearRange_Call) Return(err error) *MockHomepageHistory_ClearRange_Call {
6881- _c.Call.Return(err)
6882- return _c
6883-}
6884-
6885-func (_c *MockHomepageHistory_ClearRange_Call) RunAndReturn(run func(ctx context.Context, rangeID string) error) *MockHomepageHistory_ClearRange_Call {
6886- _c.Call.Return(run)
6887- return _c
6888-}
6889-
6890-// Delete provides a mock function for the type MockHomepageHistory
6891-func (_mock *MockHomepageHistory) Delete(ctx context.Context, id int64) error {
6892- ret := _mock.Called(ctx, id)
6893-
6894- if len(ret) == 0 {
6895- panic("no return value specified for Delete")
6896- }
6897-
6898- var r0 error
6899- if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
6900- r0 = returnFunc(ctx, id)
6901- } else {
6902- r0 = ret.Error(0)
6903- }
6904- return r0
6905-}
6906-
6907-// MockHomepageHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
6908-type MockHomepageHistory_Delete_Call struct {
6909- *mock.Call
6910-}
6911-
6912-// Delete is a helper method to define mock.On call
6913-// - ctx context.Context
6914-// - id int64
6915-func (_e *MockHomepageHistory_Expecter) Delete(ctx interface{}, id interface{}) *MockHomepageHistory_Delete_Call {
6916- return &MockHomepageHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
6917-}
6918-
6919-func (_c *MockHomepageHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHomepageHistory_Delete_Call {
6920- _c.Call.Run(func(args mock.Arguments) {
6921- var arg0 context.Context
6922- if args[0] != nil {
6923- arg0 = args[0].(context.Context)
6924- }
6925- var arg1 int64
6926- if args[1] != nil {
6927- arg1 = args[1].(int64)
6928- }
6929- run(
6930- arg0,
6931- arg1,
6932- )
6933- })
6934- return _c
6935-}
6936-
6937-func (_c *MockHomepageHistory_Delete_Call) Return(err error) *MockHomepageHistory_Delete_Call {
6938- _c.Call.Return(err)
6939- return _c
6940-}
6941-
6942-func (_c *MockHomepageHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHomepageHistory_Delete_Call {
6943- _c.Call.Return(run)
6944- return _c
6945-}
6946-
6947-// DeleteByDomain provides a mock function for the type MockHomepageHistory
6948-func (_mock *MockHomepageHistory) DeleteByDomain(ctx context.Context, domain string) error {
6949- ret := _mock.Called(ctx, domain)
6950-
6951- if len(ret) == 0 {
6952- panic("no return value specified for DeleteByDomain")
6953- }
6954-
6955- var r0 error
6956- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
6957- r0 = returnFunc(ctx, domain)
6958- } else {
6959- r0 = ret.Error(0)
6960- }
6961- return r0
6962-}
6963-
6964-// MockHomepageHistory_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain'
6965-type MockHomepageHistory_DeleteByDomain_Call struct {
6966- *mock.Call
6967-}
6968-
6969-// DeleteByDomain is a helper method to define mock.On call
6970-// - ctx context.Context
6971-// - domain string
6972-func (_e *MockHomepageHistory_Expecter) DeleteByDomain(ctx interface{}, domain interface{}) *MockHomepageHistory_DeleteByDomain_Call {
6973- return &MockHomepageHistory_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)}
6974-}
6975-
6976-func (_c *MockHomepageHistory_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHomepageHistory_DeleteByDomain_Call {
6977- _c.Call.Run(func(args mock.Arguments) {
6978- var arg0 context.Context
6979- if args[0] != nil {
6980- arg0 = args[0].(context.Context)
6981- }
6982- var arg1 string
6983- if args[1] != nil {
6984- arg1 = args[1].(string)
6985- }
6986- run(
6987- arg0,
6988- arg1,
6989- )
6990- })
6991- return _c
6992-}
6993-
6994-func (_c *MockHomepageHistory_DeleteByDomain_Call) Return(err error) *MockHomepageHistory_DeleteByDomain_Call {
6995- _c.Call.Return(err)
6996- return _c
6997-}
6998-
6999-func (_c *MockHomepageHistory_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHomepageHistory_DeleteByDomain_Call {
7000- _c.Call.Return(run)
7001- return _c
7002-}
7003-
7004-// GetAnalytics provides a mock function for the type MockHomepageHistory
7005-func (_mock *MockHomepageHistory) GetAnalytics(ctx context.Context) (*entity.HistoryAnalytics, error) {
7006- ret := _mock.Called(ctx)
7007-
7008- if len(ret) == 0 {
7009- panic("no return value specified for GetAnalytics")
7010- }
7011-
7012- var r0 *entity.HistoryAnalytics
7013- var r1 error
7014- if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryAnalytics, error)); ok {
7015- return returnFunc(ctx)
7016- }
7017- if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryAnalytics); ok {
7018- r0 = returnFunc(ctx)
7019- } else {
7020- if ret.Get(0) != nil {
7021- r0 = ret.Get(0).(*entity.HistoryAnalytics)
7022- }
7023- }
7024- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
7025- r1 = returnFunc(ctx)
7026- } else {
7027- r1 = ret.Error(1)
7028- }
7029- return r0, r1
7030-}
7031-
7032-// MockHomepageHistory_GetAnalytics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnalytics'
7033-type MockHomepageHistory_GetAnalytics_Call struct {
7034- *mock.Call
7035-}
7036-
7037-// GetAnalytics is a helper method to define mock.On call
7038-// - ctx context.Context
7039-func (_e *MockHomepageHistory_Expecter) GetAnalytics(ctx interface{}) *MockHomepageHistory_GetAnalytics_Call {
7040- return &MockHomepageHistory_GetAnalytics_Call{Call: _e.mock.On("GetAnalytics", ctx)}
7041-}
7042-
7043-func (_c *MockHomepageHistory_GetAnalytics_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetAnalytics_Call {
7044- _c.Call.Run(func(args mock.Arguments) {
7045- var arg0 context.Context
7046- if args[0] != nil {
7047- arg0 = args[0].(context.Context)
7048- }
7049- run(
7050- arg0,
7051- )
7052- })
7053- return _c
7054-}
7055-
7056-func (_c *MockHomepageHistory_GetAnalytics_Call) Return(historyAnalytics *entity.HistoryAnalytics, err error) *MockHomepageHistory_GetAnalytics_Call {
7057- _c.Call.Return(historyAnalytics, err)
7058- return _c
7059-}
7060-
7061-func (_c *MockHomepageHistory_GetAnalytics_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryAnalytics, error)) *MockHomepageHistory_GetAnalytics_Call {
7062- _c.Call.Return(run)
7063- return _c
7064-}
7065-
7066-// GetDomainStats provides a mock function for the type MockHomepageHistory
7067-func (_mock *MockHomepageHistory) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) {
7068- ret := _mock.Called(ctx, limit)
7069-
7070- if len(ret) == 0 {
7071- panic("no return value specified for GetDomainStats")
7072- }
7073-
7074- var r0 []*entity.DomainStat
7075- var r1 error
7076- if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok {
7077- return returnFunc(ctx, limit)
7078- }
7079- if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok {
7080- r0 = returnFunc(ctx, limit)
7081- } else {
7082- if ret.Get(0) != nil {
7083- r0 = ret.Get(0).([]*entity.DomainStat)
7084- }
7085- }
7086- if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
7087- r1 = returnFunc(ctx, limit)
7088- } else {
7089- r1 = ret.Error(1)
7090- }
7091- return r0, r1
7092-}
7093-
7094-// MockHomepageHistory_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats'
7095-type MockHomepageHistory_GetDomainStats_Call struct {
7096- *mock.Call
7097-}
7098-
7099-// GetDomainStats is a helper method to define mock.On call
7100-// - ctx context.Context
7101-// - limit int
7102-func (_e *MockHomepageHistory_Expecter) GetDomainStats(ctx interface{}, limit interface{}) *MockHomepageHistory_GetDomainStats_Call {
7103- return &MockHomepageHistory_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)}
7104-}
7105-
7106-func (_c *MockHomepageHistory_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHomepageHistory_GetDomainStats_Call {
7107- _c.Call.Run(func(args mock.Arguments) {
7108- var arg0 context.Context
7109- if args[0] != nil {
7110- arg0 = args[0].(context.Context)
7111- }
7112- var arg1 int
7113- if args[1] != nil {
7114- arg1 = args[1].(int)
7115- }
7116- run(
7117- arg0,
7118- arg1,
7119- )
7120- })
7121- return _c
7122-}
7123-
7124-func (_c *MockHomepageHistory_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHomepageHistory_GetDomainStats_Call {
7125- _c.Call.Return(domainStats, err)
7126- return _c
7127-}
7128-
7129-func (_c *MockHomepageHistory_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHomepageHistory_GetDomainStats_Call {
7130- _c.Call.Return(run)
7131- return _c
7132-}
7133-
7134-// GetRecent provides a mock function for the type MockHomepageHistory
7135-func (_mock *MockHomepageHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
7136- ret := _mock.Called(ctx, limit, offset)
7137-
7138- if len(ret) == 0 {
7139- panic("no return value specified for GetRecent")
7140- }
7141-
7142- var r0 []*entity.HistoryEntry
7143- var r1 error
7144- if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
7145- return returnFunc(ctx, limit, offset)
7146- }
7147- if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
7148- r0 = returnFunc(ctx, limit, offset)
7149- } else {
7150- if ret.Get(0) != nil {
7151- r0 = ret.Get(0).([]*entity.HistoryEntry)
7152- }
7153- }
7154- if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
7155- r1 = returnFunc(ctx, limit, offset)
7156- } else {
7157- r1 = ret.Error(1)
7158- }
7159- return r0, r1
7160-}
7161-
7162-// MockHomepageHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
7163-type MockHomepageHistory_GetRecent_Call struct {
7164- *mock.Call
7165-}
7166-
7167-// GetRecent is a helper method to define mock.On call
7168-// - ctx context.Context
7169-// - limit int
7170-// - offset int
7171-func (_e *MockHomepageHistory_Expecter) GetRecent(ctx interface{}, limit interface{}, offset interface{}) *MockHomepageHistory_GetRecent_Call {
7172- return &MockHomepageHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)}
7173-}
7174-
7175-func (_c *MockHomepageHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHomepageHistory_GetRecent_Call {
7176- _c.Call.Run(func(args mock.Arguments) {
7177- var arg0 context.Context
7178- if args[0] != nil {
7179- arg0 = args[0].(context.Context)
7180- }
7181- var arg1 int
7182- if args[1] != nil {
7183- arg1 = args[1].(int)
7184- }
7185- var arg2 int
7186- if args[2] != nil {
7187- arg2 = args[2].(int)
7188- }
7189- run(
7190- arg0,
7191- arg1,
7192- arg2,
7193- )
7194- })
7195- return _c
7196-}
7197-
7198-func (_c *MockHomepageHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecent_Call {
7199- _c.Call.Return(historyEntrys, err)
7200- return _c
7201-}
7202-
7203-func (_c *MockHomepageHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecent_Call {
7204- _c.Call.Return(run)
7205- return _c
7206-}
7207-
7208-// GetRecentByDomain provides a mock function for the type MockHomepageHistory
7209-func (_mock *MockHomepageHistory) GetRecentByDomain(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error) {
7210- ret := _mock.Called(ctx, domain, limit, offset)
7211-
7212- if len(ret) == 0 {
7213- panic("no return value specified for GetRecentByDomain")
7214- }
7215-
7216- var r0 []*entity.HistoryEntry
7217- var r1 error
7218- if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) ([]*entity.HistoryEntry, error)); ok {
7219- return returnFunc(ctx, domain, limit, offset)
7220- }
7221- if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) []*entity.HistoryEntry); ok {
7222- r0 = returnFunc(ctx, domain, limit, offset)
7223- } else {
7224- if ret.Get(0) != nil {
7225- r0 = ret.Get(0).([]*entity.HistoryEntry)
7226- }
7227- }
7228- if returnFunc, ok := ret.Get(1).(func(context.Context, string, int, int) error); ok {
7229- r1 = returnFunc(ctx, domain, limit, offset)
7230- } else {
7231- r1 = ret.Error(1)
7232- }
7233- return r0, r1
7234-}
7235-
7236-// MockHomepageHistory_GetRecentByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentByDomain'
7237-type MockHomepageHistory_GetRecentByDomain_Call struct {
7238- *mock.Call
7239-}
7240-
7241-// GetRecentByDomain is a helper method to define mock.On call
7242-// - ctx context.Context
7243-// - domain string
7244-// - limit int
7245-// - offset int
7246-func (_e *MockHomepageHistory_Expecter) GetRecentByDomain(ctx interface{}, domain interface{}, limit interface{}, offset interface{}) *MockHomepageHistory_GetRecentByDomain_Call {
7247- return &MockHomepageHistory_GetRecentByDomain_Call{Call: _e.mock.On("GetRecentByDomain", ctx, domain, limit, offset)}
7248-}
7249-
7250-func (_c *MockHomepageHistory_GetRecentByDomain_Call) Run(run func(ctx context.Context, domain string, limit int, offset int)) *MockHomepageHistory_GetRecentByDomain_Call {
7251- _c.Call.Run(func(args mock.Arguments) {
7252- var arg0 context.Context
7253- if args[0] != nil {
7254- arg0 = args[0].(context.Context)
7255- }
7256- var arg1 string
7257- if args[1] != nil {
7258- arg1 = args[1].(string)
7259- }
7260- var arg2 int
7261- if args[2] != nil {
7262- arg2 = args[2].(int)
7263- }
7264- var arg3 int
7265- if args[3] != nil {
7266- arg3 = args[3].(int)
7267- }
7268- run(
7269- arg0,
7270- arg1,
7271- arg2,
7272- arg3,
7273- )
7274- })
7275- return _c
7276-}
7277-
7278-func (_c *MockHomepageHistory_GetRecentByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecentByDomain_Call {
7279- _c.Call.Return(historyEntrys, err)
7280- return _c
7281-}
7282-
7283-func (_c *MockHomepageHistory_GetRecentByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecentByDomain_Call {
7284- _c.Call.Return(run)
7285- return _c
7286-}
7287-
7288-// GetRecentWindow provides a mock function for the type MockHomepageHistory
7289-func (_mock *MockHomepageHistory) GetRecentWindow(ctx context.Context, before time.Time, domain string) (*entity.HistoryWindow, error) {
7290- ret := _mock.Called(ctx, before, domain)
7291-
7292- if len(ret) == 0 {
7293- panic("no return value specified for GetRecentWindow")
7294- }
7295-
7296- var r0 *entity.HistoryWindow
7297- var r1 error
7298- if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, string) (*entity.HistoryWindow, error)); ok {
7299- return returnFunc(ctx, before, domain)
7300- }
7301- if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, string) *entity.HistoryWindow); ok {
7302- r0 = returnFunc(ctx, before, domain)
7303- } else {
7304- if ret.Get(0) != nil {
7305- r0 = ret.Get(0).(*entity.HistoryWindow)
7306- }
7307- }
7308- if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time, string) error); ok {
7309- r1 = returnFunc(ctx, before, domain)
7310- } else {
7311- r1 = ret.Error(1)
7312- }
7313- return r0, r1
7314-}
7315-
7316-// MockHomepageHistory_GetRecentWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindow'
7317-type MockHomepageHistory_GetRecentWindow_Call struct {
7318- *mock.Call
7319-}
7320-
7321-// GetRecentWindow is a helper method to define mock.On call
7322-// - ctx context.Context
7323-// - before time.Time
7324-// - domain string
7325-func (_e *MockHomepageHistory_Expecter) GetRecentWindow(ctx interface{}, before interface{}, domain interface{}) *MockHomepageHistory_GetRecentWindow_Call {
7326- return &MockHomepageHistory_GetRecentWindow_Call{Call: _e.mock.On("GetRecentWindow", ctx, before, domain)}
7327-}
7328-
7329-func (_c *MockHomepageHistory_GetRecentWindow_Call) Run(run func(ctx context.Context, before time.Time, domain string)) *MockHomepageHistory_GetRecentWindow_Call {
7330- _c.Call.Run(func(args mock.Arguments) {
7331- var arg0 context.Context
7332- if args[0] != nil {
7333- arg0 = args[0].(context.Context)
7334- }
7335- var arg1 time.Time
7336- if args[1] != nil {
7337- arg1 = args[1].(time.Time)
7338- }
7339- var arg2 string
7340- if args[2] != nil {
7341- arg2 = args[2].(string)
7342- }
7343- run(
7344- arg0,
7345- arg1,
7346- arg2,
7347- )
7348- })
7349- return _c
7350-}
7351-
7352-func (_c *MockHomepageHistory_GetRecentWindow_Call) Return(historyWindow *entity.HistoryWindow, err error) *MockHomepageHistory_GetRecentWindow_Call {
7353- _c.Call.Return(historyWindow, err)
7354- return _c
7355-}
7356-
7357-func (_c *MockHomepageHistory_GetRecentWindow_Call) RunAndReturn(run func(ctx context.Context, before time.Time, domain string) (*entity.HistoryWindow, error)) *MockHomepageHistory_GetRecentWindow_Call {
7358- _c.Call.Return(run)
7359- return _c
7360-}
7361-
7362-// GetStats provides a mock function for the type MockHomepageHistory
7363-func (_mock *MockHomepageHistory) GetStats(ctx context.Context) (*entity.HistoryStats, error) {
7364- ret := _mock.Called(ctx)
7365-
7366- if len(ret) == 0 {
7367- panic("no return value specified for GetStats")
7368- }
7369-
7370- var r0 *entity.HistoryStats
7371- var r1 error
7372- if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok {
7373- return returnFunc(ctx)
7374- }
7375- if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok {
7376- r0 = returnFunc(ctx)
7377- } else {
7378- if ret.Get(0) != nil {
7379- r0 = ret.Get(0).(*entity.HistoryStats)
7380- }
7381- }
7382- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
7383- r1 = returnFunc(ctx)
7384- } else {
7385- r1 = ret.Error(1)
7386- }
7387- return r0, r1
7388-}
7389-
7390-// MockHomepageHistory_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats'
7391-type MockHomepageHistory_GetStats_Call struct {
7392- *mock.Call
7393-}
7394-
7395-// GetStats is a helper method to define mock.On call
7396-// - ctx context.Context
7397-func (_e *MockHomepageHistory_Expecter) GetStats(ctx interface{}) *MockHomepageHistory_GetStats_Call {
7398- return &MockHomepageHistory_GetStats_Call{Call: _e.mock.On("GetStats", ctx)}
7399-}
7400-
7401-func (_c *MockHomepageHistory_GetStats_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetStats_Call {
7402- _c.Call.Run(func(args mock.Arguments) {
7403- var arg0 context.Context
7404- if args[0] != nil {
7405- arg0 = args[0].(context.Context)
7406- }
7407- run(
7408- arg0,
7409- )
7410- })
7411- return _c
7412-}
7413-
7414-func (_c *MockHomepageHistory_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHomepageHistory_GetStats_Call {
7415- _c.Call.Return(historyStats, err)
7416- return _c
7417-}
7418-
7419-func (_c *MockHomepageHistory_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHomepageHistory_GetStats_Call {
7420- _c.Call.Return(run)
7421- return _c
7422-}
7423-
7424-// Search provides a mock function for the type MockHomepageHistory
7425-func (_mock *MockHomepageHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) {
7426- ret := _mock.Called(ctx, input)
7427-
7428- if len(ret) == 0 {
7429- panic("no return value specified for Search")
7430- }
7431-
7432- var r0 *dto.HistorySearchOutput
7433- var r1 error
7434- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok {
7435- return returnFunc(ctx, input)
7436- }
7437- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok {
7438- r0 = returnFunc(ctx, input)
7439- } else {
7440- if ret.Get(0) != nil {
7441- r0 = ret.Get(0).(*dto.HistorySearchOutput)
7442- }
7443- }
7444- if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok {
7445- r1 = returnFunc(ctx, input)
7446- } else {
7447- r1 = ret.Error(1)
7448- }
7449- return r0, r1
7450-}
7451-
7452-// MockHomepageHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
7453-type MockHomepageHistory_Search_Call struct {
7454- *mock.Call
7455-}
7456-
7457-// Search is a helper method to define mock.On call
7458-// - ctx context.Context
7459-// - input dto.HistorySearchInput
7460-func (_e *MockHomepageHistory_Expecter) Search(ctx interface{}, input interface{}) *MockHomepageHistory_Search_Call {
7461- return &MockHomepageHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)}
7462-}
7463-
7464-func (_c *MockHomepageHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHomepageHistory_Search_Call {
7465- _c.Call.Run(func(args mock.Arguments) {
7466- var arg0 context.Context
7467- if args[0] != nil {
7468- arg0 = args[0].(context.Context)
7469- }
7470- var arg1 dto.HistorySearchInput
7471- if args[1] != nil {
7472- arg1 = args[1].(dto.HistorySearchInput)
7473- }
7474- run(
7475- arg0,
7476- arg1,
7477- )
7478- })
7479- return _c
7480-}
7481-
7482-func (_c *MockHomepageHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHomepageHistory_Search_Call {
7483- _c.Call.Return(historySearchOutput, err)
7484- return _c
7485-}
7486-
7487-func (_c *MockHomepageHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHomepageHistory_Search_Call {
7488- _c.Call.Return(run)
7489- return _c
7490-}
7491-
7492-// NewMockHomepageFavorites creates a new instance of MockHomepageFavorites. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
7493-// The first argument is typically a *testing.T value.
7494-func NewMockHomepageFavorites(t interface {
7495- mock.TestingT
7496- Cleanup(func())
7497-}) *MockHomepageFavorites {
7498- mock := &MockHomepageFavorites{}
7499- mock.Mock.Test(t)
7500-
7501- t.Cleanup(func() { mock.AssertExpectations(t) })
7502-
7503- return mock
7504-}
7505-
7506-// MockHomepageFavorites is an autogenerated mock type for the HomepageFavorites type
7507-type MockHomepageFavorites struct {
7508- mock.Mock
7509-}
7510-
7511-type MockHomepageFavorites_Expecter struct {
7512- mock *mock.Mock
7513-}
7514-
7515-func (_m *MockHomepageFavorites) EXPECT() *MockHomepageFavorites_Expecter {
7516- return &MockHomepageFavorites_Expecter{mock: &_m.Mock}
7517-}
7518-
7519-// AddFavorite provides a mock function for the type MockHomepageFavorites
7520-func (_mock *MockHomepageFavorites) AddFavorite(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error) {
7521- ret := _mock.Called(ctx, input)
7522-
7523- if len(ret) == 0 {
7524- panic("no return value specified for AddFavorite")
7525- }
7526-
7527- var r0 *entity.Favorite
7528- var r1 error
7529- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) (*entity.Favorite, error)); ok {
7530- return returnFunc(ctx, input)
7531- }
7532- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) *entity.Favorite); ok {
7533- r0 = returnFunc(ctx, input)
7534- } else {
7535- if ret.Get(0) != nil {
7536- r0 = ret.Get(0).(*entity.Favorite)
7537- }
7538- }
7539- if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteCreateInput) error); ok {
7540- r1 = returnFunc(ctx, input)
7541- } else {
7542- r1 = ret.Error(1)
7543- }
7544- return r0, r1
7545-}
7546-
7547-// MockHomepageFavorites_AddFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddFavorite'
7548-type MockHomepageFavorites_AddFavorite_Call struct {
7549- *mock.Call
7550-}
7551-
7552-// AddFavorite is a helper method to define mock.On call
7553-// - ctx context.Context
7554-// - input dto.FavoriteCreateInput
7555-func (_e *MockHomepageFavorites_Expecter) AddFavorite(ctx interface{}, input interface{}) *MockHomepageFavorites_AddFavorite_Call {
7556- return &MockHomepageFavorites_AddFavorite_Call{Call: _e.mock.On("AddFavorite", ctx, input)}
7557-}
7558-
7559-func (_c *MockHomepageFavorites_AddFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteCreateInput)) *MockHomepageFavorites_AddFavorite_Call {
7560- _c.Call.Run(func(args mock.Arguments) {
7561- var arg0 context.Context
7562- if args[0] != nil {
7563- arg0 = args[0].(context.Context)
7564- }
7565- var arg1 dto.FavoriteCreateInput
7566- if args[1] != nil {
7567- arg1 = args[1].(dto.FavoriteCreateInput)
7568- }
7569- run(
7570- arg0,
7571- arg1,
7572- )
7573- })
7574- return _c
7575-}
7576-
7577-func (_c *MockHomepageFavorites_AddFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_AddFavorite_Call {
7578- _c.Call.Return(favorite, err)
7579- return _c
7580-}
7581-
7582-func (_c *MockHomepageFavorites_AddFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error)) *MockHomepageFavorites_AddFavorite_Call {
7583- _c.Call.Return(run)
7584- return _c
7585-}
7586-
7587-// AddTag provides a mock function for the type MockHomepageFavorites
7588-func (_mock *MockHomepageFavorites) AddTag(ctx context.Context, name string, color string) (*entity.Tag, error) {
7589- ret := _mock.Called(ctx, name, color)
7590-
7591- if len(ret) == 0 {
7592- panic("no return value specified for AddTag")
7593- }
7594-
7595- var r0 *entity.Tag
7596- var r1 error
7597- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*entity.Tag, error)); ok {
7598- return returnFunc(ctx, name, color)
7599- }
7600- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *entity.Tag); ok {
7601- r0 = returnFunc(ctx, name, color)
7602- } else {
7603- if ret.Get(0) != nil {
7604- r0 = ret.Get(0).(*entity.Tag)
7605- }
7606- }
7607- if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
7608- r1 = returnFunc(ctx, name, color)
7609- } else {
7610- r1 = ret.Error(1)
7611- }
7612- return r0, r1
7613-}
7614-
7615-// MockHomepageFavorites_AddTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddTag'
7616-type MockHomepageFavorites_AddTag_Call struct {
7617- *mock.Call
7618-}
7619-
7620-// AddTag is a helper method to define mock.On call
7621-// - ctx context.Context
7622-// - name string
7623-// - color string
7624-func (_e *MockHomepageFavorites_Expecter) AddTag(ctx interface{}, name interface{}, color interface{}) *MockHomepageFavorites_AddTag_Call {
7625- return &MockHomepageFavorites_AddTag_Call{Call: _e.mock.On("AddTag", ctx, name, color)}
7626-}
7627-
7628-func (_c *MockHomepageFavorites_AddTag_Call) Run(run func(ctx context.Context, name string, color string)) *MockHomepageFavorites_AddTag_Call {
7629- _c.Call.Run(func(args mock.Arguments) {
7630- var arg0 context.Context
7631- if args[0] != nil {
7632- arg0 = args[0].(context.Context)
7633- }
7634- var arg1 string
7635- if args[1] != nil {
7636- arg1 = args[1].(string)
7637- }
7638- var arg2 string
7639- if args[2] != nil {
7640- arg2 = args[2].(string)
7641- }
7642- run(
7643- arg0,
7644- arg1,
7645- arg2,
7646- )
7647- })
7648- return _c
7649-}
7650-
7651-func (_c *MockHomepageFavorites_AddTag_Call) Return(tag *entity.Tag, err error) *MockHomepageFavorites_AddTag_Call {
7652- _c.Call.Return(tag, err)
7653- return _c
7654-}
7655-
7656-func (_c *MockHomepageFavorites_AddTag_Call) RunAndReturn(run func(ctx context.Context, name string, color string) (*entity.Tag, error)) *MockHomepageFavorites_AddTag_Call {
7657- _c.Call.Return(run)
7658- return _c
7659-}
7660-
7661-// CreateFolder provides a mock function for the type MockHomepageFavorites
7662-func (_mock *MockHomepageFavorites) CreateFolder(ctx context.Context, name string, icon string, parentID *entity.FolderID) (*entity.Folder, error) {
7663- ret := _mock.Called(ctx, name, icon, parentID)
7664-
7665- if len(ret) == 0 {
7666- panic("no return value specified for CreateFolder")
7667- }
7668-
7669- var r0 *entity.Folder
7670- var r1 error
7671- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, *entity.FolderID) (*entity.Folder, error)); ok {
7672- return returnFunc(ctx, name, icon, parentID)
7673- }
7674- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, *entity.FolderID) *entity.Folder); ok {
7675- r0 = returnFunc(ctx, name, icon, parentID)
7676- } else {
7677- if ret.Get(0) != nil {
7678- r0 = ret.Get(0).(*entity.Folder)
7679- }
7680- }
7681- if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, *entity.FolderID) error); ok {
7682- r1 = returnFunc(ctx, name, icon, parentID)
7683- } else {
7684- r1 = ret.Error(1)
7685- }
7686- return r0, r1
7687-}
7688-
7689-// MockHomepageFavorites_CreateFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateFolder'
7690-type MockHomepageFavorites_CreateFolder_Call struct {
7691- *mock.Call
7692-}
7693-
7694-// CreateFolder is a helper method to define mock.On call
7695-// - ctx context.Context
7696-// - name string
7697-// - icon string
7698-// - parentID *entity.FolderID
7699-func (_e *MockHomepageFavorites_Expecter) CreateFolder(ctx interface{}, name interface{}, icon interface{}, parentID interface{}) *MockHomepageFavorites_CreateFolder_Call {
7700- return &MockHomepageFavorites_CreateFolder_Call{Call: _e.mock.On("CreateFolder", ctx, name, icon, parentID)}
7701-}
7702-
7703-func (_c *MockHomepageFavorites_CreateFolder_Call) Run(run func(ctx context.Context, name string, icon string, parentID *entity.FolderID)) *MockHomepageFavorites_CreateFolder_Call {
7704- _c.Call.Run(func(args mock.Arguments) {
7705- var arg0 context.Context
7706- if args[0] != nil {
7707- arg0 = args[0].(context.Context)
7708- }
7709- var arg1 string
7710- if args[1] != nil {
7711- arg1 = args[1].(string)
7712- }
7713- var arg2 string
7714- if args[2] != nil {
7715- arg2 = args[2].(string)
7716- }
7717- var arg3 *entity.FolderID
7718- if args[3] != nil {
7719- arg3 = args[3].(*entity.FolderID)
7720- }
7721- run(
7722- arg0,
7723- arg1,
7724- arg2,
7725- arg3,
7726- )
7727- })
7728- return _c
7729-}
7730-
7731-func (_c *MockHomepageFavorites_CreateFolder_Call) Return(folder *entity.Folder, err error) *MockHomepageFavorites_CreateFolder_Call {
7732- _c.Call.Return(folder, err)
7733- return _c
7734-}
7735-
7736-func (_c *MockHomepageFavorites_CreateFolder_Call) RunAndReturn(run func(ctx context.Context, name string, icon string, parentID *entity.FolderID) (*entity.Folder, error)) *MockHomepageFavorites_CreateFolder_Call {
7737- _c.Call.Return(run)
7738- return _c
7739-}
7740-
7741-// DeleteFavorite provides a mock function for the type MockHomepageFavorites
7742-func (_mock *MockHomepageFavorites) DeleteFavorite(ctx context.Context, id entity.FavoriteID) error {
7743- ret := _mock.Called(ctx, id)
7744-
7745- if len(ret) == 0 {
7746- panic("no return value specified for DeleteFavorite")
7747- }
7748-
7749- var r0 error
7750- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok {
7751- r0 = returnFunc(ctx, id)
7752- } else {
7753- r0 = ret.Error(0)
7754- }
7755- return r0
7756-}
7757-
7758-// MockHomepageFavorites_DeleteFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFavorite'
7759-type MockHomepageFavorites_DeleteFavorite_Call struct {
7760- *mock.Call
7761-}
7762-
7763-// DeleteFavorite is a helper method to define mock.On call
7764-// - ctx context.Context
7765-// - id entity.FavoriteID
7766-func (_e *MockHomepageFavorites_Expecter) DeleteFavorite(ctx interface{}, id interface{}) *MockHomepageFavorites_DeleteFavorite_Call {
7767- return &MockHomepageFavorites_DeleteFavorite_Call{Call: _e.mock.On("DeleteFavorite", ctx, id)}
7768-}
7769-
7770-func (_c *MockHomepageFavorites_DeleteFavorite_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockHomepageFavorites_DeleteFavorite_Call {
7771- _c.Call.Run(func(args mock.Arguments) {
7772- var arg0 context.Context
7773- if args[0] != nil {
7774- arg0 = args[0].(context.Context)
7775- }
7776- var arg1 entity.FavoriteID
7777- if args[1] != nil {
7778- arg1 = args[1].(entity.FavoriteID)
7779- }
7780- run(
7781- arg0,
7782- arg1,
7783- )
7784- })
7785- return _c
7786-}
7787-
7788-func (_c *MockHomepageFavorites_DeleteFavorite_Call) Return(err error) *MockHomepageFavorites_DeleteFavorite_Call {
7789- _c.Call.Return(err)
7790- return _c
7791-}
7792-
7793-func (_c *MockHomepageFavorites_DeleteFavorite_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockHomepageFavorites_DeleteFavorite_Call {
7794- _c.Call.Return(run)
7795- return _c
7796-}
7797-
7798-// DeleteFolder provides a mock function for the type MockHomepageFavorites
7799-func (_mock *MockHomepageFavorites) DeleteFolder(ctx context.Context, id entity.FolderID) error {
7800- ret := _mock.Called(ctx, id)
7801-
7802- if len(ret) == 0 {
7803- panic("no return value specified for DeleteFolder")
7804- }
7805-
7806- var r0 error
7807- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok {
7808- r0 = returnFunc(ctx, id)
7809- } else {
7810- r0 = ret.Error(0)
7811- }
7812- return r0
7813-}
7814-
7815-// MockHomepageFavorites_DeleteFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFolder'
7816-type MockHomepageFavorites_DeleteFolder_Call struct {
7817- *mock.Call
7818-}
7819-
7820-// DeleteFolder is a helper method to define mock.On call
7821-// - ctx context.Context
7822-// - id entity.FolderID
7823-func (_e *MockHomepageFavorites_Expecter) DeleteFolder(ctx interface{}, id interface{}) *MockHomepageFavorites_DeleteFolder_Call {
7824- return &MockHomepageFavorites_DeleteFolder_Call{Call: _e.mock.On("DeleteFolder", ctx, id)}
7825-}
7826-
7827-func (_c *MockHomepageFavorites_DeleteFolder_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockHomepageFavorites_DeleteFolder_Call {
7828- _c.Call.Run(func(args mock.Arguments) {
7829- var arg0 context.Context
7830- if args[0] != nil {
7831- arg0 = args[0].(context.Context)
7832- }
7833- var arg1 entity.FolderID
7834- if args[1] != nil {
7835- arg1 = args[1].(entity.FolderID)
7836- }
7837- run(
7838- arg0,
7839- arg1,
7840- )
7841- })
7842- return _c
7843-}
7844-
7845-func (_c *MockHomepageFavorites_DeleteFolder_Call) Return(err error) *MockHomepageFavorites_DeleteFolder_Call {
7846- _c.Call.Return(err)
7847- return _c
7848-}
7849-
7850-func (_c *MockHomepageFavorites_DeleteFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockHomepageFavorites_DeleteFolder_Call {
7851- _c.Call.Return(run)
7852- return _c
7853-}
7854-
7855-// DeleteTag provides a mock function for the type MockHomepageFavorites
7856-func (_mock *MockHomepageFavorites) DeleteTag(ctx context.Context, id entity.TagID) error {
7857- ret := _mock.Called(ctx, id)
7858-
7859- if len(ret) == 0 {
7860- panic("no return value specified for DeleteTag")
7861- }
7862-
7863- var r0 error
7864- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok {
7865- r0 = returnFunc(ctx, id)
7866- } else {
7867- r0 = ret.Error(0)
7868- }
7869- return r0
7870-}
7871-
7872-// MockHomepageFavorites_DeleteTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTag'
7873-type MockHomepageFavorites_DeleteTag_Call struct {
7874- *mock.Call
7875-}
7876-
7877-// DeleteTag is a helper method to define mock.On call
7878-// - ctx context.Context
7879-// - id entity.TagID
7880-func (_e *MockHomepageFavorites_Expecter) DeleteTag(ctx interface{}, id interface{}) *MockHomepageFavorites_DeleteTag_Call {
7881- return &MockHomepageFavorites_DeleteTag_Call{Call: _e.mock.On("DeleteTag", ctx, id)}
7882-}
7883-
7884-func (_c *MockHomepageFavorites_DeleteTag_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockHomepageFavorites_DeleteTag_Call {
7885- _c.Call.Run(func(args mock.Arguments) {
7886- var arg0 context.Context
7887- if args[0] != nil {
7888- arg0 = args[0].(context.Context)
7889- }
7890- var arg1 entity.TagID
7891- if args[1] != nil {
7892- arg1 = args[1].(entity.TagID)
7893- }
7894- run(
7895- arg0,
7896- arg1,
7897- )
7898- })
7899- return _c
7900-}
7901-
7902-func (_c *MockHomepageFavorites_DeleteTag_Call) Return(err error) *MockHomepageFavorites_DeleteTag_Call {
7903- _c.Call.Return(err)
7904- return _c
7905-}
7906-
7907-func (_c *MockHomepageFavorites_DeleteTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockHomepageFavorites_DeleteTag_Call {
7908- _c.Call.Return(run)
7909- return _c
7910-}
7911-
7912-// GetAll provides a mock function for the type MockHomepageFavorites
7913-func (_mock *MockHomepageFavorites) GetAll(ctx context.Context) ([]*entity.Favorite, error) {
7914- ret := _mock.Called(ctx)
7915-
7916- if len(ret) == 0 {
7917- panic("no return value specified for GetAll")
7918- }
7919-
7920- var r0 []*entity.Favorite
7921- var r1 error
7922- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok {
7923- return returnFunc(ctx)
7924- }
7925- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok {
7926- r0 = returnFunc(ctx)
7927- } else {
7928- if ret.Get(0) != nil {
7929- r0 = ret.Get(0).([]*entity.Favorite)
7930- }
7931- }
7932- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
7933- r1 = returnFunc(ctx)
7934- } else {
7935- r1 = ret.Error(1)
7936- }
7937- return r0, r1
7938-}
7939-
7940-// MockHomepageFavorites_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
7941-type MockHomepageFavorites_GetAll_Call struct {
7942- *mock.Call
7943-}
7944-
7945-// GetAll is a helper method to define mock.On call
7946-// - ctx context.Context
7947-func (_e *MockHomepageFavorites_Expecter) GetAll(ctx interface{}) *MockHomepageFavorites_GetAll_Call {
7948- return &MockHomepageFavorites_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
7949-}
7950-
7951-func (_c *MockHomepageFavorites_GetAll_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAll_Call {
7952- _c.Call.Run(func(args mock.Arguments) {
7953- var arg0 context.Context
7954- if args[0] != nil {
7955- arg0 = args[0].(context.Context)
7956- }
7957- run(
7958- arg0,
7959- )
7960- })
7961- return _c
7962-}
7963-
7964-func (_c *MockHomepageFavorites_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockHomepageFavorites_GetAll_Call {
7965- _c.Call.Return(favorites, err)
7966- return _c
7967-}
7968-
7969-func (_c *MockHomepageFavorites_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockHomepageFavorites_GetAll_Call {
7970- _c.Call.Return(run)
7971- return _c
7972-}
7973-
7974-// GetAllFolders provides a mock function for the type MockHomepageFavorites
7975-func (_mock *MockHomepageFavorites) GetAllFolders(ctx context.Context) ([]*entity.Folder, error) {
7976- ret := _mock.Called(ctx)
7977-
7978- if len(ret) == 0 {
7979- panic("no return value specified for GetAllFolders")
7980- }
7981-
7982- var r0 []*entity.Folder
7983- var r1 error
7984- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok {
7985- return returnFunc(ctx)
7986- }
7987- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok {
7988- r0 = returnFunc(ctx)
7989- } else {
7990- if ret.Get(0) != nil {
7991- r0 = ret.Get(0).([]*entity.Folder)
7992- }
7993- }
7994- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
7995- r1 = returnFunc(ctx)
7996- } else {
7997- r1 = ret.Error(1)
7998- }
7999- return r0, r1
8000-}
8001-
8002-// MockHomepageFavorites_GetAllFolders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllFolders'
8003-type MockHomepageFavorites_GetAllFolders_Call struct {
8004- *mock.Call
8005-}
8006-
8007-// GetAllFolders is a helper method to define mock.On call
8008-// - ctx context.Context
8009-func (_e *MockHomepageFavorites_Expecter) GetAllFolders(ctx interface{}) *MockHomepageFavorites_GetAllFolders_Call {
8010- return &MockHomepageFavorites_GetAllFolders_Call{Call: _e.mock.On("GetAllFolders", ctx)}
8011-}
8012-
8013-func (_c *MockHomepageFavorites_GetAllFolders_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllFolders_Call {
8014- _c.Call.Run(func(args mock.Arguments) {
8015- var arg0 context.Context
8016- if args[0] != nil {
8017- arg0 = args[0].(context.Context)
8018- }
8019- run(
8020- arg0,
8021- )
8022- })
8023- return _c
8024-}
8025-
8026-func (_c *MockHomepageFavorites_GetAllFolders_Call) Return(folders []*entity.Folder, err error) *MockHomepageFavorites_GetAllFolders_Call {
8027- _c.Call.Return(folders, err)
8028- return _c
8029-}
8030-
8031-func (_c *MockHomepageFavorites_GetAllFolders_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockHomepageFavorites_GetAllFolders_Call {
8032- _c.Call.Return(run)
8033- return _c
8034-}
8035-
8036-// GetAllTags provides a mock function for the type MockHomepageFavorites
8037-func (_mock *MockHomepageFavorites) GetAllTags(ctx context.Context) ([]*entity.Tag, error) {
8038- ret := _mock.Called(ctx)
8039-
8040- if len(ret) == 0 {
8041- panic("no return value specified for GetAllTags")
8042- }
8043-
8044- var r0 []*entity.Tag
8045- var r1 error
8046- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok {
8047- return returnFunc(ctx)
8048- }
8049- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok {
8050- r0 = returnFunc(ctx)
8051- } else {
8052- if ret.Get(0) != nil {
8053- r0 = ret.Get(0).([]*entity.Tag)
8054- }
8055- }
8056- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
8057- r1 = returnFunc(ctx)
8058- } else {
8059- r1 = ret.Error(1)
8060- }
8061- return r0, r1
8062-}
8063-
8064-// MockHomepageFavorites_GetAllTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllTags'
8065-type MockHomepageFavorites_GetAllTags_Call struct {
8066- *mock.Call
8067-}
8068-
8069-// GetAllTags is a helper method to define mock.On call
8070-// - ctx context.Context
8071-func (_e *MockHomepageFavorites_Expecter) GetAllTags(ctx interface{}) *MockHomepageFavorites_GetAllTags_Call {
8072- return &MockHomepageFavorites_GetAllTags_Call{Call: _e.mock.On("GetAllTags", ctx)}
8073-}
8074-
8075-func (_c *MockHomepageFavorites_GetAllTags_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllTags_Call {
8076- _c.Call.Run(func(args mock.Arguments) {
8077- var arg0 context.Context
8078- if args[0] != nil {
8079- arg0 = args[0].(context.Context)
8080- }
8081- run(
8082- arg0,
8083- )
8084- })
8085- return _c
8086-}
8087-
8088-func (_c *MockHomepageFavorites_GetAllTags_Call) Return(tags []*entity.Tag, err error) *MockHomepageFavorites_GetAllTags_Call {
8089- _c.Call.Return(tags, err)
8090- return _c
8091-}
8092-
8093-func (_c *MockHomepageFavorites_GetAllTags_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockHomepageFavorites_GetAllTags_Call {
8094- _c.Call.Return(run)
8095- return _c
8096-}
8097-
8098-// GetByShortcut provides a mock function for the type MockHomepageFavorites
8099-func (_mock *MockHomepageFavorites) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) {
8100- ret := _mock.Called(ctx, key)
8101-
8102- if len(ret) == 0 {
8103- panic("no return value specified for GetByShortcut")
8104- }
8105-
8106- var r0 *entity.Favorite
8107- var r1 error
8108- if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok {
8109- return returnFunc(ctx, key)
8110- }
8111- if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok {
8112- r0 = returnFunc(ctx, key)
8113- } else {
8114- if ret.Get(0) != nil {
8115- r0 = ret.Get(0).(*entity.Favorite)
8116- }
8117- }
8118- if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
8119- r1 = returnFunc(ctx, key)
8120- } else {
8121- r1 = ret.Error(1)
8122- }
8123- return r0, r1
8124-}
8125-
8126-// MockHomepageFavorites_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut'
8127-type MockHomepageFavorites_GetByShortcut_Call struct {
8128- *mock.Call
8129-}
8130-
8131-// GetByShortcut is a helper method to define mock.On call
8132-// - ctx context.Context
8133-// - key int
8134-func (_e *MockHomepageFavorites_Expecter) GetByShortcut(ctx interface{}, key interface{}) *MockHomepageFavorites_GetByShortcut_Call {
8135- return &MockHomepageFavorites_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)}
8136-}
8137-
8138-func (_c *MockHomepageFavorites_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockHomepageFavorites_GetByShortcut_Call {
8139- _c.Call.Run(func(args mock.Arguments) {
8140- var arg0 context.Context
8141- if args[0] != nil {
8142- arg0 = args[0].(context.Context)
8143- }
8144- var arg1 int
8145- if args[1] != nil {
8146- arg1 = args[1].(int)
8147- }
8148- run(
8149- arg0,
8150- arg1,
8151- )
8152- })
8153- return _c
8154-}
8155-
8156-func (_c *MockHomepageFavorites_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_GetByShortcut_Call {
8157- _c.Call.Return(favorite, err)
8158- return _c
8159-}
8160-
8161-func (_c *MockHomepageFavorites_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockHomepageFavorites_GetByShortcut_Call {
8162- _c.Call.Return(run)
8163- return _c
8164-}
8165-
8166-// Move provides a mock function for the type MockHomepageFavorites
8167-func (_mock *MockHomepageFavorites) Move(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error {
8168- ret := _mock.Called(ctx, id, folderID)
8169-
8170- if len(ret) == 0 {
8171- panic("no return value specified for Move")
8172- }
8173-
8174- var r0 error
8175- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok {
8176- r0 = returnFunc(ctx, id, folderID)
8177- } else {
8178- r0 = ret.Error(0)
8179- }
8180- return r0
8181-}
8182-
8183-// MockHomepageFavorites_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move'
8184-type MockHomepageFavorites_Move_Call struct {
8185- *mock.Call
8186-}
8187-
8188-// Move is a helper method to define mock.On call
8189-// - ctx context.Context
8190-// - id entity.FavoriteID
8191-// - folderID *entity.FolderID
8192-func (_e *MockHomepageFavorites_Expecter) Move(ctx interface{}, id interface{}, folderID interface{}) *MockHomepageFavorites_Move_Call {
8193- return &MockHomepageFavorites_Move_Call{Call: _e.mock.On("Move", ctx, id, folderID)}
8194-}
8195-
8196-func (_c *MockHomepageFavorites_Move_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockHomepageFavorites_Move_Call {
8197- _c.Call.Run(func(args mock.Arguments) {
8198- var arg0 context.Context
8199- if args[0] != nil {
8200- arg0 = args[0].(context.Context)
8201- }
8202- var arg1 entity.FavoriteID
8203- if args[1] != nil {
8204- arg1 = args[1].(entity.FavoriteID)
8205- }
8206- var arg2 *entity.FolderID
8207- if args[2] != nil {
8208- arg2 = args[2].(*entity.FolderID)
8209- }
8210- run(
8211- arg0,
8212- arg1,
8213- arg2,
8214- )
8215- })
8216- return _c
8217-}
8218-
8219-func (_c *MockHomepageFavorites_Move_Call) Return(err error) *MockHomepageFavorites_Move_Call {
8220- _c.Call.Return(err)
8221- return _c
8222-}
8223-
8224-func (_c *MockHomepageFavorites_Move_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockHomepageFavorites_Move_Call {
8225- _c.Call.Return(run)
8226- return _c
8227-}
8228-
8229-// SetShortcut provides a mock function for the type MockHomepageFavorites
8230-func (_mock *MockHomepageFavorites) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error {
8231- ret := _mock.Called(ctx, id, key)
8232-
8233- if len(ret) == 0 {
8234- panic("no return value specified for SetShortcut")
8235- }
8236-
8237- var r0 error
8238- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok {
8239- r0 = returnFunc(ctx, id, key)
8240- } else {
8241- r0 = ret.Error(0)
8242- }
8243- return r0
8244-}
8245-
8246-// MockHomepageFavorites_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut'
8247-type MockHomepageFavorites_SetShortcut_Call struct {
8248- *mock.Call
8249-}
8250-
8251-// SetShortcut is a helper method to define mock.On call
8252-// - ctx context.Context
8253-// - id entity.FavoriteID
8254-// - key *int
8255-func (_e *MockHomepageFavorites_Expecter) SetShortcut(ctx interface{}, id interface{}, key interface{}) *MockHomepageFavorites_SetShortcut_Call {
8256- return &MockHomepageFavorites_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)}
8257-}
8258-
8259-func (_c *MockHomepageFavorites_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockHomepageFavorites_SetShortcut_Call {
8260- _c.Call.Run(func(args mock.Arguments) {
8261- var arg0 context.Context
8262- if args[0] != nil {
8263- arg0 = args[0].(context.Context)
8264- }
8265- var arg1 entity.FavoriteID
8266- if args[1] != nil {
8267- arg1 = args[1].(entity.FavoriteID)
8268- }
8269- var arg2 *int
8270- if args[2] != nil {
8271- arg2 = args[2].(*int)
8272- }
8273- run(
8274- arg0,
8275- arg1,
8276- arg2,
8277- )
8278- })
8279- return _c
8280-}
8281-
8282-func (_c *MockHomepageFavorites_SetShortcut_Call) Return(err error) *MockHomepageFavorites_SetShortcut_Call {
8283- _c.Call.Return(err)
8284- return _c
8285-}
8286-
8287-func (_c *MockHomepageFavorites_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockHomepageFavorites_SetShortcut_Call {
8288- _c.Call.Return(run)
8289- return _c
8290-}
8291-
8292-// TagFavorite provides a mock function for the type MockHomepageFavorites
8293-func (_mock *MockHomepageFavorites) TagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error {
8294- ret := _mock.Called(ctx, favID, tagID)
8295-
8296- if len(ret) == 0 {
8297- panic("no return value specified for TagFavorite")
8298- }
8299-
8300- var r0 error
8301- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok {
8302- r0 = returnFunc(ctx, favID, tagID)
8303- } else {
8304- r0 = ret.Error(0)
8305- }
8306- return r0
8307-}
8308-
8309-// MockHomepageFavorites_TagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TagFavorite'
8310-type MockHomepageFavorites_TagFavorite_Call struct {
8311- *mock.Call
8312-}
8313-
8314-// TagFavorite is a helper method to define mock.On call
8315-// - ctx context.Context
8316-// - favID entity.FavoriteID
8317-// - tagID entity.TagID
8318-func (_e *MockHomepageFavorites_Expecter) TagFavorite(ctx interface{}, favID interface{}, tagID interface{}) *MockHomepageFavorites_TagFavorite_Call {
8319- return &MockHomepageFavorites_TagFavorite_Call{Call: _e.mock.On("TagFavorite", ctx, favID, tagID)}
8320-}
8321-
8322-func (_c *MockHomepageFavorites_TagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_TagFavorite_Call {
8323- _c.Call.Run(func(args mock.Arguments) {
8324- var arg0 context.Context
8325- if args[0] != nil {
8326- arg0 = args[0].(context.Context)
8327- }
8328- var arg1 entity.FavoriteID
8329- if args[1] != nil {
8330- arg1 = args[1].(entity.FavoriteID)
8331- }
8332- var arg2 entity.TagID
8333- if args[2] != nil {
8334- arg2 = args[2].(entity.TagID)
8335- }
8336- run(
8337- arg0,
8338- arg1,
8339- arg2,
8340- )
8341- })
8342- return _c
8343-}
8344-
8345-func (_c *MockHomepageFavorites_TagFavorite_Call) Return(err error) *MockHomepageFavorites_TagFavorite_Call {
8346- _c.Call.Return(err)
8347- return _c
8348-}
8349-
8350-func (_c *MockHomepageFavorites_TagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_TagFavorite_Call {
8351- _c.Call.Return(run)
8352- return _c
8353-}
8354-
8355-// UntagFavorite provides a mock function for the type MockHomepageFavorites
8356-func (_mock *MockHomepageFavorites) UntagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error {
8357- ret := _mock.Called(ctx, favID, tagID)
8358-
8359- if len(ret) == 0 {
8360- panic("no return value specified for UntagFavorite")
8361- }
8362-
8363- var r0 error
8364- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok {
8365- r0 = returnFunc(ctx, favID, tagID)
8366- } else {
8367- r0 = ret.Error(0)
8368- }
8369- return r0
8370-}
8371-
8372-// MockHomepageFavorites_UntagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UntagFavorite'
8373-type MockHomepageFavorites_UntagFavorite_Call struct {
8374- *mock.Call
8375-}
8376-
8377-// UntagFavorite is a helper method to define mock.On call
8378-// - ctx context.Context
8379-// - favID entity.FavoriteID
8380-// - tagID entity.TagID
8381-func (_e *MockHomepageFavorites_Expecter) UntagFavorite(ctx interface{}, favID interface{}, tagID interface{}) *MockHomepageFavorites_UntagFavorite_Call {
8382- return &MockHomepageFavorites_UntagFavorite_Call{Call: _e.mock.On("UntagFavorite", ctx, favID, tagID)}
8383-}
8384-
8385-func (_c *MockHomepageFavorites_UntagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_UntagFavorite_Call {
8386- _c.Call.Run(func(args mock.Arguments) {
8387- var arg0 context.Context
8388- if args[0] != nil {
8389- arg0 = args[0].(context.Context)
8390- }
8391- var arg1 entity.FavoriteID
8392- if args[1] != nil {
8393- arg1 = args[1].(entity.FavoriteID)
8394- }
8395- var arg2 entity.TagID
8396- if args[2] != nil {
8397- arg2 = args[2].(entity.TagID)
8398- }
8399- run(
8400- arg0,
8401- arg1,
8402- arg2,
8403- )
8404- })
8405- return _c
8406-}
8407-
8408-func (_c *MockHomepageFavorites_UntagFavorite_Call) Return(err error) *MockHomepageFavorites_UntagFavorite_Call {
8409- _c.Call.Return(err)
8410- return _c
8411-}
8412-
8413-func (_c *MockHomepageFavorites_UntagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_UntagFavorite_Call {
8414- _c.Call.Return(run)
8415- return _c
8416-}
8417-
8418-// UpdateFavorite provides a mock function for the type MockHomepageFavorites
8419-func (_mock *MockHomepageFavorites) UpdateFavorite(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error) {
8420- ret := _mock.Called(ctx, input)
8421-
8422- if len(ret) == 0 {
8423- panic("no return value specified for UpdateFavorite")
8424- }
8425-
8426- var r0 *entity.Favorite
8427- var r1 error
8428- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) (*entity.Favorite, error)); ok {
8429- return returnFunc(ctx, input)
8430- }
8431- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) *entity.Favorite); ok {
8432- r0 = returnFunc(ctx, input)
8433- } else {
8434- if ret.Get(0) != nil {
8435- r0 = ret.Get(0).(*entity.Favorite)
8436- }
8437- }
8438- if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteUpdateInput) error); ok {
8439- r1 = returnFunc(ctx, input)
8440- } else {
8441- r1 = ret.Error(1)
8442- }
8443- return r0, r1
8444-}
8445-
8446-// MockHomepageFavorites_UpdateFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFavorite'
8447-type MockHomepageFavorites_UpdateFavorite_Call struct {
8448- *mock.Call
8449-}
8450-
8451-// UpdateFavorite is a helper method to define mock.On call
8452-// - ctx context.Context
8453-// - input dto.FavoriteUpdateInput
8454-func (_e *MockHomepageFavorites_Expecter) UpdateFavorite(ctx interface{}, input interface{}) *MockHomepageFavorites_UpdateFavorite_Call {
8455- return &MockHomepageFavorites_UpdateFavorite_Call{Call: _e.mock.On("UpdateFavorite", ctx, input)}
8456-}
8457-
8458-func (_c *MockHomepageFavorites_UpdateFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteUpdateInput)) *MockHomepageFavorites_UpdateFavorite_Call {
8459- _c.Call.Run(func(args mock.Arguments) {
8460- var arg0 context.Context
8461- if args[0] != nil {
8462- arg0 = args[0].(context.Context)
8463- }
8464- var arg1 dto.FavoriteUpdateInput
8465- if args[1] != nil {
8466- arg1 = args[1].(dto.FavoriteUpdateInput)
8467- }
8468- run(
8469- arg0,
8470- arg1,
8471- )
8472- })
8473- return _c
8474-}
8475-
8476-func (_c *MockHomepageFavorites_UpdateFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_UpdateFavorite_Call {
8477- _c.Call.Return(favorite, err)
8478- return _c
8479-}
8480-
8481-func (_c *MockHomepageFavorites_UpdateFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error)) *MockHomepageFavorites_UpdateFavorite_Call {
8482- _c.Call.Return(run)
8483- return _c
8484-}
8485-
8486-// UpdateFolder provides a mock function for the type MockHomepageFavorites
8487-func (_mock *MockHomepageFavorites) UpdateFolder(ctx context.Context, id entity.FolderID, name string, icon string) error {
8488- ret := _mock.Called(ctx, id, name, icon)
8489-
8490- if len(ret) == 0 {
8491- panic("no return value specified for UpdateFolder")
8492- }
8493-
8494- var r0 error
8495- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, string, string) error); ok {
8496- r0 = returnFunc(ctx, id, name, icon)
8497- } else {
8498- r0 = ret.Error(0)
8499- }
8500- return r0
8501-}
8502-
8503-// MockHomepageFavorites_UpdateFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFolder'
8504-type MockHomepageFavorites_UpdateFolder_Call struct {
8505- *mock.Call
8506-}
8507-
8508-// UpdateFolder is a helper method to define mock.On call
8509-// - ctx context.Context
8510-// - id entity.FolderID
8511-// - name string
8512-// - icon string
8513-func (_e *MockHomepageFavorites_Expecter) UpdateFolder(ctx interface{}, id interface{}, name interface{}, icon interface{}) *MockHomepageFavorites_UpdateFolder_Call {
8514- return &MockHomepageFavorites_UpdateFolder_Call{Call: _e.mock.On("UpdateFolder", ctx, id, name, icon)}
8515-}
8516-
8517-func (_c *MockHomepageFavorites_UpdateFolder_Call) Run(run func(ctx context.Context, id entity.FolderID, name string, icon string)) *MockHomepageFavorites_UpdateFolder_Call {
8518- _c.Call.Run(func(args mock.Arguments) {
8519- var arg0 context.Context
8520- if args[0] != nil {
8521- arg0 = args[0].(context.Context)
8522- }
8523- var arg1 entity.FolderID
8524- if args[1] != nil {
8525- arg1 = args[1].(entity.FolderID)
8526- }
8527- var arg2 string
8528- if args[2] != nil {
8529- arg2 = args[2].(string)
8530- }
8531- var arg3 string
8532- if args[3] != nil {
8533- arg3 = args[3].(string)
8534- }
8535- run(
8536- arg0,
8537- arg1,
8538- arg2,
8539- arg3,
8540- )
8541- })
8542- return _c
8543-}
8544-
8545-func (_c *MockHomepageFavorites_UpdateFolder_Call) Return(err error) *MockHomepageFavorites_UpdateFolder_Call {
8546- _c.Call.Return(err)
8547- return _c
8548-}
8549-
8550-func (_c *MockHomepageFavorites_UpdateFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, name string, icon string) error) *MockHomepageFavorites_UpdateFolder_Call {
8551- _c.Call.Return(run)
8552- return _c
8553-}
8554-
8555-// UpdateTag provides a mock function for the type MockHomepageFavorites
8556-func (_mock *MockHomepageFavorites) UpdateTag(ctx context.Context, id entity.TagID, name string, color string) error {
8557- ret := _mock.Called(ctx, id, name, color)
8558-
8559- if len(ret) == 0 {
8560- panic("no return value specified for UpdateTag")
8561- }
8562-
8563- var r0 error
8564- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, string, string) error); ok {
8565- r0 = returnFunc(ctx, id, name, color)
8566- } else {
8567- r0 = ret.Error(0)
8568- }
8569- return r0
8570-}
8571-
8572-// MockHomepageFavorites_UpdateTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTag'
8573-type MockHomepageFavorites_UpdateTag_Call struct {
8574- *mock.Call
8575-}
8576-
8577-// UpdateTag is a helper method to define mock.On call
8578-// - ctx context.Context
8579-// - id entity.TagID
8580-// - name string
8581-// - color string
8582-func (_e *MockHomepageFavorites_Expecter) UpdateTag(ctx interface{}, id interface{}, name interface{}, color interface{}) *MockHomepageFavorites_UpdateTag_Call {
8583- return &MockHomepageFavorites_UpdateTag_Call{Call: _e.mock.On("UpdateTag", ctx, id, name, color)}
8584-}
8585-
8586-func (_c *MockHomepageFavorites_UpdateTag_Call) Run(run func(ctx context.Context, id entity.TagID, name string, color string)) *MockHomepageFavorites_UpdateTag_Call {
8587- _c.Call.Run(func(args mock.Arguments) {
8588- var arg0 context.Context
8589- if args[0] != nil {
8590- arg0 = args[0].(context.Context)
8591- }
8592- var arg1 entity.TagID
8593- if args[1] != nil {
8594- arg1 = args[1].(entity.TagID)
8595- }
8596- var arg2 string
8597- if args[2] != nil {
8598- arg2 = args[2].(string)
8599- }
8600- var arg3 string
8601- if args[3] != nil {
8602- arg3 = args[3].(string)
8603- }
8604- run(
8605- arg0,
8606- arg1,
8607- arg2,
8608- arg3,
8609- )
8610- })
8611- return _c
8612-}
8613-
8614-func (_c *MockHomepageFavorites_UpdateTag_Call) Return(err error) *MockHomepageFavorites_UpdateTag_Call {
8615- _c.Call.Return(err)
8616- return _c
8617-}
8618-
8619-func (_c *MockHomepageFavorites_UpdateTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID, name string, color string) error) *MockHomepageFavorites_UpdateTag_Call {
8620- _c.Call.Return(run)
8621- return _c
8622-}
8623-
8624-// NewMockIdleInhibitor creates a new instance of MockIdleInhibitor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
8625-// The first argument is typically a *testing.T value.
8626-func NewMockIdleInhibitor(t interface {
8627- mock.TestingT
8628- Cleanup(func())
8629-}) *MockIdleInhibitor {
8630- mock := &MockIdleInhibitor{}
8631- mock.Mock.Test(t)
8632-
8633- t.Cleanup(func() { mock.AssertExpectations(t) })
8634-
8635- return mock
8636-}
8637-
8638-// MockIdleInhibitor is an autogenerated mock type for the IdleInhibitor type
8639-type MockIdleInhibitor struct {
8640- mock.Mock
8641-}
8642-
8643-type MockIdleInhibitor_Expecter struct {
8644- mock *mock.Mock
8645-}
8646-
8647-func (_m *MockIdleInhibitor) EXPECT() *MockIdleInhibitor_Expecter {
8648- return &MockIdleInhibitor_Expecter{mock: &_m.Mock}
8649-}
8650-
8651-// Close provides a mock function for the type MockIdleInhibitor
8652-func (_mock *MockIdleInhibitor) Close() error {
8653- ret := _mock.Called()
8654-
8655- if len(ret) == 0 {
8656- panic("no return value specified for Close")
8657- }
8658-
8659- var r0 error
8660- if returnFunc, ok := ret.Get(0).(func() error); ok {
8661- r0 = returnFunc()
8662- } else {
8663- r0 = ret.Error(0)
8664- }
8665- return r0
8666-}
8667-
8668-// MockIdleInhibitor_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
8669-type MockIdleInhibitor_Close_Call struct {
8670- *mock.Call
8671-}
8672-
8673-// Close is a helper method to define mock.On call
8674-func (_e *MockIdleInhibitor_Expecter) Close() *MockIdleInhibitor_Close_Call {
8675- return &MockIdleInhibitor_Close_Call{Call: _e.mock.On("Close")}
8676-}
8677-
8678-func (_c *MockIdleInhibitor_Close_Call) Run(run func()) *MockIdleInhibitor_Close_Call {
8679- _c.Call.Run(func(args mock.Arguments) {
8680- run()
8681- })
8682- return _c
8683-}
8684-
8685-func (_c *MockIdleInhibitor_Close_Call) Return(err error) *MockIdleInhibitor_Close_Call {
8686- _c.Call.Return(err)
8687- return _c
8688-}
8689-
8690-func (_c *MockIdleInhibitor_Close_Call) RunAndReturn(run func() error) *MockIdleInhibitor_Close_Call {
8691- _c.Call.Return(run)
8692- return _c
8693-}
8694-
8695-// Inhibit provides a mock function for the type MockIdleInhibitor
8696-func (_mock *MockIdleInhibitor) Inhibit(ctx context.Context, reason string) error {
8697- ret := _mock.Called(ctx, reason)
8698-
8699- if len(ret) == 0 {
8700- panic("no return value specified for Inhibit")
8701- }
8702-
8703- var r0 error
8704- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
8705- r0 = returnFunc(ctx, reason)
8706- } else {
8707- r0 = ret.Error(0)
8708- }
8709- return r0
8710-}
8711-
8712-// MockIdleInhibitor_Inhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inhibit'
8713-type MockIdleInhibitor_Inhibit_Call struct {
8714- *mock.Call
8715-}
8716-
8717-// Inhibit is a helper method to define mock.On call
8718-// - ctx context.Context
8719-// - reason string
8720-func (_e *MockIdleInhibitor_Expecter) Inhibit(ctx interface{}, reason interface{}) *MockIdleInhibitor_Inhibit_Call {
8721- return &MockIdleInhibitor_Inhibit_Call{Call: _e.mock.On("Inhibit", ctx, reason)}
8722-}
8723-
8724-func (_c *MockIdleInhibitor_Inhibit_Call) Run(run func(ctx context.Context, reason string)) *MockIdleInhibitor_Inhibit_Call {
8725- _c.Call.Run(func(args mock.Arguments) {
8726- var arg0 context.Context
8727- if args[0] != nil {
8728- arg0 = args[0].(context.Context)
8729- }
8730- var arg1 string
8731- if args[1] != nil {
8732- arg1 = args[1].(string)
8733- }
8734- run(
8735- arg0,
8736- arg1,
8737- )
8738- })
8739- return _c
8740-}
8741-
8742-func (_c *MockIdleInhibitor_Inhibit_Call) Return(err error) *MockIdleInhibitor_Inhibit_Call {
8743- _c.Call.Return(err)
8744- return _c
8745-}
8746-
8747-func (_c *MockIdleInhibitor_Inhibit_Call) RunAndReturn(run func(ctx context.Context, reason string) error) *MockIdleInhibitor_Inhibit_Call {
8748- _c.Call.Return(run)
8749- return _c
8750-}
8751-
8752-// IsInhibited provides a mock function for the type MockIdleInhibitor
8753-func (_mock *MockIdleInhibitor) IsInhibited() bool {
8754- ret := _mock.Called()
8755-
8756- if len(ret) == 0 {
8757- panic("no return value specified for IsInhibited")
8758- }
8759-
8760- var r0 bool
8761- if returnFunc, ok := ret.Get(0).(func() bool); ok {
8762- r0 = returnFunc()
8763- } else {
8764- r0 = ret.Get(0).(bool)
8765- }
8766- return r0
8767-}
8768-
8769-// MockIdleInhibitor_IsInhibited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInhibited'
8770-type MockIdleInhibitor_IsInhibited_Call struct {
8771- *mock.Call
8772-}
8773-
8774-// IsInhibited is a helper method to define mock.On call
8775-func (_e *MockIdleInhibitor_Expecter) IsInhibited() *MockIdleInhibitor_IsInhibited_Call {
8776- return &MockIdleInhibitor_IsInhibited_Call{Call: _e.mock.On("IsInhibited")}
8777-}
8778-
8779-func (_c *MockIdleInhibitor_IsInhibited_Call) Run(run func()) *MockIdleInhibitor_IsInhibited_Call {
8780- _c.Call.Run(func(args mock.Arguments) {
8781- run()
8782- })
8783- return _c
8784-}
8785-
8786-func (_c *MockIdleInhibitor_IsInhibited_Call) Return(b bool) *MockIdleInhibitor_IsInhibited_Call {
8787- _c.Call.Return(b)
8788- return _c
8789-}
8790-
8791-func (_c *MockIdleInhibitor_IsInhibited_Call) RunAndReturn(run func() bool) *MockIdleInhibitor_IsInhibited_Call {
8792- _c.Call.Return(run)
8793- return _c
8794-}
8795-
8796-// Uninhibit provides a mock function for the type MockIdleInhibitor
8797-func (_mock *MockIdleInhibitor) Uninhibit(ctx context.Context) error {
8798- ret := _mock.Called(ctx)
8799-
8800- if len(ret) == 0 {
8801- panic("no return value specified for Uninhibit")
8802- }
8803-
8804- var r0 error
8805- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
8806- r0 = returnFunc(ctx)
8807- } else {
8808- r0 = ret.Error(0)
8809- }
8810- return r0
8811-}
8812-
8813-// MockIdleInhibitor_Uninhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninhibit'
8814-type MockIdleInhibitor_Uninhibit_Call struct {
8815- *mock.Call
8816-}
8817-
8818-// Uninhibit is a helper method to define mock.On call
8819-// - ctx context.Context
8820-func (_e *MockIdleInhibitor_Expecter) Uninhibit(ctx interface{}) *MockIdleInhibitor_Uninhibit_Call {
8821- return &MockIdleInhibitor_Uninhibit_Call{Call: _e.mock.On("Uninhibit", ctx)}
8822-}
8823-
8824-func (_c *MockIdleInhibitor_Uninhibit_Call) Run(run func(ctx context.Context)) *MockIdleInhibitor_Uninhibit_Call {
8825- _c.Call.Run(func(args mock.Arguments) {
8826- var arg0 context.Context
8827- if args[0] != nil {
8828- arg0 = args[0].(context.Context)
8829- }
8830- run(
8831- arg0,
8832- )
8833- })
8834- return _c
8835-}
8836-
8837-func (_c *MockIdleInhibitor_Uninhibit_Call) Return(err error) *MockIdleInhibitor_Uninhibit_Call {
8838- _c.Call.Return(err)
8839- return _c
8840-}
8841-
8842-func (_c *MockIdleInhibitor_Uninhibit_Call) RunAndReturn(run func(ctx context.Context) error) *MockIdleInhibitor_Uninhibit_Call {
8843- _c.Call.Return(run)
8844- return _c
8845-}
8846-
8847-// NewMockImageDataResolver creates a new instance of MockImageDataResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
8848-// The first argument is typically a *testing.T value.
8849-func NewMockImageDataResolver(t interface {
8850- mock.TestingT
8851- Cleanup(func())
8852-}) *MockImageDataResolver {
8853- mock := &MockImageDataResolver{}
8854- mock.Mock.Test(t)
8855-
8856- t.Cleanup(func() { mock.AssertExpectations(t) })
8857-
8858- return mock
8859-}
8860-
8861-// MockImageDataResolver is an autogenerated mock type for the ImageDataResolver type
8862-type MockImageDataResolver struct {
8863- mock.Mock
8864-}
8865-
8866-type MockImageDataResolver_Expecter struct {
8867- mock *mock.Mock
8868-}
8869-
8870-func (_m *MockImageDataResolver) EXPECT() *MockImageDataResolver_Expecter {
8871- return &MockImageDataResolver_Expecter{mock: &_m.Mock}
8872-}
8873-
8874-// ResolveImageData provides a mock function for the type MockImageDataResolver
8875-func (_mock *MockImageDataResolver) ResolveImageData(ctx context.Context, uri string) (entity.ImageData, error) {
8876- ret := _mock.Called(ctx, uri)
8877-
8878- if len(ret) == 0 {
8879- panic("no return value specified for ResolveImageData")
8880- }
8881-
8882- var r0 entity.ImageData
8883- var r1 error
8884- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (entity.ImageData, error)); ok {
8885- return returnFunc(ctx, uri)
8886- }
8887- if returnFunc, ok := ret.Get(0).(func(context.Context, string) entity.ImageData); ok {
8888- r0 = returnFunc(ctx, uri)
8889- } else {
8890- r0 = ret.Get(0).(entity.ImageData)
8891- }
8892- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
8893- r1 = returnFunc(ctx, uri)
8894- } else {
8895- r1 = ret.Error(1)
8896- }
8897- return r0, r1
8898-}
8899-
8900-// MockImageDataResolver_ResolveImageData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveImageData'
8901-type MockImageDataResolver_ResolveImageData_Call struct {
8902- *mock.Call
8903-}
8904-
8905-// ResolveImageData is a helper method to define mock.On call
8906-// - ctx context.Context
8907-// - uri string
8908-func (_e *MockImageDataResolver_Expecter) ResolveImageData(ctx interface{}, uri interface{}) *MockImageDataResolver_ResolveImageData_Call {
8909- return &MockImageDataResolver_ResolveImageData_Call{Call: _e.mock.On("ResolveImageData", ctx, uri)}
8910-}
8911-
8912-func (_c *MockImageDataResolver_ResolveImageData_Call) Run(run func(ctx context.Context, uri string)) *MockImageDataResolver_ResolveImageData_Call {
8913- _c.Call.Run(func(args mock.Arguments) {
8914- var arg0 context.Context
8915- if args[0] != nil {
8916- arg0 = args[0].(context.Context)
8917- }
8918- var arg1 string
8919- if args[1] != nil {
8920- arg1 = args[1].(string)
8921- }
8922- run(
8923- arg0,
8924- arg1,
8925- )
8926- })
8927- return _c
8928-}
8929-
8930-func (_c *MockImageDataResolver_ResolveImageData_Call) Return(imageData entity.ImageData, err error) *MockImageDataResolver_ResolveImageData_Call {
8931- _c.Call.Return(imageData, err)
8932- return _c
8933-}
8934-
8935-func (_c *MockImageDataResolver_ResolveImageData_Call) RunAndReturn(run func(ctx context.Context, uri string) (entity.ImageData, error)) *MockImageDataResolver_ResolveImageData_Call {
8936- _c.Call.Return(run)
8937- return _c
8938-}
8939-
8940-// NewMockResolvedImageSaver creates a new instance of MockResolvedImageSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
8941-// The first argument is typically a *testing.T value.
8942-func NewMockResolvedImageSaver(t interface {
8943- mock.TestingT
8944- Cleanup(func())
8945-}) *MockResolvedImageSaver {
8946- mock := &MockResolvedImageSaver{}
8947- mock.Mock.Test(t)
8948-
8949- t.Cleanup(func() { mock.AssertExpectations(t) })
8950-
8951- return mock
8952-}
8953-
8954-// MockResolvedImageSaver is an autogenerated mock type for the ResolvedImageSaver type
8955-type MockResolvedImageSaver struct {
8956- mock.Mock
8957-}
8958-
8959-type MockResolvedImageSaver_Expecter struct {
8960- mock *mock.Mock
8961-}
8962-
8963-func (_m *MockResolvedImageSaver) EXPECT() *MockResolvedImageSaver_Expecter {
8964- return &MockResolvedImageSaver_Expecter{mock: &_m.Mock}
8965-}
8966-
8967-// SaveResolvedImage provides a mock function for the type MockResolvedImageSaver
8968-func (_mock *MockResolvedImageSaver) SaveResolvedImage(ctx context.Context, image entity.ImageData, menuContext port.MenuContext) error {
8969- ret := _mock.Called(ctx, image, menuContext)
8970-
8971- if len(ret) == 0 {
8972- panic("no return value specified for SaveResolvedImage")
8973- }
8974-
8975- var r0 error
8976- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.ImageData, port.MenuContext) error); ok {
8977- r0 = returnFunc(ctx, image, menuContext)
8978- } else {
8979- r0 = ret.Error(0)
8980- }
8981- return r0
8982-}
8983-
8984-// MockResolvedImageSaver_SaveResolvedImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveResolvedImage'
8985-type MockResolvedImageSaver_SaveResolvedImage_Call struct {
8986- *mock.Call
8987-}
8988-
8989-// SaveResolvedImage is a helper method to define mock.On call
8990-// - ctx context.Context
8991-// - image entity.ImageData
8992-// - menuContext port.MenuContext
8993-func (_e *MockResolvedImageSaver_Expecter) SaveResolvedImage(ctx interface{}, image interface{}, menuContext interface{}) *MockResolvedImageSaver_SaveResolvedImage_Call {
8994- return &MockResolvedImageSaver_SaveResolvedImage_Call{Call: _e.mock.On("SaveResolvedImage", ctx, image, menuContext)}
8995-}
8996-
8997-func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) Run(run func(ctx context.Context, image entity.ImageData, menuContext port.MenuContext)) *MockResolvedImageSaver_SaveResolvedImage_Call {
8998- _c.Call.Run(func(args mock.Arguments) {
8999- var arg0 context.Context
9000- if args[0] != nil {
9001- arg0 = args[0].(context.Context)
9002- }
9003- var arg1 entity.ImageData
9004- if args[1] != nil {
9005- arg1 = args[1].(entity.ImageData)
9006- }
9007- var arg2 port.MenuContext
9008- if args[2] != nil {
9009- arg2 = args[2].(port.MenuContext)
9010- }
9011- run(
9012- arg0,
9013- arg1,
9014- arg2,
9015- )
9016- })
9017- return _c
9018-}
9019-
9020-func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) Return(err error) *MockResolvedImageSaver_SaveResolvedImage_Call {
9021- _c.Call.Return(err)
9022- return _c
9023-}
9024-
9025-func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) RunAndReturn(run func(ctx context.Context, image entity.ImageData, menuContext port.MenuContext) error) *MockResolvedImageSaver_SaveResolvedImage_Call {
9026- _c.Call.Return(run)
9027- return _c
9028-}
9029-
9030-// NewMockKeybindingsProvider creates a new instance of MockKeybindingsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9031-// The first argument is typically a *testing.T value.
9032-func NewMockKeybindingsProvider(t interface {
9033- mock.TestingT
9034- Cleanup(func())
9035-}) *MockKeybindingsProvider {
9036- mock := &MockKeybindingsProvider{}
9037- mock.Mock.Test(t)
9038-
9039- t.Cleanup(func() { mock.AssertExpectations(t) })
9040-
9041- return mock
9042-}
9043-
9044-// MockKeybindingsProvider is an autogenerated mock type for the KeybindingsProvider type
9045-type MockKeybindingsProvider struct {
9046- mock.Mock
9047-}
9048-
9049-type MockKeybindingsProvider_Expecter struct {
9050- mock *mock.Mock
9051-}
9052-
9053-func (_m *MockKeybindingsProvider) EXPECT() *MockKeybindingsProvider_Expecter {
9054- return &MockKeybindingsProvider_Expecter{mock: &_m.Mock}
9055-}
9056-
9057-// CheckConflicts provides a mock function for the type MockKeybindingsProvider
9058-func (_mock *MockKeybindingsProvider) CheckConflicts(ctx context.Context, mode string, action string, keys []string) ([]port.KeybindingConflict, error) {
9059- ret := _mock.Called(ctx, mode, action, keys)
9060-
9061- if len(ret) == 0 {
9062- panic("no return value specified for CheckConflicts")
9063- }
9064-
9065- var r0 []port.KeybindingConflict
9066- var r1 error
9067- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []string) ([]port.KeybindingConflict, error)); ok {
9068- return returnFunc(ctx, mode, action, keys)
9069- }
9070- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []string) []port.KeybindingConflict); ok {
9071- r0 = returnFunc(ctx, mode, action, keys)
9072- } else {
9073- if ret.Get(0) != nil {
9074- r0 = ret.Get(0).([]port.KeybindingConflict)
9075- }
9076- }
9077- if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, []string) error); ok {
9078- r1 = returnFunc(ctx, mode, action, keys)
9079- } else {
9080- r1 = ret.Error(1)
9081- }
9082- return r0, r1
9083-}
9084-
9085-// MockKeybindingsProvider_CheckConflicts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckConflicts'
9086-type MockKeybindingsProvider_CheckConflicts_Call struct {
9087- *mock.Call
9088-}
9089-
9090-// CheckConflicts is a helper method to define mock.On call
9091-// - ctx context.Context
9092-// - mode string
9093-// - action string
9094-// - keys []string
9095-func (_e *MockKeybindingsProvider_Expecter) CheckConflicts(ctx interface{}, mode interface{}, action interface{}, keys interface{}) *MockKeybindingsProvider_CheckConflicts_Call {
9096- return &MockKeybindingsProvider_CheckConflicts_Call{Call: _e.mock.On("CheckConflicts", ctx, mode, action, keys)}
9097-}
9098-
9099-func (_c *MockKeybindingsProvider_CheckConflicts_Call) Run(run func(ctx context.Context, mode string, action string, keys []string)) *MockKeybindingsProvider_CheckConflicts_Call {
9100- _c.Call.Run(func(args mock.Arguments) {
9101- var arg0 context.Context
9102- if args[0] != nil {
9103- arg0 = args[0].(context.Context)
9104- }
9105- var arg1 string
9106- if args[1] != nil {
9107- arg1 = args[1].(string)
9108- }
9109- var arg2 string
9110- if args[2] != nil {
9111- arg2 = args[2].(string)
9112- }
9113- var arg3 []string
9114- if args[3] != nil {
9115- arg3 = args[3].([]string)
9116- }
9117- run(
9118- arg0,
9119- arg1,
9120- arg2,
9121- arg3,
9122- )
9123- })
9124- return _c
9125-}
9126-
9127-func (_c *MockKeybindingsProvider_CheckConflicts_Call) Return(keybindingConflicts []port.KeybindingConflict, err error) *MockKeybindingsProvider_CheckConflicts_Call {
9128- _c.Call.Return(keybindingConflicts, err)
9129- return _c
9130-}
9131-
9132-func (_c *MockKeybindingsProvider_CheckConflicts_Call) RunAndReturn(run func(ctx context.Context, mode string, action string, keys []string) ([]port.KeybindingConflict, error)) *MockKeybindingsProvider_CheckConflicts_Call {
9133- _c.Call.Return(run)
9134- return _c
9135-}
9136-
9137-// GetDefaultKeybindings provides a mock function for the type MockKeybindingsProvider
9138-func (_mock *MockKeybindingsProvider) GetDefaultKeybindings(ctx context.Context) (port.KeybindingsConfig, error) {
9139- ret := _mock.Called(ctx)
9140-
9141- if len(ret) == 0 {
9142- panic("no return value specified for GetDefaultKeybindings")
9143- }
9144-
9145- var r0 port.KeybindingsConfig
9146- var r1 error
9147- if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok {
9148- return returnFunc(ctx)
9149- }
9150- if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok {
9151- r0 = returnFunc(ctx)
9152- } else {
9153- r0 = ret.Get(0).(port.KeybindingsConfig)
9154- }
9155- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
9156- r1 = returnFunc(ctx)
9157- } else {
9158- r1 = ret.Error(1)
9159- }
9160- return r0, r1
9161-}
9162-
9163-// MockKeybindingsProvider_GetDefaultKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultKeybindings'
9164-type MockKeybindingsProvider_GetDefaultKeybindings_Call struct {
9165- *mock.Call
9166-}
9167-
9168-// GetDefaultKeybindings is a helper method to define mock.On call
9169-// - ctx context.Context
9170-func (_e *MockKeybindingsProvider_Expecter) GetDefaultKeybindings(ctx interface{}) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
9171- return &MockKeybindingsProvider_GetDefaultKeybindings_Call{Call: _e.mock.On("GetDefaultKeybindings", ctx)}
9172-}
9173-
9174-func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
9175- _c.Call.Run(func(args mock.Arguments) {
9176- var arg0 context.Context
9177- if args[0] != nil {
9178- arg0 = args[0].(context.Context)
9179- }
9180- run(
9181- arg0,
9182- )
9183- })
9184- return _c
9185-}
9186-
9187-func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
9188- _c.Call.Return(keybindingsConfig, err)
9189- return _c
9190-}
9191-
9192-func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsProvider_GetDefaultKeybindings_Call {
9193- _c.Call.Return(run)
9194- return _c
9195-}
9196-
9197-// GetKeybindings provides a mock function for the type MockKeybindingsProvider
9198-func (_mock *MockKeybindingsProvider) GetKeybindings(ctx context.Context) (port.KeybindingsConfig, error) {
9199- ret := _mock.Called(ctx)
9200-
9201- if len(ret) == 0 {
9202- panic("no return value specified for GetKeybindings")
9203- }
9204-
9205- var r0 port.KeybindingsConfig
9206- var r1 error
9207- if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok {
9208- return returnFunc(ctx)
9209- }
9210- if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok {
9211- r0 = returnFunc(ctx)
9212- } else {
9213- r0 = ret.Get(0).(port.KeybindingsConfig)
9214- }
9215- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
9216- r1 = returnFunc(ctx)
9217- } else {
9218- r1 = ret.Error(1)
9219- }
9220- return r0, r1
9221-}
9222-
9223-// MockKeybindingsProvider_GetKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeybindings'
9224-type MockKeybindingsProvider_GetKeybindings_Call struct {
9225- *mock.Call
9226-}
9227-
9228-// GetKeybindings is a helper method to define mock.On call
9229-// - ctx context.Context
9230-func (_e *MockKeybindingsProvider_Expecter) GetKeybindings(ctx interface{}) *MockKeybindingsProvider_GetKeybindings_Call {
9231- return &MockKeybindingsProvider_GetKeybindings_Call{Call: _e.mock.On("GetKeybindings", ctx)}
9232-}
9233-
9234-func (_c *MockKeybindingsProvider_GetKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsProvider_GetKeybindings_Call {
9235- _c.Call.Run(func(args mock.Arguments) {
9236- var arg0 context.Context
9237- if args[0] != nil {
9238- arg0 = args[0].(context.Context)
9239- }
9240- run(
9241- arg0,
9242- )
9243- })
9244- return _c
9245-}
9246-
9247-func (_c *MockKeybindingsProvider_GetKeybindings_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsProvider_GetKeybindings_Call {
9248- _c.Call.Return(keybindingsConfig, err)
9249- return _c
9250-}
9251-
9252-func (_c *MockKeybindingsProvider_GetKeybindings_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsProvider_GetKeybindings_Call {
9253- _c.Call.Return(run)
9254- return _c
9255-}
9256-
9257-// NewMockKeybindingsSaver creates a new instance of MockKeybindingsSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9258-// The first argument is typically a *testing.T value.
9259-func NewMockKeybindingsSaver(t interface {
9260- mock.TestingT
9261- Cleanup(func())
9262-}) *MockKeybindingsSaver {
9263- mock := &MockKeybindingsSaver{}
9264- mock.Mock.Test(t)
9265-
9266- t.Cleanup(func() { mock.AssertExpectations(t) })
9267-
9268- return mock
9269-}
9270-
9271-// MockKeybindingsSaver is an autogenerated mock type for the KeybindingsSaver type
9272-type MockKeybindingsSaver struct {
9273- mock.Mock
9274-}
9275-
9276-type MockKeybindingsSaver_Expecter struct {
9277- mock *mock.Mock
9278-}
9279-
9280-func (_m *MockKeybindingsSaver) EXPECT() *MockKeybindingsSaver_Expecter {
9281- return &MockKeybindingsSaver_Expecter{mock: &_m.Mock}
9282-}
9283-
9284-// ResetAllKeybindings provides a mock function for the type MockKeybindingsSaver
9285-func (_mock *MockKeybindingsSaver) ResetAllKeybindings(ctx context.Context) error {
9286- ret := _mock.Called(ctx)
9287-
9288- if len(ret) == 0 {
9289- panic("no return value specified for ResetAllKeybindings")
9290- }
9291-
9292- var r0 error
9293- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
9294- r0 = returnFunc(ctx)
9295- } else {
9296- r0 = ret.Error(0)
9297- }
9298- return r0
9299-}
9300-
9301-// MockKeybindingsSaver_ResetAllKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetAllKeybindings'
9302-type MockKeybindingsSaver_ResetAllKeybindings_Call struct {
9303- *mock.Call
9304-}
9305-
9306-// ResetAllKeybindings is a helper method to define mock.On call
9307-// - ctx context.Context
9308-func (_e *MockKeybindingsSaver_Expecter) ResetAllKeybindings(ctx interface{}) *MockKeybindingsSaver_ResetAllKeybindings_Call {
9309- return &MockKeybindingsSaver_ResetAllKeybindings_Call{Call: _e.mock.On("ResetAllKeybindings", ctx)}
9310-}
9311-
9312-func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsSaver_ResetAllKeybindings_Call {
9313- _c.Call.Run(func(args mock.Arguments) {
9314- var arg0 context.Context
9315- if args[0] != nil {
9316- arg0 = args[0].(context.Context)
9317- }
9318- run(
9319- arg0,
9320- )
9321- })
9322- return _c
9323-}
9324-
9325-func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) Return(err error) *MockKeybindingsSaver_ResetAllKeybindings_Call {
9326- _c.Call.Return(err)
9327- return _c
9328-}
9329-
9330-func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) RunAndReturn(run func(ctx context.Context) error) *MockKeybindingsSaver_ResetAllKeybindings_Call {
9331- _c.Call.Return(run)
9332- return _c
9333-}
9334-
9335-// ResetKeybinding provides a mock function for the type MockKeybindingsSaver
9336-func (_mock *MockKeybindingsSaver) ResetKeybinding(ctx context.Context, req port.ResetKeybindingRequest) error {
9337- ret := _mock.Called(ctx, req)
9338-
9339- if len(ret) == 0 {
9340- panic("no return value specified for ResetKeybinding")
9341- }
9342-
9343- var r0 error
9344- if returnFunc, ok := ret.Get(0).(func(context.Context, port.ResetKeybindingRequest) error); ok {
9345- r0 = returnFunc(ctx, req)
9346- } else {
9347- r0 = ret.Error(0)
9348- }
9349- return r0
9350-}
9351-
9352-// MockKeybindingsSaver_ResetKeybinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetKeybinding'
9353-type MockKeybindingsSaver_ResetKeybinding_Call struct {
9354- *mock.Call
9355-}
9356-
9357-// ResetKeybinding is a helper method to define mock.On call
9358-// - ctx context.Context
9359-// - req port.ResetKeybindingRequest
9360-func (_e *MockKeybindingsSaver_Expecter) ResetKeybinding(ctx interface{}, req interface{}) *MockKeybindingsSaver_ResetKeybinding_Call {
9361- return &MockKeybindingsSaver_ResetKeybinding_Call{Call: _e.mock.On("ResetKeybinding", ctx, req)}
9362-}
9363-
9364-func (_c *MockKeybindingsSaver_ResetKeybinding_Call) Run(run func(ctx context.Context, req port.ResetKeybindingRequest)) *MockKeybindingsSaver_ResetKeybinding_Call {
9365- _c.Call.Run(func(args mock.Arguments) {
9366- var arg0 context.Context
9367- if args[0] != nil {
9368- arg0 = args[0].(context.Context)
9369- }
9370- var arg1 port.ResetKeybindingRequest
9371- if args[1] != nil {
9372- arg1 = args[1].(port.ResetKeybindingRequest)
9373- }
9374- run(
9375- arg0,
9376- arg1,
9377- )
9378- })
9379- return _c
9380-}
9381-
9382-func (_c *MockKeybindingsSaver_ResetKeybinding_Call) Return(err error) *MockKeybindingsSaver_ResetKeybinding_Call {
9383- _c.Call.Return(err)
9384- return _c
9385-}
9386-
9387-func (_c *MockKeybindingsSaver_ResetKeybinding_Call) RunAndReturn(run func(ctx context.Context, req port.ResetKeybindingRequest) error) *MockKeybindingsSaver_ResetKeybinding_Call {
9388- _c.Call.Return(run)
9389- return _c
9390-}
9391-
9392-// SetKeybinding provides a mock function for the type MockKeybindingsSaver
9393-func (_mock *MockKeybindingsSaver) SetKeybinding(ctx context.Context, req port.SetKeybindingRequest) error {
9394- ret := _mock.Called(ctx, req)
9395-
9396- if len(ret) == 0 {
9397- panic("no return value specified for SetKeybinding")
9398- }
9399-
9400- var r0 error
9401- if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) error); ok {
9402- r0 = returnFunc(ctx, req)
9403- } else {
9404- r0 = ret.Error(0)
9405- }
9406- return r0
9407-}
9408-
9409-// MockKeybindingsSaver_SetKeybinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetKeybinding'
9410-type MockKeybindingsSaver_SetKeybinding_Call struct {
9411- *mock.Call
9412-}
9413-
9414-// SetKeybinding is a helper method to define mock.On call
9415-// - ctx context.Context
9416-// - req port.SetKeybindingRequest
9417-func (_e *MockKeybindingsSaver_Expecter) SetKeybinding(ctx interface{}, req interface{}) *MockKeybindingsSaver_SetKeybinding_Call {
9418- return &MockKeybindingsSaver_SetKeybinding_Call{Call: _e.mock.On("SetKeybinding", ctx, req)}
9419-}
9420-
9421-func (_c *MockKeybindingsSaver_SetKeybinding_Call) Run(run func(ctx context.Context, req port.SetKeybindingRequest)) *MockKeybindingsSaver_SetKeybinding_Call {
9422- _c.Call.Run(func(args mock.Arguments) {
9423- var arg0 context.Context
9424- if args[0] != nil {
9425- arg0 = args[0].(context.Context)
9426- }
9427- var arg1 port.SetKeybindingRequest
9428- if args[1] != nil {
9429- arg1 = args[1].(port.SetKeybindingRequest)
9430- }
9431- run(
9432- arg0,
9433- arg1,
9434- )
9435- })
9436- return _c
9437-}
9438-
9439-func (_c *MockKeybindingsSaver_SetKeybinding_Call) Return(err error) *MockKeybindingsSaver_SetKeybinding_Call {
9440- _c.Call.Return(err)
9441- return _c
9442-}
9443-
9444-func (_c *MockKeybindingsSaver_SetKeybinding_Call) RunAndReturn(run func(ctx context.Context, req port.SetKeybindingRequest) error) *MockKeybindingsSaver_SetKeybinding_Call {
9445- _c.Call.Return(run)
9446- return _c
9447-}
9448-
9449-// NewMockKeybindingsGetter creates a new instance of MockKeybindingsGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9450-// The first argument is typically a *testing.T value.
9451-func NewMockKeybindingsGetter(t interface {
9452- mock.TestingT
9453- Cleanup(func())
9454-}) *MockKeybindingsGetter {
9455- mock := &MockKeybindingsGetter{}
9456- mock.Mock.Test(t)
9457-
9458- t.Cleanup(func() { mock.AssertExpectations(t) })
9459-
9460- return mock
9461-}
9462-
9463-// MockKeybindingsGetter is an autogenerated mock type for the KeybindingsGetter type
9464-type MockKeybindingsGetter struct {
9465- mock.Mock
9466-}
9467-
9468-type MockKeybindingsGetter_Expecter struct {
9469- mock *mock.Mock
9470-}
9471-
9472-func (_m *MockKeybindingsGetter) EXPECT() *MockKeybindingsGetter_Expecter {
9473- return &MockKeybindingsGetter_Expecter{mock: &_m.Mock}
9474-}
9475-
9476-// Execute provides a mock function for the type MockKeybindingsGetter
9477-func (_mock *MockKeybindingsGetter) Execute(ctx context.Context) (port.KeybindingsConfig, error) {
9478- ret := _mock.Called(ctx)
9479-
9480- if len(ret) == 0 {
9481- panic("no return value specified for Execute")
9482- }
9483-
9484- var r0 port.KeybindingsConfig
9485- var r1 error
9486- if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok {
9487- return returnFunc(ctx)
9488- }
9489- if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok {
9490- r0 = returnFunc(ctx)
9491- } else {
9492- r0 = ret.Get(0).(port.KeybindingsConfig)
9493- }
9494- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
9495- r1 = returnFunc(ctx)
9496- } else {
9497- r1 = ret.Error(1)
9498- }
9499- return r0, r1
9500-}
9501-
9502-// MockKeybindingsGetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
9503-type MockKeybindingsGetter_Execute_Call struct {
9504- *mock.Call
9505-}
9506-
9507-// Execute is a helper method to define mock.On call
9508-// - ctx context.Context
9509-func (_e *MockKeybindingsGetter_Expecter) Execute(ctx interface{}) *MockKeybindingsGetter_Execute_Call {
9510- return &MockKeybindingsGetter_Execute_Call{Call: _e.mock.On("Execute", ctx)}
9511-}
9512-
9513-func (_c *MockKeybindingsGetter_Execute_Call) Run(run func(ctx context.Context)) *MockKeybindingsGetter_Execute_Call {
9514- _c.Call.Run(func(args mock.Arguments) {
9515- var arg0 context.Context
9516- if args[0] != nil {
9517- arg0 = args[0].(context.Context)
9518- }
9519- run(
9520- arg0,
9521- )
9522- })
9523- return _c
9524-}
9525-
9526-func (_c *MockKeybindingsGetter_Execute_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsGetter_Execute_Call {
9527- _c.Call.Return(keybindingsConfig, err)
9528- return _c
9529-}
9530-
9531-func (_c *MockKeybindingsGetter_Execute_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsGetter_Execute_Call {
9532- _c.Call.Return(run)
9533- return _c
9534-}
9535-
9536-// NewMockKeybindingSetter creates a new instance of MockKeybindingSetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9537-// The first argument is typically a *testing.T value.
9538-func NewMockKeybindingSetter(t interface {
9539- mock.TestingT
9540- Cleanup(func())
9541-}) *MockKeybindingSetter {
9542- mock := &MockKeybindingSetter{}
9543- mock.Mock.Test(t)
9544-
9545- t.Cleanup(func() { mock.AssertExpectations(t) })
9546-
9547- return mock
9548-}
9549-
9550-// MockKeybindingSetter is an autogenerated mock type for the KeybindingSetter type
9551-type MockKeybindingSetter struct {
9552- mock.Mock
9553-}
9554-
9555-type MockKeybindingSetter_Expecter struct {
9556- mock *mock.Mock
9557-}
9558-
9559-func (_m *MockKeybindingSetter) EXPECT() *MockKeybindingSetter_Expecter {
9560- return &MockKeybindingSetter_Expecter{mock: &_m.Mock}
9561-}
9562-
9563-// Execute provides a mock function for the type MockKeybindingSetter
9564-func (_mock *MockKeybindingSetter) Execute(ctx context.Context, req port.SetKeybindingRequest) (port.SetKeybindingResponse, error) {
9565- ret := _mock.Called(ctx, req)
9566-
9567- if len(ret) == 0 {
9568- panic("no return value specified for Execute")
9569- }
9570-
9571- var r0 port.SetKeybindingResponse
9572- var r1 error
9573- if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) (port.SetKeybindingResponse, error)); ok {
9574- return returnFunc(ctx, req)
9575- }
9576- if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) port.SetKeybindingResponse); ok {
9577- r0 = returnFunc(ctx, req)
9578- } else {
9579- r0 = ret.Get(0).(port.SetKeybindingResponse)
9580- }
9581- if returnFunc, ok := ret.Get(1).(func(context.Context, port.SetKeybindingRequest) error); ok {
9582- r1 = returnFunc(ctx, req)
9583- } else {
9584- r1 = ret.Error(1)
9585- }
9586- return r0, r1
9587-}
9588-
9589-// MockKeybindingSetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
9590-type MockKeybindingSetter_Execute_Call struct {
9591- *mock.Call
9592-}
9593-
9594-// Execute is a helper method to define mock.On call
9595-// - ctx context.Context
9596-// - req port.SetKeybindingRequest
9597-func (_e *MockKeybindingSetter_Expecter) Execute(ctx interface{}, req interface{}) *MockKeybindingSetter_Execute_Call {
9598- return &MockKeybindingSetter_Execute_Call{Call: _e.mock.On("Execute", ctx, req)}
9599-}
9600-
9601-func (_c *MockKeybindingSetter_Execute_Call) Run(run func(ctx context.Context, req port.SetKeybindingRequest)) *MockKeybindingSetter_Execute_Call {
9602- _c.Call.Run(func(args mock.Arguments) {
9603- var arg0 context.Context
9604- if args[0] != nil {
9605- arg0 = args[0].(context.Context)
9606- }
9607- var arg1 port.SetKeybindingRequest
9608- if args[1] != nil {
9609- arg1 = args[1].(port.SetKeybindingRequest)
9610- }
9611- run(
9612- arg0,
9613- arg1,
9614- )
9615- })
9616- return _c
9617-}
9618-
9619-func (_c *MockKeybindingSetter_Execute_Call) Return(setKeybindingResponse port.SetKeybindingResponse, err error) *MockKeybindingSetter_Execute_Call {
9620- _c.Call.Return(setKeybindingResponse, err)
9621- return _c
9622-}
9623-
9624-func (_c *MockKeybindingSetter_Execute_Call) RunAndReturn(run func(ctx context.Context, req port.SetKeybindingRequest) (port.SetKeybindingResponse, error)) *MockKeybindingSetter_Execute_Call {
9625- _c.Call.Return(run)
9626- return _c
9627-}
9628-
9629-// NewMockKeybindingResetter creates a new instance of MockKeybindingResetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9630-// The first argument is typically a *testing.T value.
9631-func NewMockKeybindingResetter(t interface {
9632- mock.TestingT
9633- Cleanup(func())
9634-}) *MockKeybindingResetter {
9635- mock := &MockKeybindingResetter{}
9636- mock.Mock.Test(t)
9637-
9638- t.Cleanup(func() { mock.AssertExpectations(t) })
9639-
9640- return mock
9641-}
9642-
9643-// MockKeybindingResetter is an autogenerated mock type for the KeybindingResetter type
9644-type MockKeybindingResetter struct {
9645- mock.Mock
9646-}
9647-
9648-type MockKeybindingResetter_Expecter struct {
9649- mock *mock.Mock
9650-}
9651-
9652-func (_m *MockKeybindingResetter) EXPECT() *MockKeybindingResetter_Expecter {
9653- return &MockKeybindingResetter_Expecter{mock: &_m.Mock}
9654-}
9655-
9656-// Execute provides a mock function for the type MockKeybindingResetter
9657-func (_mock *MockKeybindingResetter) Execute(ctx context.Context, req port.ResetKeybindingRequest) error {
9658- ret := _mock.Called(ctx, req)
9659-
9660- if len(ret) == 0 {
9661- panic("no return value specified for Execute")
9662- }
9663-
9664- var r0 error
9665- if returnFunc, ok := ret.Get(0).(func(context.Context, port.ResetKeybindingRequest) error); ok {
9666- r0 = returnFunc(ctx, req)
9667- } else {
9668- r0 = ret.Error(0)
9669- }
9670- return r0
9671-}
9672-
9673-// MockKeybindingResetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
9674-type MockKeybindingResetter_Execute_Call struct {
9675- *mock.Call
9676-}
9677-
9678-// Execute is a helper method to define mock.On call
9679-// - ctx context.Context
9680-// - req port.ResetKeybindingRequest
9681-func (_e *MockKeybindingResetter_Expecter) Execute(ctx interface{}, req interface{}) *MockKeybindingResetter_Execute_Call {
9682- return &MockKeybindingResetter_Execute_Call{Call: _e.mock.On("Execute", ctx, req)}
9683-}
9684-
9685-func (_c *MockKeybindingResetter_Execute_Call) Run(run func(ctx context.Context, req port.ResetKeybindingRequest)) *MockKeybindingResetter_Execute_Call {
9686- _c.Call.Run(func(args mock.Arguments) {
9687- var arg0 context.Context
9688- if args[0] != nil {
9689- arg0 = args[0].(context.Context)
9690- }
9691- var arg1 port.ResetKeybindingRequest
9692- if args[1] != nil {
9693- arg1 = args[1].(port.ResetKeybindingRequest)
9694- }
9695- run(
9696- arg0,
9697- arg1,
9698- )
9699- })
9700- return _c
9701-}
9702-
9703-func (_c *MockKeybindingResetter_Execute_Call) Return(err error) *MockKeybindingResetter_Execute_Call {
9704- _c.Call.Return(err)
9705- return _c
9706-}
9707-
9708-func (_c *MockKeybindingResetter_Execute_Call) RunAndReturn(run func(ctx context.Context, req port.ResetKeybindingRequest) error) *MockKeybindingResetter_Execute_Call {
9709- _c.Call.Return(run)
9710- return _c
9711-}
9712-
9713-// NewMockAllKeybindingsResetter creates a new instance of MockAllKeybindingsResetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9714-// The first argument is typically a *testing.T value.
9715-func NewMockAllKeybindingsResetter(t interface {
9716- mock.TestingT
9717- Cleanup(func())
9718-}) *MockAllKeybindingsResetter {
9719- mock := &MockAllKeybindingsResetter{}
9720- mock.Mock.Test(t)
9721-
9722- t.Cleanup(func() { mock.AssertExpectations(t) })
9723-
9724- return mock
9725-}
9726-
9727-// MockAllKeybindingsResetter is an autogenerated mock type for the AllKeybindingsResetter type
9728-type MockAllKeybindingsResetter struct {
9729- mock.Mock
9730-}
9731-
9732-type MockAllKeybindingsResetter_Expecter struct {
9733- mock *mock.Mock
9734-}
9735-
9736-func (_m *MockAllKeybindingsResetter) EXPECT() *MockAllKeybindingsResetter_Expecter {
9737- return &MockAllKeybindingsResetter_Expecter{mock: &_m.Mock}
9738-}
9739-
9740-// Execute provides a mock function for the type MockAllKeybindingsResetter
9741-func (_mock *MockAllKeybindingsResetter) Execute(ctx context.Context) error {
9742- ret := _mock.Called(ctx)
9743-
9744- if len(ret) == 0 {
9745- panic("no return value specified for Execute")
9746- }
9747-
9748- var r0 error
9749- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
9750- r0 = returnFunc(ctx)
9751- } else {
9752- r0 = ret.Error(0)
9753- }
9754- return r0
9755-}
9756-
9757-// MockAllKeybindingsResetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
9758-type MockAllKeybindingsResetter_Execute_Call struct {
9759- *mock.Call
9760-}
9761-
9762-// Execute is a helper method to define mock.On call
9763-// - ctx context.Context
9764-func (_e *MockAllKeybindingsResetter_Expecter) Execute(ctx interface{}) *MockAllKeybindingsResetter_Execute_Call {
9765- return &MockAllKeybindingsResetter_Execute_Call{Call: _e.mock.On("Execute", ctx)}
9766-}
9767-
9768-func (_c *MockAllKeybindingsResetter_Execute_Call) Run(run func(ctx context.Context)) *MockAllKeybindingsResetter_Execute_Call {
9769- _c.Call.Run(func(args mock.Arguments) {
9770- var arg0 context.Context
9771- if args[0] != nil {
9772- arg0 = args[0].(context.Context)
9773- }
9774- run(
9775- arg0,
9776- )
9777- })
9778- return _c
9779-}
9780-
9781-func (_c *MockAllKeybindingsResetter_Execute_Call) Return(err error) *MockAllKeybindingsResetter_Execute_Call {
9782- _c.Call.Return(err)
9783- return _c
9784-}
9785-
9786-func (_c *MockAllKeybindingsResetter_Execute_Call) RunAndReturn(run func(ctx context.Context) error) *MockAllKeybindingsResetter_Execute_Call {
9787- _c.Call.Return(run)
9788- return _c
9789-}
9790-
9791-// NewMockMediaDiagnostics creates a new instance of MockMediaDiagnostics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9792-// The first argument is typically a *testing.T value.
9793-func NewMockMediaDiagnostics(t interface {
9794- mock.TestingT
9795- Cleanup(func())
9796-}) *MockMediaDiagnostics {
9797- mock := &MockMediaDiagnostics{}
9798- mock.Mock.Test(t)
9799-
9800- t.Cleanup(func() { mock.AssertExpectations(t) })
9801-
9802- return mock
9803-}
9804-
9805-// MockMediaDiagnostics is an autogenerated mock type for the MediaDiagnostics type
9806-type MockMediaDiagnostics struct {
9807- mock.Mock
9808-}
9809-
9810-type MockMediaDiagnostics_Expecter struct {
9811- mock *mock.Mock
9812-}
9813-
9814-func (_m *MockMediaDiagnostics) EXPECT() *MockMediaDiagnostics_Expecter {
9815- return &MockMediaDiagnostics_Expecter{mock: &_m.Mock}
9816-}
9817-
9818-// RunDiagnostics provides a mock function for the type MockMediaDiagnostics
9819-func (_mock *MockMediaDiagnostics) RunDiagnostics(ctx context.Context) *port.MediaDiagnosticsResult {
9820- ret := _mock.Called(ctx)
9821-
9822- if len(ret) == 0 {
9823- panic("no return value specified for RunDiagnostics")
9824- }
9825-
9826- var r0 *port.MediaDiagnosticsResult
9827- if returnFunc, ok := ret.Get(0).(func(context.Context) *port.MediaDiagnosticsResult); ok {
9828- r0 = returnFunc(ctx)
9829- } else {
9830- if ret.Get(0) != nil {
9831- r0 = ret.Get(0).(*port.MediaDiagnosticsResult)
9832- }
9833- }
9834- return r0
9835-}
9836-
9837-// MockMediaDiagnostics_RunDiagnostics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunDiagnostics'
9838-type MockMediaDiagnostics_RunDiagnostics_Call struct {
9839- *mock.Call
9840-}
9841-
9842-// RunDiagnostics is a helper method to define mock.On call
9843-// - ctx context.Context
9844-func (_e *MockMediaDiagnostics_Expecter) RunDiagnostics(ctx interface{}) *MockMediaDiagnostics_RunDiagnostics_Call {
9845- return &MockMediaDiagnostics_RunDiagnostics_Call{Call: _e.mock.On("RunDiagnostics", ctx)}
9846-}
9847-
9848-func (_c *MockMediaDiagnostics_RunDiagnostics_Call) Run(run func(ctx context.Context)) *MockMediaDiagnostics_RunDiagnostics_Call {
9849- _c.Call.Run(func(args mock.Arguments) {
9850- var arg0 context.Context
9851- if args[0] != nil {
9852- arg0 = args[0].(context.Context)
9853- }
9854- run(
9855- arg0,
9856- )
9857- })
9858- return _c
9859-}
9860-
9861-func (_c *MockMediaDiagnostics_RunDiagnostics_Call) Return(mediaDiagnosticsResult *port.MediaDiagnosticsResult) *MockMediaDiagnostics_RunDiagnostics_Call {
9862- _c.Call.Return(mediaDiagnosticsResult)
9863- return _c
9864-}
9865-
9866-func (_c *MockMediaDiagnostics_RunDiagnostics_Call) RunAndReturn(run func(ctx context.Context) *port.MediaDiagnosticsResult) *MockMediaDiagnostics_RunDiagnostics_Call {
9867- _c.Call.Return(run)
9868- return _c
9869-}
9870-
9871-// NewMockNotification creates a new instance of MockNotification. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9872-// The first argument is typically a *testing.T value.
9873-func NewMockNotification(t interface {
9874- mock.TestingT
9875- Cleanup(func())
9876-}) *MockNotification {
9877- mock := &MockNotification{}
9878- mock.Mock.Test(t)
9879-
9880- t.Cleanup(func() { mock.AssertExpectations(t) })
9881-
9882- return mock
9883-}
9884-
9885-// MockNotification is an autogenerated mock type for the Notification type
9886-type MockNotification struct {
9887- mock.Mock
9888-}
9889-
9890-type MockNotification_Expecter struct {
9891- mock *mock.Mock
9892-}
9893-
9894-func (_m *MockNotification) EXPECT() *MockNotification_Expecter {
9895- return &MockNotification_Expecter{mock: &_m.Mock}
9896-}
9897-
9898-// Clear provides a mock function for the type MockNotification
9899-func (_mock *MockNotification) Clear(ctx context.Context) {
9900- _mock.Called(ctx)
9901- return
9902-}
9903-
9904-// MockNotification_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
9905-type MockNotification_Clear_Call struct {
9906- *mock.Call
9907-}
9908-
9909-// Clear is a helper method to define mock.On call
9910-// - ctx context.Context
9911-func (_e *MockNotification_Expecter) Clear(ctx interface{}) *MockNotification_Clear_Call {
9912- return &MockNotification_Clear_Call{Call: _e.mock.On("Clear", ctx)}
9913-}
9914-
9915-func (_c *MockNotification_Clear_Call) Run(run func(ctx context.Context)) *MockNotification_Clear_Call {
9916- _c.Call.Run(func(args mock.Arguments) {
9917- var arg0 context.Context
9918- if args[0] != nil {
9919- arg0 = args[0].(context.Context)
9920- }
9921- run(
9922- arg0,
9923- )
9924- })
9925- return _c
9926-}
9927-
9928-func (_c *MockNotification_Clear_Call) Return() *MockNotification_Clear_Call {
9929- _c.Call.Return()
9930- return _c
9931-}
9932-
9933-func (_c *MockNotification_Clear_Call) RunAndReturn(run func(ctx context.Context)) *MockNotification_Clear_Call {
9934- _c.Run(run)
9935- return _c
9936-}
9937-
9938-// Dismiss provides a mock function for the type MockNotification
9939-func (_mock *MockNotification) Dismiss(ctx context.Context, id port.NotificationID) {
9940- _mock.Called(ctx, id)
9941- return
9942-}
9943-
9944-// MockNotification_Dismiss_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dismiss'
9945-type MockNotification_Dismiss_Call struct {
9946- *mock.Call
9947-}
9948-
9949-// Dismiss is a helper method to define mock.On call
9950-// - ctx context.Context
9951-// - id port.NotificationID
9952-func (_e *MockNotification_Expecter) Dismiss(ctx interface{}, id interface{}) *MockNotification_Dismiss_Call {
9953- return &MockNotification_Dismiss_Call{Call: _e.mock.On("Dismiss", ctx, id)}
9954-}
9955-
9956-func (_c *MockNotification_Dismiss_Call) Run(run func(ctx context.Context, id port.NotificationID)) *MockNotification_Dismiss_Call {
9957- _c.Call.Run(func(args mock.Arguments) {
9958- var arg0 context.Context
9959- if args[0] != nil {
9960- arg0 = args[0].(context.Context)
9961- }
9962- var arg1 port.NotificationID
9963- if args[1] != nil {
9964- arg1 = args[1].(port.NotificationID)
9965- }
9966- run(
9967- arg0,
9968- arg1,
9969- )
9970- })
9971- return _c
9972-}
9973-
9974-func (_c *MockNotification_Dismiss_Call) Return() *MockNotification_Dismiss_Call {
9975- _c.Call.Return()
9976- return _c
9977-}
9978-
9979-func (_c *MockNotification_Dismiss_Call) RunAndReturn(run func(ctx context.Context, id port.NotificationID)) *MockNotification_Dismiss_Call {
9980- _c.Run(run)
9981- return _c
9982-}
9983-
9984-// Show provides a mock function for the type MockNotification
9985-func (_mock *MockNotification) Show(ctx context.Context, message string, notifType port.NotificationType, durationMs int) port.NotificationID {
9986- ret := _mock.Called(ctx, message, notifType, durationMs)
9987-
9988- if len(ret) == 0 {
9989- panic("no return value specified for Show")
9990- }
9991-
9992- var r0 port.NotificationID
9993- if returnFunc, ok := ret.Get(0).(func(context.Context, string, port.NotificationType, int) port.NotificationID); ok {
9994- r0 = returnFunc(ctx, message, notifType, durationMs)
9995- } else {
9996- r0 = ret.Get(0).(port.NotificationID)
9997- }
9998- return r0
9999-}
10000-
10001-// MockNotification_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
10002-type MockNotification_Show_Call struct {
10003- *mock.Call
10004-}
10005-
10006-// Show is a helper method to define mock.On call
10007-// - ctx context.Context
10008-// - message string
10009-// - notifType port.NotificationType
10010-// - durationMs int
10011-func (_e *MockNotification_Expecter) Show(ctx interface{}, message interface{}, notifType interface{}, durationMs interface{}) *MockNotification_Show_Call {
10012- return &MockNotification_Show_Call{Call: _e.mock.On("Show", ctx, message, notifType, durationMs)}
10013-}
10014-
10015-func (_c *MockNotification_Show_Call) Run(run func(ctx context.Context, message string, notifType port.NotificationType, durationMs int)) *MockNotification_Show_Call {
10016- _c.Call.Run(func(args mock.Arguments) {
10017- var arg0 context.Context
10018- if args[0] != nil {
10019- arg0 = args[0].(context.Context)
10020- }
10021- var arg1 string
10022- if args[1] != nil {
10023- arg1 = args[1].(string)
10024- }
10025- var arg2 port.NotificationType
10026- if args[2] != nil {
10027- arg2 = args[2].(port.NotificationType)
10028- }
10029- var arg3 int
10030- if args[3] != nil {
10031- arg3 = args[3].(int)
10032- }
10033- run(
10034- arg0,
10035- arg1,
10036- arg2,
10037- arg3,
10038- )
10039- })
10040- return _c
10041-}
10042-
10043-func (_c *MockNotification_Show_Call) Return(notificationID port.NotificationID) *MockNotification_Show_Call {
10044- _c.Call.Return(notificationID)
10045- return _c
10046-}
10047-
10048-func (_c *MockNotification_Show_Call) RunAndReturn(run func(ctx context.Context, message string, notifType port.NotificationType, durationMs int) port.NotificationID) *MockNotification_Show_Call {
10049- _c.Call.Return(run)
10050- return _c
10051-}
10052-
10053-// ShowZoom provides a mock function for the type MockNotification
10054-func (_mock *MockNotification) ShowZoom(ctx context.Context, zoomPercent int) port.NotificationID {
10055- ret := _mock.Called(ctx, zoomPercent)
10056-
10057- if len(ret) == 0 {
10058- panic("no return value specified for ShowZoom")
10059- }
10060-
10061- var r0 port.NotificationID
10062- if returnFunc, ok := ret.Get(0).(func(context.Context, int) port.NotificationID); ok {
10063- r0 = returnFunc(ctx, zoomPercent)
10064- } else {
10065- r0 = ret.Get(0).(port.NotificationID)
10066- }
10067- return r0
10068-}
10069-
10070-// MockNotification_ShowZoom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowZoom'
10071-type MockNotification_ShowZoom_Call struct {
10072- *mock.Call
10073-}
10074-
10075-// ShowZoom is a helper method to define mock.On call
10076-// - ctx context.Context
10077-// - zoomPercent int
10078-func (_e *MockNotification_Expecter) ShowZoom(ctx interface{}, zoomPercent interface{}) *MockNotification_ShowZoom_Call {
10079- return &MockNotification_ShowZoom_Call{Call: _e.mock.On("ShowZoom", ctx, zoomPercent)}
10080-}
10081-
10082-func (_c *MockNotification_ShowZoom_Call) Run(run func(ctx context.Context, zoomPercent int)) *MockNotification_ShowZoom_Call {
10083- _c.Call.Run(func(args mock.Arguments) {
10084- var arg0 context.Context
10085- if args[0] != nil {
10086- arg0 = args[0].(context.Context)
10087- }
10088- var arg1 int
10089- if args[1] != nil {
10090- arg1 = args[1].(int)
10091- }
10092- run(
10093- arg0,
10094- arg1,
10095- )
10096- })
10097- return _c
10098-}
10099-
10100-func (_c *MockNotification_ShowZoom_Call) Return(notificationID port.NotificationID) *MockNotification_ShowZoom_Call {
10101- _c.Call.Return(notificationID)
10102- return _c
10103-}
10104-
10105-func (_c *MockNotification_ShowZoom_Call) RunAndReturn(run func(ctx context.Context, zoomPercent int) port.NotificationID) *MockNotification_ShowZoom_Call {
10106- _c.Call.Return(run)
10107- return _c
10108-}
10109-
10110-// NewMockOmniboxPreferencesSaver creates a new instance of MockOmniboxPreferencesSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10111-// The first argument is typically a *testing.T value.
10112-func NewMockOmniboxPreferencesSaver(t interface {
10113- mock.TestingT
10114- Cleanup(func())
10115-}) *MockOmniboxPreferencesSaver {
10116- mock := &MockOmniboxPreferencesSaver{}
10117- mock.Mock.Test(t)
10118-
10119- t.Cleanup(func() { mock.AssertExpectations(t) })
10120-
10121- return mock
10122-}
10123-
10124-// MockOmniboxPreferencesSaver is an autogenerated mock type for the OmniboxPreferencesSaver type
10125-type MockOmniboxPreferencesSaver struct {
10126- mock.Mock
10127-}
10128-
10129-type MockOmniboxPreferencesSaver_Expecter struct {
10130- mock *mock.Mock
10131-}
10132-
10133-func (_m *MockOmniboxPreferencesSaver) EXPECT() *MockOmniboxPreferencesSaver_Expecter {
10134- return &MockOmniboxPreferencesSaver_Expecter{mock: &_m.Mock}
10135-}
10136-
10137-// SaveOmniboxInitialBehavior provides a mock function for the type MockOmniboxPreferencesSaver
10138-func (_mock *MockOmniboxPreferencesSaver) SaveOmniboxInitialBehavior(ctx context.Context, behavior entity.OmniboxInitialBehavior) error {
10139- ret := _mock.Called(ctx, behavior)
10140-
10141- if len(ret) == 0 {
10142- panic("no return value specified for SaveOmniboxInitialBehavior")
10143- }
10144-
10145- var r0 error
10146- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.OmniboxInitialBehavior) error); ok {
10147- r0 = returnFunc(ctx, behavior)
10148- } else {
10149- r0 = ret.Error(0)
10150- }
10151- return r0
10152-}
10153-
10154-// MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveOmniboxInitialBehavior'
10155-type MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call struct {
10156- *mock.Call
10157-}
10158-
10159-// SaveOmniboxInitialBehavior is a helper method to define mock.On call
10160-// - ctx context.Context
10161-// - behavior entity.OmniboxInitialBehavior
10162-func (_e *MockOmniboxPreferencesSaver_Expecter) SaveOmniboxInitialBehavior(ctx interface{}, behavior interface{}) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
10163- return &MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call{Call: _e.mock.On("SaveOmniboxInitialBehavior", ctx, behavior)}
10164-}
10165-
10166-func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) Run(run func(ctx context.Context, behavior entity.OmniboxInitialBehavior)) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
10167- _c.Call.Run(func(args mock.Arguments) {
10168- var arg0 context.Context
10169- if args[0] != nil {
10170- arg0 = args[0].(context.Context)
10171- }
10172- var arg1 entity.OmniboxInitialBehavior
10173- if args[1] != nil {
10174- arg1 = args[1].(entity.OmniboxInitialBehavior)
10175- }
10176- run(
10177- arg0,
10178- arg1,
10179- )
10180- })
10181- return _c
10182-}
10183-
10184-func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) Return(err error) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
10185- _c.Call.Return(err)
10186- return _c
10187-}
10188-
10189-func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) RunAndReturn(run func(ctx context.Context, behavior entity.OmniboxInitialBehavior) error) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
10190- _c.Call.Return(run)
10191- return _c
10192-}
10193-
10194-// NewMockPermissionDialogPresenter creates a new instance of MockPermissionDialogPresenter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10195-// The first argument is typically a *testing.T value.
10196-func NewMockPermissionDialogPresenter(t interface {
10197- mock.TestingT
10198- Cleanup(func())
10199-}) *MockPermissionDialogPresenter {
10200- mock := &MockPermissionDialogPresenter{}
10201- mock.Mock.Test(t)
10202-
10203- t.Cleanup(func() { mock.AssertExpectations(t) })
10204-
10205- return mock
10206-}
10207-
10208-// MockPermissionDialogPresenter is an autogenerated mock type for the PermissionDialogPresenter type
10209-type MockPermissionDialogPresenter struct {
10210- mock.Mock
10211-}
10212-
10213-type MockPermissionDialogPresenter_Expecter struct {
10214- mock *mock.Mock
10215-}
10216-
10217-func (_m *MockPermissionDialogPresenter) EXPECT() *MockPermissionDialogPresenter_Expecter {
10218- return &MockPermissionDialogPresenter_Expecter{mock: &_m.Mock}
10219-}
10220-
10221-// ShowPermissionDialog provides a mock function for the type MockPermissionDialogPresenter
10222-func (_mock *MockPermissionDialogPresenter) ShowPermissionDialog(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult)) {
10223- _mock.Called(ctx, origin, permTypes, metadata, callback)
10224- return
10225-}
10226-
10227-// MockPermissionDialogPresenter_ShowPermissionDialog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPermissionDialog'
10228-type MockPermissionDialogPresenter_ShowPermissionDialog_Call struct {
10229- *mock.Call
10230-}
10231-
10232-// ShowPermissionDialog is a helper method to define mock.On call
10233-// - ctx context.Context
10234-// - origin string
10235-// - permTypes []entity.PermissionType
10236-// - metadata entity.PermissionMetadata
10237-// - callback func(result port.PermissionDialogResult)
10238-func (_e *MockPermissionDialogPresenter_Expecter) ShowPermissionDialog(ctx interface{}, origin interface{}, permTypes interface{}, metadata interface{}, callback interface{}) *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
10239- return &MockPermissionDialogPresenter_ShowPermissionDialog_Call{Call: _e.mock.On("ShowPermissionDialog", ctx, origin, permTypes, metadata, callback)}
10240-}
10241-
10242-func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) Run(run func(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult))) *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
10243- _c.Call.Run(func(args mock.Arguments) {
10244- var arg0 context.Context
10245- if args[0] != nil {
10246- arg0 = args[0].(context.Context)
10247- }
10248- var arg1 string
10249- if args[1] != nil {
10250- arg1 = args[1].(string)
10251- }
10252- var arg2 []entity.PermissionType
10253- if args[2] != nil {
10254- arg2 = args[2].([]entity.PermissionType)
10255- }
10256- var arg3 entity.PermissionMetadata
10257- if args[3] != nil {
10258- arg3 = args[3].(entity.PermissionMetadata)
10259- }
10260- var arg4 func(result port.PermissionDialogResult)
10261- if args[4] != nil {
10262- arg4 = args[4].(func(result port.PermissionDialogResult))
10263- }
10264- run(
10265- arg0,
10266- arg1,
10267- arg2,
10268- arg3,
10269- arg4,
10270- )
10271- })
10272- return _c
10273-}
10274-
10275-func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) Return() *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
10276- _c.Call.Return()
10277- return _c
10278-}
10279-
10280-func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) RunAndReturn(run func(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult))) *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
10281- _c.Run(run)
10282- return _c
10283-}
10284-
10285-// NewMockPermissionRepository creates a new instance of MockPermissionRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10286-// The first argument is typically a *testing.T value.
10287-func NewMockPermissionRepository(t interface {
10288- mock.TestingT
10289- Cleanup(func())
10290-}) *MockPermissionRepository {
10291- mock := &MockPermissionRepository{}
10292- mock.Mock.Test(t)
10293-
10294- t.Cleanup(func() { mock.AssertExpectations(t) })
10295-
10296- return mock
10297-}
10298-
10299-// MockPermissionRepository is an autogenerated mock type for the PermissionRepository type
10300-type MockPermissionRepository struct {
10301- mock.Mock
10302-}
10303-
10304-type MockPermissionRepository_Expecter struct {
10305- mock *mock.Mock
10306-}
10307-
10308-func (_m *MockPermissionRepository) EXPECT() *MockPermissionRepository_Expecter {
10309- return &MockPermissionRepository_Expecter{mock: &_m.Mock}
10310-}
10311-
10312-// Delete provides a mock function for the type MockPermissionRepository
10313-func (_mock *MockPermissionRepository) Delete(ctx context.Context, origin string, permType entity.PermissionType) error {
10314- ret := _mock.Called(ctx, origin, permType)
10315-
10316- if len(ret) == 0 {
10317- panic("no return value specified for Delete")
10318- }
10319-
10320- var r0 error
10321- if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) error); ok {
10322- r0 = returnFunc(ctx, origin, permType)
10323- } else {
10324- r0 = ret.Error(0)
10325- }
10326- return r0
10327-}
10328-
10329-// MockPermissionRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
10330-type MockPermissionRepository_Delete_Call struct {
10331- *mock.Call
10332-}
10333-
10334-// Delete is a helper method to define mock.On call
10335-// - ctx context.Context
10336-// - origin string
10337-// - permType entity.PermissionType
10338-func (_e *MockPermissionRepository_Expecter) Delete(ctx interface{}, origin interface{}, permType interface{}) *MockPermissionRepository_Delete_Call {
10339- return &MockPermissionRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, origin, permType)}
10340-}
10341-
10342-func (_c *MockPermissionRepository_Delete_Call) Run(run func(ctx context.Context, origin string, permType entity.PermissionType)) *MockPermissionRepository_Delete_Call {
10343- _c.Call.Run(func(args mock.Arguments) {
10344- var arg0 context.Context
10345- if args[0] != nil {
10346- arg0 = args[0].(context.Context)
10347- }
10348- var arg1 string
10349- if args[1] != nil {
10350- arg1 = args[1].(string)
10351- }
10352- var arg2 entity.PermissionType
10353- if args[2] != nil {
10354- arg2 = args[2].(entity.PermissionType)
10355- }
10356- run(
10357- arg0,
10358- arg1,
10359- arg2,
10360- )
10361- })
10362- return _c
10363-}
10364-
10365-func (_c *MockPermissionRepository_Delete_Call) Return(err error) *MockPermissionRepository_Delete_Call {
10366- _c.Call.Return(err)
10367- return _c
10368-}
10369-
10370-func (_c *MockPermissionRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, origin string, permType entity.PermissionType) error) *MockPermissionRepository_Delete_Call {
10371- _c.Call.Return(run)
10372- return _c
10373-}
10374-
10375-// Get provides a mock function for the type MockPermissionRepository
10376-func (_mock *MockPermissionRepository) Get(ctx context.Context, origin string, permType entity.PermissionType) (*entity.PermissionRecord, error) {
10377- ret := _mock.Called(ctx, origin, permType)
10378-
10379- if len(ret) == 0 {
10380- panic("no return value specified for Get")
10381- }
10382-
10383- var r0 *entity.PermissionRecord
10384- var r1 error
10385- if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) (*entity.PermissionRecord, error)); ok {
10386- return returnFunc(ctx, origin, permType)
10387- }
10388- if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) *entity.PermissionRecord); ok {
10389- r0 = returnFunc(ctx, origin, permType)
10390- } else {
10391- if ret.Get(0) != nil {
10392- r0 = ret.Get(0).(*entity.PermissionRecord)
10393- }
10394- }
10395- if returnFunc, ok := ret.Get(1).(func(context.Context, string, entity.PermissionType) error); ok {
10396- r1 = returnFunc(ctx, origin, permType)
10397- } else {
10398- r1 = ret.Error(1)
10399- }
10400- return r0, r1
10401-}
10402-
10403-// MockPermissionRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
10404-type MockPermissionRepository_Get_Call struct {
10405- *mock.Call
10406-}
10407-
10408-// Get is a helper method to define mock.On call
10409-// - ctx context.Context
10410-// - origin string
10411-// - permType entity.PermissionType
10412-func (_e *MockPermissionRepository_Expecter) Get(ctx interface{}, origin interface{}, permType interface{}) *MockPermissionRepository_Get_Call {
10413- return &MockPermissionRepository_Get_Call{Call: _e.mock.On("Get", ctx, origin, permType)}
10414-}
10415-
10416-func (_c *MockPermissionRepository_Get_Call) Run(run func(ctx context.Context, origin string, permType entity.PermissionType)) *MockPermissionRepository_Get_Call {
10417- _c.Call.Run(func(args mock.Arguments) {
10418- var arg0 context.Context
10419- if args[0] != nil {
10420- arg0 = args[0].(context.Context)
10421- }
10422- var arg1 string
10423- if args[1] != nil {
10424- arg1 = args[1].(string)
10425- }
10426- var arg2 entity.PermissionType
10427- if args[2] != nil {
10428- arg2 = args[2].(entity.PermissionType)
10429- }
10430- run(
10431- arg0,
10432- arg1,
10433- arg2,
10434- )
10435- })
10436- return _c
10437-}
10438-
10439-func (_c *MockPermissionRepository_Get_Call) Return(permissionRecord *entity.PermissionRecord, err error) *MockPermissionRepository_Get_Call {
10440- _c.Call.Return(permissionRecord, err)
10441- return _c
10442-}
10443-
10444-func (_c *MockPermissionRepository_Get_Call) RunAndReturn(run func(ctx context.Context, origin string, permType entity.PermissionType) (*entity.PermissionRecord, error)) *MockPermissionRepository_Get_Call {
10445- _c.Call.Return(run)
10446- return _c
10447-}
10448-
10449-// GetAll provides a mock function for the type MockPermissionRepository
10450-func (_mock *MockPermissionRepository) GetAll(ctx context.Context, origin string) ([]*entity.PermissionRecord, error) {
10451- ret := _mock.Called(ctx, origin)
10452-
10453- if len(ret) == 0 {
10454- panic("no return value specified for GetAll")
10455- }
10456-
10457- var r0 []*entity.PermissionRecord
10458- var r1 error
10459- if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.PermissionRecord, error)); ok {
10460- return returnFunc(ctx, origin)
10461- }
10462- if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.PermissionRecord); ok {
10463- r0 = returnFunc(ctx, origin)
10464- } else {
10465- if ret.Get(0) != nil {
10466- r0 = ret.Get(0).([]*entity.PermissionRecord)
10467- }
10468- }
10469- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
10470- r1 = returnFunc(ctx, origin)
10471- } else {
10472- r1 = ret.Error(1)
10473- }
10474- return r0, r1
10475-}
10476-
10477-// MockPermissionRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
10478-type MockPermissionRepository_GetAll_Call struct {
10479- *mock.Call
10480-}
10481-
10482-// GetAll is a helper method to define mock.On call
10483-// - ctx context.Context
10484-// - origin string
10485-func (_e *MockPermissionRepository_Expecter) GetAll(ctx interface{}, origin interface{}) *MockPermissionRepository_GetAll_Call {
10486- return &MockPermissionRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx, origin)}
10487-}
10488-
10489-func (_c *MockPermissionRepository_GetAll_Call) Run(run func(ctx context.Context, origin string)) *MockPermissionRepository_GetAll_Call {
10490- _c.Call.Run(func(args mock.Arguments) {
10491- var arg0 context.Context
10492- if args[0] != nil {
10493- arg0 = args[0].(context.Context)
10494- }
10495- var arg1 string
10496- if args[1] != nil {
10497- arg1 = args[1].(string)
10498- }
10499- run(
10500- arg0,
10501- arg1,
10502- )
10503- })
10504- return _c
10505-}
10506-
10507-func (_c *MockPermissionRepository_GetAll_Call) Return(permissionRecords []*entity.PermissionRecord, err error) *MockPermissionRepository_GetAll_Call {
10508- _c.Call.Return(permissionRecords, err)
10509- return _c
10510-}
10511-
10512-func (_c *MockPermissionRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context, origin string) ([]*entity.PermissionRecord, error)) *MockPermissionRepository_GetAll_Call {
10513- _c.Call.Return(run)
10514- return _c
10515-}
10516-
10517-// Set provides a mock function for the type MockPermissionRepository
10518-func (_mock *MockPermissionRepository) Set(ctx context.Context, record *entity.PermissionRecord) error {
10519- ret := _mock.Called(ctx, record)
10520-
10521- if len(ret) == 0 {
10522- panic("no return value specified for Set")
10523- }
10524-
10525- var r0 error
10526- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.PermissionRecord) error); ok {
10527- r0 = returnFunc(ctx, record)
10528- } else {
10529- r0 = ret.Error(0)
10530- }
10531- return r0
10532-}
10533-
10534-// MockPermissionRepository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
10535-type MockPermissionRepository_Set_Call struct {
10536- *mock.Call
10537-}
10538-
10539-// Set is a helper method to define mock.On call
10540-// - ctx context.Context
10541-// - record *entity.PermissionRecord
10542-func (_e *MockPermissionRepository_Expecter) Set(ctx interface{}, record interface{}) *MockPermissionRepository_Set_Call {
10543- return &MockPermissionRepository_Set_Call{Call: _e.mock.On("Set", ctx, record)}
10544-}
10545-
10546-func (_c *MockPermissionRepository_Set_Call) Run(run func(ctx context.Context, record *entity.PermissionRecord)) *MockPermissionRepository_Set_Call {
10547- _c.Call.Run(func(args mock.Arguments) {
10548- var arg0 context.Context
10549- if args[0] != nil {
10550- arg0 = args[0].(context.Context)
10551- }
10552- var arg1 *entity.PermissionRecord
10553- if args[1] != nil {
10554- arg1 = args[1].(*entity.PermissionRecord)
10555- }
10556- run(
10557- arg0,
10558- arg1,
10559- )
10560- })
10561- return _c
10562-}
10563-
10564-func (_c *MockPermissionRepository_Set_Call) Return(err error) *MockPermissionRepository_Set_Call {
10565- _c.Call.Return(err)
10566- return _c
10567-}
10568-
10569-func (_c *MockPermissionRepository_Set_Call) RunAndReturn(run func(ctx context.Context, record *entity.PermissionRecord) error) *MockPermissionRepository_Set_Call {
10570- _c.Call.Return(run)
10571- return _c
10572-}
10573-
10574-// NewMockRenderingEnvManager creates a new instance of MockRenderingEnvManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10575-// The first argument is typically a *testing.T value.
10576-func NewMockRenderingEnvManager(t interface {
10577- mock.TestingT
10578- Cleanup(func())
10579-}) *MockRenderingEnvManager {
10580- mock := &MockRenderingEnvManager{}
10581- mock.Mock.Test(t)
10582-
10583- t.Cleanup(func() { mock.AssertExpectations(t) })
10584-
10585- return mock
10586-}
10587-
10588-// MockRenderingEnvManager is an autogenerated mock type for the RenderingEnvManager type
10589-type MockRenderingEnvManager struct {
10590- mock.Mock
10591-}
10592-
10593-type MockRenderingEnvManager_Expecter struct {
10594- mock *mock.Mock
10595-}
10596-
10597-func (_m *MockRenderingEnvManager) EXPECT() *MockRenderingEnvManager_Expecter {
10598- return &MockRenderingEnvManager_Expecter{mock: &_m.Mock}
10599-}
10600-
10601-// DetectGPUVendor provides a mock function for the type MockRenderingEnvManager
10602-func (_mock *MockRenderingEnvManager) DetectGPUVendor(ctx context.Context) port.GPUVendor {
10603- ret := _mock.Called(ctx)
10604-
10605- if len(ret) == 0 {
10606- panic("no return value specified for DetectGPUVendor")
10607- }
10608-
10609- var r0 port.GPUVendor
10610- if returnFunc, ok := ret.Get(0).(func(context.Context) port.GPUVendor); ok {
10611- r0 = returnFunc(ctx)
10612- } else {
10613- r0 = ret.Get(0).(port.GPUVendor)
10614- }
10615- return r0
10616-}
10617-
10618-// MockRenderingEnvManager_DetectGPUVendor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectGPUVendor'
10619-type MockRenderingEnvManager_DetectGPUVendor_Call struct {
10620- *mock.Call
10621-}
10622-
10623-// DetectGPUVendor is a helper method to define mock.On call
10624-// - ctx context.Context
10625-func (_e *MockRenderingEnvManager_Expecter) DetectGPUVendor(ctx interface{}) *MockRenderingEnvManager_DetectGPUVendor_Call {
10626- return &MockRenderingEnvManager_DetectGPUVendor_Call{Call: _e.mock.On("DetectGPUVendor", ctx)}
10627-}
10628-
10629-func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) Run(run func(ctx context.Context)) *MockRenderingEnvManager_DetectGPUVendor_Call {
10630- _c.Call.Run(func(args mock.Arguments) {
10631- var arg0 context.Context
10632- if args[0] != nil {
10633- arg0 = args[0].(context.Context)
10634- }
10635- run(
10636- arg0,
10637- )
10638- })
10639- return _c
10640-}
10641-
10642-func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) Return(gPUVendor port.GPUVendor) *MockRenderingEnvManager_DetectGPUVendor_Call {
10643- _c.Call.Return(gPUVendor)
10644- return _c
10645-}
10646-
10647-func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) RunAndReturn(run func(ctx context.Context) port.GPUVendor) *MockRenderingEnvManager_DetectGPUVendor_Call {
10648- _c.Call.Return(run)
10649- return _c
10650-}
10651-
10652-// GetAppliedVars provides a mock function for the type MockRenderingEnvManager
10653-func (_mock *MockRenderingEnvManager) GetAppliedVars() map[string]string {
10654- ret := _mock.Called()
10655-
10656- if len(ret) == 0 {
10657- panic("no return value specified for GetAppliedVars")
10658- }
10659-
10660- var r0 map[string]string
10661- if returnFunc, ok := ret.Get(0).(func() map[string]string); ok {
10662- r0 = returnFunc()
10663- } else {
10664- if ret.Get(0) != nil {
10665- r0 = ret.Get(0).(map[string]string)
10666- }
10667- }
10668- return r0
10669-}
10670-
10671-// MockRenderingEnvManager_GetAppliedVars_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppliedVars'
10672-type MockRenderingEnvManager_GetAppliedVars_Call struct {
10673- *mock.Call
10674-}
10675-
10676-// GetAppliedVars is a helper method to define mock.On call
10677-func (_e *MockRenderingEnvManager_Expecter) GetAppliedVars() *MockRenderingEnvManager_GetAppliedVars_Call {
10678- return &MockRenderingEnvManager_GetAppliedVars_Call{Call: _e.mock.On("GetAppliedVars")}
10679-}
10680-
10681-func (_c *MockRenderingEnvManager_GetAppliedVars_Call) Run(run func()) *MockRenderingEnvManager_GetAppliedVars_Call {
10682- _c.Call.Run(func(args mock.Arguments) {
10683- run()
10684- })
10685- return _c
10686-}
10687-
10688-func (_c *MockRenderingEnvManager_GetAppliedVars_Call) Return(stringToString map[string]string) *MockRenderingEnvManager_GetAppliedVars_Call {
10689- _c.Call.Return(stringToString)
10690- return _c
10691-}
10692-
10693-func (_c *MockRenderingEnvManager_GetAppliedVars_Call) RunAndReturn(run func() map[string]string) *MockRenderingEnvManager_GetAppliedVars_Call {
10694- _c.Call.Return(run)
10695- return _c
10696-}
10697-
10698-// NewMockRuntimeVersionProbe creates a new instance of MockRuntimeVersionProbe. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10699-// The first argument is typically a *testing.T value.
10700-func NewMockRuntimeVersionProbe(t interface {
10701- mock.TestingT
10702- Cleanup(func())
10703-}) *MockRuntimeVersionProbe {
10704- mock := &MockRuntimeVersionProbe{}
10705- mock.Mock.Test(t)
10706-
10707- t.Cleanup(func() { mock.AssertExpectations(t) })
10708-
10709- return mock
10710-}
10711-
10712-// MockRuntimeVersionProbe is an autogenerated mock type for the RuntimeVersionProbe type
10713-type MockRuntimeVersionProbe struct {
10714- mock.Mock
10715-}
10716-
10717-type MockRuntimeVersionProbe_Expecter struct {
10718- mock *mock.Mock
10719-}
10720-
10721-func (_m *MockRuntimeVersionProbe) EXPECT() *MockRuntimeVersionProbe_Expecter {
10722- return &MockRuntimeVersionProbe_Expecter{mock: &_m.Mock}
10723-}
10724-
10725-// PkgConfigModVersion provides a mock function for the type MockRuntimeVersionProbe
10726-func (_mock *MockRuntimeVersionProbe) PkgConfigModVersion(ctx context.Context, pkgName string, prefix string) (string, error) {
10727- ret := _mock.Called(ctx, pkgName, prefix)
10728-
10729- if len(ret) == 0 {
10730- panic("no return value specified for PkgConfigModVersion")
10731- }
10732-
10733- var r0 string
10734- var r1 error
10735- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
10736- return returnFunc(ctx, pkgName, prefix)
10737- }
10738- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
10739- r0 = returnFunc(ctx, pkgName, prefix)
10740- } else {
10741- r0 = ret.Get(0).(string)
10742- }
10743- if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
10744- r1 = returnFunc(ctx, pkgName, prefix)
10745- } else {
10746- r1 = ret.Error(1)
10747- }
10748- return r0, r1
10749-}
10750-
10751-// MockRuntimeVersionProbe_PkgConfigModVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PkgConfigModVersion'
10752-type MockRuntimeVersionProbe_PkgConfigModVersion_Call struct {
10753- *mock.Call
10754-}
10755-
10756-// PkgConfigModVersion is a helper method to define mock.On call
10757-// - ctx context.Context
10758-// - pkgName string
10759-// - prefix string
10760-func (_e *MockRuntimeVersionProbe_Expecter) PkgConfigModVersion(ctx interface{}, pkgName interface{}, prefix interface{}) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
10761- return &MockRuntimeVersionProbe_PkgConfigModVersion_Call{Call: _e.mock.On("PkgConfigModVersion", ctx, pkgName, prefix)}
10762-}
10763-
10764-func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) Run(run func(ctx context.Context, pkgName string, prefix string)) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
10765- _c.Call.Run(func(args mock.Arguments) {
10766- var arg0 context.Context
10767- if args[0] != nil {
10768- arg0 = args[0].(context.Context)
10769- }
10770- var arg1 string
10771- if args[1] != nil {
10772- arg1 = args[1].(string)
10773- }
10774- var arg2 string
10775- if args[2] != nil {
10776- arg2 = args[2].(string)
10777- }
10778- run(
10779- arg0,
10780- arg1,
10781- arg2,
10782- )
10783- })
10784- return _c
10785-}
10786-
10787-func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) Return(s string, err error) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
10788- _c.Call.Return(s, err)
10789- return _c
10790-}
10791-
10792-func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) RunAndReturn(run func(ctx context.Context, pkgName string, prefix string) (string, error)) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
10793- _c.Call.Return(run)
10794- return _c
10795-}
10796-
10797-// NewMockSessionLogger creates a new instance of MockSessionLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10798-// The first argument is typically a *testing.T value.
10799-func NewMockSessionLogger(t interface {
10800- mock.TestingT
10801- Cleanup(func())
10802-}) *MockSessionLogger {
10803- mock := &MockSessionLogger{}
10804- mock.Mock.Test(t)
10805-
10806- t.Cleanup(func() { mock.AssertExpectations(t) })
10807-
10808- return mock
10809-}
10810-
10811-// MockSessionLogger is an autogenerated mock type for the SessionLogger type
10812-type MockSessionLogger struct {
10813- mock.Mock
10814-}
10815-
10816-type MockSessionLogger_Expecter struct {
10817- mock *mock.Mock
10818-}
10819-
10820-func (_m *MockSessionLogger) EXPECT() *MockSessionLogger_Expecter {
10821- return &MockSessionLogger_Expecter{mock: &_m.Mock}
10822-}
10823-
10824-// CreateLogger provides a mock function for the type MockSessionLogger
10825-func (_mock *MockSessionLogger) CreateLogger(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error) {
10826- ret := _mock.Called(ctx, sessionID, cfg)
10827-
10828- if len(ret) == 0 {
10829- panic("no return value specified for CreateLogger")
10830- }
10831-
10832- var r0 zerolog.Logger
10833- var r1 func()
10834- var r2 error
10835- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) (zerolog.Logger, func(), error)); ok {
10836- return returnFunc(ctx, sessionID, cfg)
10837- }
10838- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) zerolog.Logger); ok {
10839- r0 = returnFunc(ctx, sessionID, cfg)
10840- } else {
10841- r0 = ret.Get(0).(zerolog.Logger)
10842- }
10843- if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID, port.SessionLogConfig) func()); ok {
10844- r1 = returnFunc(ctx, sessionID, cfg)
10845- } else {
10846- if ret.Get(1) != nil {
10847- r1 = ret.Get(1).(func())
10848- }
10849- }
10850- if returnFunc, ok := ret.Get(2).(func(context.Context, entity.SessionID, port.SessionLogConfig) error); ok {
10851- r2 = returnFunc(ctx, sessionID, cfg)
10852- } else {
10853- r2 = ret.Error(2)
10854- }
10855- return r0, r1, r2
10856-}
10857-
10858-// MockSessionLogger_CreateLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLogger'
10859-type MockSessionLogger_CreateLogger_Call struct {
10860- *mock.Call
10861-}
10862-
10863-// CreateLogger is a helper method to define mock.On call
10864-// - ctx context.Context
10865-// - sessionID entity.SessionID
10866-// - cfg port.SessionLogConfig
10867-func (_e *MockSessionLogger_Expecter) CreateLogger(ctx interface{}, sessionID interface{}, cfg interface{}) *MockSessionLogger_CreateLogger_Call {
10868- return &MockSessionLogger_CreateLogger_Call{Call: _e.mock.On("CreateLogger", ctx, sessionID, cfg)}
10869-}
10870-
10871-func (_c *MockSessionLogger_CreateLogger_Call) Run(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig)) *MockSessionLogger_CreateLogger_Call {
10872- _c.Call.Run(func(args mock.Arguments) {
10873- var arg0 context.Context
10874- if args[0] != nil {
10875- arg0 = args[0].(context.Context)
10876- }
10877- var arg1 entity.SessionID
10878- if args[1] != nil {
10879- arg1 = args[1].(entity.SessionID)
10880- }
10881- var arg2 port.SessionLogConfig
10882- if args[2] != nil {
10883- arg2 = args[2].(port.SessionLogConfig)
10884- }
10885- run(
10886- arg0,
10887- arg1,
10888- arg2,
10889- )
10890- })
10891- return _c
10892-}
10893-
10894-func (_c *MockSessionLogger_CreateLogger_Call) Return(logger zerolog.Logger, fn func(), err error) *MockSessionLogger_CreateLogger_Call {
10895- _c.Call.Return(logger, fn, err)
10896- return _c
10897-}
10898-
10899-func (_c *MockSessionLogger_CreateLogger_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error)) *MockSessionLogger_CreateLogger_Call {
10900- _c.Call.Return(run)
10901- return _c
10902-}
10903-
10904-// NewMockSessionProcessProbe creates a new instance of MockSessionProcessProbe. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10905-// The first argument is typically a *testing.T value.
10906-func NewMockSessionProcessProbe(t interface {
10907- mock.TestingT
10908- Cleanup(func())
10909-}) *MockSessionProcessProbe {
10910- mock := &MockSessionProcessProbe{}
10911- mock.Mock.Test(t)
10912-
10913- t.Cleanup(func() { mock.AssertExpectations(t) })
10914-
10915- return mock
10916-}
10917-
10918-// MockSessionProcessProbe is an autogenerated mock type for the SessionProcessProbe type
10919-type MockSessionProcessProbe struct {
10920- mock.Mock
10921-}
10922-
10923-type MockSessionProcessProbe_Expecter struct {
10924- mock *mock.Mock
10925-}
10926-
10927-func (_m *MockSessionProcessProbe) EXPECT() *MockSessionProcessProbe_Expecter {
10928- return &MockSessionProcessProbe_Expecter{mock: &_m.Mock}
10929-}
10930-
10931-// IsProcessAlive provides a mock function for the type MockSessionProcessProbe
10932-func (_mock *MockSessionProcessProbe) IsProcessAlive(ctx context.Context, pid int) (bool, error) {
10933- ret := _mock.Called(ctx, pid)
10934-
10935- if len(ret) == 0 {
10936- panic("no return value specified for IsProcessAlive")
10937- }
10938-
10939- var r0 bool
10940- var r1 error
10941- if returnFunc, ok := ret.Get(0).(func(context.Context, int) (bool, error)); ok {
10942- return returnFunc(ctx, pid)
10943- }
10944- if returnFunc, ok := ret.Get(0).(func(context.Context, int) bool); ok {
10945- r0 = returnFunc(ctx, pid)
10946- } else {
10947- r0 = ret.Get(0).(bool)
10948- }
10949- if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
10950- r1 = returnFunc(ctx, pid)
10951- } else {
10952- r1 = ret.Error(1)
10953- }
10954- return r0, r1
10955-}
10956-
10957-// MockSessionProcessProbe_IsProcessAlive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsProcessAlive'
10958-type MockSessionProcessProbe_IsProcessAlive_Call struct {
10959- *mock.Call
10960-}
10961-
10962-// IsProcessAlive is a helper method to define mock.On call
10963-// - ctx context.Context
10964-// - pid int
10965-func (_e *MockSessionProcessProbe_Expecter) IsProcessAlive(ctx interface{}, pid interface{}) *MockSessionProcessProbe_IsProcessAlive_Call {
10966- return &MockSessionProcessProbe_IsProcessAlive_Call{Call: _e.mock.On("IsProcessAlive", ctx, pid)}
10967-}
10968-
10969-func (_c *MockSessionProcessProbe_IsProcessAlive_Call) Run(run func(ctx context.Context, pid int)) *MockSessionProcessProbe_IsProcessAlive_Call {
10970- _c.Call.Run(func(args mock.Arguments) {
10971- var arg0 context.Context
10972- if args[0] != nil {
10973- arg0 = args[0].(context.Context)
10974- }
10975- var arg1 int
10976- if args[1] != nil {
10977- arg1 = args[1].(int)
10978- }
10979- run(
10980- arg0,
10981- arg1,
10982- )
10983- })
10984- return _c
10985-}
10986-
10987-func (_c *MockSessionProcessProbe_IsProcessAlive_Call) Return(b bool, err error) *MockSessionProcessProbe_IsProcessAlive_Call {
10988- _c.Call.Return(b, err)
10989- return _c
10990-}
10991-
10992-func (_c *MockSessionProcessProbe_IsProcessAlive_Call) RunAndReturn(run func(ctx context.Context, pid int) (bool, error)) *MockSessionProcessProbe_IsProcessAlive_Call {
10993- _c.Call.Return(run)
10994- return _c
10995-}
10996-
10997-// NewMockWindowStateProvider creates a new instance of MockWindowStateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
10998-// The first argument is typically a *testing.T value.
10999-func NewMockWindowStateProvider(t interface {
11000- mock.TestingT
11001- Cleanup(func())
11002-}) *MockWindowStateProvider {
11003- mock := &MockWindowStateProvider{}
11004- mock.Mock.Test(t)
11005-
11006- t.Cleanup(func() { mock.AssertExpectations(t) })
11007-
11008- return mock
11009-}
11010-
11011-// MockWindowStateProvider is an autogenerated mock type for the WindowStateProvider type
11012-type MockWindowStateProvider struct {
11013- mock.Mock
11014-}
11015-
11016-type MockWindowStateProvider_Expecter struct {
11017- mock *mock.Mock
11018-}
11019-
11020-func (_m *MockWindowStateProvider) EXPECT() *MockWindowStateProvider_Expecter {
11021- return &MockWindowStateProvider_Expecter{mock: &_m.Mock}
11022-}
11023-
11024-// GetActiveWindowIndex provides a mock function for the type MockWindowStateProvider
11025-func (_mock *MockWindowStateProvider) GetActiveWindowIndex() int {
11026- ret := _mock.Called()
11027-
11028- if len(ret) == 0 {
11029- panic("no return value specified for GetActiveWindowIndex")
11030- }
11031-
11032- var r0 int
11033- if returnFunc, ok := ret.Get(0).(func() int); ok {
11034- r0 = returnFunc()
11035- } else {
11036- r0 = ret.Get(0).(int)
11037- }
11038- return r0
11039-}
11040-
11041-// MockWindowStateProvider_GetActiveWindowIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActiveWindowIndex'
11042-type MockWindowStateProvider_GetActiveWindowIndex_Call struct {
11043- *mock.Call
11044-}
11045-
11046-// GetActiveWindowIndex is a helper method to define mock.On call
11047-func (_e *MockWindowStateProvider_Expecter) GetActiveWindowIndex() *MockWindowStateProvider_GetActiveWindowIndex_Call {
11048- return &MockWindowStateProvider_GetActiveWindowIndex_Call{Call: _e.mock.On("GetActiveWindowIndex")}
11049-}
11050-
11051-func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) Run(run func()) *MockWindowStateProvider_GetActiveWindowIndex_Call {
11052- _c.Call.Run(func(args mock.Arguments) {
11053- run()
11054- })
11055- return _c
11056-}
11057-
11058-func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) Return(n int) *MockWindowStateProvider_GetActiveWindowIndex_Call {
11059- _c.Call.Return(n)
11060- return _c
11061-}
11062-
11063-func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) RunAndReturn(run func() int) *MockWindowStateProvider_GetActiveWindowIndex_Call {
11064- _c.Call.Return(run)
11065- return _c
11066-}
11067-
11068-// GetSessionID provides a mock function for the type MockWindowStateProvider
11069-func (_mock *MockWindowStateProvider) GetSessionID() entity.SessionID {
11070- ret := _mock.Called()
11071-
11072- if len(ret) == 0 {
11073- panic("no return value specified for GetSessionID")
11074- }
11075-
11076- var r0 entity.SessionID
11077- if returnFunc, ok := ret.Get(0).(func() entity.SessionID); ok {
11078- r0 = returnFunc()
11079- } else {
11080- r0 = ret.Get(0).(entity.SessionID)
11081- }
11082- return r0
11083-}
11084-
11085-// MockWindowStateProvider_GetSessionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessionID'
11086-type MockWindowStateProvider_GetSessionID_Call struct {
11087- *mock.Call
11088-}
11089-
11090-// GetSessionID is a helper method to define mock.On call
11091-func (_e *MockWindowStateProvider_Expecter) GetSessionID() *MockWindowStateProvider_GetSessionID_Call {
11092- return &MockWindowStateProvider_GetSessionID_Call{Call: _e.mock.On("GetSessionID")}
11093-}
11094-
11095-func (_c *MockWindowStateProvider_GetSessionID_Call) Run(run func()) *MockWindowStateProvider_GetSessionID_Call {
11096- _c.Call.Run(func(args mock.Arguments) {
11097- run()
11098- })
11099- return _c
11100-}
11101-
11102-func (_c *MockWindowStateProvider_GetSessionID_Call) Return(sessionID entity.SessionID) *MockWindowStateProvider_GetSessionID_Call {
11103- _c.Call.Return(sessionID)
11104- return _c
11105-}
11106-
11107-func (_c *MockWindowStateProvider_GetSessionID_Call) RunAndReturn(run func() entity.SessionID) *MockWindowStateProvider_GetSessionID_Call {
11108- _c.Call.Return(run)
11109- return _c
11110-}
11111-
11112-// GetWindowSnapshotState provides a mock function for the type MockWindowStateProvider
11113-func (_mock *MockWindowStateProvider) GetWindowSnapshotState() ([]entity.WindowTabListState, int) {
11114- ret := _mock.Called()
11115-
11116- if len(ret) == 0 {
11117- panic("no return value specified for GetWindowSnapshotState")
11118- }
11119-
11120- var r0 []entity.WindowTabListState
11121- var r1 int
11122- if returnFunc, ok := ret.Get(0).(func() ([]entity.WindowTabListState, int)); ok {
11123- return returnFunc()
11124- }
11125- if returnFunc, ok := ret.Get(0).(func() []entity.WindowTabListState); ok {
11126- r0 = returnFunc()
11127- } else {
11128- if ret.Get(0) != nil {
11129- r0 = ret.Get(0).([]entity.WindowTabListState)
11130- }
11131- }
11132- if returnFunc, ok := ret.Get(1).(func() int); ok {
11133- r1 = returnFunc()
11134- } else {
11135- r1 = ret.Get(1).(int)
11136- }
11137- return r0, r1
11138-}
11139-
11140-// MockWindowStateProvider_GetWindowSnapshotState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWindowSnapshotState'
11141-type MockWindowStateProvider_GetWindowSnapshotState_Call struct {
11142- *mock.Call
11143-}
11144-
11145-// GetWindowSnapshotState is a helper method to define mock.On call
11146-func (_e *MockWindowStateProvider_Expecter) GetWindowSnapshotState() *MockWindowStateProvider_GetWindowSnapshotState_Call {
11147- return &MockWindowStateProvider_GetWindowSnapshotState_Call{Call: _e.mock.On("GetWindowSnapshotState")}
11148-}
11149-
11150-func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) Run(run func()) *MockWindowStateProvider_GetWindowSnapshotState_Call {
11151- _c.Call.Run(func(args mock.Arguments) {
11152- run()
11153- })
11154- return _c
11155-}
11156-
11157-func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) Return(windowTabListStates []entity.WindowTabListState, n int) *MockWindowStateProvider_GetWindowSnapshotState_Call {
11158- _c.Call.Return(windowTabListStates, n)
11159- return _c
11160-}
11161-
11162-func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) RunAndReturn(run func() ([]entity.WindowTabListState, int)) *MockWindowStateProvider_GetWindowSnapshotState_Call {
11163- _c.Call.Return(run)
11164- return _c
11165-}
11166-
11167-// GetWindowTabLists provides a mock function for the type MockWindowStateProvider
11168-func (_mock *MockWindowStateProvider) GetWindowTabLists() []entity.WindowTabListState {
11169- ret := _mock.Called()
11170-
11171- if len(ret) == 0 {
11172- panic("no return value specified for GetWindowTabLists")
11173- }
11174-
11175- var r0 []entity.WindowTabListState
11176- if returnFunc, ok := ret.Get(0).(func() []entity.WindowTabListState); ok {
11177- r0 = returnFunc()
11178- } else {
11179- if ret.Get(0) != nil {
11180- r0 = ret.Get(0).([]entity.WindowTabListState)
11181- }
11182- }
11183- return r0
11184-}
11185-
11186-// MockWindowStateProvider_GetWindowTabLists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWindowTabLists'
11187-type MockWindowStateProvider_GetWindowTabLists_Call struct {
11188- *mock.Call
11189-}
11190-
11191-// GetWindowTabLists is a helper method to define mock.On call
11192-func (_e *MockWindowStateProvider_Expecter) GetWindowTabLists() *MockWindowStateProvider_GetWindowTabLists_Call {
11193- return &MockWindowStateProvider_GetWindowTabLists_Call{Call: _e.mock.On("GetWindowTabLists")}
11194-}
11195-
11196-func (_c *MockWindowStateProvider_GetWindowTabLists_Call) Run(run func()) *MockWindowStateProvider_GetWindowTabLists_Call {
11197- _c.Call.Run(func(args mock.Arguments) {
11198- run()
11199- })
11200- return _c
11201-}
11202-
11203-func (_c *MockWindowStateProvider_GetWindowTabLists_Call) Return(windowTabListStates []entity.WindowTabListState) *MockWindowStateProvider_GetWindowTabLists_Call {
11204- _c.Call.Return(windowTabListStates)
11205- return _c
11206-}
11207-
11208-func (_c *MockWindowStateProvider_GetWindowTabLists_Call) RunAndReturn(run func() []entity.WindowTabListState) *MockWindowStateProvider_GetWindowTabLists_Call {
11209- _c.Call.Return(run)
11210- return _c
11211-}
11212-
11213-// NewMockSessionSpawner creates a new instance of MockSessionSpawner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
11214-// The first argument is typically a *testing.T value.
11215-func NewMockSessionSpawner(t interface {
11216- mock.TestingT
11217- Cleanup(func())
11218-}) *MockSessionSpawner {
11219- mock := &MockSessionSpawner{}
11220- mock.Mock.Test(t)
11221-
11222- t.Cleanup(func() { mock.AssertExpectations(t) })
11223-
11224- return mock
11225-}
11226-
11227-// MockSessionSpawner is an autogenerated mock type for the SessionSpawner type
11228-type MockSessionSpawner struct {
11229- mock.Mock
11230-}
11231-
11232-type MockSessionSpawner_Expecter struct {
11233- mock *mock.Mock
11234-}
11235-
11236-func (_m *MockSessionSpawner) EXPECT() *MockSessionSpawner_Expecter {
11237- return &MockSessionSpawner_Expecter{mock: &_m.Mock}
11238-}
11239-
11240-// SpawnWithSession provides a mock function for the type MockSessionSpawner
11241-func (_mock *MockSessionSpawner) SpawnWithSession(sessionID entity.SessionID) error {
11242- ret := _mock.Called(sessionID)
11243-
11244- if len(ret) == 0 {
11245- panic("no return value specified for SpawnWithSession")
11246- }
11247-
11248- var r0 error
11249- if returnFunc, ok := ret.Get(0).(func(entity.SessionID) error); ok {
11250- r0 = returnFunc(sessionID)
11251- } else {
11252- r0 = ret.Error(0)
11253- }
11254- return r0
11255-}
11256-
11257-// MockSessionSpawner_SpawnWithSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SpawnWithSession'
11258-type MockSessionSpawner_SpawnWithSession_Call struct {
11259- *mock.Call
11260-}
11261-
11262-// SpawnWithSession is a helper method to define mock.On call
11263-// - sessionID entity.SessionID
11264-func (_e *MockSessionSpawner_Expecter) SpawnWithSession(sessionID interface{}) *MockSessionSpawner_SpawnWithSession_Call {
11265- return &MockSessionSpawner_SpawnWithSession_Call{Call: _e.mock.On("SpawnWithSession", sessionID)}
11266-}
11267-
11268-func (_c *MockSessionSpawner_SpawnWithSession_Call) Run(run func(sessionID entity.SessionID)) *MockSessionSpawner_SpawnWithSession_Call {
11269- _c.Call.Run(func(args mock.Arguments) {
11270- var arg0 entity.SessionID
11271- if args[0] != nil {
11272- arg0 = args[0].(entity.SessionID)
11273- }
11274- run(
11275- arg0,
11276- )
11277- })
11278- return _c
11279-}
11280-
11281-func (_c *MockSessionSpawner_SpawnWithSession_Call) Return(err error) *MockSessionSpawner_SpawnWithSession_Call {
11282- _c.Call.Return(err)
11283- return _c
11284-}
11285-
11286-func (_c *MockSessionSpawner_SpawnWithSession_Call) RunAndReturn(run func(sessionID entity.SessionID) error) *MockSessionSpawner_SpawnWithSession_Call {
11287- _c.Call.Return(run)
11288- return _c
11289-}
11290-
11291-// NewMockSnapshotService creates a new instance of MockSnapshotService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
11292-// The first argument is typically a *testing.T value.
11293-func NewMockSnapshotService(t interface {
11294- mock.TestingT
11295- Cleanup(func())
11296-}) *MockSnapshotService {
11297- mock := &MockSnapshotService{}
11298- mock.Mock.Test(t)
11299-
11300- t.Cleanup(func() { mock.AssertExpectations(t) })
11301-
11302- return mock
11303-}
11304-
11305-// MockSnapshotService is an autogenerated mock type for the SnapshotService type
11306-type MockSnapshotService struct {
11307- mock.Mock
11308-}
11309-
11310-type MockSnapshotService_Expecter struct {
11311- mock *mock.Mock
11312-}
11313-
11314-func (_m *MockSnapshotService) EXPECT() *MockSnapshotService_Expecter {
11315- return &MockSnapshotService_Expecter{mock: &_m.Mock}
11316-}
11317-
11318-// MarkDirty provides a mock function for the type MockSnapshotService
11319-func (_mock *MockSnapshotService) MarkDirty() {
11320- _mock.Called()
11321- return
11322-}
11323-
11324-// MockSnapshotService_MarkDirty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkDirty'
11325-type MockSnapshotService_MarkDirty_Call struct {
11326- *mock.Call
11327-}
11328-
11329-// MarkDirty is a helper method to define mock.On call
11330-func (_e *MockSnapshotService_Expecter) MarkDirty() *MockSnapshotService_MarkDirty_Call {
11331- return &MockSnapshotService_MarkDirty_Call{Call: _e.mock.On("MarkDirty")}
11332-}
11333-
11334-func (_c *MockSnapshotService_MarkDirty_Call) Run(run func()) *MockSnapshotService_MarkDirty_Call {
11335- _c.Call.Run(func(args mock.Arguments) {
11336- run()
11337- })
11338- return _c
11339-}
11340-
11341-func (_c *MockSnapshotService_MarkDirty_Call) Return() *MockSnapshotService_MarkDirty_Call {
11342- _c.Call.Return()
11343- return _c
11344-}
11345-
11346-func (_c *MockSnapshotService_MarkDirty_Call) RunAndReturn(run func()) *MockSnapshotService_MarkDirty_Call {
11347- _c.Run(run)
11348- return _c
11349-}
11350-
11351-// SaveNow provides a mock function for the type MockSnapshotService
11352-func (_mock *MockSnapshotService) SaveNow(ctx context.Context) error {
11353- ret := _mock.Called(ctx)
11354-
11355- if len(ret) == 0 {
11356- panic("no return value specified for SaveNow")
11357- }
11358-
11359- var r0 error
11360- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
11361- r0 = returnFunc(ctx)
11362- } else {
11363- r0 = ret.Error(0)
11364- }
11365- return r0
11366-}
11367-
11368-// MockSnapshotService_SaveNow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveNow'
11369-type MockSnapshotService_SaveNow_Call struct {
11370- *mock.Call
11371-}
11372-
11373-// SaveNow is a helper method to define mock.On call
11374-// - ctx context.Context
11375-func (_e *MockSnapshotService_Expecter) SaveNow(ctx interface{}) *MockSnapshotService_SaveNow_Call {
11376- return &MockSnapshotService_SaveNow_Call{Call: _e.mock.On("SaveNow", ctx)}
11377-}
11378-
11379-func (_c *MockSnapshotService_SaveNow_Call) Run(run func(ctx context.Context)) *MockSnapshotService_SaveNow_Call {
11380- _c.Call.Run(func(args mock.Arguments) {
11381- var arg0 context.Context
11382- if args[0] != nil {
11383- arg0 = args[0].(context.Context)
11384- }
11385- run(
11386- arg0,
11387- )
11388- })
11389- return _c
11390-}
11391-
11392-func (_c *MockSnapshotService_SaveNow_Call) Return(err error) *MockSnapshotService_SaveNow_Call {
11393- _c.Call.Return(err)
11394- return _c
11395-}
11396-
11397-func (_c *MockSnapshotService_SaveNow_Call) RunAndReturn(run func(ctx context.Context) error) *MockSnapshotService_SaveNow_Call {
11398- _c.Call.Return(run)
11399- return _c
11400-}
11401-
11402-// SetReady provides a mock function for the type MockSnapshotService
11403-func (_mock *MockSnapshotService) SetReady() {
11404- _mock.Called()
11405- return
11406-}
11407-
11408-// MockSnapshotService_SetReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReady'
11409-type MockSnapshotService_SetReady_Call struct {
11410- *mock.Call
11411-}
11412-
11413-// SetReady is a helper method to define mock.On call
11414-func (_e *MockSnapshotService_Expecter) SetReady() *MockSnapshotService_SetReady_Call {
11415- return &MockSnapshotService_SetReady_Call{Call: _e.mock.On("SetReady")}
11416-}
11417-
11418-func (_c *MockSnapshotService_SetReady_Call) Run(run func()) *MockSnapshotService_SetReady_Call {
11419- _c.Call.Run(func(args mock.Arguments) {
11420- run()
11421- })
11422- return _c
11423-}
11424-
11425-func (_c *MockSnapshotService_SetReady_Call) Return() *MockSnapshotService_SetReady_Call {
11426- _c.Call.Return()
11427- return _c
11428-}
11429-
11430-func (_c *MockSnapshotService_SetReady_Call) RunAndReturn(run func()) *MockSnapshotService_SetReady_Call {
11431- _c.Run(run)
11432- return _c
11433-}
11434-
11435-// Start provides a mock function for the type MockSnapshotService
11436-func (_mock *MockSnapshotService) Start(ctx context.Context) {
11437- _mock.Called(ctx)
11438- return
11439-}
11440-
11441-// MockSnapshotService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
11442-type MockSnapshotService_Start_Call struct {
11443- *mock.Call
11444-}
11445-
11446-// Start is a helper method to define mock.On call
11447-// - ctx context.Context
11448-func (_e *MockSnapshotService_Expecter) Start(ctx interface{}) *MockSnapshotService_Start_Call {
11449- return &MockSnapshotService_Start_Call{Call: _e.mock.On("Start", ctx)}
11450-}
11451-
11452-func (_c *MockSnapshotService_Start_Call) Run(run func(ctx context.Context)) *MockSnapshotService_Start_Call {
11453- _c.Call.Run(func(args mock.Arguments) {
11454- var arg0 context.Context
11455- if args[0] != nil {
11456- arg0 = args[0].(context.Context)
11457- }
11458- run(
11459- arg0,
11460- )
11461- })
11462- return _c
11463-}
11464-
11465-func (_c *MockSnapshotService_Start_Call) Return() *MockSnapshotService_Start_Call {
11466- _c.Call.Return()
11467- return _c
11468-}
11469-
11470-func (_c *MockSnapshotService_Start_Call) RunAndReturn(run func(ctx context.Context)) *MockSnapshotService_Start_Call {
11471- _c.Run(run)
11472- return _c
11473-}
11474-
11475-// Stop provides a mock function for the type MockSnapshotService
11476-func (_mock *MockSnapshotService) Stop(ctx context.Context) error {
11477- ret := _mock.Called(ctx)
11478-
11479- if len(ret) == 0 {
11480- panic("no return value specified for Stop")
11481- }
11482-
11483- var r0 error
11484- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
11485- r0 = returnFunc(ctx)
11486- } else {
11487- r0 = ret.Error(0)
11488- }
11489- return r0
11490-}
11491-
11492-// MockSnapshotService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
11493-type MockSnapshotService_Stop_Call struct {
11494- *mock.Call
11495-}
11496-
11497-// Stop is a helper method to define mock.On call
11498-// - ctx context.Context
11499-func (_e *MockSnapshotService_Expecter) Stop(ctx interface{}) *MockSnapshotService_Stop_Call {
11500- return &MockSnapshotService_Stop_Call{Call: _e.mock.On("Stop", ctx)}
11501-}
11502-
11503-func (_c *MockSnapshotService_Stop_Call) Run(run func(ctx context.Context)) *MockSnapshotService_Stop_Call {
11504- _c.Call.Run(func(args mock.Arguments) {
11505- var arg0 context.Context
11506- if args[0] != nil {
11507- arg0 = args[0].(context.Context)
11508- }
11509- run(
11510- arg0,
11511- )
11512- })
11513- return _c
11514-}
11515-
11516-func (_c *MockSnapshotService_Stop_Call) Return(err error) *MockSnapshotService_Stop_Call {
11517- _c.Call.Return(err)
11518- return _c
11519-}
11520-
11521-func (_c *MockSnapshotService_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockSnapshotService_Stop_Call {
11522- _c.Call.Return(run)
11523- return _c
11524-}
11525-
11526-// NewMockTextInputTarget creates a new instance of MockTextInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
11527-// The first argument is typically a *testing.T value.
11528-func NewMockTextInputTarget(t interface {
11529- mock.TestingT
11530- Cleanup(func())
11531-}) *MockTextInputTarget {
11532- mock := &MockTextInputTarget{}
11533- mock.Mock.Test(t)
11534-
11535- t.Cleanup(func() { mock.AssertExpectations(t) })
11536-
11537- return mock
11538-}
11539-
11540-// MockTextInputTarget is an autogenerated mock type for the TextInputTarget type
11541-type MockTextInputTarget struct {
11542- mock.Mock
11543-}
11544-
11545-type MockTextInputTarget_Expecter struct {
11546- mock *mock.Mock
11547-}
11548-
11549-func (_m *MockTextInputTarget) EXPECT() *MockTextInputTarget_Expecter {
11550- return &MockTextInputTarget_Expecter{mock: &_m.Mock}
11551-}
11552-
11553-// DeleteBeforeCursor provides a mock function for the type MockTextInputTarget
11554-func (_mock *MockTextInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error {
11555- ret := _mock.Called(ctx, n)
11556-
11557- if len(ret) == 0 {
11558- panic("no return value specified for DeleteBeforeCursor")
11559- }
11560-
11561- var r0 error
11562- if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok {
11563- r0 = returnFunc(ctx, n)
11564- } else {
11565- r0 = ret.Error(0)
11566- }
11567- return r0
11568-}
11569-
11570-// MockTextInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor'
11571-type MockTextInputTarget_DeleteBeforeCursor_Call struct {
11572- *mock.Call
11573-}
11574-
11575-// DeleteBeforeCursor is a helper method to define mock.On call
11576-// - ctx context.Context
11577-// - n int
11578-func (_e *MockTextInputTarget_Expecter) DeleteBeforeCursor(ctx interface{}, n interface{}) *MockTextInputTarget_DeleteBeforeCursor_Call {
11579- return &MockTextInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)}
11580-}
11581-
11582-func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockTextInputTarget_DeleteBeforeCursor_Call {
11583- _c.Call.Run(func(args mock.Arguments) {
11584- var arg0 context.Context
11585- if args[0] != nil {
11586- arg0 = args[0].(context.Context)
11587- }
11588- var arg1 int
11589- if args[1] != nil {
11590- arg1 = args[1].(int)
11591- }
11592- run(
11593- arg0,
11594- arg1,
11595- )
11596- })
11597- return _c
11598-}
11599-
11600-func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockTextInputTarget_DeleteBeforeCursor_Call {
11601- _c.Call.Return(err)
11602- return _c
11603-}
11604-
11605-func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockTextInputTarget_DeleteBeforeCursor_Call {
11606- _c.Call.Return(run)
11607- return _c
11608-}
11609-
11610-// InsertText provides a mock function for the type MockTextInputTarget
11611-func (_mock *MockTextInputTarget) InsertText(ctx context.Context, text string) error {
11612- ret := _mock.Called(ctx, text)
11613-
11614- if len(ret) == 0 {
11615- panic("no return value specified for InsertText")
11616- }
11617-
11618- var r0 error
11619- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
11620- r0 = returnFunc(ctx, text)
11621- } else {
11622- r0 = ret.Error(0)
11623- }
11624- return r0
11625-}
11626-
11627-// MockTextInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText'
11628-type MockTextInputTarget_InsertText_Call struct {
11629- *mock.Call
11630-}
11631-
11632-// InsertText is a helper method to define mock.On call
11633-// - ctx context.Context
11634-// - text string
11635-func (_e *MockTextInputTarget_Expecter) InsertText(ctx interface{}, text interface{}) *MockTextInputTarget_InsertText_Call {
11636- return &MockTextInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)}
11637-}
11638-
11639-func (_c *MockTextInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockTextInputTarget_InsertText_Call {
11640- _c.Call.Run(func(args mock.Arguments) {
11641- var arg0 context.Context
11642- if args[0] != nil {
11643- arg0 = args[0].(context.Context)
11644- }
11645- var arg1 string
11646- if args[1] != nil {
11647- arg1 = args[1].(string)
11648- }
11649- run(
11650- arg0,
11651- arg1,
11652- )
11653- })
11654- return _c
11655-}
11656-
11657-func (_c *MockTextInputTarget_InsertText_Call) Return(err error) *MockTextInputTarget_InsertText_Call {
11658- _c.Call.Return(err)
11659- return _c
11660-}
11661-
11662-func (_c *MockTextInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockTextInputTarget_InsertText_Call {
11663- _c.Call.Return(run)
11664- return _c
11665-}
11666-
11667-// NewMockFocusable creates a new instance of MockFocusable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
11668-// The first argument is typically a *testing.T value.
11669-func NewMockFocusable(t interface {
11670- mock.TestingT
11671- Cleanup(func())
11672-}) *MockFocusable {
11673- mock := &MockFocusable{}
11674- mock.Mock.Test(t)
11675-
11676- t.Cleanup(func() { mock.AssertExpectations(t) })
11677-
11678- return mock
11679-}
11680-
11681-// MockFocusable is an autogenerated mock type for the Focusable type
11682-type MockFocusable struct {
11683- mock.Mock
11684-}
11685-
11686-type MockFocusable_Expecter struct {
11687- mock *mock.Mock
11688-}
11689-
11690-func (_m *MockFocusable) EXPECT() *MockFocusable_Expecter {
11691- return &MockFocusable_Expecter{mock: &_m.Mock}
11692-}
11693-
11694-// Focus provides a mock function for the type MockFocusable
11695-func (_mock *MockFocusable) Focus(ctx context.Context) {
11696- _mock.Called(ctx)
11697- return
11698-}
11699-
11700-// MockFocusable_Focus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Focus'
11701-type MockFocusable_Focus_Call struct {
11702- *mock.Call
11703-}
11704-
11705-// Focus is a helper method to define mock.On call
11706-// - ctx context.Context
11707-func (_e *MockFocusable_Expecter) Focus(ctx interface{}) *MockFocusable_Focus_Call {
11708- return &MockFocusable_Focus_Call{Call: _e.mock.On("Focus", ctx)}
11709-}
11710-
11711-func (_c *MockFocusable_Focus_Call) Run(run func(ctx context.Context)) *MockFocusable_Focus_Call {
11712- _c.Call.Run(func(args mock.Arguments) {
11713- var arg0 context.Context
11714- if args[0] != nil {
11715- arg0 = args[0].(context.Context)
11716- }
11717- run(
11718- arg0,
11719- )
11720- })
11721- return _c
11722-}
11723-
11724-func (_c *MockFocusable_Focus_Call) Return() *MockFocusable_Focus_Call {
11725- _c.Call.Return()
11726- return _c
11727-}
11728-
11729-func (_c *MockFocusable_Focus_Call) RunAndReturn(run func(ctx context.Context)) *MockFocusable_Focus_Call {
11730- _c.Run(run)
11731- return _c
11732-}
11733-
11734-// NewMockEntryInputTarget creates a new instance of MockEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
11735-// The first argument is typically a *testing.T value.
11736-func NewMockEntryInputTarget(t interface {
11737- mock.TestingT
11738- Cleanup(func())
11739-}) *MockEntryInputTarget {
11740- mock := &MockEntryInputTarget{}
11741- mock.Mock.Test(t)
11742-
11743- t.Cleanup(func() { mock.AssertExpectations(t) })
11744-
11745- return mock
11746-}
11747-
11748-// MockEntryInputTarget is an autogenerated mock type for the EntryInputTarget type
11749-type MockEntryInputTarget struct {
11750- mock.Mock
11751-}
11752-
11753-type MockEntryInputTarget_Expecter struct {
11754- mock *mock.Mock
11755-}
11756-
11757-func (_m *MockEntryInputTarget) EXPECT() *MockEntryInputTarget_Expecter {
11758- return &MockEntryInputTarget_Expecter{mock: &_m.Mock}
11759-}
11760-
11761-// DeleteBeforeCursor provides a mock function for the type MockEntryInputTarget
11762-func (_mock *MockEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error {
11763- ret := _mock.Called(ctx, n)
11764-
11765- if len(ret) == 0 {
11766- panic("no return value specified for DeleteBeforeCursor")
11767- }
11768-
11769- var r0 error
11770- if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok {
11771- r0 = returnFunc(ctx, n)
11772- } else {
11773- r0 = ret.Error(0)
11774- }
11775- return r0
11776-}
11777-
11778-// MockEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor'
11779-type MockEntryInputTarget_DeleteBeforeCursor_Call struct {
11780- *mock.Call
11781-}
11782-
11783-// DeleteBeforeCursor is a helper method to define mock.On call
11784-// - ctx context.Context
11785-// - n int
11786-func (_e *MockEntryInputTarget_Expecter) DeleteBeforeCursor(ctx interface{}, n interface{}) *MockEntryInputTarget_DeleteBeforeCursor_Call {
11787- return &MockEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)}
11788-}
11789-
11790-func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockEntryInputTarget_DeleteBeforeCursor_Call {
11791- _c.Call.Run(func(args mock.Arguments) {
11792- var arg0 context.Context
11793- if args[0] != nil {
11794- arg0 = args[0].(context.Context)
11795- }
11796- var arg1 int
11797- if args[1] != nil {
11798- arg1 = args[1].(int)
11799- }
11800- run(
11801- arg0,
11802- arg1,
11803- )
11804- })
11805- return _c
11806-}
11807-
11808-func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockEntryInputTarget_DeleteBeforeCursor_Call {
11809- _c.Call.Return(err)
11810- return _c
11811-}
11812-
11813-func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockEntryInputTarget_DeleteBeforeCursor_Call {
11814- _c.Call.Return(run)
11815- return _c
11816-}
11817-
11818-// InsertText provides a mock function for the type MockEntryInputTarget
11819-func (_mock *MockEntryInputTarget) InsertText(ctx context.Context, text string) error {
11820- ret := _mock.Called(ctx, text)
11821-
11822- if len(ret) == 0 {
11823- panic("no return value specified for InsertText")
11824- }
11825-
11826- var r0 error
11827- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
11828- r0 = returnFunc(ctx, text)
11829- } else {
11830- r0 = ret.Error(0)
11831- }
11832- return r0
11833-}
11834-
11835-// MockEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText'
11836-type MockEntryInputTarget_InsertText_Call struct {
11837- *mock.Call
11838-}
11839-
11840-// InsertText is a helper method to define mock.On call
11841-// - ctx context.Context
11842-// - text string
11843-func (_e *MockEntryInputTarget_Expecter) InsertText(ctx interface{}, text interface{}) *MockEntryInputTarget_InsertText_Call {
11844- return &MockEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)}
11845-}
11846-
11847-func (_c *MockEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockEntryInputTarget_InsertText_Call {
11848- _c.Call.Run(func(args mock.Arguments) {
11849- var arg0 context.Context
11850- if args[0] != nil {
11851- arg0 = args[0].(context.Context)
11852- }
11853- var arg1 string
11854- if args[1] != nil {
11855- arg1 = args[1].(string)
11856- }
11857- run(
11858- arg0,
11859- arg1,
11860- )
11861- })
11862- return _c
11863-}
11864-
11865-func (_c *MockEntryInputTarget_InsertText_Call) Return(err error) *MockEntryInputTarget_InsertText_Call {
11866- _c.Call.Return(err)
11867- return _c
11868-}
11869-
11870-func (_c *MockEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockEntryInputTarget_InsertText_Call {
11871- _c.Call.Return(run)
11872- return _c
11873-}
11874-
11875-// IsGTKEntryTarget provides a mock function for the type MockEntryInputTarget
11876-func (_mock *MockEntryInputTarget) IsGTKEntryTarget() bool {
11877- ret := _mock.Called()
11878-
11879- if len(ret) == 0 {
11880- panic("no return value specified for IsGTKEntryTarget")
11881- }
11882-
11883- var r0 bool
11884- if returnFunc, ok := ret.Get(0).(func() bool); ok {
11885- r0 = returnFunc()
11886- } else {
11887- r0 = ret.Get(0).(bool)
11888- }
11889- return r0
11890-}
11891-
11892-// MockEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget'
11893-type MockEntryInputTarget_IsGTKEntryTarget_Call struct {
11894- *mock.Call
11895-}
11896-
11897-// IsGTKEntryTarget is a helper method to define mock.On call
11898-func (_e *MockEntryInputTarget_Expecter) IsGTKEntryTarget() *MockEntryInputTarget_IsGTKEntryTarget_Call {
11899- return &MockEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")}
11900-}
11901-
11902-func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockEntryInputTarget_IsGTKEntryTarget_Call {
11903- _c.Call.Run(func(args mock.Arguments) {
11904- run()
11905- })
11906- return _c
11907-}
11908-
11909-func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockEntryInputTarget_IsGTKEntryTarget_Call {
11910- _c.Call.Return(b)
11911- return _c
11912-}
11913-
11914-func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockEntryInputTarget_IsGTKEntryTarget_Call {
11915- _c.Call.Return(run)
11916- return _c
11917-}
11918-
11919-// NewMockFocusedInputProvider creates a new instance of MockFocusedInputProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
11920-// The first argument is typically a *testing.T value.
11921-func NewMockFocusedInputProvider(t interface {
11922- mock.TestingT
11923- Cleanup(func())
11924-}) *MockFocusedInputProvider {
11925- mock := &MockFocusedInputProvider{}
11926- mock.Mock.Test(t)
11927-
11928- t.Cleanup(func() { mock.AssertExpectations(t) })
11929-
11930- return mock
11931-}
11932-
11933-// MockFocusedInputProvider is an autogenerated mock type for the FocusedInputProvider type
11934-type MockFocusedInputProvider struct {
11935- mock.Mock
11936-}
11937-
11938-type MockFocusedInputProvider_Expecter struct {
11939- mock *mock.Mock
11940-}
11941-
11942-func (_m *MockFocusedInputProvider) EXPECT() *MockFocusedInputProvider_Expecter {
11943- return &MockFocusedInputProvider_Expecter{mock: &_m.Mock}
11944-}
11945-
11946-// GetFocusedInput provides a mock function for the type MockFocusedInputProvider
11947-func (_mock *MockFocusedInputProvider) GetFocusedInput() port.TextInputTarget {
11948- ret := _mock.Called()
11949-
11950- if len(ret) == 0 {
11951- panic("no return value specified for GetFocusedInput")
11952- }
11953-
11954- var r0 port.TextInputTarget
11955- if returnFunc, ok := ret.Get(0).(func() port.TextInputTarget); ok {
11956- r0 = returnFunc()
11957- } else {
11958- if ret.Get(0) != nil {
11959- r0 = ret.Get(0).(port.TextInputTarget)
11960- }
11961- }
11962- return r0
11963-}
11964-
11965-// MockFocusedInputProvider_GetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFocusedInput'
11966-type MockFocusedInputProvider_GetFocusedInput_Call struct {
11967- *mock.Call
11968-}
11969-
11970-// GetFocusedInput is a helper method to define mock.On call
11971-func (_e *MockFocusedInputProvider_Expecter) GetFocusedInput() *MockFocusedInputProvider_GetFocusedInput_Call {
11972- return &MockFocusedInputProvider_GetFocusedInput_Call{Call: _e.mock.On("GetFocusedInput")}
11973-}
11974-
11975-func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Run(run func()) *MockFocusedInputProvider_GetFocusedInput_Call {
11976- _c.Call.Run(func(args mock.Arguments) {
11977- run()
11978- })
11979- return _c
11980-}
11981-
11982-func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Return(textInputTarget port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call {
11983- _c.Call.Return(textInputTarget)
11984- return _c
11985-}
11986-
11987-func (_c *MockFocusedInputProvider_GetFocusedInput_Call) RunAndReturn(run func() port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call {
11988- _c.Call.Return(run)
11989- return _c
11990-}
11991-
11992-// SetFocusedInput provides a mock function for the type MockFocusedInputProvider
11993-func (_mock *MockFocusedInputProvider) SetFocusedInput(target port.TextInputTarget) {
11994- _mock.Called(target)
11995- return
11996-}
11997-
11998-// MockFocusedInputProvider_SetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusedInput'
11999-type MockFocusedInputProvider_SetFocusedInput_Call struct {
12000- *mock.Call
12001-}
12002-
12003-// SetFocusedInput is a helper method to define mock.On call
12004-// - target port.TextInputTarget
12005-func (_e *MockFocusedInputProvider_Expecter) SetFocusedInput(target interface{}) *MockFocusedInputProvider_SetFocusedInput_Call {
12006- return &MockFocusedInputProvider_SetFocusedInput_Call{Call: _e.mock.On("SetFocusedInput", target)}
12007-}
12008-
12009-func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Run(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call {
12010- _c.Call.Run(func(args mock.Arguments) {
12011- var arg0 port.TextInputTarget
12012- if args[0] != nil {
12013- arg0 = args[0].(port.TextInputTarget)
12014- }
12015- run(
12016- arg0,
12017- )
12018- })
12019- return _c
12020-}
12021-
12022-func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Return() *MockFocusedInputProvider_SetFocusedInput_Call {
12023- _c.Call.Return()
12024- return _c
12025-}
12026-
12027-func (_c *MockFocusedInputProvider_SetFocusedInput_Call) RunAndReturn(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call {
12028- _c.Run(run)
12029- return _c
12030-}
12031-
12032-// NewMockUpdateChecker creates a new instance of MockUpdateChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12033-// The first argument is typically a *testing.T value.
12034-func NewMockUpdateChecker(t interface {
12035- mock.TestingT
12036- Cleanup(func())
12037-}) *MockUpdateChecker {
12038- mock := &MockUpdateChecker{}
12039- mock.Mock.Test(t)
12040-
12041- t.Cleanup(func() { mock.AssertExpectations(t) })
12042-
12043- return mock
12044-}
12045-
12046-// MockUpdateChecker is an autogenerated mock type for the UpdateChecker type
12047-type MockUpdateChecker struct {
12048- mock.Mock
12049-}
12050-
12051-type MockUpdateChecker_Expecter struct {
12052- mock *mock.Mock
12053-}
12054-
12055-func (_m *MockUpdateChecker) EXPECT() *MockUpdateChecker_Expecter {
12056- return &MockUpdateChecker_Expecter{mock: &_m.Mock}
12057-}
12058-
12059-// CheckForUpdate provides a mock function for the type MockUpdateChecker
12060-func (_mock *MockUpdateChecker) CheckForUpdate(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error) {
12061- ret := _mock.Called(ctx, currentVersion)
12062-
12063- if len(ret) == 0 {
12064- panic("no return value specified for CheckForUpdate")
12065- }
12066-
12067- var r0 *entity.UpdateInfo
12068- var r1 error
12069- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.UpdateInfo, error)); ok {
12070- return returnFunc(ctx, currentVersion)
12071- }
12072- if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.UpdateInfo); ok {
12073- r0 = returnFunc(ctx, currentVersion)
12074- } else {
12075- if ret.Get(0) != nil {
12076- r0 = ret.Get(0).(*entity.UpdateInfo)
12077- }
12078- }
12079- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
12080- r1 = returnFunc(ctx, currentVersion)
12081- } else {
12082- r1 = ret.Error(1)
12083- }
12084- return r0, r1
12085-}
12086-
12087-// MockUpdateChecker_CheckForUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckForUpdate'
12088-type MockUpdateChecker_CheckForUpdate_Call struct {
12089- *mock.Call
12090-}
12091-
12092-// CheckForUpdate is a helper method to define mock.On call
12093-// - ctx context.Context
12094-// - currentVersion string
12095-func (_e *MockUpdateChecker_Expecter) CheckForUpdate(ctx interface{}, currentVersion interface{}) *MockUpdateChecker_CheckForUpdate_Call {
12096- return &MockUpdateChecker_CheckForUpdate_Call{Call: _e.mock.On("CheckForUpdate", ctx, currentVersion)}
12097-}
12098-
12099-func (_c *MockUpdateChecker_CheckForUpdate_Call) Run(run func(ctx context.Context, currentVersion string)) *MockUpdateChecker_CheckForUpdate_Call {
12100- _c.Call.Run(func(args mock.Arguments) {
12101- var arg0 context.Context
12102- if args[0] != nil {
12103- arg0 = args[0].(context.Context)
12104- }
12105- var arg1 string
12106- if args[1] != nil {
12107- arg1 = args[1].(string)
12108- }
12109- run(
12110- arg0,
12111- arg1,
12112- )
12113- })
12114- return _c
12115-}
12116-
12117-func (_c *MockUpdateChecker_CheckForUpdate_Call) Return(updateInfo *entity.UpdateInfo, err error) *MockUpdateChecker_CheckForUpdate_Call {
12118- _c.Call.Return(updateInfo, err)
12119- return _c
12120-}
12121-
12122-func (_c *MockUpdateChecker_CheckForUpdate_Call) RunAndReturn(run func(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error)) *MockUpdateChecker_CheckForUpdate_Call {
12123- _c.Call.Return(run)
12124- return _c
12125-}
12126-
12127-// NewMockUpdateDownloader creates a new instance of MockUpdateDownloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12128-// The first argument is typically a *testing.T value.
12129-func NewMockUpdateDownloader(t interface {
12130- mock.TestingT
12131- Cleanup(func())
12132-}) *MockUpdateDownloader {
12133- mock := &MockUpdateDownloader{}
12134- mock.Mock.Test(t)
12135-
12136- t.Cleanup(func() { mock.AssertExpectations(t) })
12137-
12138- return mock
12139-}
12140-
12141-// MockUpdateDownloader is an autogenerated mock type for the UpdateDownloader type
12142-type MockUpdateDownloader struct {
12143- mock.Mock
12144-}
12145-
12146-type MockUpdateDownloader_Expecter struct {
12147- mock *mock.Mock
12148-}
12149-
12150-func (_m *MockUpdateDownloader) EXPECT() *MockUpdateDownloader_Expecter {
12151- return &MockUpdateDownloader_Expecter{mock: &_m.Mock}
12152-}
12153-
12154-// Download provides a mock function for the type MockUpdateDownloader
12155-func (_mock *MockUpdateDownloader) Download(ctx context.Context, downloadURL string, destDir string) (string, error) {
12156- ret := _mock.Called(ctx, downloadURL, destDir)
12157-
12158- if len(ret) == 0 {
12159- panic("no return value specified for Download")
12160- }
12161-
12162- var r0 string
12163- var r1 error
12164- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
12165- return returnFunc(ctx, downloadURL, destDir)
12166- }
12167- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
12168- r0 = returnFunc(ctx, downloadURL, destDir)
12169- } else {
12170- r0 = ret.Get(0).(string)
12171- }
12172- if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
12173- r1 = returnFunc(ctx, downloadURL, destDir)
12174- } else {
12175- r1 = ret.Error(1)
12176- }
12177- return r0, r1
12178-}
12179-
12180-// MockUpdateDownloader_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'
12181-type MockUpdateDownloader_Download_Call struct {
12182- *mock.Call
12183-}
12184-
12185-// Download is a helper method to define mock.On call
12186-// - ctx context.Context
12187-// - downloadURL string
12188-// - destDir string
12189-func (_e *MockUpdateDownloader_Expecter) Download(ctx interface{}, downloadURL interface{}, destDir interface{}) *MockUpdateDownloader_Download_Call {
12190- return &MockUpdateDownloader_Download_Call{Call: _e.mock.On("Download", ctx, downloadURL, destDir)}
12191-}
12192-
12193-func (_c *MockUpdateDownloader_Download_Call) Run(run func(ctx context.Context, downloadURL string, destDir string)) *MockUpdateDownloader_Download_Call {
12194- _c.Call.Run(func(args mock.Arguments) {
12195- var arg0 context.Context
12196- if args[0] != nil {
12197- arg0 = args[0].(context.Context)
12198- }
12199- var arg1 string
12200- if args[1] != nil {
12201- arg1 = args[1].(string)
12202- }
12203- var arg2 string
12204- if args[2] != nil {
12205- arg2 = args[2].(string)
12206- }
12207- run(
12208- arg0,
12209- arg1,
12210- arg2,
12211- )
12212- })
12213- return _c
12214-}
12215-
12216-func (_c *MockUpdateDownloader_Download_Call) Return(archivePath string, err error) *MockUpdateDownloader_Download_Call {
12217- _c.Call.Return(archivePath, err)
12218- return _c
12219-}
12220-
12221-func (_c *MockUpdateDownloader_Download_Call) RunAndReturn(run func(ctx context.Context, downloadURL string, destDir string) (string, error)) *MockUpdateDownloader_Download_Call {
12222- _c.Call.Return(run)
12223- return _c
12224-}
12225-
12226-// Extract provides a mock function for the type MockUpdateDownloader
12227-func (_mock *MockUpdateDownloader) Extract(ctx context.Context, archivePath string, destDir string) (string, error) {
12228- ret := _mock.Called(ctx, archivePath, destDir)
12229-
12230- if len(ret) == 0 {
12231- panic("no return value specified for Extract")
12232- }
12233-
12234- var r0 string
12235- var r1 error
12236- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
12237- return returnFunc(ctx, archivePath, destDir)
12238- }
12239- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
12240- r0 = returnFunc(ctx, archivePath, destDir)
12241- } else {
12242- r0 = ret.Get(0).(string)
12243- }
12244- if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
12245- r1 = returnFunc(ctx, archivePath, destDir)
12246- } else {
12247- r1 = ret.Error(1)
12248- }
12249- return r0, r1
12250-}
12251-
12252-// MockUpdateDownloader_Extract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extract'
12253-type MockUpdateDownloader_Extract_Call struct {
12254- *mock.Call
12255-}
12256-
12257-// Extract is a helper method to define mock.On call
12258-// - ctx context.Context
12259-// - archivePath string
12260-// - destDir string
12261-func (_e *MockUpdateDownloader_Expecter) Extract(ctx interface{}, archivePath interface{}, destDir interface{}) *MockUpdateDownloader_Extract_Call {
12262- return &MockUpdateDownloader_Extract_Call{Call: _e.mock.On("Extract", ctx, archivePath, destDir)}
12263-}
12264-
12265-func (_c *MockUpdateDownloader_Extract_Call) Run(run func(ctx context.Context, archivePath string, destDir string)) *MockUpdateDownloader_Extract_Call {
12266- _c.Call.Run(func(args mock.Arguments) {
12267- var arg0 context.Context
12268- if args[0] != nil {
12269- arg0 = args[0].(context.Context)
12270- }
12271- var arg1 string
12272- if args[1] != nil {
12273- arg1 = args[1].(string)
12274- }
12275- var arg2 string
12276- if args[2] != nil {
12277- arg2 = args[2].(string)
12278- }
12279- run(
12280- arg0,
12281- arg1,
12282- arg2,
12283- )
12284- })
12285- return _c
12286-}
12287-
12288-func (_c *MockUpdateDownloader_Extract_Call) Return(binaryPath string, err error) *MockUpdateDownloader_Extract_Call {
12289- _c.Call.Return(binaryPath, err)
12290- return _c
12291-}
12292-
12293-func (_c *MockUpdateDownloader_Extract_Call) RunAndReturn(run func(ctx context.Context, archivePath string, destDir string) (string, error)) *MockUpdateDownloader_Extract_Call {
12294- _c.Call.Return(run)
12295- return _c
12296-}
12297-
12298-// NewMockUpdateApplier creates a new instance of MockUpdateApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12299-// The first argument is typically a *testing.T value.
12300-func NewMockUpdateApplier(t interface {
12301- mock.TestingT
12302- Cleanup(func())
12303-}) *MockUpdateApplier {
12304- mock := &MockUpdateApplier{}
12305- mock.Mock.Test(t)
12306-
12307- t.Cleanup(func() { mock.AssertExpectations(t) })
12308-
12309- return mock
12310-}
12311-
12312-// MockUpdateApplier is an autogenerated mock type for the UpdateApplier type
12313-type MockUpdateApplier struct {
12314- mock.Mock
12315-}
12316-
12317-type MockUpdateApplier_Expecter struct {
12318- mock *mock.Mock
12319-}
12320-
12321-func (_m *MockUpdateApplier) EXPECT() *MockUpdateApplier_Expecter {
12322- return &MockUpdateApplier_Expecter{mock: &_m.Mock}
12323-}
12324-
12325-// ApplyOnExit provides a mock function for the type MockUpdateApplier
12326-func (_mock *MockUpdateApplier) ApplyOnExit(ctx context.Context) (string, error) {
12327- ret := _mock.Called(ctx)
12328-
12329- if len(ret) == 0 {
12330- panic("no return value specified for ApplyOnExit")
12331- }
12332-
12333- var r0 string
12334- var r1 error
12335- if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
12336- return returnFunc(ctx)
12337- }
12338- if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
12339- r0 = returnFunc(ctx)
12340- } else {
12341- r0 = ret.Get(0).(string)
12342- }
12343- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
12344- r1 = returnFunc(ctx)
12345- } else {
12346- r1 = ret.Error(1)
12347- }
12348- return r0, r1
12349-}
12350-
12351-// MockUpdateApplier_ApplyOnExit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyOnExit'
12352-type MockUpdateApplier_ApplyOnExit_Call struct {
12353- *mock.Call
12354-}
12355-
12356-// ApplyOnExit is a helper method to define mock.On call
12357-// - ctx context.Context
12358-func (_e *MockUpdateApplier_Expecter) ApplyOnExit(ctx interface{}) *MockUpdateApplier_ApplyOnExit_Call {
12359- return &MockUpdateApplier_ApplyOnExit_Call{Call: _e.mock.On("ApplyOnExit", ctx)}
12360-}
12361-
12362-func (_c *MockUpdateApplier_ApplyOnExit_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ApplyOnExit_Call {
12363- _c.Call.Run(func(args mock.Arguments) {
12364- var arg0 context.Context
12365- if args[0] != nil {
12366- arg0 = args[0].(context.Context)
12367- }
12368- run(
12369- arg0,
12370- )
12371- })
12372- return _c
12373-}
12374-
12375-func (_c *MockUpdateApplier_ApplyOnExit_Call) Return(backupPath string, err error) *MockUpdateApplier_ApplyOnExit_Call {
12376- _c.Call.Return(backupPath, err)
12377- return _c
12378-}
12379-
12380-func (_c *MockUpdateApplier_ApplyOnExit_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockUpdateApplier_ApplyOnExit_Call {
12381- _c.Call.Return(run)
12382- return _c
12383-}
12384-
12385-// CanSelfUpdate provides a mock function for the type MockUpdateApplier
12386-func (_mock *MockUpdateApplier) CanSelfUpdate(ctx context.Context) bool {
12387- ret := _mock.Called(ctx)
12388-
12389- if len(ret) == 0 {
12390- panic("no return value specified for CanSelfUpdate")
12391- }
12392-
12393- var r0 bool
12394- if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
12395- r0 = returnFunc(ctx)
12396- } else {
12397- r0 = ret.Get(0).(bool)
12398- }
12399- return r0
12400-}
12401-
12402-// MockUpdateApplier_CanSelfUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanSelfUpdate'
12403-type MockUpdateApplier_CanSelfUpdate_Call struct {
12404- *mock.Call
12405-}
12406-
12407-// CanSelfUpdate is a helper method to define mock.On call
12408-// - ctx context.Context
12409-func (_e *MockUpdateApplier_Expecter) CanSelfUpdate(ctx interface{}) *MockUpdateApplier_CanSelfUpdate_Call {
12410- return &MockUpdateApplier_CanSelfUpdate_Call{Call: _e.mock.On("CanSelfUpdate", ctx)}
12411-}
12412-
12413-func (_c *MockUpdateApplier_CanSelfUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_CanSelfUpdate_Call {
12414- _c.Call.Run(func(args mock.Arguments) {
12415- var arg0 context.Context
12416- if args[0] != nil {
12417- arg0 = args[0].(context.Context)
12418- }
12419- run(
12420- arg0,
12421- )
12422- })
12423- return _c
12424-}
12425-
12426-func (_c *MockUpdateApplier_CanSelfUpdate_Call) Return(b bool) *MockUpdateApplier_CanSelfUpdate_Call {
12427- _c.Call.Return(b)
12428- return _c
12429-}
12430-
12431-func (_c *MockUpdateApplier_CanSelfUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_CanSelfUpdate_Call {
12432- _c.Call.Return(run)
12433- return _c
12434-}
12435-
12436-// ClearStagedUpdate provides a mock function for the type MockUpdateApplier
12437-func (_mock *MockUpdateApplier) ClearStagedUpdate(ctx context.Context) error {
12438- ret := _mock.Called(ctx)
12439-
12440- if len(ret) == 0 {
12441- panic("no return value specified for ClearStagedUpdate")
12442- }
12443-
12444- var r0 error
12445- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
12446- r0 = returnFunc(ctx)
12447- } else {
12448- r0 = ret.Error(0)
12449- }
12450- return r0
12451-}
12452-
12453-// MockUpdateApplier_ClearStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearStagedUpdate'
12454-type MockUpdateApplier_ClearStagedUpdate_Call struct {
12455- *mock.Call
12456-}
12457-
12458-// ClearStagedUpdate is a helper method to define mock.On call
12459-// - ctx context.Context
12460-func (_e *MockUpdateApplier_Expecter) ClearStagedUpdate(ctx interface{}) *MockUpdateApplier_ClearStagedUpdate_Call {
12461- return &MockUpdateApplier_ClearStagedUpdate_Call{Call: _e.mock.On("ClearStagedUpdate", ctx)}
12462-}
12463-
12464-func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ClearStagedUpdate_Call {
12465- _c.Call.Run(func(args mock.Arguments) {
12466- var arg0 context.Context
12467- if args[0] != nil {
12468- arg0 = args[0].(context.Context)
12469- }
12470- run(
12471- arg0,
12472- )
12473- })
12474- return _c
12475-}
12476-
12477-func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Return(err error) *MockUpdateApplier_ClearStagedUpdate_Call {
12478- _c.Call.Return(err)
12479- return _c
12480-}
12481-
12482-func (_c *MockUpdateApplier_ClearStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) error) *MockUpdateApplier_ClearStagedUpdate_Call {
12483- _c.Call.Return(run)
12484- return _c
12485-}
12486-
12487-// GetBinaryPath provides a mock function for the type MockUpdateApplier
12488-func (_mock *MockUpdateApplier) GetBinaryPath() (string, error) {
12489- ret := _mock.Called()
12490-
12491- if len(ret) == 0 {
12492- panic("no return value specified for GetBinaryPath")
12493- }
12494-
12495- var r0 string
12496- var r1 error
12497- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
12498- return returnFunc()
12499- }
12500- if returnFunc, ok := ret.Get(0).(func() string); ok {
12501- r0 = returnFunc()
12502- } else {
12503- r0 = ret.Get(0).(string)
12504- }
12505- if returnFunc, ok := ret.Get(1).(func() error); ok {
12506- r1 = returnFunc()
12507- } else {
12508- r1 = ret.Error(1)
12509- }
12510- return r0, r1
12511-}
12512-
12513-// MockUpdateApplier_GetBinaryPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBinaryPath'
12514-type MockUpdateApplier_GetBinaryPath_Call struct {
12515- *mock.Call
12516-}
12517-
12518-// GetBinaryPath is a helper method to define mock.On call
12519-func (_e *MockUpdateApplier_Expecter) GetBinaryPath() *MockUpdateApplier_GetBinaryPath_Call {
12520- return &MockUpdateApplier_GetBinaryPath_Call{Call: _e.mock.On("GetBinaryPath")}
12521-}
12522-
12523-func (_c *MockUpdateApplier_GetBinaryPath_Call) Run(run func()) *MockUpdateApplier_GetBinaryPath_Call {
12524- _c.Call.Run(func(args mock.Arguments) {
12525- run()
12526- })
12527- return _c
12528-}
12529-
12530-func (_c *MockUpdateApplier_GetBinaryPath_Call) Return(s string, err error) *MockUpdateApplier_GetBinaryPath_Call {
12531- _c.Call.Return(s, err)
12532- return _c
12533-}
12534-
12535-func (_c *MockUpdateApplier_GetBinaryPath_Call) RunAndReturn(run func() (string, error)) *MockUpdateApplier_GetBinaryPath_Call {
12536- _c.Call.Return(run)
12537- return _c
12538-}
12539-
12540-// HasStagedUpdate provides a mock function for the type MockUpdateApplier
12541-func (_mock *MockUpdateApplier) HasStagedUpdate(ctx context.Context) bool {
12542- ret := _mock.Called(ctx)
12543-
12544- if len(ret) == 0 {
12545- panic("no return value specified for HasStagedUpdate")
12546- }
12547-
12548- var r0 bool
12549- if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
12550- r0 = returnFunc(ctx)
12551- } else {
12552- r0 = ret.Get(0).(bool)
12553- }
12554- return r0
12555-}
12556-
12557-// MockUpdateApplier_HasStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasStagedUpdate'
12558-type MockUpdateApplier_HasStagedUpdate_Call struct {
12559- *mock.Call
12560-}
12561-
12562-// HasStagedUpdate is a helper method to define mock.On call
12563-// - ctx context.Context
12564-func (_e *MockUpdateApplier_Expecter) HasStagedUpdate(ctx interface{}) *MockUpdateApplier_HasStagedUpdate_Call {
12565- return &MockUpdateApplier_HasStagedUpdate_Call{Call: _e.mock.On("HasStagedUpdate", ctx)}
12566-}
12567-
12568-func (_c *MockUpdateApplier_HasStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_HasStagedUpdate_Call {
12569- _c.Call.Run(func(args mock.Arguments) {
12570- var arg0 context.Context
12571- if args[0] != nil {
12572- arg0 = args[0].(context.Context)
12573- }
12574- run(
12575- arg0,
12576- )
12577- })
12578- return _c
12579-}
12580-
12581-func (_c *MockUpdateApplier_HasStagedUpdate_Call) Return(b bool) *MockUpdateApplier_HasStagedUpdate_Call {
12582- _c.Call.Return(b)
12583- return _c
12584-}
12585-
12586-func (_c *MockUpdateApplier_HasStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_HasStagedUpdate_Call {
12587- _c.Call.Return(run)
12588- return _c
12589-}
12590-
12591-// SelfUpdateBlockedReason provides a mock function for the type MockUpdateApplier
12592-func (_mock *MockUpdateApplier) SelfUpdateBlockedReason(ctx context.Context) port.SelfUpdateBlockedReason {
12593- ret := _mock.Called(ctx)
12594-
12595- if len(ret) == 0 {
12596- panic("no return value specified for SelfUpdateBlockedReason")
12597- }
12598-
12599- var r0 port.SelfUpdateBlockedReason
12600- if returnFunc, ok := ret.Get(0).(func(context.Context) port.SelfUpdateBlockedReason); ok {
12601- r0 = returnFunc(ctx)
12602- } else {
12603- r0 = ret.Get(0).(port.SelfUpdateBlockedReason)
12604- }
12605- return r0
12606-}
12607-
12608-// MockUpdateApplier_SelfUpdateBlockedReason_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelfUpdateBlockedReason'
12609-type MockUpdateApplier_SelfUpdateBlockedReason_Call struct {
12610- *mock.Call
12611-}
12612-
12613-// SelfUpdateBlockedReason is a helper method to define mock.On call
12614-// - ctx context.Context
12615-func (_e *MockUpdateApplier_Expecter) SelfUpdateBlockedReason(ctx interface{}) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
12616- return &MockUpdateApplier_SelfUpdateBlockedReason_Call{Call: _e.mock.On("SelfUpdateBlockedReason", ctx)}
12617-}
12618-
12619-func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
12620- _c.Call.Run(func(args mock.Arguments) {
12621- var arg0 context.Context
12622- if args[0] != nil {
12623- arg0 = args[0].(context.Context)
12624- }
12625- run(
12626- arg0,
12627- )
12628- })
12629- return _c
12630-}
12631-
12632-func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Return(selfUpdateBlockedReason port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
12633- _c.Call.Return(selfUpdateBlockedReason)
12634- return _c
12635-}
12636-
12637-func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) RunAndReturn(run func(ctx context.Context) port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
12638- _c.Call.Return(run)
12639- return _c
12640-}
12641-
12642-// StageUpdate provides a mock function for the type MockUpdateApplier
12643-func (_mock *MockUpdateApplier) StageUpdate(ctx context.Context, newBinaryPath string) error {
12644- ret := _mock.Called(ctx, newBinaryPath)
12645-
12646- if len(ret) == 0 {
12647- panic("no return value specified for StageUpdate")
12648- }
12649-
12650- var r0 error
12651- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
12652- r0 = returnFunc(ctx, newBinaryPath)
12653- } else {
12654- r0 = ret.Error(0)
12655- }
12656- return r0
12657-}
12658-
12659-// MockUpdateApplier_StageUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StageUpdate'
12660-type MockUpdateApplier_StageUpdate_Call struct {
12661- *mock.Call
12662-}
12663-
12664-// StageUpdate is a helper method to define mock.On call
12665-// - ctx context.Context
12666-// - newBinaryPath string
12667-func (_e *MockUpdateApplier_Expecter) StageUpdate(ctx interface{}, newBinaryPath interface{}) *MockUpdateApplier_StageUpdate_Call {
12668- return &MockUpdateApplier_StageUpdate_Call{Call: _e.mock.On("StageUpdate", ctx, newBinaryPath)}
12669-}
12670-
12671-func (_c *MockUpdateApplier_StageUpdate_Call) Run(run func(ctx context.Context, newBinaryPath string)) *MockUpdateApplier_StageUpdate_Call {
12672- _c.Call.Run(func(args mock.Arguments) {
12673- var arg0 context.Context
12674- if args[0] != nil {
12675- arg0 = args[0].(context.Context)
12676- }
12677- var arg1 string
12678- if args[1] != nil {
12679- arg1 = args[1].(string)
12680- }
12681- run(
12682- arg0,
12683- arg1,
12684- )
12685- })
12686- return _c
12687-}
12688-
12689-func (_c *MockUpdateApplier_StageUpdate_Call) Return(err error) *MockUpdateApplier_StageUpdate_Call {
12690- _c.Call.Return(err)
12691- return _c
12692-}
12693-
12694-func (_c *MockUpdateApplier_StageUpdate_Call) RunAndReturn(run func(ctx context.Context, newBinaryPath string) error) *MockUpdateApplier_StageUpdate_Call {
12695- _c.Call.Return(run)
12696- return _c
12697-}
12698-
12699-// NewMockSystemviewConfigReader creates a new instance of MockSystemviewConfigReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12700-// The first argument is typically a *testing.T value.
12701-func NewMockSystemviewConfigReader(t interface {
12702- mock.TestingT
12703- Cleanup(func())
12704-}) *MockSystemviewConfigReader {
12705- mock := &MockSystemviewConfigReader{}
12706- mock.Mock.Test(t)
12707-
12708- t.Cleanup(func() { mock.AssertExpectations(t) })
12709-
12710- return mock
12711-}
12712-
12713-// MockSystemviewConfigReader is an autogenerated mock type for the SystemviewConfigReader type
12714-type MockSystemviewConfigReader struct {
12715- mock.Mock
12716-}
12717-
12718-type MockSystemviewConfigReader_Expecter struct {
12719- mock *mock.Mock
12720-}
12721-
12722-func (_m *MockSystemviewConfigReader) EXPECT() *MockSystemviewConfigReader_Expecter {
12723- return &MockSystemviewConfigReader_Expecter{mock: &_m.Mock}
12724-}
12725-
12726-// Current provides a mock function for the type MockSystemviewConfigReader
12727-func (_mock *MockSystemviewConfigReader) Current(ctx context.Context) (dto.SystemviewConfigPayload, error) {
12728- ret := _mock.Called(ctx)
12729-
12730- if len(ret) == 0 {
12731- panic("no return value specified for Current")
12732- }
12733-
12734- var r0 dto.SystemviewConfigPayload
12735- var r1 error
12736- if returnFunc, ok := ret.Get(0).(func(context.Context) (dto.SystemviewConfigPayload, error)); ok {
12737- return returnFunc(ctx)
12738- }
12739- if returnFunc, ok := ret.Get(0).(func(context.Context) dto.SystemviewConfigPayload); ok {
12740- r0 = returnFunc(ctx)
12741- } else {
12742- r0 = ret.Get(0).(dto.SystemviewConfigPayload)
12743- }
12744- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
12745- r1 = returnFunc(ctx)
12746- } else {
12747- r1 = ret.Error(1)
12748- }
12749- return r0, r1
12750-}
12751-
12752-// MockSystemviewConfigReader_Current_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Current'
12753-type MockSystemviewConfigReader_Current_Call struct {
12754- *mock.Call
12755-}
12756-
12757-// Current is a helper method to define mock.On call
12758-// - ctx context.Context
12759-func (_e *MockSystemviewConfigReader_Expecter) Current(ctx interface{}) *MockSystemviewConfigReader_Current_Call {
12760- return &MockSystemviewConfigReader_Current_Call{Call: _e.mock.On("Current", ctx)}
12761-}
12762-
12763-func (_c *MockSystemviewConfigReader_Current_Call) Run(run func(ctx context.Context)) *MockSystemviewConfigReader_Current_Call {
12764- _c.Call.Run(func(args mock.Arguments) {
12765- var arg0 context.Context
12766- if args[0] != nil {
12767- arg0 = args[0].(context.Context)
12768- }
12769- run(
12770- arg0,
12771- )
12772- })
12773- return _c
12774-}
12775-
12776-func (_c *MockSystemviewConfigReader_Current_Call) Return(systemviewConfigPayload dto.SystemviewConfigPayload, err error) *MockSystemviewConfigReader_Current_Call {
12777- _c.Call.Return(systemviewConfigPayload, err)
12778- return _c
12779-}
12780-
12781-func (_c *MockSystemviewConfigReader_Current_Call) RunAndReturn(run func(ctx context.Context) (dto.SystemviewConfigPayload, error)) *MockSystemviewConfigReader_Current_Call {
12782- _c.Call.Return(run)
12783- return _c
12784-}
12785-
12786-// Default provides a mock function for the type MockSystemviewConfigReader
12787-func (_mock *MockSystemviewConfigReader) Default(ctx context.Context) (dto.SystemviewConfigPayload, error) {
12788- ret := _mock.Called(ctx)
12789-
12790- if len(ret) == 0 {
12791- panic("no return value specified for Default")
12792- }
12793-
12794- var r0 dto.SystemviewConfigPayload
12795- var r1 error
12796- if returnFunc, ok := ret.Get(0).(func(context.Context) (dto.SystemviewConfigPayload, error)); ok {
12797- return returnFunc(ctx)
12798- }
12799- if returnFunc, ok := ret.Get(0).(func(context.Context) dto.SystemviewConfigPayload); ok {
12800- r0 = returnFunc(ctx)
12801- } else {
12802- r0 = ret.Get(0).(dto.SystemviewConfigPayload)
12803- }
12804- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
12805- r1 = returnFunc(ctx)
12806- } else {
12807- r1 = ret.Error(1)
12808- }
12809- return r0, r1
12810-}
12811-
12812-// MockSystemviewConfigReader_Default_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Default'
12813-type MockSystemviewConfigReader_Default_Call struct {
12814- *mock.Call
12815-}
12816-
12817-// Default is a helper method to define mock.On call
12818-// - ctx context.Context
12819-func (_e *MockSystemviewConfigReader_Expecter) Default(ctx interface{}) *MockSystemviewConfigReader_Default_Call {
12820- return &MockSystemviewConfigReader_Default_Call{Call: _e.mock.On("Default", ctx)}
12821-}
12822-
12823-func (_c *MockSystemviewConfigReader_Default_Call) Run(run func(ctx context.Context)) *MockSystemviewConfigReader_Default_Call {
12824- _c.Call.Run(func(args mock.Arguments) {
12825- var arg0 context.Context
12826- if args[0] != nil {
12827- arg0 = args[0].(context.Context)
12828- }
12829- run(
12830- arg0,
12831- )
12832- })
12833- return _c
12834-}
12835-
12836-func (_c *MockSystemviewConfigReader_Default_Call) Return(systemviewConfigPayload dto.SystemviewConfigPayload, err error) *MockSystemviewConfigReader_Default_Call {
12837- _c.Call.Return(systemviewConfigPayload, err)
12838- return _c
12839-}
12840-
12841-func (_c *MockSystemviewConfigReader_Default_Call) RunAndReturn(run func(ctx context.Context) (dto.SystemviewConfigPayload, error)) *MockSystemviewConfigReader_Default_Call {
12842- _c.Call.Return(run)
12843- return _c
12844-}
12845-
12846-// NewMockWebUIConfigSaver creates a new instance of MockWebUIConfigSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12847-// The first argument is typically a *testing.T value.
12848-func NewMockWebUIConfigSaver(t interface {
12849- mock.TestingT
12850- Cleanup(func())
12851-}) *MockWebUIConfigSaver {
12852- mock := &MockWebUIConfigSaver{}
12853- mock.Mock.Test(t)
12854-
12855- t.Cleanup(func() { mock.AssertExpectations(t) })
12856-
12857- return mock
12858-}
12859-
12860-// MockWebUIConfigSaver is an autogenerated mock type for the WebUIConfigSaver type
12861-type MockWebUIConfigSaver struct {
12862- mock.Mock
12863-}
12864-
12865-type MockWebUIConfigSaver_Expecter struct {
12866- mock *mock.Mock
12867-}
12868-
12869-func (_m *MockWebUIConfigSaver) EXPECT() *MockWebUIConfigSaver_Expecter {
12870- return &MockWebUIConfigSaver_Expecter{mock: &_m.Mock}
12871-}
12872-
12873-// SaveWebUIConfig provides a mock function for the type MockWebUIConfigSaver
12874-func (_mock *MockWebUIConfigSaver) SaveWebUIConfig(ctx context.Context, cfg dto.WebUIConfig) error {
12875- ret := _mock.Called(ctx, cfg)
12876-
12877- if len(ret) == 0 {
12878- panic("no return value specified for SaveWebUIConfig")
12879- }
12880-
12881- var r0 error
12882- if returnFunc, ok := ret.Get(0).(func(context.Context, dto.WebUIConfig) error); ok {
12883- r0 = returnFunc(ctx, cfg)
12884- } else {
12885- r0 = ret.Error(0)
12886- }
12887- return r0
12888-}
12889-
12890-// MockWebUIConfigSaver_SaveWebUIConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveWebUIConfig'
12891-type MockWebUIConfigSaver_SaveWebUIConfig_Call struct {
12892- *mock.Call
12893-}
12894-
12895-// SaveWebUIConfig is a helper method to define mock.On call
12896-// - ctx context.Context
12897-// - cfg dto.WebUIConfig
12898-func (_e *MockWebUIConfigSaver_Expecter) SaveWebUIConfig(ctx interface{}, cfg interface{}) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
12899- return &MockWebUIConfigSaver_SaveWebUIConfig_Call{Call: _e.mock.On("SaveWebUIConfig", ctx, cfg)}
12900-}
12901-
12902-func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) Run(run func(ctx context.Context, cfg dto.WebUIConfig)) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
12903- _c.Call.Run(func(args mock.Arguments) {
12904- var arg0 context.Context
12905- if args[0] != nil {
12906- arg0 = args[0].(context.Context)
12907- }
12908- var arg1 dto.WebUIConfig
12909- if args[1] != nil {
12910- arg1 = args[1].(dto.WebUIConfig)
12911- }
12912- run(
12913- arg0,
12914- arg1,
12915- )
12916- })
12917- return _c
12918-}
12919-
12920-func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) Return(err error) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
12921- _c.Call.Return(err)
12922- return _c
12923-}
12924-
12925-func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) RunAndReturn(run func(ctx context.Context, cfg dto.WebUIConfig) error) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
12926- _c.Call.Return(run)
12927- return _c
12928-}
12929-
12930-// NewMockTexture creates a new instance of MockTexture. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12931-// The first argument is typically a *testing.T value.
12932-func NewMockTexture(t interface {
12933- mock.TestingT
12934- Cleanup(func())
12935-}) *MockTexture {
12936- mock := &MockTexture{}
12937- mock.Mock.Test(t)
12938-
12939- t.Cleanup(func() { mock.AssertExpectations(t) })
12940-
12941- return mock
12942-}
12943-
12944-// MockTexture is an autogenerated mock type for the Texture type
12945-type MockTexture struct {
12946- mock.Mock
12947-}
12948-
12949-type MockTexture_Expecter struct {
12950- mock *mock.Mock
12951-}
12952-
12953-func (_m *MockTexture) EXPECT() *MockTexture_Expecter {
12954- return &MockTexture_Expecter{mock: &_m.Mock}
12955-}
12956-
12957-// GoPointer provides a mock function for the type MockTexture
12958-func (_mock *MockTexture) GoPointer() uintptr {
12959- ret := _mock.Called()
12960-
12961- if len(ret) == 0 {
12962- panic("no return value specified for GoPointer")
12963- }
12964-
12965- var r0 uintptr
12966- if returnFunc, ok := ret.Get(0).(func() uintptr); ok {
12967- r0 = returnFunc()
12968- } else {
12969- r0 = ret.Get(0).(uintptr)
12970- }
12971- return r0
12972-}
12973-
12974-// MockTexture_GoPointer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GoPointer'
12975-type MockTexture_GoPointer_Call struct {
12976- *mock.Call
12977-}
12978-
12979-// GoPointer is a helper method to define mock.On call
12980-func (_e *MockTexture_Expecter) GoPointer() *MockTexture_GoPointer_Call {
12981- return &MockTexture_GoPointer_Call{Call: _e.mock.On("GoPointer")}
12982-}
12983-
12984-func (_c *MockTexture_GoPointer_Call) Run(run func()) *MockTexture_GoPointer_Call {
12985- _c.Call.Run(func(args mock.Arguments) {
12986- run()
12987- })
12988- return _c
12989-}
12990-
12991-func (_c *MockTexture_GoPointer_Call) Return(v uintptr) *MockTexture_GoPointer_Call {
12992- _c.Call.Return(v)
12993- return _c
12994-}
12995-
12996-func (_c *MockTexture_GoPointer_Call) RunAndReturn(run func() uintptr) *MockTexture_GoPointer_Call {
12997- _c.Call.Return(run)
12998- return _c
12999-}
13000-
13001-// NewMockFindController creates a new instance of MockFindController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13002-// The first argument is typically a *testing.T value.
13003-func NewMockFindController(t interface {
13004- mock.TestingT
13005- Cleanup(func())
13006-}) *MockFindController {
13007- mock := &MockFindController{}
13008- mock.Mock.Test(t)
13009-
13010- t.Cleanup(func() { mock.AssertExpectations(t) })
13011-
13012- return mock
13013-}
13014-
13015-// MockFindController is an autogenerated mock type for the FindController type
13016-type MockFindController struct {
13017- mock.Mock
13018-}
13019-
13020-type MockFindController_Expecter struct {
13021- mock *mock.Mock
13022-}
13023-
13024-func (_m *MockFindController) EXPECT() *MockFindController_Expecter {
13025- return &MockFindController_Expecter{mock: &_m.Mock}
13026-}
13027-
13028-// CountMatches provides a mock function for the type MockFindController
13029-func (_mock *MockFindController) CountMatches(text string, options port.FindOptions, maxMatches uint) {
13030- _mock.Called(text, options, maxMatches)
13031- return
13032-}
13033-
13034-// MockFindController_CountMatches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountMatches'
13035-type MockFindController_CountMatches_Call struct {
13036- *mock.Call
13037-}
13038-
13039-// CountMatches is a helper method to define mock.On call
13040-// - text string
13041-// - options port.FindOptions
13042-// - maxMatches uint
13043-func (_e *MockFindController_Expecter) CountMatches(text interface{}, options interface{}, maxMatches interface{}) *MockFindController_CountMatches_Call {
13044- return &MockFindController_CountMatches_Call{Call: _e.mock.On("CountMatches", text, options, maxMatches)}
13045-}
13046-
13047-func (_c *MockFindController_CountMatches_Call) Run(run func(text string, options port.FindOptions, maxMatches uint)) *MockFindController_CountMatches_Call {
13048- _c.Call.Run(func(args mock.Arguments) {
13049- var arg0 string
13050- if args[0] != nil {
13051- arg0 = args[0].(string)
13052- }
13053- var arg1 port.FindOptions
13054- if args[1] != nil {
13055- arg1 = args[1].(port.FindOptions)
13056- }
13057- var arg2 uint
13058- if args[2] != nil {
13059- arg2 = args[2].(uint)
13060- }
13061- run(
13062- arg0,
13063- arg1,
13064- arg2,
13065- )
13066- })
13067- return _c
13068-}
13069-
13070-func (_c *MockFindController_CountMatches_Call) Return() *MockFindController_CountMatches_Call {
13071- _c.Call.Return()
13072- return _c
13073-}
13074-
13075-func (_c *MockFindController_CountMatches_Call) RunAndReturn(run func(text string, options port.FindOptions, maxMatches uint)) *MockFindController_CountMatches_Call {
13076- _c.Run(run)
13077- return _c
13078-}
13079-
13080-// DisconnectSignal provides a mock function for the type MockFindController
13081-func (_mock *MockFindController) DisconnectSignal(id uint) {
13082- _mock.Called(id)
13083- return
13084-}
13085-
13086-// MockFindController_DisconnectSignal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisconnectSignal'
13087-type MockFindController_DisconnectSignal_Call struct {
13088- *mock.Call
13089-}
13090-
13091-// DisconnectSignal is a helper method to define mock.On call
13092-// - id uint
13093-func (_e *MockFindController_Expecter) DisconnectSignal(id interface{}) *MockFindController_DisconnectSignal_Call {
13094- return &MockFindController_DisconnectSignal_Call{Call: _e.mock.On("DisconnectSignal", id)}
13095-}
13096-
13097-func (_c *MockFindController_DisconnectSignal_Call) Run(run func(id uint)) *MockFindController_DisconnectSignal_Call {
13098- _c.Call.Run(func(args mock.Arguments) {
13099- var arg0 uint
13100- if args[0] != nil {
13101- arg0 = args[0].(uint)
13102- }
13103- run(
13104- arg0,
13105- )
13106- })
13107- return _c
13108-}
13109-
13110-func (_c *MockFindController_DisconnectSignal_Call) Return() *MockFindController_DisconnectSignal_Call {
13111- _c.Call.Return()
13112- return _c
13113-}
13114-
13115-func (_c *MockFindController_DisconnectSignal_Call) RunAndReturn(run func(id uint)) *MockFindController_DisconnectSignal_Call {
13116- _c.Run(run)
13117- return _c
13118-}
13119-
13120-// GetSearchText provides a mock function for the type MockFindController
13121-func (_mock *MockFindController) GetSearchText() string {
13122- ret := _mock.Called()
13123-
13124- if len(ret) == 0 {
13125- panic("no return value specified for GetSearchText")
13126- }
13127-
13128- var r0 string
13129- if returnFunc, ok := ret.Get(0).(func() string); ok {
13130- r0 = returnFunc()
13131- } else {
13132- r0 = ret.Get(0).(string)
13133- }
13134- return r0
13135-}
13136-
13137-// MockFindController_GetSearchText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSearchText'
13138-type MockFindController_GetSearchText_Call struct {
13139- *mock.Call
13140-}
13141-
13142-// GetSearchText is a helper method to define mock.On call
13143-func (_e *MockFindController_Expecter) GetSearchText() *MockFindController_GetSearchText_Call {
13144- return &MockFindController_GetSearchText_Call{Call: _e.mock.On("GetSearchText")}
13145-}
13146-
13147-func (_c *MockFindController_GetSearchText_Call) Run(run func()) *MockFindController_GetSearchText_Call {
13148- _c.Call.Run(func(args mock.Arguments) {
13149- run()
13150- })
13151- return _c
13152-}
13153-
13154-func (_c *MockFindController_GetSearchText_Call) Return(s string) *MockFindController_GetSearchText_Call {
13155- _c.Call.Return(s)
13156- return _c
13157-}
13158-
13159-func (_c *MockFindController_GetSearchText_Call) RunAndReturn(run func() string) *MockFindController_GetSearchText_Call {
13160- _c.Call.Return(run)
13161- return _c
13162-}
13163-
13164-// OnCountedMatches provides a mock function for the type MockFindController
13165-func (_mock *MockFindController) OnCountedMatches(callback func(matchCount uint)) uint {
13166- ret := _mock.Called(callback)
13167-
13168- if len(ret) == 0 {
13169- panic("no return value specified for OnCountedMatches")
13170- }
13171-
13172- var r0 uint
13173- if returnFunc, ok := ret.Get(0).(func(func(matchCount uint)) uint); ok {
13174- r0 = returnFunc(callback)
13175- } else {
13176- r0 = ret.Get(0).(uint)
13177- }
13178- return r0
13179-}
13180-
13181-// MockFindController_OnCountedMatches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnCountedMatches'
13182-type MockFindController_OnCountedMatches_Call struct {
13183- *mock.Call
13184-}
13185-
13186-// OnCountedMatches is a helper method to define mock.On call
13187-// - callback func(matchCount uint)
13188-func (_e *MockFindController_Expecter) OnCountedMatches(callback interface{}) *MockFindController_OnCountedMatches_Call {
13189- return &MockFindController_OnCountedMatches_Call{Call: _e.mock.On("OnCountedMatches", callback)}
13190-}
13191-
13192-func (_c *MockFindController_OnCountedMatches_Call) Run(run func(callback func(matchCount uint))) *MockFindController_OnCountedMatches_Call {
13193- _c.Call.Run(func(args mock.Arguments) {
13194- var arg0 func(matchCount uint)
13195- if args[0] != nil {
13196- arg0 = args[0].(func(matchCount uint))
13197- }
13198- run(
13199- arg0,
13200- )
13201- })
13202- return _c
13203-}
13204-
13205-func (_c *MockFindController_OnCountedMatches_Call) Return(v uint) *MockFindController_OnCountedMatches_Call {
13206- _c.Call.Return(v)
13207- return _c
13208-}
13209-
13210-func (_c *MockFindController_OnCountedMatches_Call) RunAndReturn(run func(callback func(matchCount uint)) uint) *MockFindController_OnCountedMatches_Call {
13211- _c.Call.Return(run)
13212- return _c
13213-}
13214-
13215-// OnFailedToFindText provides a mock function for the type MockFindController
13216-func (_mock *MockFindController) OnFailedToFindText(callback func()) uint {
13217- ret := _mock.Called(callback)
13218-
13219- if len(ret) == 0 {
13220- panic("no return value specified for OnFailedToFindText")
13221- }
13222-
13223- var r0 uint
13224- if returnFunc, ok := ret.Get(0).(func(func()) uint); ok {
13225- r0 = returnFunc(callback)
13226- } else {
13227- r0 = ret.Get(0).(uint)
13228- }
13229- return r0
13230-}
13231-
13232-// MockFindController_OnFailedToFindText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnFailedToFindText'
13233-type MockFindController_OnFailedToFindText_Call struct {
13234- *mock.Call
13235-}
13236-
13237-// OnFailedToFindText is a helper method to define mock.On call
13238-// - callback func()
13239-func (_e *MockFindController_Expecter) OnFailedToFindText(callback interface{}) *MockFindController_OnFailedToFindText_Call {
13240- return &MockFindController_OnFailedToFindText_Call{Call: _e.mock.On("OnFailedToFindText", callback)}
13241-}
13242-
13243-func (_c *MockFindController_OnFailedToFindText_Call) Run(run func(callback func())) *MockFindController_OnFailedToFindText_Call {
13244- _c.Call.Run(func(args mock.Arguments) {
13245- var arg0 func()
13246- if args[0] != nil {
13247- arg0 = args[0].(func())
13248- }
13249- run(
13250- arg0,
13251- )
13252- })
13253- return _c
13254-}
13255-
13256-func (_c *MockFindController_OnFailedToFindText_Call) Return(v uint) *MockFindController_OnFailedToFindText_Call {
13257- _c.Call.Return(v)
13258- return _c
13259-}
13260-
13261-func (_c *MockFindController_OnFailedToFindText_Call) RunAndReturn(run func(callback func()) uint) *MockFindController_OnFailedToFindText_Call {
13262- _c.Call.Return(run)
13263- return _c
13264-}
13265-
13266-// OnFoundText provides a mock function for the type MockFindController
13267-func (_mock *MockFindController) OnFoundText(callback func(matchCount uint)) uint {
13268- ret := _mock.Called(callback)
13269-
13270- if len(ret) == 0 {
13271- panic("no return value specified for OnFoundText")
13272- }
13273-
13274- var r0 uint
13275- if returnFunc, ok := ret.Get(0).(func(func(matchCount uint)) uint); ok {
13276- r0 = returnFunc(callback)
13277- } else {
13278- r0 = ret.Get(0).(uint)
13279- }
13280- return r0
13281-}
13282-
13283-// MockFindController_OnFoundText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnFoundText'
13284-type MockFindController_OnFoundText_Call struct {
13285- *mock.Call
13286-}
13287-
13288-// OnFoundText is a helper method to define mock.On call
13289-// - callback func(matchCount uint)
13290-func (_e *MockFindController_Expecter) OnFoundText(callback interface{}) *MockFindController_OnFoundText_Call {
13291- return &MockFindController_OnFoundText_Call{Call: _e.mock.On("OnFoundText", callback)}
13292-}
13293-
13294-func (_c *MockFindController_OnFoundText_Call) Run(run func(callback func(matchCount uint))) *MockFindController_OnFoundText_Call {
13295- _c.Call.Run(func(args mock.Arguments) {
13296- var arg0 func(matchCount uint)
13297- if args[0] != nil {
13298- arg0 = args[0].(func(matchCount uint))
13299- }
13300- run(
13301- arg0,
13302- )
13303- })
13304- return _c
13305-}
13306-
13307-func (_c *MockFindController_OnFoundText_Call) Return(v uint) *MockFindController_OnFoundText_Call {
13308- _c.Call.Return(v)
13309- return _c
13310-}
13311-
13312-func (_c *MockFindController_OnFoundText_Call) RunAndReturn(run func(callback func(matchCount uint)) uint) *MockFindController_OnFoundText_Call {
13313- _c.Call.Return(run)
13314- return _c
13315-}
13316-
13317-// Search provides a mock function for the type MockFindController
13318-func (_mock *MockFindController) Search(text string, options port.FindOptions, maxMatches uint) {
13319- _mock.Called(text, options, maxMatches)
13320- return
13321-}
13322-
13323-// MockFindController_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
13324-type MockFindController_Search_Call struct {
13325- *mock.Call
13326-}
13327-
13328-// Search is a helper method to define mock.On call
13329-// - text string
13330-// - options port.FindOptions
13331-// - maxMatches uint
13332-func (_e *MockFindController_Expecter) Search(text interface{}, options interface{}, maxMatches interface{}) *MockFindController_Search_Call {
13333- return &MockFindController_Search_Call{Call: _e.mock.On("Search", text, options, maxMatches)}
13334-}
13335-
13336-func (_c *MockFindController_Search_Call) Run(run func(text string, options port.FindOptions, maxMatches uint)) *MockFindController_Search_Call {
13337- _c.Call.Run(func(args mock.Arguments) {
13338- var arg0 string
13339- if args[0] != nil {
13340- arg0 = args[0].(string)
13341- }
13342- var arg1 port.FindOptions
13343- if args[1] != nil {
13344- arg1 = args[1].(port.FindOptions)
13345- }
13346- var arg2 uint
13347- if args[2] != nil {
13348- arg2 = args[2].(uint)
13349- }
13350- run(
13351- arg0,
13352- arg1,
13353- arg2,
13354- )
13355- })
13356- return _c
13357-}
13358-
13359-func (_c *MockFindController_Search_Call) Return() *MockFindController_Search_Call {
13360- _c.Call.Return()
13361- return _c
13362-}
13363-
13364-func (_c *MockFindController_Search_Call) RunAndReturn(run func(text string, options port.FindOptions, maxMatches uint)) *MockFindController_Search_Call {
13365- _c.Run(run)
13366- return _c
13367-}
13368-
13369-// SearchFinish provides a mock function for the type MockFindController
13370-func (_mock *MockFindController) SearchFinish() {
13371- _mock.Called()
13372- return
13373-}
13374-
13375-// MockFindController_SearchFinish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchFinish'
13376-type MockFindController_SearchFinish_Call struct {
13377- *mock.Call
13378-}
13379-
13380-// SearchFinish is a helper method to define mock.On call
13381-func (_e *MockFindController_Expecter) SearchFinish() *MockFindController_SearchFinish_Call {
13382- return &MockFindController_SearchFinish_Call{Call: _e.mock.On("SearchFinish")}
13383-}
13384-
13385-func (_c *MockFindController_SearchFinish_Call) Run(run func()) *MockFindController_SearchFinish_Call {
13386- _c.Call.Run(func(args mock.Arguments) {
13387- run()
13388- })
13389- return _c
13390-}
13391-
13392-func (_c *MockFindController_SearchFinish_Call) Return() *MockFindController_SearchFinish_Call {
13393- _c.Call.Return()
13394- return _c
13395-}
13396-
13397-func (_c *MockFindController_SearchFinish_Call) RunAndReturn(run func()) *MockFindController_SearchFinish_Call {
13398- _c.Run(run)
13399- return _c
13400-}
13401-
13402-// SearchNext provides a mock function for the type MockFindController
13403-func (_mock *MockFindController) SearchNext() {
13404- _mock.Called()
13405- return
13406-}
13407-
13408-// MockFindController_SearchNext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchNext'
13409-type MockFindController_SearchNext_Call struct {
13410- *mock.Call
13411-}
13412-
13413-// SearchNext is a helper method to define mock.On call
13414-func (_e *MockFindController_Expecter) SearchNext() *MockFindController_SearchNext_Call {
13415- return &MockFindController_SearchNext_Call{Call: _e.mock.On("SearchNext")}
13416-}
13417-
13418-func (_c *MockFindController_SearchNext_Call) Run(run func()) *MockFindController_SearchNext_Call {
13419- _c.Call.Run(func(args mock.Arguments) {
13420- run()
13421- })
13422- return _c
13423-}
13424-
13425-func (_c *MockFindController_SearchNext_Call) Return() *MockFindController_SearchNext_Call {
13426- _c.Call.Return()
13427- return _c
13428-}
13429-
13430-func (_c *MockFindController_SearchNext_Call) RunAndReturn(run func()) *MockFindController_SearchNext_Call {
13431- _c.Run(run)
13432- return _c
13433-}
13434-
13435-// SearchPrevious provides a mock function for the type MockFindController
13436-func (_mock *MockFindController) SearchPrevious() {
13437- _mock.Called()
13438- return
13439-}
13440-
13441-// MockFindController_SearchPrevious_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchPrevious'
13442-type MockFindController_SearchPrevious_Call struct {
13443- *mock.Call
13444-}
13445-
13446-// SearchPrevious is a helper method to define mock.On call
13447-func (_e *MockFindController_Expecter) SearchPrevious() *MockFindController_SearchPrevious_Call {
13448- return &MockFindController_SearchPrevious_Call{Call: _e.mock.On("SearchPrevious")}
13449-}
13450-
13451-func (_c *MockFindController_SearchPrevious_Call) Run(run func()) *MockFindController_SearchPrevious_Call {
13452- _c.Call.Run(func(args mock.Arguments) {
13453- run()
13454- })
13455- return _c
13456-}
13457-
13458-func (_c *MockFindController_SearchPrevious_Call) Return() *MockFindController_SearchPrevious_Call {
13459- _c.Call.Return()
13460- return _c
13461-}
13462-
13463-func (_c *MockFindController_SearchPrevious_Call) RunAndReturn(run func()) *MockFindController_SearchPrevious_Call {
13464- _c.Run(run)
13465- return _c
13466-}
13467-
13468-// NewMockWebView creates a new instance of MockWebView. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13469-// The first argument is typically a *testing.T value.
13470-func NewMockWebView(t interface {
13471- mock.TestingT
13472- Cleanup(func())
13473-}) *MockWebView {
13474- mock := &MockWebView{}
13475- mock.Mock.Test(t)
13476-
13477- t.Cleanup(func() { mock.AssertExpectations(t) })
13478-
13479- return mock
13480-}
13481-
13482-// MockWebView is an autogenerated mock type for the WebView type
13483-type MockWebView struct {
13484- mock.Mock
13485-}
13486-
13487-type MockWebView_Expecter struct {
13488- mock *mock.Mock
13489-}
13490-
13491-func (_m *MockWebView) EXPECT() *MockWebView_Expecter {
13492- return &MockWebView_Expecter{mock: &_m.Mock}
13493-}
13494-
13495-// CanGoBack provides a mock function for the type MockWebView
13496-func (_mock *MockWebView) CanGoBack() bool {
13497- ret := _mock.Called()
13498-
13499- if len(ret) == 0 {
13500- panic("no return value specified for CanGoBack")
13501- }
13502-
13503- var r0 bool
13504- if returnFunc, ok := ret.Get(0).(func() bool); ok {
13505- r0 = returnFunc()
13506- } else {
13507- r0 = ret.Get(0).(bool)
13508- }
13509- return r0
13510-}
13511-
13512-// MockWebView_CanGoBack_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanGoBack'
13513-type MockWebView_CanGoBack_Call struct {
13514- *mock.Call
13515-}
13516-
13517-// CanGoBack is a helper method to define mock.On call
13518-func (_e *MockWebView_Expecter) CanGoBack() *MockWebView_CanGoBack_Call {
13519- return &MockWebView_CanGoBack_Call{Call: _e.mock.On("CanGoBack")}
13520-}
13521-
13522-func (_c *MockWebView_CanGoBack_Call) Run(run func()) *MockWebView_CanGoBack_Call {
13523- _c.Call.Run(func(args mock.Arguments) {
13524- run()
13525- })
13526- return _c
13527-}
13528-
13529-func (_c *MockWebView_CanGoBack_Call) Return(b bool) *MockWebView_CanGoBack_Call {
13530- _c.Call.Return(b)
13531- return _c
13532-}
13533-
13534-func (_c *MockWebView_CanGoBack_Call) RunAndReturn(run func() bool) *MockWebView_CanGoBack_Call {
13535- _c.Call.Return(run)
13536- return _c
13537-}
13538-
13539-// CanGoForward provides a mock function for the type MockWebView
13540-func (_mock *MockWebView) CanGoForward() bool {
13541- ret := _mock.Called()
13542-
13543- if len(ret) == 0 {
13544- panic("no return value specified for CanGoForward")
13545- }
13546-
13547- var r0 bool
13548- if returnFunc, ok := ret.Get(0).(func() bool); ok {
13549- r0 = returnFunc()
13550- } else {
13551- r0 = ret.Get(0).(bool)
13552- }
13553- return r0
13554-}
13555-
13556-// MockWebView_CanGoForward_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanGoForward'
13557-type MockWebView_CanGoForward_Call struct {
13558- *mock.Call
13559-}
13560-
13561-// CanGoForward is a helper method to define mock.On call
13562-func (_e *MockWebView_Expecter) CanGoForward() *MockWebView_CanGoForward_Call {
13563- return &MockWebView_CanGoForward_Call{Call: _e.mock.On("CanGoForward")}
13564-}
13565-
13566-func (_c *MockWebView_CanGoForward_Call) Run(run func()) *MockWebView_CanGoForward_Call {
13567- _c.Call.Run(func(args mock.Arguments) {
13568- run()
13569- })
13570- return _c
13571-}
13572-
13573-func (_c *MockWebView_CanGoForward_Call) Return(b bool) *MockWebView_CanGoForward_Call {
13574- _c.Call.Return(b)
13575- return _c
13576-}
13577-
13578-func (_c *MockWebView_CanGoForward_Call) RunAndReturn(run func() bool) *MockWebView_CanGoForward_Call {
13579- _c.Call.Return(run)
13580- return _c
13581-}
13582-
13583-// Destroy provides a mock function for the type MockWebView
13584-func (_mock *MockWebView) Destroy() {
13585- _mock.Called()
13586- return
13587-}
13588-
13589-// MockWebView_Destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destroy'
13590-type MockWebView_Destroy_Call struct {
13591- *mock.Call
13592-}
13593-
13594-// Destroy is a helper method to define mock.On call
13595-func (_e *MockWebView_Expecter) Destroy() *MockWebView_Destroy_Call {
13596- return &MockWebView_Destroy_Call{Call: _e.mock.On("Destroy")}
13597-}
13598-
13599-func (_c *MockWebView_Destroy_Call) Run(run func()) *MockWebView_Destroy_Call {
13600- _c.Call.Run(func(args mock.Arguments) {
13601- run()
13602- })
13603- return _c
13604-}
13605-
13606-func (_c *MockWebView_Destroy_Call) Return() *MockWebView_Destroy_Call {
13607- _c.Call.Return()
13608- return _c
13609-}
13610-
13611-func (_c *MockWebView_Destroy_Call) RunAndReturn(run func()) *MockWebView_Destroy_Call {
13612- _c.Run(run)
13613- return _c
13614-}
13615-
13616-// EstimatedProgress provides a mock function for the type MockWebView
13617-func (_mock *MockWebView) EstimatedProgress() float64 {
13618- ret := _mock.Called()
13619-
13620- if len(ret) == 0 {
13621- panic("no return value specified for EstimatedProgress")
13622- }
13623-
13624- var r0 float64
13625- if returnFunc, ok := ret.Get(0).(func() float64); ok {
13626- r0 = returnFunc()
13627- } else {
13628- r0 = ret.Get(0).(float64)
13629- }
13630- return r0
13631-}
13632-
13633-// MockWebView_EstimatedProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimatedProgress'
13634-type MockWebView_EstimatedProgress_Call struct {
13635- *mock.Call
13636-}
13637-
13638-// EstimatedProgress is a helper method to define mock.On call
13639-func (_e *MockWebView_Expecter) EstimatedProgress() *MockWebView_EstimatedProgress_Call {
13640- return &MockWebView_EstimatedProgress_Call{Call: _e.mock.On("EstimatedProgress")}
13641-}
13642-
13643-func (_c *MockWebView_EstimatedProgress_Call) Run(run func()) *MockWebView_EstimatedProgress_Call {
13644- _c.Call.Run(func(args mock.Arguments) {
13645- run()
13646- })
13647- return _c
13648-}
13649-
13650-func (_c *MockWebView_EstimatedProgress_Call) Return(f float64) *MockWebView_EstimatedProgress_Call {
13651- _c.Call.Return(f)
13652- return _c
13653-}
13654-
13655-func (_c *MockWebView_EstimatedProgress_Call) RunAndReturn(run func() float64) *MockWebView_EstimatedProgress_Call {
13656- _c.Call.Return(run)
13657- return _c
13658-}
13659-
13660-// Favicon provides a mock function for the type MockWebView
13661-func (_mock *MockWebView) Favicon() port.Texture {
13662- ret := _mock.Called()
13663-
13664- if len(ret) == 0 {
13665- panic("no return value specified for Favicon")
13666- }
13667-
13668- var r0 port.Texture
13669- if returnFunc, ok := ret.Get(0).(func() port.Texture); ok {
13670- r0 = returnFunc()
13671- } else {
13672- if ret.Get(0) != nil {
13673- r0 = ret.Get(0).(port.Texture)
13674- }
13675- }
13676- return r0
13677-}
13678-
13679-// MockWebView_Favicon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Favicon'
13680-type MockWebView_Favicon_Call struct {
13681- *mock.Call
13682-}
13683-
13684-// Favicon is a helper method to define mock.On call
13685-func (_e *MockWebView_Expecter) Favicon() *MockWebView_Favicon_Call {
13686- return &MockWebView_Favicon_Call{Call: _e.mock.On("Favicon")}
13687-}
13688-
13689-func (_c *MockWebView_Favicon_Call) Run(run func()) *MockWebView_Favicon_Call {
13690- _c.Call.Run(func(args mock.Arguments) {
13691- run()
13692- })
13693- return _c
13694-}
13695-
13696-func (_c *MockWebView_Favicon_Call) Return(texture port.Texture) *MockWebView_Favicon_Call {
13697- _c.Call.Return(texture)
13698- return _c
13699-}
13700-
13701-func (_c *MockWebView_Favicon_Call) RunAndReturn(run func() port.Texture) *MockWebView_Favicon_Call {
13702- _c.Call.Return(run)
13703- return _c
13704-}
13705-
13706-// Generation provides a mock function for the type MockWebView
13707-func (_mock *MockWebView) Generation() uint64 {
13708- ret := _mock.Called()
13709-
13710- if len(ret) == 0 {
13711- panic("no return value specified for Generation")
13712- }
13713-
13714- var r0 uint64
13715- if returnFunc, ok := ret.Get(0).(func() uint64); ok {
13716- r0 = returnFunc()
13717- } else {
13718- r0 = ret.Get(0).(uint64)
13719- }
13720- return r0
13721-}
13722-
13723-// MockWebView_Generation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Generation'
13724-type MockWebView_Generation_Call struct {
13725- *mock.Call
13726-}
13727-
13728-// Generation is a helper method to define mock.On call
13729-func (_e *MockWebView_Expecter) Generation() *MockWebView_Generation_Call {
13730- return &MockWebView_Generation_Call{Call: _e.mock.On("Generation")}
13731-}
13732-
13733-func (_c *MockWebView_Generation_Call) Run(run func()) *MockWebView_Generation_Call {
13734- _c.Call.Run(func(args mock.Arguments) {
13735- run()
13736- })
13737- return _c
13738-}
13739-
13740-func (_c *MockWebView_Generation_Call) Return(v uint64) *MockWebView_Generation_Call {
13741- _c.Call.Return(v)
13742- return _c
13743-}
13744-
13745-func (_c *MockWebView_Generation_Call) RunAndReturn(run func() uint64) *MockWebView_Generation_Call {
13746- _c.Call.Return(run)
13747- return _c
13748-}
13749-
13750-// GetFindController provides a mock function for the type MockWebView
13751-func (_mock *MockWebView) GetFindController() port.FindController {
13752- ret := _mock.Called()
13753-
13754- if len(ret) == 0 {
13755- panic("no return value specified for GetFindController")
13756- }
13757-
13758- var r0 port.FindController
13759- if returnFunc, ok := ret.Get(0).(func() port.FindController); ok {
13760- r0 = returnFunc()
13761- } else {
13762- if ret.Get(0) != nil {
13763- r0 = ret.Get(0).(port.FindController)
13764- }
13765- }
13766- return r0
13767-}
13768-
13769-// MockWebView_GetFindController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFindController'
13770-type MockWebView_GetFindController_Call struct {
13771- *mock.Call
13772-}
13773-
13774-// GetFindController is a helper method to define mock.On call
13775-func (_e *MockWebView_Expecter) GetFindController() *MockWebView_GetFindController_Call {
13776- return &MockWebView_GetFindController_Call{Call: _e.mock.On("GetFindController")}
13777-}
13778-
13779-func (_c *MockWebView_GetFindController_Call) Run(run func()) *MockWebView_GetFindController_Call {
13780- _c.Call.Run(func(args mock.Arguments) {
13781- run()
13782- })
13783- return _c
13784-}
13785-
13786-func (_c *MockWebView_GetFindController_Call) Return(findController port.FindController) *MockWebView_GetFindController_Call {
13787- _c.Call.Return(findController)
13788- return _c
13789-}
13790-
13791-func (_c *MockWebView_GetFindController_Call) RunAndReturn(run func() port.FindController) *MockWebView_GetFindController_Call {
13792- _c.Call.Return(run)
13793- return _c
13794-}
13795-
13796-// GetZoomLevel provides a mock function for the type MockWebView
13797-func (_mock *MockWebView) GetZoomLevel() float64 {
13798- ret := _mock.Called()
13799-
13800- if len(ret) == 0 {
13801- panic("no return value specified for GetZoomLevel")
13802- }
13803-
13804- var r0 float64
13805- if returnFunc, ok := ret.Get(0).(func() float64); ok {
13806- r0 = returnFunc()
13807- } else {
13808- r0 = ret.Get(0).(float64)
13809- }
13810- return r0
13811-}
13812-
13813-// MockWebView_GetZoomLevel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetZoomLevel'
13814-type MockWebView_GetZoomLevel_Call struct {
13815- *mock.Call
13816-}
13817-
13818-// GetZoomLevel is a helper method to define mock.On call
13819-func (_e *MockWebView_Expecter) GetZoomLevel() *MockWebView_GetZoomLevel_Call {
13820- return &MockWebView_GetZoomLevel_Call{Call: _e.mock.On("GetZoomLevel")}
13821-}
13822-
13823-func (_c *MockWebView_GetZoomLevel_Call) Run(run func()) *MockWebView_GetZoomLevel_Call {
13824- _c.Call.Run(func(args mock.Arguments) {
13825- run()
13826- })
13827- return _c
13828-}
13829-
13830-func (_c *MockWebView_GetZoomLevel_Call) Return(f float64) *MockWebView_GetZoomLevel_Call {
13831- _c.Call.Return(f)
13832- return _c
13833-}
13834-
13835-func (_c *MockWebView_GetZoomLevel_Call) RunAndReturn(run func() float64) *MockWebView_GetZoomLevel_Call {
13836- _c.Call.Return(run)
13837- return _c
13838-}
13839-
13840-// GoBack provides a mock function for the type MockWebView
13841-func (_mock *MockWebView) GoBack(ctx context.Context) error {
13842- ret := _mock.Called(ctx)
13843-
13844- if len(ret) == 0 {
13845- panic("no return value specified for GoBack")
13846- }
13847-
13848- var r0 error
13849- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
13850- r0 = returnFunc(ctx)
13851- } else {
13852- r0 = ret.Error(0)
13853- }
13854- return r0
13855-}
13856-
13857-// MockWebView_GoBack_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GoBack'
13858-type MockWebView_GoBack_Call struct {
13859- *mock.Call
13860-}
13861-
13862-// GoBack is a helper method to define mock.On call
13863-// - ctx context.Context
13864-func (_e *MockWebView_Expecter) GoBack(ctx interface{}) *MockWebView_GoBack_Call {
13865- return &MockWebView_GoBack_Call{Call: _e.mock.On("GoBack", ctx)}
13866-}
13867-
13868-func (_c *MockWebView_GoBack_Call) Run(run func(ctx context.Context)) *MockWebView_GoBack_Call {
13869- _c.Call.Run(func(args mock.Arguments) {
13870- var arg0 context.Context
13871- if args[0] != nil {
13872- arg0 = args[0].(context.Context)
13873- }
13874- run(
13875- arg0,
13876- )
13877- })
13878- return _c
13879-}
13880-
13881-func (_c *MockWebView_GoBack_Call) Return(err error) *MockWebView_GoBack_Call {
13882- _c.Call.Return(err)
13883- return _c
13884-}
13885-
13886-func (_c *MockWebView_GoBack_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_GoBack_Call {
13887- _c.Call.Return(run)
13888- return _c
13889-}
13890-
13891-// GoForward provides a mock function for the type MockWebView
13892-func (_mock *MockWebView) GoForward(ctx context.Context) error {
13893- ret := _mock.Called(ctx)
13894-
13895- if len(ret) == 0 {
13896- panic("no return value specified for GoForward")
13897- }
13898-
13899- var r0 error
13900- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
13901- r0 = returnFunc(ctx)
13902- } else {
13903- r0 = ret.Error(0)
13904- }
13905- return r0
13906-}
13907-
13908-// MockWebView_GoForward_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GoForward'
13909-type MockWebView_GoForward_Call struct {
13910- *mock.Call
13911-}
13912-
13913-// GoForward is a helper method to define mock.On call
13914-// - ctx context.Context
13915-func (_e *MockWebView_Expecter) GoForward(ctx interface{}) *MockWebView_GoForward_Call {
13916- return &MockWebView_GoForward_Call{Call: _e.mock.On("GoForward", ctx)}
13917-}
13918-
13919-func (_c *MockWebView_GoForward_Call) Run(run func(ctx context.Context)) *MockWebView_GoForward_Call {
13920- _c.Call.Run(func(args mock.Arguments) {
13921- var arg0 context.Context
13922- if args[0] != nil {
13923- arg0 = args[0].(context.Context)
13924- }
13925- run(
13926- arg0,
13927- )
13928- })
13929- return _c
13930-}
13931-
13932-func (_c *MockWebView_GoForward_Call) Return(err error) *MockWebView_GoForward_Call {
13933- _c.Call.Return(err)
13934- return _c
13935-}
13936-
13937-func (_c *MockWebView_GoForward_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_GoForward_Call {
13938- _c.Call.Return(run)
13939- return _c
13940-}
13941-
13942-// ID provides a mock function for the type MockWebView
13943-func (_mock *MockWebView) ID() port.WebViewID {
13944- ret := _mock.Called()
13945-
13946- if len(ret) == 0 {
13947- panic("no return value specified for ID")
13948- }
13949-
13950- var r0 port.WebViewID
13951- if returnFunc, ok := ret.Get(0).(func() port.WebViewID); ok {
13952- r0 = returnFunc()
13953- } else {
13954- r0 = ret.Get(0).(port.WebViewID)
13955- }
13956- return r0
13957-}
13958-
13959-// MockWebView_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID'
13960-type MockWebView_ID_Call struct {
13961- *mock.Call
13962-}
13963-
13964-// ID is a helper method to define mock.On call
13965-func (_e *MockWebView_Expecter) ID() *MockWebView_ID_Call {
13966- return &MockWebView_ID_Call{Call: _e.mock.On("ID")}
13967-}
13968-
13969-func (_c *MockWebView_ID_Call) Run(run func()) *MockWebView_ID_Call {
13970- _c.Call.Run(func(args mock.Arguments) {
13971- run()
13972- })
13973- return _c
13974-}
13975-
13976-func (_c *MockWebView_ID_Call) Return(webViewID port.WebViewID) *MockWebView_ID_Call {
13977- _c.Call.Return(webViewID)
13978- return _c
13979-}
13980-
13981-func (_c *MockWebView_ID_Call) RunAndReturn(run func() port.WebViewID) *MockWebView_ID_Call {
13982- _c.Call.Return(run)
13983- return _c
13984-}
13985-
13986-// IsDestroyed provides a mock function for the type MockWebView
13987-func (_mock *MockWebView) IsDestroyed() bool {
13988- ret := _mock.Called()
13989-
13990- if len(ret) == 0 {
13991- panic("no return value specified for IsDestroyed")
13992- }
13993-
13994- var r0 bool
13995- if returnFunc, ok := ret.Get(0).(func() bool); ok {
13996- r0 = returnFunc()
13997- } else {
13998- r0 = ret.Get(0).(bool)
13999- }
14000- return r0
14001-}
14002-
14003-// MockWebView_IsDestroyed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDestroyed'
14004-type MockWebView_IsDestroyed_Call struct {
14005- *mock.Call
14006-}
14007-
14008-// IsDestroyed is a helper method to define mock.On call
14009-func (_e *MockWebView_Expecter) IsDestroyed() *MockWebView_IsDestroyed_Call {
14010- return &MockWebView_IsDestroyed_Call{Call: _e.mock.On("IsDestroyed")}
14011-}
14012-
14013-func (_c *MockWebView_IsDestroyed_Call) Run(run func()) *MockWebView_IsDestroyed_Call {
14014- _c.Call.Run(func(args mock.Arguments) {
14015- run()
14016- })
14017- return _c
14018-}
14019-
14020-func (_c *MockWebView_IsDestroyed_Call) Return(b bool) *MockWebView_IsDestroyed_Call {
14021- _c.Call.Return(b)
14022- return _c
14023-}
14024-
14025-func (_c *MockWebView_IsDestroyed_Call) RunAndReturn(run func() bool) *MockWebView_IsDestroyed_Call {
14026- _c.Call.Return(run)
14027- return _c
14028-}
14029-
14030-// IsFullscreen provides a mock function for the type MockWebView
14031-func (_mock *MockWebView) IsFullscreen() bool {
14032- ret := _mock.Called()
14033-
14034- if len(ret) == 0 {
14035- panic("no return value specified for IsFullscreen")
14036- }
14037-
14038- var r0 bool
14039- if returnFunc, ok := ret.Get(0).(func() bool); ok {
14040- r0 = returnFunc()
14041- } else {
14042- r0 = ret.Get(0).(bool)
14043- }
14044- return r0
14045-}
14046-
14047-// MockWebView_IsFullscreen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFullscreen'
14048-type MockWebView_IsFullscreen_Call struct {
14049- *mock.Call
14050-}
14051-
14052-// IsFullscreen is a helper method to define mock.On call
14053-func (_e *MockWebView_Expecter) IsFullscreen() *MockWebView_IsFullscreen_Call {
14054- return &MockWebView_IsFullscreen_Call{Call: _e.mock.On("IsFullscreen")}
14055-}
14056-
14057-func (_c *MockWebView_IsFullscreen_Call) Run(run func()) *MockWebView_IsFullscreen_Call {
14058- _c.Call.Run(func(args mock.Arguments) {
14059- run()
14060- })
14061- return _c
14062-}
14063-
14064-func (_c *MockWebView_IsFullscreen_Call) Return(b bool) *MockWebView_IsFullscreen_Call {
14065- _c.Call.Return(b)
14066- return _c
14067-}
14068-
14069-func (_c *MockWebView_IsFullscreen_Call) RunAndReturn(run func() bool) *MockWebView_IsFullscreen_Call {
14070- _c.Call.Return(run)
14071- return _c
14072-}
14073-
14074-// IsLoading provides a mock function for the type MockWebView
14075-func (_mock *MockWebView) IsLoading() bool {
14076- ret := _mock.Called()
14077-
14078- if len(ret) == 0 {
14079- panic("no return value specified for IsLoading")
14080- }
14081-
14082- var r0 bool
14083- if returnFunc, ok := ret.Get(0).(func() bool); ok {
14084- r0 = returnFunc()
14085- } else {
14086- r0 = ret.Get(0).(bool)
14087- }
14088- return r0
14089-}
14090-
14091-// MockWebView_IsLoading_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsLoading'
14092-type MockWebView_IsLoading_Call struct {
14093- *mock.Call
14094-}
14095-
14096-// IsLoading is a helper method to define mock.On call
14097-func (_e *MockWebView_Expecter) IsLoading() *MockWebView_IsLoading_Call {
14098- return &MockWebView_IsLoading_Call{Call: _e.mock.On("IsLoading")}
14099-}
14100-
14101-func (_c *MockWebView_IsLoading_Call) Run(run func()) *MockWebView_IsLoading_Call {
14102- _c.Call.Run(func(args mock.Arguments) {
14103- run()
14104- })
14105- return _c
14106-}
14107-
14108-func (_c *MockWebView_IsLoading_Call) Return(b bool) *MockWebView_IsLoading_Call {
14109- _c.Call.Return(b)
14110- return _c
14111-}
14112-
14113-func (_c *MockWebView_IsLoading_Call) RunAndReturn(run func() bool) *MockWebView_IsLoading_Call {
14114- _c.Call.Return(run)
14115- return _c
14116-}
14117-
14118-// IsPlayingAudio provides a mock function for the type MockWebView
14119-func (_mock *MockWebView) IsPlayingAudio() bool {
14120- ret := _mock.Called()
14121-
14122- if len(ret) == 0 {
14123- panic("no return value specified for IsPlayingAudio")
14124- }
14125-
14126- var r0 bool
14127- if returnFunc, ok := ret.Get(0).(func() bool); ok {
14128- r0 = returnFunc()
14129- } else {
14130- r0 = ret.Get(0).(bool)
14131- }
14132- return r0
14133-}
14134-
14135-// MockWebView_IsPlayingAudio_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsPlayingAudio'
14136-type MockWebView_IsPlayingAudio_Call struct {
14137- *mock.Call
14138-}
14139-
14140-// IsPlayingAudio is a helper method to define mock.On call
14141-func (_e *MockWebView_Expecter) IsPlayingAudio() *MockWebView_IsPlayingAudio_Call {
14142- return &MockWebView_IsPlayingAudio_Call{Call: _e.mock.On("IsPlayingAudio")}
14143-}
14144-
14145-func (_c *MockWebView_IsPlayingAudio_Call) Run(run func()) *MockWebView_IsPlayingAudio_Call {
14146- _c.Call.Run(func(args mock.Arguments) {
14147- run()
14148- })
14149- return _c
14150-}
14151-
14152-func (_c *MockWebView_IsPlayingAudio_Call) Return(b bool) *MockWebView_IsPlayingAudio_Call {
14153- _c.Call.Return(b)
14154- return _c
14155-}
14156-
14157-func (_c *MockWebView_IsPlayingAudio_Call) RunAndReturn(run func() bool) *MockWebView_IsPlayingAudio_Call {
14158- _c.Call.Return(run)
14159- return _c
14160-}
14161-
14162-// LoadHTML provides a mock function for the type MockWebView
14163-func (_mock *MockWebView) LoadHTML(ctx context.Context, content string, baseURI string) error {
14164- ret := _mock.Called(ctx, content, baseURI)
14165-
14166- if len(ret) == 0 {
14167- panic("no return value specified for LoadHTML")
14168- }
14169-
14170- var r0 error
14171- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
14172- r0 = returnFunc(ctx, content, baseURI)
14173- } else {
14174- r0 = ret.Error(0)
14175- }
14176- return r0
14177-}
14178-
14179-// MockWebView_LoadHTML_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadHTML'
14180-type MockWebView_LoadHTML_Call struct {
14181- *mock.Call
14182-}
14183-
14184-// LoadHTML is a helper method to define mock.On call
14185-// - ctx context.Context
14186-// - content string
14187-// - baseURI string
14188-func (_e *MockWebView_Expecter) LoadHTML(ctx interface{}, content interface{}, baseURI interface{}) *MockWebView_LoadHTML_Call {
14189- return &MockWebView_LoadHTML_Call{Call: _e.mock.On("LoadHTML", ctx, content, baseURI)}
14190-}
14191-
14192-func (_c *MockWebView_LoadHTML_Call) Run(run func(ctx context.Context, content string, baseURI string)) *MockWebView_LoadHTML_Call {
14193- _c.Call.Run(func(args mock.Arguments) {
14194- var arg0 context.Context
14195- if args[0] != nil {
14196- arg0 = args[0].(context.Context)
14197- }
14198- var arg1 string
14199- if args[1] != nil {
14200- arg1 = args[1].(string)
14201- }
14202- var arg2 string
14203- if args[2] != nil {
14204- arg2 = args[2].(string)
14205- }
14206- run(
14207- arg0,
14208- arg1,
14209- arg2,
14210- )
14211- })
14212- return _c
14213-}
14214-
14215-func (_c *MockWebView_LoadHTML_Call) Return(err error) *MockWebView_LoadHTML_Call {
14216- _c.Call.Return(err)
14217- return _c
14218-}
14219-
14220-func (_c *MockWebView_LoadHTML_Call) RunAndReturn(run func(ctx context.Context, content string, baseURI string) error) *MockWebView_LoadHTML_Call {
14221- _c.Call.Return(run)
14222- return _c
14223-}
14224-
14225-// LoadURI provides a mock function for the type MockWebView
14226-func (_mock *MockWebView) LoadURI(ctx context.Context, uri string) error {
14227- ret := _mock.Called(ctx, uri)
14228-
14229- if len(ret) == 0 {
14230- panic("no return value specified for LoadURI")
14231- }
14232-
14233- var r0 error
14234- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
14235- r0 = returnFunc(ctx, uri)
14236- } else {
14237- r0 = ret.Error(0)
14238- }
14239- return r0
14240-}
14241-
14242-// MockWebView_LoadURI_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadURI'
14243-type MockWebView_LoadURI_Call struct {
14244- *mock.Call
14245-}
14246-
14247-// LoadURI is a helper method to define mock.On call
14248-// - ctx context.Context
14249-// - uri string
14250-func (_e *MockWebView_Expecter) LoadURI(ctx interface{}, uri interface{}) *MockWebView_LoadURI_Call {
14251- return &MockWebView_LoadURI_Call{Call: _e.mock.On("LoadURI", ctx, uri)}
14252-}
14253-
14254-func (_c *MockWebView_LoadURI_Call) Run(run func(ctx context.Context, uri string)) *MockWebView_LoadURI_Call {
14255- _c.Call.Run(func(args mock.Arguments) {
14256- var arg0 context.Context
14257- if args[0] != nil {
14258- arg0 = args[0].(context.Context)
14259- }
14260- var arg1 string
14261- if args[1] != nil {
14262- arg1 = args[1].(string)
14263- }
14264- run(
14265- arg0,
14266- arg1,
14267- )
14268- })
14269- return _c
14270-}
14271-
14272-func (_c *MockWebView_LoadURI_Call) Return(err error) *MockWebView_LoadURI_Call {
14273- _c.Call.Return(err)
14274- return _c
14275-}
14276-
14277-func (_c *MockWebView_LoadURI_Call) RunAndReturn(run func(ctx context.Context, uri string) error) *MockWebView_LoadURI_Call {
14278- _c.Call.Return(run)
14279- return _c
14280-}
14281-
14282-// Reload provides a mock function for the type MockWebView
14283-func (_mock *MockWebView) Reload(ctx context.Context) error {
14284- ret := _mock.Called(ctx)
14285-
14286- if len(ret) == 0 {
14287- panic("no return value specified for Reload")
14288- }
14289-
14290- var r0 error
14291- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
14292- r0 = returnFunc(ctx)
14293- } else {
14294- r0 = ret.Error(0)
14295- }
14296- return r0
14297-}
14298-
14299-// MockWebView_Reload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reload'
14300-type MockWebView_Reload_Call struct {
14301- *mock.Call
14302-}
14303-
14304-// Reload is a helper method to define mock.On call
14305-// - ctx context.Context
14306-func (_e *MockWebView_Expecter) Reload(ctx interface{}) *MockWebView_Reload_Call {
14307- return &MockWebView_Reload_Call{Call: _e.mock.On("Reload", ctx)}
14308-}
14309-
14310-func (_c *MockWebView_Reload_Call) Run(run func(ctx context.Context)) *MockWebView_Reload_Call {
14311- _c.Call.Run(func(args mock.Arguments) {
14312- var arg0 context.Context
14313- if args[0] != nil {
14314- arg0 = args[0].(context.Context)
14315- }
14316- run(
14317- arg0,
14318- )
14319- })
14320- return _c
14321-}
14322-
14323-func (_c *MockWebView_Reload_Call) Return(err error) *MockWebView_Reload_Call {
14324- _c.Call.Return(err)
14325- return _c
14326-}
14327-
14328-func (_c *MockWebView_Reload_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_Reload_Call {
14329- _c.Call.Return(run)
14330- return _c
14331-}
14332-
14333-// ReloadBypassCache provides a mock function for the type MockWebView
14334-func (_mock *MockWebView) ReloadBypassCache(ctx context.Context) error {
14335- ret := _mock.Called(ctx)
14336-
14337- if len(ret) == 0 {
14338- panic("no return value specified for ReloadBypassCache")
14339- }
14340-
14341- var r0 error
14342- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
14343- r0 = returnFunc(ctx)
14344- } else {
14345- r0 = ret.Error(0)
14346- }
14347- return r0
14348-}
14349-
14350-// MockWebView_ReloadBypassCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReloadBypassCache'
14351-type MockWebView_ReloadBypassCache_Call struct {
14352- *mock.Call
14353-}
14354-
14355-// ReloadBypassCache is a helper method to define mock.On call
14356-// - ctx context.Context
14357-func (_e *MockWebView_Expecter) ReloadBypassCache(ctx interface{}) *MockWebView_ReloadBypassCache_Call {
14358- return &MockWebView_ReloadBypassCache_Call{Call: _e.mock.On("ReloadBypassCache", ctx)}
14359-}
14360-
14361-func (_c *MockWebView_ReloadBypassCache_Call) Run(run func(ctx context.Context)) *MockWebView_ReloadBypassCache_Call {
14362- _c.Call.Run(func(args mock.Arguments) {
14363- var arg0 context.Context
14364- if args[0] != nil {
14365- arg0 = args[0].(context.Context)
14366- }
14367- run(
14368- arg0,
14369- )
14370- })
14371- return _c
14372-}
14373-
14374-func (_c *MockWebView_ReloadBypassCache_Call) Return(err error) *MockWebView_ReloadBypassCache_Call {
14375- _c.Call.Return(err)
14376- return _c
14377-}
14378-
14379-func (_c *MockWebView_ReloadBypassCache_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_ReloadBypassCache_Call {
14380- _c.Call.Return(run)
14381- return _c
14382-}
14383-
14384-// ResetBackgroundToDefault provides a mock function for the type MockWebView
14385-func (_mock *MockWebView) ResetBackgroundToDefault() {
14386- _mock.Called()
14387- return
14388-}
14389-
14390-// MockWebView_ResetBackgroundToDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetBackgroundToDefault'
14391-type MockWebView_ResetBackgroundToDefault_Call struct {
14392- *mock.Call
14393-}
14394-
14395-// ResetBackgroundToDefault is a helper method to define mock.On call
14396-func (_e *MockWebView_Expecter) ResetBackgroundToDefault() *MockWebView_ResetBackgroundToDefault_Call {
14397- return &MockWebView_ResetBackgroundToDefault_Call{Call: _e.mock.On("ResetBackgroundToDefault")}
14398-}
14399-
14400-func (_c *MockWebView_ResetBackgroundToDefault_Call) Run(run func()) *MockWebView_ResetBackgroundToDefault_Call {
14401- _c.Call.Run(func(args mock.Arguments) {
14402- run()
14403- })
14404- return _c
14405-}
14406-
14407-func (_c *MockWebView_ResetBackgroundToDefault_Call) Return() *MockWebView_ResetBackgroundToDefault_Call {
14408- _c.Call.Return()
14409- return _c
14410-}
14411-
14412-func (_c *MockWebView_ResetBackgroundToDefault_Call) RunAndReturn(run func()) *MockWebView_ResetBackgroundToDefault_Call {
14413- _c.Run(run)
14414- return _c
14415-}
14416-
14417-// RunJavaScript provides a mock function for the type MockWebView
14418-func (_mock *MockWebView) RunJavaScript(ctx context.Context, script string) {
14419- _mock.Called(ctx, script)
14420- return
14421-}
14422-
14423-// MockWebView_RunJavaScript_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunJavaScript'
14424-type MockWebView_RunJavaScript_Call struct {
14425- *mock.Call
14426-}
14427-
14428-// RunJavaScript is a helper method to define mock.On call
14429-// - ctx context.Context
14430-// - script string
14431-func (_e *MockWebView_Expecter) RunJavaScript(ctx interface{}, script interface{}) *MockWebView_RunJavaScript_Call {
14432- return &MockWebView_RunJavaScript_Call{Call: _e.mock.On("RunJavaScript", ctx, script)}
14433-}
14434-
14435-func (_c *MockWebView_RunJavaScript_Call) Run(run func(ctx context.Context, script string)) *MockWebView_RunJavaScript_Call {
14436- _c.Call.Run(func(args mock.Arguments) {
14437- var arg0 context.Context
14438- if args[0] != nil {
14439- arg0 = args[0].(context.Context)
14440- }
14441- var arg1 string
14442- if args[1] != nil {
14443- arg1 = args[1].(string)
14444- }
14445- run(
14446- arg0,
14447- arg1,
14448- )
14449- })
14450- return _c
14451-}
14452-
14453-func (_c *MockWebView_RunJavaScript_Call) Return() *MockWebView_RunJavaScript_Call {
14454- _c.Call.Return()
14455- return _c
14456-}
14457-
14458-func (_c *MockWebView_RunJavaScript_Call) RunAndReturn(run func(ctx context.Context, script string)) *MockWebView_RunJavaScript_Call {
14459- _c.Run(run)
14460- return _c
14461-}
14462-
14463-// SetBackgroundColor provides a mock function for the type MockWebView
14464-func (_mock *MockWebView) SetBackgroundColor(r float64, g float64, b float64, a float64) {
14465- _mock.Called(r, g, b, a)
14466- return
14467-}
14468-
14469-// MockWebView_SetBackgroundColor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetBackgroundColor'
14470-type MockWebView_SetBackgroundColor_Call struct {
14471- *mock.Call
14472-}
14473-
14474-// SetBackgroundColor is a helper method to define mock.On call
14475-// - r float64
14476-// - g float64
14477-// - b float64
14478-// - a float64
14479-func (_e *MockWebView_Expecter) SetBackgroundColor(r interface{}, g interface{}, b interface{}, a interface{}) *MockWebView_SetBackgroundColor_Call {
14480- return &MockWebView_SetBackgroundColor_Call{Call: _e.mock.On("SetBackgroundColor", r, g, b, a)}
14481-}
14482-
14483-func (_c *MockWebView_SetBackgroundColor_Call) Run(run func(r float64, g float64, b float64, a float64)) *MockWebView_SetBackgroundColor_Call {
14484- _c.Call.Run(func(args mock.Arguments) {
14485- var arg0 float64
14486- if args[0] != nil {
14487- arg0 = args[0].(float64)
14488- }
14489- var arg1 float64
14490- if args[1] != nil {
14491- arg1 = args[1].(float64)
14492- }
14493- var arg2 float64
14494- if args[2] != nil {
14495- arg2 = args[2].(float64)
14496- }
14497- var arg3 float64
14498- if args[3] != nil {
14499- arg3 = args[3].(float64)
14500- }
14501- run(
14502- arg0,
14503- arg1,
14504- arg2,
14505- arg3,
14506- )
14507- })
14508- return _c
14509-}
14510-
14511-func (_c *MockWebView_SetBackgroundColor_Call) Return() *MockWebView_SetBackgroundColor_Call {
14512- _c.Call.Return()
14513- return _c
14514-}
14515-
14516-func (_c *MockWebView_SetBackgroundColor_Call) RunAndReturn(run func(r float64, g float64, b float64, a float64)) *MockWebView_SetBackgroundColor_Call {
14517- _c.Run(run)
14518- return _c
14519-}
14520-
14521-// SetCallbacks provides a mock function for the type MockWebView
14522-func (_mock *MockWebView) SetCallbacks(callbacks *port.WebViewCallbacks) {
14523- _mock.Called(callbacks)
14524- return
14525-}
14526-
14527-// MockWebView_SetCallbacks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCallbacks'
14528-type MockWebView_SetCallbacks_Call struct {
14529- *mock.Call
14530-}
14531-
14532-// SetCallbacks is a helper method to define mock.On call
14533-// - callbacks *port.WebViewCallbacks
14534-func (_e *MockWebView_Expecter) SetCallbacks(callbacks interface{}) *MockWebView_SetCallbacks_Call {
14535- return &MockWebView_SetCallbacks_Call{Call: _e.mock.On("SetCallbacks", callbacks)}
14536-}
14537-
14538-func (_c *MockWebView_SetCallbacks_Call) Run(run func(callbacks *port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call {
14539- _c.Call.Run(func(args mock.Arguments) {
14540- var arg0 *port.WebViewCallbacks
14541- if args[0] != nil {
14542- arg0 = args[0].(*port.WebViewCallbacks)
14543- }
14544- run(
14545- arg0,
14546- )
14547- })
14548- return _c
14549-}
14550-
14551-func (_c *MockWebView_SetCallbacks_Call) Return() *MockWebView_SetCallbacks_Call {
14552- _c.Call.Return()
14553- return _c
14554-}
14555-
14556-func (_c *MockWebView_SetCallbacks_Call) RunAndReturn(run func(callbacks *port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call {
14557- _c.Run(run)
14558- return _c
14559-}
14560-
14561-// SetZoomLevel provides a mock function for the type MockWebView
14562-func (_mock *MockWebView) SetZoomLevel(ctx context.Context, level float64) error {
14563- ret := _mock.Called(ctx, level)
14564-
14565- if len(ret) == 0 {
14566- panic("no return value specified for SetZoomLevel")
14567- }
14568-
14569- var r0 error
14570- if returnFunc, ok := ret.Get(0).(func(context.Context, float64) error); ok {
14571- r0 = returnFunc(ctx, level)
14572- } else {
14573- r0 = ret.Error(0)
14574- }
14575- return r0
14576-}
14577-
14578-// MockWebView_SetZoomLevel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetZoomLevel'
14579-type MockWebView_SetZoomLevel_Call struct {
14580- *mock.Call
14581-}
14582-
14583-// SetZoomLevel is a helper method to define mock.On call
14584-// - ctx context.Context
14585-// - level float64
14586-func (_e *MockWebView_Expecter) SetZoomLevel(ctx interface{}, level interface{}) *MockWebView_SetZoomLevel_Call {
14587- return &MockWebView_SetZoomLevel_Call{Call: _e.mock.On("SetZoomLevel", ctx, level)}
14588-}
14589-
14590-func (_c *MockWebView_SetZoomLevel_Call) Run(run func(ctx context.Context, level float64)) *MockWebView_SetZoomLevel_Call {
14591- _c.Call.Run(func(args mock.Arguments) {
14592- var arg0 context.Context
14593- if args[0] != nil {
14594- arg0 = args[0].(context.Context)
14595- }
14596- var arg1 float64
14597- if args[1] != nil {
14598- arg1 = args[1].(float64)
14599- }
14600- run(
14601- arg0,
14602- arg1,
14603- )
14604- })
14605- return _c
14606-}
14607-
14608-func (_c *MockWebView_SetZoomLevel_Call) Return(err error) *MockWebView_SetZoomLevel_Call {
14609- _c.Call.Return(err)
14610- return _c
14611-}
14612-
14613-func (_c *MockWebView_SetZoomLevel_Call) RunAndReturn(run func(ctx context.Context, level float64) error) *MockWebView_SetZoomLevel_Call {
14614- _c.Call.Return(run)
14615- return _c
14616-}
14617-
14618-// State provides a mock function for the type MockWebView
14619-func (_mock *MockWebView) State() port.WebViewState {
14620- ret := _mock.Called()
14621-
14622- if len(ret) == 0 {
14623- panic("no return value specified for State")
14624- }
14625-
14626- var r0 port.WebViewState
14627- if returnFunc, ok := ret.Get(0).(func() port.WebViewState); ok {
14628- r0 = returnFunc()
14629- } else {
14630- r0 = ret.Get(0).(port.WebViewState)
14631- }
14632- return r0
14633-}
14634-
14635-// MockWebView_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State'
14636-type MockWebView_State_Call struct {
14637- *mock.Call
14638-}
14639-
14640-// State is a helper method to define mock.On call
14641-func (_e *MockWebView_Expecter) State() *MockWebView_State_Call {
14642- return &MockWebView_State_Call{Call: _e.mock.On("State")}
14643-}
14644-
14645-func (_c *MockWebView_State_Call) Run(run func()) *MockWebView_State_Call {
14646- _c.Call.Run(func(args mock.Arguments) {
14647- run()
14648- })
14649- return _c
14650-}
14651-
14652-func (_c *MockWebView_State_Call) Return(webViewState port.WebViewState) *MockWebView_State_Call {
14653- _c.Call.Return(webViewState)
14654- return _c
14655-}
14656-
14657-func (_c *MockWebView_State_Call) RunAndReturn(run func() port.WebViewState) *MockWebView_State_Call {
14658- _c.Call.Return(run)
14659- return _c
14660-}
14661-
14662-// Stop provides a mock function for the type MockWebView
14663-func (_mock *MockWebView) Stop(ctx context.Context) error {
14664- ret := _mock.Called(ctx)
14665-
14666- if len(ret) == 0 {
14667- panic("no return value specified for Stop")
14668- }
14669-
14670- var r0 error
14671- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
14672- r0 = returnFunc(ctx)
14673- } else {
14674- r0 = ret.Error(0)
14675- }
14676- return r0
14677-}
14678-
14679-// MockWebView_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
14680-type MockWebView_Stop_Call struct {
14681- *mock.Call
14682-}
14683-
14684-// Stop is a helper method to define mock.On call
14685-// - ctx context.Context
14686-func (_e *MockWebView_Expecter) Stop(ctx interface{}) *MockWebView_Stop_Call {
14687- return &MockWebView_Stop_Call{Call: _e.mock.On("Stop", ctx)}
14688-}
14689-
14690-func (_c *MockWebView_Stop_Call) Run(run func(ctx context.Context)) *MockWebView_Stop_Call {
14691- _c.Call.Run(func(args mock.Arguments) {
14692- var arg0 context.Context
14693- if args[0] != nil {
14694- arg0 = args[0].(context.Context)
14695- }
14696- run(
14697- arg0,
14698- )
14699- })
14700- return _c
14701-}
14702-
14703-func (_c *MockWebView_Stop_Call) Return(err error) *MockWebView_Stop_Call {
14704- _c.Call.Return(err)
14705- return _c
14706-}
14707-
14708-func (_c *MockWebView_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_Stop_Call {
14709- _c.Call.Return(run)
14710- return _c
14711-}
14712-
14713-// Title provides a mock function for the type MockWebView
14714-func (_mock *MockWebView) Title() string {
14715- ret := _mock.Called()
14716-
14717- if len(ret) == 0 {
14718- panic("no return value specified for Title")
14719- }
14720-
14721- var r0 string
14722- if returnFunc, ok := ret.Get(0).(func() string); ok {
14723- r0 = returnFunc()
14724- } else {
14725- r0 = ret.Get(0).(string)
14726- }
14727- return r0
14728-}
14729-
14730-// MockWebView_Title_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Title'
14731-type MockWebView_Title_Call struct {
14732- *mock.Call
14733-}
14734-
14735-// Title is a helper method to define mock.On call
14736-func (_e *MockWebView_Expecter) Title() *MockWebView_Title_Call {
14737- return &MockWebView_Title_Call{Call: _e.mock.On("Title")}
14738-}
14739-
14740-func (_c *MockWebView_Title_Call) Run(run func()) *MockWebView_Title_Call {
14741- _c.Call.Run(func(args mock.Arguments) {
14742- run()
14743- })
14744- return _c
14745-}
14746-
14747-func (_c *MockWebView_Title_Call) Return(s string) *MockWebView_Title_Call {
14748- _c.Call.Return(s)
14749- return _c
14750-}
14751-
14752-func (_c *MockWebView_Title_Call) RunAndReturn(run func() string) *MockWebView_Title_Call {
14753- _c.Call.Return(run)
14754- return _c
14755-}
14756-
14757-// URI provides a mock function for the type MockWebView
14758-func (_mock *MockWebView) URI() string {
14759- ret := _mock.Called()
14760-
14761- if len(ret) == 0 {
14762- panic("no return value specified for URI")
14763- }
14764-
14765- var r0 string
14766- if returnFunc, ok := ret.Get(0).(func() string); ok {
14767- r0 = returnFunc()
14768- } else {
14769- r0 = ret.Get(0).(string)
14770- }
14771- return r0
14772-}
14773-
14774-// MockWebView_URI_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'URI'
14775-type MockWebView_URI_Call struct {
14776- *mock.Call
14777-}
14778-
14779-// URI is a helper method to define mock.On call
14780-func (_e *MockWebView_Expecter) URI() *MockWebView_URI_Call {
14781- return &MockWebView_URI_Call{Call: _e.mock.On("URI")}
14782-}
14783-
14784-func (_c *MockWebView_URI_Call) Run(run func()) *MockWebView_URI_Call {
14785- _c.Call.Run(func(args mock.Arguments) {
14786- run()
14787- })
14788- return _c
14789-}
14790-
14791-func (_c *MockWebView_URI_Call) Return(s string) *MockWebView_URI_Call {
14792- _c.Call.Return(s)
14793- return _c
14794-}
14795-
14796-func (_c *MockWebView_URI_Call) RunAndReturn(run func() string) *MockWebView_URI_Call {
14797- _c.Call.Return(run)
14798- return _c
14799-}
14800-
14801-// NewMockWebViewPool creates a new instance of MockWebViewPool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14802-// The first argument is typically a *testing.T value.
14803-func NewMockWebViewPool(t interface {
14804- mock.TestingT
14805- Cleanup(func())
14806-}) *MockWebViewPool {
14807- mock := &MockWebViewPool{}
14808- mock.Mock.Test(t)
14809-
14810- t.Cleanup(func() { mock.AssertExpectations(t) })
14811-
14812- return mock
14813-}
14814-
14815-// MockWebViewPool is an autogenerated mock type for the WebViewPool type
14816-type MockWebViewPool struct {
14817- mock.Mock
14818-}
14819-
14820-type MockWebViewPool_Expecter struct {
14821- mock *mock.Mock
14822-}
14823-
14824-func (_m *MockWebViewPool) EXPECT() *MockWebViewPool_Expecter {
14825- return &MockWebViewPool_Expecter{mock: &_m.Mock}
14826-}
14827-
14828-// Acquire provides a mock function for the type MockWebViewPool
14829-func (_mock *MockWebViewPool) Acquire(ctx context.Context) (port.WebView, error) {
14830- ret := _mock.Called(ctx)
14831-
14832- if len(ret) == 0 {
14833- panic("no return value specified for Acquire")
14834- }
14835-
14836- var r0 port.WebView
14837- var r1 error
14838- if returnFunc, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok {
14839- return returnFunc(ctx)
14840- }
14841- if returnFunc, ok := ret.Get(0).(func(context.Context) port.WebView); ok {
14842- r0 = returnFunc(ctx)
14843- } else {
14844- if ret.Get(0) != nil {
14845- r0 = ret.Get(0).(port.WebView)
14846- }
14847- }
14848- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
14849- r1 = returnFunc(ctx)
14850- } else {
14851- r1 = ret.Error(1)
14852- }
14853- return r0, r1
14854-}
14855-
14856-// MockWebViewPool_Acquire_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Acquire'
14857-type MockWebViewPool_Acquire_Call struct {
14858- *mock.Call
14859-}
14860-
14861-// Acquire is a helper method to define mock.On call
14862-// - ctx context.Context
14863-func (_e *MockWebViewPool_Expecter) Acquire(ctx interface{}) *MockWebViewPool_Acquire_Call {
14864- return &MockWebViewPool_Acquire_Call{Call: _e.mock.On("Acquire", ctx)}
14865-}
14866-
14867-func (_c *MockWebViewPool_Acquire_Call) Run(run func(ctx context.Context)) *MockWebViewPool_Acquire_Call {
14868- _c.Call.Run(func(args mock.Arguments) {
14869- var arg0 context.Context
14870- if args[0] != nil {
14871- arg0 = args[0].(context.Context)
14872- }
14873- run(
14874- arg0,
14875- )
14876- })
14877- return _c
14878-}
14879-
14880-func (_c *MockWebViewPool_Acquire_Call) Return(webView port.WebView, err error) *MockWebViewPool_Acquire_Call {
14881- _c.Call.Return(webView, err)
14882- return _c
14883-}
14884-
14885-func (_c *MockWebViewPool_Acquire_Call) RunAndReturn(run func(ctx context.Context) (port.WebView, error)) *MockWebViewPool_Acquire_Call {
14886- _c.Call.Return(run)
14887- return _c
14888-}
14889-
14890-// Close provides a mock function for the type MockWebViewPool
14891-func (_mock *MockWebViewPool) Close() {
14892- _mock.Called()
14893- return
14894-}
14895-
14896-// MockWebViewPool_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
14897-type MockWebViewPool_Close_Call struct {
14898- *mock.Call
14899-}
14900-
14901-// Close is a helper method to define mock.On call
14902-func (_e *MockWebViewPool_Expecter) Close() *MockWebViewPool_Close_Call {
14903- return &MockWebViewPool_Close_Call{Call: _e.mock.On("Close")}
14904-}
14905-
14906-func (_c *MockWebViewPool_Close_Call) Run(run func()) *MockWebViewPool_Close_Call {
14907- _c.Call.Run(func(args mock.Arguments) {
14908- run()
14909- })
14910- return _c
14911-}
14912-
14913-func (_c *MockWebViewPool_Close_Call) Return() *MockWebViewPool_Close_Call {
14914- _c.Call.Return()
14915- return _c
14916-}
14917-
14918-func (_c *MockWebViewPool_Close_Call) RunAndReturn(run func()) *MockWebViewPool_Close_Call {
14919- _c.Run(run)
14920- return _c
14921-}
14922-
14923-// Prewarm provides a mock function for the type MockWebViewPool
14924-func (_mock *MockWebViewPool) Prewarm(count int) {
14925- _mock.Called(count)
14926- return
14927-}
14928-
14929-// MockWebViewPool_Prewarm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prewarm'
14930-type MockWebViewPool_Prewarm_Call struct {
14931- *mock.Call
14932-}
14933-
14934-// Prewarm is a helper method to define mock.On call
14935-// - count int
14936-func (_e *MockWebViewPool_Expecter) Prewarm(count interface{}) *MockWebViewPool_Prewarm_Call {
14937- return &MockWebViewPool_Prewarm_Call{Call: _e.mock.On("Prewarm", count)}
14938-}
14939-
14940-func (_c *MockWebViewPool_Prewarm_Call) Run(run func(count int)) *MockWebViewPool_Prewarm_Call {
14941- _c.Call.Run(func(args mock.Arguments) {
14942- var arg0 int
14943- if args[0] != nil {
14944- arg0 = args[0].(int)
14945- }
14946- run(
14947- arg0,
14948- )
14949- })
14950- return _c
14951-}
14952-
14953-func (_c *MockWebViewPool_Prewarm_Call) Return() *MockWebViewPool_Prewarm_Call {
14954- _c.Call.Return()
14955- return _c
14956-}
14957-
14958-func (_c *MockWebViewPool_Prewarm_Call) RunAndReturn(run func(count int)) *MockWebViewPool_Prewarm_Call {
14959- _c.Run(run)
14960- return _c
14961-}
14962-
14963-// PrewarmAsync provides a mock function for the type MockWebViewPool
14964-func (_mock *MockWebViewPool) PrewarmAsync(ctx context.Context, count int) {
14965- _mock.Called(ctx, count)
14966- return
14967-}
14968-
14969-// MockWebViewPool_PrewarmAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrewarmAsync'
14970-type MockWebViewPool_PrewarmAsync_Call struct {
14971- *mock.Call
14972-}
14973-
14974-// PrewarmAsync is a helper method to define mock.On call
14975-// - ctx context.Context
14976-// - count int
14977-func (_e *MockWebViewPool_Expecter) PrewarmAsync(ctx interface{}, count interface{}) *MockWebViewPool_PrewarmAsync_Call {
14978- return &MockWebViewPool_PrewarmAsync_Call{Call: _e.mock.On("PrewarmAsync", ctx, count)}
14979-}
14980-
14981-func (_c *MockWebViewPool_PrewarmAsync_Call) Run(run func(ctx context.Context, count int)) *MockWebViewPool_PrewarmAsync_Call {
14982- _c.Call.Run(func(args mock.Arguments) {
14983- var arg0 context.Context
14984- if args[0] != nil {
14985- arg0 = args[0].(context.Context)
14986- }
14987- var arg1 int
14988- if args[1] != nil {
14989- arg1 = args[1].(int)
14990- }
14991- run(
14992- arg0,
14993- arg1,
14994- )
14995- })
14996- return _c
14997-}
14998-
14999-func (_c *MockWebViewPool_PrewarmAsync_Call) Return() *MockWebViewPool_PrewarmAsync_Call {
15000- _c.Call.Return()
15001- return _c
15002-}
15003-
15004-func (_c *MockWebViewPool_PrewarmAsync_Call) RunAndReturn(run func(ctx context.Context, count int)) *MockWebViewPool_PrewarmAsync_Call {
15005- _c.Run(run)
15006- return _c
15007-}
15008-
15009-// Release provides a mock function for the type MockWebViewPool
15010-func (_mock *MockWebViewPool) Release(wv port.WebView) {
15011- _mock.Called(wv)
15012- return
15013-}
15014-
15015-// MockWebViewPool_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release'
15016-type MockWebViewPool_Release_Call struct {
15017- *mock.Call
15018-}
15019-
15020-// Release is a helper method to define mock.On call
15021-// - wv port.WebView
15022-func (_e *MockWebViewPool_Expecter) Release(wv interface{}) *MockWebViewPool_Release_Call {
15023- return &MockWebViewPool_Release_Call{Call: _e.mock.On("Release", wv)}
15024-}
15025-
15026-func (_c *MockWebViewPool_Release_Call) Run(run func(wv port.WebView)) *MockWebViewPool_Release_Call {
15027- _c.Call.Run(func(args mock.Arguments) {
15028- var arg0 port.WebView
15029- if args[0] != nil {
15030- arg0 = args[0].(port.WebView)
15031- }
15032- run(
15033- arg0,
15034- )
15035- })
15036- return _c
15037-}
15038-
15039-func (_c *MockWebViewPool_Release_Call) Return() *MockWebViewPool_Release_Call {
15040- _c.Call.Return()
15041- return _c
15042-}
15043-
15044-func (_c *MockWebViewPool_Release_Call) RunAndReturn(run func(wv port.WebView)) *MockWebViewPool_Release_Call {
15045- _c.Run(run)
15046- return _c
15047-}
15048-
15049-// Size provides a mock function for the type MockWebViewPool
15050-func (_mock *MockWebViewPool) Size() int {
15051- ret := _mock.Called()
15052-
15053- if len(ret) == 0 {
15054- panic("no return value specified for Size")
15055- }
15056-
15057- var r0 int
15058- if returnFunc, ok := ret.Get(0).(func() int); ok {
15059- r0 = returnFunc()
15060- } else {
15061- r0 = ret.Get(0).(int)
15062- }
15063- return r0
15064-}
15065-
15066-// MockWebViewPool_Size_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Size'
15067-type MockWebViewPool_Size_Call struct {
15068- *mock.Call
15069-}
15070-
15071-// Size is a helper method to define mock.On call
15072-func (_e *MockWebViewPool_Expecter) Size() *MockWebViewPool_Size_Call {
15073- return &MockWebViewPool_Size_Call{Call: _e.mock.On("Size")}
15074-}
15075-
15076-func (_c *MockWebViewPool_Size_Call) Run(run func()) *MockWebViewPool_Size_Call {
15077- _c.Call.Run(func(args mock.Arguments) {
15078- run()
15079- })
15080- return _c
15081-}
15082-
15083-func (_c *MockWebViewPool_Size_Call) Return(n int) *MockWebViewPool_Size_Call {
15084- _c.Call.Return(n)
15085- return _c
15086-}
15087-
15088-func (_c *MockWebViewPool_Size_Call) RunAndReturn(run func() int) *MockWebViewPool_Size_Call {
15089- _c.Call.Return(run)
15090- return _c
15091-}
15092-
15093-// NewMockWebViewFactory creates a new instance of MockWebViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15094-// The first argument is typically a *testing.T value.
15095-func NewMockWebViewFactory(t interface {
15096- mock.TestingT
15097- Cleanup(func())
15098-}) *MockWebViewFactory {
15099- mock := &MockWebViewFactory{}
15100- mock.Mock.Test(t)
15101-
15102- t.Cleanup(func() { mock.AssertExpectations(t) })
15103-
15104- return mock
15105-}
15106-
15107-// MockWebViewFactory is an autogenerated mock type for the WebViewFactory type
15108-type MockWebViewFactory struct {
15109- mock.Mock
15110-}
15111-
15112-type MockWebViewFactory_Expecter struct {
15113- mock *mock.Mock
15114-}
15115-
15116-func (_m *MockWebViewFactory) EXPECT() *MockWebViewFactory_Expecter {
15117- return &MockWebViewFactory_Expecter{mock: &_m.Mock}
15118-}
15119-
15120-// Create provides a mock function for the type MockWebViewFactory
15121-func (_mock *MockWebViewFactory) Create(ctx context.Context) (port.WebView, error) {
15122- ret := _mock.Called(ctx)
15123-
15124- if len(ret) == 0 {
15125- panic("no return value specified for Create")
15126- }
15127-
15128- var r0 port.WebView
15129- var r1 error
15130- if returnFunc, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok {
15131- return returnFunc(ctx)
15132- }
15133- if returnFunc, ok := ret.Get(0).(func(context.Context) port.WebView); ok {
15134- r0 = returnFunc(ctx)
15135- } else {
15136- if ret.Get(0) != nil {
15137- r0 = ret.Get(0).(port.WebView)
15138- }
15139- }
15140- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
15141- r1 = returnFunc(ctx)
15142- } else {
15143- r1 = ret.Error(1)
15144- }
15145- return r0, r1
15146-}
15147-
15148-// MockWebViewFactory_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
15149-type MockWebViewFactory_Create_Call struct {
15150- *mock.Call
15151-}
15152-
15153-// Create is a helper method to define mock.On call
15154-// - ctx context.Context
15155-func (_e *MockWebViewFactory_Expecter) Create(ctx interface{}) *MockWebViewFactory_Create_Call {
15156- return &MockWebViewFactory_Create_Call{Call: _e.mock.On("Create", ctx)}
15157-}
15158-
15159-func (_c *MockWebViewFactory_Create_Call) Run(run func(ctx context.Context)) *MockWebViewFactory_Create_Call {
15160- _c.Call.Run(func(args mock.Arguments) {
15161- var arg0 context.Context
15162- if args[0] != nil {
15163- arg0 = args[0].(context.Context)
15164- }
15165- run(
15166- arg0,
15167- )
15168- })
15169- return _c
15170-}
15171-
15172-func (_c *MockWebViewFactory_Create_Call) Return(webView port.WebView, err error) *MockWebViewFactory_Create_Call {
15173- _c.Call.Return(webView, err)
15174- return _c
15175-}
15176-
15177-func (_c *MockWebViewFactory_Create_Call) RunAndReturn(run func(ctx context.Context) (port.WebView, error)) *MockWebViewFactory_Create_Call {
15178- _c.Call.Return(run)
15179- return _c
15180-}
15181-
15182-// CreateRelated provides a mock function for the type MockWebViewFactory
15183-func (_mock *MockWebViewFactory) CreateRelated(ctx context.Context, parentID port.WebViewID) (port.WebView, error) {
15184- ret := _mock.Called(ctx, parentID)
15185-
15186- if len(ret) == 0 {
15187- panic("no return value specified for CreateRelated")
15188- }
15189-
15190- var r0 port.WebView
15191- var r1 error
15192- if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID) (port.WebView, error)); ok {
15193- return returnFunc(ctx, parentID)
15194- }
15195- if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID) port.WebView); ok {
15196- r0 = returnFunc(ctx, parentID)
15197- } else {
15198- if ret.Get(0) != nil {
15199- r0 = ret.Get(0).(port.WebView)
15200- }
15201- }
15202- if returnFunc, ok := ret.Get(1).(func(context.Context, port.WebViewID) error); ok {
15203- r1 = returnFunc(ctx, parentID)
15204- } else {
15205- r1 = ret.Error(1)
15206- }
15207- return r0, r1
15208-}
15209-
15210-// MockWebViewFactory_CreateRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRelated'
15211-type MockWebViewFactory_CreateRelated_Call struct {
15212- *mock.Call
15213-}
15214-
15215-// CreateRelated is a helper method to define mock.On call
15216-// - ctx context.Context
15217-// - parentID port.WebViewID
15218-func (_e *MockWebViewFactory_Expecter) CreateRelated(ctx interface{}, parentID interface{}) *MockWebViewFactory_CreateRelated_Call {
15219- return &MockWebViewFactory_CreateRelated_Call{Call: _e.mock.On("CreateRelated", ctx, parentID)}
15220-}
15221-
15222-func (_c *MockWebViewFactory_CreateRelated_Call) Run(run func(ctx context.Context, parentID port.WebViewID)) *MockWebViewFactory_CreateRelated_Call {
15223- _c.Call.Run(func(args mock.Arguments) {
15224- var arg0 context.Context
15225- if args[0] != nil {
15226- arg0 = args[0].(context.Context)
15227- }
15228- var arg1 port.WebViewID
15229- if args[1] != nil {
15230- arg1 = args[1].(port.WebViewID)
15231- }
15232- run(
15233- arg0,
15234- arg1,
15235- )
15236- })
15237- return _c
15238-}
15239-
15240-func (_c *MockWebViewFactory_CreateRelated_Call) Return(webView port.WebView, err error) *MockWebViewFactory_CreateRelated_Call {
15241- _c.Call.Return(webView, err)
15242- return _c
15243-}
15244-
15245-func (_c *MockWebViewFactory_CreateRelated_Call) RunAndReturn(run func(ctx context.Context, parentID port.WebViewID) (port.WebView, error)) *MockWebViewFactory_CreateRelated_Call {
15246- _c.Call.Return(run)
15247- return _c
15248-}
15249-
15250-// NewMockDevToolsOpener creates a new instance of MockDevToolsOpener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15251-// The first argument is typically a *testing.T value.
15252-func NewMockDevToolsOpener(t interface {
15253- mock.TestingT
15254- Cleanup(func())
15255-}) *MockDevToolsOpener {
15256- mock := &MockDevToolsOpener{}
15257- mock.Mock.Test(t)
15258-
15259- t.Cleanup(func() { mock.AssertExpectations(t) })
15260-
15261- return mock
15262-}
15263-
15264-// MockDevToolsOpener is an autogenerated mock type for the DevToolsOpener type
15265-type MockDevToolsOpener struct {
15266- mock.Mock
15267-}
15268-
15269-type MockDevToolsOpener_Expecter struct {
15270- mock *mock.Mock
15271-}
15272-
15273-func (_m *MockDevToolsOpener) EXPECT() *MockDevToolsOpener_Expecter {
15274- return &MockDevToolsOpener_Expecter{mock: &_m.Mock}
15275-}
15276-
15277-// OpenDevTools provides a mock function for the type MockDevToolsOpener
15278-func (_mock *MockDevToolsOpener) OpenDevTools() {
15279- _mock.Called()
15280- return
15281-}
15282-
15283-// MockDevToolsOpener_OpenDevTools_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenDevTools'
15284-type MockDevToolsOpener_OpenDevTools_Call struct {
15285- *mock.Call
15286-}
15287-
15288-// OpenDevTools is a helper method to define mock.On call
15289-func (_e *MockDevToolsOpener_Expecter) OpenDevTools() *MockDevToolsOpener_OpenDevTools_Call {
15290- return &MockDevToolsOpener_OpenDevTools_Call{Call: _e.mock.On("OpenDevTools")}
15291-}
15292-
15293-func (_c *MockDevToolsOpener_OpenDevTools_Call) Run(run func()) *MockDevToolsOpener_OpenDevTools_Call {
15294- _c.Call.Run(func(args mock.Arguments) {
15295- run()
15296- })
15297- return _c
15298-}
15299-
15300-func (_c *MockDevToolsOpener_OpenDevTools_Call) Return() *MockDevToolsOpener_OpenDevTools_Call {
15301- _c.Call.Return()
15302- return _c
15303-}
15304-
15305-func (_c *MockDevToolsOpener_OpenDevTools_Call) RunAndReturn(run func()) *MockDevToolsOpener_OpenDevTools_Call {
15306- _c.Run(run)
15307- return _c
15308-}
15309-
15310-// NewMockPrinter creates a new instance of MockPrinter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15311-// The first argument is typically a *testing.T value.
15312-func NewMockPrinter(t interface {
15313- mock.TestingT
15314- Cleanup(func())
15315-}) *MockPrinter {
15316- mock := &MockPrinter{}
15317- mock.Mock.Test(t)
15318-
15319- t.Cleanup(func() { mock.AssertExpectations(t) })
15320-
15321- return mock
15322-}
15323-
15324-// MockPrinter is an autogenerated mock type for the Printer type
15325-type MockPrinter struct {
15326- mock.Mock
15327-}
15328-
15329-type MockPrinter_Expecter struct {
15330- mock *mock.Mock
15331-}
15332-
15333-func (_m *MockPrinter) EXPECT() *MockPrinter_Expecter {
15334- return &MockPrinter_Expecter{mock: &_m.Mock}
15335-}
15336-
15337-// PrintPage provides a mock function for the type MockPrinter
15338-func (_mock *MockPrinter) PrintPage() {
15339- _mock.Called()
15340- return
15341-}
15342-
15343-// MockPrinter_PrintPage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrintPage'
15344-type MockPrinter_PrintPage_Call struct {
15345- *mock.Call
15346-}
15347-
15348-// PrintPage is a helper method to define mock.On call
15349-func (_e *MockPrinter_Expecter) PrintPage() *MockPrinter_PrintPage_Call {
15350- return &MockPrinter_PrintPage_Call{Call: _e.mock.On("PrintPage")}
15351-}
15352-
15353-func (_c *MockPrinter_PrintPage_Call) Run(run func()) *MockPrinter_PrintPage_Call {
15354- _c.Call.Run(func(args mock.Arguments) {
15355- run()
15356- })
15357- return _c
15358-}
15359-
15360-func (_c *MockPrinter_PrintPage_Call) Return() *MockPrinter_PrintPage_Call {
15361- _c.Call.Return()
15362- return _c
15363-}
15364-
15365-func (_c *MockPrinter_PrintPage_Call) RunAndReturn(run func()) *MockPrinter_PrintPage_Call {
15366- _c.Run(run)
15367- return _c
15368-}
15369-
15370-// NewMockPopupLifecycleCapable creates a new instance of MockPopupLifecycleCapable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15371-// The first argument is typically a *testing.T value.
15372-func NewMockPopupLifecycleCapable(t interface {
15373- mock.TestingT
15374- Cleanup(func())
15375-}) *MockPopupLifecycleCapable {
15376- mock := &MockPopupLifecycleCapable{}
15377- mock.Mock.Test(t)
15378-
15379- t.Cleanup(func() { mock.AssertExpectations(t) })
15380-
15381- return mock
15382-}
15383-
15384-// MockPopupLifecycleCapable is an autogenerated mock type for the PopupLifecycleCapable type
15385-type MockPopupLifecycleCapable struct {
15386- mock.Mock
15387-}
15388-
15389-type MockPopupLifecycleCapable_Expecter struct {
15390- mock *mock.Mock
15391-}
15392-
15393-func (_m *MockPopupLifecycleCapable) EXPECT() *MockPopupLifecycleCapable_Expecter {
15394- return &MockPopupLifecycleCapable_Expecter{mock: &_m.Mock}
15395-}
15396-
15397-// PrimePopupNavigation provides a mock function for the type MockPopupLifecycleCapable
15398-func (_mock *MockPopupLifecycleCapable) PrimePopupNavigation(uri string) {
15399- _mock.Called(uri)
15400- return
15401-}
15402-
15403-// MockPopupLifecycleCapable_PrimePopupNavigation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrimePopupNavigation'
15404-type MockPopupLifecycleCapable_PrimePopupNavigation_Call struct {
15405- *mock.Call
15406-}
15407-
15408-// PrimePopupNavigation is a helper method to define mock.On call
15409-// - uri string
15410-func (_e *MockPopupLifecycleCapable_Expecter) PrimePopupNavigation(uri interface{}) *MockPopupLifecycleCapable_PrimePopupNavigation_Call {
15411- return &MockPopupLifecycleCapable_PrimePopupNavigation_Call{Call: _e.mock.On("PrimePopupNavigation", uri)}
15412-}
15413-
15414-func (_c *MockPopupLifecycleCapable_PrimePopupNavigation_Call) Run(run func(uri string)) *MockPopupLifecycleCapable_PrimePopupNavigation_Call {
15415- _c.Call.Run(func(args mock.Arguments) {
15416- var arg0 string
15417- if args[0] != nil {
15418- arg0 = args[0].(string)
15419- }
15420- run(
15421- arg0,
15422- )
15423- })
15424- return _c
15425-}
15426-
15427-func (_c *MockPopupLifecycleCapable_PrimePopupNavigation_Call) Return() *MockPopupLifecycleCapable_PrimePopupNavigation_Call {
15428- _c.Call.Return()
15429- return _c
15430-}
15431-
15432-func (_c *MockPopupLifecycleCapable_PrimePopupNavigation_Call) RunAndReturn(run func(uri string)) *MockPopupLifecycleCapable_PrimePopupNavigation_Call {
15433- _c.Run(run)
15434- return _c
15435-}
15436-
15437-// SetOnClose provides a mock function for the type MockPopupLifecycleCapable
15438-func (_mock *MockPopupLifecycleCapable) SetOnClose(fn func()) {
15439- _mock.Called(fn)
15440- return
15441-}
15442-
15443-// MockPopupLifecycleCapable_SetOnClose_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOnClose'
15444-type MockPopupLifecycleCapable_SetOnClose_Call struct {
15445- *mock.Call
15446-}
15447-
15448-// SetOnClose is a helper method to define mock.On call
15449-// - fn func()
15450-func (_e *MockPopupLifecycleCapable_Expecter) SetOnClose(fn interface{}) *MockPopupLifecycleCapable_SetOnClose_Call {
15451- return &MockPopupLifecycleCapable_SetOnClose_Call{Call: _e.mock.On("SetOnClose", fn)}
15452-}
15453-
15454-func (_c *MockPopupLifecycleCapable_SetOnClose_Call) Run(run func(fn func())) *MockPopupLifecycleCapable_SetOnClose_Call {
15455- _c.Call.Run(func(args mock.Arguments) {
15456- var arg0 func()
15457- if args[0] != nil {
15458- arg0 = args[0].(func())
15459- }
15460- run(
15461- arg0,
15462- )
15463- })
15464- return _c
15465-}
15466-
15467-func (_c *MockPopupLifecycleCapable_SetOnClose_Call) Return() *MockPopupLifecycleCapable_SetOnClose_Call {
15468- _c.Call.Return()
15469- return _c
15470-}
15471-
15472-func (_c *MockPopupLifecycleCapable_SetOnClose_Call) RunAndReturn(run func(fn func())) *MockPopupLifecycleCapable_SetOnClose_Call {
15473- _c.Run(run)
15474- return _c
15475-}
15476-
15477-// SetOnReadyToShow provides a mock function for the type MockPopupLifecycleCapable
15478-func (_mock *MockPopupLifecycleCapable) SetOnReadyToShow(fn func()) {
15479- _mock.Called(fn)
15480- return
15481-}
15482-
15483-// MockPopupLifecycleCapable_SetOnReadyToShow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOnReadyToShow'
15484-type MockPopupLifecycleCapable_SetOnReadyToShow_Call struct {
15485- *mock.Call
15486-}
15487-
15488-// SetOnReadyToShow is a helper method to define mock.On call
15489-// - fn func()
15490-func (_e *MockPopupLifecycleCapable_Expecter) SetOnReadyToShow(fn interface{}) *MockPopupLifecycleCapable_SetOnReadyToShow_Call {
15491- return &MockPopupLifecycleCapable_SetOnReadyToShow_Call{Call: _e.mock.On("SetOnReadyToShow", fn)}
15492-}
15493-
15494-func (_c *MockPopupLifecycleCapable_SetOnReadyToShow_Call) Run(run func(fn func())) *MockPopupLifecycleCapable_SetOnReadyToShow_Call {
15495- _c.Call.Run(func(args mock.Arguments) {
15496- var arg0 func()
15497- if args[0] != nil {
15498- arg0 = args[0].(func())
15499- }
15500- run(
15501- arg0,
15502- )
15503- })
15504- return _c
15505-}
15506-
15507-func (_c *MockPopupLifecycleCapable_SetOnReadyToShow_Call) Return() *MockPopupLifecycleCapable_SetOnReadyToShow_Call {
15508- _c.Call.Return()
15509- return _c
15510-}
15511-
15512-func (_c *MockPopupLifecycleCapable_SetOnReadyToShow_Call) RunAndReturn(run func(fn func())) *MockPopupLifecycleCapable_SetOnReadyToShow_Call {
15513- _c.Run(run)
15514- return _c
15515-}
15516-
15517-// Show provides a mock function for the type MockPopupLifecycleCapable
15518-func (_mock *MockPopupLifecycleCapable) Show() {
15519- _mock.Called()
15520- return
15521-}
15522-
15523-// MockPopupLifecycleCapable_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
15524-type MockPopupLifecycleCapable_Show_Call struct {
15525- *mock.Call
15526-}
15527-
15528-// Show is a helper method to define mock.On call
15529-func (_e *MockPopupLifecycleCapable_Expecter) Show() *MockPopupLifecycleCapable_Show_Call {
15530- return &MockPopupLifecycleCapable_Show_Call{Call: _e.mock.On("Show")}
15531-}
15532-
15533-func (_c *MockPopupLifecycleCapable_Show_Call) Run(run func()) *MockPopupLifecycleCapable_Show_Call {
15534- _c.Call.Run(func(args mock.Arguments) {
15535- run()
15536- })
15537- return _c
15538-}
15539-
15540-func (_c *MockPopupLifecycleCapable_Show_Call) Return() *MockPopupLifecycleCapable_Show_Call {
15541- _c.Call.Return()
15542- return _c
15543-}
15544-
15545-func (_c *MockPopupLifecycleCapable_Show_Call) RunAndReturn(run func()) *MockPopupLifecycleCapable_Show_Call {
15546- _c.Run(run)
15547- return _c
15548-}
15549-
15550-// NewMockPopupOpenerCapable creates a new instance of MockPopupOpenerCapable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15551-// The first argument is typically a *testing.T value.
15552-func NewMockPopupOpenerCapable(t interface {
15553- mock.TestingT
15554- Cleanup(func())
15555-}) *MockPopupOpenerCapable {
15556- mock := &MockPopupOpenerCapable{}
15557- mock.Mock.Test(t)
15558-
15559- t.Cleanup(func() { mock.AssertExpectations(t) })
15560-
15561- return mock
15562-}
15563-
15564-// MockPopupOpenerCapable is an autogenerated mock type for the PopupOpenerCapable type
15565-type MockPopupOpenerCapable struct {
15566- mock.Mock
15567-}
15568-
15569-type MockPopupOpenerCapable_Expecter struct {
15570- mock *mock.Mock
15571-}
15572-
15573-func (_m *MockPopupOpenerCapable) EXPECT() *MockPopupOpenerCapable_Expecter {
15574- return &MockPopupOpenerCapable_Expecter{mock: &_m.Mock}
15575-}
15576-
15577-// AddOpenerMessageCallback provides a mock function for the type MockPopupOpenerCapable
15578-func (_mock *MockPopupOpenerCapable) AddOpenerMessageCallback(fn func()) {
15579- _mock.Called(fn)
15580- return
15581-}
15582-
15583-// MockPopupOpenerCapable_AddOpenerMessageCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddOpenerMessageCallback'
15584-type MockPopupOpenerCapable_AddOpenerMessageCallback_Call struct {
15585- *mock.Call
15586-}
15587-
15588-// AddOpenerMessageCallback is a helper method to define mock.On call
15589-// - fn func()
15590-func (_e *MockPopupOpenerCapable_Expecter) AddOpenerMessageCallback(fn interface{}) *MockPopupOpenerCapable_AddOpenerMessageCallback_Call {
15591- return &MockPopupOpenerCapable_AddOpenerMessageCallback_Call{Call: _e.mock.On("AddOpenerMessageCallback", fn)}
15592-}
15593-
15594-func (_c *MockPopupOpenerCapable_AddOpenerMessageCallback_Call) Run(run func(fn func())) *MockPopupOpenerCapable_AddOpenerMessageCallback_Call {
15595- _c.Call.Run(func(args mock.Arguments) {
15596- var arg0 func()
15597- if args[0] != nil {
15598- arg0 = args[0].(func())
15599- }
15600- run(
15601- arg0,
15602- )
15603- })
15604- return _c
15605-}
15606-
15607-func (_c *MockPopupOpenerCapable_AddOpenerMessageCallback_Call) Return() *MockPopupOpenerCapable_AddOpenerMessageCallback_Call {
15608- _c.Call.Return()
15609- return _c
15610-}
15611-
15612-func (_c *MockPopupOpenerCapable_AddOpenerMessageCallback_Call) RunAndReturn(run func(fn func())) *MockPopupOpenerCapable_AddOpenerMessageCallback_Call {
15613- _c.Run(run)
15614- return _c
15615-}
15616-
15617-// AddOpenerNavigationCallback provides a mock function for the type MockPopupOpenerCapable
15618-func (_mock *MockPopupOpenerCapable) AddOpenerNavigationCallback(fn func(uri string)) {
15619- _mock.Called(fn)
15620- return
15621-}
15622-
15623-// MockPopupOpenerCapable_AddOpenerNavigationCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddOpenerNavigationCallback'
15624-type MockPopupOpenerCapable_AddOpenerNavigationCallback_Call struct {
15625- *mock.Call
15626-}
15627-
15628-// AddOpenerNavigationCallback is a helper method to define mock.On call
15629-// - fn func(uri string)
15630-func (_e *MockPopupOpenerCapable_Expecter) AddOpenerNavigationCallback(fn interface{}) *MockPopupOpenerCapable_AddOpenerNavigationCallback_Call {
15631- return &MockPopupOpenerCapable_AddOpenerNavigationCallback_Call{Call: _e.mock.On("AddOpenerNavigationCallback", fn)}
15632-}
15633-
15634-func (_c *MockPopupOpenerCapable_AddOpenerNavigationCallback_Call) Run(run func(fn func(uri string))) *MockPopupOpenerCapable_AddOpenerNavigationCallback_Call {
15635- _c.Call.Run(func(args mock.Arguments) {
15636- var arg0 func(uri string)
15637- if args[0] != nil {
15638- arg0 = args[0].(func(uri string))
15639- }
15640- run(
15641- arg0,
15642- )
15643- })
15644- return _c
15645-}
15646-
15647-func (_c *MockPopupOpenerCapable_AddOpenerNavigationCallback_Call) Return() *MockPopupOpenerCapable_AddOpenerNavigationCallback_Call {
15648- _c.Call.Return()
15649- return _c
15650-}
15651-
15652-func (_c *MockPopupOpenerCapable_AddOpenerNavigationCallback_Call) RunAndReturn(run func(fn func(uri string))) *MockPopupOpenerCapable_AddOpenerNavigationCallback_Call {
15653- _c.Run(run)
15654- return _c
15655-}
15656-
15657-// EnablePopupOpenerBridge provides a mock function for the type MockPopupOpenerCapable
15658-func (_mock *MockPopupOpenerCapable) EnablePopupOpenerBridge(parent port.WebView, noJavaScriptAccess bool) {
15659- _mock.Called(parent, noJavaScriptAccess)
15660- return
15661-}
15662-
15663-// MockPopupOpenerCapable_EnablePopupOpenerBridge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnablePopupOpenerBridge'
15664-type MockPopupOpenerCapable_EnablePopupOpenerBridge_Call struct {
15665- *mock.Call
15666-}
15667-
15668-// EnablePopupOpenerBridge is a helper method to define mock.On call
15669-// - parent port.WebView
15670-// - noJavaScriptAccess bool
15671-func (_e *MockPopupOpenerCapable_Expecter) EnablePopupOpenerBridge(parent interface{}, noJavaScriptAccess interface{}) *MockPopupOpenerCapable_EnablePopupOpenerBridge_Call {
15672- return &MockPopupOpenerCapable_EnablePopupOpenerBridge_Call{Call: _e.mock.On("EnablePopupOpenerBridge", parent, noJavaScriptAccess)}
15673-}
15674-
15675-func (_c *MockPopupOpenerCapable_EnablePopupOpenerBridge_Call) Run(run func(parent port.WebView, noJavaScriptAccess bool)) *MockPopupOpenerCapable_EnablePopupOpenerBridge_Call {
15676- _c.Call.Run(func(args mock.Arguments) {
15677- var arg0 port.WebView
15678- if args[0] != nil {
15679- arg0 = args[0].(port.WebView)
15680- }
15681- var arg1 bool
15682- if args[1] != nil {
15683- arg1 = args[1].(bool)
15684- }
15685- run(
15686- arg0,
15687- arg1,
15688- )
15689- })
15690- return _c
15691-}
15692-
15693-func (_c *MockPopupOpenerCapable_EnablePopupOpenerBridge_Call) Return() *MockPopupOpenerCapable_EnablePopupOpenerBridge_Call {
15694- _c.Call.Return()
15695- return _c
15696-}
15697-
15698-func (_c *MockPopupOpenerCapable_EnablePopupOpenerBridge_Call) RunAndReturn(run func(parent port.WebView, noJavaScriptAccess bool)) *MockPopupOpenerCapable_EnablePopupOpenerBridge_Call {
15699- _c.Run(run)
15700- return _c
15701-}
15702-
15703-// HasActivePopupOpenerBridge provides a mock function for the type MockPopupOpenerCapable
15704-func (_mock *MockPopupOpenerCapable) HasActivePopupOpenerBridge() bool {
15705- ret := _mock.Called()
15706-
15707- if len(ret) == 0 {
15708- panic("no return value specified for HasActivePopupOpenerBridge")
15709- }
15710-
15711- var r0 bool
15712- if returnFunc, ok := ret.Get(0).(func() bool); ok {
15713- r0 = returnFunc()
15714- } else {
15715- r0 = ret.Get(0).(bool)
15716- }
15717- return r0
15718-}
15719-
15720-// MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasActivePopupOpenerBridge'
15721-type MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call struct {
15722- *mock.Call
15723-}
15724-
15725-// HasActivePopupOpenerBridge is a helper method to define mock.On call
15726-func (_e *MockPopupOpenerCapable_Expecter) HasActivePopupOpenerBridge() *MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call {
15727- return &MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call{Call: _e.mock.On("HasActivePopupOpenerBridge")}
15728-}
15729-
15730-func (_c *MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call) Run(run func()) *MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call {
15731- _c.Call.Run(func(args mock.Arguments) {
15732- run()
15733- })
15734- return _c
15735-}
15736-
15737-func (_c *MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call) Return(b bool) *MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call {
15738- _c.Call.Return(b)
15739- return _c
15740-}
15741-
15742-func (_c *MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call) RunAndReturn(run func() bool) *MockPopupOpenerCapable_HasActivePopupOpenerBridge_Call {
15743- _c.Call.Return(run)
15744- return _c
15745-}
15746-
15747-// NewMockOAuthCallbackCapable creates a new instance of MockOAuthCallbackCapable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15748-// The first argument is typically a *testing.T value.
15749-func NewMockOAuthCallbackCapable(t interface {
15750- mock.TestingT
15751- Cleanup(func())
15752-}) *MockOAuthCallbackCapable {
15753- mock := &MockOAuthCallbackCapable{}
15754- mock.Mock.Test(t)
15755-
15756- t.Cleanup(func() { mock.AssertExpectations(t) })
15757-
15758- return mock
15759-}
15760-
15761-// MockOAuthCallbackCapable is an autogenerated mock type for the OAuthCallbackCapable type
15762-type MockOAuthCallbackCapable struct {
15763- mock.Mock
15764-}
15765-
15766-type MockOAuthCallbackCapable_Expecter struct {
15767- mock *mock.Mock
15768-}
15769-
15770-func (_m *MockOAuthCallbackCapable) EXPECT() *MockOAuthCallbackCapable_Expecter {
15771- return &MockOAuthCallbackCapable_Expecter{mock: &_m.Mock}
15772-}
15773-
15774-// AddCloseCallback provides a mock function for the type MockOAuthCallbackCapable
15775-func (_mock *MockOAuthCallbackCapable) AddCloseCallback(fn func()) {
15776- _mock.Called(fn)
15777- return
15778-}
15779-
15780-// MockOAuthCallbackCapable_AddCloseCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCloseCallback'
15781-type MockOAuthCallbackCapable_AddCloseCallback_Call struct {
15782- *mock.Call
15783-}
15784-
15785-// AddCloseCallback is a helper method to define mock.On call
15786-// - fn func()
15787-func (_e *MockOAuthCallbackCapable_Expecter) AddCloseCallback(fn interface{}) *MockOAuthCallbackCapable_AddCloseCallback_Call {
15788- return &MockOAuthCallbackCapable_AddCloseCallback_Call{Call: _e.mock.On("AddCloseCallback", fn)}
15789-}
15790-
15791-func (_c *MockOAuthCallbackCapable_AddCloseCallback_Call) Run(run func(fn func())) *MockOAuthCallbackCapable_AddCloseCallback_Call {
15792- _c.Call.Run(func(args mock.Arguments) {
15793- var arg0 func()
15794- if args[0] != nil {
15795- arg0 = args[0].(func())
15796- }
15797- run(
15798- arg0,
15799- )
15800- })
15801- return _c
15802-}
15803-
15804-func (_c *MockOAuthCallbackCapable_AddCloseCallback_Call) Return() *MockOAuthCallbackCapable_AddCloseCallback_Call {
15805- _c.Call.Return()
15806- return _c
15807-}
15808-
15809-func (_c *MockOAuthCallbackCapable_AddCloseCallback_Call) RunAndReturn(run func(fn func())) *MockOAuthCallbackCapable_AddCloseCallback_Call {
15810- _c.Run(run)
15811- return _c
15812-}
15813-
15814-// AddNavigationCallback provides a mock function for the type MockOAuthCallbackCapable
15815-func (_mock *MockOAuthCallbackCapable) AddNavigationCallback(fn func(uri string)) {
15816- _mock.Called(fn)
15817- return
15818-}
15819-
15820-// MockOAuthCallbackCapable_AddNavigationCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNavigationCallback'
15821-type MockOAuthCallbackCapable_AddNavigationCallback_Call struct {
15822- *mock.Call
15823-}
15824-
15825-// AddNavigationCallback is a helper method to define mock.On call
15826-// - fn func(uri string)
15827-func (_e *MockOAuthCallbackCapable_Expecter) AddNavigationCallback(fn interface{}) *MockOAuthCallbackCapable_AddNavigationCallback_Call {
15828- return &MockOAuthCallbackCapable_AddNavigationCallback_Call{Call: _e.mock.On("AddNavigationCallback", fn)}
15829-}
15830-
15831-func (_c *MockOAuthCallbackCapable_AddNavigationCallback_Call) Run(run func(fn func(uri string))) *MockOAuthCallbackCapable_AddNavigationCallback_Call {
15832- _c.Call.Run(func(args mock.Arguments) {
15833- var arg0 func(uri string)
15834- if args[0] != nil {
15835- arg0 = args[0].(func(uri string))
15836- }
15837- run(
15838- arg0,
15839- )
15840- })
15841- return _c
15842-}
15843-
15844-func (_c *MockOAuthCallbackCapable_AddNavigationCallback_Call) Return() *MockOAuthCallbackCapable_AddNavigationCallback_Call {
15845- _c.Call.Return()
15846- return _c
15847-}
15848-
15849-func (_c *MockOAuthCallbackCapable_AddNavigationCallback_Call) RunAndReturn(run func(fn func(uri string))) *MockOAuthCallbackCapable_AddNavigationCallback_Call {
15850- _c.Run(run)
15851- return _c
15852-}
15853-
15854-// Close provides a mock function for the type MockOAuthCallbackCapable
15855-func (_mock *MockOAuthCallbackCapable) Close() {
15856- _mock.Called()
15857- return
15858-}
15859-
15860-// MockOAuthCallbackCapable_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
15861-type MockOAuthCallbackCapable_Close_Call struct {
15862- *mock.Call
15863-}
15864-
15865-// Close is a helper method to define mock.On call
15866-func (_e *MockOAuthCallbackCapable_Expecter) Close() *MockOAuthCallbackCapable_Close_Call {
15867- return &MockOAuthCallbackCapable_Close_Call{Call: _e.mock.On("Close")}
15868-}
15869-
15870-func (_c *MockOAuthCallbackCapable_Close_Call) Run(run func()) *MockOAuthCallbackCapable_Close_Call {
15871- _c.Call.Run(func(args mock.Arguments) {
15872- run()
15873- })
15874- return _c
15875-}
15876-
15877-func (_c *MockOAuthCallbackCapable_Close_Call) Return() *MockOAuthCallbackCapable_Close_Call {
15878- _c.Call.Return()
15879- return _c
15880-}
15881-
15882-func (_c *MockOAuthCallbackCapable_Close_Call) RunAndReturn(run func()) *MockOAuthCallbackCapable_Close_Call {
15883- _c.Run(run)
15884- return _c
15885-}
15886-
15887-// NewMockTextInputTargetProvider creates a new instance of MockTextInputTargetProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15888-// The first argument is typically a *testing.T value.
15889-func NewMockTextInputTargetProvider(t interface {
15890- mock.TestingT
15891- Cleanup(func())
15892-}) *MockTextInputTargetProvider {
15893- mock := &MockTextInputTargetProvider{}
15894- mock.Mock.Test(t)
15895-
15896- t.Cleanup(func() { mock.AssertExpectations(t) })
15897-
15898- return mock
15899-}
15900-
15901-// MockTextInputTargetProvider is an autogenerated mock type for the TextInputTargetProvider type
15902-type MockTextInputTargetProvider struct {
15903- mock.Mock
15904-}
15905-
15906-type MockTextInputTargetProvider_Expecter struct {
15907- mock *mock.Mock
15908-}
15909-
15910-func (_m *MockTextInputTargetProvider) EXPECT() *MockTextInputTargetProvider_Expecter {
15911- return &MockTextInputTargetProvider_Expecter{mock: &_m.Mock}
15912-}
15913-
15914-// TextInputTarget provides a mock function for the type MockTextInputTargetProvider
15915-func (_mock *MockTextInputTargetProvider) TextInputTarget() port.TextInputTarget {
15916- ret := _mock.Called()
15917-
15918- if len(ret) == 0 {
15919- panic("no return value specified for TextInputTarget")
15920- }
15921-
15922- var r0 port.TextInputTarget
15923- if returnFunc, ok := ret.Get(0).(func() port.TextInputTarget); ok {
15924- r0 = returnFunc()
15925- } else {
15926- if ret.Get(0) != nil {
15927- r0 = ret.Get(0).(port.TextInputTarget)
15928- }
15929- }
15930- return r0
15931-}
15932-
15933-// MockTextInputTargetProvider_TextInputTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TextInputTarget'
15934-type MockTextInputTargetProvider_TextInputTarget_Call struct {
15935- *mock.Call
15936-}
15937-
15938-// TextInputTarget is a helper method to define mock.On call
15939-func (_e *MockTextInputTargetProvider_Expecter) TextInputTarget() *MockTextInputTargetProvider_TextInputTarget_Call {
15940- return &MockTextInputTargetProvider_TextInputTarget_Call{Call: _e.mock.On("TextInputTarget")}
15941-}
15942-
15943-func (_c *MockTextInputTargetProvider_TextInputTarget_Call) Run(run func()) *MockTextInputTargetProvider_TextInputTarget_Call {
15944- _c.Call.Run(func(args mock.Arguments) {
15945- run()
15946- })
15947- return _c
15948-}
15949-
15950-func (_c *MockTextInputTargetProvider_TextInputTarget_Call) Return(textInputTarget port.TextInputTarget) *MockTextInputTargetProvider_TextInputTarget_Call {
15951- _c.Call.Return(textInputTarget)
15952- return _c
15953-}
15954-
15955-func (_c *MockTextInputTargetProvider_TextInputTarget_Call) RunAndReturn(run func() port.TextInputTarget) *MockTextInputTargetProvider_TextInputTarget_Call {
15956- _c.Call.Return(run)
15957- return _c
15958-}
15959-
15960-// NewMockXDGPaths creates a new instance of MockXDGPaths. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15961-// The first argument is typically a *testing.T value.
15962-func NewMockXDGPaths(t interface {
15963- mock.TestingT
15964- Cleanup(func())
15965-}) *MockXDGPaths {
15966- mock := &MockXDGPaths{}
15967- mock.Mock.Test(t)
15968-
15969- t.Cleanup(func() { mock.AssertExpectations(t) })
15970-
15971- return mock
15972-}
15973-
15974-// MockXDGPaths is an autogenerated mock type for the XDGPaths type
15975-type MockXDGPaths struct {
15976- mock.Mock
15977-}
15978-
15979-type MockXDGPaths_Expecter struct {
15980- mock *mock.Mock
15981-}
15982-
15983-func (_m *MockXDGPaths) EXPECT() *MockXDGPaths_Expecter {
15984- return &MockXDGPaths_Expecter{mock: &_m.Mock}
15985-}
15986-
15987-// CacheDir provides a mock function for the type MockXDGPaths
15988-func (_mock *MockXDGPaths) CacheDir() (string, error) {
15989- ret := _mock.Called()
15990-
15991- if len(ret) == 0 {
15992- panic("no return value specified for CacheDir")
15993- }
15994-
15995- var r0 string
15996- var r1 error
15997- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
15998- return returnFunc()
15999- }
16000- if returnFunc, ok := ret.Get(0).(func() string); ok {
16001- r0 = returnFunc()
16002- } else {
16003- r0 = ret.Get(0).(string)
16004- }
16005- if returnFunc, ok := ret.Get(1).(func() error); ok {
16006- r1 = returnFunc()
16007- } else {
16008- r1 = ret.Error(1)
16009- }
16010- return r0, r1
16011-}
16012-
16013-// MockXDGPaths_CacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CacheDir'
16014-type MockXDGPaths_CacheDir_Call struct {
16015- *mock.Call
16016-}
16017-
16018-// CacheDir is a helper method to define mock.On call
16019-func (_e *MockXDGPaths_Expecter) CacheDir() *MockXDGPaths_CacheDir_Call {
16020- return &MockXDGPaths_CacheDir_Call{Call: _e.mock.On("CacheDir")}
16021-}
16022-
16023-func (_c *MockXDGPaths_CacheDir_Call) Run(run func()) *MockXDGPaths_CacheDir_Call {
16024- _c.Call.Run(func(args mock.Arguments) {
16025- run()
16026- })
16027- return _c
16028-}
16029-
16030-func (_c *MockXDGPaths_CacheDir_Call) Return(s string, err error) *MockXDGPaths_CacheDir_Call {
16031- _c.Call.Return(s, err)
16032- return _c
16033-}
16034-
16035-func (_c *MockXDGPaths_CacheDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_CacheDir_Call {
16036- _c.Call.Return(run)
16037- return _c
16038-}
16039-
16040-// ConfigDir provides a mock function for the type MockXDGPaths
16041-func (_mock *MockXDGPaths) ConfigDir() (string, error) {
16042- ret := _mock.Called()
16043-
16044- if len(ret) == 0 {
16045- panic("no return value specified for ConfigDir")
16046- }
16047-
16048- var r0 string
16049- var r1 error
16050- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16051- return returnFunc()
16052- }
16053- if returnFunc, ok := ret.Get(0).(func() string); ok {
16054- r0 = returnFunc()
16055- } else {
16056- r0 = ret.Get(0).(string)
16057- }
16058- if returnFunc, ok := ret.Get(1).(func() error); ok {
16059- r1 = returnFunc()
16060- } else {
16061- r1 = ret.Error(1)
16062- }
16063- return r0, r1
16064-}
16065-
16066-// MockXDGPaths_ConfigDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigDir'
16067-type MockXDGPaths_ConfigDir_Call struct {
16068- *mock.Call
16069-}
16070-
16071-// ConfigDir is a helper method to define mock.On call
16072-func (_e *MockXDGPaths_Expecter) ConfigDir() *MockXDGPaths_ConfigDir_Call {
16073- return &MockXDGPaths_ConfigDir_Call{Call: _e.mock.On("ConfigDir")}
16074-}
16075-
16076-func (_c *MockXDGPaths_ConfigDir_Call) Run(run func()) *MockXDGPaths_ConfigDir_Call {
16077- _c.Call.Run(func(args mock.Arguments) {
16078- run()
16079- })
16080- return _c
16081-}
16082-
16083-func (_c *MockXDGPaths_ConfigDir_Call) Return(s string, err error) *MockXDGPaths_ConfigDir_Call {
16084- _c.Call.Return(s, err)
16085- return _c
16086-}
16087-
16088-func (_c *MockXDGPaths_ConfigDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_ConfigDir_Call {
16089- _c.Call.Return(run)
16090- return _c
16091-}
16092-
16093-// DataDir provides a mock function for the type MockXDGPaths
16094-func (_mock *MockXDGPaths) DataDir() (string, error) {
16095- ret := _mock.Called()
16096-
16097- if len(ret) == 0 {
16098- panic("no return value specified for DataDir")
16099- }
16100-
16101- var r0 string
16102- var r1 error
16103- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16104- return returnFunc()
16105- }
16106- if returnFunc, ok := ret.Get(0).(func() string); ok {
16107- r0 = returnFunc()
16108- } else {
16109- r0 = ret.Get(0).(string)
16110- }
16111- if returnFunc, ok := ret.Get(1).(func() error); ok {
16112- r1 = returnFunc()
16113- } else {
16114- r1 = ret.Error(1)
16115- }
16116- return r0, r1
16117-}
16118-
16119-// MockXDGPaths_DataDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DataDir'
16120-type MockXDGPaths_DataDir_Call struct {
16121- *mock.Call
16122-}
16123-
16124-// DataDir is a helper method to define mock.On call
16125-func (_e *MockXDGPaths_Expecter) DataDir() *MockXDGPaths_DataDir_Call {
16126- return &MockXDGPaths_DataDir_Call{Call: _e.mock.On("DataDir")}
16127-}
16128-
16129-func (_c *MockXDGPaths_DataDir_Call) Run(run func()) *MockXDGPaths_DataDir_Call {
16130- _c.Call.Run(func(args mock.Arguments) {
16131- run()
16132- })
16133- return _c
16134-}
16135-
16136-func (_c *MockXDGPaths_DataDir_Call) Return(s string, err error) *MockXDGPaths_DataDir_Call {
16137- _c.Call.Return(s, err)
16138- return _c
16139-}
16140-
16141-func (_c *MockXDGPaths_DataDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_DataDir_Call {
16142- _c.Call.Return(run)
16143- return _c
16144-}
16145-
16146-// DownloadDir provides a mock function for the type MockXDGPaths
16147-func (_mock *MockXDGPaths) DownloadDir() (string, error) {
16148- ret := _mock.Called()
16149-
16150- if len(ret) == 0 {
16151- panic("no return value specified for DownloadDir")
16152- }
16153-
16154- var r0 string
16155- var r1 error
16156- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16157- return returnFunc()
16158- }
16159- if returnFunc, ok := ret.Get(0).(func() string); ok {
16160- r0 = returnFunc()
16161- } else {
16162- r0 = ret.Get(0).(string)
16163- }
16164- if returnFunc, ok := ret.Get(1).(func() error); ok {
16165- r1 = returnFunc()
16166- } else {
16167- r1 = ret.Error(1)
16168- }
16169- return r0, r1
16170-}
16171-
16172-// MockXDGPaths_DownloadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DownloadDir'
16173-type MockXDGPaths_DownloadDir_Call struct {
16174- *mock.Call
16175-}
16176-
16177-// DownloadDir is a helper method to define mock.On call
16178-func (_e *MockXDGPaths_Expecter) DownloadDir() *MockXDGPaths_DownloadDir_Call {
16179- return &MockXDGPaths_DownloadDir_Call{Call: _e.mock.On("DownloadDir")}
16180-}
16181-
16182-func (_c *MockXDGPaths_DownloadDir_Call) Run(run func()) *MockXDGPaths_DownloadDir_Call {
16183- _c.Call.Run(func(args mock.Arguments) {
16184- run()
16185- })
16186- return _c
16187-}
16188-
16189-func (_c *MockXDGPaths_DownloadDir_Call) Return(s string, err error) *MockXDGPaths_DownloadDir_Call {
16190- _c.Call.Return(s, err)
16191- return _c
16192-}
16193-
16194-func (_c *MockXDGPaths_DownloadDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_DownloadDir_Call {
16195- _c.Call.Return(run)
16196- return _c
16197-}
16198-
16199-// FilterCacheDir provides a mock function for the type MockXDGPaths
16200-func (_mock *MockXDGPaths) FilterCacheDir() (string, error) {
16201- ret := _mock.Called()
16202-
16203- if len(ret) == 0 {
16204- panic("no return value specified for FilterCacheDir")
16205- }
16206-
16207- var r0 string
16208- var r1 error
16209- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16210- return returnFunc()
16211- }
16212- if returnFunc, ok := ret.Get(0).(func() string); ok {
16213- r0 = returnFunc()
16214- } else {
16215- r0 = ret.Get(0).(string)
16216- }
16217- if returnFunc, ok := ret.Get(1).(func() error); ok {
16218- r1 = returnFunc()
16219- } else {
16220- r1 = ret.Error(1)
16221- }
16222- return r0, r1
16223-}
16224-
16225-// MockXDGPaths_FilterCacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterCacheDir'
16226-type MockXDGPaths_FilterCacheDir_Call struct {
16227- *mock.Call
16228-}
16229-
16230-// FilterCacheDir is a helper method to define mock.On call
16231-func (_e *MockXDGPaths_Expecter) FilterCacheDir() *MockXDGPaths_FilterCacheDir_Call {
16232- return &MockXDGPaths_FilterCacheDir_Call{Call: _e.mock.On("FilterCacheDir")}
16233-}
16234-
16235-func (_c *MockXDGPaths_FilterCacheDir_Call) Run(run func()) *MockXDGPaths_FilterCacheDir_Call {
16236- _c.Call.Run(func(args mock.Arguments) {
16237- run()
16238- })
16239- return _c
16240-}
16241-
16242-func (_c *MockXDGPaths_FilterCacheDir_Call) Return(s string, err error) *MockXDGPaths_FilterCacheDir_Call {
16243- _c.Call.Return(s, err)
16244- return _c
16245-}
16246-
16247-func (_c *MockXDGPaths_FilterCacheDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterCacheDir_Call {
16248- _c.Call.Return(run)
16249- return _c
16250-}
16251-
16252-// FilterJSONDir provides a mock function for the type MockXDGPaths
16253-func (_mock *MockXDGPaths) FilterJSONDir() (string, error) {
16254- ret := _mock.Called()
16255-
16256- if len(ret) == 0 {
16257- panic("no return value specified for FilterJSONDir")
16258- }
16259-
16260- var r0 string
16261- var r1 error
16262- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16263- return returnFunc()
16264- }
16265- if returnFunc, ok := ret.Get(0).(func() string); ok {
16266- r0 = returnFunc()
16267- } else {
16268- r0 = ret.Get(0).(string)
16269- }
16270- if returnFunc, ok := ret.Get(1).(func() error); ok {
16271- r1 = returnFunc()
16272- } else {
16273- r1 = ret.Error(1)
16274- }
16275- return r0, r1
16276-}
16277-
16278-// MockXDGPaths_FilterJSONDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterJSONDir'
16279-type MockXDGPaths_FilterJSONDir_Call struct {
16280- *mock.Call
16281-}
16282-
16283-// FilterJSONDir is a helper method to define mock.On call
16284-func (_e *MockXDGPaths_Expecter) FilterJSONDir() *MockXDGPaths_FilterJSONDir_Call {
16285- return &MockXDGPaths_FilterJSONDir_Call{Call: _e.mock.On("FilterJSONDir")}
16286-}
16287-
16288-func (_c *MockXDGPaths_FilterJSONDir_Call) Run(run func()) *MockXDGPaths_FilterJSONDir_Call {
16289- _c.Call.Run(func(args mock.Arguments) {
16290- run()
16291- })
16292- return _c
16293-}
16294-
16295-func (_c *MockXDGPaths_FilterJSONDir_Call) Return(s string, err error) *MockXDGPaths_FilterJSONDir_Call {
16296- _c.Call.Return(s, err)
16297- return _c
16298-}
16299-
16300-func (_c *MockXDGPaths_FilterJSONDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterJSONDir_Call {
16301- _c.Call.Return(run)
16302- return _c
16303-}
16304-
16305-// FilterStoreDir provides a mock function for the type MockXDGPaths
16306-func (_mock *MockXDGPaths) FilterStoreDir() (string, error) {
16307- ret := _mock.Called()
16308-
16309- if len(ret) == 0 {
16310- panic("no return value specified for FilterStoreDir")
16311- }
16312-
16313- var r0 string
16314- var r1 error
16315- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16316- return returnFunc()
16317- }
16318- if returnFunc, ok := ret.Get(0).(func() string); ok {
16319- r0 = returnFunc()
16320- } else {
16321- r0 = ret.Get(0).(string)
16322- }
16323- if returnFunc, ok := ret.Get(1).(func() error); ok {
16324- r1 = returnFunc()
16325- } else {
16326- r1 = ret.Error(1)
16327- }
16328- return r0, r1
16329-}
16330-
16331-// MockXDGPaths_FilterStoreDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterStoreDir'
16332-type MockXDGPaths_FilterStoreDir_Call struct {
16333- *mock.Call
16334-}
16335-
16336-// FilterStoreDir is a helper method to define mock.On call
16337-func (_e *MockXDGPaths_Expecter) FilterStoreDir() *MockXDGPaths_FilterStoreDir_Call {
16338- return &MockXDGPaths_FilterStoreDir_Call{Call: _e.mock.On("FilterStoreDir")}
16339-}
16340-
16341-func (_c *MockXDGPaths_FilterStoreDir_Call) Run(run func()) *MockXDGPaths_FilterStoreDir_Call {
16342- _c.Call.Run(func(args mock.Arguments) {
16343- run()
16344- })
16345- return _c
16346-}
16347-
16348-func (_c *MockXDGPaths_FilterStoreDir_Call) Return(s string, err error) *MockXDGPaths_FilterStoreDir_Call {
16349- _c.Call.Return(s, err)
16350- return _c
16351-}
16352-
16353-func (_c *MockXDGPaths_FilterStoreDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterStoreDir_Call {
16354- _c.Call.Return(run)
16355- return _c
16356-}
16357-
16358-// ManDir provides a mock function for the type MockXDGPaths
16359-func (_mock *MockXDGPaths) ManDir() (string, error) {
16360- ret := _mock.Called()
16361-
16362- if len(ret) == 0 {
16363- panic("no return value specified for ManDir")
16364- }
16365-
16366- var r0 string
16367- var r1 error
16368- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16369- return returnFunc()
16370- }
16371- if returnFunc, ok := ret.Get(0).(func() string); ok {
16372- r0 = returnFunc()
16373- } else {
16374- r0 = ret.Get(0).(string)
16375- }
16376- if returnFunc, ok := ret.Get(1).(func() error); ok {
16377- r1 = returnFunc()
16378- } else {
16379- r1 = ret.Error(1)
16380- }
16381- return r0, r1
16382-}
16383-
16384-// MockXDGPaths_ManDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ManDir'
16385-type MockXDGPaths_ManDir_Call struct {
16386- *mock.Call
16387-}
16388-
16389-// ManDir is a helper method to define mock.On call
16390-func (_e *MockXDGPaths_Expecter) ManDir() *MockXDGPaths_ManDir_Call {
16391- return &MockXDGPaths_ManDir_Call{Call: _e.mock.On("ManDir")}
16392-}
16393-
16394-func (_c *MockXDGPaths_ManDir_Call) Run(run func()) *MockXDGPaths_ManDir_Call {
16395- _c.Call.Run(func(args mock.Arguments) {
16396- run()
16397- })
16398- return _c
16399-}
16400-
16401-func (_c *MockXDGPaths_ManDir_Call) Return(s string, err error) *MockXDGPaths_ManDir_Call {
16402- _c.Call.Return(s, err)
16403- return _c
16404-}
16405-
16406-func (_c *MockXDGPaths_ManDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_ManDir_Call {
16407- _c.Call.Return(run)
16408- return _c
16409-}
16410-
16411-// RuntimeDir provides a mock function for the type MockXDGPaths
16412-func (_mock *MockXDGPaths) RuntimeDir() (string, error) {
16413- ret := _mock.Called()
16414-
16415- if len(ret) == 0 {
16416- panic("no return value specified for RuntimeDir")
16417- }
16418-
16419- var r0 string
16420- var r1 error
16421- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16422- return returnFunc()
16423- }
16424- if returnFunc, ok := ret.Get(0).(func() string); ok {
16425- r0 = returnFunc()
16426- } else {
16427- r0 = ret.Get(0).(string)
16428- }
16429- if returnFunc, ok := ret.Get(1).(func() error); ok {
16430- r1 = returnFunc()
16431- } else {
16432- r1 = ret.Error(1)
16433- }
16434- return r0, r1
16435-}
16436-
16437-// MockXDGPaths_RuntimeDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RuntimeDir'
16438-type MockXDGPaths_RuntimeDir_Call struct {
16439- *mock.Call
16440-}
16441-
16442-// RuntimeDir is a helper method to define mock.On call
16443-func (_e *MockXDGPaths_Expecter) RuntimeDir() *MockXDGPaths_RuntimeDir_Call {
16444- return &MockXDGPaths_RuntimeDir_Call{Call: _e.mock.On("RuntimeDir")}
16445-}
16446-
16447-func (_c *MockXDGPaths_RuntimeDir_Call) Run(run func()) *MockXDGPaths_RuntimeDir_Call {
16448- _c.Call.Run(func(args mock.Arguments) {
16449- run()
16450- })
16451- return _c
16452-}
16453-
16454-func (_c *MockXDGPaths_RuntimeDir_Call) Return(s string, err error) *MockXDGPaths_RuntimeDir_Call {
16455- _c.Call.Return(s, err)
16456- return _c
16457-}
16458-
16459-func (_c *MockXDGPaths_RuntimeDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_RuntimeDir_Call {
16460- _c.Call.Return(run)
16461- return _c
16462-}
16463-
16464-// StateDir provides a mock function for the type MockXDGPaths
16465-func (_mock *MockXDGPaths) StateDir() (string, error) {
16466- ret := _mock.Called()
16467-
16468- if len(ret) == 0 {
16469- panic("no return value specified for StateDir")
16470- }
16471-
16472- var r0 string
16473- var r1 error
16474- if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
16475- return returnFunc()
16476- }
16477- if returnFunc, ok := ret.Get(0).(func() string); ok {
16478- r0 = returnFunc()
16479- } else {
16480- r0 = ret.Get(0).(string)
16481- }
16482- if returnFunc, ok := ret.Get(1).(func() error); ok {
16483- r1 = returnFunc()
16484- } else {
16485- r1 = ret.Error(1)
16486- }
16487- return r0, r1
16488-}
16489-
16490-// MockXDGPaths_StateDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateDir'
16491-type MockXDGPaths_StateDir_Call struct {
16492- *mock.Call
16493-}
16494-
16495-// StateDir is a helper method to define mock.On call
16496-func (_e *MockXDGPaths_Expecter) StateDir() *MockXDGPaths_StateDir_Call {
16497- return &MockXDGPaths_StateDir_Call{Call: _e.mock.On("StateDir")}
16498-}
16499-
16500-func (_c *MockXDGPaths_StateDir_Call) Run(run func()) *MockXDGPaths_StateDir_Call {
16501- _c.Call.Run(func(args mock.Arguments) {
16502- run()
16503- })
16504- return _c
16505-}
16506-
16507-func (_c *MockXDGPaths_StateDir_Call) Return(s string, err error) *MockXDGPaths_StateDir_Call {
16508- _c.Call.Return(s, err)
16509- return _c
16510-}
16511-
16512-func (_c *MockXDGPaths_StateDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_StateDir_Call {
16513- _c.Call.Return(run)
16514- return _c
16515-}
A internal/application/port/mocks/notification.go +251 -0
@@ -0,0 +1,251 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockNotification creates a new instance of MockNotification. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockNotification(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockNotification {
20+ mock := &MockNotification{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockNotification is an autogenerated mock type for the Notification type
29+type MockNotification struct {
30+ mock.Mock
31+}
32+
33+type MockNotification_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockNotification) EXPECT() *MockNotification_Expecter {
38+ return &MockNotification_Expecter{mock: &_m.Mock}
39+}
40+
41+// Clear provides a mock function for the type MockNotification
42+func (_mock *MockNotification) Clear(ctx context.Context) {
43+ _mock.Called(ctx)
44+ return
45+}
46+
47+// MockNotification_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
48+type MockNotification_Clear_Call struct {
49+ *mock.Call
50+}
51+
52+// Clear is a helper method to define mock.On call
53+// - ctx context.Context
54+func (_e *MockNotification_Expecter) Clear(ctx any) *MockNotification_Clear_Call {
55+ return &MockNotification_Clear_Call{Call: _e.mock.On("Clear", ctx)}
56+}
57+
58+func (_c *MockNotification_Clear_Call) Run(run func(ctx context.Context)) *MockNotification_Clear_Call {
59+ _c.Call.Run(func(args mock.Arguments) {
60+ var arg0 context.Context
61+ if args[0] != nil {
62+ arg0 = args[0].(context.Context)
63+ }
64+ run(
65+ arg0,
66+ )
67+ })
68+ return _c
69+}
70+
71+func (_c *MockNotification_Clear_Call) Return() *MockNotification_Clear_Call {
72+ _c.Call.Return()
73+ return _c
74+}
75+
76+func (_c *MockNotification_Clear_Call) RunAndReturn(run func(ctx context.Context)) *MockNotification_Clear_Call {
77+ _c.Run(run)
78+ return _c
79+}
80+
81+// Dismiss provides a mock function for the type MockNotification
82+func (_mock *MockNotification) Dismiss(ctx context.Context, id port.NotificationID) {
83+ _mock.Called(ctx, id)
84+ return
85+}
86+
87+// MockNotification_Dismiss_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dismiss'
88+type MockNotification_Dismiss_Call struct {
89+ *mock.Call
90+}
91+
92+// Dismiss is a helper method to define mock.On call
93+// - ctx context.Context
94+// - id port.NotificationID
95+func (_e *MockNotification_Expecter) Dismiss(ctx any, id any) *MockNotification_Dismiss_Call {
96+ return &MockNotification_Dismiss_Call{Call: _e.mock.On("Dismiss", ctx, id)}
97+}
98+
99+func (_c *MockNotification_Dismiss_Call) Run(run func(ctx context.Context, id port.NotificationID)) *MockNotification_Dismiss_Call {
100+ _c.Call.Run(func(args mock.Arguments) {
101+ var arg0 context.Context
102+ if args[0] != nil {
103+ arg0 = args[0].(context.Context)
104+ }
105+ var arg1 port.NotificationID
106+ if args[1] != nil {
107+ arg1 = args[1].(port.NotificationID)
108+ }
109+ run(
110+ arg0,
111+ arg1,
112+ )
113+ })
114+ return _c
115+}
116+
117+func (_c *MockNotification_Dismiss_Call) Return() *MockNotification_Dismiss_Call {
118+ _c.Call.Return()
119+ return _c
120+}
121+
122+func (_c *MockNotification_Dismiss_Call) RunAndReturn(run func(ctx context.Context, id port.NotificationID)) *MockNotification_Dismiss_Call {
123+ _c.Run(run)
124+ return _c
125+}
126+
127+// Show provides a mock function for the type MockNotification
128+func (_mock *MockNotification) Show(ctx context.Context, message string, notifType port.NotificationType, durationMs int) port.NotificationID {
129+ ret := _mock.Called(ctx, message, notifType, durationMs)
130+
131+ if len(ret) == 0 {
132+ panic("no return value specified for Show")
133+ }
134+
135+ var r0 port.NotificationID
136+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, port.NotificationType, int) port.NotificationID); ok {
137+ r0 = returnFunc(ctx, message, notifType, durationMs)
138+ } else {
139+ r0 = ret.Get(0).(port.NotificationID)
140+ }
141+ return r0
142+}
143+
144+// MockNotification_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
145+type MockNotification_Show_Call struct {
146+ *mock.Call
147+}
148+
149+// Show is a helper method to define mock.On call
150+// - ctx context.Context
151+// - message string
152+// - notifType port.NotificationType
153+// - durationMs int
154+func (_e *MockNotification_Expecter) Show(ctx any, message any, notifType any, durationMs any) *MockNotification_Show_Call {
155+ return &MockNotification_Show_Call{Call: _e.mock.On("Show", ctx, message, notifType, durationMs)}
156+}
157+
158+func (_c *MockNotification_Show_Call) Run(run func(ctx context.Context, message string, notifType port.NotificationType, durationMs int)) *MockNotification_Show_Call {
159+ _c.Call.Run(func(args mock.Arguments) {
160+ var arg0 context.Context
161+ if args[0] != nil {
162+ arg0 = args[0].(context.Context)
163+ }
164+ var arg1 string
165+ if args[1] != nil {
166+ arg1 = args[1].(string)
167+ }
168+ var arg2 port.NotificationType
169+ if args[2] != nil {
170+ arg2 = args[2].(port.NotificationType)
171+ }
172+ var arg3 int
173+ if args[3] != nil {
174+ arg3 = args[3].(int)
175+ }
176+ run(
177+ arg0,
178+ arg1,
179+ arg2,
180+ arg3,
181+ )
182+ })
183+ return _c
184+}
185+
186+func (_c *MockNotification_Show_Call) Return(notificationID port.NotificationID) *MockNotification_Show_Call {
187+ _c.Call.Return(notificationID)
188+ return _c
189+}
190+
191+func (_c *MockNotification_Show_Call) RunAndReturn(run func(ctx context.Context, message string, notifType port.NotificationType, durationMs int) port.NotificationID) *MockNotification_Show_Call {
192+ _c.Call.Return(run)
193+ return _c
194+}
195+
196+// ShowZoom provides a mock function for the type MockNotification
197+func (_mock *MockNotification) ShowZoom(ctx context.Context, zoomPercent int) port.NotificationID {
198+ ret := _mock.Called(ctx, zoomPercent)
199+
200+ if len(ret) == 0 {
201+ panic("no return value specified for ShowZoom")
202+ }
203+
204+ var r0 port.NotificationID
205+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) port.NotificationID); ok {
206+ r0 = returnFunc(ctx, zoomPercent)
207+ } else {
208+ r0 = ret.Get(0).(port.NotificationID)
209+ }
210+ return r0
211+}
212+
213+// MockNotification_ShowZoom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowZoom'
214+type MockNotification_ShowZoom_Call struct {
215+ *mock.Call
216+}
217+
218+// ShowZoom is a helper method to define mock.On call
219+// - ctx context.Context
220+// - zoomPercent int
221+func (_e *MockNotification_Expecter) ShowZoom(ctx any, zoomPercent any) *MockNotification_ShowZoom_Call {
222+ return &MockNotification_ShowZoom_Call{Call: _e.mock.On("ShowZoom", ctx, zoomPercent)}
223+}
224+
225+func (_c *MockNotification_ShowZoom_Call) Run(run func(ctx context.Context, zoomPercent int)) *MockNotification_ShowZoom_Call {
226+ _c.Call.Run(func(args mock.Arguments) {
227+ var arg0 context.Context
228+ if args[0] != nil {
229+ arg0 = args[0].(context.Context)
230+ }
231+ var arg1 int
232+ if args[1] != nil {
233+ arg1 = args[1].(int)
234+ }
235+ run(
236+ arg0,
237+ arg1,
238+ )
239+ })
240+ return _c
241+}
242+
243+func (_c *MockNotification_ShowZoom_Call) Return(notificationID port.NotificationID) *MockNotification_ShowZoom_Call {
244+ _c.Call.Return(notificationID)
245+ return _c
246+}
247+
248+func (_c *MockNotification_ShowZoom_Call) RunAndReturn(run func(ctx context.Context, zoomPercent int) port.NotificationID) *MockNotification_ShowZoom_Call {
249+ _c.Call.Return(run)
250+ return _c
251+}
A internal/application/port/mocks/omnibox_preferences.go +96 -0
@@ -0,0 +1,96 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/domain/entity"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockOmniboxPreferencesSaver creates a new instance of MockOmniboxPreferencesSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockOmniboxPreferencesSaver(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockOmniboxPreferencesSaver {
20+ mock := &MockOmniboxPreferencesSaver{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockOmniboxPreferencesSaver is an autogenerated mock type for the OmniboxPreferencesSaver type
29+type MockOmniboxPreferencesSaver struct {
30+ mock.Mock
31+}
32+
33+type MockOmniboxPreferencesSaver_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockOmniboxPreferencesSaver) EXPECT() *MockOmniboxPreferencesSaver_Expecter {
38+ return &MockOmniboxPreferencesSaver_Expecter{mock: &_m.Mock}
39+}
40+
41+// SaveOmniboxInitialBehavior provides a mock function for the type MockOmniboxPreferencesSaver
42+func (_mock *MockOmniboxPreferencesSaver) SaveOmniboxInitialBehavior(ctx context.Context, behavior entity.OmniboxInitialBehavior) error {
43+ ret := _mock.Called(ctx, behavior)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for SaveOmniboxInitialBehavior")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.OmniboxInitialBehavior) error); ok {
51+ r0 = returnFunc(ctx, behavior)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveOmniboxInitialBehavior'
59+type MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call struct {
60+ *mock.Call
61+}
62+
63+// SaveOmniboxInitialBehavior is a helper method to define mock.On call
64+// - ctx context.Context
65+// - behavior entity.OmniboxInitialBehavior
66+func (_e *MockOmniboxPreferencesSaver_Expecter) SaveOmniboxInitialBehavior(ctx any, behavior any) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
67+ return &MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call{Call: _e.mock.On("SaveOmniboxInitialBehavior", ctx, behavior)}
68+}
69+
70+func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) Run(run func(ctx context.Context, behavior entity.OmniboxInitialBehavior)) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 context.Context
73+ if args[0] != nil {
74+ arg0 = args[0].(context.Context)
75+ }
76+ var arg1 entity.OmniboxInitialBehavior
77+ if args[1] != nil {
78+ arg1 = args[1].(entity.OmniboxInitialBehavior)
79+ }
80+ run(
81+ arg0,
82+ arg1,
83+ )
84+ })
85+ return _c
86+}
87+
88+func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) Return(err error) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
89+ _c.Call.Return(err)
90+ return _c
91+}
92+
93+func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) RunAndReturn(run func(ctx context.Context, behavior entity.OmniboxInitialBehavior) error) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call {
94+ _c.Call.Return(run)
95+ return _c
96+}
A internal/application/port/mocks/permission.go +104 -0
@@ -0,0 +1,104 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ "github.com/bnema/dumber/internal/domain/entity"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// NewMockPermissionDialogPresenter creates a new instance of MockPermissionDialogPresenter. 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.
17+func NewMockPermissionDialogPresenter(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockPermissionDialogPresenter {
21+ mock := &MockPermissionDialogPresenter{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockPermissionDialogPresenter is an autogenerated mock type for the PermissionDialogPresenter type
30+type MockPermissionDialogPresenter struct {
31+ mock.Mock
32+}
33+
34+type MockPermissionDialogPresenter_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockPermissionDialogPresenter) EXPECT() *MockPermissionDialogPresenter_Expecter {
39+ return &MockPermissionDialogPresenter_Expecter{mock: &_m.Mock}
40+}
41+
42+// ShowPermissionDialog provides a mock function for the type MockPermissionDialogPresenter
43+func (_mock *MockPermissionDialogPresenter) ShowPermissionDialog(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult)) {
44+ _mock.Called(ctx, origin, permTypes, metadata, callback)
45+ return
46+}
47+
48+// MockPermissionDialogPresenter_ShowPermissionDialog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPermissionDialog'
49+type MockPermissionDialogPresenter_ShowPermissionDialog_Call struct {
50+ *mock.Call
51+}
52+
53+// ShowPermissionDialog is a helper method to define mock.On call
54+// - ctx context.Context
55+// - origin string
56+// - permTypes []entity.PermissionType
57+// - metadata entity.PermissionMetadata
58+// - callback func(result port.PermissionDialogResult)
59+func (_e *MockPermissionDialogPresenter_Expecter) ShowPermissionDialog(ctx any, origin any, permTypes any, metadata any, callback any) *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
60+ return &MockPermissionDialogPresenter_ShowPermissionDialog_Call{Call: _e.mock.On("ShowPermissionDialog", ctx, origin, permTypes, metadata, callback)}
61+}
62+
63+func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) Run(run func(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult))) *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
64+ _c.Call.Run(func(args mock.Arguments) {
65+ var arg0 context.Context
66+ if args[0] != nil {
67+ arg0 = args[0].(context.Context)
68+ }
69+ var arg1 string
70+ if args[1] != nil {
71+ arg1 = args[1].(string)
72+ }
73+ var arg2 []entity.PermissionType
74+ if args[2] != nil {
75+ arg2 = args[2].([]entity.PermissionType)
76+ }
77+ var arg3 entity.PermissionMetadata
78+ if args[3] != nil {
79+ arg3 = args[3].(entity.PermissionMetadata)
80+ }
81+ var arg4 func(result port.PermissionDialogResult)
82+ if args[4] != nil {
83+ arg4 = args[4].(func(result port.PermissionDialogResult))
84+ }
85+ run(
86+ arg0,
87+ arg1,
88+ arg2,
89+ arg3,
90+ arg4,
91+ )
92+ })
93+ return _c
94+}
95+
96+func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) Return() *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
97+ _c.Call.Return()
98+ return _c
99+}
100+
101+func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) RunAndReturn(run func(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult))) *MockPermissionDialogPresenter_ShowPermissionDialog_Call {
102+ _c.Run(run)
103+ return _c
104+}
A internal/application/port/mocks/permission_repository.go +301 -0
@@ -0,0 +1,301 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/domain/entity"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockPermissionRepository creates a new instance of MockPermissionRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockPermissionRepository(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockPermissionRepository {
20+ mock := &MockPermissionRepository{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockPermissionRepository is an autogenerated mock type for the PermissionRepository type
29+type MockPermissionRepository struct {
30+ mock.Mock
31+}
32+
33+type MockPermissionRepository_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockPermissionRepository) EXPECT() *MockPermissionRepository_Expecter {
38+ return &MockPermissionRepository_Expecter{mock: &_m.Mock}
39+}
40+
41+// Delete provides a mock function for the type MockPermissionRepository
42+func (_mock *MockPermissionRepository) Delete(ctx context.Context, origin string, permType entity.PermissionType) error {
43+ ret := _mock.Called(ctx, origin, permType)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Delete")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) error); ok {
51+ r0 = returnFunc(ctx, origin, permType)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockPermissionRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
59+type MockPermissionRepository_Delete_Call struct {
60+ *mock.Call
61+}
62+
63+// Delete is a helper method to define mock.On call
64+// - ctx context.Context
65+// - origin string
66+// - permType entity.PermissionType
67+func (_e *MockPermissionRepository_Expecter) Delete(ctx any, origin any, permType any) *MockPermissionRepository_Delete_Call {
68+ return &MockPermissionRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, origin, permType)}
69+}
70+
71+func (_c *MockPermissionRepository_Delete_Call) Run(run func(ctx context.Context, origin string, permType entity.PermissionType)) *MockPermissionRepository_Delete_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ var arg1 string
78+ if args[1] != nil {
79+ arg1 = args[1].(string)
80+ }
81+ var arg2 entity.PermissionType
82+ if args[2] != nil {
83+ arg2 = args[2].(entity.PermissionType)
84+ }
85+ run(
86+ arg0,
87+ arg1,
88+ arg2,
89+ )
90+ })
91+ return _c
92+}
93+
94+func (_c *MockPermissionRepository_Delete_Call) Return(err error) *MockPermissionRepository_Delete_Call {
95+ _c.Call.Return(err)
96+ return _c
97+}
98+
99+func (_c *MockPermissionRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, origin string, permType entity.PermissionType) error) *MockPermissionRepository_Delete_Call {
100+ _c.Call.Return(run)
101+ return _c
102+}
103+
104+// Get provides a mock function for the type MockPermissionRepository
105+func (_mock *MockPermissionRepository) Get(ctx context.Context, origin string, permType entity.PermissionType) (*entity.PermissionRecord, error) {
106+ ret := _mock.Called(ctx, origin, permType)
107+
108+ if len(ret) == 0 {
109+ panic("no return value specified for Get")
110+ }
111+
112+ var r0 *entity.PermissionRecord
113+ var r1 error
114+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) (*entity.PermissionRecord, error)); ok {
115+ return returnFunc(ctx, origin, permType)
116+ }
117+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) *entity.PermissionRecord); ok {
118+ r0 = returnFunc(ctx, origin, permType)
119+ } else {
120+ if ret.Get(0) != nil {
121+ r0 = ret.Get(0).(*entity.PermissionRecord)
122+ }
123+ }
124+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, entity.PermissionType) error); ok {
125+ r1 = returnFunc(ctx, origin, permType)
126+ } else {
127+ r1 = ret.Error(1)
128+ }
129+ return r0, r1
130+}
131+
132+// MockPermissionRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
133+type MockPermissionRepository_Get_Call struct {
134+ *mock.Call
135+}
136+
137+// Get is a helper method to define mock.On call
138+// - ctx context.Context
139+// - origin string
140+// - permType entity.PermissionType
141+func (_e *MockPermissionRepository_Expecter) Get(ctx any, origin any, permType any) *MockPermissionRepository_Get_Call {
142+ return &MockPermissionRepository_Get_Call{Call: _e.mock.On("Get", ctx, origin, permType)}
143+}
144+
145+func (_c *MockPermissionRepository_Get_Call) Run(run func(ctx context.Context, origin string, permType entity.PermissionType)) *MockPermissionRepository_Get_Call {
146+ _c.Call.Run(func(args mock.Arguments) {
147+ var arg0 context.Context
148+ if args[0] != nil {
149+ arg0 = args[0].(context.Context)
150+ }
151+ var arg1 string
152+ if args[1] != nil {
153+ arg1 = args[1].(string)
154+ }
155+ var arg2 entity.PermissionType
156+ if args[2] != nil {
157+ arg2 = args[2].(entity.PermissionType)
158+ }
159+ run(
160+ arg0,
161+ arg1,
162+ arg2,
163+ )
164+ })
165+ return _c
166+}
167+
168+func (_c *MockPermissionRepository_Get_Call) Return(permissionRecord *entity.PermissionRecord, err error) *MockPermissionRepository_Get_Call {
169+ _c.Call.Return(permissionRecord, err)
170+ return _c
171+}
172+
173+func (_c *MockPermissionRepository_Get_Call) RunAndReturn(run func(ctx context.Context, origin string, permType entity.PermissionType) (*entity.PermissionRecord, error)) *MockPermissionRepository_Get_Call {
174+ _c.Call.Return(run)
175+ return _c
176+}
177+
178+// GetAll provides a mock function for the type MockPermissionRepository
179+func (_mock *MockPermissionRepository) GetAll(ctx context.Context, origin string) ([]*entity.PermissionRecord, error) {
180+ ret := _mock.Called(ctx, origin)
181+
182+ if len(ret) == 0 {
183+ panic("no return value specified for GetAll")
184+ }
185+
186+ var r0 []*entity.PermissionRecord
187+ var r1 error
188+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.PermissionRecord, error)); ok {
189+ return returnFunc(ctx, origin)
190+ }
191+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.PermissionRecord); ok {
192+ r0 = returnFunc(ctx, origin)
193+ } else {
194+ if ret.Get(0) != nil {
195+ r0 = ret.Get(0).([]*entity.PermissionRecord)
196+ }
197+ }
198+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
199+ r1 = returnFunc(ctx, origin)
200+ } else {
201+ r1 = ret.Error(1)
202+ }
203+ return r0, r1
204+}
205+
206+// MockPermissionRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
207+type MockPermissionRepository_GetAll_Call struct {
208+ *mock.Call
209+}
210+
211+// GetAll is a helper method to define mock.On call
212+// - ctx context.Context
213+// - origin string
214+func (_e *MockPermissionRepository_Expecter) GetAll(ctx any, origin any) *MockPermissionRepository_GetAll_Call {
215+ return &MockPermissionRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx, origin)}
216+}
217+
218+func (_c *MockPermissionRepository_GetAll_Call) Run(run func(ctx context.Context, origin string)) *MockPermissionRepository_GetAll_Call {
219+ _c.Call.Run(func(args mock.Arguments) {
220+ var arg0 context.Context
221+ if args[0] != nil {
222+ arg0 = args[0].(context.Context)
223+ }
224+ var arg1 string
225+ if args[1] != nil {
226+ arg1 = args[1].(string)
227+ }
228+ run(
229+ arg0,
230+ arg1,
231+ )
232+ })
233+ return _c
234+}
235+
236+func (_c *MockPermissionRepository_GetAll_Call) Return(permissionRecords []*entity.PermissionRecord, err error) *MockPermissionRepository_GetAll_Call {
237+ _c.Call.Return(permissionRecords, err)
238+ return _c
239+}
240+
241+func (_c *MockPermissionRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context, origin string) ([]*entity.PermissionRecord, error)) *MockPermissionRepository_GetAll_Call {
242+ _c.Call.Return(run)
243+ return _c
244+}
245+
246+// Set provides a mock function for the type MockPermissionRepository
247+func (_mock *MockPermissionRepository) Set(ctx context.Context, record *entity.PermissionRecord) error {
248+ ret := _mock.Called(ctx, record)
249+
250+ if len(ret) == 0 {
251+ panic("no return value specified for Set")
252+ }
253+
254+ var r0 error
255+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.PermissionRecord) error); ok {
256+ r0 = returnFunc(ctx, record)
257+ } else {
258+ r0 = ret.Error(0)
259+ }
260+ return r0
261+}
262+
263+// MockPermissionRepository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
264+type MockPermissionRepository_Set_Call struct {
265+ *mock.Call
266+}
267+
268+// Set is a helper method to define mock.On call
269+// - ctx context.Context
270+// - record *entity.PermissionRecord
271+func (_e *MockPermissionRepository_Expecter) Set(ctx any, record any) *MockPermissionRepository_Set_Call {
272+ return &MockPermissionRepository_Set_Call{Call: _e.mock.On("Set", ctx, record)}
273+}
274+
275+func (_c *MockPermissionRepository_Set_Call) Run(run func(ctx context.Context, record *entity.PermissionRecord)) *MockPermissionRepository_Set_Call {
276+ _c.Call.Run(func(args mock.Arguments) {
277+ var arg0 context.Context
278+ if args[0] != nil {
279+ arg0 = args[0].(context.Context)
280+ }
281+ var arg1 *entity.PermissionRecord
282+ if args[1] != nil {
283+ arg1 = args[1].(*entity.PermissionRecord)
284+ }
285+ run(
286+ arg0,
287+ arg1,
288+ )
289+ })
290+ return _c
291+}
292+
293+func (_c *MockPermissionRepository_Set_Call) Return(err error) *MockPermissionRepository_Set_Call {
294+ _c.Call.Return(err)
295+ return _c
296+}
297+
298+func (_c *MockPermissionRepository_Set_Call) RunAndReturn(run func(ctx context.Context, record *entity.PermissionRecord) error) *MockPermissionRepository_Set_Call {
299+ _c.Call.Return(run)
300+ return _c
301+}
A internal/application/port/mocks/rendering_env.go +136 -0
@@ -0,0 +1,136 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockRenderingEnvManager creates a new instance of MockRenderingEnvManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockRenderingEnvManager(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockRenderingEnvManager {
20+ mock := &MockRenderingEnvManager{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockRenderingEnvManager is an autogenerated mock type for the RenderingEnvManager type
29+type MockRenderingEnvManager struct {
30+ mock.Mock
31+}
32+
33+type MockRenderingEnvManager_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockRenderingEnvManager) EXPECT() *MockRenderingEnvManager_Expecter {
38+ return &MockRenderingEnvManager_Expecter{mock: &_m.Mock}
39+}
40+
41+// DetectGPUVendor provides a mock function for the type MockRenderingEnvManager
42+func (_mock *MockRenderingEnvManager) DetectGPUVendor(ctx context.Context) port.GPUVendor {
43+ ret := _mock.Called(ctx)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for DetectGPUVendor")
47+ }
48+
49+ var r0 port.GPUVendor
50+ if returnFunc, ok := ret.Get(0).(func(context.Context) port.GPUVendor); ok {
51+ r0 = returnFunc(ctx)
52+ } else {
53+ r0 = ret.Get(0).(port.GPUVendor)
54+ }
55+ return r0
56+}
57+
58+// MockRenderingEnvManager_DetectGPUVendor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectGPUVendor'
59+type MockRenderingEnvManager_DetectGPUVendor_Call struct {
60+ *mock.Call
61+}
62+
63+// DetectGPUVendor is a helper method to define mock.On call
64+// - ctx context.Context
65+func (_e *MockRenderingEnvManager_Expecter) DetectGPUVendor(ctx any) *MockRenderingEnvManager_DetectGPUVendor_Call {
66+ return &MockRenderingEnvManager_DetectGPUVendor_Call{Call: _e.mock.On("DetectGPUVendor", ctx)}
67+}
68+
69+func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) Run(run func(ctx context.Context)) *MockRenderingEnvManager_DetectGPUVendor_Call {
70+ _c.Call.Run(func(args mock.Arguments) {
71+ var arg0 context.Context
72+ if args[0] != nil {
73+ arg0 = args[0].(context.Context)
74+ }
75+ run(
76+ arg0,
77+ )
78+ })
79+ return _c
80+}
81+
82+func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) Return(gPUVendor port.GPUVendor) *MockRenderingEnvManager_DetectGPUVendor_Call {
83+ _c.Call.Return(gPUVendor)
84+ return _c
85+}
86+
87+func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) RunAndReturn(run func(ctx context.Context) port.GPUVendor) *MockRenderingEnvManager_DetectGPUVendor_Call {
88+ _c.Call.Return(run)
89+ return _c
90+}
91+
92+// GetAppliedVars provides a mock function for the type MockRenderingEnvManager
93+func (_mock *MockRenderingEnvManager) GetAppliedVars() map[string]string {
94+ ret := _mock.Called()
95+
96+ if len(ret) == 0 {
97+ panic("no return value specified for GetAppliedVars")
98+ }
99+
100+ var r0 map[string]string
101+ if returnFunc, ok := ret.Get(0).(func() map[string]string); ok {
102+ r0 = returnFunc()
103+ } else {
104+ if ret.Get(0) != nil {
105+ r0 = ret.Get(0).(map[string]string)
106+ }
107+ }
108+ return r0
109+}
110+
111+// MockRenderingEnvManager_GetAppliedVars_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppliedVars'
112+type MockRenderingEnvManager_GetAppliedVars_Call struct {
113+ *mock.Call
114+}
115+
116+// GetAppliedVars is a helper method to define mock.On call
117+func (_e *MockRenderingEnvManager_Expecter) GetAppliedVars() *MockRenderingEnvManager_GetAppliedVars_Call {
118+ return &MockRenderingEnvManager_GetAppliedVars_Call{Call: _e.mock.On("GetAppliedVars")}
119+}
120+
121+func (_c *MockRenderingEnvManager_GetAppliedVars_Call) Run(run func()) *MockRenderingEnvManager_GetAppliedVars_Call {
122+ _c.Call.Run(func(args mock.Arguments) {
123+ run()
124+ })
125+ return _c
126+}
127+
128+func (_c *MockRenderingEnvManager_GetAppliedVars_Call) Return(stringToString map[string]string) *MockRenderingEnvManager_GetAppliedVars_Call {
129+ _c.Call.Return(stringToString)
130+ return _c
131+}
132+
133+func (_c *MockRenderingEnvManager_GetAppliedVars_Call) RunAndReturn(run func() map[string]string) *MockRenderingEnvManager_GetAppliedVars_Call {
134+ _c.Call.Return(run)
135+ return _c
136+}
A internal/application/port/mocks/runtime.go +110 -0
@@ -0,0 +1,110 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockRuntimeVersionProbe creates a new instance of MockRuntimeVersionProbe. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockRuntimeVersionProbe(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockRuntimeVersionProbe {
19+ mock := &MockRuntimeVersionProbe{}
20+ mock.Mock.Test(t)
21+
22+ t.Cleanup(func() { mock.AssertExpectations(t) })
23+
24+ return mock
25+}
26+
27+// MockRuntimeVersionProbe is an autogenerated mock type for the RuntimeVersionProbe type
28+type MockRuntimeVersionProbe struct {
29+ mock.Mock
30+}
31+
32+type MockRuntimeVersionProbe_Expecter struct {
33+ mock *mock.Mock
34+}
35+
36+func (_m *MockRuntimeVersionProbe) EXPECT() *MockRuntimeVersionProbe_Expecter {
37+ return &MockRuntimeVersionProbe_Expecter{mock: &_m.Mock}
38+}
39+
40+// PkgConfigModVersion provides a mock function for the type MockRuntimeVersionProbe
41+func (_mock *MockRuntimeVersionProbe) PkgConfigModVersion(ctx context.Context, pkgName string, prefix string) (string, error) {
42+ ret := _mock.Called(ctx, pkgName, prefix)
43+
44+ if len(ret) == 0 {
45+ panic("no return value specified for PkgConfigModVersion")
46+ }
47+
48+ var r0 string
49+ var r1 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
51+ return returnFunc(ctx, pkgName, prefix)
52+ }
53+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
54+ r0 = returnFunc(ctx, pkgName, prefix)
55+ } else {
56+ r0 = ret.Get(0).(string)
57+ }
58+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
59+ r1 = returnFunc(ctx, pkgName, prefix)
60+ } else {
61+ r1 = ret.Error(1)
62+ }
63+ return r0, r1
64+}
65+
66+// MockRuntimeVersionProbe_PkgConfigModVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PkgConfigModVersion'
67+type MockRuntimeVersionProbe_PkgConfigModVersion_Call struct {
68+ *mock.Call
69+}
70+
71+// PkgConfigModVersion is a helper method to define mock.On call
72+// - ctx context.Context
73+// - pkgName string
74+// - prefix string
75+func (_e *MockRuntimeVersionProbe_Expecter) PkgConfigModVersion(ctx any, pkgName any, prefix any) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
76+ return &MockRuntimeVersionProbe_PkgConfigModVersion_Call{Call: _e.mock.On("PkgConfigModVersion", ctx, pkgName, prefix)}
77+}
78+
79+func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) Run(run func(ctx context.Context, pkgName string, prefix string)) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
80+ _c.Call.Run(func(args mock.Arguments) {
81+ var arg0 context.Context
82+ if args[0] != nil {
83+ arg0 = args[0].(context.Context)
84+ }
85+ var arg1 string
86+ if args[1] != nil {
87+ arg1 = args[1].(string)
88+ }
89+ var arg2 string
90+ if args[2] != nil {
91+ arg2 = args[2].(string)
92+ }
93+ run(
94+ arg0,
95+ arg1,
96+ arg2,
97+ )
98+ })
99+ return _c
100+}
101+
102+func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) Return(s string, err error) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
103+ _c.Call.Return(s, err)
104+ return _c
105+}
106+
107+func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) RunAndReturn(run func(ctx context.Context, pkgName string, prefix string) (string, error)) *MockRuntimeVersionProbe_PkgConfigModVersion_Call {
108+ _c.Call.Return(run)
109+ return _c
110+}
R internal/application/port/mocks/runtime_config_provider.go → internal/application/port/mocks/runtime_config.go +0 -0 renamed, 100% similar

renamed, 100% similar

A internal/application/port/mocks/session_logger.go +121 -0
@@ -0,0 +1,121 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ "github.com/bnema/dumber/internal/domain/entity"
12+ "github.com/rs/zerolog"
13+ mock "github.com/stretchr/testify/mock"
14+)
15+
16+// NewMockSessionLogger creates a new instance of MockSessionLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
17+// The first argument is typically a *testing.T value.
18+func NewMockSessionLogger(t interface {
19+ mock.TestingT
20+ Cleanup(func())
21+}) *MockSessionLogger {
22+ mock := &MockSessionLogger{}
23+ mock.Mock.Test(t)
24+
25+ t.Cleanup(func() { mock.AssertExpectations(t) })
26+
27+ return mock
28+}
29+
30+// MockSessionLogger is an autogenerated mock type for the SessionLogger type
31+type MockSessionLogger struct {
32+ mock.Mock
33+}
34+
35+type MockSessionLogger_Expecter struct {
36+ mock *mock.Mock
37+}
38+
39+func (_m *MockSessionLogger) EXPECT() *MockSessionLogger_Expecter {
40+ return &MockSessionLogger_Expecter{mock: &_m.Mock}
41+}
42+
43+// CreateLogger provides a mock function for the type MockSessionLogger
44+func (_mock *MockSessionLogger) CreateLogger(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error) {
45+ ret := _mock.Called(ctx, sessionID, cfg)
46+
47+ if len(ret) == 0 {
48+ panic("no return value specified for CreateLogger")
49+ }
50+
51+ var r0 zerolog.Logger
52+ var r1 func()
53+ var r2 error
54+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) (zerolog.Logger, func(), error)); ok {
55+ return returnFunc(ctx, sessionID, cfg)
56+ }
57+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) zerolog.Logger); ok {
58+ r0 = returnFunc(ctx, sessionID, cfg)
59+ } else {
60+ r0 = ret.Get(0).(zerolog.Logger)
61+ }
62+ if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID, port.SessionLogConfig) func()); ok {
63+ r1 = returnFunc(ctx, sessionID, cfg)
64+ } else {
65+ if ret.Get(1) != nil {
66+ r1 = ret.Get(1).(func())
67+ }
68+ }
69+ if returnFunc, ok := ret.Get(2).(func(context.Context, entity.SessionID, port.SessionLogConfig) error); ok {
70+ r2 = returnFunc(ctx, sessionID, cfg)
71+ } else {
72+ r2 = ret.Error(2)
73+ }
74+ return r0, r1, r2
75+}
76+
77+// MockSessionLogger_CreateLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLogger'
78+type MockSessionLogger_CreateLogger_Call struct {
79+ *mock.Call
80+}
81+
82+// CreateLogger is a helper method to define mock.On call
83+// - ctx context.Context
84+// - sessionID entity.SessionID
85+// - cfg port.SessionLogConfig
86+func (_e *MockSessionLogger_Expecter) CreateLogger(ctx any, sessionID any, cfg any) *MockSessionLogger_CreateLogger_Call {
87+ return &MockSessionLogger_CreateLogger_Call{Call: _e.mock.On("CreateLogger", ctx, sessionID, cfg)}
88+}
89+
90+func (_c *MockSessionLogger_CreateLogger_Call) Run(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig)) *MockSessionLogger_CreateLogger_Call {
91+ _c.Call.Run(func(args mock.Arguments) {
92+ var arg0 context.Context
93+ if args[0] != nil {
94+ arg0 = args[0].(context.Context)
95+ }
96+ var arg1 entity.SessionID
97+ if args[1] != nil {
98+ arg1 = args[1].(entity.SessionID)
99+ }
100+ var arg2 port.SessionLogConfig
101+ if args[2] != nil {
102+ arg2 = args[2].(port.SessionLogConfig)
103+ }
104+ run(
105+ arg0,
106+ arg1,
107+ arg2,
108+ )
109+ })
110+ return _c
111+}
112+
113+func (_c *MockSessionLogger_CreateLogger_Call) Return(logger zerolog.Logger, fn func(), err error) *MockSessionLogger_CreateLogger_Call {
114+ _c.Call.Return(logger, fn, err)
115+ return _c
116+}
117+
118+func (_c *MockSessionLogger_CreateLogger_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error)) *MockSessionLogger_CreateLogger_Call {
119+ _c.Call.Return(run)
120+ return _c
121+}
A internal/application/port/mocks/session_process.go +104 -0
@@ -0,0 +1,104 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockSessionProcessProbe creates a new instance of MockSessionProcessProbe. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockSessionProcessProbe(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockSessionProcessProbe {
19+ mock := &MockSessionProcessProbe{}
20+ mock.Mock.Test(t)
21+
22+ t.Cleanup(func() { mock.AssertExpectations(t) })
23+
24+ return mock
25+}
26+
27+// MockSessionProcessProbe is an autogenerated mock type for the SessionProcessProbe type
28+type MockSessionProcessProbe struct {
29+ mock.Mock
30+}
31+
32+type MockSessionProcessProbe_Expecter struct {
33+ mock *mock.Mock
34+}
35+
36+func (_m *MockSessionProcessProbe) EXPECT() *MockSessionProcessProbe_Expecter {
37+ return &MockSessionProcessProbe_Expecter{mock: &_m.Mock}
38+}
39+
40+// IsProcessAlive provides a mock function for the type MockSessionProcessProbe
41+func (_mock *MockSessionProcessProbe) IsProcessAlive(ctx context.Context, pid int) (bool, error) {
42+ ret := _mock.Called(ctx, pid)
43+
44+ if len(ret) == 0 {
45+ panic("no return value specified for IsProcessAlive")
46+ }
47+
48+ var r0 bool
49+ var r1 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) (bool, error)); ok {
51+ return returnFunc(ctx, pid)
52+ }
53+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) bool); ok {
54+ r0 = returnFunc(ctx, pid)
55+ } else {
56+ r0 = ret.Get(0).(bool)
57+ }
58+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
59+ r1 = returnFunc(ctx, pid)
60+ } else {
61+ r1 = ret.Error(1)
62+ }
63+ return r0, r1
64+}
65+
66+// MockSessionProcessProbe_IsProcessAlive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsProcessAlive'
67+type MockSessionProcessProbe_IsProcessAlive_Call struct {
68+ *mock.Call
69+}
70+
71+// IsProcessAlive is a helper method to define mock.On call
72+// - ctx context.Context
73+// - pid int
74+func (_e *MockSessionProcessProbe_Expecter) IsProcessAlive(ctx any, pid any) *MockSessionProcessProbe_IsProcessAlive_Call {
75+ return &MockSessionProcessProbe_IsProcessAlive_Call{Call: _e.mock.On("IsProcessAlive", ctx, pid)}
76+}
77+
78+func (_c *MockSessionProcessProbe_IsProcessAlive_Call) Run(run func(ctx context.Context, pid int)) *MockSessionProcessProbe_IsProcessAlive_Call {
79+ _c.Call.Run(func(args mock.Arguments) {
80+ var arg0 context.Context
81+ if args[0] != nil {
82+ arg0 = args[0].(context.Context)
83+ }
84+ var arg1 int
85+ if args[1] != nil {
86+ arg1 = args[1].(int)
87+ }
88+ run(
89+ arg0,
90+ arg1,
91+ )
92+ })
93+ return _c
94+}
95+
96+func (_c *MockSessionProcessProbe_IsProcessAlive_Call) Return(b bool, err error) *MockSessionProcessProbe_IsProcessAlive_Call {
97+ _c.Call.Return(b, err)
98+ return _c
99+}
100+
101+func (_c *MockSessionProcessProbe_IsProcessAlive_Call) RunAndReturn(run func(ctx context.Context, pid int) (bool, error)) *MockSessionProcessProbe_IsProcessAlive_Call {
102+ _c.Call.Return(run)
103+ return _c
104+}
A internal/application/port/mocks/session_state.go +541 -0
@@ -0,0 +1,541 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/domain/entity"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockWindowStateProvider creates a new instance of MockWindowStateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockWindowStateProvider(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockWindowStateProvider {
20+ mock := &MockWindowStateProvider{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockWindowStateProvider is an autogenerated mock type for the WindowStateProvider type
29+type MockWindowStateProvider struct {
30+ mock.Mock
31+}
32+
33+type MockWindowStateProvider_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockWindowStateProvider) EXPECT() *MockWindowStateProvider_Expecter {
38+ return &MockWindowStateProvider_Expecter{mock: &_m.Mock}
39+}
40+
41+// GetActiveWindowIndex provides a mock function for the type MockWindowStateProvider
42+func (_mock *MockWindowStateProvider) GetActiveWindowIndex() int {
43+ ret := _mock.Called()
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for GetActiveWindowIndex")
47+ }
48+
49+ var r0 int
50+ if returnFunc, ok := ret.Get(0).(func() int); ok {
51+ r0 = returnFunc()
52+ } else {
53+ r0 = ret.Get(0).(int)
54+ }
55+ return r0
56+}
57+
58+// MockWindowStateProvider_GetActiveWindowIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActiveWindowIndex'
59+type MockWindowStateProvider_GetActiveWindowIndex_Call struct {
60+ *mock.Call
61+}
62+
63+// GetActiveWindowIndex is a helper method to define mock.On call
64+func (_e *MockWindowStateProvider_Expecter) GetActiveWindowIndex() *MockWindowStateProvider_GetActiveWindowIndex_Call {
65+ return &MockWindowStateProvider_GetActiveWindowIndex_Call{Call: _e.mock.On("GetActiveWindowIndex")}
66+}
67+
68+func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) Run(run func()) *MockWindowStateProvider_GetActiveWindowIndex_Call {
69+ _c.Call.Run(func(args mock.Arguments) {
70+ run()
71+ })
72+ return _c
73+}
74+
75+func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) Return(n int) *MockWindowStateProvider_GetActiveWindowIndex_Call {
76+ _c.Call.Return(n)
77+ return _c
78+}
79+
80+func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) RunAndReturn(run func() int) *MockWindowStateProvider_GetActiveWindowIndex_Call {
81+ _c.Call.Return(run)
82+ return _c
83+}
84+
85+// GetSessionID provides a mock function for the type MockWindowStateProvider
86+func (_mock *MockWindowStateProvider) GetSessionID() entity.SessionID {
87+ ret := _mock.Called()
88+
89+ if len(ret) == 0 {
90+ panic("no return value specified for GetSessionID")
91+ }
92+
93+ var r0 entity.SessionID
94+ if returnFunc, ok := ret.Get(0).(func() entity.SessionID); ok {
95+ r0 = returnFunc()
96+ } else {
97+ r0 = ret.Get(0).(entity.SessionID)
98+ }
99+ return r0
100+}
101+
102+// MockWindowStateProvider_GetSessionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessionID'
103+type MockWindowStateProvider_GetSessionID_Call struct {
104+ *mock.Call
105+}
106+
107+// GetSessionID is a helper method to define mock.On call
108+func (_e *MockWindowStateProvider_Expecter) GetSessionID() *MockWindowStateProvider_GetSessionID_Call {
109+ return &MockWindowStateProvider_GetSessionID_Call{Call: _e.mock.On("GetSessionID")}
110+}
111+
112+func (_c *MockWindowStateProvider_GetSessionID_Call) Run(run func()) *MockWindowStateProvider_GetSessionID_Call {
113+ _c.Call.Run(func(args mock.Arguments) {
114+ run()
115+ })
116+ return _c
117+}
118+
119+func (_c *MockWindowStateProvider_GetSessionID_Call) Return(sessionID entity.SessionID) *MockWindowStateProvider_GetSessionID_Call {
120+ _c.Call.Return(sessionID)
121+ return _c
122+}
123+
124+func (_c *MockWindowStateProvider_GetSessionID_Call) RunAndReturn(run func() entity.SessionID) *MockWindowStateProvider_GetSessionID_Call {
125+ _c.Call.Return(run)
126+ return _c
127+}
128+
129+// GetWindowSnapshotState provides a mock function for the type MockWindowStateProvider
130+func (_mock *MockWindowStateProvider) GetWindowSnapshotState() ([]entity.WindowTabListState, int) {
131+ ret := _mock.Called()
132+
133+ if len(ret) == 0 {
134+ panic("no return value specified for GetWindowSnapshotState")
135+ }
136+
137+ var r0 []entity.WindowTabListState
138+ var r1 int
139+ if returnFunc, ok := ret.Get(0).(func() ([]entity.WindowTabListState, int)); ok {
140+ return returnFunc()
141+ }
142+ if returnFunc, ok := ret.Get(0).(func() []entity.WindowTabListState); ok {
143+ r0 = returnFunc()
144+ } else {
145+ if ret.Get(0) != nil {
146+ r0 = ret.Get(0).([]entity.WindowTabListState)
147+ }
148+ }
149+ if returnFunc, ok := ret.Get(1).(func() int); ok {
150+ r1 = returnFunc()
151+ } else {
152+ r1 = ret.Get(1).(int)
153+ }
154+ return r0, r1
155+}
156+
157+// MockWindowStateProvider_GetWindowSnapshotState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWindowSnapshotState'
158+type MockWindowStateProvider_GetWindowSnapshotState_Call struct {
159+ *mock.Call
160+}
161+
162+// GetWindowSnapshotState is a helper method to define mock.On call
163+func (_e *MockWindowStateProvider_Expecter) GetWindowSnapshotState() *MockWindowStateProvider_GetWindowSnapshotState_Call {
164+ return &MockWindowStateProvider_GetWindowSnapshotState_Call{Call: _e.mock.On("GetWindowSnapshotState")}
165+}
166+
167+func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) Run(run func()) *MockWindowStateProvider_GetWindowSnapshotState_Call {
168+ _c.Call.Run(func(args mock.Arguments) {
169+ run()
170+ })
171+ return _c
172+}
173+
174+func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) Return(windowTabListStates []entity.WindowTabListState, n int) *MockWindowStateProvider_GetWindowSnapshotState_Call {
175+ _c.Call.Return(windowTabListStates, n)
176+ return _c
177+}
178+
179+func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) RunAndReturn(run func() ([]entity.WindowTabListState, int)) *MockWindowStateProvider_GetWindowSnapshotState_Call {
180+ _c.Call.Return(run)
181+ return _c
182+}
183+
184+// GetWindowTabLists provides a mock function for the type MockWindowStateProvider
185+func (_mock *MockWindowStateProvider) GetWindowTabLists() []entity.WindowTabListState {
186+ ret := _mock.Called()
187+
188+ if len(ret) == 0 {
189+ panic("no return value specified for GetWindowTabLists")
190+ }
191+
192+ var r0 []entity.WindowTabListState
193+ if returnFunc, ok := ret.Get(0).(func() []entity.WindowTabListState); ok {
194+ r0 = returnFunc()
195+ } else {
196+ if ret.Get(0) != nil {
197+ r0 = ret.Get(0).([]entity.WindowTabListState)
198+ }
199+ }
200+ return r0
201+}
202+
203+// MockWindowStateProvider_GetWindowTabLists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWindowTabLists'
204+type MockWindowStateProvider_GetWindowTabLists_Call struct {
205+ *mock.Call
206+}
207+
208+// GetWindowTabLists is a helper method to define mock.On call
209+func (_e *MockWindowStateProvider_Expecter) GetWindowTabLists() *MockWindowStateProvider_GetWindowTabLists_Call {
210+ return &MockWindowStateProvider_GetWindowTabLists_Call{Call: _e.mock.On("GetWindowTabLists")}
211+}
212+
213+func (_c *MockWindowStateProvider_GetWindowTabLists_Call) Run(run func()) *MockWindowStateProvider_GetWindowTabLists_Call {
214+ _c.Call.Run(func(args mock.Arguments) {
215+ run()
216+ })
217+ return _c
218+}
219+
220+func (_c *MockWindowStateProvider_GetWindowTabLists_Call) Return(windowTabListStates []entity.WindowTabListState) *MockWindowStateProvider_GetWindowTabLists_Call {
221+ _c.Call.Return(windowTabListStates)
222+ return _c
223+}
224+
225+func (_c *MockWindowStateProvider_GetWindowTabLists_Call) RunAndReturn(run func() []entity.WindowTabListState) *MockWindowStateProvider_GetWindowTabLists_Call {
226+ _c.Call.Return(run)
227+ return _c
228+}
229+
230+// NewMockSessionSpawner creates a new instance of MockSessionSpawner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
231+// The first argument is typically a *testing.T value.
232+func NewMockSessionSpawner(t interface {
233+ mock.TestingT
234+ Cleanup(func())
235+}) *MockSessionSpawner {
236+ mock := &MockSessionSpawner{}
237+ mock.Mock.Test(t)
238+
239+ t.Cleanup(func() { mock.AssertExpectations(t) })
240+
241+ return mock
242+}
243+
244+// MockSessionSpawner is an autogenerated mock type for the SessionSpawner type
245+type MockSessionSpawner struct {
246+ mock.Mock
247+}
248+
249+type MockSessionSpawner_Expecter struct {
250+ mock *mock.Mock
251+}
252+
253+func (_m *MockSessionSpawner) EXPECT() *MockSessionSpawner_Expecter {
254+ return &MockSessionSpawner_Expecter{mock: &_m.Mock}
255+}
256+
257+// SpawnWithSession provides a mock function for the type MockSessionSpawner
258+func (_mock *MockSessionSpawner) SpawnWithSession(sessionID entity.SessionID) error {
259+ ret := _mock.Called(sessionID)
260+
261+ if len(ret) == 0 {
262+ panic("no return value specified for SpawnWithSession")
263+ }
264+
265+ var r0 error
266+ if returnFunc, ok := ret.Get(0).(func(entity.SessionID) error); ok {
267+ r0 = returnFunc(sessionID)
268+ } else {
269+ r0 = ret.Error(0)
270+ }
271+ return r0
272+}
273+
274+// MockSessionSpawner_SpawnWithSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SpawnWithSession'
275+type MockSessionSpawner_SpawnWithSession_Call struct {
276+ *mock.Call
277+}
278+
279+// SpawnWithSession is a helper method to define mock.On call
280+// - sessionID entity.SessionID
281+func (_e *MockSessionSpawner_Expecter) SpawnWithSession(sessionID any) *MockSessionSpawner_SpawnWithSession_Call {
282+ return &MockSessionSpawner_SpawnWithSession_Call{Call: _e.mock.On("SpawnWithSession", sessionID)}
283+}
284+
285+func (_c *MockSessionSpawner_SpawnWithSession_Call) Run(run func(sessionID entity.SessionID)) *MockSessionSpawner_SpawnWithSession_Call {
286+ _c.Call.Run(func(args mock.Arguments) {
287+ var arg0 entity.SessionID
288+ if args[0] != nil {
289+ arg0 = args[0].(entity.SessionID)
290+ }
291+ run(
292+ arg0,
293+ )
294+ })
295+ return _c
296+}
297+
298+func (_c *MockSessionSpawner_SpawnWithSession_Call) Return(err error) *MockSessionSpawner_SpawnWithSession_Call {
299+ _c.Call.Return(err)
300+ return _c
301+}
302+
303+func (_c *MockSessionSpawner_SpawnWithSession_Call) RunAndReturn(run func(sessionID entity.SessionID) error) *MockSessionSpawner_SpawnWithSession_Call {
304+ _c.Call.Return(run)
305+ return _c
306+}
307+
308+// NewMockSnapshotService creates a new instance of MockSnapshotService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
309+// The first argument is typically a *testing.T value.
310+func NewMockSnapshotService(t interface {
311+ mock.TestingT
312+ Cleanup(func())
313+}) *MockSnapshotService {
314+ mock := &MockSnapshotService{}
315+ mock.Mock.Test(t)
316+
317+ t.Cleanup(func() { mock.AssertExpectations(t) })
318+
319+ return mock
320+}
321+
322+// MockSnapshotService is an autogenerated mock type for the SnapshotService type
323+type MockSnapshotService struct {
324+ mock.Mock
325+}
326+
327+type MockSnapshotService_Expecter struct {
328+ mock *mock.Mock
329+}
330+
331+func (_m *MockSnapshotService) EXPECT() *MockSnapshotService_Expecter {
332+ return &MockSnapshotService_Expecter{mock: &_m.Mock}
333+}
334+
335+// MarkDirty provides a mock function for the type MockSnapshotService
336+func (_mock *MockSnapshotService) MarkDirty() {
337+ _mock.Called()
338+ return
339+}
340+
341+// MockSnapshotService_MarkDirty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkDirty'
342+type MockSnapshotService_MarkDirty_Call struct {
343+ *mock.Call
344+}
345+
346+// MarkDirty is a helper method to define mock.On call
347+func (_e *MockSnapshotService_Expecter) MarkDirty() *MockSnapshotService_MarkDirty_Call {
348+ return &MockSnapshotService_MarkDirty_Call{Call: _e.mock.On("MarkDirty")}
349+}
350+
351+func (_c *MockSnapshotService_MarkDirty_Call) Run(run func()) *MockSnapshotService_MarkDirty_Call {
352+ _c.Call.Run(func(args mock.Arguments) {
353+ run()
354+ })
355+ return _c
356+}
357+
358+func (_c *MockSnapshotService_MarkDirty_Call) Return() *MockSnapshotService_MarkDirty_Call {
359+ _c.Call.Return()
360+ return _c
361+}
362+
363+func (_c *MockSnapshotService_MarkDirty_Call) RunAndReturn(run func()) *MockSnapshotService_MarkDirty_Call {
364+ _c.Run(run)
365+ return _c
366+}
367+
368+// SaveNow provides a mock function for the type MockSnapshotService
369+func (_mock *MockSnapshotService) SaveNow(ctx context.Context) error {
370+ ret := _mock.Called(ctx)
371+
372+ if len(ret) == 0 {
373+ panic("no return value specified for SaveNow")
374+ }
375+
376+ var r0 error
377+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
378+ r0 = returnFunc(ctx)
379+ } else {
380+ r0 = ret.Error(0)
381+ }
382+ return r0
383+}
384+
385+// MockSnapshotService_SaveNow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveNow'
386+type MockSnapshotService_SaveNow_Call struct {
387+ *mock.Call
388+}
389+
390+// SaveNow is a helper method to define mock.On call
391+// - ctx context.Context
392+func (_e *MockSnapshotService_Expecter) SaveNow(ctx any) *MockSnapshotService_SaveNow_Call {
393+ return &MockSnapshotService_SaveNow_Call{Call: _e.mock.On("SaveNow", ctx)}
394+}
395+
396+func (_c *MockSnapshotService_SaveNow_Call) Run(run func(ctx context.Context)) *MockSnapshotService_SaveNow_Call {
397+ _c.Call.Run(func(args mock.Arguments) {
398+ var arg0 context.Context
399+ if args[0] != nil {
400+ arg0 = args[0].(context.Context)
401+ }
402+ run(
403+ arg0,
404+ )
405+ })
406+ return _c
407+}
408+
409+func (_c *MockSnapshotService_SaveNow_Call) Return(err error) *MockSnapshotService_SaveNow_Call {
410+ _c.Call.Return(err)
411+ return _c
412+}
413+
414+func (_c *MockSnapshotService_SaveNow_Call) RunAndReturn(run func(ctx context.Context) error) *MockSnapshotService_SaveNow_Call {
415+ _c.Call.Return(run)
416+ return _c
417+}
418+
419+// SetReady provides a mock function for the type MockSnapshotService
420+func (_mock *MockSnapshotService) SetReady() {
421+ _mock.Called()
422+ return
423+}
424+
425+// MockSnapshotService_SetReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReady'
426+type MockSnapshotService_SetReady_Call struct {
427+ *mock.Call
428+}
429+
430+// SetReady is a helper method to define mock.On call
431+func (_e *MockSnapshotService_Expecter) SetReady() *MockSnapshotService_SetReady_Call {
432+ return &MockSnapshotService_SetReady_Call{Call: _e.mock.On("SetReady")}
433+}
434+
435+func (_c *MockSnapshotService_SetReady_Call) Run(run func()) *MockSnapshotService_SetReady_Call {
436+ _c.Call.Run(func(args mock.Arguments) {
437+ run()
438+ })
439+ return _c
440+}
441+
442+func (_c *MockSnapshotService_SetReady_Call) Return() *MockSnapshotService_SetReady_Call {
443+ _c.Call.Return()
444+ return _c
445+}
446+
447+func (_c *MockSnapshotService_SetReady_Call) RunAndReturn(run func()) *MockSnapshotService_SetReady_Call {
448+ _c.Run(run)
449+ return _c
450+}
451+
452+// Start provides a mock function for the type MockSnapshotService
453+func (_mock *MockSnapshotService) Start(ctx context.Context) {
454+ _mock.Called(ctx)
455+ return
456+}
457+
458+// MockSnapshotService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
459+type MockSnapshotService_Start_Call struct {
460+ *mock.Call
461+}
462+
463+// Start is a helper method to define mock.On call
464+// - ctx context.Context
465+func (_e *MockSnapshotService_Expecter) Start(ctx any) *MockSnapshotService_Start_Call {
466+ return &MockSnapshotService_Start_Call{Call: _e.mock.On("Start", ctx)}
467+}
468+
469+func (_c *MockSnapshotService_Start_Call) Run(run func(ctx context.Context)) *MockSnapshotService_Start_Call {
470+ _c.Call.Run(func(args mock.Arguments) {
471+ var arg0 context.Context
472+ if args[0] != nil {
473+ arg0 = args[0].(context.Context)
474+ }
475+ run(
476+ arg0,
477+ )
478+ })
479+ return _c
480+}
481+
482+func (_c *MockSnapshotService_Start_Call) Return() *MockSnapshotService_Start_Call {
483+ _c.Call.Return()
484+ return _c
485+}
486+
487+func (_c *MockSnapshotService_Start_Call) RunAndReturn(run func(ctx context.Context)) *MockSnapshotService_Start_Call {
488+ _c.Run(run)
489+ return _c
490+}
491+
492+// Stop provides a mock function for the type MockSnapshotService
493+func (_mock *MockSnapshotService) Stop(ctx context.Context) error {
494+ ret := _mock.Called(ctx)
495+
496+ if len(ret) == 0 {
497+ panic("no return value specified for Stop")
498+ }
499+
500+ var r0 error
501+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
502+ r0 = returnFunc(ctx)
503+ } else {
504+ r0 = ret.Error(0)
505+ }
506+ return r0
507+}
508+
509+// MockSnapshotService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
510+type MockSnapshotService_Stop_Call struct {
511+ *mock.Call
512+}
513+
514+// Stop is a helper method to define mock.On call
515+// - ctx context.Context
516+func (_e *MockSnapshotService_Expecter) Stop(ctx any) *MockSnapshotService_Stop_Call {
517+ return &MockSnapshotService_Stop_Call{Call: _e.mock.On("Stop", ctx)}
518+}
519+
520+func (_c *MockSnapshotService_Stop_Call) Run(run func(ctx context.Context)) *MockSnapshotService_Stop_Call {
521+ _c.Call.Run(func(args mock.Arguments) {
522+ var arg0 context.Context
523+ if args[0] != nil {
524+ arg0 = args[0].(context.Context)
525+ }
526+ run(
527+ arg0,
528+ )
529+ })
530+ return _c
531+}
532+
533+func (_c *MockSnapshotService_Stop_Call) Return(err error) *MockSnapshotService_Stop_Call {
534+ _c.Call.Return(err)
535+ return _c
536+}
537+
538+func (_c *MockSnapshotService_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockSnapshotService_Stop_Call {
539+ _c.Call.Return(run)
540+ return _c
541+}
A internal/application/port/mocks/text_input.go +518 -0
@@ -0,0 +1,518 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockTextInputTarget creates a new instance of MockTextInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockTextInputTarget(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockTextInputTarget {
20+ mock := &MockTextInputTarget{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockTextInputTarget is an autogenerated mock type for the TextInputTarget type
29+type MockTextInputTarget struct {
30+ mock.Mock
31+}
32+
33+type MockTextInputTarget_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockTextInputTarget) EXPECT() *MockTextInputTarget_Expecter {
38+ return &MockTextInputTarget_Expecter{mock: &_m.Mock}
39+}
40+
41+// DeleteBeforeCursor provides a mock function for the type MockTextInputTarget
42+func (_mock *MockTextInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error {
43+ ret := _mock.Called(ctx, n)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for DeleteBeforeCursor")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok {
51+ r0 = returnFunc(ctx, n)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockTextInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor'
59+type MockTextInputTarget_DeleteBeforeCursor_Call struct {
60+ *mock.Call
61+}
62+
63+// DeleteBeforeCursor is a helper method to define mock.On call
64+// - ctx context.Context
65+// - n int
66+func (_e *MockTextInputTarget_Expecter) DeleteBeforeCursor(ctx any, n any) *MockTextInputTarget_DeleteBeforeCursor_Call {
67+ return &MockTextInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)}
68+}
69+
70+func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockTextInputTarget_DeleteBeforeCursor_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 context.Context
73+ if args[0] != nil {
74+ arg0 = args[0].(context.Context)
75+ }
76+ var arg1 int
77+ if args[1] != nil {
78+ arg1 = args[1].(int)
79+ }
80+ run(
81+ arg0,
82+ arg1,
83+ )
84+ })
85+ return _c
86+}
87+
88+func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockTextInputTarget_DeleteBeforeCursor_Call {
89+ _c.Call.Return(err)
90+ return _c
91+}
92+
93+func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockTextInputTarget_DeleteBeforeCursor_Call {
94+ _c.Call.Return(run)
95+ return _c
96+}
97+
98+// InsertText provides a mock function for the type MockTextInputTarget
99+func (_mock *MockTextInputTarget) InsertText(ctx context.Context, text string) error {
100+ ret := _mock.Called(ctx, text)
101+
102+ if len(ret) == 0 {
103+ panic("no return value specified for InsertText")
104+ }
105+
106+ var r0 error
107+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
108+ r0 = returnFunc(ctx, text)
109+ } else {
110+ r0 = ret.Error(0)
111+ }
112+ return r0
113+}
114+
115+// MockTextInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText'
116+type MockTextInputTarget_InsertText_Call struct {
117+ *mock.Call
118+}
119+
120+// InsertText is a helper method to define mock.On call
121+// - ctx context.Context
122+// - text string
123+func (_e *MockTextInputTarget_Expecter) InsertText(ctx any, text any) *MockTextInputTarget_InsertText_Call {
124+ return &MockTextInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)}
125+}
126+
127+func (_c *MockTextInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockTextInputTarget_InsertText_Call {
128+ _c.Call.Run(func(args mock.Arguments) {
129+ var arg0 context.Context
130+ if args[0] != nil {
131+ arg0 = args[0].(context.Context)
132+ }
133+ var arg1 string
134+ if args[1] != nil {
135+ arg1 = args[1].(string)
136+ }
137+ run(
138+ arg0,
139+ arg1,
140+ )
141+ })
142+ return _c
143+}
144+
145+func (_c *MockTextInputTarget_InsertText_Call) Return(err error) *MockTextInputTarget_InsertText_Call {
146+ _c.Call.Return(err)
147+ return _c
148+}
149+
150+func (_c *MockTextInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockTextInputTarget_InsertText_Call {
151+ _c.Call.Return(run)
152+ return _c
153+}
154+
155+// NewMockFocusable creates a new instance of MockFocusable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
156+// The first argument is typically a *testing.T value.
157+func NewMockFocusable(t interface {
158+ mock.TestingT
159+ Cleanup(func())
160+}) *MockFocusable {
161+ mock := &MockFocusable{}
162+ mock.Mock.Test(t)
163+
164+ t.Cleanup(func() { mock.AssertExpectations(t) })
165+
166+ return mock
167+}
168+
169+// MockFocusable is an autogenerated mock type for the Focusable type
170+type MockFocusable struct {
171+ mock.Mock
172+}
173+
174+type MockFocusable_Expecter struct {
175+ mock *mock.Mock
176+}
177+
178+func (_m *MockFocusable) EXPECT() *MockFocusable_Expecter {
179+ return &MockFocusable_Expecter{mock: &_m.Mock}
180+}
181+
182+// Focus provides a mock function for the type MockFocusable
183+func (_mock *MockFocusable) Focus(ctx context.Context) {
184+ _mock.Called(ctx)
185+ return
186+}
187+
188+// MockFocusable_Focus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Focus'
189+type MockFocusable_Focus_Call struct {
190+ *mock.Call
191+}
192+
193+// Focus is a helper method to define mock.On call
194+// - ctx context.Context
195+func (_e *MockFocusable_Expecter) Focus(ctx any) *MockFocusable_Focus_Call {
196+ return &MockFocusable_Focus_Call{Call: _e.mock.On("Focus", ctx)}
197+}
198+
199+func (_c *MockFocusable_Focus_Call) Run(run func(ctx context.Context)) *MockFocusable_Focus_Call {
200+ _c.Call.Run(func(args mock.Arguments) {
201+ var arg0 context.Context
202+ if args[0] != nil {
203+ arg0 = args[0].(context.Context)
204+ }
205+ run(
206+ arg0,
207+ )
208+ })
209+ return _c
210+}
211+
212+func (_c *MockFocusable_Focus_Call) Return() *MockFocusable_Focus_Call {
213+ _c.Call.Return()
214+ return _c
215+}
216+
217+func (_c *MockFocusable_Focus_Call) RunAndReturn(run func(ctx context.Context)) *MockFocusable_Focus_Call {
218+ _c.Run(run)
219+ return _c
220+}
221+
222+// NewMockEntryInputTarget creates a new instance of MockEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
223+// The first argument is typically a *testing.T value.
224+func NewMockEntryInputTarget(t interface {
225+ mock.TestingT
226+ Cleanup(func())
227+}) *MockEntryInputTarget {
228+ mock := &MockEntryInputTarget{}
229+ mock.Mock.Test(t)
230+
231+ t.Cleanup(func() { mock.AssertExpectations(t) })
232+
233+ return mock
234+}
235+
236+// MockEntryInputTarget is an autogenerated mock type for the EntryInputTarget type
237+type MockEntryInputTarget struct {
238+ mock.Mock
239+}
240+
241+type MockEntryInputTarget_Expecter struct {
242+ mock *mock.Mock
243+}
244+
245+func (_m *MockEntryInputTarget) EXPECT() *MockEntryInputTarget_Expecter {
246+ return &MockEntryInputTarget_Expecter{mock: &_m.Mock}
247+}
248+
249+// DeleteBeforeCursor provides a mock function for the type MockEntryInputTarget
250+func (_mock *MockEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error {
251+ ret := _mock.Called(ctx, n)
252+
253+ if len(ret) == 0 {
254+ panic("no return value specified for DeleteBeforeCursor")
255+ }
256+
257+ var r0 error
258+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok {
259+ r0 = returnFunc(ctx, n)
260+ } else {
261+ r0 = ret.Error(0)
262+ }
263+ return r0
264+}
265+
266+// MockEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor'
267+type MockEntryInputTarget_DeleteBeforeCursor_Call struct {
268+ *mock.Call
269+}
270+
271+// DeleteBeforeCursor is a helper method to define mock.On call
272+// - ctx context.Context
273+// - n int
274+func (_e *MockEntryInputTarget_Expecter) DeleteBeforeCursor(ctx any, n any) *MockEntryInputTarget_DeleteBeforeCursor_Call {
275+ return &MockEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)}
276+}
277+
278+func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockEntryInputTarget_DeleteBeforeCursor_Call {
279+ _c.Call.Run(func(args mock.Arguments) {
280+ var arg0 context.Context
281+ if args[0] != nil {
282+ arg0 = args[0].(context.Context)
283+ }
284+ var arg1 int
285+ if args[1] != nil {
286+ arg1 = args[1].(int)
287+ }
288+ run(
289+ arg0,
290+ arg1,
291+ )
292+ })
293+ return _c
294+}
295+
296+func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockEntryInputTarget_DeleteBeforeCursor_Call {
297+ _c.Call.Return(err)
298+ return _c
299+}
300+
301+func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockEntryInputTarget_DeleteBeforeCursor_Call {
302+ _c.Call.Return(run)
303+ return _c
304+}
305+
306+// InsertText provides a mock function for the type MockEntryInputTarget
307+func (_mock *MockEntryInputTarget) InsertText(ctx context.Context, text string) error {
308+ ret := _mock.Called(ctx, text)
309+
310+ if len(ret) == 0 {
311+ panic("no return value specified for InsertText")
312+ }
313+
314+ var r0 error
315+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
316+ r0 = returnFunc(ctx, text)
317+ } else {
318+ r0 = ret.Error(0)
319+ }
320+ return r0
321+}
322+
323+// MockEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText'
324+type MockEntryInputTarget_InsertText_Call struct {
325+ *mock.Call
326+}
327+
328+// InsertText is a helper method to define mock.On call
329+// - ctx context.Context
330+// - text string
331+func (_e *MockEntryInputTarget_Expecter) InsertText(ctx any, text any) *MockEntryInputTarget_InsertText_Call {
332+ return &MockEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)}
333+}
334+
335+func (_c *MockEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockEntryInputTarget_InsertText_Call {
336+ _c.Call.Run(func(args mock.Arguments) {
337+ var arg0 context.Context
338+ if args[0] != nil {
339+ arg0 = args[0].(context.Context)
340+ }
341+ var arg1 string
342+ if args[1] != nil {
343+ arg1 = args[1].(string)
344+ }
345+ run(
346+ arg0,
347+ arg1,
348+ )
349+ })
350+ return _c
351+}
352+
353+func (_c *MockEntryInputTarget_InsertText_Call) Return(err error) *MockEntryInputTarget_InsertText_Call {
354+ _c.Call.Return(err)
355+ return _c
356+}
357+
358+func (_c *MockEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockEntryInputTarget_InsertText_Call {
359+ _c.Call.Return(run)
360+ return _c
361+}
362+
363+// IsGTKEntryTarget provides a mock function for the type MockEntryInputTarget
364+func (_mock *MockEntryInputTarget) IsGTKEntryTarget() bool {
365+ ret := _mock.Called()
366+
367+ if len(ret) == 0 {
368+ panic("no return value specified for IsGTKEntryTarget")
369+ }
370+
371+ var r0 bool
372+ if returnFunc, ok := ret.Get(0).(func() bool); ok {
373+ r0 = returnFunc()
374+ } else {
375+ r0 = ret.Get(0).(bool)
376+ }
377+ return r0
378+}
379+
380+// MockEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget'
381+type MockEntryInputTarget_IsGTKEntryTarget_Call struct {
382+ *mock.Call
383+}
384+
385+// IsGTKEntryTarget is a helper method to define mock.On call
386+func (_e *MockEntryInputTarget_Expecter) IsGTKEntryTarget() *MockEntryInputTarget_IsGTKEntryTarget_Call {
387+ return &MockEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")}
388+}
389+
390+func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockEntryInputTarget_IsGTKEntryTarget_Call {
391+ _c.Call.Run(func(args mock.Arguments) {
392+ run()
393+ })
394+ return _c
395+}
396+
397+func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockEntryInputTarget_IsGTKEntryTarget_Call {
398+ _c.Call.Return(b)
399+ return _c
400+}
401+
402+func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockEntryInputTarget_IsGTKEntryTarget_Call {
403+ _c.Call.Return(run)
404+ return _c
405+}
406+
407+// NewMockFocusedInputProvider creates a new instance of MockFocusedInputProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
408+// The first argument is typically a *testing.T value.
409+func NewMockFocusedInputProvider(t interface {
410+ mock.TestingT
411+ Cleanup(func())
412+}) *MockFocusedInputProvider {
413+ mock := &MockFocusedInputProvider{}
414+ mock.Mock.Test(t)
415+
416+ t.Cleanup(func() { mock.AssertExpectations(t) })
417+
418+ return mock
419+}
420+
421+// MockFocusedInputProvider is an autogenerated mock type for the FocusedInputProvider type
422+type MockFocusedInputProvider struct {
423+ mock.Mock
424+}
425+
426+type MockFocusedInputProvider_Expecter struct {
427+ mock *mock.Mock
428+}
429+
430+func (_m *MockFocusedInputProvider) EXPECT() *MockFocusedInputProvider_Expecter {
431+ return &MockFocusedInputProvider_Expecter{mock: &_m.Mock}
432+}
433+
434+// GetFocusedInput provides a mock function for the type MockFocusedInputProvider
435+func (_mock *MockFocusedInputProvider) GetFocusedInput() port.TextInputTarget {
436+ ret := _mock.Called()
437+
438+ if len(ret) == 0 {
439+ panic("no return value specified for GetFocusedInput")
440+ }
441+
442+ var r0 port.TextInputTarget
443+ if returnFunc, ok := ret.Get(0).(func() port.TextInputTarget); ok {
444+ r0 = returnFunc()
445+ } else {
446+ if ret.Get(0) != nil {
447+ r0 = ret.Get(0).(port.TextInputTarget)
448+ }
449+ }
450+ return r0
451+}
452+
453+// MockFocusedInputProvider_GetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFocusedInput'
454+type MockFocusedInputProvider_GetFocusedInput_Call struct {
455+ *mock.Call
456+}
457+
458+// GetFocusedInput is a helper method to define mock.On call
459+func (_e *MockFocusedInputProvider_Expecter) GetFocusedInput() *MockFocusedInputProvider_GetFocusedInput_Call {
460+ return &MockFocusedInputProvider_GetFocusedInput_Call{Call: _e.mock.On("GetFocusedInput")}
461+}
462+
463+func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Run(run func()) *MockFocusedInputProvider_GetFocusedInput_Call {
464+ _c.Call.Run(func(args mock.Arguments) {
465+ run()
466+ })
467+ return _c
468+}
469+
470+func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Return(textInputTarget port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call {
471+ _c.Call.Return(textInputTarget)
472+ return _c
473+}
474+
475+func (_c *MockFocusedInputProvider_GetFocusedInput_Call) RunAndReturn(run func() port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call {
476+ _c.Call.Return(run)
477+ return _c
478+}
479+
480+// SetFocusedInput provides a mock function for the type MockFocusedInputProvider
481+func (_mock *MockFocusedInputProvider) SetFocusedInput(target port.TextInputTarget) {
482+ _mock.Called(target)
483+ return
484+}
485+
486+// MockFocusedInputProvider_SetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusedInput'
487+type MockFocusedInputProvider_SetFocusedInput_Call struct {
488+ *mock.Call
489+}
490+
491+// SetFocusedInput is a helper method to define mock.On call
492+// - target port.TextInputTarget
493+func (_e *MockFocusedInputProvider_Expecter) SetFocusedInput(target any) *MockFocusedInputProvider_SetFocusedInput_Call {
494+ return &MockFocusedInputProvider_SetFocusedInput_Call{Call: _e.mock.On("SetFocusedInput", target)}
495+}
496+
497+func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Run(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call {
498+ _c.Call.Run(func(args mock.Arguments) {
499+ var arg0 port.TextInputTarget
500+ if args[0] != nil {
501+ arg0 = args[0].(port.TextInputTarget)
502+ }
503+ run(
504+ arg0,
505+ )
506+ })
507+ return _c
508+}
509+
510+func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Return() *MockFocusedInputProvider_SetFocusedInput_Call {
511+ _c.Call.Return()
512+ return _c
513+}
514+
515+func (_c *MockFocusedInputProvider_SetFocusedInput_Call) RunAndReturn(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call {
516+ _c.Run(run)
517+ return _c
518+}
A internal/application/port/mocks/updater.go +680 -0
@@ -0,0 +1,680 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/port"
11+ "github.com/bnema/dumber/internal/domain/entity"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// NewMockUpdateChecker creates a new instance of MockUpdateChecker. 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.
17+func NewMockUpdateChecker(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockUpdateChecker {
21+ mock := &MockUpdateChecker{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockUpdateChecker is an autogenerated mock type for the UpdateChecker type
30+type MockUpdateChecker struct {
31+ mock.Mock
32+}
33+
34+type MockUpdateChecker_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockUpdateChecker) EXPECT() *MockUpdateChecker_Expecter {
39+ return &MockUpdateChecker_Expecter{mock: &_m.Mock}
40+}
41+
42+// CheckForUpdate provides a mock function for the type MockUpdateChecker
43+func (_mock *MockUpdateChecker) CheckForUpdate(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error) {
44+ ret := _mock.Called(ctx, currentVersion)
45+
46+ if len(ret) == 0 {
47+ panic("no return value specified for CheckForUpdate")
48+ }
49+
50+ var r0 *entity.UpdateInfo
51+ var r1 error
52+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.UpdateInfo, error)); ok {
53+ return returnFunc(ctx, currentVersion)
54+ }
55+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.UpdateInfo); ok {
56+ r0 = returnFunc(ctx, currentVersion)
57+ } else {
58+ if ret.Get(0) != nil {
59+ r0 = ret.Get(0).(*entity.UpdateInfo)
60+ }
61+ }
62+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
63+ r1 = returnFunc(ctx, currentVersion)
64+ } else {
65+ r1 = ret.Error(1)
66+ }
67+ return r0, r1
68+}
69+
70+// MockUpdateChecker_CheckForUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckForUpdate'
71+type MockUpdateChecker_CheckForUpdate_Call struct {
72+ *mock.Call
73+}
74+
75+// CheckForUpdate is a helper method to define mock.On call
76+// - ctx context.Context
77+// - currentVersion string
78+func (_e *MockUpdateChecker_Expecter) CheckForUpdate(ctx any, currentVersion any) *MockUpdateChecker_CheckForUpdate_Call {
79+ return &MockUpdateChecker_CheckForUpdate_Call{Call: _e.mock.On("CheckForUpdate", ctx, currentVersion)}
80+}
81+
82+func (_c *MockUpdateChecker_CheckForUpdate_Call) Run(run func(ctx context.Context, currentVersion string)) *MockUpdateChecker_CheckForUpdate_Call {
83+ _c.Call.Run(func(args mock.Arguments) {
84+ var arg0 context.Context
85+ if args[0] != nil {
86+ arg0 = args[0].(context.Context)
87+ }
88+ var arg1 string
89+ if args[1] != nil {
90+ arg1 = args[1].(string)
91+ }
92+ run(
93+ arg0,
94+ arg1,
95+ )
96+ })
97+ return _c
98+}
99+
100+func (_c *MockUpdateChecker_CheckForUpdate_Call) Return(updateInfo *entity.UpdateInfo, err error) *MockUpdateChecker_CheckForUpdate_Call {
101+ _c.Call.Return(updateInfo, err)
102+ return _c
103+}
104+
105+func (_c *MockUpdateChecker_CheckForUpdate_Call) RunAndReturn(run func(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error)) *MockUpdateChecker_CheckForUpdate_Call {
106+ _c.Call.Return(run)
107+ return _c
108+}
109+
110+// NewMockUpdateDownloader creates a new instance of MockUpdateDownloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
111+// The first argument is typically a *testing.T value.
112+func NewMockUpdateDownloader(t interface {
113+ mock.TestingT
114+ Cleanup(func())
115+}) *MockUpdateDownloader {
116+ mock := &MockUpdateDownloader{}
117+ mock.Mock.Test(t)
118+
119+ t.Cleanup(func() { mock.AssertExpectations(t) })
120+
121+ return mock
122+}
123+
124+// MockUpdateDownloader is an autogenerated mock type for the UpdateDownloader type
125+type MockUpdateDownloader struct {
126+ mock.Mock
127+}
128+
129+type MockUpdateDownloader_Expecter struct {
130+ mock *mock.Mock
131+}
132+
133+func (_m *MockUpdateDownloader) EXPECT() *MockUpdateDownloader_Expecter {
134+ return &MockUpdateDownloader_Expecter{mock: &_m.Mock}
135+}
136+
137+// Download provides a mock function for the type MockUpdateDownloader
138+func (_mock *MockUpdateDownloader) Download(ctx context.Context, downloadURL string, destDir string) (string, error) {
139+ ret := _mock.Called(ctx, downloadURL, destDir)
140+
141+ if len(ret) == 0 {
142+ panic("no return value specified for Download")
143+ }
144+
145+ var r0 string
146+ var r1 error
147+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
148+ return returnFunc(ctx, downloadURL, destDir)
149+ }
150+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
151+ r0 = returnFunc(ctx, downloadURL, destDir)
152+ } else {
153+ r0 = ret.Get(0).(string)
154+ }
155+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
156+ r1 = returnFunc(ctx, downloadURL, destDir)
157+ } else {
158+ r1 = ret.Error(1)
159+ }
160+ return r0, r1
161+}
162+
163+// MockUpdateDownloader_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'
164+type MockUpdateDownloader_Download_Call struct {
165+ *mock.Call
166+}
167+
168+// Download is a helper method to define mock.On call
169+// - ctx context.Context
170+// - downloadURL string
171+// - destDir string
172+func (_e *MockUpdateDownloader_Expecter) Download(ctx any, downloadURL any, destDir any) *MockUpdateDownloader_Download_Call {
173+ return &MockUpdateDownloader_Download_Call{Call: _e.mock.On("Download", ctx, downloadURL, destDir)}
174+}
175+
176+func (_c *MockUpdateDownloader_Download_Call) Run(run func(ctx context.Context, downloadURL string, destDir string)) *MockUpdateDownloader_Download_Call {
177+ _c.Call.Run(func(args mock.Arguments) {
178+ var arg0 context.Context
179+ if args[0] != nil {
180+ arg0 = args[0].(context.Context)
181+ }
182+ var arg1 string
183+ if args[1] != nil {
184+ arg1 = args[1].(string)
185+ }
186+ var arg2 string
187+ if args[2] != nil {
188+ arg2 = args[2].(string)
189+ }
190+ run(
191+ arg0,
192+ arg1,
193+ arg2,
194+ )
195+ })
196+ return _c
197+}
198+
199+func (_c *MockUpdateDownloader_Download_Call) Return(archivePath string, err error) *MockUpdateDownloader_Download_Call {
200+ _c.Call.Return(archivePath, err)
201+ return _c
202+}
203+
204+func (_c *MockUpdateDownloader_Download_Call) RunAndReturn(run func(ctx context.Context, downloadURL string, destDir string) (string, error)) *MockUpdateDownloader_Download_Call {
205+ _c.Call.Return(run)
206+ return _c
207+}
208+
209+// Extract provides a mock function for the type MockUpdateDownloader
210+func (_mock *MockUpdateDownloader) Extract(ctx context.Context, archivePath string, destDir string) (string, error) {
211+ ret := _mock.Called(ctx, archivePath, destDir)
212+
213+ if len(ret) == 0 {
214+ panic("no return value specified for Extract")
215+ }
216+
217+ var r0 string
218+ var r1 error
219+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
220+ return returnFunc(ctx, archivePath, destDir)
221+ }
222+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
223+ r0 = returnFunc(ctx, archivePath, destDir)
224+ } else {
225+ r0 = ret.Get(0).(string)
226+ }
227+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
228+ r1 = returnFunc(ctx, archivePath, destDir)
229+ } else {
230+ r1 = ret.Error(1)
231+ }
232+ return r0, r1
233+}
234+
235+// MockUpdateDownloader_Extract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extract'
236+type MockUpdateDownloader_Extract_Call struct {
237+ *mock.Call
238+}
239+
240+// Extract is a helper method to define mock.On call
241+// - ctx context.Context
242+// - archivePath string
243+// - destDir string
244+func (_e *MockUpdateDownloader_Expecter) Extract(ctx any, archivePath any, destDir any) *MockUpdateDownloader_Extract_Call {
245+ return &MockUpdateDownloader_Extract_Call{Call: _e.mock.On("Extract", ctx, archivePath, destDir)}
246+}
247+
248+func (_c *MockUpdateDownloader_Extract_Call) Run(run func(ctx context.Context, archivePath string, destDir string)) *MockUpdateDownloader_Extract_Call {
249+ _c.Call.Run(func(args mock.Arguments) {
250+ var arg0 context.Context
251+ if args[0] != nil {
252+ arg0 = args[0].(context.Context)
253+ }
254+ var arg1 string
255+ if args[1] != nil {
256+ arg1 = args[1].(string)
257+ }
258+ var arg2 string
259+ if args[2] != nil {
260+ arg2 = args[2].(string)
261+ }
262+ run(
263+ arg0,
264+ arg1,
265+ arg2,
266+ )
267+ })
268+ return _c
269+}
270+
271+func (_c *MockUpdateDownloader_Extract_Call) Return(binaryPath string, err error) *MockUpdateDownloader_Extract_Call {
272+ _c.Call.Return(binaryPath, err)
273+ return _c
274+}
275+
276+func (_c *MockUpdateDownloader_Extract_Call) RunAndReturn(run func(ctx context.Context, archivePath string, destDir string) (string, error)) *MockUpdateDownloader_Extract_Call {
277+ _c.Call.Return(run)
278+ return _c
279+}
280+
281+// NewMockUpdateApplier creates a new instance of MockUpdateApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
282+// The first argument is typically a *testing.T value.
283+func NewMockUpdateApplier(t interface {
284+ mock.TestingT
285+ Cleanup(func())
286+}) *MockUpdateApplier {
287+ mock := &MockUpdateApplier{}
288+ mock.Mock.Test(t)
289+
290+ t.Cleanup(func() { mock.AssertExpectations(t) })
291+
292+ return mock
293+}
294+
295+// MockUpdateApplier is an autogenerated mock type for the UpdateApplier type
296+type MockUpdateApplier struct {
297+ mock.Mock
298+}
299+
300+type MockUpdateApplier_Expecter struct {
301+ mock *mock.Mock
302+}
303+
304+func (_m *MockUpdateApplier) EXPECT() *MockUpdateApplier_Expecter {
305+ return &MockUpdateApplier_Expecter{mock: &_m.Mock}
306+}
307+
308+// ApplyOnExit provides a mock function for the type MockUpdateApplier
309+func (_mock *MockUpdateApplier) ApplyOnExit(ctx context.Context) (string, error) {
310+ ret := _mock.Called(ctx)
311+
312+ if len(ret) == 0 {
313+ panic("no return value specified for ApplyOnExit")
314+ }
315+
316+ var r0 string
317+ var r1 error
318+ if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
319+ return returnFunc(ctx)
320+ }
321+ if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
322+ r0 = returnFunc(ctx)
323+ } else {
324+ r0 = ret.Get(0).(string)
325+ }
326+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
327+ r1 = returnFunc(ctx)
328+ } else {
329+ r1 = ret.Error(1)
330+ }
331+ return r0, r1
332+}
333+
334+// MockUpdateApplier_ApplyOnExit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyOnExit'
335+type MockUpdateApplier_ApplyOnExit_Call struct {
336+ *mock.Call
337+}
338+
339+// ApplyOnExit is a helper method to define mock.On call
340+// - ctx context.Context
341+func (_e *MockUpdateApplier_Expecter) ApplyOnExit(ctx any) *MockUpdateApplier_ApplyOnExit_Call {
342+ return &MockUpdateApplier_ApplyOnExit_Call{Call: _e.mock.On("ApplyOnExit", ctx)}
343+}
344+
345+func (_c *MockUpdateApplier_ApplyOnExit_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ApplyOnExit_Call {
346+ _c.Call.Run(func(args mock.Arguments) {
347+ var arg0 context.Context
348+ if args[0] != nil {
349+ arg0 = args[0].(context.Context)
350+ }
351+ run(
352+ arg0,
353+ )
354+ })
355+ return _c
356+}
357+
358+func (_c *MockUpdateApplier_ApplyOnExit_Call) Return(backupPath string, err error) *MockUpdateApplier_ApplyOnExit_Call {
359+ _c.Call.Return(backupPath, err)
360+ return _c
361+}
362+
363+func (_c *MockUpdateApplier_ApplyOnExit_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockUpdateApplier_ApplyOnExit_Call {
364+ _c.Call.Return(run)
365+ return _c
366+}
367+
368+// CanSelfUpdate provides a mock function for the type MockUpdateApplier
369+func (_mock *MockUpdateApplier) CanSelfUpdate(ctx context.Context) bool {
370+ ret := _mock.Called(ctx)
371+
372+ if len(ret) == 0 {
373+ panic("no return value specified for CanSelfUpdate")
374+ }
375+
376+ var r0 bool
377+ if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
378+ r0 = returnFunc(ctx)
379+ } else {
380+ r0 = ret.Get(0).(bool)
381+ }
382+ return r0
383+}
384+
385+// MockUpdateApplier_CanSelfUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanSelfUpdate'
386+type MockUpdateApplier_CanSelfUpdate_Call struct {
387+ *mock.Call
388+}
389+
390+// CanSelfUpdate is a helper method to define mock.On call
391+// - ctx context.Context
392+func (_e *MockUpdateApplier_Expecter) CanSelfUpdate(ctx any) *MockUpdateApplier_CanSelfUpdate_Call {
393+ return &MockUpdateApplier_CanSelfUpdate_Call{Call: _e.mock.On("CanSelfUpdate", ctx)}
394+}
395+
396+func (_c *MockUpdateApplier_CanSelfUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_CanSelfUpdate_Call {
397+ _c.Call.Run(func(args mock.Arguments) {
398+ var arg0 context.Context
399+ if args[0] != nil {
400+ arg0 = args[0].(context.Context)
401+ }
402+ run(
403+ arg0,
404+ )
405+ })
406+ return _c
407+}
408+
409+func (_c *MockUpdateApplier_CanSelfUpdate_Call) Return(b bool) *MockUpdateApplier_CanSelfUpdate_Call {
410+ _c.Call.Return(b)
411+ return _c
412+}
413+
414+func (_c *MockUpdateApplier_CanSelfUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_CanSelfUpdate_Call {
415+ _c.Call.Return(run)
416+ return _c
417+}
418+
419+// ClearStagedUpdate provides a mock function for the type MockUpdateApplier
420+func (_mock *MockUpdateApplier) ClearStagedUpdate(ctx context.Context) error {
421+ ret := _mock.Called(ctx)
422+
423+ if len(ret) == 0 {
424+ panic("no return value specified for ClearStagedUpdate")
425+ }
426+
427+ var r0 error
428+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
429+ r0 = returnFunc(ctx)
430+ } else {
431+ r0 = ret.Error(0)
432+ }
433+ return r0
434+}
435+
436+// MockUpdateApplier_ClearStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearStagedUpdate'
437+type MockUpdateApplier_ClearStagedUpdate_Call struct {
438+ *mock.Call
439+}
440+
441+// ClearStagedUpdate is a helper method to define mock.On call
442+// - ctx context.Context
443+func (_e *MockUpdateApplier_Expecter) ClearStagedUpdate(ctx any) *MockUpdateApplier_ClearStagedUpdate_Call {
444+ return &MockUpdateApplier_ClearStagedUpdate_Call{Call: _e.mock.On("ClearStagedUpdate", ctx)}
445+}
446+
447+func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ClearStagedUpdate_Call {
448+ _c.Call.Run(func(args mock.Arguments) {
449+ var arg0 context.Context
450+ if args[0] != nil {
451+ arg0 = args[0].(context.Context)
452+ }
453+ run(
454+ arg0,
455+ )
456+ })
457+ return _c
458+}
459+
460+func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Return(err error) *MockUpdateApplier_ClearStagedUpdate_Call {
461+ _c.Call.Return(err)
462+ return _c
463+}
464+
465+func (_c *MockUpdateApplier_ClearStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) error) *MockUpdateApplier_ClearStagedUpdate_Call {
466+ _c.Call.Return(run)
467+ return _c
468+}
469+
470+// GetBinaryPath provides a mock function for the type MockUpdateApplier
471+func (_mock *MockUpdateApplier) GetBinaryPath() (string, error) {
472+ ret := _mock.Called()
473+
474+ if len(ret) == 0 {
475+ panic("no return value specified for GetBinaryPath")
476+ }
477+
478+ var r0 string
479+ var r1 error
480+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
481+ return returnFunc()
482+ }
483+ if returnFunc, ok := ret.Get(0).(func() string); ok {
484+ r0 = returnFunc()
485+ } else {
486+ r0 = ret.Get(0).(string)
487+ }
488+ if returnFunc, ok := ret.Get(1).(func() error); ok {
489+ r1 = returnFunc()
490+ } else {
491+ r1 = ret.Error(1)
492+ }
493+ return r0, r1
494+}
495+
496+// MockUpdateApplier_GetBinaryPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBinaryPath'
497+type MockUpdateApplier_GetBinaryPath_Call struct {
498+ *mock.Call
499+}
500+
501+// GetBinaryPath is a helper method to define mock.On call
502+func (_e *MockUpdateApplier_Expecter) GetBinaryPath() *MockUpdateApplier_GetBinaryPath_Call {
503+ return &MockUpdateApplier_GetBinaryPath_Call{Call: _e.mock.On("GetBinaryPath")}
504+}
505+
506+func (_c *MockUpdateApplier_GetBinaryPath_Call) Run(run func()) *MockUpdateApplier_GetBinaryPath_Call {
507+ _c.Call.Run(func(args mock.Arguments) {
508+ run()
509+ })
510+ return _c
511+}
512+
513+func (_c *MockUpdateApplier_GetBinaryPath_Call) Return(s string, err error) *MockUpdateApplier_GetBinaryPath_Call {
514+ _c.Call.Return(s, err)
515+ return _c
516+}
517+
518+func (_c *MockUpdateApplier_GetBinaryPath_Call) RunAndReturn(run func() (string, error)) *MockUpdateApplier_GetBinaryPath_Call {
519+ _c.Call.Return(run)
520+ return _c
521+}
522+
523+// HasStagedUpdate provides a mock function for the type MockUpdateApplier
524+func (_mock *MockUpdateApplier) HasStagedUpdate(ctx context.Context) bool {
525+ ret := _mock.Called(ctx)
526+
527+ if len(ret) == 0 {
528+ panic("no return value specified for HasStagedUpdate")
529+ }
530+
531+ var r0 bool
532+ if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
533+ r0 = returnFunc(ctx)
534+ } else {
535+ r0 = ret.Get(0).(bool)
536+ }
537+ return r0
538+}
539+
540+// MockUpdateApplier_HasStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasStagedUpdate'
541+type MockUpdateApplier_HasStagedUpdate_Call struct {
542+ *mock.Call
543+}
544+
545+// HasStagedUpdate is a helper method to define mock.On call
546+// - ctx context.Context
547+func (_e *MockUpdateApplier_Expecter) HasStagedUpdate(ctx any) *MockUpdateApplier_HasStagedUpdate_Call {
548+ return &MockUpdateApplier_HasStagedUpdate_Call{Call: _e.mock.On("HasStagedUpdate", ctx)}
549+}
550+
551+func (_c *MockUpdateApplier_HasStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_HasStagedUpdate_Call {
552+ _c.Call.Run(func(args mock.Arguments) {
553+ var arg0 context.Context
554+ if args[0] != nil {
555+ arg0 = args[0].(context.Context)
556+ }
557+ run(
558+ arg0,
559+ )
560+ })
561+ return _c
562+}
563+
564+func (_c *MockUpdateApplier_HasStagedUpdate_Call) Return(b bool) *MockUpdateApplier_HasStagedUpdate_Call {
565+ _c.Call.Return(b)
566+ return _c
567+}
568+
569+func (_c *MockUpdateApplier_HasStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_HasStagedUpdate_Call {
570+ _c.Call.Return(run)
571+ return _c
572+}
573+
574+// SelfUpdateBlockedReason provides a mock function for the type MockUpdateApplier
575+func (_mock *MockUpdateApplier) SelfUpdateBlockedReason(ctx context.Context) port.SelfUpdateBlockedReason {
576+ ret := _mock.Called(ctx)
577+
578+ if len(ret) == 0 {
579+ panic("no return value specified for SelfUpdateBlockedReason")
580+ }
581+
582+ var r0 port.SelfUpdateBlockedReason
583+ if returnFunc, ok := ret.Get(0).(func(context.Context) port.SelfUpdateBlockedReason); ok {
584+ r0 = returnFunc(ctx)
585+ } else {
586+ r0 = ret.Get(0).(port.SelfUpdateBlockedReason)
587+ }
588+ return r0
589+}
590+
591+// MockUpdateApplier_SelfUpdateBlockedReason_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelfUpdateBlockedReason'
592+type MockUpdateApplier_SelfUpdateBlockedReason_Call struct {
593+ *mock.Call
594+}
595+
596+// SelfUpdateBlockedReason is a helper method to define mock.On call
597+// - ctx context.Context
598+func (_e *MockUpdateApplier_Expecter) SelfUpdateBlockedReason(ctx any) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
599+ return &MockUpdateApplier_SelfUpdateBlockedReason_Call{Call: _e.mock.On("SelfUpdateBlockedReason", ctx)}
600+}
601+
602+func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
603+ _c.Call.Run(func(args mock.Arguments) {
604+ var arg0 context.Context
605+ if args[0] != nil {
606+ arg0 = args[0].(context.Context)
607+ }
608+ run(
609+ arg0,
610+ )
611+ })
612+ return _c
613+}
614+
615+func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Return(selfUpdateBlockedReason port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
616+ _c.Call.Return(selfUpdateBlockedReason)
617+ return _c
618+}
619+
620+func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) RunAndReturn(run func(ctx context.Context) port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
621+ _c.Call.Return(run)
622+ return _c
623+}
624+
625+// StageUpdate provides a mock function for the type MockUpdateApplier
626+func (_mock *MockUpdateApplier) StageUpdate(ctx context.Context, newBinaryPath string) error {
627+ ret := _mock.Called(ctx, newBinaryPath)
628+
629+ if len(ret) == 0 {
630+ panic("no return value specified for StageUpdate")
631+ }
632+
633+ var r0 error
634+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
635+ r0 = returnFunc(ctx, newBinaryPath)
636+ } else {
637+ r0 = ret.Error(0)
638+ }
639+ return r0
640+}
641+
642+// MockUpdateApplier_StageUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StageUpdate'
643+type MockUpdateApplier_StageUpdate_Call struct {
644+ *mock.Call
645+}
646+
647+// StageUpdate is a helper method to define mock.On call
648+// - ctx context.Context
649+// - newBinaryPath string
650+func (_e *MockUpdateApplier_Expecter) StageUpdate(ctx any, newBinaryPath any) *MockUpdateApplier_StageUpdate_Call {
651+ return &MockUpdateApplier_StageUpdate_Call{Call: _e.mock.On("StageUpdate", ctx, newBinaryPath)}
652+}
653+
654+func (_c *MockUpdateApplier_StageUpdate_Call) Run(run func(ctx context.Context, newBinaryPath string)) *MockUpdateApplier_StageUpdate_Call {
655+ _c.Call.Run(func(args mock.Arguments) {
656+ var arg0 context.Context
657+ if args[0] != nil {
658+ arg0 = args[0].(context.Context)
659+ }
660+ var arg1 string
661+ if args[1] != nil {
662+ arg1 = args[1].(string)
663+ }
664+ run(
665+ arg0,
666+ arg1,
667+ )
668+ })
669+ return _c
670+}
671+
672+func (_c *MockUpdateApplier_StageUpdate_Call) Return(err error) *MockUpdateApplier_StageUpdate_Call {
673+ _c.Call.Return(err)
674+ return _c
675+}
676+
677+func (_c *MockUpdateApplier_StageUpdate_Call) RunAndReturn(run func(ctx context.Context, newBinaryPath string) error) *MockUpdateApplier_StageUpdate_Call {
678+ _c.Call.Return(run)
679+ return _c
680+}
A internal/application/port/mocks/webui_config.go +243 -0
@@ -0,0 +1,243 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/application/dto"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockSystemviewConfigReader creates a new instance of MockSystemviewConfigReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockSystemviewConfigReader(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockSystemviewConfigReader {
20+ mock := &MockSystemviewConfigReader{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockSystemviewConfigReader is an autogenerated mock type for the SystemviewConfigReader type
29+type MockSystemviewConfigReader struct {
30+ mock.Mock
31+}
32+
33+type MockSystemviewConfigReader_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockSystemviewConfigReader) EXPECT() *MockSystemviewConfigReader_Expecter {
38+ return &MockSystemviewConfigReader_Expecter{mock: &_m.Mock}
39+}
40+
41+// Current provides a mock function for the type MockSystemviewConfigReader
42+func (_mock *MockSystemviewConfigReader) Current(ctx context.Context) (dto.SystemviewConfigPayload, error) {
43+ ret := _mock.Called(ctx)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Current")
47+ }
48+
49+ var r0 dto.SystemviewConfigPayload
50+ var r1 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context) (dto.SystemviewConfigPayload, error)); ok {
52+ return returnFunc(ctx)
53+ }
54+ if returnFunc, ok := ret.Get(0).(func(context.Context) dto.SystemviewConfigPayload); ok {
55+ r0 = returnFunc(ctx)
56+ } else {
57+ r0 = ret.Get(0).(dto.SystemviewConfigPayload)
58+ }
59+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
60+ r1 = returnFunc(ctx)
61+ } else {
62+ r1 = ret.Error(1)
63+ }
64+ return r0, r1
65+}
66+
67+// MockSystemviewConfigReader_Current_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Current'
68+type MockSystemviewConfigReader_Current_Call struct {
69+ *mock.Call
70+}
71+
72+// Current is a helper method to define mock.On call
73+// - ctx context.Context
74+func (_e *MockSystemviewConfigReader_Expecter) Current(ctx any) *MockSystemviewConfigReader_Current_Call {
75+ return &MockSystemviewConfigReader_Current_Call{Call: _e.mock.On("Current", ctx)}
76+}
77+
78+func (_c *MockSystemviewConfigReader_Current_Call) Run(run func(ctx context.Context)) *MockSystemviewConfigReader_Current_Call {
79+ _c.Call.Run(func(args mock.Arguments) {
80+ var arg0 context.Context
81+ if args[0] != nil {
82+ arg0 = args[0].(context.Context)
83+ }
84+ run(
85+ arg0,
86+ )
87+ })
88+ return _c
89+}
90+
91+func (_c *MockSystemviewConfigReader_Current_Call) Return(systemviewConfigPayload dto.SystemviewConfigPayload, err error) *MockSystemviewConfigReader_Current_Call {
92+ _c.Call.Return(systemviewConfigPayload, err)
93+ return _c
94+}
95+
96+func (_c *MockSystemviewConfigReader_Current_Call) RunAndReturn(run func(ctx context.Context) (dto.SystemviewConfigPayload, error)) *MockSystemviewConfigReader_Current_Call {
97+ _c.Call.Return(run)
98+ return _c
99+}
100+
101+// Default provides a mock function for the type MockSystemviewConfigReader
102+func (_mock *MockSystemviewConfigReader) Default(ctx context.Context) (dto.SystemviewConfigPayload, error) {
103+ ret := _mock.Called(ctx)
104+
105+ if len(ret) == 0 {
106+ panic("no return value specified for Default")
107+ }
108+
109+ var r0 dto.SystemviewConfigPayload
110+ var r1 error
111+ if returnFunc, ok := ret.Get(0).(func(context.Context) (dto.SystemviewConfigPayload, error)); ok {
112+ return returnFunc(ctx)
113+ }
114+ if returnFunc, ok := ret.Get(0).(func(context.Context) dto.SystemviewConfigPayload); ok {
115+ r0 = returnFunc(ctx)
116+ } else {
117+ r0 = ret.Get(0).(dto.SystemviewConfigPayload)
118+ }
119+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
120+ r1 = returnFunc(ctx)
121+ } else {
122+ r1 = ret.Error(1)
123+ }
124+ return r0, r1
125+}
126+
127+// MockSystemviewConfigReader_Default_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Default'
128+type MockSystemviewConfigReader_Default_Call struct {
129+ *mock.Call
130+}
131+
132+// Default is a helper method to define mock.On call
133+// - ctx context.Context
134+func (_e *MockSystemviewConfigReader_Expecter) Default(ctx any) *MockSystemviewConfigReader_Default_Call {
135+ return &MockSystemviewConfigReader_Default_Call{Call: _e.mock.On("Default", ctx)}
136+}
137+
138+func (_c *MockSystemviewConfigReader_Default_Call) Run(run func(ctx context.Context)) *MockSystemviewConfigReader_Default_Call {
139+ _c.Call.Run(func(args mock.Arguments) {
140+ var arg0 context.Context
141+ if args[0] != nil {
142+ arg0 = args[0].(context.Context)
143+ }
144+ run(
145+ arg0,
146+ )
147+ })
148+ return _c
149+}
150+
151+func (_c *MockSystemviewConfigReader_Default_Call) Return(systemviewConfigPayload dto.SystemviewConfigPayload, err error) *MockSystemviewConfigReader_Default_Call {
152+ _c.Call.Return(systemviewConfigPayload, err)
153+ return _c
154+}
155+
156+func (_c *MockSystemviewConfigReader_Default_Call) RunAndReturn(run func(ctx context.Context) (dto.SystemviewConfigPayload, error)) *MockSystemviewConfigReader_Default_Call {
157+ _c.Call.Return(run)
158+ return _c
159+}
160+
161+// NewMockWebUIConfigSaver creates a new instance of MockWebUIConfigSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
162+// The first argument is typically a *testing.T value.
163+func NewMockWebUIConfigSaver(t interface {
164+ mock.TestingT
165+ Cleanup(func())
166+}) *MockWebUIConfigSaver {
167+ mock := &MockWebUIConfigSaver{}
168+ mock.Mock.Test(t)
169+
170+ t.Cleanup(func() { mock.AssertExpectations(t) })
171+
172+ return mock
173+}
174+
175+// MockWebUIConfigSaver is an autogenerated mock type for the WebUIConfigSaver type
176+type MockWebUIConfigSaver struct {
177+ mock.Mock
178+}
179+
180+type MockWebUIConfigSaver_Expecter struct {
181+ mock *mock.Mock
182+}
183+
184+func (_m *MockWebUIConfigSaver) EXPECT() *MockWebUIConfigSaver_Expecter {
185+ return &MockWebUIConfigSaver_Expecter{mock: &_m.Mock}
186+}
187+
188+// SaveWebUIConfig provides a mock function for the type MockWebUIConfigSaver
189+func (_mock *MockWebUIConfigSaver) SaveWebUIConfig(ctx context.Context, cfg dto.WebUIConfig) error {
190+ ret := _mock.Called(ctx, cfg)
191+
192+ if len(ret) == 0 {
193+ panic("no return value specified for SaveWebUIConfig")
194+ }
195+
196+ var r0 error
197+ if returnFunc, ok := ret.Get(0).(func(context.Context, dto.WebUIConfig) error); ok {
198+ r0 = returnFunc(ctx, cfg)
199+ } else {
200+ r0 = ret.Error(0)
201+ }
202+ return r0
203+}
204+
205+// MockWebUIConfigSaver_SaveWebUIConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveWebUIConfig'
206+type MockWebUIConfigSaver_SaveWebUIConfig_Call struct {
207+ *mock.Call
208+}
209+
210+// SaveWebUIConfig is a helper method to define mock.On call
211+// - ctx context.Context
212+// - cfg dto.WebUIConfig
213+func (_e *MockWebUIConfigSaver_Expecter) SaveWebUIConfig(ctx any, cfg any) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
214+ return &MockWebUIConfigSaver_SaveWebUIConfig_Call{Call: _e.mock.On("SaveWebUIConfig", ctx, cfg)}
215+}
216+
217+func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) Run(run func(ctx context.Context, cfg dto.WebUIConfig)) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
218+ _c.Call.Run(func(args mock.Arguments) {
219+ var arg0 context.Context
220+ if args[0] != nil {
221+ arg0 = args[0].(context.Context)
222+ }
223+ var arg1 dto.WebUIConfig
224+ if args[1] != nil {
225+ arg1 = args[1].(dto.WebUIConfig)
226+ }
227+ run(
228+ arg0,
229+ arg1,
230+ )
231+ })
232+ return _c
233+}
234+
235+func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) Return(err error) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
236+ _c.Call.Return(err)
237+ return _c
238+}
239+
240+func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) RunAndReturn(run func(ctx context.Context, cfg dto.WebUIConfig) error) *MockWebUIConfigSaver_SaveWebUIConfig_Call {
241+ _c.Call.Return(run)
242+ return _c
243+}
A internal/application/port/mocks/webview.go +3042 -0 large diff (3042 lines changed): collapsed
A internal/application/port/mocks/xdg.go +566 -0
@@ -0,0 +1,566 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ mock "github.com/stretchr/testify/mock"
9+)
10+
11+// NewMockXDGPaths creates a new instance of MockXDGPaths. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12+// The first argument is typically a *testing.T value.
13+func NewMockXDGPaths(t interface {
14+ mock.TestingT
15+ Cleanup(func())
16+}) *MockXDGPaths {
17+ mock := &MockXDGPaths{}
18+ mock.Mock.Test(t)
19+
20+ t.Cleanup(func() { mock.AssertExpectations(t) })
21+
22+ return mock
23+}
24+
25+// MockXDGPaths is an autogenerated mock type for the XDGPaths type
26+type MockXDGPaths struct {
27+ mock.Mock
28+}
29+
30+type MockXDGPaths_Expecter struct {
31+ mock *mock.Mock
32+}
33+
34+func (_m *MockXDGPaths) EXPECT() *MockXDGPaths_Expecter {
35+ return &MockXDGPaths_Expecter{mock: &_m.Mock}
36+}
37+
38+// CacheDir provides a mock function for the type MockXDGPaths
39+func (_mock *MockXDGPaths) CacheDir() (string, error) {
40+ ret := _mock.Called()
41+
42+ if len(ret) == 0 {
43+ panic("no return value specified for CacheDir")
44+ }
45+
46+ var r0 string
47+ var r1 error
48+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
49+ return returnFunc()
50+ }
51+ if returnFunc, ok := ret.Get(0).(func() string); ok {
52+ r0 = returnFunc()
53+ } else {
54+ r0 = ret.Get(0).(string)
55+ }
56+ if returnFunc, ok := ret.Get(1).(func() error); ok {
57+ r1 = returnFunc()
58+ } else {
59+ r1 = ret.Error(1)
60+ }
61+ return r0, r1
62+}
63+
64+// MockXDGPaths_CacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CacheDir'
65+type MockXDGPaths_CacheDir_Call struct {
66+ *mock.Call
67+}
68+
69+// CacheDir is a helper method to define mock.On call
70+func (_e *MockXDGPaths_Expecter) CacheDir() *MockXDGPaths_CacheDir_Call {
71+ return &MockXDGPaths_CacheDir_Call{Call: _e.mock.On("CacheDir")}
72+}
73+
74+func (_c *MockXDGPaths_CacheDir_Call) Run(run func()) *MockXDGPaths_CacheDir_Call {
75+ _c.Call.Run(func(args mock.Arguments) {
76+ run()
77+ })
78+ return _c
79+}
80+
81+func (_c *MockXDGPaths_CacheDir_Call) Return(s string, err error) *MockXDGPaths_CacheDir_Call {
82+ _c.Call.Return(s, err)
83+ return _c
84+}
85+
86+func (_c *MockXDGPaths_CacheDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_CacheDir_Call {
87+ _c.Call.Return(run)
88+ return _c
89+}
90+
91+// ConfigDir provides a mock function for the type MockXDGPaths
92+func (_mock *MockXDGPaths) ConfigDir() (string, error) {
93+ ret := _mock.Called()
94+
95+ if len(ret) == 0 {
96+ panic("no return value specified for ConfigDir")
97+ }
98+
99+ var r0 string
100+ var r1 error
101+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
102+ return returnFunc()
103+ }
104+ if returnFunc, ok := ret.Get(0).(func() string); ok {
105+ r0 = returnFunc()
106+ } else {
107+ r0 = ret.Get(0).(string)
108+ }
109+ if returnFunc, ok := ret.Get(1).(func() error); ok {
110+ r1 = returnFunc()
111+ } else {
112+ r1 = ret.Error(1)
113+ }
114+ return r0, r1
115+}
116+
117+// MockXDGPaths_ConfigDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigDir'
118+type MockXDGPaths_ConfigDir_Call struct {
119+ *mock.Call
120+}
121+
122+// ConfigDir is a helper method to define mock.On call
123+func (_e *MockXDGPaths_Expecter) ConfigDir() *MockXDGPaths_ConfigDir_Call {
124+ return &MockXDGPaths_ConfigDir_Call{Call: _e.mock.On("ConfigDir")}
125+}
126+
127+func (_c *MockXDGPaths_ConfigDir_Call) Run(run func()) *MockXDGPaths_ConfigDir_Call {
128+ _c.Call.Run(func(args mock.Arguments) {
129+ run()
130+ })
131+ return _c
132+}
133+
134+func (_c *MockXDGPaths_ConfigDir_Call) Return(s string, err error) *MockXDGPaths_ConfigDir_Call {
135+ _c.Call.Return(s, err)
136+ return _c
137+}
138+
139+func (_c *MockXDGPaths_ConfigDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_ConfigDir_Call {
140+ _c.Call.Return(run)
141+ return _c
142+}
143+
144+// DataDir provides a mock function for the type MockXDGPaths
145+func (_mock *MockXDGPaths) DataDir() (string, error) {
146+ ret := _mock.Called()
147+
148+ if len(ret) == 0 {
149+ panic("no return value specified for DataDir")
150+ }
151+
152+ var r0 string
153+ var r1 error
154+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
155+ return returnFunc()
156+ }
157+ if returnFunc, ok := ret.Get(0).(func() string); ok {
158+ r0 = returnFunc()
159+ } else {
160+ r0 = ret.Get(0).(string)
161+ }
162+ if returnFunc, ok := ret.Get(1).(func() error); ok {
163+ r1 = returnFunc()
164+ } else {
165+ r1 = ret.Error(1)
166+ }
167+ return r0, r1
168+}
169+
170+// MockXDGPaths_DataDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DataDir'
171+type MockXDGPaths_DataDir_Call struct {
172+ *mock.Call
173+}
174+
175+// DataDir is a helper method to define mock.On call
176+func (_e *MockXDGPaths_Expecter) DataDir() *MockXDGPaths_DataDir_Call {
177+ return &MockXDGPaths_DataDir_Call{Call: _e.mock.On("DataDir")}
178+}
179+
180+func (_c *MockXDGPaths_DataDir_Call) Run(run func()) *MockXDGPaths_DataDir_Call {
181+ _c.Call.Run(func(args mock.Arguments) {
182+ run()
183+ })
184+ return _c
185+}
186+
187+func (_c *MockXDGPaths_DataDir_Call) Return(s string, err error) *MockXDGPaths_DataDir_Call {
188+ _c.Call.Return(s, err)
189+ return _c
190+}
191+
192+func (_c *MockXDGPaths_DataDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_DataDir_Call {
193+ _c.Call.Return(run)
194+ return _c
195+}
196+
197+// DownloadDir provides a mock function for the type MockXDGPaths
198+func (_mock *MockXDGPaths) DownloadDir() (string, error) {
199+ ret := _mock.Called()
200+
201+ if len(ret) == 0 {
202+ panic("no return value specified for DownloadDir")
203+ }
204+
205+ var r0 string
206+ var r1 error
207+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
208+ return returnFunc()
209+ }
210+ if returnFunc, ok := ret.Get(0).(func() string); ok {
211+ r0 = returnFunc()
212+ } else {
213+ r0 = ret.Get(0).(string)
214+ }
215+ if returnFunc, ok := ret.Get(1).(func() error); ok {
216+ r1 = returnFunc()
217+ } else {
218+ r1 = ret.Error(1)
219+ }
220+ return r0, r1
221+}
222+
223+// MockXDGPaths_DownloadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DownloadDir'
224+type MockXDGPaths_DownloadDir_Call struct {
225+ *mock.Call
226+}
227+
228+// DownloadDir is a helper method to define mock.On call
229+func (_e *MockXDGPaths_Expecter) DownloadDir() *MockXDGPaths_DownloadDir_Call {
230+ return &MockXDGPaths_DownloadDir_Call{Call: _e.mock.On("DownloadDir")}
231+}
232+
233+func (_c *MockXDGPaths_DownloadDir_Call) Run(run func()) *MockXDGPaths_DownloadDir_Call {
234+ _c.Call.Run(func(args mock.Arguments) {
235+ run()
236+ })
237+ return _c
238+}
239+
240+func (_c *MockXDGPaths_DownloadDir_Call) Return(s string, err error) *MockXDGPaths_DownloadDir_Call {
241+ _c.Call.Return(s, err)
242+ return _c
243+}
244+
245+func (_c *MockXDGPaths_DownloadDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_DownloadDir_Call {
246+ _c.Call.Return(run)
247+ return _c
248+}
249+
250+// FilterCacheDir provides a mock function for the type MockXDGPaths
251+func (_mock *MockXDGPaths) FilterCacheDir() (string, error) {
252+ ret := _mock.Called()
253+
254+ if len(ret) == 0 {
255+ panic("no return value specified for FilterCacheDir")
256+ }
257+
258+ var r0 string
259+ var r1 error
260+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
261+ return returnFunc()
262+ }
263+ if returnFunc, ok := ret.Get(0).(func() string); ok {
264+ r0 = returnFunc()
265+ } else {
266+ r0 = ret.Get(0).(string)
267+ }
268+ if returnFunc, ok := ret.Get(1).(func() error); ok {
269+ r1 = returnFunc()
270+ } else {
271+ r1 = ret.Error(1)
272+ }
273+ return r0, r1
274+}
275+
276+// MockXDGPaths_FilterCacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterCacheDir'
277+type MockXDGPaths_FilterCacheDir_Call struct {
278+ *mock.Call
279+}
280+
281+// FilterCacheDir is a helper method to define mock.On call
282+func (_e *MockXDGPaths_Expecter) FilterCacheDir() *MockXDGPaths_FilterCacheDir_Call {
283+ return &MockXDGPaths_FilterCacheDir_Call{Call: _e.mock.On("FilterCacheDir")}
284+}
285+
286+func (_c *MockXDGPaths_FilterCacheDir_Call) Run(run func()) *MockXDGPaths_FilterCacheDir_Call {
287+ _c.Call.Run(func(args mock.Arguments) {
288+ run()
289+ })
290+ return _c
291+}
292+
293+func (_c *MockXDGPaths_FilterCacheDir_Call) Return(s string, err error) *MockXDGPaths_FilterCacheDir_Call {
294+ _c.Call.Return(s, err)
295+ return _c
296+}
297+
298+func (_c *MockXDGPaths_FilterCacheDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterCacheDir_Call {
299+ _c.Call.Return(run)
300+ return _c
301+}
302+
303+// FilterJSONDir provides a mock function for the type MockXDGPaths
304+func (_mock *MockXDGPaths) FilterJSONDir() (string, error) {
305+ ret := _mock.Called()
306+
307+ if len(ret) == 0 {
308+ panic("no return value specified for FilterJSONDir")
309+ }
310+
311+ var r0 string
312+ var r1 error
313+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
314+ return returnFunc()
315+ }
316+ if returnFunc, ok := ret.Get(0).(func() string); ok {
317+ r0 = returnFunc()
318+ } else {
319+ r0 = ret.Get(0).(string)
320+ }
321+ if returnFunc, ok := ret.Get(1).(func() error); ok {
322+ r1 = returnFunc()
323+ } else {
324+ r1 = ret.Error(1)
325+ }
326+ return r0, r1
327+}
328+
329+// MockXDGPaths_FilterJSONDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterJSONDir'
330+type MockXDGPaths_FilterJSONDir_Call struct {
331+ *mock.Call
332+}
333+
334+// FilterJSONDir is a helper method to define mock.On call
335+func (_e *MockXDGPaths_Expecter) FilterJSONDir() *MockXDGPaths_FilterJSONDir_Call {
336+ return &MockXDGPaths_FilterJSONDir_Call{Call: _e.mock.On("FilterJSONDir")}
337+}
338+
339+func (_c *MockXDGPaths_FilterJSONDir_Call) Run(run func()) *MockXDGPaths_FilterJSONDir_Call {
340+ _c.Call.Run(func(args mock.Arguments) {
341+ run()
342+ })
343+ return _c
344+}
345+
346+func (_c *MockXDGPaths_FilterJSONDir_Call) Return(s string, err error) *MockXDGPaths_FilterJSONDir_Call {
347+ _c.Call.Return(s, err)
348+ return _c
349+}
350+
351+func (_c *MockXDGPaths_FilterJSONDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterJSONDir_Call {
352+ _c.Call.Return(run)
353+ return _c
354+}
355+
356+// FilterStoreDir provides a mock function for the type MockXDGPaths
357+func (_mock *MockXDGPaths) FilterStoreDir() (string, error) {
358+ ret := _mock.Called()
359+
360+ if len(ret) == 0 {
361+ panic("no return value specified for FilterStoreDir")
362+ }
363+
364+ var r0 string
365+ var r1 error
366+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
367+ return returnFunc()
368+ }
369+ if returnFunc, ok := ret.Get(0).(func() string); ok {
370+ r0 = returnFunc()
371+ } else {
372+ r0 = ret.Get(0).(string)
373+ }
374+ if returnFunc, ok := ret.Get(1).(func() error); ok {
375+ r1 = returnFunc()
376+ } else {
377+ r1 = ret.Error(1)
378+ }
379+ return r0, r1
380+}
381+
382+// MockXDGPaths_FilterStoreDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterStoreDir'
383+type MockXDGPaths_FilterStoreDir_Call struct {
384+ *mock.Call
385+}
386+
387+// FilterStoreDir is a helper method to define mock.On call
388+func (_e *MockXDGPaths_Expecter) FilterStoreDir() *MockXDGPaths_FilterStoreDir_Call {
389+ return &MockXDGPaths_FilterStoreDir_Call{Call: _e.mock.On("FilterStoreDir")}
390+}
391+
392+func (_c *MockXDGPaths_FilterStoreDir_Call) Run(run func()) *MockXDGPaths_FilterStoreDir_Call {
393+ _c.Call.Run(func(args mock.Arguments) {
394+ run()
395+ })
396+ return _c
397+}
398+
399+func (_c *MockXDGPaths_FilterStoreDir_Call) Return(s string, err error) *MockXDGPaths_FilterStoreDir_Call {
400+ _c.Call.Return(s, err)
401+ return _c
402+}
403+
404+func (_c *MockXDGPaths_FilterStoreDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterStoreDir_Call {
405+ _c.Call.Return(run)
406+ return _c
407+}
408+
409+// ManDir provides a mock function for the type MockXDGPaths
410+func (_mock *MockXDGPaths) ManDir() (string, error) {
411+ ret := _mock.Called()
412+
413+ if len(ret) == 0 {
414+ panic("no return value specified for ManDir")
415+ }
416+
417+ var r0 string
418+ var r1 error
419+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
420+ return returnFunc()
421+ }
422+ if returnFunc, ok := ret.Get(0).(func() string); ok {
423+ r0 = returnFunc()
424+ } else {
425+ r0 = ret.Get(0).(string)
426+ }
427+ if returnFunc, ok := ret.Get(1).(func() error); ok {
428+ r1 = returnFunc()
429+ } else {
430+ r1 = ret.Error(1)
431+ }
432+ return r0, r1
433+}
434+
435+// MockXDGPaths_ManDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ManDir'
436+type MockXDGPaths_ManDir_Call struct {
437+ *mock.Call
438+}
439+
440+// ManDir is a helper method to define mock.On call
441+func (_e *MockXDGPaths_Expecter) ManDir() *MockXDGPaths_ManDir_Call {
442+ return &MockXDGPaths_ManDir_Call{Call: _e.mock.On("ManDir")}
443+}
444+
445+func (_c *MockXDGPaths_ManDir_Call) Run(run func()) *MockXDGPaths_ManDir_Call {
446+ _c.Call.Run(func(args mock.Arguments) {
447+ run()
448+ })
449+ return _c
450+}
451+
452+func (_c *MockXDGPaths_ManDir_Call) Return(s string, err error) *MockXDGPaths_ManDir_Call {
453+ _c.Call.Return(s, err)
454+ return _c
455+}
456+
457+func (_c *MockXDGPaths_ManDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_ManDir_Call {
458+ _c.Call.Return(run)
459+ return _c
460+}
461+
462+// RuntimeDir provides a mock function for the type MockXDGPaths
463+func (_mock *MockXDGPaths) RuntimeDir() (string, error) {
464+ ret := _mock.Called()
465+
466+ if len(ret) == 0 {
467+ panic("no return value specified for RuntimeDir")
468+ }
469+
470+ var r0 string
471+ var r1 error
472+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
473+ return returnFunc()
474+ }
475+ if returnFunc, ok := ret.Get(0).(func() string); ok {
476+ r0 = returnFunc()
477+ } else {
478+ r0 = ret.Get(0).(string)
479+ }
480+ if returnFunc, ok := ret.Get(1).(func() error); ok {
481+ r1 = returnFunc()
482+ } else {
483+ r1 = ret.Error(1)
484+ }
485+ return r0, r1
486+}
487+
488+// MockXDGPaths_RuntimeDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RuntimeDir'
489+type MockXDGPaths_RuntimeDir_Call struct {
490+ *mock.Call
491+}
492+
493+// RuntimeDir is a helper method to define mock.On call
494+func (_e *MockXDGPaths_Expecter) RuntimeDir() *MockXDGPaths_RuntimeDir_Call {
495+ return &MockXDGPaths_RuntimeDir_Call{Call: _e.mock.On("RuntimeDir")}
496+}
497+
498+func (_c *MockXDGPaths_RuntimeDir_Call) Run(run func()) *MockXDGPaths_RuntimeDir_Call {
499+ _c.Call.Run(func(args mock.Arguments) {
500+ run()
501+ })
502+ return _c
503+}
504+
505+func (_c *MockXDGPaths_RuntimeDir_Call) Return(s string, err error) *MockXDGPaths_RuntimeDir_Call {
506+ _c.Call.Return(s, err)
507+ return _c
508+}
509+
510+func (_c *MockXDGPaths_RuntimeDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_RuntimeDir_Call {
511+ _c.Call.Return(run)
512+ return _c
513+}
514+
515+// StateDir provides a mock function for the type MockXDGPaths
516+func (_mock *MockXDGPaths) StateDir() (string, error) {
517+ ret := _mock.Called()
518+
519+ if len(ret) == 0 {
520+ panic("no return value specified for StateDir")
521+ }
522+
523+ var r0 string
524+ var r1 error
525+ if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
526+ return returnFunc()
527+ }
528+ if returnFunc, ok := ret.Get(0).(func() string); ok {
529+ r0 = returnFunc()
530+ } else {
531+ r0 = ret.Get(0).(string)
532+ }
533+ if returnFunc, ok := ret.Get(1).(func() error); ok {
534+ r1 = returnFunc()
535+ } else {
536+ r1 = ret.Error(1)
537+ }
538+ return r0, r1
539+}
540+
541+// MockXDGPaths_StateDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateDir'
542+type MockXDGPaths_StateDir_Call struct {
543+ *mock.Call
544+}
545+
546+// StateDir is a helper method to define mock.On call
547+func (_e *MockXDGPaths_Expecter) StateDir() *MockXDGPaths_StateDir_Call {
548+ return &MockXDGPaths_StateDir_Call{Call: _e.mock.On("StateDir")}
549+}
550+
551+func (_c *MockXDGPaths_StateDir_Call) Run(run func()) *MockXDGPaths_StateDir_Call {
552+ _c.Call.Run(func(args mock.Arguments) {
553+ run()
554+ })
555+ return _c
556+}
557+
558+func (_c *MockXDGPaths_StateDir_Call) Return(s string, err error) *MockXDGPaths_StateDir_Call {
559+ _c.Call.Return(s, err)
560+ return _c
561+}
562+
563+func (_c *MockXDGPaths_StateDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_StateDir_Call {
564+ _c.Call.Return(run)
565+ return _c
566+}
A internal/domain/repository/mocks/favorite.go +1611 -0
@@ -0,0 +1,1611 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/domain/entity"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// 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.
15+// The first argument is typically a *testing.T value.
16+func NewMockFavoriteRepository(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockFavoriteRepository {
20+ mock := &MockFavoriteRepository{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockFavoriteRepository is an autogenerated mock type for the FavoriteRepository type
29+type MockFavoriteRepository struct {
30+ mock.Mock
31+}
32+
33+type MockFavoriteRepository_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockFavoriteRepository) EXPECT() *MockFavoriteRepository_Expecter {
38+ return &MockFavoriteRepository_Expecter{mock: &_m.Mock}
39+}
40+
41+// Delete provides a mock function for the type MockFavoriteRepository
42+func (_mock *MockFavoriteRepository) Delete(ctx context.Context, id entity.FavoriteID) error {
43+ ret := _mock.Called(ctx, id)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Delete")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok {
51+ r0 = returnFunc(ctx, id)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockFavoriteRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
59+type MockFavoriteRepository_Delete_Call struct {
60+ *mock.Call
61+}
62+
63+// Delete is a helper method to define mock.On call
64+// - ctx context.Context
65+// - id entity.FavoriteID
66+func (_e *MockFavoriteRepository_Expecter) Delete(ctx any, id any) *MockFavoriteRepository_Delete_Call {
67+ return &MockFavoriteRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
68+}
69+
70+func (_c *MockFavoriteRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_Delete_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 context.Context
73+ if args[0] != nil {
74+ arg0 = args[0].(context.Context)
75+ }
76+ var arg1 entity.FavoriteID
77+ if args[1] != nil {
78+ arg1 = args[1].(entity.FavoriteID)
79+ }
80+ run(
81+ arg0,
82+ arg1,
83+ )
84+ })
85+ return _c
86+}
87+
88+func (_c *MockFavoriteRepository_Delete_Call) Return(err error) *MockFavoriteRepository_Delete_Call {
89+ _c.Call.Return(err)
90+ return _c
91+}
92+
93+func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call {
94+ _c.Call.Return(run)
95+ return _c
96+}
97+
98+// FindByID provides a mock function for the type MockFavoriteRepository
99+func (_mock *MockFavoriteRepository) FindByID(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error) {
100+ ret := _mock.Called(ctx, id)
101+
102+ if len(ret) == 0 {
103+ panic("no return value specified for FindByID")
104+ }
105+
106+ var r0 *entity.Favorite
107+ var r1 error
108+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok {
109+ return returnFunc(ctx, id)
110+ }
111+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok {
112+ r0 = returnFunc(ctx, id)
113+ } else {
114+ if ret.Get(0) != nil {
115+ r0 = ret.Get(0).(*entity.Favorite)
116+ }
117+ }
118+ if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
119+ r1 = returnFunc(ctx, id)
120+ } else {
121+ r1 = ret.Error(1)
122+ }
123+ return r0, r1
124+}
125+
126+// MockFavoriteRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
127+type MockFavoriteRepository_FindByID_Call struct {
128+ *mock.Call
129+}
130+
131+// FindByID is a helper method to define mock.On call
132+// - ctx context.Context
133+// - id entity.FavoriteID
134+func (_e *MockFavoriteRepository_Expecter) FindByID(ctx any, id any) *MockFavoriteRepository_FindByID_Call {
135+ return &MockFavoriteRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
136+}
137+
138+func (_c *MockFavoriteRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_FindByID_Call {
139+ _c.Call.Run(func(args mock.Arguments) {
140+ var arg0 context.Context
141+ if args[0] != nil {
142+ arg0 = args[0].(context.Context)
143+ }
144+ var arg1 entity.FavoriteID
145+ if args[1] != nil {
146+ arg1 = args[1].(entity.FavoriteID)
147+ }
148+ run(
149+ arg0,
150+ arg1,
151+ )
152+ })
153+ return _c
154+}
155+
156+func (_c *MockFavoriteRepository_FindByID_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByID_Call {
157+ _c.Call.Return(favorite, err)
158+ return _c
159+}
160+
161+func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call {
162+ _c.Call.Return(run)
163+ return _c
164+}
165+
166+// FindByURL provides a mock function for the type MockFavoriteRepository
167+func (_mock *MockFavoriteRepository) FindByURL(ctx context.Context, url string) (*entity.Favorite, error) {
168+ ret := _mock.Called(ctx, url)
169+
170+ if len(ret) == 0 {
171+ panic("no return value specified for FindByURL")
172+ }
173+
174+ var r0 *entity.Favorite
175+ var r1 error
176+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok {
177+ return returnFunc(ctx, url)
178+ }
179+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok {
180+ r0 = returnFunc(ctx, url)
181+ } else {
182+ if ret.Get(0) != nil {
183+ r0 = ret.Get(0).(*entity.Favorite)
184+ }
185+ }
186+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
187+ r1 = returnFunc(ctx, url)
188+ } else {
189+ r1 = ret.Error(1)
190+ }
191+ return r0, r1
192+}
193+
194+// MockFavoriteRepository_FindByURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByURL'
195+type MockFavoriteRepository_FindByURL_Call struct {
196+ *mock.Call
197+}
198+
199+// FindByURL is a helper method to define mock.On call
200+// - ctx context.Context
201+// - url string
202+func (_e *MockFavoriteRepository_Expecter) FindByURL(ctx any, url any) *MockFavoriteRepository_FindByURL_Call {
203+ return &MockFavoriteRepository_FindByURL_Call{Call: _e.mock.On("FindByURL", ctx, url)}
204+}
205+
206+func (_c *MockFavoriteRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockFavoriteRepository_FindByURL_Call {
207+ _c.Call.Run(func(args mock.Arguments) {
208+ var arg0 context.Context
209+ if args[0] != nil {
210+ arg0 = args[0].(context.Context)
211+ }
212+ var arg1 string
213+ if args[1] != nil {
214+ arg1 = args[1].(string)
215+ }
216+ run(
217+ arg0,
218+ arg1,
219+ )
220+ })
221+ return _c
222+}
223+
224+func (_c *MockFavoriteRepository_FindByURL_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByURL_Call {
225+ _c.Call.Return(favorite, err)
226+ return _c
227+}
228+
229+func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call {
230+ _c.Call.Return(run)
231+ return _c
232+}
233+
234+// GetAll provides a mock function for the type MockFavoriteRepository
235+func (_mock *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favorite, error) {
236+ ret := _mock.Called(ctx)
237+
238+ if len(ret) == 0 {
239+ panic("no return value specified for GetAll")
240+ }
241+
242+ var r0 []*entity.Favorite
243+ var r1 error
244+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok {
245+ return returnFunc(ctx)
246+ }
247+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok {
248+ r0 = returnFunc(ctx)
249+ } else {
250+ if ret.Get(0) != nil {
251+ r0 = ret.Get(0).([]*entity.Favorite)
252+ }
253+ }
254+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
255+ r1 = returnFunc(ctx)
256+ } else {
257+ r1 = ret.Error(1)
258+ }
259+ return r0, r1
260+}
261+
262+// MockFavoriteRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
263+type MockFavoriteRepository_GetAll_Call struct {
264+ *mock.Call
265+}
266+
267+// GetAll is a helper method to define mock.On call
268+// - ctx context.Context
269+func (_e *MockFavoriteRepository_Expecter) GetAll(ctx any) *MockFavoriteRepository_GetAll_Call {
270+ return &MockFavoriteRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
271+}
272+
273+func (_c *MockFavoriteRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFavoriteRepository_GetAll_Call {
274+ _c.Call.Run(func(args mock.Arguments) {
275+ var arg0 context.Context
276+ if args[0] != nil {
277+ arg0 = args[0].(context.Context)
278+ }
279+ run(
280+ arg0,
281+ )
282+ })
283+ return _c
284+}
285+
286+func (_c *MockFavoriteRepository_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetAll_Call {
287+ _c.Call.Return(favorites, err)
288+ return _c
289+}
290+
291+func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call {
292+ _c.Call.Return(run)
293+ return _c
294+}
295+
296+// GetByFolder provides a mock function for the type MockFavoriteRepository
297+func (_mock *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error) {
298+ ret := _mock.Called(ctx, folderID)
299+
300+ if len(ret) == 0 {
301+ panic("no return value specified for GetByFolder")
302+ }
303+
304+ var r0 []*entity.Favorite
305+ var r1 error
306+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)); ok {
307+ return returnFunc(ctx, folderID)
308+ }
309+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Favorite); ok {
310+ r0 = returnFunc(ctx, folderID)
311+ } else {
312+ if ret.Get(0) != nil {
313+ r0 = ret.Get(0).([]*entity.Favorite)
314+ }
315+ }
316+ if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
317+ r1 = returnFunc(ctx, folderID)
318+ } else {
319+ r1 = ret.Error(1)
320+ }
321+ return r0, r1
322+}
323+
324+// MockFavoriteRepository_GetByFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFolder'
325+type MockFavoriteRepository_GetByFolder_Call struct {
326+ *mock.Call
327+}
328+
329+// GetByFolder is a helper method to define mock.On call
330+// - ctx context.Context
331+// - folderID *entity.FolderID
332+func (_e *MockFavoriteRepository_Expecter) GetByFolder(ctx any, folderID any) *MockFavoriteRepository_GetByFolder_Call {
333+ return &MockFavoriteRepository_GetByFolder_Call{Call: _e.mock.On("GetByFolder", ctx, folderID)}
334+}
335+
336+func (_c *MockFavoriteRepository_GetByFolder_Call) Run(run func(ctx context.Context, folderID *entity.FolderID)) *MockFavoriteRepository_GetByFolder_Call {
337+ _c.Call.Run(func(args mock.Arguments) {
338+ var arg0 context.Context
339+ if args[0] != nil {
340+ arg0 = args[0].(context.Context)
341+ }
342+ var arg1 *entity.FolderID
343+ if args[1] != nil {
344+ arg1 = args[1].(*entity.FolderID)
345+ }
346+ run(
347+ arg0,
348+ arg1,
349+ )
350+ })
351+ return _c
352+}
353+
354+func (_c *MockFavoriteRepository_GetByFolder_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetByFolder_Call {
355+ _c.Call.Return(favorites, err)
356+ return _c
357+}
358+
359+func (_c *MockFavoriteRepository_GetByFolder_Call) RunAndReturn(run func(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByFolder_Call {
360+ _c.Call.Return(run)
361+ return _c
362+}
363+
364+// GetByShortcut provides a mock function for the type MockFavoriteRepository
365+func (_mock *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) {
366+ ret := _mock.Called(ctx, key)
367+
368+ if len(ret) == 0 {
369+ panic("no return value specified for GetByShortcut")
370+ }
371+
372+ var r0 *entity.Favorite
373+ var r1 error
374+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok {
375+ return returnFunc(ctx, key)
376+ }
377+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok {
378+ r0 = returnFunc(ctx, key)
379+ } else {
380+ if ret.Get(0) != nil {
381+ r0 = ret.Get(0).(*entity.Favorite)
382+ }
383+ }
384+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
385+ r1 = returnFunc(ctx, key)
386+ } else {
387+ r1 = ret.Error(1)
388+ }
389+ return r0, r1
390+}
391+
392+// MockFavoriteRepository_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut'
393+type MockFavoriteRepository_GetByShortcut_Call struct {
394+ *mock.Call
395+}
396+
397+// GetByShortcut is a helper method to define mock.On call
398+// - ctx context.Context
399+// - key int
400+func (_e *MockFavoriteRepository_Expecter) GetByShortcut(ctx any, key any) *MockFavoriteRepository_GetByShortcut_Call {
401+ return &MockFavoriteRepository_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)}
402+}
403+
404+func (_c *MockFavoriteRepository_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockFavoriteRepository_GetByShortcut_Call {
405+ _c.Call.Run(func(args mock.Arguments) {
406+ var arg0 context.Context
407+ if args[0] != nil {
408+ arg0 = args[0].(context.Context)
409+ }
410+ var arg1 int
411+ if args[1] != nil {
412+ arg1 = args[1].(int)
413+ }
414+ run(
415+ arg0,
416+ arg1,
417+ )
418+ })
419+ return _c
420+}
421+
422+func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_GetByShortcut_Call {
423+ _c.Call.Return(favorite, err)
424+ return _c
425+}
426+
427+func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call {
428+ _c.Call.Return(run)
429+ return _c
430+}
431+
432+// Save provides a mock function for the type MockFavoriteRepository
433+func (_mock *MockFavoriteRepository) Save(ctx context.Context, fav *entity.Favorite) error {
434+ ret := _mock.Called(ctx, fav)
435+
436+ if len(ret) == 0 {
437+ panic("no return value specified for Save")
438+ }
439+
440+ var r0 error
441+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok {
442+ r0 = returnFunc(ctx, fav)
443+ } else {
444+ r0 = ret.Error(0)
445+ }
446+ return r0
447+}
448+
449+// MockFavoriteRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
450+type MockFavoriteRepository_Save_Call struct {
451+ *mock.Call
452+}
453+
454+// Save is a helper method to define mock.On call
455+// - ctx context.Context
456+// - fav *entity.Favorite
457+func (_e *MockFavoriteRepository_Expecter) Save(ctx any, fav any) *MockFavoriteRepository_Save_Call {
458+ return &MockFavoriteRepository_Save_Call{Call: _e.mock.On("Save", ctx, fav)}
459+}
460+
461+func (_c *MockFavoriteRepository_Save_Call) Run(run func(ctx context.Context, fav *entity.Favorite)) *MockFavoriteRepository_Save_Call {
462+ _c.Call.Run(func(args mock.Arguments) {
463+ var arg0 context.Context
464+ if args[0] != nil {
465+ arg0 = args[0].(context.Context)
466+ }
467+ var arg1 *entity.Favorite
468+ if args[1] != nil {
469+ arg1 = args[1].(*entity.Favorite)
470+ }
471+ run(
472+ arg0,
473+ arg1,
474+ )
475+ })
476+ return _c
477+}
478+
479+func (_c *MockFavoriteRepository_Save_Call) Return(err error) *MockFavoriteRepository_Save_Call {
480+ _c.Call.Return(err)
481+ return _c
482+}
483+
484+func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(ctx context.Context, fav *entity.Favorite) error) *MockFavoriteRepository_Save_Call {
485+ _c.Call.Return(run)
486+ return _c
487+}
488+
489+// SetFolder provides a mock function for the type MockFavoriteRepository
490+func (_mock *MockFavoriteRepository) SetFolder(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error {
491+ ret := _mock.Called(ctx, id, folderID)
492+
493+ if len(ret) == 0 {
494+ panic("no return value specified for SetFolder")
495+ }
496+
497+ var r0 error
498+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok {
499+ r0 = returnFunc(ctx, id, folderID)
500+ } else {
501+ r0 = ret.Error(0)
502+ }
503+ return r0
504+}
505+
506+// MockFavoriteRepository_SetFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFolder'
507+type MockFavoriteRepository_SetFolder_Call struct {
508+ *mock.Call
509+}
510+
511+// SetFolder is a helper method to define mock.On call
512+// - ctx context.Context
513+// - id entity.FavoriteID
514+// - folderID *entity.FolderID
515+func (_e *MockFavoriteRepository_Expecter) SetFolder(ctx any, id any, folderID any) *MockFavoriteRepository_SetFolder_Call {
516+ return &MockFavoriteRepository_SetFolder_Call{Call: _e.mock.On("SetFolder", ctx, id, folderID)}
517+}
518+
519+func (_c *MockFavoriteRepository_SetFolder_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockFavoriteRepository_SetFolder_Call {
520+ _c.Call.Run(func(args mock.Arguments) {
521+ var arg0 context.Context
522+ if args[0] != nil {
523+ arg0 = args[0].(context.Context)
524+ }
525+ var arg1 entity.FavoriteID
526+ if args[1] != nil {
527+ arg1 = args[1].(entity.FavoriteID)
528+ }
529+ var arg2 *entity.FolderID
530+ if args[2] != nil {
531+ arg2 = args[2].(*entity.FolderID)
532+ }
533+ run(
534+ arg0,
535+ arg1,
536+ arg2,
537+ )
538+ })
539+ return _c
540+}
541+
542+func (_c *MockFavoriteRepository_SetFolder_Call) Return(err error) *MockFavoriteRepository_SetFolder_Call {
543+ _c.Call.Return(err)
544+ return _c
545+}
546+
547+func (_c *MockFavoriteRepository_SetFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockFavoriteRepository_SetFolder_Call {
548+ _c.Call.Return(run)
549+ return _c
550+}
551+
552+// SetShortcut provides a mock function for the type MockFavoriteRepository
553+func (_mock *MockFavoriteRepository) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error {
554+ ret := _mock.Called(ctx, id, key)
555+
556+ if len(ret) == 0 {
557+ panic("no return value specified for SetShortcut")
558+ }
559+
560+ var r0 error
561+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok {
562+ r0 = returnFunc(ctx, id, key)
563+ } else {
564+ r0 = ret.Error(0)
565+ }
566+ return r0
567+}
568+
569+// MockFavoriteRepository_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut'
570+type MockFavoriteRepository_SetShortcut_Call struct {
571+ *mock.Call
572+}
573+
574+// SetShortcut is a helper method to define mock.On call
575+// - ctx context.Context
576+// - id entity.FavoriteID
577+// - key *int
578+func (_e *MockFavoriteRepository_Expecter) SetShortcut(ctx any, id any, key any) *MockFavoriteRepository_SetShortcut_Call {
579+ return &MockFavoriteRepository_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)}
580+}
581+
582+func (_c *MockFavoriteRepository_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockFavoriteRepository_SetShortcut_Call {
583+ _c.Call.Run(func(args mock.Arguments) {
584+ var arg0 context.Context
585+ if args[0] != nil {
586+ arg0 = args[0].(context.Context)
587+ }
588+ var arg1 entity.FavoriteID
589+ if args[1] != nil {
590+ arg1 = args[1].(entity.FavoriteID)
591+ }
592+ var arg2 *int
593+ if args[2] != nil {
594+ arg2 = args[2].(*int)
595+ }
596+ run(
597+ arg0,
598+ arg1,
599+ arg2,
600+ )
601+ })
602+ return _c
603+}
604+
605+func (_c *MockFavoriteRepository_SetShortcut_Call) Return(err error) *MockFavoriteRepository_SetShortcut_Call {
606+ _c.Call.Return(err)
607+ return _c
608+}
609+
610+func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockFavoriteRepository_SetShortcut_Call {
611+ _c.Call.Return(run)
612+ return _c
613+}
614+
615+// UpdatePosition provides a mock function for the type MockFavoriteRepository
616+func (_mock *MockFavoriteRepository) UpdatePosition(ctx context.Context, id entity.FavoriteID, position int) error {
617+ ret := _mock.Called(ctx, id, position)
618+
619+ if len(ret) == 0 {
620+ panic("no return value specified for UpdatePosition")
621+ }
622+
623+ var r0 error
624+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok {
625+ r0 = returnFunc(ctx, id, position)
626+ } else {
627+ r0 = ret.Error(0)
628+ }
629+ return r0
630+}
631+
632+// MockFavoriteRepository_UpdatePosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePosition'
633+type MockFavoriteRepository_UpdatePosition_Call struct {
634+ *mock.Call
635+}
636+
637+// UpdatePosition is a helper method to define mock.On call
638+// - ctx context.Context
639+// - id entity.FavoriteID
640+// - position int
641+func (_e *MockFavoriteRepository_Expecter) UpdatePosition(ctx any, id any, position any) *MockFavoriteRepository_UpdatePosition_Call {
642+ return &MockFavoriteRepository_UpdatePosition_Call{Call: _e.mock.On("UpdatePosition", ctx, id, position)}
643+}
644+
645+func (_c *MockFavoriteRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FavoriteID, position int)) *MockFavoriteRepository_UpdatePosition_Call {
646+ _c.Call.Run(func(args mock.Arguments) {
647+ var arg0 context.Context
648+ if args[0] != nil {
649+ arg0 = args[0].(context.Context)
650+ }
651+ var arg1 entity.FavoriteID
652+ if args[1] != nil {
653+ arg1 = args[1].(entity.FavoriteID)
654+ }
655+ var arg2 int
656+ if args[2] != nil {
657+ arg2 = args[2].(int)
658+ }
659+ run(
660+ arg0,
661+ arg1,
662+ arg2,
663+ )
664+ })
665+ return _c
666+}
667+
668+func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(err error) *MockFavoriteRepository_UpdatePosition_Call {
669+ _c.Call.Return(err)
670+ return _c
671+}
672+
673+func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, position int) error) *MockFavoriteRepository_UpdatePosition_Call {
674+ _c.Call.Return(run)
675+ return _c
676+}
677+
678+// NewMockFolderRepository creates a new instance of MockFolderRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
679+// The first argument is typically a *testing.T value.
680+func NewMockFolderRepository(t interface {
681+ mock.TestingT
682+ Cleanup(func())
683+}) *MockFolderRepository {
684+ mock := &MockFolderRepository{}
685+ mock.Mock.Test(t)
686+
687+ t.Cleanup(func() { mock.AssertExpectations(t) })
688+
689+ return mock
690+}
691+
692+// MockFolderRepository is an autogenerated mock type for the FolderRepository type
693+type MockFolderRepository struct {
694+ mock.Mock
695+}
696+
697+type MockFolderRepository_Expecter struct {
698+ mock *mock.Mock
699+}
700+
701+func (_m *MockFolderRepository) EXPECT() *MockFolderRepository_Expecter {
702+ return &MockFolderRepository_Expecter{mock: &_m.Mock}
703+}
704+
705+// Delete provides a mock function for the type MockFolderRepository
706+func (_mock *MockFolderRepository) Delete(ctx context.Context, id entity.FolderID) error {
707+ ret := _mock.Called(ctx, id)
708+
709+ if len(ret) == 0 {
710+ panic("no return value specified for Delete")
711+ }
712+
713+ var r0 error
714+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok {
715+ r0 = returnFunc(ctx, id)
716+ } else {
717+ r0 = ret.Error(0)
718+ }
719+ return r0
720+}
721+
722+// MockFolderRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
723+type MockFolderRepository_Delete_Call struct {
724+ *mock.Call
725+}
726+
727+// Delete is a helper method to define mock.On call
728+// - ctx context.Context
729+// - id entity.FolderID
730+func (_e *MockFolderRepository_Expecter) Delete(ctx any, id any) *MockFolderRepository_Delete_Call {
731+ return &MockFolderRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
732+}
733+
734+func (_c *MockFolderRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_Delete_Call {
735+ _c.Call.Run(func(args mock.Arguments) {
736+ var arg0 context.Context
737+ if args[0] != nil {
738+ arg0 = args[0].(context.Context)
739+ }
740+ var arg1 entity.FolderID
741+ if args[1] != nil {
742+ arg1 = args[1].(entity.FolderID)
743+ }
744+ run(
745+ arg0,
746+ arg1,
747+ )
748+ })
749+ return _c
750+}
751+
752+func (_c *MockFolderRepository_Delete_Call) Return(err error) *MockFolderRepository_Delete_Call {
753+ _c.Call.Return(err)
754+ return _c
755+}
756+
757+func (_c *MockFolderRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockFolderRepository_Delete_Call {
758+ _c.Call.Return(run)
759+ return _c
760+}
761+
762+// FindByID provides a mock function for the type MockFolderRepository
763+func (_mock *MockFolderRepository) FindByID(ctx context.Context, id entity.FolderID) (*entity.Folder, error) {
764+ ret := _mock.Called(ctx, id)
765+
766+ if len(ret) == 0 {
767+ panic("no return value specified for FindByID")
768+ }
769+
770+ var r0 *entity.Folder
771+ var r1 error
772+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) (*entity.Folder, error)); ok {
773+ return returnFunc(ctx, id)
774+ }
775+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) *entity.Folder); ok {
776+ r0 = returnFunc(ctx, id)
777+ } else {
778+ if ret.Get(0) != nil {
779+ r0 = ret.Get(0).(*entity.Folder)
780+ }
781+ }
782+ if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FolderID) error); ok {
783+ r1 = returnFunc(ctx, id)
784+ } else {
785+ r1 = ret.Error(1)
786+ }
787+ return r0, r1
788+}
789+
790+// MockFolderRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
791+type MockFolderRepository_FindByID_Call struct {
792+ *mock.Call
793+}
794+
795+// FindByID is a helper method to define mock.On call
796+// - ctx context.Context
797+// - id entity.FolderID
798+func (_e *MockFolderRepository_Expecter) FindByID(ctx any, id any) *MockFolderRepository_FindByID_Call {
799+ return &MockFolderRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
800+}
801+
802+func (_c *MockFolderRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_FindByID_Call {
803+ _c.Call.Run(func(args mock.Arguments) {
804+ var arg0 context.Context
805+ if args[0] != nil {
806+ arg0 = args[0].(context.Context)
807+ }
808+ var arg1 entity.FolderID
809+ if args[1] != nil {
810+ arg1 = args[1].(entity.FolderID)
811+ }
812+ run(
813+ arg0,
814+ arg1,
815+ )
816+ })
817+ return _c
818+}
819+
820+func (_c *MockFolderRepository_FindByID_Call) Return(folder *entity.Folder, err error) *MockFolderRepository_FindByID_Call {
821+ _c.Call.Return(folder, err)
822+ return _c
823+}
824+
825+func (_c *MockFolderRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) (*entity.Folder, error)) *MockFolderRepository_FindByID_Call {
826+ _c.Call.Return(run)
827+ return _c
828+}
829+
830+// GetAll provides a mock function for the type MockFolderRepository
831+func (_mock *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder, error) {
832+ ret := _mock.Called(ctx)
833+
834+ if len(ret) == 0 {
835+ panic("no return value specified for GetAll")
836+ }
837+
838+ var r0 []*entity.Folder
839+ var r1 error
840+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok {
841+ return returnFunc(ctx)
842+ }
843+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok {
844+ r0 = returnFunc(ctx)
845+ } else {
846+ if ret.Get(0) != nil {
847+ r0 = ret.Get(0).([]*entity.Folder)
848+ }
849+ }
850+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
851+ r1 = returnFunc(ctx)
852+ } else {
853+ r1 = ret.Error(1)
854+ }
855+ return r0, r1
856+}
857+
858+// MockFolderRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
859+type MockFolderRepository_GetAll_Call struct {
860+ *mock.Call
861+}
862+
863+// GetAll is a helper method to define mock.On call
864+// - ctx context.Context
865+func (_e *MockFolderRepository_Expecter) GetAll(ctx any) *MockFolderRepository_GetAll_Call {
866+ return &MockFolderRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
867+}
868+
869+func (_c *MockFolderRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFolderRepository_GetAll_Call {
870+ _c.Call.Run(func(args mock.Arguments) {
871+ var arg0 context.Context
872+ if args[0] != nil {
873+ arg0 = args[0].(context.Context)
874+ }
875+ run(
876+ arg0,
877+ )
878+ })
879+ return _c
880+}
881+
882+func (_c *MockFolderRepository_GetAll_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetAll_Call {
883+ _c.Call.Return(folders, err)
884+ return _c
885+}
886+
887+func (_c *MockFolderRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockFolderRepository_GetAll_Call {
888+ _c.Call.Return(run)
889+ return _c
890+}
891+
892+// GetChildren provides a mock function for the type MockFolderRepository
893+func (_mock *MockFolderRepository) GetChildren(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error) {
894+ ret := _mock.Called(ctx, parentID)
895+
896+ if len(ret) == 0 {
897+ panic("no return value specified for GetChildren")
898+ }
899+
900+ var r0 []*entity.Folder
901+ var r1 error
902+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Folder, error)); ok {
903+ return returnFunc(ctx, parentID)
904+ }
905+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Folder); ok {
906+ r0 = returnFunc(ctx, parentID)
907+ } else {
908+ if ret.Get(0) != nil {
909+ r0 = ret.Get(0).([]*entity.Folder)
910+ }
911+ }
912+ if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
913+ r1 = returnFunc(ctx, parentID)
914+ } else {
915+ r1 = ret.Error(1)
916+ }
917+ return r0, r1
918+}
919+
920+// MockFolderRepository_GetChildren_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChildren'
921+type MockFolderRepository_GetChildren_Call struct {
922+ *mock.Call
923+}
924+
925+// GetChildren is a helper method to define mock.On call
926+// - ctx context.Context
927+// - parentID *entity.FolderID
928+func (_e *MockFolderRepository_Expecter) GetChildren(ctx any, parentID any) *MockFolderRepository_GetChildren_Call {
929+ return &MockFolderRepository_GetChildren_Call{Call: _e.mock.On("GetChildren", ctx, parentID)}
930+}
931+
932+func (_c *MockFolderRepository_GetChildren_Call) Run(run func(ctx context.Context, parentID *entity.FolderID)) *MockFolderRepository_GetChildren_Call {
933+ _c.Call.Run(func(args mock.Arguments) {
934+ var arg0 context.Context
935+ if args[0] != nil {
936+ arg0 = args[0].(context.Context)
937+ }
938+ var arg1 *entity.FolderID
939+ if args[1] != nil {
940+ arg1 = args[1].(*entity.FolderID)
941+ }
942+ run(
943+ arg0,
944+ arg1,
945+ )
946+ })
947+ return _c
948+}
949+
950+func (_c *MockFolderRepository_GetChildren_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetChildren_Call {
951+ _c.Call.Return(folders, err)
952+ return _c
953+}
954+
955+func (_c *MockFolderRepository_GetChildren_Call) RunAndReturn(run func(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error)) *MockFolderRepository_GetChildren_Call {
956+ _c.Call.Return(run)
957+ return _c
958+}
959+
960+// Save provides a mock function for the type MockFolderRepository
961+func (_mock *MockFolderRepository) Save(ctx context.Context, folder *entity.Folder) error {
962+ ret := _mock.Called(ctx, folder)
963+
964+ if len(ret) == 0 {
965+ panic("no return value specified for Save")
966+ }
967+
968+ var r0 error
969+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Folder) error); ok {
970+ r0 = returnFunc(ctx, folder)
971+ } else {
972+ r0 = ret.Error(0)
973+ }
974+ return r0
975+}
976+
977+// MockFolderRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
978+type MockFolderRepository_Save_Call struct {
979+ *mock.Call
980+}
981+
982+// Save is a helper method to define mock.On call
983+// - ctx context.Context
984+// - folder *entity.Folder
985+func (_e *MockFolderRepository_Expecter) Save(ctx any, folder any) *MockFolderRepository_Save_Call {
986+ return &MockFolderRepository_Save_Call{Call: _e.mock.On("Save", ctx, folder)}
987+}
988+
989+func (_c *MockFolderRepository_Save_Call) Run(run func(ctx context.Context, folder *entity.Folder)) *MockFolderRepository_Save_Call {
990+ _c.Call.Run(func(args mock.Arguments) {
991+ var arg0 context.Context
992+ if args[0] != nil {
993+ arg0 = args[0].(context.Context)
994+ }
995+ var arg1 *entity.Folder
996+ if args[1] != nil {
997+ arg1 = args[1].(*entity.Folder)
998+ }
999+ run(
1000+ arg0,
1001+ arg1,
1002+ )
1003+ })
1004+ return _c
1005+}
1006+
1007+func (_c *MockFolderRepository_Save_Call) Return(err error) *MockFolderRepository_Save_Call {
1008+ _c.Call.Return(err)
1009+ return _c
1010+}
1011+
1012+func (_c *MockFolderRepository_Save_Call) RunAndReturn(run func(ctx context.Context, folder *entity.Folder) error) *MockFolderRepository_Save_Call {
1013+ _c.Call.Return(run)
1014+ return _c
1015+}
1016+
1017+// UpdatePosition provides a mock function for the type MockFolderRepository
1018+func (_mock *MockFolderRepository) UpdatePosition(ctx context.Context, id entity.FolderID, position int) error {
1019+ ret := _mock.Called(ctx, id, position)
1020+
1021+ if len(ret) == 0 {
1022+ panic("no return value specified for UpdatePosition")
1023+ }
1024+
1025+ var r0 error
1026+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, int) error); ok {
1027+ r0 = returnFunc(ctx, id, position)
1028+ } else {
1029+ r0 = ret.Error(0)
1030+ }
1031+ return r0
1032+}
1033+
1034+// MockFolderRepository_UpdatePosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePosition'
1035+type MockFolderRepository_UpdatePosition_Call struct {
1036+ *mock.Call
1037+}
1038+
1039+// UpdatePosition is a helper method to define mock.On call
1040+// - ctx context.Context
1041+// - id entity.FolderID
1042+// - position int
1043+func (_e *MockFolderRepository_Expecter) UpdatePosition(ctx any, id any, position any) *MockFolderRepository_UpdatePosition_Call {
1044+ return &MockFolderRepository_UpdatePosition_Call{Call: _e.mock.On("UpdatePosition", ctx, id, position)}
1045+}
1046+
1047+func (_c *MockFolderRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FolderID, position int)) *MockFolderRepository_UpdatePosition_Call {
1048+ _c.Call.Run(func(args mock.Arguments) {
1049+ var arg0 context.Context
1050+ if args[0] != nil {
1051+ arg0 = args[0].(context.Context)
1052+ }
1053+ var arg1 entity.FolderID
1054+ if args[1] != nil {
1055+ arg1 = args[1].(entity.FolderID)
1056+ }
1057+ var arg2 int
1058+ if args[2] != nil {
1059+ arg2 = args[2].(int)
1060+ }
1061+ run(
1062+ arg0,
1063+ arg1,
1064+ arg2,
1065+ )
1066+ })
1067+ return _c
1068+}
1069+
1070+func (_c *MockFolderRepository_UpdatePosition_Call) Return(err error) *MockFolderRepository_UpdatePosition_Call {
1071+ _c.Call.Return(err)
1072+ return _c
1073+}
1074+
1075+func (_c *MockFolderRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, position int) error) *MockFolderRepository_UpdatePosition_Call {
1076+ _c.Call.Return(run)
1077+ return _c
1078+}
1079+
1080+// 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.
1081+// The first argument is typically a *testing.T value.
1082+func NewMockTagRepository(t interface {
1083+ mock.TestingT
1084+ Cleanup(func())
1085+}) *MockTagRepository {
1086+ mock := &MockTagRepository{}
1087+ mock.Mock.Test(t)
1088+
1089+ t.Cleanup(func() { mock.AssertExpectations(t) })
1090+
1091+ return mock
1092+}
1093+
1094+// MockTagRepository is an autogenerated mock type for the TagRepository type
1095+type MockTagRepository struct {
1096+ mock.Mock
1097+}
1098+
1099+type MockTagRepository_Expecter struct {
1100+ mock *mock.Mock
1101+}
1102+
1103+func (_m *MockTagRepository) EXPECT() *MockTagRepository_Expecter {
1104+ return &MockTagRepository_Expecter{mock: &_m.Mock}
1105+}
1106+
1107+// AssignToFavorite provides a mock function for the type MockTagRepository
1108+func (_mock *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
1109+ ret := _mock.Called(ctx, tagID, favID)
1110+
1111+ if len(ret) == 0 {
1112+ panic("no return value specified for AssignToFavorite")
1113+ }
1114+
1115+ var r0 error
1116+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
1117+ r0 = returnFunc(ctx, tagID, favID)
1118+ } else {
1119+ r0 = ret.Error(0)
1120+ }
1121+ return r0
1122+}
1123+
1124+// MockTagRepository_AssignToFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssignToFavorite'
1125+type MockTagRepository_AssignToFavorite_Call struct {
1126+ *mock.Call
1127+}
1128+
1129+// AssignToFavorite is a helper method to define mock.On call
1130+// - ctx context.Context
1131+// - tagID entity.TagID
1132+// - favID entity.FavoriteID
1133+func (_e *MockTagRepository_Expecter) AssignToFavorite(ctx any, tagID any, favID any) *MockTagRepository_AssignToFavorite_Call {
1134+ return &MockTagRepository_AssignToFavorite_Call{Call: _e.mock.On("AssignToFavorite", ctx, tagID, favID)}
1135+}
1136+
1137+func (_c *MockTagRepository_AssignToFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_AssignToFavorite_Call {
1138+ _c.Call.Run(func(args mock.Arguments) {
1139+ var arg0 context.Context
1140+ if args[0] != nil {
1141+ arg0 = args[0].(context.Context)
1142+ }
1143+ var arg1 entity.TagID
1144+ if args[1] != nil {
1145+ arg1 = args[1].(entity.TagID)
1146+ }
1147+ var arg2 entity.FavoriteID
1148+ if args[2] != nil {
1149+ arg2 = args[2].(entity.FavoriteID)
1150+ }
1151+ run(
1152+ arg0,
1153+ arg1,
1154+ arg2,
1155+ )
1156+ })
1157+ return _c
1158+}
1159+
1160+func (_c *MockTagRepository_AssignToFavorite_Call) Return(err error) *MockTagRepository_AssignToFavorite_Call {
1161+ _c.Call.Return(err)
1162+ return _c
1163+}
1164+
1165+func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call {
1166+ _c.Call.Return(run)
1167+ return _c
1168+}
1169+
1170+// Delete provides a mock function for the type MockTagRepository
1171+func (_mock *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error {
1172+ ret := _mock.Called(ctx, id)
1173+
1174+ if len(ret) == 0 {
1175+ panic("no return value specified for Delete")
1176+ }
1177+
1178+ var r0 error
1179+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok {
1180+ r0 = returnFunc(ctx, id)
1181+ } else {
1182+ r0 = ret.Error(0)
1183+ }
1184+ return r0
1185+}
1186+
1187+// MockTagRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
1188+type MockTagRepository_Delete_Call struct {
1189+ *mock.Call
1190+}
1191+
1192+// Delete is a helper method to define mock.On call
1193+// - ctx context.Context
1194+// - id entity.TagID
1195+func (_e *MockTagRepository_Expecter) Delete(ctx any, id any) *MockTagRepository_Delete_Call {
1196+ return &MockTagRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
1197+}
1198+
1199+func (_c *MockTagRepository_Delete_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_Delete_Call {
1200+ _c.Call.Run(func(args mock.Arguments) {
1201+ var arg0 context.Context
1202+ if args[0] != nil {
1203+ arg0 = args[0].(context.Context)
1204+ }
1205+ var arg1 entity.TagID
1206+ if args[1] != nil {
1207+ arg1 = args[1].(entity.TagID)
1208+ }
1209+ run(
1210+ arg0,
1211+ arg1,
1212+ )
1213+ })
1214+ return _c
1215+}
1216+
1217+func (_c *MockTagRepository_Delete_Call) Return(err error) *MockTagRepository_Delete_Call {
1218+ _c.Call.Return(err)
1219+ return _c
1220+}
1221+
1222+func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockTagRepository_Delete_Call {
1223+ _c.Call.Return(run)
1224+ return _c
1225+}
1226+
1227+// FindByID provides a mock function for the type MockTagRepository
1228+func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) {
1229+ ret := _mock.Called(ctx, id)
1230+
1231+ if len(ret) == 0 {
1232+ panic("no return value specified for FindByID")
1233+ }
1234+
1235+ var r0 *entity.Tag
1236+ var r1 error
1237+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok {
1238+ return returnFunc(ctx, id)
1239+ }
1240+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok {
1241+ r0 = returnFunc(ctx, id)
1242+ } else {
1243+ if ret.Get(0) != nil {
1244+ r0 = ret.Get(0).(*entity.Tag)
1245+ }
1246+ }
1247+ if returnFunc, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok {
1248+ r1 = returnFunc(ctx, id)
1249+ } else {
1250+ r1 = ret.Error(1)
1251+ }
1252+ return r0, r1
1253+}
1254+
1255+// MockTagRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
1256+type MockTagRepository_FindByID_Call struct {
1257+ *mock.Call
1258+}
1259+
1260+// FindByID is a helper method to define mock.On call
1261+// - ctx context.Context
1262+// - id entity.TagID
1263+func (_e *MockTagRepository_Expecter) FindByID(ctx any, id any) *MockTagRepository_FindByID_Call {
1264+ return &MockTagRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
1265+}
1266+
1267+func (_c *MockTagRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_FindByID_Call {
1268+ _c.Call.Run(func(args mock.Arguments) {
1269+ var arg0 context.Context
1270+ if args[0] != nil {
1271+ arg0 = args[0].(context.Context)
1272+ }
1273+ var arg1 entity.TagID
1274+ if args[1] != nil {
1275+ arg1 = args[1].(entity.TagID)
1276+ }
1277+ run(
1278+ arg0,
1279+ arg1,
1280+ )
1281+ })
1282+ return _c
1283+}
1284+
1285+func (_c *MockTagRepository_FindByID_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByID_Call {
1286+ _c.Call.Return(tag, err)
1287+ return _c
1288+}
1289+
1290+func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call {
1291+ _c.Call.Return(run)
1292+ return _c
1293+}
1294+
1295+// FindByName provides a mock function for the type MockTagRepository
1296+func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) {
1297+ ret := _mock.Called(ctx, name)
1298+
1299+ if len(ret) == 0 {
1300+ panic("no return value specified for FindByName")
1301+ }
1302+
1303+ var r0 *entity.Tag
1304+ var r1 error
1305+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok {
1306+ return returnFunc(ctx, name)
1307+ }
1308+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok {
1309+ r0 = returnFunc(ctx, name)
1310+ } else {
1311+ if ret.Get(0) != nil {
1312+ r0 = ret.Get(0).(*entity.Tag)
1313+ }
1314+ }
1315+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
1316+ r1 = returnFunc(ctx, name)
1317+ } else {
1318+ r1 = ret.Error(1)
1319+ }
1320+ return r0, r1
1321+}
1322+
1323+// MockTagRepository_FindByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByName'
1324+type MockTagRepository_FindByName_Call struct {
1325+ *mock.Call
1326+}
1327+
1328+// FindByName is a helper method to define mock.On call
1329+// - ctx context.Context
1330+// - name string
1331+func (_e *MockTagRepository_Expecter) FindByName(ctx any, name any) *MockTagRepository_FindByName_Call {
1332+ return &MockTagRepository_FindByName_Call{Call: _e.mock.On("FindByName", ctx, name)}
1333+}
1334+
1335+func (_c *MockTagRepository_FindByName_Call) Run(run func(ctx context.Context, name string)) *MockTagRepository_FindByName_Call {
1336+ _c.Call.Run(func(args mock.Arguments) {
1337+ var arg0 context.Context
1338+ if args[0] != nil {
1339+ arg0 = args[0].(context.Context)
1340+ }
1341+ var arg1 string
1342+ if args[1] != nil {
1343+ arg1 = args[1].(string)
1344+ }
1345+ run(
1346+ arg0,
1347+ arg1,
1348+ )
1349+ })
1350+ return _c
1351+}
1352+
1353+func (_c *MockTagRepository_FindByName_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByName_Call {
1354+ _c.Call.Return(tag, err)
1355+ return _c
1356+}
1357+
1358+func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(ctx context.Context, name string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call {
1359+ _c.Call.Return(run)
1360+ return _c
1361+}
1362+
1363+// GetAll provides a mock function for the type MockTagRepository
1364+func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) {
1365+ ret := _mock.Called(ctx)
1366+
1367+ if len(ret) == 0 {
1368+ panic("no return value specified for GetAll")
1369+ }
1370+
1371+ var r0 []*entity.Tag
1372+ var r1 error
1373+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok {
1374+ return returnFunc(ctx)
1375+ }
1376+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok {
1377+ r0 = returnFunc(ctx)
1378+ } else {
1379+ if ret.Get(0) != nil {
1380+ r0 = ret.Get(0).([]*entity.Tag)
1381+ }
1382+ }
1383+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1384+ r1 = returnFunc(ctx)
1385+ } else {
1386+ r1 = ret.Error(1)
1387+ }
1388+ return r0, r1
1389+}
1390+
1391+// MockTagRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
1392+type MockTagRepository_GetAll_Call struct {
1393+ *mock.Call
1394+}
1395+
1396+// GetAll is a helper method to define mock.On call
1397+// - ctx context.Context
1398+func (_e *MockTagRepository_Expecter) GetAll(ctx any) *MockTagRepository_GetAll_Call {
1399+ return &MockTagRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
1400+}
1401+
1402+func (_c *MockTagRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockTagRepository_GetAll_Call {
1403+ _c.Call.Run(func(args mock.Arguments) {
1404+ var arg0 context.Context
1405+ if args[0] != nil {
1406+ arg0 = args[0].(context.Context)
1407+ }
1408+ run(
1409+ arg0,
1410+ )
1411+ })
1412+ return _c
1413+}
1414+
1415+func (_c *MockTagRepository_GetAll_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetAll_Call {
1416+ _c.Call.Return(tags, err)
1417+ return _c
1418+}
1419+
1420+func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call {
1421+ _c.Call.Return(run)
1422+ return _c
1423+}
1424+
1425+// GetForFavorite provides a mock function for the type MockTagRepository
1426+func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) {
1427+ ret := _mock.Called(ctx, favID)
1428+
1429+ if len(ret) == 0 {
1430+ panic("no return value specified for GetForFavorite")
1431+ }
1432+
1433+ var r0 []*entity.Tag
1434+ var r1 error
1435+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok {
1436+ return returnFunc(ctx, favID)
1437+ }
1438+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok {
1439+ r0 = returnFunc(ctx, favID)
1440+ } else {
1441+ if ret.Get(0) != nil {
1442+ r0 = ret.Get(0).([]*entity.Tag)
1443+ }
1444+ }
1445+ if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
1446+ r1 = returnFunc(ctx, favID)
1447+ } else {
1448+ r1 = ret.Error(1)
1449+ }
1450+ return r0, r1
1451+}
1452+
1453+// MockTagRepository_GetForFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForFavorite'
1454+type MockTagRepository_GetForFavorite_Call struct {
1455+ *mock.Call
1456+}
1457+
1458+// GetForFavorite is a helper method to define mock.On call
1459+// - ctx context.Context
1460+// - favID entity.FavoriteID
1461+func (_e *MockTagRepository_Expecter) GetForFavorite(ctx any, favID any) *MockTagRepository_GetForFavorite_Call {
1462+ return &MockTagRepository_GetForFavorite_Call{Call: _e.mock.On("GetForFavorite", ctx, favID)}
1463+}
1464+
1465+func (_c *MockTagRepository_GetForFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID)) *MockTagRepository_GetForFavorite_Call {
1466+ _c.Call.Run(func(args mock.Arguments) {
1467+ var arg0 context.Context
1468+ if args[0] != nil {
1469+ arg0 = args[0].(context.Context)
1470+ }
1471+ var arg1 entity.FavoriteID
1472+ if args[1] != nil {
1473+ arg1 = args[1].(entity.FavoriteID)
1474+ }
1475+ run(
1476+ arg0,
1477+ arg1,
1478+ )
1479+ })
1480+ return _c
1481+}
1482+
1483+func (_c *MockTagRepository_GetForFavorite_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetForFavorite_Call {
1484+ _c.Call.Return(tags, err)
1485+ return _c
1486+}
1487+
1488+func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call {
1489+ _c.Call.Return(run)
1490+ return _c
1491+}
1492+
1493+// RemoveFromFavorite provides a mock function for the type MockTagRepository
1494+func (_mock *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
1495+ ret := _mock.Called(ctx, tagID, favID)
1496+
1497+ if len(ret) == 0 {
1498+ panic("no return value specified for RemoveFromFavorite")
1499+ }
1500+
1501+ var r0 error
1502+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
1503+ r0 = returnFunc(ctx, tagID, favID)
1504+ } else {
1505+ r0 = ret.Error(0)
1506+ }
1507+ return r0
1508+}
1509+
1510+// MockTagRepository_RemoveFromFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveFromFavorite'
1511+type MockTagRepository_RemoveFromFavorite_Call struct {
1512+ *mock.Call
1513+}
1514+
1515+// RemoveFromFavorite is a helper method to define mock.On call
1516+// - ctx context.Context
1517+// - tagID entity.TagID
1518+// - favID entity.FavoriteID
1519+func (_e *MockTagRepository_Expecter) RemoveFromFavorite(ctx any, tagID any, favID any) *MockTagRepository_RemoveFromFavorite_Call {
1520+ return &MockTagRepository_RemoveFromFavorite_Call{Call: _e.mock.On("RemoveFromFavorite", ctx, tagID, favID)}
1521+}
1522+
1523+func (_c *MockTagRepository_RemoveFromFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_RemoveFromFavorite_Call {
1524+ _c.Call.Run(func(args mock.Arguments) {
1525+ var arg0 context.Context
1526+ if args[0] != nil {
1527+ arg0 = args[0].(context.Context)
1528+ }
1529+ var arg1 entity.TagID
1530+ if args[1] != nil {
1531+ arg1 = args[1].(entity.TagID)
1532+ }
1533+ var arg2 entity.FavoriteID
1534+ if args[2] != nil {
1535+ arg2 = args[2].(entity.FavoriteID)
1536+ }
1537+ run(
1538+ arg0,
1539+ arg1,
1540+ arg2,
1541+ )
1542+ })
1543+ return _c
1544+}
1545+
1546+func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(err error) *MockTagRepository_RemoveFromFavorite_Call {
1547+ _c.Call.Return(err)
1548+ return _c
1549+}
1550+
1551+func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call {
1552+ _c.Call.Return(run)
1553+ return _c
1554+}
1555+
1556+// Save provides a mock function for the type MockTagRepository
1557+func (_mock *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error {
1558+ ret := _mock.Called(ctx, tag)
1559+
1560+ if len(ret) == 0 {
1561+ panic("no return value specified for Save")
1562+ }
1563+
1564+ var r0 error
1565+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok {
1566+ r0 = returnFunc(ctx, tag)
1567+ } else {
1568+ r0 = ret.Error(0)
1569+ }
1570+ return r0
1571+}
1572+
1573+// MockTagRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
1574+type MockTagRepository_Save_Call struct {
1575+ *mock.Call
1576+}
1577+
1578+// Save is a helper method to define mock.On call
1579+// - ctx context.Context
1580+// - tag *entity.Tag
1581+func (_e *MockTagRepository_Expecter) Save(ctx any, tag any) *MockTagRepository_Save_Call {
1582+ return &MockTagRepository_Save_Call{Call: _e.mock.On("Save", ctx, tag)}
1583+}
1584+
1585+func (_c *MockTagRepository_Save_Call) Run(run func(ctx context.Context, tag *entity.Tag)) *MockTagRepository_Save_Call {
1586+ _c.Call.Run(func(args mock.Arguments) {
1587+ var arg0 context.Context
1588+ if args[0] != nil {
1589+ arg0 = args[0].(context.Context)
1590+ }
1591+ var arg1 *entity.Tag
1592+ if args[1] != nil {
1593+ arg1 = args[1].(*entity.Tag)
1594+ }
1595+ run(
1596+ arg0,
1597+ arg1,
1598+ )
1599+ })
1600+ return _c
1601+}
1602+
1603+func (_c *MockTagRepository_Save_Call) Return(err error) *MockTagRepository_Save_Call {
1604+ _c.Call.Return(err)
1605+ return _c
1606+}
1607+
1608+func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(ctx context.Context, tag *entity.Tag) error) *MockTagRepository_Save_Call {
1609+ _c.Call.Return(run)
1610+ return _c
1611+}
A internal/domain/repository/mocks/filter.go +280 -0
@@ -0,0 +1,280 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockContentWhitelistRepository creates a new instance of MockContentWhitelistRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockContentWhitelistRepository(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockContentWhitelistRepository {
19+ mock := &MockContentWhitelistRepository{}
20+ mock.Mock.Test(t)
21+
22+ t.Cleanup(func() { mock.AssertExpectations(t) })
23+
24+ return mock
25+}
26+
27+// MockContentWhitelistRepository is an autogenerated mock type for the ContentWhitelistRepository type
28+type MockContentWhitelistRepository struct {
29+ mock.Mock
30+}
31+
32+type MockContentWhitelistRepository_Expecter struct {
33+ mock *mock.Mock
34+}
35+
36+func (_m *MockContentWhitelistRepository) EXPECT() *MockContentWhitelistRepository_Expecter {
37+ return &MockContentWhitelistRepository_Expecter{mock: &_m.Mock}
38+}
39+
40+// Add provides a mock function for the type MockContentWhitelistRepository
41+func (_mock *MockContentWhitelistRepository) Add(ctx context.Context, domain string) error {
42+ ret := _mock.Called(ctx, domain)
43+
44+ if len(ret) == 0 {
45+ panic("no return value specified for Add")
46+ }
47+
48+ var r0 error
49+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
50+ r0 = returnFunc(ctx, domain)
51+ } else {
52+ r0 = ret.Error(0)
53+ }
54+ return r0
55+}
56+
57+// MockContentWhitelistRepository_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
58+type MockContentWhitelistRepository_Add_Call struct {
59+ *mock.Call
60+}
61+
62+// Add is a helper method to define mock.On call
63+// - ctx context.Context
64+// - domain string
65+func (_e *MockContentWhitelistRepository_Expecter) Add(ctx any, domain any) *MockContentWhitelistRepository_Add_Call {
66+ return &MockContentWhitelistRepository_Add_Call{Call: _e.mock.On("Add", ctx, domain)}
67+}
68+
69+func (_c *MockContentWhitelistRepository_Add_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Add_Call {
70+ _c.Call.Run(func(args mock.Arguments) {
71+ var arg0 context.Context
72+ if args[0] != nil {
73+ arg0 = args[0].(context.Context)
74+ }
75+ var arg1 string
76+ if args[1] != nil {
77+ arg1 = args[1].(string)
78+ }
79+ run(
80+ arg0,
81+ arg1,
82+ )
83+ })
84+ return _c
85+}
86+
87+func (_c *MockContentWhitelistRepository_Add_Call) Return(err error) *MockContentWhitelistRepository_Add_Call {
88+ _c.Call.Return(err)
89+ return _c
90+}
91+
92+func (_c *MockContentWhitelistRepository_Add_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Add_Call {
93+ _c.Call.Return(run)
94+ return _c
95+}
96+
97+// Contains provides a mock function for the type MockContentWhitelistRepository
98+func (_mock *MockContentWhitelistRepository) Contains(ctx context.Context, domain string) (bool, error) {
99+ ret := _mock.Called(ctx, domain)
100+
101+ if len(ret) == 0 {
102+ panic("no return value specified for Contains")
103+ }
104+
105+ var r0 bool
106+ var r1 error
107+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
108+ return returnFunc(ctx, domain)
109+ }
110+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
111+ r0 = returnFunc(ctx, domain)
112+ } else {
113+ r0 = ret.Get(0).(bool)
114+ }
115+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
116+ r1 = returnFunc(ctx, domain)
117+ } else {
118+ r1 = ret.Error(1)
119+ }
120+ return r0, r1
121+}
122+
123+// MockContentWhitelistRepository_Contains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Contains'
124+type MockContentWhitelistRepository_Contains_Call struct {
125+ *mock.Call
126+}
127+
128+// Contains is a helper method to define mock.On call
129+// - ctx context.Context
130+// - domain string
131+func (_e *MockContentWhitelistRepository_Expecter) Contains(ctx any, domain any) *MockContentWhitelistRepository_Contains_Call {
132+ return &MockContentWhitelistRepository_Contains_Call{Call: _e.mock.On("Contains", ctx, domain)}
133+}
134+
135+func (_c *MockContentWhitelistRepository_Contains_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Contains_Call {
136+ _c.Call.Run(func(args mock.Arguments) {
137+ var arg0 context.Context
138+ if args[0] != nil {
139+ arg0 = args[0].(context.Context)
140+ }
141+ var arg1 string
142+ if args[1] != nil {
143+ arg1 = args[1].(string)
144+ }
145+ run(
146+ arg0,
147+ arg1,
148+ )
149+ })
150+ return _c
151+}
152+
153+func (_c *MockContentWhitelistRepository_Contains_Call) Return(b bool, err error) *MockContentWhitelistRepository_Contains_Call {
154+ _c.Call.Return(b, err)
155+ return _c
156+}
157+
158+func (_c *MockContentWhitelistRepository_Contains_Call) RunAndReturn(run func(ctx context.Context, domain string) (bool, error)) *MockContentWhitelistRepository_Contains_Call {
159+ _c.Call.Return(run)
160+ return _c
161+}
162+
163+// GetAll provides a mock function for the type MockContentWhitelistRepository
164+func (_mock *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]string, error) {
165+ ret := _mock.Called(ctx)
166+
167+ if len(ret) == 0 {
168+ panic("no return value specified for GetAll")
169+ }
170+
171+ var r0 []string
172+ var r1 error
173+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
174+ return returnFunc(ctx)
175+ }
176+ if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
177+ r0 = returnFunc(ctx)
178+ } else {
179+ if ret.Get(0) != nil {
180+ r0 = ret.Get(0).([]string)
181+ }
182+ }
183+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
184+ r1 = returnFunc(ctx)
185+ } else {
186+ r1 = ret.Error(1)
187+ }
188+ return r0, r1
189+}
190+
191+// MockContentWhitelistRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
192+type MockContentWhitelistRepository_GetAll_Call struct {
193+ *mock.Call
194+}
195+
196+// GetAll is a helper method to define mock.On call
197+// - ctx context.Context
198+func (_e *MockContentWhitelistRepository_Expecter) GetAll(ctx any) *MockContentWhitelistRepository_GetAll_Call {
199+ return &MockContentWhitelistRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
200+}
201+
202+func (_c *MockContentWhitelistRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockContentWhitelistRepository_GetAll_Call {
203+ _c.Call.Run(func(args mock.Arguments) {
204+ var arg0 context.Context
205+ if args[0] != nil {
206+ arg0 = args[0].(context.Context)
207+ }
208+ run(
209+ arg0,
210+ )
211+ })
212+ return _c
213+}
214+
215+func (_c *MockContentWhitelistRepository_GetAll_Call) Return(strings []string, err error) *MockContentWhitelistRepository_GetAll_Call {
216+ _c.Call.Return(strings, err)
217+ return _c
218+}
219+
220+func (_c *MockContentWhitelistRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockContentWhitelistRepository_GetAll_Call {
221+ _c.Call.Return(run)
222+ return _c
223+}
224+
225+// Remove provides a mock function for the type MockContentWhitelistRepository
226+func (_mock *MockContentWhitelistRepository) Remove(ctx context.Context, domain string) error {
227+ ret := _mock.Called(ctx, domain)
228+
229+ if len(ret) == 0 {
230+ panic("no return value specified for Remove")
231+ }
232+
233+ var r0 error
234+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
235+ r0 = returnFunc(ctx, domain)
236+ } else {
237+ r0 = ret.Error(0)
238+ }
239+ return r0
240+}
241+
242+// MockContentWhitelistRepository_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
243+type MockContentWhitelistRepository_Remove_Call struct {
244+ *mock.Call
245+}
246+
247+// Remove is a helper method to define mock.On call
248+// - ctx context.Context
249+// - domain string
250+func (_e *MockContentWhitelistRepository_Expecter) Remove(ctx any, domain any) *MockContentWhitelistRepository_Remove_Call {
251+ return &MockContentWhitelistRepository_Remove_Call{Call: _e.mock.On("Remove", ctx, domain)}
252+}
253+
254+func (_c *MockContentWhitelistRepository_Remove_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Remove_Call {
255+ _c.Call.Run(func(args mock.Arguments) {
256+ var arg0 context.Context
257+ if args[0] != nil {
258+ arg0 = args[0].(context.Context)
259+ }
260+ var arg1 string
261+ if args[1] != nil {
262+ arg1 = args[1].(string)
263+ }
264+ run(
265+ arg0,
266+ arg1,
267+ )
268+ })
269+ return _c
270+}
271+
272+func (_c *MockContentWhitelistRepository_Remove_Call) Return(err error) *MockContentWhitelistRepository_Remove_Call {
273+ _c.Call.Return(err)
274+ return _c
275+}
276+
277+func (_c *MockContentWhitelistRepository_Remove_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Remove_Call {
278+ _c.Call.Return(run)
279+ return _c
280+}
A internal/domain/repository/mocks/history.go +1541 -0
@@ -0,0 +1,1541 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+ "time"
10+
11+ "github.com/bnema/dumber/internal/domain/entity"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// NewMockHistoryRepository creates a new instance of MockHistoryRepository. 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.
17+func NewMockHistoryRepository(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockHistoryRepository {
21+ mock := &MockHistoryRepository{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockHistoryRepository is an autogenerated mock type for the HistoryRepository type
30+type MockHistoryRepository struct {
31+ mock.Mock
32+}
33+
34+type MockHistoryRepository_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockHistoryRepository) EXPECT() *MockHistoryRepository_Expecter {
39+ return &MockHistoryRepository_Expecter{mock: &_m.Mock}
40+}
41+
42+// Delete provides a mock function for the type MockHistoryRepository
43+func (_mock *MockHistoryRepository) Delete(ctx context.Context, id int64) error {
44+ ret := _mock.Called(ctx, id)
45+
46+ if len(ret) == 0 {
47+ panic("no return value specified for Delete")
48+ }
49+
50+ var r0 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
52+ r0 = returnFunc(ctx, id)
53+ } else {
54+ r0 = ret.Error(0)
55+ }
56+ return r0
57+}
58+
59+// MockHistoryRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
60+type MockHistoryRepository_Delete_Call struct {
61+ *mock.Call
62+}
63+
64+// Delete is a helper method to define mock.On call
65+// - ctx context.Context
66+// - id int64
67+func (_e *MockHistoryRepository_Expecter) Delete(ctx any, id any) *MockHistoryRepository_Delete_Call {
68+ return &MockHistoryRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
69+}
70+
71+func (_c *MockHistoryRepository_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistoryRepository_Delete_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ var arg1 int64
78+ if args[1] != nil {
79+ arg1 = args[1].(int64)
80+ }
81+ run(
82+ arg0,
83+ arg1,
84+ )
85+ })
86+ return _c
87+}
88+
89+func (_c *MockHistoryRepository_Delete_Call) Return(err error) *MockHistoryRepository_Delete_Call {
90+ _c.Call.Return(err)
91+ return _c
92+}
93+
94+func (_c *MockHistoryRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistoryRepository_Delete_Call {
95+ _c.Call.Return(run)
96+ return _c
97+}
98+
99+// DeleteAll provides a mock function for the type MockHistoryRepository
100+func (_mock *MockHistoryRepository) DeleteAll(ctx context.Context) error {
101+ ret := _mock.Called(ctx)
102+
103+ if len(ret) == 0 {
104+ panic("no return value specified for DeleteAll")
105+ }
106+
107+ var r0 error
108+ if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
109+ r0 = returnFunc(ctx)
110+ } else {
111+ r0 = ret.Error(0)
112+ }
113+ return r0
114+}
115+
116+// MockHistoryRepository_DeleteAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAll'
117+type MockHistoryRepository_DeleteAll_Call struct {
118+ *mock.Call
119+}
120+
121+// DeleteAll is a helper method to define mock.On call
122+// - ctx context.Context
123+func (_e *MockHistoryRepository_Expecter) DeleteAll(ctx any) *MockHistoryRepository_DeleteAll_Call {
124+ return &MockHistoryRepository_DeleteAll_Call{Call: _e.mock.On("DeleteAll", ctx)}
125+}
126+
127+func (_c *MockHistoryRepository_DeleteAll_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_DeleteAll_Call {
128+ _c.Call.Run(func(args mock.Arguments) {
129+ var arg0 context.Context
130+ if args[0] != nil {
131+ arg0 = args[0].(context.Context)
132+ }
133+ run(
134+ arg0,
135+ )
136+ })
137+ return _c
138+}
139+
140+func (_c *MockHistoryRepository_DeleteAll_Call) Return(err error) *MockHistoryRepository_DeleteAll_Call {
141+ _c.Call.Return(err)
142+ return _c
143+}
144+
145+func (_c *MockHistoryRepository_DeleteAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHistoryRepository_DeleteAll_Call {
146+ _c.Call.Return(run)
147+ return _c
148+}
149+
150+// DeleteByDomain provides a mock function for the type MockHistoryRepository
151+func (_mock *MockHistoryRepository) DeleteByDomain(ctx context.Context, domain string) error {
152+ ret := _mock.Called(ctx, domain)
153+
154+ if len(ret) == 0 {
155+ panic("no return value specified for DeleteByDomain")
156+ }
157+
158+ var r0 error
159+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
160+ r0 = returnFunc(ctx, domain)
161+ } else {
162+ r0 = ret.Error(0)
163+ }
164+ return r0
165+}
166+
167+// MockHistoryRepository_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain'
168+type MockHistoryRepository_DeleteByDomain_Call struct {
169+ *mock.Call
170+}
171+
172+// DeleteByDomain is a helper method to define mock.On call
173+// - ctx context.Context
174+// - domain string
175+func (_e *MockHistoryRepository_Expecter) DeleteByDomain(ctx any, domain any) *MockHistoryRepository_DeleteByDomain_Call {
176+ return &MockHistoryRepository_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)}
177+}
178+
179+func (_c *MockHistoryRepository_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHistoryRepository_DeleteByDomain_Call {
180+ _c.Call.Run(func(args mock.Arguments) {
181+ var arg0 context.Context
182+ if args[0] != nil {
183+ arg0 = args[0].(context.Context)
184+ }
185+ var arg1 string
186+ if args[1] != nil {
187+ arg1 = args[1].(string)
188+ }
189+ run(
190+ arg0,
191+ arg1,
192+ )
193+ })
194+ return _c
195+}
196+
197+func (_c *MockHistoryRepository_DeleteByDomain_Call) Return(err error) *MockHistoryRepository_DeleteByDomain_Call {
198+ _c.Call.Return(err)
199+ return _c
200+}
201+
202+func (_c *MockHistoryRepository_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHistoryRepository_DeleteByDomain_Call {
203+ _c.Call.Return(run)
204+ return _c
205+}
206+
207+// DeleteOlderThan provides a mock function for the type MockHistoryRepository
208+func (_mock *MockHistoryRepository) DeleteOlderThan(ctx context.Context, before time.Time) error {
209+ ret := _mock.Called(ctx, before)
210+
211+ if len(ret) == 0 {
212+ panic("no return value specified for DeleteOlderThan")
213+ }
214+
215+ var r0 error
216+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
217+ r0 = returnFunc(ctx, before)
218+ } else {
219+ r0 = ret.Error(0)
220+ }
221+ return r0
222+}
223+
224+// MockHistoryRepository_DeleteOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOlderThan'
225+type MockHistoryRepository_DeleteOlderThan_Call struct {
226+ *mock.Call
227+}
228+
229+// DeleteOlderThan is a helper method to define mock.On call
230+// - ctx context.Context
231+// - before time.Time
232+func (_e *MockHistoryRepository_Expecter) DeleteOlderThan(ctx any, before any) *MockHistoryRepository_DeleteOlderThan_Call {
233+ return &MockHistoryRepository_DeleteOlderThan_Call{Call: _e.mock.On("DeleteOlderThan", ctx, before)}
234+}
235+
236+func (_c *MockHistoryRepository_DeleteOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHistoryRepository_DeleteOlderThan_Call {
237+ _c.Call.Run(func(args mock.Arguments) {
238+ var arg0 context.Context
239+ if args[0] != nil {
240+ arg0 = args[0].(context.Context)
241+ }
242+ var arg1 time.Time
243+ if args[1] != nil {
244+ arg1 = args[1].(time.Time)
245+ }
246+ run(
247+ arg0,
248+ arg1,
249+ )
250+ })
251+ return _c
252+}
253+
254+func (_c *MockHistoryRepository_DeleteOlderThan_Call) Return(err error) *MockHistoryRepository_DeleteOlderThan_Call {
255+ _c.Call.Return(err)
256+ return _c
257+}
258+
259+func (_c *MockHistoryRepository_DeleteOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHistoryRepository_DeleteOlderThan_Call {
260+ _c.Call.Return(run)
261+ return _c
262+}
263+
264+// DeleteSince provides a mock function for the type MockHistoryRepository
265+func (_mock *MockHistoryRepository) DeleteSince(ctx context.Context, since time.Time) error {
266+ ret := _mock.Called(ctx, since)
267+
268+ if len(ret) == 0 {
269+ panic("no return value specified for DeleteSince")
270+ }
271+
272+ var r0 error
273+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
274+ r0 = returnFunc(ctx, since)
275+ } else {
276+ r0 = ret.Error(0)
277+ }
278+ return r0
279+}
280+
281+// MockHistoryRepository_DeleteSince_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSince'
282+type MockHistoryRepository_DeleteSince_Call struct {
283+ *mock.Call
284+}
285+
286+// DeleteSince is a helper method to define mock.On call
287+// - ctx context.Context
288+// - since time.Time
289+func (_e *MockHistoryRepository_Expecter) DeleteSince(ctx any, since any) *MockHistoryRepository_DeleteSince_Call {
290+ return &MockHistoryRepository_DeleteSince_Call{Call: _e.mock.On("DeleteSince", ctx, since)}
291+}
292+
293+func (_c *MockHistoryRepository_DeleteSince_Call) Run(run func(ctx context.Context, since time.Time)) *MockHistoryRepository_DeleteSince_Call {
294+ _c.Call.Run(func(args mock.Arguments) {
295+ var arg0 context.Context
296+ if args[0] != nil {
297+ arg0 = args[0].(context.Context)
298+ }
299+ var arg1 time.Time
300+ if args[1] != nil {
301+ arg1 = args[1].(time.Time)
302+ }
303+ run(
304+ arg0,
305+ arg1,
306+ )
307+ })
308+ return _c
309+}
310+
311+func (_c *MockHistoryRepository_DeleteSince_Call) Return(err error) *MockHistoryRepository_DeleteSince_Call {
312+ _c.Call.Return(err)
313+ return _c
314+}
315+
316+func (_c *MockHistoryRepository_DeleteSince_Call) RunAndReturn(run func(ctx context.Context, since time.Time) error) *MockHistoryRepository_DeleteSince_Call {
317+ _c.Call.Return(run)
318+ return _c
319+}
320+
321+// FindByURL provides a mock function for the type MockHistoryRepository
322+func (_mock *MockHistoryRepository) FindByURL(ctx context.Context, url string) (*entity.HistoryEntry, error) {
323+ ret := _mock.Called(ctx, url)
324+
325+ if len(ret) == 0 {
326+ panic("no return value specified for FindByURL")
327+ }
328+
329+ var r0 *entity.HistoryEntry
330+ var r1 error
331+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.HistoryEntry, error)); ok {
332+ return returnFunc(ctx, url)
333+ }
334+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.HistoryEntry); ok {
335+ r0 = returnFunc(ctx, url)
336+ } else {
337+ if ret.Get(0) != nil {
338+ r0 = ret.Get(0).(*entity.HistoryEntry)
339+ }
340+ }
341+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
342+ r1 = returnFunc(ctx, url)
343+ } else {
344+ r1 = ret.Error(1)
345+ }
346+ return r0, r1
347+}
348+
349+// MockHistoryRepository_FindByURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByURL'
350+type MockHistoryRepository_FindByURL_Call struct {
351+ *mock.Call
352+}
353+
354+// FindByURL is a helper method to define mock.On call
355+// - ctx context.Context
356+// - url string
357+func (_e *MockHistoryRepository_Expecter) FindByURL(ctx any, url any) *MockHistoryRepository_FindByURL_Call {
358+ return &MockHistoryRepository_FindByURL_Call{Call: _e.mock.On("FindByURL", ctx, url)}
359+}
360+
361+func (_c *MockHistoryRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_FindByURL_Call {
362+ _c.Call.Run(func(args mock.Arguments) {
363+ var arg0 context.Context
364+ if args[0] != nil {
365+ arg0 = args[0].(context.Context)
366+ }
367+ var arg1 string
368+ if args[1] != nil {
369+ arg1 = args[1].(string)
370+ }
371+ run(
372+ arg0,
373+ arg1,
374+ )
375+ })
376+ return _c
377+}
378+
379+func (_c *MockHistoryRepository_FindByURL_Call) Return(historyEntry *entity.HistoryEntry, err error) *MockHistoryRepository_FindByURL_Call {
380+ _c.Call.Return(historyEntry, err)
381+ return _c
382+}
383+
384+func (_c *MockHistoryRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.HistoryEntry, error)) *MockHistoryRepository_FindByURL_Call {
385+ _c.Call.Return(run)
386+ return _c
387+}
388+
389+// GetAllMostVisited provides a mock function for the type MockHistoryRepository
390+func (_mock *MockHistoryRepository) GetAllMostVisited(ctx context.Context) ([]*entity.HistoryEntry, error) {
391+ ret := _mock.Called(ctx)
392+
393+ if len(ret) == 0 {
394+ panic("no return value specified for GetAllMostVisited")
395+ }
396+
397+ var r0 []*entity.HistoryEntry
398+ var r1 error
399+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HistoryEntry, error)); ok {
400+ return returnFunc(ctx)
401+ }
402+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HistoryEntry); ok {
403+ r0 = returnFunc(ctx)
404+ } else {
405+ if ret.Get(0) != nil {
406+ r0 = ret.Get(0).([]*entity.HistoryEntry)
407+ }
408+ }
409+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
410+ r1 = returnFunc(ctx)
411+ } else {
412+ r1 = ret.Error(1)
413+ }
414+ return r0, r1
415+}
416+
417+// MockHistoryRepository_GetAllMostVisited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllMostVisited'
418+type MockHistoryRepository_GetAllMostVisited_Call struct {
419+ *mock.Call
420+}
421+
422+// GetAllMostVisited is a helper method to define mock.On call
423+// - ctx context.Context
424+func (_e *MockHistoryRepository_Expecter) GetAllMostVisited(ctx any) *MockHistoryRepository_GetAllMostVisited_Call {
425+ return &MockHistoryRepository_GetAllMostVisited_Call{Call: _e.mock.On("GetAllMostVisited", ctx)}
426+}
427+
428+func (_c *MockHistoryRepository_GetAllMostVisited_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetAllMostVisited_Call {
429+ _c.Call.Run(func(args mock.Arguments) {
430+ var arg0 context.Context
431+ if args[0] != nil {
432+ arg0 = args[0].(context.Context)
433+ }
434+ run(
435+ arg0,
436+ )
437+ })
438+ return _c
439+}
440+
441+func (_c *MockHistoryRepository_GetAllMostVisited_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetAllMostVisited_Call {
442+ _c.Call.Return(historyEntrys, err)
443+ return _c
444+}
445+
446+func (_c *MockHistoryRepository_GetAllMostVisited_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetAllMostVisited_Call {
447+ _c.Call.Return(run)
448+ return _c
449+}
450+
451+// GetAllRecentHistory provides a mock function for the type MockHistoryRepository
452+func (_mock *MockHistoryRepository) GetAllRecentHistory(ctx context.Context) ([]*entity.HistoryEntry, error) {
453+ ret := _mock.Called(ctx)
454+
455+ if len(ret) == 0 {
456+ panic("no return value specified for GetAllRecentHistory")
457+ }
458+
459+ var r0 []*entity.HistoryEntry
460+ var r1 error
461+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HistoryEntry, error)); ok {
462+ return returnFunc(ctx)
463+ }
464+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HistoryEntry); ok {
465+ r0 = returnFunc(ctx)
466+ } else {
467+ if ret.Get(0) != nil {
468+ r0 = ret.Get(0).([]*entity.HistoryEntry)
469+ }
470+ }
471+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
472+ r1 = returnFunc(ctx)
473+ } else {
474+ r1 = ret.Error(1)
475+ }
476+ return r0, r1
477+}
478+
479+// MockHistoryRepository_GetAllRecentHistory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllRecentHistory'
480+type MockHistoryRepository_GetAllRecentHistory_Call struct {
481+ *mock.Call
482+}
483+
484+// GetAllRecentHistory is a helper method to define mock.On call
485+// - ctx context.Context
486+func (_e *MockHistoryRepository_Expecter) GetAllRecentHistory(ctx any) *MockHistoryRepository_GetAllRecentHistory_Call {
487+ return &MockHistoryRepository_GetAllRecentHistory_Call{Call: _e.mock.On("GetAllRecentHistory", ctx)}
488+}
489+
490+func (_c *MockHistoryRepository_GetAllRecentHistory_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetAllRecentHistory_Call {
491+ _c.Call.Run(func(args mock.Arguments) {
492+ var arg0 context.Context
493+ if args[0] != nil {
494+ arg0 = args[0].(context.Context)
495+ }
496+ run(
497+ arg0,
498+ )
499+ })
500+ return _c
501+}
502+
503+func (_c *MockHistoryRepository_GetAllRecentHistory_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetAllRecentHistory_Call {
504+ _c.Call.Return(historyEntrys, err)
505+ return _c
506+}
507+
508+func (_c *MockHistoryRepository_GetAllRecentHistory_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetAllRecentHistory_Call {
509+ _c.Call.Return(run)
510+ return _c
511+}
512+
513+// GetDailyVisitCount provides a mock function for the type MockHistoryRepository
514+func (_mock *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error) {
515+ ret := _mock.Called(ctx, daysAgo)
516+
517+ if len(ret) == 0 {
518+ panic("no return value specified for GetDailyVisitCount")
519+ }
520+
521+ var r0 []*entity.DailyVisitCount
522+ var r1 error
523+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.DailyVisitCount, error)); ok {
524+ return returnFunc(ctx, daysAgo)
525+ }
526+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.DailyVisitCount); ok {
527+ r0 = returnFunc(ctx, daysAgo)
528+ } else {
529+ if ret.Get(0) != nil {
530+ r0 = ret.Get(0).([]*entity.DailyVisitCount)
531+ }
532+ }
533+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
534+ r1 = returnFunc(ctx, daysAgo)
535+ } else {
536+ r1 = ret.Error(1)
537+ }
538+ return r0, r1
539+}
540+
541+// MockHistoryRepository_GetDailyVisitCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDailyVisitCount'
542+type MockHistoryRepository_GetDailyVisitCount_Call struct {
543+ *mock.Call
544+}
545+
546+// GetDailyVisitCount is a helper method to define mock.On call
547+// - ctx context.Context
548+// - daysAgo string
549+func (_e *MockHistoryRepository_Expecter) GetDailyVisitCount(ctx any, daysAgo any) *MockHistoryRepository_GetDailyVisitCount_Call {
550+ return &MockHistoryRepository_GetDailyVisitCount_Call{Call: _e.mock.On("GetDailyVisitCount", ctx, daysAgo)}
551+}
552+
553+func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Run(run func(ctx context.Context, daysAgo string)) *MockHistoryRepository_GetDailyVisitCount_Call {
554+ _c.Call.Run(func(args mock.Arguments) {
555+ var arg0 context.Context
556+ if args[0] != nil {
557+ arg0 = args[0].(context.Context)
558+ }
559+ var arg1 string
560+ if args[1] != nil {
561+ arg1 = args[1].(string)
562+ }
563+ run(
564+ arg0,
565+ arg1,
566+ )
567+ })
568+ return _c
569+}
570+
571+func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Return(dailyVisitCounts []*entity.DailyVisitCount, err error) *MockHistoryRepository_GetDailyVisitCount_Call {
572+ _c.Call.Return(dailyVisitCounts, err)
573+ return _c
574+}
575+
576+func (_c *MockHistoryRepository_GetDailyVisitCount_Call) RunAndReturn(run func(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error)) *MockHistoryRepository_GetDailyVisitCount_Call {
577+ _c.Call.Return(run)
578+ return _c
579+}
580+
581+// GetDomainStats provides a mock function for the type MockHistoryRepository
582+func (_mock *MockHistoryRepository) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) {
583+ ret := _mock.Called(ctx, limit)
584+
585+ if len(ret) == 0 {
586+ panic("no return value specified for GetDomainStats")
587+ }
588+
589+ var r0 []*entity.DomainStat
590+ var r1 error
591+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok {
592+ return returnFunc(ctx, limit)
593+ }
594+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok {
595+ r0 = returnFunc(ctx, limit)
596+ } else {
597+ if ret.Get(0) != nil {
598+ r0 = ret.Get(0).([]*entity.DomainStat)
599+ }
600+ }
601+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
602+ r1 = returnFunc(ctx, limit)
603+ } else {
604+ r1 = ret.Error(1)
605+ }
606+ return r0, r1
607+}
608+
609+// MockHistoryRepository_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats'
610+type MockHistoryRepository_GetDomainStats_Call struct {
611+ *mock.Call
612+}
613+
614+// GetDomainStats is a helper method to define mock.On call
615+// - ctx context.Context
616+// - limit int
617+func (_e *MockHistoryRepository_Expecter) GetDomainStats(ctx any, limit any) *MockHistoryRepository_GetDomainStats_Call {
618+ return &MockHistoryRepository_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)}
619+}
620+
621+func (_c *MockHistoryRepository_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHistoryRepository_GetDomainStats_Call {
622+ _c.Call.Run(func(args mock.Arguments) {
623+ var arg0 context.Context
624+ if args[0] != nil {
625+ arg0 = args[0].(context.Context)
626+ }
627+ var arg1 int
628+ if args[1] != nil {
629+ arg1 = args[1].(int)
630+ }
631+ run(
632+ arg0,
633+ arg1,
634+ )
635+ })
636+ return _c
637+}
638+
639+func (_c *MockHistoryRepository_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHistoryRepository_GetDomainStats_Call {
640+ _c.Call.Return(domainStats, err)
641+ return _c
642+}
643+
644+func (_c *MockHistoryRepository_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHistoryRepository_GetDomainStats_Call {
645+ _c.Call.Return(run)
646+ return _c
647+}
648+
649+// GetHourlyDistribution provides a mock function for the type MockHistoryRepository
650+func (_mock *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ([]*entity.HourlyDistribution, error) {
651+ ret := _mock.Called(ctx)
652+
653+ if len(ret) == 0 {
654+ panic("no return value specified for GetHourlyDistribution")
655+ }
656+
657+ var r0 []*entity.HourlyDistribution
658+ var r1 error
659+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HourlyDistribution, error)); ok {
660+ return returnFunc(ctx)
661+ }
662+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HourlyDistribution); ok {
663+ r0 = returnFunc(ctx)
664+ } else {
665+ if ret.Get(0) != nil {
666+ r0 = ret.Get(0).([]*entity.HourlyDistribution)
667+ }
668+ }
669+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
670+ r1 = returnFunc(ctx)
671+ } else {
672+ r1 = ret.Error(1)
673+ }
674+ return r0, r1
675+}
676+
677+// MockHistoryRepository_GetHourlyDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHourlyDistribution'
678+type MockHistoryRepository_GetHourlyDistribution_Call struct {
679+ *mock.Call
680+}
681+
682+// GetHourlyDistribution is a helper method to define mock.On call
683+// - ctx context.Context
684+func (_e *MockHistoryRepository_Expecter) GetHourlyDistribution(ctx any) *MockHistoryRepository_GetHourlyDistribution_Call {
685+ return &MockHistoryRepository_GetHourlyDistribution_Call{Call: _e.mock.On("GetHourlyDistribution", ctx)}
686+}
687+
688+func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetHourlyDistribution_Call {
689+ _c.Call.Run(func(args mock.Arguments) {
690+ var arg0 context.Context
691+ if args[0] != nil {
692+ arg0 = args[0].(context.Context)
693+ }
694+ run(
695+ arg0,
696+ )
697+ })
698+ return _c
699+}
700+
701+func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Return(hourlyDistributions []*entity.HourlyDistribution, err error) *MockHistoryRepository_GetHourlyDistribution_Call {
702+ _c.Call.Return(hourlyDistributions, err)
703+ return _c
704+}
705+
706+func (_c *MockHistoryRepository_GetHourlyDistribution_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HourlyDistribution, error)) *MockHistoryRepository_GetHourlyDistribution_Call {
707+ _c.Call.Return(run)
708+ return _c
709+}
710+
711+// GetMostVisited provides a mock function for the type MockHistoryRepository
712+func (_mock *MockHistoryRepository) GetMostVisited(ctx context.Context, days int) ([]*entity.HistoryEntry, error) {
713+ ret := _mock.Called(ctx, days)
714+
715+ if len(ret) == 0 {
716+ panic("no return value specified for GetMostVisited")
717+ }
718+
719+ var r0 []*entity.HistoryEntry
720+ var r1 error
721+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.HistoryEntry, error)); ok {
722+ return returnFunc(ctx, days)
723+ }
724+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.HistoryEntry); ok {
725+ r0 = returnFunc(ctx, days)
726+ } else {
727+ if ret.Get(0) != nil {
728+ r0 = ret.Get(0).([]*entity.HistoryEntry)
729+ }
730+ }
731+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
732+ r1 = returnFunc(ctx, days)
733+ } else {
734+ r1 = ret.Error(1)
735+ }
736+ return r0, r1
737+}
738+
739+// MockHistoryRepository_GetMostVisited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMostVisited'
740+type MockHistoryRepository_GetMostVisited_Call struct {
741+ *mock.Call
742+}
743+
744+// GetMostVisited is a helper method to define mock.On call
745+// - ctx context.Context
746+// - days int
747+func (_e *MockHistoryRepository_Expecter) GetMostVisited(ctx any, days any) *MockHistoryRepository_GetMostVisited_Call {
748+ return &MockHistoryRepository_GetMostVisited_Call{Call: _e.mock.On("GetMostVisited", ctx, days)}
749+}
750+
751+func (_c *MockHistoryRepository_GetMostVisited_Call) Run(run func(ctx context.Context, days int)) *MockHistoryRepository_GetMostVisited_Call {
752+ _c.Call.Run(func(args mock.Arguments) {
753+ var arg0 context.Context
754+ if args[0] != nil {
755+ arg0 = args[0].(context.Context)
756+ }
757+ var arg1 int
758+ if args[1] != nil {
759+ arg1 = args[1].(int)
760+ }
761+ run(
762+ arg0,
763+ arg1,
764+ )
765+ })
766+ return _c
767+}
768+
769+func (_c *MockHistoryRepository_GetMostVisited_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetMostVisited_Call {
770+ _c.Call.Return(historyEntrys, err)
771+ return _c
772+}
773+
774+func (_c *MockHistoryRepository_GetMostVisited_Call) RunAndReturn(run func(ctx context.Context, days int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetMostVisited_Call {
775+ _c.Call.Return(run)
776+ return _c
777+}
778+
779+// GetRecent provides a mock function for the type MockHistoryRepository
780+func (_mock *MockHistoryRepository) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
781+ ret := _mock.Called(ctx, limit, offset)
782+
783+ if len(ret) == 0 {
784+ panic("no return value specified for GetRecent")
785+ }
786+
787+ var r0 []*entity.HistoryEntry
788+ var r1 error
789+ if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
790+ return returnFunc(ctx, limit, offset)
791+ }
792+ if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
793+ r0 = returnFunc(ctx, limit, offset)
794+ } else {
795+ if ret.Get(0) != nil {
796+ r0 = ret.Get(0).([]*entity.HistoryEntry)
797+ }
798+ }
799+ if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
800+ r1 = returnFunc(ctx, limit, offset)
801+ } else {
802+ r1 = ret.Error(1)
803+ }
804+ return r0, r1
805+}
806+
807+// MockHistoryRepository_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
808+type MockHistoryRepository_GetRecent_Call struct {
809+ *mock.Call
810+}
811+
812+// GetRecent is a helper method to define mock.On call
813+// - ctx context.Context
814+// - limit int
815+// - offset int
816+func (_e *MockHistoryRepository_Expecter) GetRecent(ctx any, limit any, offset any) *MockHistoryRepository_GetRecent_Call {
817+ return &MockHistoryRepository_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)}
818+}
819+
820+func (_c *MockHistoryRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistoryRepository_GetRecent_Call {
821+ _c.Call.Run(func(args mock.Arguments) {
822+ var arg0 context.Context
823+ if args[0] != nil {
824+ arg0 = args[0].(context.Context)
825+ }
826+ var arg1 int
827+ if args[1] != nil {
828+ arg1 = args[1].(int)
829+ }
830+ var arg2 int
831+ if args[2] != nil {
832+ arg2 = args[2].(int)
833+ }
834+ run(
835+ arg0,
836+ arg1,
837+ arg2,
838+ )
839+ })
840+ return _c
841+}
842+
843+func (_c *MockHistoryRepository_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecent_Call {
844+ _c.Call.Return(historyEntrys, err)
845+ return _c
846+}
847+
848+func (_c *MockHistoryRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecent_Call {
849+ _c.Call.Return(run)
850+ return _c
851+}
852+
853+// GetRecentByDomain provides a mock function for the type MockHistoryRepository
854+func (_mock *MockHistoryRepository) GetRecentByDomain(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error) {
855+ ret := _mock.Called(ctx, domain, limit, offset)
856+
857+ if len(ret) == 0 {
858+ panic("no return value specified for GetRecentByDomain")
859+ }
860+
861+ var r0 []*entity.HistoryEntry
862+ var r1 error
863+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) ([]*entity.HistoryEntry, error)); ok {
864+ return returnFunc(ctx, domain, limit, offset)
865+ }
866+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) []*entity.HistoryEntry); ok {
867+ r0 = returnFunc(ctx, domain, limit, offset)
868+ } else {
869+ if ret.Get(0) != nil {
870+ r0 = ret.Get(0).([]*entity.HistoryEntry)
871+ }
872+ }
873+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, int, int) error); ok {
874+ r1 = returnFunc(ctx, domain, limit, offset)
875+ } else {
876+ r1 = ret.Error(1)
877+ }
878+ return r0, r1
879+}
880+
881+// MockHistoryRepository_GetRecentByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentByDomain'
882+type MockHistoryRepository_GetRecentByDomain_Call struct {
883+ *mock.Call
884+}
885+
886+// GetRecentByDomain is a helper method to define mock.On call
887+// - ctx context.Context
888+// - domain string
889+// - limit int
890+// - offset int
891+func (_e *MockHistoryRepository_Expecter) GetRecentByDomain(ctx any, domain any, limit any, offset any) *MockHistoryRepository_GetRecentByDomain_Call {
892+ return &MockHistoryRepository_GetRecentByDomain_Call{Call: _e.mock.On("GetRecentByDomain", ctx, domain, limit, offset)}
893+}
894+
895+func (_c *MockHistoryRepository_GetRecentByDomain_Call) Run(run func(ctx context.Context, domain string, limit int, offset int)) *MockHistoryRepository_GetRecentByDomain_Call {
896+ _c.Call.Run(func(args mock.Arguments) {
897+ var arg0 context.Context
898+ if args[0] != nil {
899+ arg0 = args[0].(context.Context)
900+ }
901+ var arg1 string
902+ if args[1] != nil {
903+ arg1 = args[1].(string)
904+ }
905+ var arg2 int
906+ if args[2] != nil {
907+ arg2 = args[2].(int)
908+ }
909+ var arg3 int
910+ if args[3] != nil {
911+ arg3 = args[3].(int)
912+ }
913+ run(
914+ arg0,
915+ arg1,
916+ arg2,
917+ arg3,
918+ )
919+ })
920+ return _c
921+}
922+
923+func (_c *MockHistoryRepository_GetRecentByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentByDomain_Call {
924+ _c.Call.Return(historyEntrys, err)
925+ return _c
926+}
927+
928+func (_c *MockHistoryRepository_GetRecentByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentByDomain_Call {
929+ _c.Call.Return(run)
930+ return _c
931+}
932+
933+// GetRecentSince provides a mock function for the type MockHistoryRepository
934+func (_mock *MockHistoryRepository) GetRecentSince(ctx context.Context, days int) ([]*entity.HistoryEntry, error) {
935+ ret := _mock.Called(ctx, days)
936+
937+ if len(ret) == 0 {
938+ panic("no return value specified for GetRecentSince")
939+ }
940+
941+ var r0 []*entity.HistoryEntry
942+ var r1 error
943+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.HistoryEntry, error)); ok {
944+ return returnFunc(ctx, days)
945+ }
946+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.HistoryEntry); ok {
947+ r0 = returnFunc(ctx, days)
948+ } else {
949+ if ret.Get(0) != nil {
950+ r0 = ret.Get(0).([]*entity.HistoryEntry)
951+ }
952+ }
953+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
954+ r1 = returnFunc(ctx, days)
955+ } else {
956+ r1 = ret.Error(1)
957+ }
958+ return r0, r1
959+}
960+
961+// MockHistoryRepository_GetRecentSince_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentSince'
962+type MockHistoryRepository_GetRecentSince_Call struct {
963+ *mock.Call
964+}
965+
966+// GetRecentSince is a helper method to define mock.On call
967+// - ctx context.Context
968+// - days int
969+func (_e *MockHistoryRepository_Expecter) GetRecentSince(ctx any, days any) *MockHistoryRepository_GetRecentSince_Call {
970+ return &MockHistoryRepository_GetRecentSince_Call{Call: _e.mock.On("GetRecentSince", ctx, days)}
971+}
972+
973+func (_c *MockHistoryRepository_GetRecentSince_Call) Run(run func(ctx context.Context, days int)) *MockHistoryRepository_GetRecentSince_Call {
974+ _c.Call.Run(func(args mock.Arguments) {
975+ var arg0 context.Context
976+ if args[0] != nil {
977+ arg0 = args[0].(context.Context)
978+ }
979+ var arg1 int
980+ if args[1] != nil {
981+ arg1 = args[1].(int)
982+ }
983+ run(
984+ arg0,
985+ arg1,
986+ )
987+ })
988+ return _c
989+}
990+
991+func (_c *MockHistoryRepository_GetRecentSince_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentSince_Call {
992+ _c.Call.Return(historyEntrys, err)
993+ return _c
994+}
995+
996+func (_c *MockHistoryRepository_GetRecentSince_Call) RunAndReturn(run func(ctx context.Context, days int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentSince_Call {
997+ _c.Call.Return(run)
998+ return _c
999+}
1000+
1001+// GetRecentWindow provides a mock function for the type MockHistoryRepository
1002+func (_mock *MockHistoryRepository) GetRecentWindow(ctx context.Context, before time.Time, after time.Time) ([]*entity.HistoryEntry, error) {
1003+ ret := _mock.Called(ctx, before, after)
1004+
1005+ if len(ret) == 0 {
1006+ panic("no return value specified for GetRecentWindow")
1007+ }
1008+
1009+ var r0 []*entity.HistoryEntry
1010+ var r1 error
1011+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, time.Time) ([]*entity.HistoryEntry, error)); ok {
1012+ return returnFunc(ctx, before, after)
1013+ }
1014+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, time.Time) []*entity.HistoryEntry); ok {
1015+ r0 = returnFunc(ctx, before, after)
1016+ } else {
1017+ if ret.Get(0) != nil {
1018+ r0 = ret.Get(0).([]*entity.HistoryEntry)
1019+ }
1020+ }
1021+ if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time, time.Time) error); ok {
1022+ r1 = returnFunc(ctx, before, after)
1023+ } else {
1024+ r1 = ret.Error(1)
1025+ }
1026+ return r0, r1
1027+}
1028+
1029+// MockHistoryRepository_GetRecentWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindow'
1030+type MockHistoryRepository_GetRecentWindow_Call struct {
1031+ *mock.Call
1032+}
1033+
1034+// GetRecentWindow is a helper method to define mock.On call
1035+// - ctx context.Context
1036+// - before time.Time
1037+// - after time.Time
1038+func (_e *MockHistoryRepository_Expecter) GetRecentWindow(ctx any, before any, after any) *MockHistoryRepository_GetRecentWindow_Call {
1039+ return &MockHistoryRepository_GetRecentWindow_Call{Call: _e.mock.On("GetRecentWindow", ctx, before, after)}
1040+}
1041+
1042+func (_c *MockHistoryRepository_GetRecentWindow_Call) Run(run func(ctx context.Context, before time.Time, after time.Time)) *MockHistoryRepository_GetRecentWindow_Call {
1043+ _c.Call.Run(func(args mock.Arguments) {
1044+ var arg0 context.Context
1045+ if args[0] != nil {
1046+ arg0 = args[0].(context.Context)
1047+ }
1048+ var arg1 time.Time
1049+ if args[1] != nil {
1050+ arg1 = args[1].(time.Time)
1051+ }
1052+ var arg2 time.Time
1053+ if args[2] != nil {
1054+ arg2 = args[2].(time.Time)
1055+ }
1056+ run(
1057+ arg0,
1058+ arg1,
1059+ arg2,
1060+ )
1061+ })
1062+ return _c
1063+}
1064+
1065+func (_c *MockHistoryRepository_GetRecentWindow_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentWindow_Call {
1066+ _c.Call.Return(historyEntrys, err)
1067+ return _c
1068+}
1069+
1070+func (_c *MockHistoryRepository_GetRecentWindow_Call) RunAndReturn(run func(ctx context.Context, before time.Time, after time.Time) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentWindow_Call {
1071+ _c.Call.Return(run)
1072+ return _c
1073+}
1074+
1075+// GetRecentWindowByDomain provides a mock function for the type MockHistoryRepository
1076+func (_mock *MockHistoryRepository) GetRecentWindowByDomain(ctx context.Context, domain string, before time.Time, after time.Time) ([]*entity.HistoryEntry, error) {
1077+ ret := _mock.Called(ctx, domain, before, after)
1078+
1079+ if len(ret) == 0 {
1080+ panic("no return value specified for GetRecentWindowByDomain")
1081+ }
1082+
1083+ var r0 []*entity.HistoryEntry
1084+ var r1 error
1085+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time, time.Time) ([]*entity.HistoryEntry, error)); ok {
1086+ return returnFunc(ctx, domain, before, after)
1087+ }
1088+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time, time.Time) []*entity.HistoryEntry); ok {
1089+ r0 = returnFunc(ctx, domain, before, after)
1090+ } else {
1091+ if ret.Get(0) != nil {
1092+ r0 = ret.Get(0).([]*entity.HistoryEntry)
1093+ }
1094+ }
1095+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, time.Time, time.Time) error); ok {
1096+ r1 = returnFunc(ctx, domain, before, after)
1097+ } else {
1098+ r1 = ret.Error(1)
1099+ }
1100+ return r0, r1
1101+}
1102+
1103+// MockHistoryRepository_GetRecentWindowByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindowByDomain'
1104+type MockHistoryRepository_GetRecentWindowByDomain_Call struct {
1105+ *mock.Call
1106+}
1107+
1108+// GetRecentWindowByDomain is a helper method to define mock.On call
1109+// - ctx context.Context
1110+// - domain string
1111+// - before time.Time
1112+// - after time.Time
1113+func (_e *MockHistoryRepository_Expecter) GetRecentWindowByDomain(ctx any, domain any, before any, after any) *MockHistoryRepository_GetRecentWindowByDomain_Call {
1114+ return &MockHistoryRepository_GetRecentWindowByDomain_Call{Call: _e.mock.On("GetRecentWindowByDomain", ctx, domain, before, after)}
1115+}
1116+
1117+func (_c *MockHistoryRepository_GetRecentWindowByDomain_Call) Run(run func(ctx context.Context, domain string, before time.Time, after time.Time)) *MockHistoryRepository_GetRecentWindowByDomain_Call {
1118+ _c.Call.Run(func(args mock.Arguments) {
1119+ var arg0 context.Context
1120+ if args[0] != nil {
1121+ arg0 = args[0].(context.Context)
1122+ }
1123+ var arg1 string
1124+ if args[1] != nil {
1125+ arg1 = args[1].(string)
1126+ }
1127+ var arg2 time.Time
1128+ if args[2] != nil {
1129+ arg2 = args[2].(time.Time)
1130+ }
1131+ var arg3 time.Time
1132+ if args[3] != nil {
1133+ arg3 = args[3].(time.Time)
1134+ }
1135+ run(
1136+ arg0,
1137+ arg1,
1138+ arg2,
1139+ arg3,
1140+ )
1141+ })
1142+ return _c
1143+}
1144+
1145+func (_c *MockHistoryRepository_GetRecentWindowByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentWindowByDomain_Call {
1146+ _c.Call.Return(historyEntrys, err)
1147+ return _c
1148+}
1149+
1150+func (_c *MockHistoryRepository_GetRecentWindowByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, before time.Time, after time.Time) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentWindowByDomain_Call {
1151+ _c.Call.Return(run)
1152+ return _c
1153+}
1154+
1155+// GetStats provides a mock function for the type MockHistoryRepository
1156+func (_mock *MockHistoryRepository) GetStats(ctx context.Context) (*entity.HistoryStats, error) {
1157+ ret := _mock.Called(ctx)
1158+
1159+ if len(ret) == 0 {
1160+ panic("no return value specified for GetStats")
1161+ }
1162+
1163+ var r0 *entity.HistoryStats
1164+ var r1 error
1165+ if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok {
1166+ return returnFunc(ctx)
1167+ }
1168+ if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok {
1169+ r0 = returnFunc(ctx)
1170+ } else {
1171+ if ret.Get(0) != nil {
1172+ r0 = ret.Get(0).(*entity.HistoryStats)
1173+ }
1174+ }
1175+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1176+ r1 = returnFunc(ctx)
1177+ } else {
1178+ r1 = ret.Error(1)
1179+ }
1180+ return r0, r1
1181+}
1182+
1183+// MockHistoryRepository_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats'
1184+type MockHistoryRepository_GetStats_Call struct {
1185+ *mock.Call
1186+}
1187+
1188+// GetStats is a helper method to define mock.On call
1189+// - ctx context.Context
1190+func (_e *MockHistoryRepository_Expecter) GetStats(ctx any) *MockHistoryRepository_GetStats_Call {
1191+ return &MockHistoryRepository_GetStats_Call{Call: _e.mock.On("GetStats", ctx)}
1192+}
1193+
1194+func (_c *MockHistoryRepository_GetStats_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetStats_Call {
1195+ _c.Call.Run(func(args mock.Arguments) {
1196+ var arg0 context.Context
1197+ if args[0] != nil {
1198+ arg0 = args[0].(context.Context)
1199+ }
1200+ run(
1201+ arg0,
1202+ )
1203+ })
1204+ return _c
1205+}
1206+
1207+func (_c *MockHistoryRepository_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHistoryRepository_GetStats_Call {
1208+ _c.Call.Return(historyStats, err)
1209+ return _c
1210+}
1211+
1212+func (_c *MockHistoryRepository_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHistoryRepository_GetStats_Call {
1213+ _c.Call.Return(run)
1214+ return _c
1215+}
1216+
1217+// HasEntriesBefore provides a mock function for the type MockHistoryRepository
1218+func (_mock *MockHistoryRepository) HasEntriesBefore(ctx context.Context, before time.Time) (bool, error) {
1219+ ret := _mock.Called(ctx, before)
1220+
1221+ if len(ret) == 0 {
1222+ panic("no return value specified for HasEntriesBefore")
1223+ }
1224+
1225+ var r0 bool
1226+ var r1 error
1227+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) (bool, error)); ok {
1228+ return returnFunc(ctx, before)
1229+ }
1230+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) bool); ok {
1231+ r0 = returnFunc(ctx, before)
1232+ } else {
1233+ r0 = ret.Get(0).(bool)
1234+ }
1235+ if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
1236+ r1 = returnFunc(ctx, before)
1237+ } else {
1238+ r1 = ret.Error(1)
1239+ }
1240+ return r0, r1
1241+}
1242+
1243+// MockHistoryRepository_HasEntriesBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasEntriesBefore'
1244+type MockHistoryRepository_HasEntriesBefore_Call struct {
1245+ *mock.Call
1246+}
1247+
1248+// HasEntriesBefore is a helper method to define mock.On call
1249+// - ctx context.Context
1250+// - before time.Time
1251+func (_e *MockHistoryRepository_Expecter) HasEntriesBefore(ctx any, before any) *MockHistoryRepository_HasEntriesBefore_Call {
1252+ return &MockHistoryRepository_HasEntriesBefore_Call{Call: _e.mock.On("HasEntriesBefore", ctx, before)}
1253+}
1254+
1255+func (_c *MockHistoryRepository_HasEntriesBefore_Call) Run(run func(ctx context.Context, before time.Time)) *MockHistoryRepository_HasEntriesBefore_Call {
1256+ _c.Call.Run(func(args mock.Arguments) {
1257+ var arg0 context.Context
1258+ if args[0] != nil {
1259+ arg0 = args[0].(context.Context)
1260+ }
1261+ var arg1 time.Time
1262+ if args[1] != nil {
1263+ arg1 = args[1].(time.Time)
1264+ }
1265+ run(
1266+ arg0,
1267+ arg1,
1268+ )
1269+ })
1270+ return _c
1271+}
1272+
1273+func (_c *MockHistoryRepository_HasEntriesBefore_Call) Return(b bool, err error) *MockHistoryRepository_HasEntriesBefore_Call {
1274+ _c.Call.Return(b, err)
1275+ return _c
1276+}
1277+
1278+func (_c *MockHistoryRepository_HasEntriesBefore_Call) RunAndReturn(run func(ctx context.Context, before time.Time) (bool, error)) *MockHistoryRepository_HasEntriesBefore_Call {
1279+ _c.Call.Return(run)
1280+ return _c
1281+}
1282+
1283+// HasEntriesByDomainBefore provides a mock function for the type MockHistoryRepository
1284+func (_mock *MockHistoryRepository) HasEntriesByDomainBefore(ctx context.Context, domain string, before time.Time) (bool, error) {
1285+ ret := _mock.Called(ctx, domain, before)
1286+
1287+ if len(ret) == 0 {
1288+ panic("no return value specified for HasEntriesByDomainBefore")
1289+ }
1290+
1291+ var r0 bool
1292+ var r1 error
1293+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time) (bool, error)); ok {
1294+ return returnFunc(ctx, domain, before)
1295+ }
1296+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time) bool); ok {
1297+ r0 = returnFunc(ctx, domain, before)
1298+ } else {
1299+ r0 = ret.Get(0).(bool)
1300+ }
1301+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, time.Time) error); ok {
1302+ r1 = returnFunc(ctx, domain, before)
1303+ } else {
1304+ r1 = ret.Error(1)
1305+ }
1306+ return r0, r1
1307+}
1308+
1309+// MockHistoryRepository_HasEntriesByDomainBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasEntriesByDomainBefore'
1310+type MockHistoryRepository_HasEntriesByDomainBefore_Call struct {
1311+ *mock.Call
1312+}
1313+
1314+// HasEntriesByDomainBefore is a helper method to define mock.On call
1315+// - ctx context.Context
1316+// - domain string
1317+// - before time.Time
1318+func (_e *MockHistoryRepository_Expecter) HasEntriesByDomainBefore(ctx any, domain any, before any) *MockHistoryRepository_HasEntriesByDomainBefore_Call {
1319+ return &MockHistoryRepository_HasEntriesByDomainBefore_Call{Call: _e.mock.On("HasEntriesByDomainBefore", ctx, domain, before)}
1320+}
1321+
1322+func (_c *MockHistoryRepository_HasEntriesByDomainBefore_Call) Run(run func(ctx context.Context, domain string, before time.Time)) *MockHistoryRepository_HasEntriesByDomainBefore_Call {
1323+ _c.Call.Run(func(args mock.Arguments) {
1324+ var arg0 context.Context
1325+ if args[0] != nil {
1326+ arg0 = args[0].(context.Context)
1327+ }
1328+ var arg1 string
1329+ if args[1] != nil {
1330+ arg1 = args[1].(string)
1331+ }
1332+ var arg2 time.Time
1333+ if args[2] != nil {
1334+ arg2 = args[2].(time.Time)
1335+ }
1336+ run(
1337+ arg0,
1338+ arg1,
1339+ arg2,
1340+ )
1341+ })
1342+ return _c
1343+}
1344+
1345+func (_c *MockHistoryRepository_HasEntriesByDomainBefore_Call) Return(b bool, err error) *MockHistoryRepository_HasEntriesByDomainBefore_Call {
1346+ _c.Call.Return(b, err)
1347+ return _c
1348+}
1349+
1350+func (_c *MockHistoryRepository_HasEntriesByDomainBefore_Call) RunAndReturn(run func(ctx context.Context, domain string, before time.Time) (bool, error)) *MockHistoryRepository_HasEntriesByDomainBefore_Call {
1351+ _c.Call.Return(run)
1352+ return _c
1353+}
1354+
1355+// IncrementVisitCount provides a mock function for the type MockHistoryRepository
1356+func (_mock *MockHistoryRepository) IncrementVisitCount(ctx context.Context, url string) error {
1357+ ret := _mock.Called(ctx, url)
1358+
1359+ if len(ret) == 0 {
1360+ panic("no return value specified for IncrementVisitCount")
1361+ }
1362+
1363+ var r0 error
1364+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
1365+ r0 = returnFunc(ctx, url)
1366+ } else {
1367+ r0 = ret.Error(0)
1368+ }
1369+ return r0
1370+}
1371+
1372+// MockHistoryRepository_IncrementVisitCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementVisitCount'
1373+type MockHistoryRepository_IncrementVisitCount_Call struct {
1374+ *mock.Call
1375+}
1376+
1377+// IncrementVisitCount is a helper method to define mock.On call
1378+// - ctx context.Context
1379+// - url string
1380+func (_e *MockHistoryRepository_Expecter) IncrementVisitCount(ctx any, url any) *MockHistoryRepository_IncrementVisitCount_Call {
1381+ return &MockHistoryRepository_IncrementVisitCount_Call{Call: _e.mock.On("IncrementVisitCount", ctx, url)}
1382+}
1383+
1384+func (_c *MockHistoryRepository_IncrementVisitCount_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_IncrementVisitCount_Call {
1385+ _c.Call.Run(func(args mock.Arguments) {
1386+ var arg0 context.Context
1387+ if args[0] != nil {
1388+ arg0 = args[0].(context.Context)
1389+ }
1390+ var arg1 string
1391+ if args[1] != nil {
1392+ arg1 = args[1].(string)
1393+ }
1394+ run(
1395+ arg0,
1396+ arg1,
1397+ )
1398+ })
1399+ return _c
1400+}
1401+
1402+func (_c *MockHistoryRepository_IncrementVisitCount_Call) Return(err error) *MockHistoryRepository_IncrementVisitCount_Call {
1403+ _c.Call.Return(err)
1404+ return _c
1405+}
1406+
1407+func (_c *MockHistoryRepository_IncrementVisitCount_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockHistoryRepository_IncrementVisitCount_Call {
1408+ _c.Call.Return(run)
1409+ return _c
1410+}
1411+
1412+// Save provides a mock function for the type MockHistoryRepository
1413+func (_mock *MockHistoryRepository) Save(ctx context.Context, entry *entity.HistoryEntry) error {
1414+ ret := _mock.Called(ctx, entry)
1415+
1416+ if len(ret) == 0 {
1417+ panic("no return value specified for Save")
1418+ }
1419+
1420+ var r0 error
1421+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.HistoryEntry) error); ok {
1422+ r0 = returnFunc(ctx, entry)
1423+ } else {
1424+ r0 = ret.Error(0)
1425+ }
1426+ return r0
1427+}
1428+
1429+// MockHistoryRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
1430+type MockHistoryRepository_Save_Call struct {
1431+ *mock.Call
1432+}
1433+
1434+// Save is a helper method to define mock.On call
1435+// - ctx context.Context
1436+// - entry *entity.HistoryEntry
1437+func (_e *MockHistoryRepository_Expecter) Save(ctx any, entry any) *MockHistoryRepository_Save_Call {
1438+ return &MockHistoryRepository_Save_Call{Call: _e.mock.On("Save", ctx, entry)}
1439+}
1440+
1441+func (_c *MockHistoryRepository_Save_Call) Run(run func(ctx context.Context, entry *entity.HistoryEntry)) *MockHistoryRepository_Save_Call {
1442+ _c.Call.Run(func(args mock.Arguments) {
1443+ var arg0 context.Context
1444+ if args[0] != nil {
1445+ arg0 = args[0].(context.Context)
1446+ }
1447+ var arg1 *entity.HistoryEntry
1448+ if args[1] != nil {
1449+ arg1 = args[1].(*entity.HistoryEntry)
1450+ }
1451+ run(
1452+ arg0,
1453+ arg1,
1454+ )
1455+ })
1456+ return _c
1457+}
1458+
1459+func (_c *MockHistoryRepository_Save_Call) Return(err error) *MockHistoryRepository_Save_Call {
1460+ _c.Call.Return(err)
1461+ return _c
1462+}
1463+
1464+func (_c *MockHistoryRepository_Save_Call) RunAndReturn(run func(ctx context.Context, entry *entity.HistoryEntry) error) *MockHistoryRepository_Save_Call {
1465+ _c.Call.Return(run)
1466+ return _c
1467+}
1468+
1469+// Search provides a mock function for the type MockHistoryRepository
1470+func (_mock *MockHistoryRepository) Search(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error) {
1471+ ret := _mock.Called(ctx, query, limit)
1472+
1473+ if len(ret) == 0 {
1474+ panic("no return value specified for Search")
1475+ }
1476+
1477+ var r0 []entity.HistoryMatch
1478+ var r1 error
1479+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]entity.HistoryMatch, error)); ok {
1480+ return returnFunc(ctx, query, limit)
1481+ }
1482+ if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []entity.HistoryMatch); ok {
1483+ r0 = returnFunc(ctx, query, limit)
1484+ } else {
1485+ if ret.Get(0) != nil {
1486+ r0 = ret.Get(0).([]entity.HistoryMatch)
1487+ }
1488+ }
1489+ if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok {
1490+ r1 = returnFunc(ctx, query, limit)
1491+ } else {
1492+ r1 = ret.Error(1)
1493+ }
1494+ return r0, r1
1495+}
1496+
1497+// MockHistoryRepository_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
1498+type MockHistoryRepository_Search_Call struct {
1499+ *mock.Call
1500+}
1501+
1502+// Search is a helper method to define mock.On call
1503+// - ctx context.Context
1504+// - query string
1505+// - limit int
1506+func (_e *MockHistoryRepository_Expecter) Search(ctx any, query any, limit any) *MockHistoryRepository_Search_Call {
1507+ return &MockHistoryRepository_Search_Call{Call: _e.mock.On("Search", ctx, query, limit)}
1508+}
1509+
1510+func (_c *MockHistoryRepository_Search_Call) Run(run func(ctx context.Context, query string, limit int)) *MockHistoryRepository_Search_Call {
1511+ _c.Call.Run(func(args mock.Arguments) {
1512+ var arg0 context.Context
1513+ if args[0] != nil {
1514+ arg0 = args[0].(context.Context)
1515+ }
1516+ var arg1 string
1517+ if args[1] != nil {
1518+ arg1 = args[1].(string)
1519+ }
1520+ var arg2 int
1521+ if args[2] != nil {
1522+ arg2 = args[2].(int)
1523+ }
1524+ run(
1525+ arg0,
1526+ arg1,
1527+ arg2,
1528+ )
1529+ })
1530+ return _c
1531+}
1532+
1533+func (_c *MockHistoryRepository_Search_Call) Return(historyMatchs []entity.HistoryMatch, err error) *MockHistoryRepository_Search_Call {
1534+ _c.Call.Return(historyMatchs, err)
1535+ return _c
1536+}
1537+
1538+func (_c *MockHistoryRepository_Search_Call) RunAndReturn(run func(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error)) *MockHistoryRepository_Search_Call {
1539+ _c.Call.Return(run)
1540+ return _c
1541+}
D internal/domain/repository/mocks/mocks.go +0 -4545 large diff (4545 lines changed): collapsed
A internal/domain/repository/mocks/session.go +547 -0
@@ -0,0 +1,547 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+ "time"
10+
11+ "github.com/bnema/dumber/internal/domain/entity"
12+ mock "github.com/stretchr/testify/mock"
13+)
14+
15+// NewMockSessionRepository creates a new instance of MockSessionRepository. 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.
17+func NewMockSessionRepository(t interface {
18+ mock.TestingT
19+ Cleanup(func())
20+}) *MockSessionRepository {
21+ mock := &MockSessionRepository{}
22+ mock.Mock.Test(t)
23+
24+ t.Cleanup(func() { mock.AssertExpectations(t) })
25+
26+ return mock
27+}
28+
29+// MockSessionRepository is an autogenerated mock type for the SessionRepository type
30+type MockSessionRepository struct {
31+ mock.Mock
32+}
33+
34+type MockSessionRepository_Expecter struct {
35+ mock *mock.Mock
36+}
37+
38+func (_m *MockSessionRepository) EXPECT() *MockSessionRepository_Expecter {
39+ return &MockSessionRepository_Expecter{mock: &_m.Mock}
40+}
41+
42+// Delete provides a mock function for the type MockSessionRepository
43+func (_mock *MockSessionRepository) Delete(ctx context.Context, id entity.SessionID) error {
44+ ret := _mock.Called(ctx, id)
45+
46+ if len(ret) == 0 {
47+ panic("no return value specified for Delete")
48+ }
49+
50+ var r0 error
51+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) error); ok {
52+ r0 = returnFunc(ctx, id)
53+ } else {
54+ r0 = ret.Error(0)
55+ }
56+ return r0
57+}
58+
59+// MockSessionRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
60+type MockSessionRepository_Delete_Call struct {
61+ *mock.Call
62+}
63+
64+// Delete is a helper method to define mock.On call
65+// - ctx context.Context
66+// - id entity.SessionID
67+func (_e *MockSessionRepository_Expecter) Delete(ctx any, id any) *MockSessionRepository_Delete_Call {
68+ return &MockSessionRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
69+}
70+
71+func (_c *MockSessionRepository_Delete_Call) Run(run func(ctx context.Context, id entity.SessionID)) *MockSessionRepository_Delete_Call {
72+ _c.Call.Run(func(args mock.Arguments) {
73+ var arg0 context.Context
74+ if args[0] != nil {
75+ arg0 = args[0].(context.Context)
76+ }
77+ var arg1 entity.SessionID
78+ if args[1] != nil {
79+ arg1 = args[1].(entity.SessionID)
80+ }
81+ run(
82+ arg0,
83+ arg1,
84+ )
85+ })
86+ return _c
87+}
88+
89+func (_c *MockSessionRepository_Delete_Call) Return(err error) *MockSessionRepository_Delete_Call {
90+ _c.Call.Return(err)
91+ return _c
92+}
93+
94+func (_c *MockSessionRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID) error) *MockSessionRepository_Delete_Call {
95+ _c.Call.Return(run)
96+ return _c
97+}
98+
99+// DeleteExitedBefore provides a mock function for the type MockSessionRepository
100+func (_mock *MockSessionRepository) DeleteExitedBefore(ctx context.Context, cutoff time.Time) (int64, error) {
101+ ret := _mock.Called(ctx, cutoff)
102+
103+ if len(ret) == 0 {
104+ panic("no return value specified for DeleteExitedBefore")
105+ }
106+
107+ var r0 int64
108+ var r1 error
109+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok {
110+ return returnFunc(ctx, cutoff)
111+ }
112+ if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok {
113+ r0 = returnFunc(ctx, cutoff)
114+ } else {
115+ r0 = ret.Get(0).(int64)
116+ }
117+ if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
118+ r1 = returnFunc(ctx, cutoff)
119+ } else {
120+ r1 = ret.Error(1)
121+ }
122+ return r0, r1
123+}
124+
125+// MockSessionRepository_DeleteExitedBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExitedBefore'
126+type MockSessionRepository_DeleteExitedBefore_Call struct {
127+ *mock.Call
128+}
129+
130+// DeleteExitedBefore is a helper method to define mock.On call
131+// - ctx context.Context
132+// - cutoff time.Time
133+func (_e *MockSessionRepository_Expecter) DeleteExitedBefore(ctx any, cutoff any) *MockSessionRepository_DeleteExitedBefore_Call {
134+ return &MockSessionRepository_DeleteExitedBefore_Call{Call: _e.mock.On("DeleteExitedBefore", ctx, cutoff)}
135+}
136+
137+func (_c *MockSessionRepository_DeleteExitedBefore_Call) Run(run func(ctx context.Context, cutoff time.Time)) *MockSessionRepository_DeleteExitedBefore_Call {
138+ _c.Call.Run(func(args mock.Arguments) {
139+ var arg0 context.Context
140+ if args[0] != nil {
141+ arg0 = args[0].(context.Context)
142+ }
143+ var arg1 time.Time
144+ if args[1] != nil {
145+ arg1 = args[1].(time.Time)
146+ }
147+ run(
148+ arg0,
149+ arg1,
150+ )
151+ })
152+ return _c
153+}
154+
155+func (_c *MockSessionRepository_DeleteExitedBefore_Call) Return(n int64, err error) *MockSessionRepository_DeleteExitedBefore_Call {
156+ _c.Call.Return(n, err)
157+ return _c
158+}
159+
160+func (_c *MockSessionRepository_DeleteExitedBefore_Call) RunAndReturn(run func(ctx context.Context, cutoff time.Time) (int64, error)) *MockSessionRepository_DeleteExitedBefore_Call {
161+ _c.Call.Return(run)
162+ return _c
163+}
164+
165+// DeleteOldestExited provides a mock function for the type MockSessionRepository
166+func (_mock *MockSessionRepository) DeleteOldestExited(ctx context.Context, keepCount int) (int64, error) {
167+ ret := _mock.Called(ctx, keepCount)
168+
169+ if len(ret) == 0 {
170+ panic("no return value specified for DeleteOldestExited")
171+ }
172+
173+ var r0 int64
174+ var r1 error
175+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) (int64, error)); ok {
176+ return returnFunc(ctx, keepCount)
177+ }
178+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) int64); ok {
179+ r0 = returnFunc(ctx, keepCount)
180+ } else {
181+ r0 = ret.Get(0).(int64)
182+ }
183+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
184+ r1 = returnFunc(ctx, keepCount)
185+ } else {
186+ r1 = ret.Error(1)
187+ }
188+ return r0, r1
189+}
190+
191+// MockSessionRepository_DeleteOldestExited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOldestExited'
192+type MockSessionRepository_DeleteOldestExited_Call struct {
193+ *mock.Call
194+}
195+
196+// DeleteOldestExited is a helper method to define mock.On call
197+// - ctx context.Context
198+// - keepCount int
199+func (_e *MockSessionRepository_Expecter) DeleteOldestExited(ctx any, keepCount any) *MockSessionRepository_DeleteOldestExited_Call {
200+ return &MockSessionRepository_DeleteOldestExited_Call{Call: _e.mock.On("DeleteOldestExited", ctx, keepCount)}
201+}
202+
203+func (_c *MockSessionRepository_DeleteOldestExited_Call) Run(run func(ctx context.Context, keepCount int)) *MockSessionRepository_DeleteOldestExited_Call {
204+ _c.Call.Run(func(args mock.Arguments) {
205+ var arg0 context.Context
206+ if args[0] != nil {
207+ arg0 = args[0].(context.Context)
208+ }
209+ var arg1 int
210+ if args[1] != nil {
211+ arg1 = args[1].(int)
212+ }
213+ run(
214+ arg0,
215+ arg1,
216+ )
217+ })
218+ return _c
219+}
220+
221+func (_c *MockSessionRepository_DeleteOldestExited_Call) Return(n int64, err error) *MockSessionRepository_DeleteOldestExited_Call {
222+ _c.Call.Return(n, err)
223+ return _c
224+}
225+
226+func (_c *MockSessionRepository_DeleteOldestExited_Call) RunAndReturn(run func(ctx context.Context, keepCount int) (int64, error)) *MockSessionRepository_DeleteOldestExited_Call {
227+ _c.Call.Return(run)
228+ return _c
229+}
230+
231+// FindByID provides a mock function for the type MockSessionRepository
232+func (_mock *MockSessionRepository) FindByID(ctx context.Context, id entity.SessionID) (*entity.Session, error) {
233+ ret := _mock.Called(ctx, id)
234+
235+ if len(ret) == 0 {
236+ panic("no return value specified for FindByID")
237+ }
238+
239+ var r0 *entity.Session
240+ var r1 error
241+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) (*entity.Session, error)); ok {
242+ return returnFunc(ctx, id)
243+ }
244+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) *entity.Session); ok {
245+ r0 = returnFunc(ctx, id)
246+ } else {
247+ if ret.Get(0) != nil {
248+ r0 = ret.Get(0).(*entity.Session)
249+ }
250+ }
251+ if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID) error); ok {
252+ r1 = returnFunc(ctx, id)
253+ } else {
254+ r1 = ret.Error(1)
255+ }
256+ return r0, r1
257+}
258+
259+// MockSessionRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID'
260+type MockSessionRepository_FindByID_Call struct {
261+ *mock.Call
262+}
263+
264+// FindByID is a helper method to define mock.On call
265+// - ctx context.Context
266+// - id entity.SessionID
267+func (_e *MockSessionRepository_Expecter) FindByID(ctx any, id any) *MockSessionRepository_FindByID_Call {
268+ return &MockSessionRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)}
269+}
270+
271+func (_c *MockSessionRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.SessionID)) *MockSessionRepository_FindByID_Call {
272+ _c.Call.Run(func(args mock.Arguments) {
273+ var arg0 context.Context
274+ if args[0] != nil {
275+ arg0 = args[0].(context.Context)
276+ }
277+ var arg1 entity.SessionID
278+ if args[1] != nil {
279+ arg1 = args[1].(entity.SessionID)
280+ }
281+ run(
282+ arg0,
283+ arg1,
284+ )
285+ })
286+ return _c
287+}
288+
289+func (_c *MockSessionRepository_FindByID_Call) Return(session *entity.Session, err error) *MockSessionRepository_FindByID_Call {
290+ _c.Call.Return(session, err)
291+ return _c
292+}
293+
294+func (_c *MockSessionRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID) (*entity.Session, error)) *MockSessionRepository_FindByID_Call {
295+ _c.Call.Return(run)
296+ return _c
297+}
298+
299+// GetActive provides a mock function for the type MockSessionRepository
300+func (_mock *MockSessionRepository) GetActive(ctx context.Context) (*entity.Session, error) {
301+ ret := _mock.Called(ctx)
302+
303+ if len(ret) == 0 {
304+ panic("no return value specified for GetActive")
305+ }
306+
307+ var r0 *entity.Session
308+ var r1 error
309+ if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.Session, error)); ok {
310+ return returnFunc(ctx)
311+ }
312+ if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.Session); ok {
313+ r0 = returnFunc(ctx)
314+ } else {
315+ if ret.Get(0) != nil {
316+ r0 = ret.Get(0).(*entity.Session)
317+ }
318+ }
319+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
320+ r1 = returnFunc(ctx)
321+ } else {
322+ r1 = ret.Error(1)
323+ }
324+ return r0, r1
325+}
326+
327+// MockSessionRepository_GetActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActive'
328+type MockSessionRepository_GetActive_Call struct {
329+ *mock.Call
330+}
331+
332+// GetActive is a helper method to define mock.On call
333+// - ctx context.Context
334+func (_e *MockSessionRepository_Expecter) GetActive(ctx any) *MockSessionRepository_GetActive_Call {
335+ return &MockSessionRepository_GetActive_Call{Call: _e.mock.On("GetActive", ctx)}
336+}
337+
338+func (_c *MockSessionRepository_GetActive_Call) Run(run func(ctx context.Context)) *MockSessionRepository_GetActive_Call {
339+ _c.Call.Run(func(args mock.Arguments) {
340+ var arg0 context.Context
341+ if args[0] != nil {
342+ arg0 = args[0].(context.Context)
343+ }
344+ run(
345+ arg0,
346+ )
347+ })
348+ return _c
349+}
350+
351+func (_c *MockSessionRepository_GetActive_Call) Return(session *entity.Session, err error) *MockSessionRepository_GetActive_Call {
352+ _c.Call.Return(session, err)
353+ return _c
354+}
355+
356+func (_c *MockSessionRepository_GetActive_Call) RunAndReturn(run func(ctx context.Context) (*entity.Session, error)) *MockSessionRepository_GetActive_Call {
357+ _c.Call.Return(run)
358+ return _c
359+}
360+
361+// GetRecent provides a mock function for the type MockSessionRepository
362+func (_mock *MockSessionRepository) GetRecent(ctx context.Context, limit int) ([]*entity.Session, error) {
363+ ret := _mock.Called(ctx, limit)
364+
365+ if len(ret) == 0 {
366+ panic("no return value specified for GetRecent")
367+ }
368+
369+ var r0 []*entity.Session
370+ var r1 error
371+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.Session, error)); ok {
372+ return returnFunc(ctx, limit)
373+ }
374+ if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.Session); ok {
375+ r0 = returnFunc(ctx, limit)
376+ } else {
377+ if ret.Get(0) != nil {
378+ r0 = ret.Get(0).([]*entity.Session)
379+ }
380+ }
381+ if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
382+ r1 = returnFunc(ctx, limit)
383+ } else {
384+ r1 = ret.Error(1)
385+ }
386+ return r0, r1
387+}
388+
389+// MockSessionRepository_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent'
390+type MockSessionRepository_GetRecent_Call struct {
391+ *mock.Call
392+}
393+
394+// GetRecent is a helper method to define mock.On call
395+// - ctx context.Context
396+// - limit int
397+func (_e *MockSessionRepository_Expecter) GetRecent(ctx any, limit any) *MockSessionRepository_GetRecent_Call {
398+ return &MockSessionRepository_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit)}
399+}
400+
401+func (_c *MockSessionRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int)) *MockSessionRepository_GetRecent_Call {
402+ _c.Call.Run(func(args mock.Arguments) {
403+ var arg0 context.Context
404+ if args[0] != nil {
405+ arg0 = args[0].(context.Context)
406+ }
407+ var arg1 int
408+ if args[1] != nil {
409+ arg1 = args[1].(int)
410+ }
411+ run(
412+ arg0,
413+ arg1,
414+ )
415+ })
416+ return _c
417+}
418+
419+func (_c *MockSessionRepository_GetRecent_Call) Return(sessions []*entity.Session, err error) *MockSessionRepository_GetRecent_Call {
420+ _c.Call.Return(sessions, err)
421+ return _c
422+}
423+
424+func (_c *MockSessionRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.Session, error)) *MockSessionRepository_GetRecent_Call {
425+ _c.Call.Return(run)
426+ return _c
427+}
428+
429+// MarkEnded provides a mock function for the type MockSessionRepository
430+func (_mock *MockSessionRepository) MarkEnded(ctx context.Context, id entity.SessionID, endedAt time.Time) error {
431+ ret := _mock.Called(ctx, id, endedAt)
432+
433+ if len(ret) == 0 {
434+ panic("no return value specified for MarkEnded")
435+ }
436+
437+ var r0 error
438+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, time.Time) error); ok {
439+ r0 = returnFunc(ctx, id, endedAt)
440+ } else {
441+ r0 = ret.Error(0)
442+ }
443+ return r0
444+}
445+
446+// MockSessionRepository_MarkEnded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkEnded'
447+type MockSessionRepository_MarkEnded_Call struct {
448+ *mock.Call
449+}
450+
451+// MarkEnded is a helper method to define mock.On call
452+// - ctx context.Context
453+// - id entity.SessionID
454+// - endedAt time.Time
455+func (_e *MockSessionRepository_Expecter) MarkEnded(ctx any, id any, endedAt any) *MockSessionRepository_MarkEnded_Call {
456+ return &MockSessionRepository_MarkEnded_Call{Call: _e.mock.On("MarkEnded", ctx, id, endedAt)}
457+}
458+
459+func (_c *MockSessionRepository_MarkEnded_Call) Run(run func(ctx context.Context, id entity.SessionID, endedAt time.Time)) *MockSessionRepository_MarkEnded_Call {
460+ _c.Call.Run(func(args mock.Arguments) {
461+ var arg0 context.Context
462+ if args[0] != nil {
463+ arg0 = args[0].(context.Context)
464+ }
465+ var arg1 entity.SessionID
466+ if args[1] != nil {
467+ arg1 = args[1].(entity.SessionID)
468+ }
469+ var arg2 time.Time
470+ if args[2] != nil {
471+ arg2 = args[2].(time.Time)
472+ }
473+ run(
474+ arg0,
475+ arg1,
476+ arg2,
477+ )
478+ })
479+ return _c
480+}
481+
482+func (_c *MockSessionRepository_MarkEnded_Call) Return(err error) *MockSessionRepository_MarkEnded_Call {
483+ _c.Call.Return(err)
484+ return _c
485+}
486+
487+func (_c *MockSessionRepository_MarkEnded_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID, endedAt time.Time) error) *MockSessionRepository_MarkEnded_Call {
488+ _c.Call.Return(run)
489+ return _c
490+}
491+
492+// Save provides a mock function for the type MockSessionRepository
493+func (_mock *MockSessionRepository) Save(ctx context.Context, session *entity.Session) error {
494+ ret := _mock.Called(ctx, session)
495+
496+ if len(ret) == 0 {
497+ panic("no return value specified for Save")
498+ }
499+
500+ var r0 error
501+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Session) error); ok {
502+ r0 = returnFunc(ctx, session)
503+ } else {
504+ r0 = ret.Error(0)
505+ }
506+ return r0
507+}
508+
509+// MockSessionRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
510+type MockSessionRepository_Save_Call struct {
511+ *mock.Call
512+}
513+
514+// Save is a helper method to define mock.On call
515+// - ctx context.Context
516+// - session *entity.Session
517+func (_e *MockSessionRepository_Expecter) Save(ctx any, session any) *MockSessionRepository_Save_Call {
518+ return &MockSessionRepository_Save_Call{Call: _e.mock.On("Save", ctx, session)}
519+}
520+
521+func (_c *MockSessionRepository_Save_Call) Run(run func(ctx context.Context, session *entity.Session)) *MockSessionRepository_Save_Call {
522+ _c.Call.Run(func(args mock.Arguments) {
523+ var arg0 context.Context
524+ if args[0] != nil {
525+ arg0 = args[0].(context.Context)
526+ }
527+ var arg1 *entity.Session
528+ if args[1] != nil {
529+ arg1 = args[1].(*entity.Session)
530+ }
531+ run(
532+ arg0,
533+ arg1,
534+ )
535+ })
536+ return _c
537+}
538+
539+func (_c *MockSessionRepository_Save_Call) Return(err error) *MockSessionRepository_Save_Call {
540+ _c.Call.Return(err)
541+ return _c
542+}
543+
544+func (_c *MockSessionRepository_Save_Call) RunAndReturn(run func(ctx context.Context, session *entity.Session) error) *MockSessionRepository_Save_Call {
545+ _c.Call.Return(run)
546+ return _c
547+}
A internal/domain/repository/mocks/session_state.go +343 -0
@@ -0,0 +1,343 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/domain/entity"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockSessionStateRepository creates a new instance of MockSessionStateRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockSessionStateRepository(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockSessionStateRepository {
20+ mock := &MockSessionStateRepository{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockSessionStateRepository is an autogenerated mock type for the SessionStateRepository type
29+type MockSessionStateRepository struct {
30+ mock.Mock
31+}
32+
33+type MockSessionStateRepository_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockSessionStateRepository) EXPECT() *MockSessionStateRepository_Expecter {
38+ return &MockSessionStateRepository_Expecter{mock: &_m.Mock}
39+}
40+
41+// DeleteSnapshot provides a mock function for the type MockSessionStateRepository
42+func (_mock *MockSessionStateRepository) DeleteSnapshot(ctx context.Context, sessionID entity.SessionID) error {
43+ ret := _mock.Called(ctx, sessionID)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for DeleteSnapshot")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) error); ok {
51+ r0 = returnFunc(ctx, sessionID)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockSessionStateRepository_DeleteSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSnapshot'
59+type MockSessionStateRepository_DeleteSnapshot_Call struct {
60+ *mock.Call
61+}
62+
63+// DeleteSnapshot is a helper method to define mock.On call
64+// - ctx context.Context
65+// - sessionID entity.SessionID
66+func (_e *MockSessionStateRepository_Expecter) DeleteSnapshot(ctx any, sessionID any) *MockSessionStateRepository_DeleteSnapshot_Call {
67+ return &MockSessionStateRepository_DeleteSnapshot_Call{Call: _e.mock.On("DeleteSnapshot", ctx, sessionID)}
68+}
69+
70+func (_c *MockSessionStateRepository_DeleteSnapshot_Call) Run(run func(ctx context.Context, sessionID entity.SessionID)) *MockSessionStateRepository_DeleteSnapshot_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 context.Context
73+ if args[0] != nil {
74+ arg0 = args[0].(context.Context)
75+ }
76+ var arg1 entity.SessionID
77+ if args[1] != nil {
78+ arg1 = args[1].(entity.SessionID)
79+ }
80+ run(
81+ arg0,
82+ arg1,
83+ )
84+ })
85+ return _c
86+}
87+
88+func (_c *MockSessionStateRepository_DeleteSnapshot_Call) Return(err error) *MockSessionStateRepository_DeleteSnapshot_Call {
89+ _c.Call.Return(err)
90+ return _c
91+}
92+
93+func (_c *MockSessionStateRepository_DeleteSnapshot_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID) error) *MockSessionStateRepository_DeleteSnapshot_Call {
94+ _c.Call.Return(run)
95+ return _c
96+}
97+
98+// GetAllSnapshots provides a mock function for the type MockSessionStateRepository
99+func (_mock *MockSessionStateRepository) GetAllSnapshots(ctx context.Context) ([]*entity.SessionState, error) {
100+ ret := _mock.Called(ctx)
101+
102+ if len(ret) == 0 {
103+ panic("no return value specified for GetAllSnapshots")
104+ }
105+
106+ var r0 []*entity.SessionState
107+ var r1 error
108+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.SessionState, error)); ok {
109+ return returnFunc(ctx)
110+ }
111+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.SessionState); ok {
112+ r0 = returnFunc(ctx)
113+ } else {
114+ if ret.Get(0) != nil {
115+ r0 = ret.Get(0).([]*entity.SessionState)
116+ }
117+ }
118+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
119+ r1 = returnFunc(ctx)
120+ } else {
121+ r1 = ret.Error(1)
122+ }
123+ return r0, r1
124+}
125+
126+// MockSessionStateRepository_GetAllSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllSnapshots'
127+type MockSessionStateRepository_GetAllSnapshots_Call struct {
128+ *mock.Call
129+}
130+
131+// GetAllSnapshots is a helper method to define mock.On call
132+// - ctx context.Context
133+func (_e *MockSessionStateRepository_Expecter) GetAllSnapshots(ctx any) *MockSessionStateRepository_GetAllSnapshots_Call {
134+ return &MockSessionStateRepository_GetAllSnapshots_Call{Call: _e.mock.On("GetAllSnapshots", ctx)}
135+}
136+
137+func (_c *MockSessionStateRepository_GetAllSnapshots_Call) Run(run func(ctx context.Context)) *MockSessionStateRepository_GetAllSnapshots_Call {
138+ _c.Call.Run(func(args mock.Arguments) {
139+ var arg0 context.Context
140+ if args[0] != nil {
141+ arg0 = args[0].(context.Context)
142+ }
143+ run(
144+ arg0,
145+ )
146+ })
147+ return _c
148+}
149+
150+func (_c *MockSessionStateRepository_GetAllSnapshots_Call) Return(sessionStates []*entity.SessionState, err error) *MockSessionStateRepository_GetAllSnapshots_Call {
151+ _c.Call.Return(sessionStates, err)
152+ return _c
153+}
154+
155+func (_c *MockSessionStateRepository_GetAllSnapshots_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.SessionState, error)) *MockSessionStateRepository_GetAllSnapshots_Call {
156+ _c.Call.Return(run)
157+ return _c
158+}
159+
160+// GetSnapshot provides a mock function for the type MockSessionStateRepository
161+func (_mock *MockSessionStateRepository) GetSnapshot(ctx context.Context, sessionID entity.SessionID) (*entity.SessionState, error) {
162+ ret := _mock.Called(ctx, sessionID)
163+
164+ if len(ret) == 0 {
165+ panic("no return value specified for GetSnapshot")
166+ }
167+
168+ var r0 *entity.SessionState
169+ var r1 error
170+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) (*entity.SessionState, error)); ok {
171+ return returnFunc(ctx, sessionID)
172+ }
173+ if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) *entity.SessionState); ok {
174+ r0 = returnFunc(ctx, sessionID)
175+ } else {
176+ if ret.Get(0) != nil {
177+ r0 = ret.Get(0).(*entity.SessionState)
178+ }
179+ }
180+ if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID) error); ok {
181+ r1 = returnFunc(ctx, sessionID)
182+ } else {
183+ r1 = ret.Error(1)
184+ }
185+ return r0, r1
186+}
187+
188+// MockSessionStateRepository_GetSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshot'
189+type MockSessionStateRepository_GetSnapshot_Call struct {
190+ *mock.Call
191+}
192+
193+// GetSnapshot is a helper method to define mock.On call
194+// - ctx context.Context
195+// - sessionID entity.SessionID
196+func (_e *MockSessionStateRepository_Expecter) GetSnapshot(ctx any, sessionID any) *MockSessionStateRepository_GetSnapshot_Call {
197+ return &MockSessionStateRepository_GetSnapshot_Call{Call: _e.mock.On("GetSnapshot", ctx, sessionID)}
198+}
199+
200+func (_c *MockSessionStateRepository_GetSnapshot_Call) Run(run func(ctx context.Context, sessionID entity.SessionID)) *MockSessionStateRepository_GetSnapshot_Call {
201+ _c.Call.Run(func(args mock.Arguments) {
202+ var arg0 context.Context
203+ if args[0] != nil {
204+ arg0 = args[0].(context.Context)
205+ }
206+ var arg1 entity.SessionID
207+ if args[1] != nil {
208+ arg1 = args[1].(entity.SessionID)
209+ }
210+ run(
211+ arg0,
212+ arg1,
213+ )
214+ })
215+ return _c
216+}
217+
218+func (_c *MockSessionStateRepository_GetSnapshot_Call) Return(sessionState *entity.SessionState, err error) *MockSessionStateRepository_GetSnapshot_Call {
219+ _c.Call.Return(sessionState, err)
220+ return _c
221+}
222+
223+func (_c *MockSessionStateRepository_GetSnapshot_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID) (*entity.SessionState, error)) *MockSessionStateRepository_GetSnapshot_Call {
224+ _c.Call.Return(run)
225+ return _c
226+}
227+
228+// GetTotalSnapshotsSize provides a mock function for the type MockSessionStateRepository
229+func (_mock *MockSessionStateRepository) GetTotalSnapshotsSize(ctx context.Context) (int64, error) {
230+ ret := _mock.Called(ctx)
231+
232+ if len(ret) == 0 {
233+ panic("no return value specified for GetTotalSnapshotsSize")
234+ }
235+
236+ var r0 int64
237+ var r1 error
238+ if returnFunc, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
239+ return returnFunc(ctx)
240+ }
241+ if returnFunc, ok := ret.Get(0).(func(context.Context) int64); ok {
242+ r0 = returnFunc(ctx)
243+ } else {
244+ r0 = ret.Get(0).(int64)
245+ }
246+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
247+ r1 = returnFunc(ctx)
248+ } else {
249+ r1 = ret.Error(1)
250+ }
251+ return r0, r1
252+}
253+
254+// MockSessionStateRepository_GetTotalSnapshotsSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalSnapshotsSize'
255+type MockSessionStateRepository_GetTotalSnapshotsSize_Call struct {
256+ *mock.Call
257+}
258+
259+// GetTotalSnapshotsSize is a helper method to define mock.On call
260+// - ctx context.Context
261+func (_e *MockSessionStateRepository_Expecter) GetTotalSnapshotsSize(ctx any) *MockSessionStateRepository_GetTotalSnapshotsSize_Call {
262+ return &MockSessionStateRepository_GetTotalSnapshotsSize_Call{Call: _e.mock.On("GetTotalSnapshotsSize", ctx)}
263+}
264+
265+func (_c *MockSessionStateRepository_GetTotalSnapshotsSize_Call) Run(run func(ctx context.Context)) *MockSessionStateRepository_GetTotalSnapshotsSize_Call {
266+ _c.Call.Run(func(args mock.Arguments) {
267+ var arg0 context.Context
268+ if args[0] != nil {
269+ arg0 = args[0].(context.Context)
270+ }
271+ run(
272+ arg0,
273+ )
274+ })
275+ return _c
276+}
277+
278+func (_c *MockSessionStateRepository_GetTotalSnapshotsSize_Call) Return(n int64, err error) *MockSessionStateRepository_GetTotalSnapshotsSize_Call {
279+ _c.Call.Return(n, err)
280+ return _c
281+}
282+
283+func (_c *MockSessionStateRepository_GetTotalSnapshotsSize_Call) RunAndReturn(run func(ctx context.Context) (int64, error)) *MockSessionStateRepository_GetTotalSnapshotsSize_Call {
284+ _c.Call.Return(run)
285+ return _c
286+}
287+
288+// SaveSnapshot provides a mock function for the type MockSessionStateRepository
289+func (_mock *MockSessionStateRepository) SaveSnapshot(ctx context.Context, state *entity.SessionState) error {
290+ ret := _mock.Called(ctx, state)
291+
292+ if len(ret) == 0 {
293+ panic("no return value specified for SaveSnapshot")
294+ }
295+
296+ var r0 error
297+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.SessionState) error); ok {
298+ r0 = returnFunc(ctx, state)
299+ } else {
300+ r0 = ret.Error(0)
301+ }
302+ return r0
303+}
304+
305+// MockSessionStateRepository_SaveSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveSnapshot'
306+type MockSessionStateRepository_SaveSnapshot_Call struct {
307+ *mock.Call
308+}
309+
310+// SaveSnapshot is a helper method to define mock.On call
311+// - ctx context.Context
312+// - state *entity.SessionState
313+func (_e *MockSessionStateRepository_Expecter) SaveSnapshot(ctx any, state any) *MockSessionStateRepository_SaveSnapshot_Call {
314+ return &MockSessionStateRepository_SaveSnapshot_Call{Call: _e.mock.On("SaveSnapshot", ctx, state)}
315+}
316+
317+func (_c *MockSessionStateRepository_SaveSnapshot_Call) Run(run func(ctx context.Context, state *entity.SessionState)) *MockSessionStateRepository_SaveSnapshot_Call {
318+ _c.Call.Run(func(args mock.Arguments) {
319+ var arg0 context.Context
320+ if args[0] != nil {
321+ arg0 = args[0].(context.Context)
322+ }
323+ var arg1 *entity.SessionState
324+ if args[1] != nil {
325+ arg1 = args[1].(*entity.SessionState)
326+ }
327+ run(
328+ arg0,
329+ arg1,
330+ )
331+ })
332+ return _c
333+}
334+
335+func (_c *MockSessionStateRepository_SaveSnapshot_Call) Return(err error) *MockSessionStateRepository_SaveSnapshot_Call {
336+ _c.Call.Return(err)
337+ return _c
338+}
339+
340+func (_c *MockSessionStateRepository_SaveSnapshot_Call) RunAndReturn(run func(ctx context.Context, state *entity.SessionState) error) *MockSessionStateRepository_SaveSnapshot_Call {
341+ _c.Call.Return(run)
342+ return _c
343+}
A internal/domain/repository/mocks/zoom.go +283 -0
@@ -0,0 +1,283 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "context"
9+
10+ "github.com/bnema/dumber/internal/domain/entity"
11+ mock "github.com/stretchr/testify/mock"
12+)
13+
14+// NewMockZoomRepository creates a new instance of MockZoomRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15+// The first argument is typically a *testing.T value.
16+func NewMockZoomRepository(t interface {
17+ mock.TestingT
18+ Cleanup(func())
19+}) *MockZoomRepository {
20+ mock := &MockZoomRepository{}
21+ mock.Mock.Test(t)
22+
23+ t.Cleanup(func() { mock.AssertExpectations(t) })
24+
25+ return mock
26+}
27+
28+// MockZoomRepository is an autogenerated mock type for the ZoomRepository type
29+type MockZoomRepository struct {
30+ mock.Mock
31+}
32+
33+type MockZoomRepository_Expecter struct {
34+ mock *mock.Mock
35+}
36+
37+func (_m *MockZoomRepository) EXPECT() *MockZoomRepository_Expecter {
38+ return &MockZoomRepository_Expecter{mock: &_m.Mock}
39+}
40+
41+// Delete provides a mock function for the type MockZoomRepository
42+func (_mock *MockZoomRepository) Delete(ctx context.Context, domain string) error {
43+ ret := _mock.Called(ctx, domain)
44+
45+ if len(ret) == 0 {
46+ panic("no return value specified for Delete")
47+ }
48+
49+ var r0 error
50+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
51+ r0 = returnFunc(ctx, domain)
52+ } else {
53+ r0 = ret.Error(0)
54+ }
55+ return r0
56+}
57+
58+// MockZoomRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
59+type MockZoomRepository_Delete_Call struct {
60+ *mock.Call
61+}
62+
63+// Delete is a helper method to define mock.On call
64+// - ctx context.Context
65+// - domain string
66+func (_e *MockZoomRepository_Expecter) Delete(ctx any, domain any) *MockZoomRepository_Delete_Call {
67+ return &MockZoomRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, domain)}
68+}
69+
70+func (_c *MockZoomRepository_Delete_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Delete_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 context.Context
73+ if args[0] != nil {
74+ arg0 = args[0].(context.Context)
75+ }
76+ var arg1 string
77+ if args[1] != nil {
78+ arg1 = args[1].(string)
79+ }
80+ run(
81+ arg0,
82+ arg1,
83+ )
84+ })
85+ return _c
86+}
87+
88+func (_c *MockZoomRepository_Delete_Call) Return(err error) *MockZoomRepository_Delete_Call {
89+ _c.Call.Return(err)
90+ return _c
91+}
92+
93+func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockZoomRepository_Delete_Call {
94+ _c.Call.Return(run)
95+ return _c
96+}
97+
98+// Get provides a mock function for the type MockZoomRepository
99+func (_mock *MockZoomRepository) Get(ctx context.Context, domain string) (*entity.ZoomLevel, error) {
100+ ret := _mock.Called(ctx, domain)
101+
102+ if len(ret) == 0 {
103+ panic("no return value specified for Get")
104+ }
105+
106+ var r0 *entity.ZoomLevel
107+ var r1 error
108+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok {
109+ return returnFunc(ctx, domain)
110+ }
111+ if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok {
112+ r0 = returnFunc(ctx, domain)
113+ } else {
114+ if ret.Get(0) != nil {
115+ r0 = ret.Get(0).(*entity.ZoomLevel)
116+ }
117+ }
118+ if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
119+ r1 = returnFunc(ctx, domain)
120+ } else {
121+ r1 = ret.Error(1)
122+ }
123+ return r0, r1
124+}
125+
126+// MockZoomRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
127+type MockZoomRepository_Get_Call struct {
128+ *mock.Call
129+}
130+
131+// Get is a helper method to define mock.On call
132+// - ctx context.Context
133+// - domain string
134+func (_e *MockZoomRepository_Expecter) Get(ctx any, domain any) *MockZoomRepository_Get_Call {
135+ return &MockZoomRepository_Get_Call{Call: _e.mock.On("Get", ctx, domain)}
136+}
137+
138+func (_c *MockZoomRepository_Get_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Get_Call {
139+ _c.Call.Run(func(args mock.Arguments) {
140+ var arg0 context.Context
141+ if args[0] != nil {
142+ arg0 = args[0].(context.Context)
143+ }
144+ var arg1 string
145+ if args[1] != nil {
146+ arg1 = args[1].(string)
147+ }
148+ run(
149+ arg0,
150+ arg1,
151+ )
152+ })
153+ return _c
154+}
155+
156+func (_c *MockZoomRepository_Get_Call) Return(zoomLevel *entity.ZoomLevel, err error) *MockZoomRepository_Get_Call {
157+ _c.Call.Return(zoomLevel, err)
158+ return _c
159+}
160+
161+func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call {
162+ _c.Call.Return(run)
163+ return _c
164+}
165+
166+// GetAll provides a mock function for the type MockZoomRepository
167+func (_mock *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLevel, error) {
168+ ret := _mock.Called(ctx)
169+
170+ if len(ret) == 0 {
171+ panic("no return value specified for GetAll")
172+ }
173+
174+ var r0 []*entity.ZoomLevel
175+ var r1 error
176+ if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok {
177+ return returnFunc(ctx)
178+ }
179+ if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok {
180+ r0 = returnFunc(ctx)
181+ } else {
182+ if ret.Get(0) != nil {
183+ r0 = ret.Get(0).([]*entity.ZoomLevel)
184+ }
185+ }
186+ if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
187+ r1 = returnFunc(ctx)
188+ } else {
189+ r1 = ret.Error(1)
190+ }
191+ return r0, r1
192+}
193+
194+// MockZoomRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
195+type MockZoomRepository_GetAll_Call struct {
196+ *mock.Call
197+}
198+
199+// GetAll is a helper method to define mock.On call
200+// - ctx context.Context
201+func (_e *MockZoomRepository_Expecter) GetAll(ctx any) *MockZoomRepository_GetAll_Call {
202+ return &MockZoomRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
203+}
204+
205+func (_c *MockZoomRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockZoomRepository_GetAll_Call {
206+ _c.Call.Run(func(args mock.Arguments) {
207+ var arg0 context.Context
208+ if args[0] != nil {
209+ arg0 = args[0].(context.Context)
210+ }
211+ run(
212+ arg0,
213+ )
214+ })
215+ return _c
216+}
217+
218+func (_c *MockZoomRepository_GetAll_Call) Return(zoomLevels []*entity.ZoomLevel, err error) *MockZoomRepository_GetAll_Call {
219+ _c.Call.Return(zoomLevels, err)
220+ return _c
221+}
222+
223+func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call {
224+ _c.Call.Return(run)
225+ return _c
226+}
227+
228+// Set provides a mock function for the type MockZoomRepository
229+func (_mock *MockZoomRepository) Set(ctx context.Context, level *entity.ZoomLevel) error {
230+ ret := _mock.Called(ctx, level)
231+
232+ if len(ret) == 0 {
233+ panic("no return value specified for Set")
234+ }
235+
236+ var r0 error
237+ if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok {
238+ r0 = returnFunc(ctx, level)
239+ } else {
240+ r0 = ret.Error(0)
241+ }
242+ return r0
243+}
244+
245+// MockZoomRepository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
246+type MockZoomRepository_Set_Call struct {
247+ *mock.Call
248+}
249+
250+// Set is a helper method to define mock.On call
251+// - ctx context.Context
252+// - level *entity.ZoomLevel
253+func (_e *MockZoomRepository_Expecter) Set(ctx any, level any) *MockZoomRepository_Set_Call {
254+ return &MockZoomRepository_Set_Call{Call: _e.mock.On("Set", ctx, level)}
255+}
256+
257+func (_c *MockZoomRepository_Set_Call) Run(run func(ctx context.Context, level *entity.ZoomLevel)) *MockZoomRepository_Set_Call {
258+ _c.Call.Run(func(args mock.Arguments) {
259+ var arg0 context.Context
260+ if args[0] != nil {
261+ arg0 = args[0].(context.Context)
262+ }
263+ var arg1 *entity.ZoomLevel
264+ if args[1] != nil {
265+ arg1 = args[1].(*entity.ZoomLevel)
266+ }
267+ run(
268+ arg0,
269+ arg1,
270+ )
271+ })
272+ return _c
273+}
274+
275+func (_c *MockZoomRepository_Set_Call) Return(err error) *MockZoomRepository_Set_Call {
276+ _c.Call.Return(err)
277+ return _c
278+}
279+
280+func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(ctx context.Context, level *entity.ZoomLevel) error) *MockZoomRepository_Set_Call {
281+ _c.Call.Return(run)
282+ return _c
283+}
R internal/infrastructure/filtering/mocks/mocks.go → internal/infrastructure/filtering/mocks/interfaces.go +9 -9 renamed, 95% similar
@@ -77,7 +77,7 @@ type MockFilterStore_Compile_Call struct {
7777 // - ctx context.Context
7878 // - identifier string
7979 // - jsonPath string
80-func (_e *MockFilterStore_Expecter) Compile(ctx interface{}, identifier interface{}, jsonPath interface{}) *MockFilterStore_Compile_Call {
80+func (_e *MockFilterStore_Expecter) Compile(ctx any, identifier any, jsonPath any) *MockFilterStore_Compile_Call {
8181 return &MockFilterStore_Compile_Call{Call: _e.mock.On("Compile", ctx, identifier, jsonPath)}
8282 }
8383
@@ -149,7 +149,7 @@ type MockFilterStore_FetchIdentifiers_Call struct {
149149
150150 // FetchIdentifiers is a helper method to define mock.On call
151151 // - ctx context.Context
152-func (_e *MockFilterStore_Expecter) FetchIdentifiers(ctx interface{}) *MockFilterStore_FetchIdentifiers_Call {
152+func (_e *MockFilterStore_Expecter) FetchIdentifiers(ctx any) *MockFilterStore_FetchIdentifiers_Call {
153153 return &MockFilterStore_FetchIdentifiers_Call{Call: _e.mock.On("FetchIdentifiers", ctx)}
154154 }
155155
@@ -201,7 +201,7 @@ type MockFilterStore_HasCompiledFilter_Call struct {
201201 // HasCompiledFilter is a helper method to define mock.On call
202202 // - ctx context.Context
203203 // - identifier string
204-func (_e *MockFilterStore_Expecter) HasCompiledFilter(ctx interface{}, identifier interface{}) *MockFilterStore_HasCompiledFilter_Call {
204+func (_e *MockFilterStore_Expecter) HasCompiledFilter(ctx any, identifier any) *MockFilterStore_HasCompiledFilter_Call {
205205 return &MockFilterStore_HasCompiledFilter_Call{Call: _e.mock.On("HasCompiledFilter", ctx, identifier)}
206206 }
207207
@@ -269,7 +269,7 @@ type MockFilterStore_Load_Call struct {
269269 // Load is a helper method to define mock.On call
270270 // - ctx context.Context
271271 // - identifier string
272-func (_e *MockFilterStore_Expecter) Load(ctx interface{}, identifier interface{}) *MockFilterStore_Load_Call {
272+func (_e *MockFilterStore_Expecter) Load(ctx any, identifier any) *MockFilterStore_Load_Call {
273273 return &MockFilterStore_Load_Call{Call: _e.mock.On("Load", ctx, identifier)}
274274 }
275275
@@ -370,7 +370,7 @@ type MockFilterStore_Remove_Call struct {
370370 // Remove is a helper method to define mock.On call
371371 // - ctx context.Context
372372 // - identifier string
373-func (_e *MockFilterStore_Expecter) Remove(ctx interface{}, identifier interface{}) *MockFilterStore_Remove_Call {
373+func (_e *MockFilterStore_Expecter) Remove(ctx any, identifier any) *MockFilterStore_Remove_Call {
374374 return &MockFilterStore_Remove_Call{Call: _e.mock.On("Remove", ctx, identifier)}
375375 }
376376
@@ -509,7 +509,7 @@ type MockFilterDownloader_DownloadFilters_Call struct {
509509 // DownloadFilters is a helper method to define mock.On call
510510 // - ctx context.Context
511511 // - onProgress func(filtering.DownloadProgress)
512-func (_e *MockFilterDownloader_Expecter) DownloadFilters(ctx interface{}, onProgress interface{}) *MockFilterDownloader_DownloadFilters_Call {
512+func (_e *MockFilterDownloader_Expecter) DownloadFilters(ctx any, onProgress any) *MockFilterDownloader_DownloadFilters_Call {
513513 return &MockFilterDownloader_DownloadFilters_Call{Call: _e.mock.On("DownloadFilters", ctx, onProgress)}
514514 }
515515
@@ -576,7 +576,7 @@ type MockFilterDownloader_FetchManifest_Call struct {
576576
577577 // FetchManifest is a helper method to define mock.On call
578578 // - ctx context.Context
579-func (_e *MockFilterDownloader_Expecter) FetchManifest(ctx interface{}) *MockFilterDownloader_FetchManifest_Call {
579+func (_e *MockFilterDownloader_Expecter) FetchManifest(ctx any) *MockFilterDownloader_FetchManifest_Call {
580580 return &MockFilterDownloader_FetchManifest_Call{Call: _e.mock.On("FetchManifest", ctx)}
581581 }
582582
@@ -772,7 +772,7 @@ type MockFilterDownloader_IsCacheStale_Call struct {
772772
773773 // IsCacheStale is a helper method to define mock.On call
774774 // - maxAge time.Duration
775-func (_e *MockFilterDownloader_Expecter) IsCacheStale(maxAge interface{}) *MockFilterDownloader_IsCacheStale_Call {
775+func (_e *MockFilterDownloader_Expecter) IsCacheStale(maxAge any) *MockFilterDownloader_IsCacheStale_Call {
776776 return &MockFilterDownloader_IsCacheStale_Call{Call: _e.mock.On("IsCacheStale", maxAge)}
777777 }
778778
@@ -832,7 +832,7 @@ type MockFilterDownloader_NeedsUpdate_Call struct {
832832
833833 // NeedsUpdate is a helper method to define mock.On call
834834 // - ctx context.Context
835-func (_e *MockFilterDownloader_Expecter) NeedsUpdate(ctx interface{}) *MockFilterDownloader_NeedsUpdate_Call {
835+func (_e *MockFilterDownloader_Expecter) NeedsUpdate(ctx any) *MockFilterDownloader_NeedsUpdate_Call {
836836 return &MockFilterDownloader_NeedsUpdate_Call{Call: _e.mock.On("NeedsUpdate", ctx)}
837837 }
838838
A internal/ui/layout/mocks/tree.go +91 -0
@@ -0,0 +1,91 @@
1+// Code generated by mockery; DO NOT EDIT.
2+// github.com/vektra/mockery
3+// template: testify
4+
5+package mocks
6+
7+import (
8+ "github.com/bnema/dumber/internal/domain/entity"
9+ "github.com/bnema/dumber/internal/ui/layout"
10+ mock "github.com/stretchr/testify/mock"
11+)
12+
13+// NewMockPaneViewFactory creates a new instance of MockPaneViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14+// The first argument is typically a *testing.T value.
15+func NewMockPaneViewFactory(t interface {
16+ mock.TestingT
17+ Cleanup(func())
18+}) *MockPaneViewFactory {
19+ mock := &MockPaneViewFactory{}
20+ mock.Mock.Test(t)
21+
22+ t.Cleanup(func() { mock.AssertExpectations(t) })
23+
24+ return mock
25+}
26+
27+// MockPaneViewFactory is an autogenerated mock type for the PaneViewFactory type
28+type MockPaneViewFactory struct {
29+ mock.Mock
30+}
31+
32+type MockPaneViewFactory_Expecter struct {
33+ mock *mock.Mock
34+}
35+
36+func (_m *MockPaneViewFactory) EXPECT() *MockPaneViewFactory_Expecter {
37+ return &MockPaneViewFactory_Expecter{mock: &_m.Mock}
38+}
39+
40+// CreatePaneView provides a mock function for the type MockPaneViewFactory
41+func (_mock *MockPaneViewFactory) CreatePaneView(node *entity.PaneNode) layout.Widget {
42+ ret := _mock.Called(node)
43+
44+ if len(ret) == 0 {
45+ panic("no return value specified for CreatePaneView")
46+ }
47+
48+ var r0 layout.Widget
49+ if returnFunc, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok {
50+ r0 = returnFunc(node)
51+ } else {
52+ if ret.Get(0) != nil {
53+ r0 = ret.Get(0).(layout.Widget)
54+ }
55+ }
56+ return r0
57+}
58+
59+// MockPaneViewFactory_CreatePaneView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePaneView'
60+type MockPaneViewFactory_CreatePaneView_Call struct {
61+ *mock.Call
62+}
63+
64+// CreatePaneView is a helper method to define mock.On call
65+// - node *entity.PaneNode
66+func (_e *MockPaneViewFactory_Expecter) CreatePaneView(node any) *MockPaneViewFactory_CreatePaneView_Call {
67+ return &MockPaneViewFactory_CreatePaneView_Call{Call: _e.mock.On("CreatePaneView", node)}
68+}
69+
70+func (_c *MockPaneViewFactory_CreatePaneView_Call) Run(run func(node *entity.PaneNode)) *MockPaneViewFactory_CreatePaneView_Call {
71+ _c.Call.Run(func(args mock.Arguments) {
72+ var arg0 *entity.PaneNode
73+ if args[0] != nil {
74+ arg0 = args[0].(*entity.PaneNode)
75+ }
76+ run(
77+ arg0,
78+ )
79+ })
80+ return _c
81+}
82+
83+func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(widget layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
84+ _c.Call.Return(widget)
85+ return _c
86+}
87+
88+func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(node *entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
89+ _c.Call.Return(run)
90+ return _c
91+}
R internal/ui/layout/mocks/mocks.go → internal/ui/layout/mocks/widgets.go +190 -271 renamed, 94% similar
@@ -5,92 +5,11 @@
55 package mocks
66
77 import (
8- "github.com/bnema/dumber/internal/domain/entity"
98 "github.com/bnema/dumber/internal/ui/layout"
109 "github.com/bnema/puregotk/v4/gtk"
1110 mock "github.com/stretchr/testify/mock"
1211 )
1312
14-// NewMockPaneViewFactory creates a new instance of MockPaneViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15-// The first argument is typically a *testing.T value.
16-func NewMockPaneViewFactory(t interface {
17- mock.TestingT
18- Cleanup(func())
19-}) *MockPaneViewFactory {
20- mock := &MockPaneViewFactory{}
21- mock.Mock.Test(t)
22-
23- t.Cleanup(func() { mock.AssertExpectations(t) })
24-
25- return mock
26-}
27-
28-// MockPaneViewFactory is an autogenerated mock type for the PaneViewFactory type
29-type MockPaneViewFactory struct {
30- mock.Mock
31-}
32-
33-type MockPaneViewFactory_Expecter struct {
34- mock *mock.Mock
35-}
36-
37-func (_m *MockPaneViewFactory) EXPECT() *MockPaneViewFactory_Expecter {
38- return &MockPaneViewFactory_Expecter{mock: &_m.Mock}
39-}
40-
41-// CreatePaneView provides a mock function for the type MockPaneViewFactory
42-func (_mock *MockPaneViewFactory) CreatePaneView(node *entity.PaneNode) layout.Widget {
43- ret := _mock.Called(node)
44-
45- if len(ret) == 0 {
46- panic("no return value specified for CreatePaneView")
47- }
48-
49- var r0 layout.Widget
50- if returnFunc, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok {
51- r0 = returnFunc(node)
52- } else {
53- if ret.Get(0) != nil {
54- r0 = ret.Get(0).(layout.Widget)
55- }
56- }
57- return r0
58-}
59-
60-// MockPaneViewFactory_CreatePaneView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePaneView'
61-type MockPaneViewFactory_CreatePaneView_Call struct {
62- *mock.Call
63-}
64-
65-// CreatePaneView is a helper method to define mock.On call
66-// - node *entity.PaneNode
67-func (_e *MockPaneViewFactory_Expecter) CreatePaneView(node interface{}) *MockPaneViewFactory_CreatePaneView_Call {
68- return &MockPaneViewFactory_CreatePaneView_Call{Call: _e.mock.On("CreatePaneView", node)}
69-}
70-
71-func (_c *MockPaneViewFactory_CreatePaneView_Call) Run(run func(node *entity.PaneNode)) *MockPaneViewFactory_CreatePaneView_Call {
72- _c.Call.Run(func(args mock.Arguments) {
73- var arg0 *entity.PaneNode
74- if args[0] != nil {
75- arg0 = args[0].(*entity.PaneNode)
76- }
77- run(
78- arg0,
79- )
80- })
81- return _c
82-}
83-
84-func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(widget layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
85- _c.Call.Return(widget)
86- return _c
87-}
88-
89-func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(node *entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
90- _c.Call.Return(run)
91- return _c
92-}
93-
9413 // NewMockWidget creates a new instance of MockWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
9514 // The first argument is typically a *testing.T value.
9615 func NewMockWidget(t interface {
@@ -131,7 +50,7 @@ type MockWidget_AddController_Call struct {
13150
13251 // AddController is a helper method to define mock.On call
13352 // - controller *gtk.EventController
134-func (_e *MockWidget_Expecter) AddController(controller interface{}) *MockWidget_AddController_Call {
53+func (_e *MockWidget_Expecter) AddController(controller any) *MockWidget_AddController_Call {
13554 return &MockWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
13655 }
13756
@@ -171,7 +90,7 @@ type MockWidget_AddCssClass_Call struct {
17190
17291 // AddCssClass is a helper method to define mock.On call
17392 // - cssClass string
174-func (_e *MockWidget_Expecter) AddCssClass(cssClass interface{}) *MockWidget_AddCssClass_Call {
93+func (_e *MockWidget_Expecter) AddCssClass(cssClass any) *MockWidget_AddCssClass_Call {
17594 return &MockWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
17695 }
17796
@@ -237,7 +156,7 @@ type MockWidget_ComputePoint_Call struct {
237156
238157 // ComputePoint is a helper method to define mock.On call
239158 // - target layout.Widget
240-func (_e *MockWidget_Expecter) ComputePoint(target interface{}) *MockWidget_ComputePoint_Call {
159+func (_e *MockWidget_Expecter) ComputePoint(target any) *MockWidget_ComputePoint_Call {
241160 return &MockWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
242161 }
243162
@@ -600,7 +519,7 @@ type MockWidget_HasCssClass_Call struct {
600519
601520 // HasCssClass is a helper method to define mock.On call
602521 // - cssClass string
603-func (_e *MockWidget_Expecter) HasCssClass(cssClass interface{}) *MockWidget_HasCssClass_Call {
522+func (_e *MockWidget_Expecter) HasCssClass(cssClass any) *MockWidget_HasCssClass_Call {
604523 return &MockWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
605524 }
606525
@@ -761,7 +680,7 @@ type MockWidget_RemoveCssClass_Call struct {
761680
762681 // RemoveCssClass is a helper method to define mock.On call
763682 // - cssClass string
764-func (_e *MockWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockWidget_RemoveCssClass_Call {
683+func (_e *MockWidget_Expecter) RemoveCssClass(cssClass any) *MockWidget_RemoveCssClass_Call {
765684 return &MockWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
766685 }
767686
@@ -801,7 +720,7 @@ type MockWidget_SetCanFocus_Call struct {
801720
802721 // SetCanFocus is a helper method to define mock.On call
803722 // - canFocus bool
804-func (_e *MockWidget_Expecter) SetCanFocus(canFocus interface{}) *MockWidget_SetCanFocus_Call {
723+func (_e *MockWidget_Expecter) SetCanFocus(canFocus any) *MockWidget_SetCanFocus_Call {
805724 return &MockWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
806725 }
807726
@@ -841,7 +760,7 @@ type MockWidget_SetCanTarget_Call struct {
841760
842761 // SetCanTarget is a helper method to define mock.On call
843762 // - canTarget bool
844-func (_e *MockWidget_Expecter) SetCanTarget(canTarget interface{}) *MockWidget_SetCanTarget_Call {
763+func (_e *MockWidget_Expecter) SetCanTarget(canTarget any) *MockWidget_SetCanTarget_Call {
845764 return &MockWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
846765 }
847766
@@ -881,7 +800,7 @@ type MockWidget_SetFocusOnClick_Call struct {
881800
882801 // SetFocusOnClick is a helper method to define mock.On call
883802 // - focusOnClick bool
884-func (_e *MockWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockWidget_SetFocusOnClick_Call {
803+func (_e *MockWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockWidget_SetFocusOnClick_Call {
885804 return &MockWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
886805 }
887806
@@ -921,7 +840,7 @@ type MockWidget_SetFocusable_Call struct {
921840
922841 // SetFocusable is a helper method to define mock.On call
923842 // - focusable bool
924-func (_e *MockWidget_Expecter) SetFocusable(focusable interface{}) *MockWidget_SetFocusable_Call {
843+func (_e *MockWidget_Expecter) SetFocusable(focusable any) *MockWidget_SetFocusable_Call {
925844 return &MockWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
926845 }
927846
@@ -961,7 +880,7 @@ type MockWidget_SetHalign_Call struct {
961880
962881 // SetHalign is a helper method to define mock.On call
963882 // - align gtk.Align
964-func (_e *MockWidget_Expecter) SetHalign(align interface{}) *MockWidget_SetHalign_Call {
883+func (_e *MockWidget_Expecter) SetHalign(align any) *MockWidget_SetHalign_Call {
965884 return &MockWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
966885 }
967886
@@ -1001,7 +920,7 @@ type MockWidget_SetHexpand_Call struct {
1001920
1002921 // SetHexpand is a helper method to define mock.On call
1003922 // - expand bool
1004-func (_e *MockWidget_Expecter) SetHexpand(expand interface{}) *MockWidget_SetHexpand_Call {
923+func (_e *MockWidget_Expecter) SetHexpand(expand any) *MockWidget_SetHexpand_Call {
1005924 return &MockWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
1006925 }
1007926
@@ -1041,7 +960,7 @@ type MockWidget_SetOpacity_Call struct {
1041960
1042961 // SetOpacity is a helper method to define mock.On call
1043962 // - opacity float64
1044-func (_e *MockWidget_Expecter) SetOpacity(opacity interface{}) *MockWidget_SetOpacity_Call {
963+func (_e *MockWidget_Expecter) SetOpacity(opacity any) *MockWidget_SetOpacity_Call {
1045964 return &MockWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
1046965 }
1047966
@@ -1082,7 +1001,7 @@ type MockWidget_SetSizeRequest_Call struct {
10821001 // SetSizeRequest is a helper method to define mock.On call
10831002 // - width int
10841003 // - height int
1085-func (_e *MockWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockWidget_SetSizeRequest_Call {
1004+func (_e *MockWidget_Expecter) SetSizeRequest(width any, height any) *MockWidget_SetSizeRequest_Call {
10861005 return &MockWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
10871006 }
10881007
@@ -1127,7 +1046,7 @@ type MockWidget_SetValign_Call struct {
11271046
11281047 // SetValign is a helper method to define mock.On call
11291048 // - align gtk.Align
1130-func (_e *MockWidget_Expecter) SetValign(align interface{}) *MockWidget_SetValign_Call {
1049+func (_e *MockWidget_Expecter) SetValign(align any) *MockWidget_SetValign_Call {
11311050 return &MockWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
11321051 }
11331052
@@ -1167,7 +1086,7 @@ type MockWidget_SetVexpand_Call struct {
11671086
11681087 // SetVexpand is a helper method to define mock.On call
11691088 // - expand bool
1170-func (_e *MockWidget_Expecter) SetVexpand(expand interface{}) *MockWidget_SetVexpand_Call {
1089+func (_e *MockWidget_Expecter) SetVexpand(expand any) *MockWidget_SetVexpand_Call {
11711090 return &MockWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
11721091 }
11731092
@@ -1207,7 +1126,7 @@ type MockWidget_SetVisible_Call struct {
12071126
12081127 // SetVisible is a helper method to define mock.On call
12091128 // - visible bool
1210-func (_e *MockWidget_Expecter) SetVisible(visible interface{}) *MockWidget_SetVisible_Call {
1129+func (_e *MockWidget_Expecter) SetVisible(visible any) *MockWidget_SetVisible_Call {
12111130 return &MockWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
12121131 }
12131132
@@ -1340,7 +1259,7 @@ type MockPanedWidget_AddController_Call struct {
13401259
13411260 // AddController is a helper method to define mock.On call
13421261 // - controller *gtk.EventController
1343-func (_e *MockPanedWidget_Expecter) AddController(controller interface{}) *MockPanedWidget_AddController_Call {
1262+func (_e *MockPanedWidget_Expecter) AddController(controller any) *MockPanedWidget_AddController_Call {
13441263 return &MockPanedWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
13451264 }
13461265
@@ -1380,7 +1299,7 @@ type MockPanedWidget_AddCssClass_Call struct {
13801299
13811300 // AddCssClass is a helper method to define mock.On call
13821301 // - cssClass string
1383-func (_e *MockPanedWidget_Expecter) AddCssClass(cssClass interface{}) *MockPanedWidget_AddCssClass_Call {
1302+func (_e *MockPanedWidget_Expecter) AddCssClass(cssClass any) *MockPanedWidget_AddCssClass_Call {
13841303 return &MockPanedWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
13851304 }
13861305
@@ -1431,7 +1350,7 @@ type MockPanedWidget_AddTickCallback_Call struct {
14311350
14321351 // AddTickCallback is a helper method to define mock.On call
14331352 // - callback func() bool
1434-func (_e *MockPanedWidget_Expecter) AddTickCallback(callback interface{}) *MockPanedWidget_AddTickCallback_Call {
1353+func (_e *MockPanedWidget_Expecter) AddTickCallback(callback any) *MockPanedWidget_AddTickCallback_Call {
14351354 return &MockPanedWidget_AddTickCallback_Call{Call: _e.mock.On("AddTickCallback", callback)}
14361355 }
14371356
@@ -1497,7 +1416,7 @@ type MockPanedWidget_ComputePoint_Call struct {
14971416
14981417 // ComputePoint is a helper method to define mock.On call
14991418 // - target layout.Widget
1500-func (_e *MockPanedWidget_Expecter) ComputePoint(target interface{}) *MockPanedWidget_ComputePoint_Call {
1419+func (_e *MockPanedWidget_Expecter) ComputePoint(target any) *MockPanedWidget_ComputePoint_Call {
15011420 return &MockPanedWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
15021421 }
15031422
@@ -1548,7 +1467,7 @@ type MockPanedWidget_ConnectMap_Call struct {
15481467
15491468 // ConnectMap is a helper method to define mock.On call
15501469 // - callback func()
1551-func (_e *MockPanedWidget_Expecter) ConnectMap(callback interface{}) *MockPanedWidget_ConnectMap_Call {
1470+func (_e *MockPanedWidget_Expecter) ConnectMap(callback any) *MockPanedWidget_ConnectMap_Call {
15521471 return &MockPanedWidget_ConnectMap_Call{Call: _e.mock.On("ConnectMap", callback)}
15531472 }
15541473
@@ -1599,7 +1518,7 @@ type MockPanedWidget_ConnectNotifyPosition_Call struct {
15991518
16001519 // ConnectNotifyPosition is a helper method to define mock.On call
16011520 // - callback func()
1602-func (_e *MockPanedWidget_Expecter) ConnectNotifyPosition(callback interface{}) *MockPanedWidget_ConnectNotifyPosition_Call {
1521+func (_e *MockPanedWidget_Expecter) ConnectNotifyPosition(callback any) *MockPanedWidget_ConnectNotifyPosition_Call {
16031522 return &MockPanedWidget_ConnectNotifyPosition_Call{Call: _e.mock.On("ConnectNotifyPosition", callback)}
16041523 }
16051524
@@ -2318,7 +2237,7 @@ type MockPanedWidget_HasCssClass_Call struct {
23182237
23192238 // HasCssClass is a helper method to define mock.On call
23202239 // - cssClass string
2321-func (_e *MockPanedWidget_Expecter) HasCssClass(cssClass interface{}) *MockPanedWidget_HasCssClass_Call {
2240+func (_e *MockPanedWidget_Expecter) HasCssClass(cssClass any) *MockPanedWidget_HasCssClass_Call {
23222241 return &MockPanedWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
23232242 }
23242243
@@ -2479,7 +2398,7 @@ type MockPanedWidget_RemoveCssClass_Call struct {
24792398
24802399 // RemoveCssClass is a helper method to define mock.On call
24812400 // - cssClass string
2482-func (_e *MockPanedWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockPanedWidget_RemoveCssClass_Call {
2401+func (_e *MockPanedWidget_Expecter) RemoveCssClass(cssClass any) *MockPanedWidget_RemoveCssClass_Call {
24832402 return &MockPanedWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
24842403 }
24852404
@@ -2519,7 +2438,7 @@ type MockPanedWidget_SetCanFocus_Call struct {
25192438
25202439 // SetCanFocus is a helper method to define mock.On call
25212440 // - canFocus bool
2522-func (_e *MockPanedWidget_Expecter) SetCanFocus(canFocus interface{}) *MockPanedWidget_SetCanFocus_Call {
2441+func (_e *MockPanedWidget_Expecter) SetCanFocus(canFocus any) *MockPanedWidget_SetCanFocus_Call {
25232442 return &MockPanedWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
25242443 }
25252444
@@ -2559,7 +2478,7 @@ type MockPanedWidget_SetCanTarget_Call struct {
25592478
25602479 // SetCanTarget is a helper method to define mock.On call
25612480 // - canTarget bool
2562-func (_e *MockPanedWidget_Expecter) SetCanTarget(canTarget interface{}) *MockPanedWidget_SetCanTarget_Call {
2481+func (_e *MockPanedWidget_Expecter) SetCanTarget(canTarget any) *MockPanedWidget_SetCanTarget_Call {
25632482 return &MockPanedWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
25642483 }
25652484
@@ -2599,7 +2518,7 @@ type MockPanedWidget_SetEndChild_Call struct {
25992518
26002519 // SetEndChild is a helper method to define mock.On call
26012520 // - child layout.Widget
2602-func (_e *MockPanedWidget_Expecter) SetEndChild(child interface{}) *MockPanedWidget_SetEndChild_Call {
2521+func (_e *MockPanedWidget_Expecter) SetEndChild(child any) *MockPanedWidget_SetEndChild_Call {
26032522 return &MockPanedWidget_SetEndChild_Call{Call: _e.mock.On("SetEndChild", child)}
26042523 }
26052524
@@ -2639,7 +2558,7 @@ type MockPanedWidget_SetFocusOnClick_Call struct {
26392558
26402559 // SetFocusOnClick is a helper method to define mock.On call
26412560 // - focusOnClick bool
2642-func (_e *MockPanedWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockPanedWidget_SetFocusOnClick_Call {
2561+func (_e *MockPanedWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockPanedWidget_SetFocusOnClick_Call {
26432562 return &MockPanedWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
26442563 }
26452564
@@ -2679,7 +2598,7 @@ type MockPanedWidget_SetFocusable_Call struct {
26792598
26802599 // SetFocusable is a helper method to define mock.On call
26812600 // - focusable bool
2682-func (_e *MockPanedWidget_Expecter) SetFocusable(focusable interface{}) *MockPanedWidget_SetFocusable_Call {
2601+func (_e *MockPanedWidget_Expecter) SetFocusable(focusable any) *MockPanedWidget_SetFocusable_Call {
26832602 return &MockPanedWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
26842603 }
26852604
@@ -2719,7 +2638,7 @@ type MockPanedWidget_SetHalign_Call struct {
27192638
27202639 // SetHalign is a helper method to define mock.On call
27212640 // - align gtk.Align
2722-func (_e *MockPanedWidget_Expecter) SetHalign(align interface{}) *MockPanedWidget_SetHalign_Call {
2641+func (_e *MockPanedWidget_Expecter) SetHalign(align any) *MockPanedWidget_SetHalign_Call {
27232642 return &MockPanedWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
27242643 }
27252644
@@ -2759,7 +2678,7 @@ type MockPanedWidget_SetHexpand_Call struct {
27592678
27602679 // SetHexpand is a helper method to define mock.On call
27612680 // - expand bool
2762-func (_e *MockPanedWidget_Expecter) SetHexpand(expand interface{}) *MockPanedWidget_SetHexpand_Call {
2681+func (_e *MockPanedWidget_Expecter) SetHexpand(expand any) *MockPanedWidget_SetHexpand_Call {
27632682 return &MockPanedWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
27642683 }
27652684
@@ -2799,7 +2718,7 @@ type MockPanedWidget_SetOpacity_Call struct {
27992718
28002719 // SetOpacity is a helper method to define mock.On call
28012720 // - opacity float64
2802-func (_e *MockPanedWidget_Expecter) SetOpacity(opacity interface{}) *MockPanedWidget_SetOpacity_Call {
2721+func (_e *MockPanedWidget_Expecter) SetOpacity(opacity any) *MockPanedWidget_SetOpacity_Call {
28032722 return &MockPanedWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
28042723 }
28052724
@@ -2839,7 +2758,7 @@ type MockPanedWidget_SetPosition_Call struct {
28392758
28402759 // SetPosition is a helper method to define mock.On call
28412760 // - position int
2842-func (_e *MockPanedWidget_Expecter) SetPosition(position interface{}) *MockPanedWidget_SetPosition_Call {
2761+func (_e *MockPanedWidget_Expecter) SetPosition(position any) *MockPanedWidget_SetPosition_Call {
28432762 return &MockPanedWidget_SetPosition_Call{Call: _e.mock.On("SetPosition", position)}
28442763 }
28452764
@@ -2879,7 +2798,7 @@ type MockPanedWidget_SetResizeEndChild_Call struct {
28792798
28802799 // SetResizeEndChild is a helper method to define mock.On call
28812800 // - resize bool
2882-func (_e *MockPanedWidget_Expecter) SetResizeEndChild(resize interface{}) *MockPanedWidget_SetResizeEndChild_Call {
2801+func (_e *MockPanedWidget_Expecter) SetResizeEndChild(resize any) *MockPanedWidget_SetResizeEndChild_Call {
28832802 return &MockPanedWidget_SetResizeEndChild_Call{Call: _e.mock.On("SetResizeEndChild", resize)}
28842803 }
28852804
@@ -2919,7 +2838,7 @@ type MockPanedWidget_SetResizeStartChild_Call struct {
29192838
29202839 // SetResizeStartChild is a helper method to define mock.On call
29212840 // - resize bool
2922-func (_e *MockPanedWidget_Expecter) SetResizeStartChild(resize interface{}) *MockPanedWidget_SetResizeStartChild_Call {
2841+func (_e *MockPanedWidget_Expecter) SetResizeStartChild(resize any) *MockPanedWidget_SetResizeStartChild_Call {
29232842 return &MockPanedWidget_SetResizeStartChild_Call{Call: _e.mock.On("SetResizeStartChild", resize)}
29242843 }
29252844
@@ -2959,7 +2878,7 @@ type MockPanedWidget_SetShrinkEndChild_Call struct {
29592878
29602879 // SetShrinkEndChild is a helper method to define mock.On call
29612880 // - shrink bool
2962-func (_e *MockPanedWidget_Expecter) SetShrinkEndChild(shrink interface{}) *MockPanedWidget_SetShrinkEndChild_Call {
2881+func (_e *MockPanedWidget_Expecter) SetShrinkEndChild(shrink any) *MockPanedWidget_SetShrinkEndChild_Call {
29632882 return &MockPanedWidget_SetShrinkEndChild_Call{Call: _e.mock.On("SetShrinkEndChild", shrink)}
29642883 }
29652884
@@ -2999,7 +2918,7 @@ type MockPanedWidget_SetShrinkStartChild_Call struct {
29992918
30002919 // SetShrinkStartChild is a helper method to define mock.On call
30012920 // - shrink bool
3002-func (_e *MockPanedWidget_Expecter) SetShrinkStartChild(shrink interface{}) *MockPanedWidget_SetShrinkStartChild_Call {
2921+func (_e *MockPanedWidget_Expecter) SetShrinkStartChild(shrink any) *MockPanedWidget_SetShrinkStartChild_Call {
30032922 return &MockPanedWidget_SetShrinkStartChild_Call{Call: _e.mock.On("SetShrinkStartChild", shrink)}
30042923 }
30052924
@@ -3040,7 +2959,7 @@ type MockPanedWidget_SetSizeRequest_Call struct {
30402959 // SetSizeRequest is a helper method to define mock.On call
30412960 // - width int
30422961 // - height int
3043-func (_e *MockPanedWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockPanedWidget_SetSizeRequest_Call {
2962+func (_e *MockPanedWidget_Expecter) SetSizeRequest(width any, height any) *MockPanedWidget_SetSizeRequest_Call {
30442963 return &MockPanedWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
30452964 }
30462965
@@ -3085,7 +3004,7 @@ type MockPanedWidget_SetStartChild_Call struct {
30853004
30863005 // SetStartChild is a helper method to define mock.On call
30873006 // - child layout.Widget
3088-func (_e *MockPanedWidget_Expecter) SetStartChild(child interface{}) *MockPanedWidget_SetStartChild_Call {
3007+func (_e *MockPanedWidget_Expecter) SetStartChild(child any) *MockPanedWidget_SetStartChild_Call {
30893008 return &MockPanedWidget_SetStartChild_Call{Call: _e.mock.On("SetStartChild", child)}
30903009 }
30913010
@@ -3125,7 +3044,7 @@ type MockPanedWidget_SetValign_Call struct {
31253044
31263045 // SetValign is a helper method to define mock.On call
31273046 // - align gtk.Align
3128-func (_e *MockPanedWidget_Expecter) SetValign(align interface{}) *MockPanedWidget_SetValign_Call {
3047+func (_e *MockPanedWidget_Expecter) SetValign(align any) *MockPanedWidget_SetValign_Call {
31293048 return &MockPanedWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
31303049 }
31313050
@@ -3165,7 +3084,7 @@ type MockPanedWidget_SetVexpand_Call struct {
31653084
31663085 // SetVexpand is a helper method to define mock.On call
31673086 // - expand bool
3168-func (_e *MockPanedWidget_Expecter) SetVexpand(expand interface{}) *MockPanedWidget_SetVexpand_Call {
3087+func (_e *MockPanedWidget_Expecter) SetVexpand(expand any) *MockPanedWidget_SetVexpand_Call {
31693088 return &MockPanedWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
31703089 }
31713090
@@ -3205,7 +3124,7 @@ type MockPanedWidget_SetVisible_Call struct {
32053124
32063125 // SetVisible is a helper method to define mock.On call
32073126 // - visible bool
3208-func (_e *MockPanedWidget_Expecter) SetVisible(visible interface{}) *MockPanedWidget_SetVisible_Call {
3127+func (_e *MockPanedWidget_Expecter) SetVisible(visible any) *MockPanedWidget_SetVisible_Call {
32093128 return &MockPanedWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
32103129 }
32113130
@@ -3245,7 +3164,7 @@ type MockPanedWidget_SetWideHandle_Call struct {
32453164
32463165 // SetWideHandle is a helper method to define mock.On call
32473166 // - wide bool
3248-func (_e *MockPanedWidget_Expecter) SetWideHandle(wide interface{}) *MockPanedWidget_SetWideHandle_Call {
3167+func (_e *MockPanedWidget_Expecter) SetWideHandle(wide any) *MockPanedWidget_SetWideHandle_Call {
32493168 return &MockPanedWidget_SetWideHandle_Call{Call: _e.mock.On("SetWideHandle", wide)}
32503169 }
32513170
@@ -3378,7 +3297,7 @@ type MockBoxWidget_AddController_Call struct {
33783297
33793298 // AddController is a helper method to define mock.On call
33803299 // - controller *gtk.EventController
3381-func (_e *MockBoxWidget_Expecter) AddController(controller interface{}) *MockBoxWidget_AddController_Call {
3300+func (_e *MockBoxWidget_Expecter) AddController(controller any) *MockBoxWidget_AddController_Call {
33823301 return &MockBoxWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
33833302 }
33843303
@@ -3418,7 +3337,7 @@ type MockBoxWidget_AddCssClass_Call struct {
34183337
34193338 // AddCssClass is a helper method to define mock.On call
34203339 // - cssClass string
3421-func (_e *MockBoxWidget_Expecter) AddCssClass(cssClass interface{}) *MockBoxWidget_AddCssClass_Call {
3340+func (_e *MockBoxWidget_Expecter) AddCssClass(cssClass any) *MockBoxWidget_AddCssClass_Call {
34223341 return &MockBoxWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
34233342 }
34243343
@@ -3458,7 +3377,7 @@ type MockBoxWidget_Append_Call struct {
34583377
34593378 // Append is a helper method to define mock.On call
34603379 // - child layout.Widget
3461-func (_e *MockBoxWidget_Expecter) Append(child interface{}) *MockBoxWidget_Append_Call {
3380+func (_e *MockBoxWidget_Expecter) Append(child any) *MockBoxWidget_Append_Call {
34623381 return &MockBoxWidget_Append_Call{Call: _e.mock.On("Append", child)}
34633382 }
34643383
@@ -3524,7 +3443,7 @@ type MockBoxWidget_ComputePoint_Call struct {
35243443
35253444 // ComputePoint is a helper method to define mock.On call
35263445 // - target layout.Widget
3527-func (_e *MockBoxWidget_Expecter) ComputePoint(target interface{}) *MockBoxWidget_ComputePoint_Call {
3446+func (_e *MockBoxWidget_Expecter) ComputePoint(target any) *MockBoxWidget_ComputePoint_Call {
35283447 return &MockBoxWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
35293448 }
35303449
@@ -4019,7 +3938,7 @@ type MockBoxWidget_HasCssClass_Call struct {
40193938
40203939 // HasCssClass is a helper method to define mock.On call
40213940 // - cssClass string
4022-func (_e *MockBoxWidget_Expecter) HasCssClass(cssClass interface{}) *MockBoxWidget_HasCssClass_Call {
3941+func (_e *MockBoxWidget_Expecter) HasCssClass(cssClass any) *MockBoxWidget_HasCssClass_Call {
40233942 return &MockBoxWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
40243943 }
40253944
@@ -4137,7 +4056,7 @@ type MockBoxWidget_InsertChildAfter_Call struct {
41374056 // InsertChildAfter is a helper method to define mock.On call
41384057 // - child layout.Widget
41394058 // - sibling layout.Widget
4140-func (_e *MockBoxWidget_Expecter) InsertChildAfter(child interface{}, sibling interface{}) *MockBoxWidget_InsertChildAfter_Call {
4059+func (_e *MockBoxWidget_Expecter) InsertChildAfter(child any, sibling any) *MockBoxWidget_InsertChildAfter_Call {
41414060 return &MockBoxWidget_InsertChildAfter_Call{Call: _e.mock.On("InsertChildAfter", child, sibling)}
41424061 }
41434062
@@ -4226,7 +4145,7 @@ type MockBoxWidget_Prepend_Call struct {
42264145
42274146 // Prepend is a helper method to define mock.On call
42284147 // - child layout.Widget
4229-func (_e *MockBoxWidget_Expecter) Prepend(child interface{}) *MockBoxWidget_Prepend_Call {
4148+func (_e *MockBoxWidget_Expecter) Prepend(child any) *MockBoxWidget_Prepend_Call {
42304149 return &MockBoxWidget_Prepend_Call{Call: _e.mock.On("Prepend", child)}
42314150 }
42324151
@@ -4266,7 +4185,7 @@ type MockBoxWidget_Remove_Call struct {
42664185
42674186 // Remove is a helper method to define mock.On call
42684187 // - child layout.Widget
4269-func (_e *MockBoxWidget_Expecter) Remove(child interface{}) *MockBoxWidget_Remove_Call {
4188+func (_e *MockBoxWidget_Expecter) Remove(child any) *MockBoxWidget_Remove_Call {
42704189 return &MockBoxWidget_Remove_Call{Call: _e.mock.On("Remove", child)}
42714190 }
42724191
@@ -4306,7 +4225,7 @@ type MockBoxWidget_RemoveCssClass_Call struct {
43064225
43074226 // RemoveCssClass is a helper method to define mock.On call
43084227 // - cssClass string
4309-func (_e *MockBoxWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockBoxWidget_RemoveCssClass_Call {
4228+func (_e *MockBoxWidget_Expecter) RemoveCssClass(cssClass any) *MockBoxWidget_RemoveCssClass_Call {
43104229 return &MockBoxWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
43114230 }
43124231
@@ -4347,7 +4266,7 @@ type MockBoxWidget_ReorderChildAfter_Call struct {
43474266 // ReorderChildAfter is a helper method to define mock.On call
43484267 // - child layout.Widget
43494268 // - sibling layout.Widget
4350-func (_e *MockBoxWidget_Expecter) ReorderChildAfter(child interface{}, sibling interface{}) *MockBoxWidget_ReorderChildAfter_Call {
4269+func (_e *MockBoxWidget_Expecter) ReorderChildAfter(child any, sibling any) *MockBoxWidget_ReorderChildAfter_Call {
43514270 return &MockBoxWidget_ReorderChildAfter_Call{Call: _e.mock.On("ReorderChildAfter", child, sibling)}
43524271 }
43534272
@@ -4392,7 +4311,7 @@ type MockBoxWidget_SetCanFocus_Call struct {
43924311
43934312 // SetCanFocus is a helper method to define mock.On call
43944313 // - canFocus bool
4395-func (_e *MockBoxWidget_Expecter) SetCanFocus(canFocus interface{}) *MockBoxWidget_SetCanFocus_Call {
4314+func (_e *MockBoxWidget_Expecter) SetCanFocus(canFocus any) *MockBoxWidget_SetCanFocus_Call {
43964315 return &MockBoxWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
43974316 }
43984317
@@ -4432,7 +4351,7 @@ type MockBoxWidget_SetCanTarget_Call struct {
44324351
44334352 // SetCanTarget is a helper method to define mock.On call
44344353 // - canTarget bool
4435-func (_e *MockBoxWidget_Expecter) SetCanTarget(canTarget interface{}) *MockBoxWidget_SetCanTarget_Call {
4354+func (_e *MockBoxWidget_Expecter) SetCanTarget(canTarget any) *MockBoxWidget_SetCanTarget_Call {
44364355 return &MockBoxWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
44374356 }
44384357
@@ -4472,7 +4391,7 @@ type MockBoxWidget_SetFocusOnClick_Call struct {
44724391
44734392 // SetFocusOnClick is a helper method to define mock.On call
44744393 // - focusOnClick bool
4475-func (_e *MockBoxWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockBoxWidget_SetFocusOnClick_Call {
4394+func (_e *MockBoxWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockBoxWidget_SetFocusOnClick_Call {
44764395 return &MockBoxWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
44774396 }
44784397
@@ -4512,7 +4431,7 @@ type MockBoxWidget_SetFocusable_Call struct {
45124431
45134432 // SetFocusable is a helper method to define mock.On call
45144433 // - focusable bool
4515-func (_e *MockBoxWidget_Expecter) SetFocusable(focusable interface{}) *MockBoxWidget_SetFocusable_Call {
4434+func (_e *MockBoxWidget_Expecter) SetFocusable(focusable any) *MockBoxWidget_SetFocusable_Call {
45164435 return &MockBoxWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
45174436 }
45184437
@@ -4552,7 +4471,7 @@ type MockBoxWidget_SetHalign_Call struct {
45524471
45534472 // SetHalign is a helper method to define mock.On call
45544473 // - align gtk.Align
4555-func (_e *MockBoxWidget_Expecter) SetHalign(align interface{}) *MockBoxWidget_SetHalign_Call {
4474+func (_e *MockBoxWidget_Expecter) SetHalign(align any) *MockBoxWidget_SetHalign_Call {
45564475 return &MockBoxWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
45574476 }
45584477
@@ -4592,7 +4511,7 @@ type MockBoxWidget_SetHexpand_Call struct {
45924511
45934512 // SetHexpand is a helper method to define mock.On call
45944513 // - expand bool
4595-func (_e *MockBoxWidget_Expecter) SetHexpand(expand interface{}) *MockBoxWidget_SetHexpand_Call {
4514+func (_e *MockBoxWidget_Expecter) SetHexpand(expand any) *MockBoxWidget_SetHexpand_Call {
45964515 return &MockBoxWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
45974516 }
45984517
@@ -4632,7 +4551,7 @@ type MockBoxWidget_SetHomogeneous_Call struct {
46324551
46334552 // SetHomogeneous is a helper method to define mock.On call
46344553 // - homogeneous bool
4635-func (_e *MockBoxWidget_Expecter) SetHomogeneous(homogeneous interface{}) *MockBoxWidget_SetHomogeneous_Call {
4554+func (_e *MockBoxWidget_Expecter) SetHomogeneous(homogeneous any) *MockBoxWidget_SetHomogeneous_Call {
46364555 return &MockBoxWidget_SetHomogeneous_Call{Call: _e.mock.On("SetHomogeneous", homogeneous)}
46374556 }
46384557
@@ -4672,7 +4591,7 @@ type MockBoxWidget_SetOpacity_Call struct {
46724591
46734592 // SetOpacity is a helper method to define mock.On call
46744593 // - opacity float64
4675-func (_e *MockBoxWidget_Expecter) SetOpacity(opacity interface{}) *MockBoxWidget_SetOpacity_Call {
4594+func (_e *MockBoxWidget_Expecter) SetOpacity(opacity any) *MockBoxWidget_SetOpacity_Call {
46764595 return &MockBoxWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
46774596 }
46784597
@@ -4712,7 +4631,7 @@ type MockBoxWidget_SetOrientation_Call struct {
47124631
47134632 // SetOrientation is a helper method to define mock.On call
47144633 // - orientation layout.Orientation
4715-func (_e *MockBoxWidget_Expecter) SetOrientation(orientation interface{}) *MockBoxWidget_SetOrientation_Call {
4634+func (_e *MockBoxWidget_Expecter) SetOrientation(orientation any) *MockBoxWidget_SetOrientation_Call {
47164635 return &MockBoxWidget_SetOrientation_Call{Call: _e.mock.On("SetOrientation", orientation)}
47174636 }
47184637
@@ -4753,7 +4672,7 @@ type MockBoxWidget_SetSizeRequest_Call struct {
47534672 // SetSizeRequest is a helper method to define mock.On call
47544673 // - width int
47554674 // - height int
4756-func (_e *MockBoxWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockBoxWidget_SetSizeRequest_Call {
4675+func (_e *MockBoxWidget_Expecter) SetSizeRequest(width any, height any) *MockBoxWidget_SetSizeRequest_Call {
47574676 return &MockBoxWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
47584677 }
47594678
@@ -4798,7 +4717,7 @@ type MockBoxWidget_SetSpacing_Call struct {
47984717
47994718 // SetSpacing is a helper method to define mock.On call
48004719 // - spacing int
4801-func (_e *MockBoxWidget_Expecter) SetSpacing(spacing interface{}) *MockBoxWidget_SetSpacing_Call {
4720+func (_e *MockBoxWidget_Expecter) SetSpacing(spacing any) *MockBoxWidget_SetSpacing_Call {
48024721 return &MockBoxWidget_SetSpacing_Call{Call: _e.mock.On("SetSpacing", spacing)}
48034722 }
48044723
@@ -4838,7 +4757,7 @@ type MockBoxWidget_SetValign_Call struct {
48384757
48394758 // SetValign is a helper method to define mock.On call
48404759 // - align gtk.Align
4841-func (_e *MockBoxWidget_Expecter) SetValign(align interface{}) *MockBoxWidget_SetValign_Call {
4760+func (_e *MockBoxWidget_Expecter) SetValign(align any) *MockBoxWidget_SetValign_Call {
48424761 return &MockBoxWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
48434762 }
48444763
@@ -4878,7 +4797,7 @@ type MockBoxWidget_SetVexpand_Call struct {
48784797
48794798 // SetVexpand is a helper method to define mock.On call
48804799 // - expand bool
4881-func (_e *MockBoxWidget_Expecter) SetVexpand(expand interface{}) *MockBoxWidget_SetVexpand_Call {
4800+func (_e *MockBoxWidget_Expecter) SetVexpand(expand any) *MockBoxWidget_SetVexpand_Call {
48824801 return &MockBoxWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
48834802 }
48844803
@@ -4918,7 +4837,7 @@ type MockBoxWidget_SetVisible_Call struct {
49184837
49194838 // SetVisible is a helper method to define mock.On call
49204839 // - visible bool
4921-func (_e *MockBoxWidget_Expecter) SetVisible(visible interface{}) *MockBoxWidget_SetVisible_Call {
4840+func (_e *MockBoxWidget_Expecter) SetVisible(visible any) *MockBoxWidget_SetVisible_Call {
49224841 return &MockBoxWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
49234842 }
49244843
@@ -5051,7 +4970,7 @@ type MockOverlayWidget_AddController_Call struct {
50514970
50524971 // AddController is a helper method to define mock.On call
50534972 // - controller *gtk.EventController
5054-func (_e *MockOverlayWidget_Expecter) AddController(controller interface{}) *MockOverlayWidget_AddController_Call {
4973+func (_e *MockOverlayWidget_Expecter) AddController(controller any) *MockOverlayWidget_AddController_Call {
50554974 return &MockOverlayWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
50564975 }
50574976
@@ -5091,7 +5010,7 @@ type MockOverlayWidget_AddCssClass_Call struct {
50915010
50925011 // AddCssClass is a helper method to define mock.On call
50935012 // - cssClass string
5094-func (_e *MockOverlayWidget_Expecter) AddCssClass(cssClass interface{}) *MockOverlayWidget_AddCssClass_Call {
5013+func (_e *MockOverlayWidget_Expecter) AddCssClass(cssClass any) *MockOverlayWidget_AddCssClass_Call {
50955014 return &MockOverlayWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
50965015 }
50975016
@@ -5131,7 +5050,7 @@ type MockOverlayWidget_AddOverlay_Call struct {
51315050
51325051 // AddOverlay is a helper method to define mock.On call
51335052 // - overlay layout.Widget
5134-func (_e *MockOverlayWidget_Expecter) AddOverlay(overlay interface{}) *MockOverlayWidget_AddOverlay_Call {
5053+func (_e *MockOverlayWidget_Expecter) AddOverlay(overlay any) *MockOverlayWidget_AddOverlay_Call {
51355054 return &MockOverlayWidget_AddOverlay_Call{Call: _e.mock.On("AddOverlay", overlay)}
51365055 }
51375056
@@ -5197,7 +5116,7 @@ type MockOverlayWidget_ComputePoint_Call struct {
51975116
51985117 // ComputePoint is a helper method to define mock.On call
51995118 // - target layout.Widget
5200-func (_e *MockOverlayWidget_Expecter) ComputePoint(target interface{}) *MockOverlayWidget_ComputePoint_Call {
5119+func (_e *MockOverlayWidget_Expecter) ComputePoint(target any) *MockOverlayWidget_ComputePoint_Call {
52015120 return &MockOverlayWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
52025121 }
52035122
@@ -5382,7 +5301,7 @@ type MockOverlayWidget_GetClipOverlay_Call struct {
53825301
53835302 // GetClipOverlay is a helper method to define mock.On call
53845303 // - overlay layout.Widget
5385-func (_e *MockOverlayWidget_Expecter) GetClipOverlay(overlay interface{}) *MockOverlayWidget_GetClipOverlay_Call {
5304+func (_e *MockOverlayWidget_Expecter) GetClipOverlay(overlay any) *MockOverlayWidget_GetClipOverlay_Call {
53865305 return &MockOverlayWidget_GetClipOverlay_Call{Call: _e.mock.On("GetClipOverlay", overlay)}
53875306 }
53885307
@@ -5477,7 +5396,7 @@ type MockOverlayWidget_GetMeasureOverlay_Call struct {
54775396
54785397 // GetMeasureOverlay is a helper method to define mock.On call
54795398 // - overlay layout.Widget
5480-func (_e *MockOverlayWidget_Expecter) GetMeasureOverlay(overlay interface{}) *MockOverlayWidget_GetMeasureOverlay_Call {
5399+func (_e *MockOverlayWidget_Expecter) GetMeasureOverlay(overlay any) *MockOverlayWidget_GetMeasureOverlay_Call {
54815400 return &MockOverlayWidget_GetMeasureOverlay_Call{Call: _e.mock.On("GetMeasureOverlay", overlay)}
54825401 }
54835402
@@ -5708,7 +5627,7 @@ type MockOverlayWidget_HasCssClass_Call struct {
57085627
57095628 // HasCssClass is a helper method to define mock.On call
57105629 // - cssClass string
5711-func (_e *MockOverlayWidget_Expecter) HasCssClass(cssClass interface{}) *MockOverlayWidget_HasCssClass_Call {
5630+func (_e *MockOverlayWidget_Expecter) HasCssClass(cssClass any) *MockOverlayWidget_HasCssClass_Call {
57125631 return &MockOverlayWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
57135632 }
57145633
@@ -5869,7 +5788,7 @@ type MockOverlayWidget_RemoveCssClass_Call struct {
58695788
58705789 // RemoveCssClass is a helper method to define mock.On call
58715790 // - cssClass string
5872-func (_e *MockOverlayWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockOverlayWidget_RemoveCssClass_Call {
5791+func (_e *MockOverlayWidget_Expecter) RemoveCssClass(cssClass any) *MockOverlayWidget_RemoveCssClass_Call {
58735792 return &MockOverlayWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
58745793 }
58755794
@@ -5909,7 +5828,7 @@ type MockOverlayWidget_RemoveOverlay_Call struct {
59095828
59105829 // RemoveOverlay is a helper method to define mock.On call
59115830 // - overlay layout.Widget
5912-func (_e *MockOverlayWidget_Expecter) RemoveOverlay(overlay interface{}) *MockOverlayWidget_RemoveOverlay_Call {
5831+func (_e *MockOverlayWidget_Expecter) RemoveOverlay(overlay any) *MockOverlayWidget_RemoveOverlay_Call {
59135832 return &MockOverlayWidget_RemoveOverlay_Call{Call: _e.mock.On("RemoveOverlay", overlay)}
59145833 }
59155834
@@ -5949,7 +5868,7 @@ type MockOverlayWidget_SetCanFocus_Call struct {
59495868
59505869 // SetCanFocus is a helper method to define mock.On call
59515870 // - canFocus bool
5952-func (_e *MockOverlayWidget_Expecter) SetCanFocus(canFocus interface{}) *MockOverlayWidget_SetCanFocus_Call {
5871+func (_e *MockOverlayWidget_Expecter) SetCanFocus(canFocus any) *MockOverlayWidget_SetCanFocus_Call {
59535872 return &MockOverlayWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
59545873 }
59555874
@@ -5989,7 +5908,7 @@ type MockOverlayWidget_SetCanTarget_Call struct {
59895908
59905909 // SetCanTarget is a helper method to define mock.On call
59915910 // - canTarget bool
5992-func (_e *MockOverlayWidget_Expecter) SetCanTarget(canTarget interface{}) *MockOverlayWidget_SetCanTarget_Call {
5911+func (_e *MockOverlayWidget_Expecter) SetCanTarget(canTarget any) *MockOverlayWidget_SetCanTarget_Call {
59935912 return &MockOverlayWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
59945913 }
59955914
@@ -6029,7 +5948,7 @@ type MockOverlayWidget_SetChild_Call struct {
60295948
60305949 // SetChild is a helper method to define mock.On call
60315950 // - child layout.Widget
6032-func (_e *MockOverlayWidget_Expecter) SetChild(child interface{}) *MockOverlayWidget_SetChild_Call {
5951+func (_e *MockOverlayWidget_Expecter) SetChild(child any) *MockOverlayWidget_SetChild_Call {
60335952 return &MockOverlayWidget_SetChild_Call{Call: _e.mock.On("SetChild", child)}
60345953 }
60355954
@@ -6070,7 +5989,7 @@ type MockOverlayWidget_SetClipOverlay_Call struct {
60705989 // SetClipOverlay is a helper method to define mock.On call
60715990 // - overlay layout.Widget
60725991 // - clip bool
6073-func (_e *MockOverlayWidget_Expecter) SetClipOverlay(overlay interface{}, clip interface{}) *MockOverlayWidget_SetClipOverlay_Call {
5992+func (_e *MockOverlayWidget_Expecter) SetClipOverlay(overlay any, clip any) *MockOverlayWidget_SetClipOverlay_Call {
60745993 return &MockOverlayWidget_SetClipOverlay_Call{Call: _e.mock.On("SetClipOverlay", overlay, clip)}
60755994 }
60765995
@@ -6115,7 +6034,7 @@ type MockOverlayWidget_SetFocusOnClick_Call struct {
61156034
61166035 // SetFocusOnClick is a helper method to define mock.On call
61176036 // - focusOnClick bool
6118-func (_e *MockOverlayWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockOverlayWidget_SetFocusOnClick_Call {
6037+func (_e *MockOverlayWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockOverlayWidget_SetFocusOnClick_Call {
61196038 return &MockOverlayWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
61206039 }
61216040
@@ -6155,7 +6074,7 @@ type MockOverlayWidget_SetFocusable_Call struct {
61556074
61566075 // SetFocusable is a helper method to define mock.On call
61576076 // - focusable bool
6158-func (_e *MockOverlayWidget_Expecter) SetFocusable(focusable interface{}) *MockOverlayWidget_SetFocusable_Call {
6077+func (_e *MockOverlayWidget_Expecter) SetFocusable(focusable any) *MockOverlayWidget_SetFocusable_Call {
61596078 return &MockOverlayWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
61606079 }
61616080
@@ -6195,7 +6114,7 @@ type MockOverlayWidget_SetHalign_Call struct {
61956114
61966115 // SetHalign is a helper method to define mock.On call
61976116 // - align gtk.Align
6198-func (_e *MockOverlayWidget_Expecter) SetHalign(align interface{}) *MockOverlayWidget_SetHalign_Call {
6117+func (_e *MockOverlayWidget_Expecter) SetHalign(align any) *MockOverlayWidget_SetHalign_Call {
61996118 return &MockOverlayWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
62006119 }
62016120
@@ -6235,7 +6154,7 @@ type MockOverlayWidget_SetHexpand_Call struct {
62356154
62366155 // SetHexpand is a helper method to define mock.On call
62376156 // - expand bool
6238-func (_e *MockOverlayWidget_Expecter) SetHexpand(expand interface{}) *MockOverlayWidget_SetHexpand_Call {
6157+func (_e *MockOverlayWidget_Expecter) SetHexpand(expand any) *MockOverlayWidget_SetHexpand_Call {
62396158 return &MockOverlayWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
62406159 }
62416160
@@ -6276,7 +6195,7 @@ type MockOverlayWidget_SetMeasureOverlay_Call struct {
62766195 // SetMeasureOverlay is a helper method to define mock.On call
62776196 // - overlay layout.Widget
62786197 // - measure bool
6279-func (_e *MockOverlayWidget_Expecter) SetMeasureOverlay(overlay interface{}, measure interface{}) *MockOverlayWidget_SetMeasureOverlay_Call {
6198+func (_e *MockOverlayWidget_Expecter) SetMeasureOverlay(overlay any, measure any) *MockOverlayWidget_SetMeasureOverlay_Call {
62806199 return &MockOverlayWidget_SetMeasureOverlay_Call{Call: _e.mock.On("SetMeasureOverlay", overlay, measure)}
62816200 }
62826201
@@ -6321,7 +6240,7 @@ type MockOverlayWidget_SetOpacity_Call struct {
63216240
63226241 // SetOpacity is a helper method to define mock.On call
63236242 // - opacity float64
6324-func (_e *MockOverlayWidget_Expecter) SetOpacity(opacity interface{}) *MockOverlayWidget_SetOpacity_Call {
6243+func (_e *MockOverlayWidget_Expecter) SetOpacity(opacity any) *MockOverlayWidget_SetOpacity_Call {
63256244 return &MockOverlayWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
63266245 }
63276246
@@ -6362,7 +6281,7 @@ type MockOverlayWidget_SetSizeRequest_Call struct {
63626281 // SetSizeRequest is a helper method to define mock.On call
63636282 // - width int
63646283 // - height int
6365-func (_e *MockOverlayWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockOverlayWidget_SetSizeRequest_Call {
6284+func (_e *MockOverlayWidget_Expecter) SetSizeRequest(width any, height any) *MockOverlayWidget_SetSizeRequest_Call {
63666285 return &MockOverlayWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
63676286 }
63686287
@@ -6407,7 +6326,7 @@ type MockOverlayWidget_SetValign_Call struct {
64076326
64086327 // SetValign is a helper method to define mock.On call
64096328 // - align gtk.Align
6410-func (_e *MockOverlayWidget_Expecter) SetValign(align interface{}) *MockOverlayWidget_SetValign_Call {
6329+func (_e *MockOverlayWidget_Expecter) SetValign(align any) *MockOverlayWidget_SetValign_Call {
64116330 return &MockOverlayWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
64126331 }
64136332
@@ -6447,7 +6366,7 @@ type MockOverlayWidget_SetVexpand_Call struct {
64476366
64486367 // SetVexpand is a helper method to define mock.On call
64496368 // - expand bool
6450-func (_e *MockOverlayWidget_Expecter) SetVexpand(expand interface{}) *MockOverlayWidget_SetVexpand_Call {
6369+func (_e *MockOverlayWidget_Expecter) SetVexpand(expand any) *MockOverlayWidget_SetVexpand_Call {
64516370 return &MockOverlayWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
64526371 }
64536372
@@ -6487,7 +6406,7 @@ type MockOverlayWidget_SetVisible_Call struct {
64876406
64886407 // SetVisible is a helper method to define mock.On call
64896408 // - visible bool
6490-func (_e *MockOverlayWidget_Expecter) SetVisible(visible interface{}) *MockOverlayWidget_SetVisible_Call {
6409+func (_e *MockOverlayWidget_Expecter) SetVisible(visible any) *MockOverlayWidget_SetVisible_Call {
64916410 return &MockOverlayWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
64926411 }
64936412
@@ -6620,7 +6539,7 @@ type MockLabelWidget_AddController_Call struct {
66206539
66216540 // AddController is a helper method to define mock.On call
66226541 // - controller *gtk.EventController
6623-func (_e *MockLabelWidget_Expecter) AddController(controller interface{}) *MockLabelWidget_AddController_Call {
6542+func (_e *MockLabelWidget_Expecter) AddController(controller any) *MockLabelWidget_AddController_Call {
66246543 return &MockLabelWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
66256544 }
66266545
@@ -6660,7 +6579,7 @@ type MockLabelWidget_AddCssClass_Call struct {
66606579
66616580 // AddCssClass is a helper method to define mock.On call
66626581 // - cssClass string
6663-func (_e *MockLabelWidget_Expecter) AddCssClass(cssClass interface{}) *MockLabelWidget_AddCssClass_Call {
6582+func (_e *MockLabelWidget_Expecter) AddCssClass(cssClass any) *MockLabelWidget_AddCssClass_Call {
66646583 return &MockLabelWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
66656584 }
66666585
@@ -6726,7 +6645,7 @@ type MockLabelWidget_ComputePoint_Call struct {
67266645
67276646 // ComputePoint is a helper method to define mock.On call
67286647 // - target layout.Widget
6729-func (_e *MockLabelWidget_Expecter) ComputePoint(target interface{}) *MockLabelWidget_ComputePoint_Call {
6648+func (_e *MockLabelWidget_Expecter) ComputePoint(target any) *MockLabelWidget_ComputePoint_Call {
67306649 return &MockLabelWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
67316650 }
67326651
@@ -7133,7 +7052,7 @@ type MockLabelWidget_HasCssClass_Call struct {
71337052
71347053 // HasCssClass is a helper method to define mock.On call
71357054 // - cssClass string
7136-func (_e *MockLabelWidget_Expecter) HasCssClass(cssClass interface{}) *MockLabelWidget_HasCssClass_Call {
7055+func (_e *MockLabelWidget_Expecter) HasCssClass(cssClass any) *MockLabelWidget_HasCssClass_Call {
71377056 return &MockLabelWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
71387057 }
71397058
@@ -7294,7 +7213,7 @@ type MockLabelWidget_RemoveCssClass_Call struct {
72947213
72957214 // RemoveCssClass is a helper method to define mock.On call
72967215 // - cssClass string
7297-func (_e *MockLabelWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockLabelWidget_RemoveCssClass_Call {
7216+func (_e *MockLabelWidget_Expecter) RemoveCssClass(cssClass any) *MockLabelWidget_RemoveCssClass_Call {
72987217 return &MockLabelWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
72997218 }
73007219
@@ -7334,7 +7253,7 @@ type MockLabelWidget_SetCanFocus_Call struct {
73347253
73357254 // SetCanFocus is a helper method to define mock.On call
73367255 // - canFocus bool
7337-func (_e *MockLabelWidget_Expecter) SetCanFocus(canFocus interface{}) *MockLabelWidget_SetCanFocus_Call {
7256+func (_e *MockLabelWidget_Expecter) SetCanFocus(canFocus any) *MockLabelWidget_SetCanFocus_Call {
73387257 return &MockLabelWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
73397258 }
73407259
@@ -7374,7 +7293,7 @@ type MockLabelWidget_SetCanTarget_Call struct {
73747293
73757294 // SetCanTarget is a helper method to define mock.On call
73767295 // - canTarget bool
7377-func (_e *MockLabelWidget_Expecter) SetCanTarget(canTarget interface{}) *MockLabelWidget_SetCanTarget_Call {
7296+func (_e *MockLabelWidget_Expecter) SetCanTarget(canTarget any) *MockLabelWidget_SetCanTarget_Call {
73787297 return &MockLabelWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
73797298 }
73807299
@@ -7414,7 +7333,7 @@ type MockLabelWidget_SetEllipsize_Call struct {
74147333
74157334 // SetEllipsize is a helper method to define mock.On call
74167335 // - mode layout.EllipsizeMode
7417-func (_e *MockLabelWidget_Expecter) SetEllipsize(mode interface{}) *MockLabelWidget_SetEllipsize_Call {
7336+func (_e *MockLabelWidget_Expecter) SetEllipsize(mode any) *MockLabelWidget_SetEllipsize_Call {
74187337 return &MockLabelWidget_SetEllipsize_Call{Call: _e.mock.On("SetEllipsize", mode)}
74197338 }
74207339
@@ -7454,7 +7373,7 @@ type MockLabelWidget_SetFocusOnClick_Call struct {
74547373
74557374 // SetFocusOnClick is a helper method to define mock.On call
74567375 // - focusOnClick bool
7457-func (_e *MockLabelWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockLabelWidget_SetFocusOnClick_Call {
7376+func (_e *MockLabelWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockLabelWidget_SetFocusOnClick_Call {
74587377 return &MockLabelWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
74597378 }
74607379
@@ -7494,7 +7413,7 @@ type MockLabelWidget_SetFocusable_Call struct {
74947413
74957414 // SetFocusable is a helper method to define mock.On call
74967415 // - focusable bool
7497-func (_e *MockLabelWidget_Expecter) SetFocusable(focusable interface{}) *MockLabelWidget_SetFocusable_Call {
7416+func (_e *MockLabelWidget_Expecter) SetFocusable(focusable any) *MockLabelWidget_SetFocusable_Call {
74987417 return &MockLabelWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
74997418 }
75007419
@@ -7534,7 +7453,7 @@ type MockLabelWidget_SetHalign_Call struct {
75347453
75357454 // SetHalign is a helper method to define mock.On call
75367455 // - align gtk.Align
7537-func (_e *MockLabelWidget_Expecter) SetHalign(align interface{}) *MockLabelWidget_SetHalign_Call {
7456+func (_e *MockLabelWidget_Expecter) SetHalign(align any) *MockLabelWidget_SetHalign_Call {
75387457 return &MockLabelWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
75397458 }
75407459
@@ -7574,7 +7493,7 @@ type MockLabelWidget_SetHexpand_Call struct {
75747493
75757494 // SetHexpand is a helper method to define mock.On call
75767495 // - expand bool
7577-func (_e *MockLabelWidget_Expecter) SetHexpand(expand interface{}) *MockLabelWidget_SetHexpand_Call {
7496+func (_e *MockLabelWidget_Expecter) SetHexpand(expand any) *MockLabelWidget_SetHexpand_Call {
75787497 return &MockLabelWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
75797498 }
75807499
@@ -7614,7 +7533,7 @@ type MockLabelWidget_SetMarkup_Call struct {
76147533
76157534 // SetMarkup is a helper method to define mock.On call
76167535 // - markup string
7617-func (_e *MockLabelWidget_Expecter) SetMarkup(markup interface{}) *MockLabelWidget_SetMarkup_Call {
7536+func (_e *MockLabelWidget_Expecter) SetMarkup(markup any) *MockLabelWidget_SetMarkup_Call {
76187537 return &MockLabelWidget_SetMarkup_Call{Call: _e.mock.On("SetMarkup", markup)}
76197538 }
76207539
@@ -7654,7 +7573,7 @@ type MockLabelWidget_SetMaxWidthChars_Call struct {
76547573
76557574 // SetMaxWidthChars is a helper method to define mock.On call
76567575 // - nChars int
7657-func (_e *MockLabelWidget_Expecter) SetMaxWidthChars(nChars interface{}) *MockLabelWidget_SetMaxWidthChars_Call {
7576+func (_e *MockLabelWidget_Expecter) SetMaxWidthChars(nChars any) *MockLabelWidget_SetMaxWidthChars_Call {
76587577 return &MockLabelWidget_SetMaxWidthChars_Call{Call: _e.mock.On("SetMaxWidthChars", nChars)}
76597578 }
76607579
@@ -7694,7 +7613,7 @@ type MockLabelWidget_SetOpacity_Call struct {
76947613
76957614 // SetOpacity is a helper method to define mock.On call
76967615 // - opacity float64
7697-func (_e *MockLabelWidget_Expecter) SetOpacity(opacity interface{}) *MockLabelWidget_SetOpacity_Call {
7616+func (_e *MockLabelWidget_Expecter) SetOpacity(opacity any) *MockLabelWidget_SetOpacity_Call {
76987617 return &MockLabelWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
76997618 }
77007619
@@ -7735,7 +7654,7 @@ type MockLabelWidget_SetSizeRequest_Call struct {
77357654 // SetSizeRequest is a helper method to define mock.On call
77367655 // - width int
77377656 // - height int
7738-func (_e *MockLabelWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockLabelWidget_SetSizeRequest_Call {
7657+func (_e *MockLabelWidget_Expecter) SetSizeRequest(width any, height any) *MockLabelWidget_SetSizeRequest_Call {
77397658 return &MockLabelWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
77407659 }
77417660
@@ -7780,7 +7699,7 @@ type MockLabelWidget_SetText_Call struct {
77807699
77817700 // SetText is a helper method to define mock.On call
77827701 // - text string
7783-func (_e *MockLabelWidget_Expecter) SetText(text interface{}) *MockLabelWidget_SetText_Call {
7702+func (_e *MockLabelWidget_Expecter) SetText(text any) *MockLabelWidget_SetText_Call {
77847703 return &MockLabelWidget_SetText_Call{Call: _e.mock.On("SetText", text)}
77857704 }
77867705
@@ -7820,7 +7739,7 @@ type MockLabelWidget_SetValign_Call struct {
78207739
78217740 // SetValign is a helper method to define mock.On call
78227741 // - align gtk.Align
7823-func (_e *MockLabelWidget_Expecter) SetValign(align interface{}) *MockLabelWidget_SetValign_Call {
7742+func (_e *MockLabelWidget_Expecter) SetValign(align any) *MockLabelWidget_SetValign_Call {
78247743 return &MockLabelWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
78257744 }
78267745
@@ -7860,7 +7779,7 @@ type MockLabelWidget_SetVexpand_Call struct {
78607779
78617780 // SetVexpand is a helper method to define mock.On call
78627781 // - expand bool
7863-func (_e *MockLabelWidget_Expecter) SetVexpand(expand interface{}) *MockLabelWidget_SetVexpand_Call {
7782+func (_e *MockLabelWidget_Expecter) SetVexpand(expand any) *MockLabelWidget_SetVexpand_Call {
78647783 return &MockLabelWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
78657784 }
78667785
@@ -7900,7 +7819,7 @@ type MockLabelWidget_SetVisible_Call struct {
79007819
79017820 // SetVisible is a helper method to define mock.On call
79027821 // - visible bool
7903-func (_e *MockLabelWidget_Expecter) SetVisible(visible interface{}) *MockLabelWidget_SetVisible_Call {
7822+func (_e *MockLabelWidget_Expecter) SetVisible(visible any) *MockLabelWidget_SetVisible_Call {
79047823 return &MockLabelWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
79057824 }
79067825
@@ -7940,7 +7859,7 @@ type MockLabelWidget_SetXalign_Call struct {
79407859
79417860 // SetXalign is a helper method to define mock.On call
79427861 // - xalign float32
7943-func (_e *MockLabelWidget_Expecter) SetXalign(xalign interface{}) *MockLabelWidget_SetXalign_Call {
7862+func (_e *MockLabelWidget_Expecter) SetXalign(xalign any) *MockLabelWidget_SetXalign_Call {
79447863 return &MockLabelWidget_SetXalign_Call{Call: _e.mock.On("SetXalign", xalign)}
79457864 }
79467865
@@ -8073,7 +7992,7 @@ type MockButtonWidget_AddController_Call struct {
80737992
80747993 // AddController is a helper method to define mock.On call
80757994 // - controller *gtk.EventController
8076-func (_e *MockButtonWidget_Expecter) AddController(controller interface{}) *MockButtonWidget_AddController_Call {
7995+func (_e *MockButtonWidget_Expecter) AddController(controller any) *MockButtonWidget_AddController_Call {
80777996 return &MockButtonWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
80787997 }
80797998
@@ -8113,7 +8032,7 @@ type MockButtonWidget_AddCssClass_Call struct {
81138032
81148033 // AddCssClass is a helper method to define mock.On call
81158034 // - cssClass string
8116-func (_e *MockButtonWidget_Expecter) AddCssClass(cssClass interface{}) *MockButtonWidget_AddCssClass_Call {
8035+func (_e *MockButtonWidget_Expecter) AddCssClass(cssClass any) *MockButtonWidget_AddCssClass_Call {
81178036 return &MockButtonWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
81188037 }
81198038
@@ -8179,7 +8098,7 @@ type MockButtonWidget_ComputePoint_Call struct {
81798098
81808099 // ComputePoint is a helper method to define mock.On call
81818100 // - target layout.Widget
8182-func (_e *MockButtonWidget_Expecter) ComputePoint(target interface{}) *MockButtonWidget_ComputePoint_Call {
8101+func (_e *MockButtonWidget_Expecter) ComputePoint(target any) *MockButtonWidget_ComputePoint_Call {
81838102 return &MockButtonWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
81848103 }
81858104
@@ -8230,7 +8149,7 @@ type MockButtonWidget_ConnectClicked_Call struct {
82308149
82318150 // ConnectClicked is a helper method to define mock.On call
82328151 // - callback func()
8233-func (_e *MockButtonWidget_Expecter) ConnectClicked(callback interface{}) *MockButtonWidget_ConnectClicked_Call {
8152+func (_e *MockButtonWidget_Expecter) ConnectClicked(callback any) *MockButtonWidget_ConnectClicked_Call {
82348153 return &MockButtonWidget_ConnectClicked_Call{Call: _e.mock.On("ConnectClicked", callback)}
82358154 }
82368155
@@ -8683,7 +8602,7 @@ type MockButtonWidget_HasCssClass_Call struct {
86838602
86848603 // HasCssClass is a helper method to define mock.On call
86858604 // - cssClass string
8686-func (_e *MockButtonWidget_Expecter) HasCssClass(cssClass interface{}) *MockButtonWidget_HasCssClass_Call {
8605+func (_e *MockButtonWidget_Expecter) HasCssClass(cssClass any) *MockButtonWidget_HasCssClass_Call {
86878606 return &MockButtonWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
86888607 }
86898608
@@ -8844,7 +8763,7 @@ type MockButtonWidget_RemoveCssClass_Call struct {
88448763
88458764 // RemoveCssClass is a helper method to define mock.On call
88468765 // - cssClass string
8847-func (_e *MockButtonWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockButtonWidget_RemoveCssClass_Call {
8766+func (_e *MockButtonWidget_Expecter) RemoveCssClass(cssClass any) *MockButtonWidget_RemoveCssClass_Call {
88488767 return &MockButtonWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
88498768 }
88508769
@@ -8884,7 +8803,7 @@ type MockButtonWidget_SetCanFocus_Call struct {
88848803
88858804 // SetCanFocus is a helper method to define mock.On call
88868805 // - canFocus bool
8887-func (_e *MockButtonWidget_Expecter) SetCanFocus(canFocus interface{}) *MockButtonWidget_SetCanFocus_Call {
8806+func (_e *MockButtonWidget_Expecter) SetCanFocus(canFocus any) *MockButtonWidget_SetCanFocus_Call {
88888807 return &MockButtonWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
88898808 }
88908809
@@ -8924,7 +8843,7 @@ type MockButtonWidget_SetCanTarget_Call struct {
89248843
89258844 // SetCanTarget is a helper method to define mock.On call
89268845 // - canTarget bool
8927-func (_e *MockButtonWidget_Expecter) SetCanTarget(canTarget interface{}) *MockButtonWidget_SetCanTarget_Call {
8846+func (_e *MockButtonWidget_Expecter) SetCanTarget(canTarget any) *MockButtonWidget_SetCanTarget_Call {
89288847 return &MockButtonWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
89298848 }
89308849
@@ -8964,7 +8883,7 @@ type MockButtonWidget_SetChild_Call struct {
89648883
89658884 // SetChild is a helper method to define mock.On call
89668885 // - child layout.Widget
8967-func (_e *MockButtonWidget_Expecter) SetChild(child interface{}) *MockButtonWidget_SetChild_Call {
8886+func (_e *MockButtonWidget_Expecter) SetChild(child any) *MockButtonWidget_SetChild_Call {
89688887 return &MockButtonWidget_SetChild_Call{Call: _e.mock.On("SetChild", child)}
89698888 }
89708889
@@ -9004,7 +8923,7 @@ type MockButtonWidget_SetFocusOnClick_Call struct {
90048923
90058924 // SetFocusOnClick is a helper method to define mock.On call
90068925 // - focusOnClick bool
9007-func (_e *MockButtonWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockButtonWidget_SetFocusOnClick_Call {
8926+func (_e *MockButtonWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockButtonWidget_SetFocusOnClick_Call {
90088927 return &MockButtonWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
90098928 }
90108929
@@ -9044,7 +8963,7 @@ type MockButtonWidget_SetFocusable_Call struct {
90448963
90458964 // SetFocusable is a helper method to define mock.On call
90468965 // - focusable bool
9047-func (_e *MockButtonWidget_Expecter) SetFocusable(focusable interface{}) *MockButtonWidget_SetFocusable_Call {
8966+func (_e *MockButtonWidget_Expecter) SetFocusable(focusable any) *MockButtonWidget_SetFocusable_Call {
90488967 return &MockButtonWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
90498968 }
90508969
@@ -9084,7 +9003,7 @@ type MockButtonWidget_SetHalign_Call struct {
90849003
90859004 // SetHalign is a helper method to define mock.On call
90869005 // - align gtk.Align
9087-func (_e *MockButtonWidget_Expecter) SetHalign(align interface{}) *MockButtonWidget_SetHalign_Call {
9006+func (_e *MockButtonWidget_Expecter) SetHalign(align any) *MockButtonWidget_SetHalign_Call {
90889007 return &MockButtonWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
90899008 }
90909009
@@ -9124,7 +9043,7 @@ type MockButtonWidget_SetHexpand_Call struct {
91249043
91259044 // SetHexpand is a helper method to define mock.On call
91269045 // - expand bool
9127-func (_e *MockButtonWidget_Expecter) SetHexpand(expand interface{}) *MockButtonWidget_SetHexpand_Call {
9046+func (_e *MockButtonWidget_Expecter) SetHexpand(expand any) *MockButtonWidget_SetHexpand_Call {
91289047 return &MockButtonWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
91299048 }
91309049
@@ -9164,7 +9083,7 @@ type MockButtonWidget_SetIconName_Call struct {
91649083
91659084 // SetIconName is a helper method to define mock.On call
91669085 // - iconName string
9167-func (_e *MockButtonWidget_Expecter) SetIconName(iconName interface{}) *MockButtonWidget_SetIconName_Call {
9086+func (_e *MockButtonWidget_Expecter) SetIconName(iconName any) *MockButtonWidget_SetIconName_Call {
91689087 return &MockButtonWidget_SetIconName_Call{Call: _e.mock.On("SetIconName", iconName)}
91699088 }
91709089
@@ -9204,7 +9123,7 @@ type MockButtonWidget_SetLabel_Call struct {
92049123
92059124 // SetLabel is a helper method to define mock.On call
92069125 // - label string
9207-func (_e *MockButtonWidget_Expecter) SetLabel(label interface{}) *MockButtonWidget_SetLabel_Call {
9126+func (_e *MockButtonWidget_Expecter) SetLabel(label any) *MockButtonWidget_SetLabel_Call {
92089127 return &MockButtonWidget_SetLabel_Call{Call: _e.mock.On("SetLabel", label)}
92099128 }
92109129
@@ -9244,7 +9163,7 @@ type MockButtonWidget_SetOpacity_Call struct {
92449163
92459164 // SetOpacity is a helper method to define mock.On call
92469165 // - opacity float64
9247-func (_e *MockButtonWidget_Expecter) SetOpacity(opacity interface{}) *MockButtonWidget_SetOpacity_Call {
9166+func (_e *MockButtonWidget_Expecter) SetOpacity(opacity any) *MockButtonWidget_SetOpacity_Call {
92489167 return &MockButtonWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
92499168 }
92509169
@@ -9285,7 +9204,7 @@ type MockButtonWidget_SetSizeRequest_Call struct {
92859204 // SetSizeRequest is a helper method to define mock.On call
92869205 // - width int
92879206 // - height int
9288-func (_e *MockButtonWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockButtonWidget_SetSizeRequest_Call {
9207+func (_e *MockButtonWidget_Expecter) SetSizeRequest(width any, height any) *MockButtonWidget_SetSizeRequest_Call {
92899208 return &MockButtonWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
92909209 }
92919210
@@ -9330,7 +9249,7 @@ type MockButtonWidget_SetValign_Call struct {
93309249
93319250 // SetValign is a helper method to define mock.On call
93329251 // - align gtk.Align
9333-func (_e *MockButtonWidget_Expecter) SetValign(align interface{}) *MockButtonWidget_SetValign_Call {
9252+func (_e *MockButtonWidget_Expecter) SetValign(align any) *MockButtonWidget_SetValign_Call {
93349253 return &MockButtonWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
93359254 }
93369255
@@ -9370,7 +9289,7 @@ type MockButtonWidget_SetVexpand_Call struct {
93709289
93719290 // SetVexpand is a helper method to define mock.On call
93729291 // - expand bool
9373-func (_e *MockButtonWidget_Expecter) SetVexpand(expand interface{}) *MockButtonWidget_SetVexpand_Call {
9292+func (_e *MockButtonWidget_Expecter) SetVexpand(expand any) *MockButtonWidget_SetVexpand_Call {
93749293 return &MockButtonWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
93759294 }
93769295
@@ -9410,7 +9329,7 @@ type MockButtonWidget_SetVisible_Call struct {
94109329
94119330 // SetVisible is a helper method to define mock.On call
94129331 // - visible bool
9413-func (_e *MockButtonWidget_Expecter) SetVisible(visible interface{}) *MockButtonWidget_SetVisible_Call {
9332+func (_e *MockButtonWidget_Expecter) SetVisible(visible any) *MockButtonWidget_SetVisible_Call {
94149333 return &MockButtonWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
94159334 }
94169335
@@ -9543,7 +9462,7 @@ type MockImageWidget_AddController_Call struct {
95439462
95449463 // AddController is a helper method to define mock.On call
95459464 // - controller *gtk.EventController
9546-func (_e *MockImageWidget_Expecter) AddController(controller interface{}) *MockImageWidget_AddController_Call {
9465+func (_e *MockImageWidget_Expecter) AddController(controller any) *MockImageWidget_AddController_Call {
95479466 return &MockImageWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
95489467 }
95499468
@@ -9583,7 +9502,7 @@ type MockImageWidget_AddCssClass_Call struct {
95839502
95849503 // AddCssClass is a helper method to define mock.On call
95859504 // - cssClass string
9586-func (_e *MockImageWidget_Expecter) AddCssClass(cssClass interface{}) *MockImageWidget_AddCssClass_Call {
9505+func (_e *MockImageWidget_Expecter) AddCssClass(cssClass any) *MockImageWidget_AddCssClass_Call {
95879506 return &MockImageWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
95889507 }
95899508
@@ -9682,7 +9601,7 @@ type MockImageWidget_ComputePoint_Call struct {
96829601
96839602 // ComputePoint is a helper method to define mock.On call
96849603 // - target layout.Widget
9685-func (_e *MockImageWidget_Expecter) ComputePoint(target interface{}) *MockImageWidget_ComputePoint_Call {
9604+func (_e *MockImageWidget_Expecter) ComputePoint(target any) *MockImageWidget_ComputePoint_Call {
96869605 return &MockImageWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
96879606 }
96889607
@@ -10045,7 +9964,7 @@ type MockImageWidget_HasCssClass_Call struct {
100459964
100469965 // HasCssClass is a helper method to define mock.On call
100479966 // - cssClass string
10048-func (_e *MockImageWidget_Expecter) HasCssClass(cssClass interface{}) *MockImageWidget_HasCssClass_Call {
9967+func (_e *MockImageWidget_Expecter) HasCssClass(cssClass any) *MockImageWidget_HasCssClass_Call {
100499968 return &MockImageWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
100509969 }
100519970
@@ -10206,7 +10125,7 @@ type MockImageWidget_RemoveCssClass_Call struct {
1020610125
1020710126 // RemoveCssClass is a helper method to define mock.On call
1020810127 // - cssClass string
10209-func (_e *MockImageWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockImageWidget_RemoveCssClass_Call {
10128+func (_e *MockImageWidget_Expecter) RemoveCssClass(cssClass any) *MockImageWidget_RemoveCssClass_Call {
1021010129 return &MockImageWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
1021110130 }
1021210131
@@ -10246,7 +10165,7 @@ type MockImageWidget_SetCanFocus_Call struct {
1024610165
1024710166 // SetCanFocus is a helper method to define mock.On call
1024810167 // - canFocus bool
10249-func (_e *MockImageWidget_Expecter) SetCanFocus(canFocus interface{}) *MockImageWidget_SetCanFocus_Call {
10168+func (_e *MockImageWidget_Expecter) SetCanFocus(canFocus any) *MockImageWidget_SetCanFocus_Call {
1025010169 return &MockImageWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
1025110170 }
1025210171
@@ -10286,7 +10205,7 @@ type MockImageWidget_SetCanTarget_Call struct {
1028610205
1028710206 // SetCanTarget is a helper method to define mock.On call
1028810207 // - canTarget bool
10289-func (_e *MockImageWidget_Expecter) SetCanTarget(canTarget interface{}) *MockImageWidget_SetCanTarget_Call {
10208+func (_e *MockImageWidget_Expecter) SetCanTarget(canTarget any) *MockImageWidget_SetCanTarget_Call {
1029010209 return &MockImageWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
1029110210 }
1029210211
@@ -10326,7 +10245,7 @@ type MockImageWidget_SetFocusOnClick_Call struct {
1032610245
1032710246 // SetFocusOnClick is a helper method to define mock.On call
1032810247 // - focusOnClick bool
10329-func (_e *MockImageWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockImageWidget_SetFocusOnClick_Call {
10248+func (_e *MockImageWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockImageWidget_SetFocusOnClick_Call {
1033010249 return &MockImageWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
1033110250 }
1033210251
@@ -10366,7 +10285,7 @@ type MockImageWidget_SetFocusable_Call struct {
1036610285
1036710286 // SetFocusable is a helper method to define mock.On call
1036810287 // - focusable bool
10369-func (_e *MockImageWidget_Expecter) SetFocusable(focusable interface{}) *MockImageWidget_SetFocusable_Call {
10288+func (_e *MockImageWidget_Expecter) SetFocusable(focusable any) *MockImageWidget_SetFocusable_Call {
1037010289 return &MockImageWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
1037110290 }
1037210291
@@ -10406,7 +10325,7 @@ type MockImageWidget_SetFromFile_Call struct {
1040610325
1040710326 // SetFromFile is a helper method to define mock.On call
1040810327 // - filename string
10409-func (_e *MockImageWidget_Expecter) SetFromFile(filename interface{}) *MockImageWidget_SetFromFile_Call {
10328+func (_e *MockImageWidget_Expecter) SetFromFile(filename any) *MockImageWidget_SetFromFile_Call {
1041010329 return &MockImageWidget_SetFromFile_Call{Call: _e.mock.On("SetFromFile", filename)}
1041110330 }
1041210331
@@ -10446,7 +10365,7 @@ type MockImageWidget_SetFromIconName_Call struct {
1044610365
1044710366 // SetFromIconName is a helper method to define mock.On call
1044810367 // - iconName string
10449-func (_e *MockImageWidget_Expecter) SetFromIconName(iconName interface{}) *MockImageWidget_SetFromIconName_Call {
10368+func (_e *MockImageWidget_Expecter) SetFromIconName(iconName any) *MockImageWidget_SetFromIconName_Call {
1045010369 return &MockImageWidget_SetFromIconName_Call{Call: _e.mock.On("SetFromIconName", iconName)}
1045110370 }
1045210371
@@ -10486,7 +10405,7 @@ type MockImageWidget_SetFromPaintable_Call struct {
1048610405
1048710406 // SetFromPaintable is a helper method to define mock.On call
1048810407 // - paintable layout.Paintable
10489-func (_e *MockImageWidget_Expecter) SetFromPaintable(paintable interface{}) *MockImageWidget_SetFromPaintable_Call {
10408+func (_e *MockImageWidget_Expecter) SetFromPaintable(paintable any) *MockImageWidget_SetFromPaintable_Call {
1049010409 return &MockImageWidget_SetFromPaintable_Call{Call: _e.mock.On("SetFromPaintable", paintable)}
1049110410 }
1049210411
@@ -10526,7 +10445,7 @@ type MockImageWidget_SetHalign_Call struct {
1052610445
1052710446 // SetHalign is a helper method to define mock.On call
1052810447 // - align gtk.Align
10529-func (_e *MockImageWidget_Expecter) SetHalign(align interface{}) *MockImageWidget_SetHalign_Call {
10448+func (_e *MockImageWidget_Expecter) SetHalign(align any) *MockImageWidget_SetHalign_Call {
1053010449 return &MockImageWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
1053110450 }
1053210451
@@ -10566,7 +10485,7 @@ type MockImageWidget_SetHexpand_Call struct {
1056610485
1056710486 // SetHexpand is a helper method to define mock.On call
1056810487 // - expand bool
10569-func (_e *MockImageWidget_Expecter) SetHexpand(expand interface{}) *MockImageWidget_SetHexpand_Call {
10488+func (_e *MockImageWidget_Expecter) SetHexpand(expand any) *MockImageWidget_SetHexpand_Call {
1057010489 return &MockImageWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
1057110490 }
1057210491
@@ -10606,7 +10525,7 @@ type MockImageWidget_SetOpacity_Call struct {
1060610525
1060710526 // SetOpacity is a helper method to define mock.On call
1060810527 // - opacity float64
10609-func (_e *MockImageWidget_Expecter) SetOpacity(opacity interface{}) *MockImageWidget_SetOpacity_Call {
10528+func (_e *MockImageWidget_Expecter) SetOpacity(opacity any) *MockImageWidget_SetOpacity_Call {
1061010529 return &MockImageWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
1061110530 }
1061210531
@@ -10646,7 +10565,7 @@ type MockImageWidget_SetPixelSize_Call struct {
1064610565
1064710566 // SetPixelSize is a helper method to define mock.On call
1064810567 // - pixelSize int
10649-func (_e *MockImageWidget_Expecter) SetPixelSize(pixelSize interface{}) *MockImageWidget_SetPixelSize_Call {
10568+func (_e *MockImageWidget_Expecter) SetPixelSize(pixelSize any) *MockImageWidget_SetPixelSize_Call {
1065010569 return &MockImageWidget_SetPixelSize_Call{Call: _e.mock.On("SetPixelSize", pixelSize)}
1065110570 }
1065210571
@@ -10687,7 +10606,7 @@ type MockImageWidget_SetSizeRequest_Call struct {
1068710606 // SetSizeRequest is a helper method to define mock.On call
1068810607 // - width int
1068910608 // - height int
10690-func (_e *MockImageWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockImageWidget_SetSizeRequest_Call {
10609+func (_e *MockImageWidget_Expecter) SetSizeRequest(width any, height any) *MockImageWidget_SetSizeRequest_Call {
1069110610 return &MockImageWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
1069210611 }
1069310612
@@ -10732,7 +10651,7 @@ type MockImageWidget_SetValign_Call struct {
1073210651
1073310652 // SetValign is a helper method to define mock.On call
1073410653 // - align gtk.Align
10735-func (_e *MockImageWidget_Expecter) SetValign(align interface{}) *MockImageWidget_SetValign_Call {
10654+func (_e *MockImageWidget_Expecter) SetValign(align any) *MockImageWidget_SetValign_Call {
1073610655 return &MockImageWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
1073710656 }
1073810657
@@ -10772,7 +10691,7 @@ type MockImageWidget_SetVexpand_Call struct {
1077210691
1077310692 // SetVexpand is a helper method to define mock.On call
1077410693 // - expand bool
10775-func (_e *MockImageWidget_Expecter) SetVexpand(expand interface{}) *MockImageWidget_SetVexpand_Call {
10694+func (_e *MockImageWidget_Expecter) SetVexpand(expand any) *MockImageWidget_SetVexpand_Call {
1077610695 return &MockImageWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
1077710696 }
1077810697
@@ -10812,7 +10731,7 @@ type MockImageWidget_SetVisible_Call struct {
1081210731
1081310732 // SetVisible is a helper method to define mock.On call
1081410733 // - visible bool
10815-func (_e *MockImageWidget_Expecter) SetVisible(visible interface{}) *MockImageWidget_SetVisible_Call {
10734+func (_e *MockImageWidget_Expecter) SetVisible(visible any) *MockImageWidget_SetVisible_Call {
1081610735 return &MockImageWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
1081710736 }
1081810737
@@ -10945,7 +10864,7 @@ type MockProgressBarWidget_AddController_Call struct {
1094510864
1094610865 // AddController is a helper method to define mock.On call
1094710866 // - controller *gtk.EventController
10948-func (_e *MockProgressBarWidget_Expecter) AddController(controller interface{}) *MockProgressBarWidget_AddController_Call {
10867+func (_e *MockProgressBarWidget_Expecter) AddController(controller any) *MockProgressBarWidget_AddController_Call {
1094910868 return &MockProgressBarWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
1095010869 }
1095110870
@@ -10985,7 +10904,7 @@ type MockProgressBarWidget_AddCssClass_Call struct {
1098510904
1098610905 // AddCssClass is a helper method to define mock.On call
1098710906 // - cssClass string
10988-func (_e *MockProgressBarWidget_Expecter) AddCssClass(cssClass interface{}) *MockProgressBarWidget_AddCssClass_Call {
10907+func (_e *MockProgressBarWidget_Expecter) AddCssClass(cssClass any) *MockProgressBarWidget_AddCssClass_Call {
1098910908 return &MockProgressBarWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
1099010909 }
1099110910
@@ -11051,7 +10970,7 @@ type MockProgressBarWidget_ComputePoint_Call struct {
1105110970
1105210971 // ComputePoint is a helper method to define mock.On call
1105310972 // - target layout.Widget
11054-func (_e *MockProgressBarWidget_Expecter) ComputePoint(target interface{}) *MockProgressBarWidget_ComputePoint_Call {
10973+func (_e *MockProgressBarWidget_Expecter) ComputePoint(target any) *MockProgressBarWidget_ComputePoint_Call {
1105510974 return &MockProgressBarWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
1105610975 }
1105710976
@@ -11458,7 +11377,7 @@ type MockProgressBarWidget_HasCssClass_Call struct {
1145811377
1145911378 // HasCssClass is a helper method to define mock.On call
1146011379 // - cssClass string
11461-func (_e *MockProgressBarWidget_Expecter) HasCssClass(cssClass interface{}) *MockProgressBarWidget_HasCssClass_Call {
11380+func (_e *MockProgressBarWidget_Expecter) HasCssClass(cssClass any) *MockProgressBarWidget_HasCssClass_Call {
1146211381 return &MockProgressBarWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
1146311382 }
1146411383
@@ -11619,7 +11538,7 @@ type MockProgressBarWidget_RemoveCssClass_Call struct {
1161911538
1162011539 // RemoveCssClass is a helper method to define mock.On call
1162111540 // - cssClass string
11622-func (_e *MockProgressBarWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockProgressBarWidget_RemoveCssClass_Call {
11541+func (_e *MockProgressBarWidget_Expecter) RemoveCssClass(cssClass any) *MockProgressBarWidget_RemoveCssClass_Call {
1162311542 return &MockProgressBarWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
1162411543 }
1162511544
@@ -11659,7 +11578,7 @@ type MockProgressBarWidget_SetCanFocus_Call struct {
1165911578
1166011579 // SetCanFocus is a helper method to define mock.On call
1166111580 // - canFocus bool
11662-func (_e *MockProgressBarWidget_Expecter) SetCanFocus(canFocus interface{}) *MockProgressBarWidget_SetCanFocus_Call {
11581+func (_e *MockProgressBarWidget_Expecter) SetCanFocus(canFocus any) *MockProgressBarWidget_SetCanFocus_Call {
1166311582 return &MockProgressBarWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
1166411583 }
1166511584
@@ -11699,7 +11618,7 @@ type MockProgressBarWidget_SetCanTarget_Call struct {
1169911618
1170011619 // SetCanTarget is a helper method to define mock.On call
1170111620 // - canTarget bool
11702-func (_e *MockProgressBarWidget_Expecter) SetCanTarget(canTarget interface{}) *MockProgressBarWidget_SetCanTarget_Call {
11621+func (_e *MockProgressBarWidget_Expecter) SetCanTarget(canTarget any) *MockProgressBarWidget_SetCanTarget_Call {
1170311622 return &MockProgressBarWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
1170411623 }
1170511624
@@ -11739,7 +11658,7 @@ type MockProgressBarWidget_SetFocusOnClick_Call struct {
1173911658
1174011659 // SetFocusOnClick is a helper method to define mock.On call
1174111660 // - focusOnClick bool
11742-func (_e *MockProgressBarWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockProgressBarWidget_SetFocusOnClick_Call {
11661+func (_e *MockProgressBarWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockProgressBarWidget_SetFocusOnClick_Call {
1174311662 return &MockProgressBarWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
1174411663 }
1174511664
@@ -11779,7 +11698,7 @@ type MockProgressBarWidget_SetFocusable_Call struct {
1177911698
1178011699 // SetFocusable is a helper method to define mock.On call
1178111700 // - focusable bool
11782-func (_e *MockProgressBarWidget_Expecter) SetFocusable(focusable interface{}) *MockProgressBarWidget_SetFocusable_Call {
11701+func (_e *MockProgressBarWidget_Expecter) SetFocusable(focusable any) *MockProgressBarWidget_SetFocusable_Call {
1178311702 return &MockProgressBarWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
1178411703 }
1178511704
@@ -11819,7 +11738,7 @@ type MockProgressBarWidget_SetFraction_Call struct {
1181911738
1182011739 // SetFraction is a helper method to define mock.On call
1182111740 // - fraction float64
11822-func (_e *MockProgressBarWidget_Expecter) SetFraction(fraction interface{}) *MockProgressBarWidget_SetFraction_Call {
11741+func (_e *MockProgressBarWidget_Expecter) SetFraction(fraction any) *MockProgressBarWidget_SetFraction_Call {
1182311742 return &MockProgressBarWidget_SetFraction_Call{Call: _e.mock.On("SetFraction", fraction)}
1182411743 }
1182511744
@@ -11859,7 +11778,7 @@ type MockProgressBarWidget_SetHalign_Call struct {
1185911778
1186011779 // SetHalign is a helper method to define mock.On call
1186111780 // - align gtk.Align
11862-func (_e *MockProgressBarWidget_Expecter) SetHalign(align interface{}) *MockProgressBarWidget_SetHalign_Call {
11781+func (_e *MockProgressBarWidget_Expecter) SetHalign(align any) *MockProgressBarWidget_SetHalign_Call {
1186311782 return &MockProgressBarWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
1186411783 }
1186511784
@@ -11899,7 +11818,7 @@ type MockProgressBarWidget_SetHexpand_Call struct {
1189911818
1190011819 // SetHexpand is a helper method to define mock.On call
1190111820 // - expand bool
11902-func (_e *MockProgressBarWidget_Expecter) SetHexpand(expand interface{}) *MockProgressBarWidget_SetHexpand_Call {
11821+func (_e *MockProgressBarWidget_Expecter) SetHexpand(expand any) *MockProgressBarWidget_SetHexpand_Call {
1190311822 return &MockProgressBarWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
1190411823 }
1190511824
@@ -11939,7 +11858,7 @@ type MockProgressBarWidget_SetOpacity_Call struct {
1193911858
1194011859 // SetOpacity is a helper method to define mock.On call
1194111860 // - opacity float64
11942-func (_e *MockProgressBarWidget_Expecter) SetOpacity(opacity interface{}) *MockProgressBarWidget_SetOpacity_Call {
11861+func (_e *MockProgressBarWidget_Expecter) SetOpacity(opacity any) *MockProgressBarWidget_SetOpacity_Call {
1194311862 return &MockProgressBarWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
1194411863 }
1194511864
@@ -11980,7 +11899,7 @@ type MockProgressBarWidget_SetSizeRequest_Call struct {
1198011899 // SetSizeRequest is a helper method to define mock.On call
1198111900 // - width int
1198211901 // - height int
11983-func (_e *MockProgressBarWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockProgressBarWidget_SetSizeRequest_Call {
11902+func (_e *MockProgressBarWidget_Expecter) SetSizeRequest(width any, height any) *MockProgressBarWidget_SetSizeRequest_Call {
1198411903 return &MockProgressBarWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
1198511904 }
1198611905
@@ -12025,7 +11944,7 @@ type MockProgressBarWidget_SetValign_Call struct {
1202511944
1202611945 // SetValign is a helper method to define mock.On call
1202711946 // - align gtk.Align
12028-func (_e *MockProgressBarWidget_Expecter) SetValign(align interface{}) *MockProgressBarWidget_SetValign_Call {
11947+func (_e *MockProgressBarWidget_Expecter) SetValign(align any) *MockProgressBarWidget_SetValign_Call {
1202911948 return &MockProgressBarWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
1203011949 }
1203111950
@@ -12065,7 +11984,7 @@ type MockProgressBarWidget_SetVexpand_Call struct {
1206511984
1206611985 // SetVexpand is a helper method to define mock.On call
1206711986 // - expand bool
12068-func (_e *MockProgressBarWidget_Expecter) SetVexpand(expand interface{}) *MockProgressBarWidget_SetVexpand_Call {
11987+func (_e *MockProgressBarWidget_Expecter) SetVexpand(expand any) *MockProgressBarWidget_SetVexpand_Call {
1206911988 return &MockProgressBarWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
1207011989 }
1207111990
@@ -12105,7 +12024,7 @@ type MockProgressBarWidget_SetVisible_Call struct {
1210512024
1210612025 // SetVisible is a helper method to define mock.On call
1210712026 // - visible bool
12108-func (_e *MockProgressBarWidget_Expecter) SetVisible(visible interface{}) *MockProgressBarWidget_SetVisible_Call {
12027+func (_e *MockProgressBarWidget_Expecter) SetVisible(visible any) *MockProgressBarWidget_SetVisible_Call {
1210912028 return &MockProgressBarWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
1211012029 }
1211112030
@@ -12238,7 +12157,7 @@ type MockSpinnerWidget_AddController_Call struct {
1223812157
1223912158 // AddController is a helper method to define mock.On call
1224012159 // - controller *gtk.EventController
12241-func (_e *MockSpinnerWidget_Expecter) AddController(controller interface{}) *MockSpinnerWidget_AddController_Call {
12160+func (_e *MockSpinnerWidget_Expecter) AddController(controller any) *MockSpinnerWidget_AddController_Call {
1224212161 return &MockSpinnerWidget_AddController_Call{Call: _e.mock.On("AddController", controller)}
1224312162 }
1224412163
@@ -12278,7 +12197,7 @@ type MockSpinnerWidget_AddCssClass_Call struct {
1227812197
1227912198 // AddCssClass is a helper method to define mock.On call
1228012199 // - cssClass string
12281-func (_e *MockSpinnerWidget_Expecter) AddCssClass(cssClass interface{}) *MockSpinnerWidget_AddCssClass_Call {
12200+func (_e *MockSpinnerWidget_Expecter) AddCssClass(cssClass any) *MockSpinnerWidget_AddCssClass_Call {
1228212201 return &MockSpinnerWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)}
1228312202 }
1228412203
@@ -12344,7 +12263,7 @@ type MockSpinnerWidget_ComputePoint_Call struct {
1234412263
1234512264 // ComputePoint is a helper method to define mock.On call
1234612265 // - target layout.Widget
12347-func (_e *MockSpinnerWidget_Expecter) ComputePoint(target interface{}) *MockSpinnerWidget_ComputePoint_Call {
12266+func (_e *MockSpinnerWidget_Expecter) ComputePoint(target any) *MockSpinnerWidget_ComputePoint_Call {
1234812267 return &MockSpinnerWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)}
1234912268 }
1235012269
@@ -12751,7 +12670,7 @@ type MockSpinnerWidget_HasCssClass_Call struct {
1275112670
1275212671 // HasCssClass is a helper method to define mock.On call
1275312672 // - cssClass string
12754-func (_e *MockSpinnerWidget_Expecter) HasCssClass(cssClass interface{}) *MockSpinnerWidget_HasCssClass_Call {
12673+func (_e *MockSpinnerWidget_Expecter) HasCssClass(cssClass any) *MockSpinnerWidget_HasCssClass_Call {
1275512674 return &MockSpinnerWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)}
1275612675 }
1275712676
@@ -12912,7 +12831,7 @@ type MockSpinnerWidget_RemoveCssClass_Call struct {
1291212831
1291312832 // RemoveCssClass is a helper method to define mock.On call
1291412833 // - cssClass string
12915-func (_e *MockSpinnerWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockSpinnerWidget_RemoveCssClass_Call {
12834+func (_e *MockSpinnerWidget_Expecter) RemoveCssClass(cssClass any) *MockSpinnerWidget_RemoveCssClass_Call {
1291612835 return &MockSpinnerWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)}
1291712836 }
1291812837
@@ -12952,7 +12871,7 @@ type MockSpinnerWidget_SetCanFocus_Call struct {
1295212871
1295312872 // SetCanFocus is a helper method to define mock.On call
1295412873 // - canFocus bool
12955-func (_e *MockSpinnerWidget_Expecter) SetCanFocus(canFocus interface{}) *MockSpinnerWidget_SetCanFocus_Call {
12874+func (_e *MockSpinnerWidget_Expecter) SetCanFocus(canFocus any) *MockSpinnerWidget_SetCanFocus_Call {
1295612875 return &MockSpinnerWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)}
1295712876 }
1295812877
@@ -12992,7 +12911,7 @@ type MockSpinnerWidget_SetCanTarget_Call struct {
1299212911
1299312912 // SetCanTarget is a helper method to define mock.On call
1299412913 // - canTarget bool
12995-func (_e *MockSpinnerWidget_Expecter) SetCanTarget(canTarget interface{}) *MockSpinnerWidget_SetCanTarget_Call {
12914+func (_e *MockSpinnerWidget_Expecter) SetCanTarget(canTarget any) *MockSpinnerWidget_SetCanTarget_Call {
1299612915 return &MockSpinnerWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)}
1299712916 }
1299812917
@@ -13032,7 +12951,7 @@ type MockSpinnerWidget_SetFocusOnClick_Call struct {
1303212951
1303312952 // SetFocusOnClick is a helper method to define mock.On call
1303412953 // - focusOnClick bool
13035-func (_e *MockSpinnerWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockSpinnerWidget_SetFocusOnClick_Call {
12954+func (_e *MockSpinnerWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockSpinnerWidget_SetFocusOnClick_Call {
1303612955 return &MockSpinnerWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)}
1303712956 }
1303812957
@@ -13072,7 +12991,7 @@ type MockSpinnerWidget_SetFocusable_Call struct {
1307212991
1307312992 // SetFocusable is a helper method to define mock.On call
1307412993 // - focusable bool
13075-func (_e *MockSpinnerWidget_Expecter) SetFocusable(focusable interface{}) *MockSpinnerWidget_SetFocusable_Call {
12994+func (_e *MockSpinnerWidget_Expecter) SetFocusable(focusable any) *MockSpinnerWidget_SetFocusable_Call {
1307612995 return &MockSpinnerWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)}
1307712996 }
1307812997
@@ -13112,7 +13031,7 @@ type MockSpinnerWidget_SetHalign_Call struct {
1311213031
1311313032 // SetHalign is a helper method to define mock.On call
1311413033 // - align gtk.Align
13115-func (_e *MockSpinnerWidget_Expecter) SetHalign(align interface{}) *MockSpinnerWidget_SetHalign_Call {
13034+func (_e *MockSpinnerWidget_Expecter) SetHalign(align any) *MockSpinnerWidget_SetHalign_Call {
1311613035 return &MockSpinnerWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)}
1311713036 }
1311813037
@@ -13152,7 +13071,7 @@ type MockSpinnerWidget_SetHexpand_Call struct {
1315213071
1315313072 // SetHexpand is a helper method to define mock.On call
1315413073 // - expand bool
13155-func (_e *MockSpinnerWidget_Expecter) SetHexpand(expand interface{}) *MockSpinnerWidget_SetHexpand_Call {
13074+func (_e *MockSpinnerWidget_Expecter) SetHexpand(expand any) *MockSpinnerWidget_SetHexpand_Call {
1315613075 return &MockSpinnerWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)}
1315713076 }
1315813077
@@ -13192,7 +13111,7 @@ type MockSpinnerWidget_SetOpacity_Call struct {
1319213111
1319313112 // SetOpacity is a helper method to define mock.On call
1319413113 // - opacity float64
13195-func (_e *MockSpinnerWidget_Expecter) SetOpacity(opacity interface{}) *MockSpinnerWidget_SetOpacity_Call {
13114+func (_e *MockSpinnerWidget_Expecter) SetOpacity(opacity any) *MockSpinnerWidget_SetOpacity_Call {
1319613115 return &MockSpinnerWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)}
1319713116 }
1319813117
@@ -13233,7 +13152,7 @@ type MockSpinnerWidget_SetSizeRequest_Call struct {
1323313152 // SetSizeRequest is a helper method to define mock.On call
1323413153 // - width int
1323513154 // - height int
13236-func (_e *MockSpinnerWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockSpinnerWidget_SetSizeRequest_Call {
13155+func (_e *MockSpinnerWidget_Expecter) SetSizeRequest(width any, height any) *MockSpinnerWidget_SetSizeRequest_Call {
1323713156 return &MockSpinnerWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)}
1323813157 }
1323913158
@@ -13278,7 +13197,7 @@ type MockSpinnerWidget_SetSpinning_Call struct {
1327813197
1327913198 // SetSpinning is a helper method to define mock.On call
1328013199 // - spinning bool
13281-func (_e *MockSpinnerWidget_Expecter) SetSpinning(spinning interface{}) *MockSpinnerWidget_SetSpinning_Call {
13200+func (_e *MockSpinnerWidget_Expecter) SetSpinning(spinning any) *MockSpinnerWidget_SetSpinning_Call {
1328213201 return &MockSpinnerWidget_SetSpinning_Call{Call: _e.mock.On("SetSpinning", spinning)}
1328313202 }
1328413203
@@ -13318,7 +13237,7 @@ type MockSpinnerWidget_SetValign_Call struct {
1331813237
1331913238 // SetValign is a helper method to define mock.On call
1332013239 // - align gtk.Align
13321-func (_e *MockSpinnerWidget_Expecter) SetValign(align interface{}) *MockSpinnerWidget_SetValign_Call {
13240+func (_e *MockSpinnerWidget_Expecter) SetValign(align any) *MockSpinnerWidget_SetValign_Call {
1332213241 return &MockSpinnerWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)}
1332313242 }
1332413243
@@ -13358,7 +13277,7 @@ type MockSpinnerWidget_SetVexpand_Call struct {
1335813277
1335913278 // SetVexpand is a helper method to define mock.On call
1336013279 // - expand bool
13361-func (_e *MockSpinnerWidget_Expecter) SetVexpand(expand interface{}) *MockSpinnerWidget_SetVexpand_Call {
13280+func (_e *MockSpinnerWidget_Expecter) SetVexpand(expand any) *MockSpinnerWidget_SetVexpand_Call {
1336213281 return &MockSpinnerWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)}
1336313282 }
1336413283
@@ -13398,7 +13317,7 @@ type MockSpinnerWidget_SetVisible_Call struct {
1339813317
1339913318 // SetVisible is a helper method to define mock.On call
1340013319 // - visible bool
13401-func (_e *MockSpinnerWidget_Expecter) SetVisible(visible interface{}) *MockSpinnerWidget_SetVisible_Call {
13320+func (_e *MockSpinnerWidget_Expecter) SetVisible(visible any) *MockSpinnerWidget_SetVisible_Call {
1340213321 return &MockSpinnerWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)}
1340313322 }
1340413323
@@ -13611,7 +13530,7 @@ type MockWidgetFactory_NewBox_Call struct {
1361113530 // NewBox is a helper method to define mock.On call
1361213531 // - orientation layout.Orientation
1361313532 // - spacing int
13614-func (_e *MockWidgetFactory_Expecter) NewBox(orientation interface{}, spacing interface{}) *MockWidgetFactory_NewBox_Call {
13533+func (_e *MockWidgetFactory_Expecter) NewBox(orientation any, spacing any) *MockWidgetFactory_NewBox_Call {
1361513534 return &MockWidgetFactory_NewBox_Call{Call: _e.mock.On("NewBox", orientation, spacing)}
1361613535 }
1361713536
@@ -13761,7 +13680,7 @@ type MockWidgetFactory_NewLabel_Call struct {
1376113680
1376213681 // NewLabel is a helper method to define mock.On call
1376313682 // - text string
13764-func (_e *MockWidgetFactory_Expecter) NewLabel(text interface{}) *MockWidgetFactory_NewLabel_Call {
13683+func (_e *MockWidgetFactory_Expecter) NewLabel(text any) *MockWidgetFactory_NewLabel_Call {
1376513684 return &MockWidgetFactory_NewLabel_Call{Call: _e.mock.On("NewLabel", text)}
1376613685 }
1376713686
@@ -13860,7 +13779,7 @@ type MockWidgetFactory_NewPaned_Call struct {
1386013779
1386113780 // NewPaned is a helper method to define mock.On call
1386213781 // - orientation layout.Orientation
13863-func (_e *MockWidgetFactory_Expecter) NewPaned(orientation interface{}) *MockWidgetFactory_NewPaned_Call {
13782+func (_e *MockWidgetFactory_Expecter) NewPaned(orientation any) *MockWidgetFactory_NewPaned_Call {
1386413783 return &MockWidgetFactory_NewPaned_Call{Call: _e.mock.On("NewPaned", orientation)}
1386513784 }
1386613785
@@ -14005,7 +13924,7 @@ type MockWidgetFactory_WrapWidget_Call struct {
1400513924
1400613925 // WrapWidget is a helper method to define mock.On call
1400713926 // - w *gtk.Widget
14008-func (_e *MockWidgetFactory_Expecter) WrapWidget(w interface{}) *MockWidgetFactory_WrapWidget_Call {
13927+func (_e *MockWidgetFactory_Expecter) WrapWidget(w any) *MockWidgetFactory_WrapWidget_Call {
1400913928 return &MockWidgetFactory_WrapWidget_Call{Call: _e.mock.On("WrapWidget", w)}
1401013929 }
1401113930
@@ -14086,7 +14005,7 @@ type MockPaneRenderer_RenderPane_Call struct {
1408614005 // RenderPane is a helper method to define mock.On call
1408714006 // - paneID string
1408814007 // - webViewWidget layout.Widget
14089-func (_e *MockPaneRenderer_Expecter) RenderPane(paneID interface{}, webViewWidget interface{}) *MockPaneRenderer_RenderPane_Call {
14008+func (_e *MockPaneRenderer_Expecter) RenderPane(paneID any, webViewWidget any) *MockPaneRenderer_RenderPane_Call {
1409014009 return &MockPaneRenderer_RenderPane_Call{Call: _e.mock.On("RenderPane", paneID, webViewWidget)}
1409114010 }
1409214011

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close