detached 9c927bd

chore(mocks): regenerate with updated mockery config format

commit
9c927bde5e11d8e7d6e1df711faaced54b71f7bb
author
bnema · · 2025-12-18 03:51 UTC
parent
bdf3676
signature
unsigned
19 files · +2774 -4200
M internal/application/port/mocks/mock_web_view.go +185 -245
@@ -1,30 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
10- "github.com/bnema/dumber/internal/application/port"
8+ port "github.com/bnema/dumber/internal/application/port"
119 mock "github.com/stretchr/testify/mock"
1210 )
1311
14-// 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.
15-// The first argument is typically a *testing.T value.
16-func NewMockWebView(t interface {
17- mock.TestingT
18- Cleanup(func())
19-}) *MockWebView {
20- mock := &MockWebView{}
21- mock.Mock.Test(t)
22-
23- t.Cleanup(func() { mock.AssertExpectations(t) })
24-
25- return mock
26-}
27-
2812 // MockWebView is an autogenerated mock type for the WebView type
2913 type MockWebView struct {
3014 mock.Mock
@@ -38,20 +22,21 @@ func (_m *MockWebView) EXPECT() *MockWebView_Expecter {
3822 return &MockWebView_Expecter{mock: &_m.Mock}
3923 }
4024
41-// CanGoBack provides a mock function for the type MockWebView
42-func (_mock *MockWebView) CanGoBack() bool {
43- ret := _mock.Called()
25+// CanGoBack provides a mock function with no fields
26+func (_m *MockWebView) CanGoBack() bool {
27+ ret := _m.Called()
4428
4529 if len(ret) == 0 {
4630 panic("no return value specified for CanGoBack")
4731 }
4832
4933 var r0 bool
50- if returnFunc, ok := ret.Get(0).(func() bool); ok {
51- r0 = returnFunc()
34+ if rf, ok := ret.Get(0).(func() bool); ok {
35+ r0 = rf()
5236 } else {
5337 r0 = ret.Get(0).(bool)
5438 }
39+
5540 return r0
5641 }
5742
@@ -72,8 +57,8 @@ func (_c *MockWebView_CanGoBack_Call) Run(run func()) *MockWebView_CanGoBack_Cal
7257 return _c
7358 }
7459
75-func (_c *MockWebView_CanGoBack_Call) Return(b bool) *MockWebView_CanGoBack_Call {
76- _c.Call.Return(b)
60+func (_c *MockWebView_CanGoBack_Call) Return(_a0 bool) *MockWebView_CanGoBack_Call {
61+ _c.Call.Return(_a0)
7762 return _c
7863 }
7964
@@ -82,20 +67,21 @@ func (_c *MockWebView_CanGoBack_Call) RunAndReturn(run func() bool) *MockWebView
8267 return _c
8368 }
8469
85-// CanGoForward provides a mock function for the type MockWebView
86-func (_mock *MockWebView) CanGoForward() bool {
87- ret := _mock.Called()
70+// CanGoForward provides a mock function with no fields
71+func (_m *MockWebView) CanGoForward() bool {
72+ ret := _m.Called()
8873
8974 if len(ret) == 0 {
9075 panic("no return value specified for CanGoForward")
9176 }
9277
9378 var r0 bool
94- if returnFunc, ok := ret.Get(0).(func() bool); ok {
95- r0 = returnFunc()
79+ if rf, ok := ret.Get(0).(func() bool); ok {
80+ r0 = rf()
9681 } else {
9782 r0 = ret.Get(0).(bool)
9883 }
84+
9985 return r0
10086 }
10187
@@ -116,8 +102,8 @@ func (_c *MockWebView_CanGoForward_Call) Run(run func()) *MockWebView_CanGoForwa
116102 return _c
117103 }
118104
119-func (_c *MockWebView_CanGoForward_Call) Return(b bool) *MockWebView_CanGoForward_Call {
120- _c.Call.Return(b)
105+func (_c *MockWebView_CanGoForward_Call) Return(_a0 bool) *MockWebView_CanGoForward_Call {
106+ _c.Call.Return(_a0)
121107 return _c
122108 }
123109
@@ -126,10 +112,9 @@ func (_c *MockWebView_CanGoForward_Call) RunAndReturn(run func() bool) *MockWebV
126112 return _c
127113 }
128114
129-// Destroy provides a mock function for the type MockWebView
130-func (_mock *MockWebView) Destroy() {
131- _mock.Called()
132- return
115+// Destroy provides a mock function with no fields
116+func (_m *MockWebView) Destroy() {
117+ _m.Called()
133118 }
134119
135120 // MockWebView_Destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destroy'
@@ -159,20 +144,21 @@ func (_c *MockWebView_Destroy_Call) RunAndReturn(run func()) *MockWebView_Destro
159144 return _c
160145 }
161146
162-// EstimatedProgress provides a mock function for the type MockWebView
163-func (_mock *MockWebView) EstimatedProgress() float64 {
164- ret := _mock.Called()
147+// EstimatedProgress provides a mock function with no fields
148+func (_m *MockWebView) EstimatedProgress() float64 {
149+ ret := _m.Called()
165150
166151 if len(ret) == 0 {
167152 panic("no return value specified for EstimatedProgress")
168153 }
169154
170155 var r0 float64
171- if returnFunc, ok := ret.Get(0).(func() float64); ok {
172- r0 = returnFunc()
156+ if rf, ok := ret.Get(0).(func() float64); ok {
157+ r0 = rf()
173158 } else {
174159 r0 = ret.Get(0).(float64)
175160 }
161+
176162 return r0
177163 }
178164
@@ -193,8 +179,8 @@ func (_c *MockWebView_EstimatedProgress_Call) Run(run func()) *MockWebView_Estim
193179 return _c
194180 }
195181
196-func (_c *MockWebView_EstimatedProgress_Call) Return(f float64) *MockWebView_EstimatedProgress_Call {
197- _c.Call.Return(f)
182+func (_c *MockWebView_EstimatedProgress_Call) Return(_a0 float64) *MockWebView_EstimatedProgress_Call {
183+ _c.Call.Return(_a0)
198184 return _c
199185 }
200186
@@ -203,20 +189,21 @@ func (_c *MockWebView_EstimatedProgress_Call) RunAndReturn(run func() float64) *
203189 return _c
204190 }
205191
206-// GetZoomLevel provides a mock function for the type MockWebView
207-func (_mock *MockWebView) GetZoomLevel() float64 {
208- ret := _mock.Called()
192+// GetZoomLevel provides a mock function with no fields
193+func (_m *MockWebView) GetZoomLevel() float64 {
194+ ret := _m.Called()
209195
210196 if len(ret) == 0 {
211197 panic("no return value specified for GetZoomLevel")
212198 }
213199
214200 var r0 float64
215- if returnFunc, ok := ret.Get(0).(func() float64); ok {
216- r0 = returnFunc()
201+ if rf, ok := ret.Get(0).(func() float64); ok {
202+ r0 = rf()
217203 } else {
218204 r0 = ret.Get(0).(float64)
219205 }
206+
220207 return r0
221208 }
222209
@@ -237,8 +224,8 @@ func (_c *MockWebView_GetZoomLevel_Call) Run(run func()) *MockWebView_GetZoomLev
237224 return _c
238225 }
239226
240-func (_c *MockWebView_GetZoomLevel_Call) Return(f float64) *MockWebView_GetZoomLevel_Call {
241- _c.Call.Return(f)
227+func (_c *MockWebView_GetZoomLevel_Call) Return(_a0 float64) *MockWebView_GetZoomLevel_Call {
228+ _c.Call.Return(_a0)
242229 return _c
243230 }
244231
@@ -247,20 +234,21 @@ func (_c *MockWebView_GetZoomLevel_Call) RunAndReturn(run func() float64) *MockW
247234 return _c
248235 }
249236
250-// GoBack provides a mock function for the type MockWebView
251-func (_mock *MockWebView) GoBack(ctx context.Context) error {
252- ret := _mock.Called(ctx)
237+// GoBack provides a mock function with given fields: ctx
238+func (_m *MockWebView) GoBack(ctx context.Context) error {
239+ ret := _m.Called(ctx)
253240
254241 if len(ret) == 0 {
255242 panic("no return value specified for GoBack")
256243 }
257244
258245 var r0 error
259- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
260- r0 = returnFunc(ctx)
246+ if rf, ok := ret.Get(0).(func(context.Context) error); ok {
247+ r0 = rf(ctx)
261248 } else {
262249 r0 = ret.Error(0)
263250 }
251+
264252 return r0
265253 }
266254
@@ -277,41 +265,36 @@ func (_e *MockWebView_Expecter) GoBack(ctx interface{}) *MockWebView_GoBack_Call
277265
278266 func (_c *MockWebView_GoBack_Call) Run(run func(ctx context.Context)) *MockWebView_GoBack_Call {
279267 _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- run(
285- arg0,
286- )
268+ run(args[0].(context.Context))
287269 })
288270 return _c
289271 }
290272
291-func (_c *MockWebView_GoBack_Call) Return(err error) *MockWebView_GoBack_Call {
292- _c.Call.Return(err)
273+func (_c *MockWebView_GoBack_Call) Return(_a0 error) *MockWebView_GoBack_Call {
274+ _c.Call.Return(_a0)
293275 return _c
294276 }
295277
296-func (_c *MockWebView_GoBack_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_GoBack_Call {
278+func (_c *MockWebView_GoBack_Call) RunAndReturn(run func(context.Context) error) *MockWebView_GoBack_Call {
297279 _c.Call.Return(run)
298280 return _c
299281 }
300282
301-// GoForward provides a mock function for the type MockWebView
302-func (_mock *MockWebView) GoForward(ctx context.Context) error {
303- ret := _mock.Called(ctx)
283+// GoForward provides a mock function with given fields: ctx
284+func (_m *MockWebView) GoForward(ctx context.Context) error {
285+ ret := _m.Called(ctx)
304286
305287 if len(ret) == 0 {
306288 panic("no return value specified for GoForward")
307289 }
308290
309291 var r0 error
310- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
311- r0 = returnFunc(ctx)
292+ if rf, ok := ret.Get(0).(func(context.Context) error); ok {
293+ r0 = rf(ctx)
312294 } else {
313295 r0 = ret.Error(0)
314296 }
297+
315298 return r0
316299 }
317300
@@ -328,41 +311,36 @@ func (_e *MockWebView_Expecter) GoForward(ctx interface{}) *MockWebView_GoForwar
328311
329312 func (_c *MockWebView_GoForward_Call) Run(run func(ctx context.Context)) *MockWebView_GoForward_Call {
330313 _c.Call.Run(func(args mock.Arguments) {
331- var arg0 context.Context
332- if args[0] != nil {
333- arg0 = args[0].(context.Context)
334- }
335- run(
336- arg0,
337- )
314+ run(args[0].(context.Context))
338315 })
339316 return _c
340317 }
341318
342-func (_c *MockWebView_GoForward_Call) Return(err error) *MockWebView_GoForward_Call {
343- _c.Call.Return(err)
319+func (_c *MockWebView_GoForward_Call) Return(_a0 error) *MockWebView_GoForward_Call {
320+ _c.Call.Return(_a0)
344321 return _c
345322 }
346323
347-func (_c *MockWebView_GoForward_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_GoForward_Call {
324+func (_c *MockWebView_GoForward_Call) RunAndReturn(run func(context.Context) error) *MockWebView_GoForward_Call {
348325 _c.Call.Return(run)
349326 return _c
350327 }
351328
352-// ID provides a mock function for the type MockWebView
353-func (_mock *MockWebView) ID() port.WebViewID {
354- ret := _mock.Called()
329+// ID provides a mock function with no fields
330+func (_m *MockWebView) ID() port.WebViewID {
331+ ret := _m.Called()
355332
356333 if len(ret) == 0 {
357334 panic("no return value specified for ID")
358335 }
359336
360337 var r0 port.WebViewID
361- if returnFunc, ok := ret.Get(0).(func() port.WebViewID); ok {
362- r0 = returnFunc()
338+ if rf, ok := ret.Get(0).(func() port.WebViewID); ok {
339+ r0 = rf()
363340 } else {
364341 r0 = ret.Get(0).(port.WebViewID)
365342 }
343+
366344 return r0
367345 }
368346
@@ -383,8 +361,8 @@ func (_c *MockWebView_ID_Call) Run(run func()) *MockWebView_ID_Call {
383361 return _c
384362 }
385363
386-func (_c *MockWebView_ID_Call) Return(webViewID port.WebViewID) *MockWebView_ID_Call {
387- _c.Call.Return(webViewID)
364+func (_c *MockWebView_ID_Call) Return(_a0 port.WebViewID) *MockWebView_ID_Call {
365+ _c.Call.Return(_a0)
388366 return _c
389367 }
390368
@@ -393,20 +371,21 @@ func (_c *MockWebView_ID_Call) RunAndReturn(run func() port.WebViewID) *MockWebV
393371 return _c
394372 }
395373
396-// IsDestroyed provides a mock function for the type MockWebView
397-func (_mock *MockWebView) IsDestroyed() bool {
398- ret := _mock.Called()
374+// IsDestroyed provides a mock function with no fields
375+func (_m *MockWebView) IsDestroyed() bool {
376+ ret := _m.Called()
399377
400378 if len(ret) == 0 {
401379 panic("no return value specified for IsDestroyed")
402380 }
403381
404382 var r0 bool
405- if returnFunc, ok := ret.Get(0).(func() bool); ok {
406- r0 = returnFunc()
383+ if rf, ok := ret.Get(0).(func() bool); ok {
384+ r0 = rf()
407385 } else {
408386 r0 = ret.Get(0).(bool)
409387 }
388+
410389 return r0
411390 }
412391
@@ -427,8 +406,8 @@ func (_c *MockWebView_IsDestroyed_Call) Run(run func()) *MockWebView_IsDestroyed
427406 return _c
428407 }
429408
430-func (_c *MockWebView_IsDestroyed_Call) Return(b bool) *MockWebView_IsDestroyed_Call {
431- _c.Call.Return(b)
409+func (_c *MockWebView_IsDestroyed_Call) Return(_a0 bool) *MockWebView_IsDestroyed_Call {
410+ _c.Call.Return(_a0)
432411 return _c
433412 }
434413
@@ -437,20 +416,21 @@ func (_c *MockWebView_IsDestroyed_Call) RunAndReturn(run func() bool) *MockWebVi
437416 return _c
438417 }
439418
440-// IsLoading provides a mock function for the type MockWebView
441-func (_mock *MockWebView) IsLoading() bool {
442- ret := _mock.Called()
419+// IsLoading provides a mock function with no fields
420+func (_m *MockWebView) IsLoading() bool {
421+ ret := _m.Called()
443422
444423 if len(ret) == 0 {
445424 panic("no return value specified for IsLoading")
446425 }
447426
448427 var r0 bool
449- if returnFunc, ok := ret.Get(0).(func() bool); ok {
450- r0 = returnFunc()
428+ if rf, ok := ret.Get(0).(func() bool); ok {
429+ r0 = rf()
451430 } else {
452431 r0 = ret.Get(0).(bool)
453432 }
433+
454434 return r0
455435 }
456436
@@ -471,8 +451,8 @@ func (_c *MockWebView_IsLoading_Call) Run(run func()) *MockWebView_IsLoading_Cal
471451 return _c
472452 }
473453
474-func (_c *MockWebView_IsLoading_Call) Return(b bool) *MockWebView_IsLoading_Call {
475- _c.Call.Return(b)
454+func (_c *MockWebView_IsLoading_Call) Return(_a0 bool) *MockWebView_IsLoading_Call {
455+ _c.Call.Return(_a0)
476456 return _c
477457 }
478458
@@ -481,20 +461,21 @@ func (_c *MockWebView_IsLoading_Call) RunAndReturn(run func() bool) *MockWebView
481461 return _c
482462 }
483463
484-// LoadHTML provides a mock function for the type MockWebView
485-func (_mock *MockWebView) LoadHTML(ctx context.Context, content string, baseURI string) error {
486- ret := _mock.Called(ctx, content, baseURI)
464+// LoadHTML provides a mock function with given fields: ctx, content, baseURI
465+func (_m *MockWebView) LoadHTML(ctx context.Context, content string, baseURI string) error {
466+ ret := _m.Called(ctx, content, baseURI)
487467
488468 if len(ret) == 0 {
489469 panic("no return value specified for LoadHTML")
490470 }
491471
492472 var r0 error
493- if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
494- r0 = returnFunc(ctx, content, baseURI)
473+ if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
474+ r0 = rf(ctx, content, baseURI)
495475 } else {
496476 r0 = ret.Error(0)
497477 }
478+
498479 return r0
499480 }
500481
@@ -513,51 +494,36 @@ func (_e *MockWebView_Expecter) LoadHTML(ctx interface{}, content interface{}, b
513494
514495 func (_c *MockWebView_LoadHTML_Call) Run(run func(ctx context.Context, content string, baseURI string)) *MockWebView_LoadHTML_Call {
515496 _c.Call.Run(func(args mock.Arguments) {
516- var arg0 context.Context
517- if args[0] != nil {
518- arg0 = args[0].(context.Context)
519- }
520- var arg1 string
521- if args[1] != nil {
522- arg1 = args[1].(string)
523- }
524- var arg2 string
525- if args[2] != nil {
526- arg2 = args[2].(string)
527- }
528- run(
529- arg0,
530- arg1,
531- arg2,
532- )
497+ run(args[0].(context.Context), args[1].(string), args[2].(string))
533498 })
534499 return _c
535500 }
536501
537-func (_c *MockWebView_LoadHTML_Call) Return(err error) *MockWebView_LoadHTML_Call {
538- _c.Call.Return(err)
502+func (_c *MockWebView_LoadHTML_Call) Return(_a0 error) *MockWebView_LoadHTML_Call {
503+ _c.Call.Return(_a0)
539504 return _c
540505 }
541506
542-func (_c *MockWebView_LoadHTML_Call) RunAndReturn(run func(ctx context.Context, content string, baseURI string) error) *MockWebView_LoadHTML_Call {
507+func (_c *MockWebView_LoadHTML_Call) RunAndReturn(run func(context.Context, string, string) error) *MockWebView_LoadHTML_Call {
543508 _c.Call.Return(run)
544509 return _c
545510 }
546511
547-// LoadURI provides a mock function for the type MockWebView
548-func (_mock *MockWebView) LoadURI(ctx context.Context, uri string) error {
549- ret := _mock.Called(ctx, uri)
512+// LoadURI provides a mock function with given fields: ctx, uri
513+func (_m *MockWebView) LoadURI(ctx context.Context, uri string) error {
514+ ret := _m.Called(ctx, uri)
550515
551516 if len(ret) == 0 {
552517 panic("no return value specified for LoadURI")
553518 }
554519
555520 var r0 error
556- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
557- r0 = returnFunc(ctx, uri)
521+ if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
522+ r0 = rf(ctx, uri)
558523 } else {
559524 r0 = ret.Error(0)
560525 }
526+
561527 return r0
562528 }
563529
@@ -575,46 +541,36 @@ func (_e *MockWebView_Expecter) LoadURI(ctx interface{}, uri interface{}) *MockW
575541
576542 func (_c *MockWebView_LoadURI_Call) Run(run func(ctx context.Context, uri string)) *MockWebView_LoadURI_Call {
577543 _c.Call.Run(func(args mock.Arguments) {
578- var arg0 context.Context
579- if args[0] != nil {
580- arg0 = args[0].(context.Context)
581- }
582- var arg1 string
583- if args[1] != nil {
584- arg1 = args[1].(string)
585- }
586- run(
587- arg0,
588- arg1,
589- )
544+ run(args[0].(context.Context), args[1].(string))
590545 })
591546 return _c
592547 }
593548
594-func (_c *MockWebView_LoadURI_Call) Return(err error) *MockWebView_LoadURI_Call {
595- _c.Call.Return(err)
549+func (_c *MockWebView_LoadURI_Call) Return(_a0 error) *MockWebView_LoadURI_Call {
550+ _c.Call.Return(_a0)
596551 return _c
597552 }
598553
599-func (_c *MockWebView_LoadURI_Call) RunAndReturn(run func(ctx context.Context, uri string) error) *MockWebView_LoadURI_Call {
554+func (_c *MockWebView_LoadURI_Call) RunAndReturn(run func(context.Context, string) error) *MockWebView_LoadURI_Call {
600555 _c.Call.Return(run)
601556 return _c
602557 }
603558
604-// Reload provides a mock function for the type MockWebView
605-func (_mock *MockWebView) Reload(ctx context.Context) error {
606- ret := _mock.Called(ctx)
559+// Reload provides a mock function with given fields: ctx
560+func (_m *MockWebView) Reload(ctx context.Context) error {
561+ ret := _m.Called(ctx)
607562
608563 if len(ret) == 0 {
609564 panic("no return value specified for Reload")
610565 }
611566
612567 var r0 error
613- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
614- r0 = returnFunc(ctx)
568+ if rf, ok := ret.Get(0).(func(context.Context) error); ok {
569+ r0 = rf(ctx)
615570 } else {
616571 r0 = ret.Error(0)
617572 }
573+
618574 return r0
619575 }
620576
@@ -631,41 +587,36 @@ func (_e *MockWebView_Expecter) Reload(ctx interface{}) *MockWebView_Reload_Call
631587
632588 func (_c *MockWebView_Reload_Call) Run(run func(ctx context.Context)) *MockWebView_Reload_Call {
633589 _c.Call.Run(func(args mock.Arguments) {
634- var arg0 context.Context
635- if args[0] != nil {
636- arg0 = args[0].(context.Context)
637- }
638- run(
639- arg0,
640- )
590+ run(args[0].(context.Context))
641591 })
642592 return _c
643593 }
644594
645-func (_c *MockWebView_Reload_Call) Return(err error) *MockWebView_Reload_Call {
646- _c.Call.Return(err)
595+func (_c *MockWebView_Reload_Call) Return(_a0 error) *MockWebView_Reload_Call {
596+ _c.Call.Return(_a0)
647597 return _c
648598 }
649599
650-func (_c *MockWebView_Reload_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_Reload_Call {
600+func (_c *MockWebView_Reload_Call) RunAndReturn(run func(context.Context) error) *MockWebView_Reload_Call {
651601 _c.Call.Return(run)
652602 return _c
653603 }
654604
655-// ReloadBypassCache provides a mock function for the type MockWebView
656-func (_mock *MockWebView) ReloadBypassCache(ctx context.Context) error {
657- ret := _mock.Called(ctx)
605+// ReloadBypassCache provides a mock function with given fields: ctx
606+func (_m *MockWebView) ReloadBypassCache(ctx context.Context) error {
607+ ret := _m.Called(ctx)
658608
659609 if len(ret) == 0 {
660610 panic("no return value specified for ReloadBypassCache")
661611 }
662612
663613 var r0 error
664- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
665- r0 = returnFunc(ctx)
614+ if rf, ok := ret.Get(0).(func(context.Context) error); ok {
615+ r0 = rf(ctx)
666616 } else {
667617 r0 = ret.Error(0)
668618 }
619+
669620 return r0
670621 }
671622
@@ -682,31 +633,24 @@ func (_e *MockWebView_Expecter) ReloadBypassCache(ctx interface{}) *MockWebView_
682633
683634 func (_c *MockWebView_ReloadBypassCache_Call) Run(run func(ctx context.Context)) *MockWebView_ReloadBypassCache_Call {
684635 _c.Call.Run(func(args mock.Arguments) {
685- var arg0 context.Context
686- if args[0] != nil {
687- arg0 = args[0].(context.Context)
688- }
689- run(
690- arg0,
691- )
636+ run(args[0].(context.Context))
692637 })
693638 return _c
694639 }
695640
696-func (_c *MockWebView_ReloadBypassCache_Call) Return(err error) *MockWebView_ReloadBypassCache_Call {
697- _c.Call.Return(err)
641+func (_c *MockWebView_ReloadBypassCache_Call) Return(_a0 error) *MockWebView_ReloadBypassCache_Call {
642+ _c.Call.Return(_a0)
698643 return _c
699644 }
700645
701-func (_c *MockWebView_ReloadBypassCache_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_ReloadBypassCache_Call {
646+func (_c *MockWebView_ReloadBypassCache_Call) RunAndReturn(run func(context.Context) error) *MockWebView_ReloadBypassCache_Call {
702647 _c.Call.Return(run)
703648 return _c
704649 }
705650
706-// SetCallbacks provides a mock function for the type MockWebView
707-func (_mock *MockWebView) SetCallbacks(callbacks *port.WebViewCallbacks) {
708- _mock.Called(callbacks)
709- return
651+// SetCallbacks provides a mock function with given fields: callbacks
652+func (_m *MockWebView) SetCallbacks(callbacks *port.WebViewCallbacks) {
653+ _m.Called(callbacks)
710654 }
711655
712656 // MockWebView_SetCallbacks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCallbacks'
@@ -722,13 +666,7 @@ func (_e *MockWebView_Expecter) SetCallbacks(callbacks interface{}) *MockWebView
722666
723667 func (_c *MockWebView_SetCallbacks_Call) Run(run func(callbacks *port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call {
724668 _c.Call.Run(func(args mock.Arguments) {
725- var arg0 *port.WebViewCallbacks
726- if args[0] != nil {
727- arg0 = args[0].(*port.WebViewCallbacks)
728- }
729- run(
730- arg0,
731- )
669+ run(args[0].(*port.WebViewCallbacks))
732670 })
733671 return _c
734672 }
@@ -738,25 +676,26 @@ func (_c *MockWebView_SetCallbacks_Call) Return() *MockWebView_SetCallbacks_Call
738676 return _c
739677 }
740678
741-func (_c *MockWebView_SetCallbacks_Call) RunAndReturn(run func(callbacks *port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call {
679+func (_c *MockWebView_SetCallbacks_Call) RunAndReturn(run func(*port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call {
742680 _c.Run(run)
743681 return _c
744682 }
745683
746-// SetZoomLevel provides a mock function for the type MockWebView
747-func (_mock *MockWebView) SetZoomLevel(ctx context.Context, level float64) error {
748- ret := _mock.Called(ctx, level)
684+// SetZoomLevel provides a mock function with given fields: ctx, level
685+func (_m *MockWebView) SetZoomLevel(ctx context.Context, level float64) error {
686+ ret := _m.Called(ctx, level)
749687
750688 if len(ret) == 0 {
751689 panic("no return value specified for SetZoomLevel")
752690 }
753691
754692 var r0 error
755- if returnFunc, ok := ret.Get(0).(func(context.Context, float64) error); ok {
756- r0 = returnFunc(ctx, level)
693+ if rf, ok := ret.Get(0).(func(context.Context, float64) error); ok {
694+ r0 = rf(ctx, level)
757695 } else {
758696 r0 = ret.Error(0)
759697 }
698+
760699 return r0
761700 }
762701
@@ -774,46 +713,36 @@ func (_e *MockWebView_Expecter) SetZoomLevel(ctx interface{}, level interface{})
774713
775714 func (_c *MockWebView_SetZoomLevel_Call) Run(run func(ctx context.Context, level float64)) *MockWebView_SetZoomLevel_Call {
776715 _c.Call.Run(func(args mock.Arguments) {
777- var arg0 context.Context
778- if args[0] != nil {
779- arg0 = args[0].(context.Context)
780- }
781- var arg1 float64
782- if args[1] != nil {
783- arg1 = args[1].(float64)
784- }
785- run(
786- arg0,
787- arg1,
788- )
716+ run(args[0].(context.Context), args[1].(float64))
789717 })
790718 return _c
791719 }
792720
793-func (_c *MockWebView_SetZoomLevel_Call) Return(err error) *MockWebView_SetZoomLevel_Call {
794- _c.Call.Return(err)
721+func (_c *MockWebView_SetZoomLevel_Call) Return(_a0 error) *MockWebView_SetZoomLevel_Call {
722+ _c.Call.Return(_a0)
795723 return _c
796724 }
797725
798-func (_c *MockWebView_SetZoomLevel_Call) RunAndReturn(run func(ctx context.Context, level float64) error) *MockWebView_SetZoomLevel_Call {
726+func (_c *MockWebView_SetZoomLevel_Call) RunAndReturn(run func(context.Context, float64) error) *MockWebView_SetZoomLevel_Call {
799727 _c.Call.Return(run)
800728 return _c
801729 }
802730
803-// State provides a mock function for the type MockWebView
804-func (_mock *MockWebView) State() port.WebViewState {
805- ret := _mock.Called()
731+// State provides a mock function with no fields
732+func (_m *MockWebView) State() port.WebViewState {
733+ ret := _m.Called()
806734
807735 if len(ret) == 0 {
808736 panic("no return value specified for State")
809737 }
810738
811739 var r0 port.WebViewState
812- if returnFunc, ok := ret.Get(0).(func() port.WebViewState); ok {
813- r0 = returnFunc()
740+ if rf, ok := ret.Get(0).(func() port.WebViewState); ok {
741+ r0 = rf()
814742 } else {
815743 r0 = ret.Get(0).(port.WebViewState)
816744 }
745+
817746 return r0
818747 }
819748
@@ -834,8 +763,8 @@ func (_c *MockWebView_State_Call) Run(run func()) *MockWebView_State_Call {
834763 return _c
835764 }
836765
837-func (_c *MockWebView_State_Call) Return(webViewState port.WebViewState) *MockWebView_State_Call {
838- _c.Call.Return(webViewState)
766+func (_c *MockWebView_State_Call) Return(_a0 port.WebViewState) *MockWebView_State_Call {
767+ _c.Call.Return(_a0)
839768 return _c
840769 }
841770
@@ -844,20 +773,21 @@ func (_c *MockWebView_State_Call) RunAndReturn(run func() port.WebViewState) *Mo
844773 return _c
845774 }
846775
847-// Stop provides a mock function for the type MockWebView
848-func (_mock *MockWebView) Stop(ctx context.Context) error {
849- ret := _mock.Called(ctx)
776+// Stop provides a mock function with given fields: ctx
777+func (_m *MockWebView) Stop(ctx context.Context) error {
778+ ret := _m.Called(ctx)
850779
851780 if len(ret) == 0 {
852781 panic("no return value specified for Stop")
853782 }
854783
855784 var r0 error
856- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
857- r0 = returnFunc(ctx)
785+ if rf, ok := ret.Get(0).(func(context.Context) error); ok {
786+ r0 = rf(ctx)
858787 } else {
859788 r0 = ret.Error(0)
860789 }
790+
861791 return r0
862792 }
863793
@@ -874,41 +804,36 @@ func (_e *MockWebView_Expecter) Stop(ctx interface{}) *MockWebView_Stop_Call {
874804
875805 func (_c *MockWebView_Stop_Call) Run(run func(ctx context.Context)) *MockWebView_Stop_Call {
876806 _c.Call.Run(func(args mock.Arguments) {
877- var arg0 context.Context
878- if args[0] != nil {
879- arg0 = args[0].(context.Context)
880- }
881- run(
882- arg0,
883- )
807+ run(args[0].(context.Context))
884808 })
885809 return _c
886810 }
887811
888-func (_c *MockWebView_Stop_Call) Return(err error) *MockWebView_Stop_Call {
889- _c.Call.Return(err)
812+func (_c *MockWebView_Stop_Call) Return(_a0 error) *MockWebView_Stop_Call {
813+ _c.Call.Return(_a0)
890814 return _c
891815 }
892816
893-func (_c *MockWebView_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_Stop_Call {
817+func (_c *MockWebView_Stop_Call) RunAndReturn(run func(context.Context) error) *MockWebView_Stop_Call {
894818 _c.Call.Return(run)
895819 return _c
896820 }
897821
898-// Title provides a mock function for the type MockWebView
899-func (_mock *MockWebView) Title() string {
900- ret := _mock.Called()
822+// Title provides a mock function with no fields
823+func (_m *MockWebView) Title() string {
824+ ret := _m.Called()
901825
902826 if len(ret) == 0 {
903827 panic("no return value specified for Title")
904828 }
905829
906830 var r0 string
907- if returnFunc, ok := ret.Get(0).(func() string); ok {
908- r0 = returnFunc()
831+ if rf, ok := ret.Get(0).(func() string); ok {
832+ r0 = rf()
909833 } else {
910834 r0 = ret.Get(0).(string)
911835 }
836+
912837 return r0
913838 }
914839
@@ -929,8 +854,8 @@ func (_c *MockWebView_Title_Call) Run(run func()) *MockWebView_Title_Call {
929854 return _c
930855 }
931856
932-func (_c *MockWebView_Title_Call) Return(s string) *MockWebView_Title_Call {
933- _c.Call.Return(s)
857+func (_c *MockWebView_Title_Call) Return(_a0 string) *MockWebView_Title_Call {
858+ _c.Call.Return(_a0)
934859 return _c
935860 }
936861
@@ -939,20 +864,21 @@ func (_c *MockWebView_Title_Call) RunAndReturn(run func() string) *MockWebView_T
939864 return _c
940865 }
941866
942-// URI provides a mock function for the type MockWebView
943-func (_mock *MockWebView) URI() string {
944- ret := _mock.Called()
867+// URI provides a mock function with no fields
868+func (_m *MockWebView) URI() string {
869+ ret := _m.Called()
945870
946871 if len(ret) == 0 {
947872 panic("no return value specified for URI")
948873 }
949874
950875 var r0 string
951- if returnFunc, ok := ret.Get(0).(func() string); ok {
952- r0 = returnFunc()
876+ if rf, ok := ret.Get(0).(func() string); ok {
877+ r0 = rf()
953878 } else {
954879 r0 = ret.Get(0).(string)
955880 }
881+
956882 return r0
957883 }
958884
@@ -973,8 +899,8 @@ func (_c *MockWebView_URI_Call) Run(run func()) *MockWebView_URI_Call {
973899 return _c
974900 }
975901
976-func (_c *MockWebView_URI_Call) Return(s string) *MockWebView_URI_Call {
977- _c.Call.Return(s)
902+func (_c *MockWebView_URI_Call) Return(_a0 string) *MockWebView_URI_Call {
903+ _c.Call.Return(_a0)
978904 return _c
979905 }
980906
@@ -982,3 +908,17 @@ func (_c *MockWebView_URI_Call) RunAndReturn(run func() string) *MockWebView_URI
982908 _c.Call.Return(run)
983909 return _c
984910 }
911+
912+// 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.
913+// The first argument is typically a *testing.T value.
914+func NewMockWebView(t interface {
915+ mock.TestingT
916+ Cleanup(func())
917+}) *MockWebView {
918+ mock := &MockWebView{}
919+ mock.Mock.Test(t)
920+
921+ t.Cleanup(func() { mock.AssertExpectations(t) })
922+
923+ return mock
924+}
M internal/application/port/mocks/mock_web_view_factory.go +47 -62
@@ -1,30 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
10- "github.com/bnema/dumber/internal/application/port"
8+ port "github.com/bnema/dumber/internal/application/port"
119 mock "github.com/stretchr/testify/mock"
1210 )
1311
14-// 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.
15-// The first argument is typically a *testing.T value.
16-func NewMockWebViewFactory(t interface {
17- mock.TestingT
18- Cleanup(func())
19-}) *MockWebViewFactory {
20- mock := &MockWebViewFactory{}
21- mock.Mock.Test(t)
22-
23- t.Cleanup(func() { mock.AssertExpectations(t) })
24-
25- return mock
26-}
27-
2812 // MockWebViewFactory is an autogenerated mock type for the WebViewFactory type
2913 type MockWebViewFactory struct {
3014 mock.Mock
@@ -38,9 +22,9 @@ func (_m *MockWebViewFactory) EXPECT() *MockWebViewFactory_Expecter {
3822 return &MockWebViewFactory_Expecter{mock: &_m.Mock}
3923 }
4024
41-// Create provides a mock function for the type MockWebViewFactory
42-func (_mock *MockWebViewFactory) Create(ctx context.Context) (port.WebView, error) {
43- ret := _mock.Called(ctx)
25+// Create provides a mock function with given fields: ctx
26+func (_m *MockWebViewFactory) Create(ctx context.Context) (port.WebView, error) {
27+ ret := _m.Called(ctx)
4428
4529 if len(ret) == 0 {
4630 panic("no return value specified for Create")
@@ -48,21 +32,23 @@ func (_mock *MockWebViewFactory) Create(ctx context.Context) (port.WebView, erro
4832
4933 var r0 port.WebView
5034 var r1 error
51- if returnFunc, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok {
52- return returnFunc(ctx)
35+ if rf, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok {
36+ return rf(ctx)
5337 }
54- if returnFunc, ok := ret.Get(0).(func(context.Context) port.WebView); ok {
55- r0 = returnFunc(ctx)
38+ if rf, ok := ret.Get(0).(func(context.Context) port.WebView); ok {
39+ r0 = rf(ctx)
5640 } else {
5741 if ret.Get(0) != nil {
5842 r0 = ret.Get(0).(port.WebView)
5943 }
6044 }
61- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
62- r1 = returnFunc(ctx)
45+
46+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
47+ r1 = rf(ctx)
6348 } else {
6449 r1 = ret.Error(1)
6550 }
51+
6652 return r0, r1
6753 }
6854
@@ -79,30 +65,24 @@ func (_e *MockWebViewFactory_Expecter) Create(ctx interface{}) *MockWebViewFacto
7965
8066 func (_c *MockWebViewFactory_Create_Call) Run(run func(ctx context.Context)) *MockWebViewFactory_Create_Call {
8167 _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- )
68+ run(args[0].(context.Context))
8969 })
9070 return _c
9171 }
9272
93-func (_c *MockWebViewFactory_Create_Call) Return(webView port.WebView, err error) *MockWebViewFactory_Create_Call {
94- _c.Call.Return(webView, err)
73+func (_c *MockWebViewFactory_Create_Call) Return(_a0 port.WebView, _a1 error) *MockWebViewFactory_Create_Call {
74+ _c.Call.Return(_a0, _a1)
9575 return _c
9676 }
9777
98-func (_c *MockWebViewFactory_Create_Call) RunAndReturn(run func(ctx context.Context) (port.WebView, error)) *MockWebViewFactory_Create_Call {
78+func (_c *MockWebViewFactory_Create_Call) RunAndReturn(run func(context.Context) (port.WebView, error)) *MockWebViewFactory_Create_Call {
9979 _c.Call.Return(run)
10080 return _c
10181 }
10282
103-// CreateRelated provides a mock function for the type MockWebViewFactory
104-func (_mock *MockWebViewFactory) CreateRelated(ctx context.Context, parentID port.WebViewID) (port.WebView, error) {
105- ret := _mock.Called(ctx, parentID)
83+// CreateRelated provides a mock function with given fields: ctx, parentID
84+func (_m *MockWebViewFactory) CreateRelated(ctx context.Context, parentID port.WebViewID) (port.WebView, error) {
85+ ret := _m.Called(ctx, parentID)
10686
10787 if len(ret) == 0 {
10888 panic("no return value specified for CreateRelated")
@@ -110,21 +90,23 @@ func (_mock *MockWebViewFactory) CreateRelated(ctx context.Context, parentID por
11090
11191 var r0 port.WebView
11292 var r1 error
113- if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID) (port.WebView, error)); ok {
114- return returnFunc(ctx, parentID)
93+ if rf, ok := ret.Get(0).(func(context.Context, port.WebViewID) (port.WebView, error)); ok {
94+ return rf(ctx, parentID)
11595 }
116- if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID) port.WebView); ok {
117- r0 = returnFunc(ctx, parentID)
96+ if rf, ok := ret.Get(0).(func(context.Context, port.WebViewID) port.WebView); ok {
97+ r0 = rf(ctx, parentID)
11898 } else {
11999 if ret.Get(0) != nil {
120100 r0 = ret.Get(0).(port.WebView)
121101 }
122102 }
123- if returnFunc, ok := ret.Get(1).(func(context.Context, port.WebViewID) error); ok {
124- r1 = returnFunc(ctx, parentID)
103+
104+ if rf, ok := ret.Get(1).(func(context.Context, port.WebViewID) error); ok {
105+ r1 = rf(ctx, parentID)
125106 } else {
126107 r1 = ret.Error(1)
127108 }
109+
128110 return r0, r1
129111 }
130112
@@ -142,28 +124,31 @@ func (_e *MockWebViewFactory_Expecter) CreateRelated(ctx interface{}, parentID i
142124
143125 func (_c *MockWebViewFactory_CreateRelated_Call) Run(run func(ctx context.Context, parentID port.WebViewID)) *MockWebViewFactory_CreateRelated_Call {
144126 _c.Call.Run(func(args mock.Arguments) {
145- var arg0 context.Context
146- if args[0] != nil {
147- arg0 = args[0].(context.Context)
148- }
149- var arg1 port.WebViewID
150- if args[1] != nil {
151- arg1 = args[1].(port.WebViewID)
152- }
153- run(
154- arg0,
155- arg1,
156- )
127+ run(args[0].(context.Context), args[1].(port.WebViewID))
157128 })
158129 return _c
159130 }
160131
161-func (_c *MockWebViewFactory_CreateRelated_Call) Return(webView port.WebView, err error) *MockWebViewFactory_CreateRelated_Call {
162- _c.Call.Return(webView, err)
132+func (_c *MockWebViewFactory_CreateRelated_Call) Return(_a0 port.WebView, _a1 error) *MockWebViewFactory_CreateRelated_Call {
133+ _c.Call.Return(_a0, _a1)
163134 return _c
164135 }
165136
166-func (_c *MockWebViewFactory_CreateRelated_Call) RunAndReturn(run func(ctx context.Context, parentID port.WebViewID) (port.WebView, error)) *MockWebViewFactory_CreateRelated_Call {
137+func (_c *MockWebViewFactory_CreateRelated_Call) RunAndReturn(run func(context.Context, port.WebViewID) (port.WebView, error)) *MockWebViewFactory_CreateRelated_Call {
167138 _c.Call.Return(run)
168139 return _c
169140 }
141+
142+// 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.
143+// The first argument is typically a *testing.T value.
144+func NewMockWebViewFactory(t interface {
145+ mock.TestingT
146+ Cleanup(func())
147+}) *MockWebViewFactory {
148+ mock := &MockWebViewFactory{}
149+ mock.Mock.Test(t)
150+
151+ t.Cleanup(func() { mock.AssertExpectations(t) })
152+
153+ return mock
154+}
M internal/application/port/mocks/mock_web_view_pool.go +53 -73
@@ -1,30 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
10- "github.com/bnema/dumber/internal/application/port"
8+ port "github.com/bnema/dumber/internal/application/port"
119 mock "github.com/stretchr/testify/mock"
1210 )
1311
14-// 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.
15-// The first argument is typically a *testing.T value.
16-func NewMockWebViewPool(t interface {
17- mock.TestingT
18- Cleanup(func())
19-}) *MockWebViewPool {
20- mock := &MockWebViewPool{}
21- mock.Mock.Test(t)
22-
23- t.Cleanup(func() { mock.AssertExpectations(t) })
24-
25- return mock
26-}
27-
2812 // MockWebViewPool is an autogenerated mock type for the WebViewPool type
2913 type MockWebViewPool struct {
3014 mock.Mock
@@ -38,9 +22,9 @@ func (_m *MockWebViewPool) EXPECT() *MockWebViewPool_Expecter {
3822 return &MockWebViewPool_Expecter{mock: &_m.Mock}
3923 }
4024
41-// Acquire provides a mock function for the type MockWebViewPool
42-func (_mock *MockWebViewPool) Acquire(ctx context.Context) (port.WebView, error) {
43- ret := _mock.Called(ctx)
25+// Acquire provides a mock function with given fields: ctx
26+func (_m *MockWebViewPool) Acquire(ctx context.Context) (port.WebView, error) {
27+ ret := _m.Called(ctx)
4428
4529 if len(ret) == 0 {
4630 panic("no return value specified for Acquire")
@@ -48,21 +32,23 @@ func (_mock *MockWebViewPool) Acquire(ctx context.Context) (port.WebView, error)
4832
4933 var r0 port.WebView
5034 var r1 error
51- if returnFunc, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok {
52- return returnFunc(ctx)
35+ if rf, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok {
36+ return rf(ctx)
5337 }
54- if returnFunc, ok := ret.Get(0).(func(context.Context) port.WebView); ok {
55- r0 = returnFunc(ctx)
38+ if rf, ok := ret.Get(0).(func(context.Context) port.WebView); ok {
39+ r0 = rf(ctx)
5640 } else {
5741 if ret.Get(0) != nil {
5842 r0 = ret.Get(0).(port.WebView)
5943 }
6044 }
61- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
62- r1 = returnFunc(ctx)
45+
46+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
47+ r1 = rf(ctx)
6348 } else {
6449 r1 = ret.Error(1)
6550 }
51+
6652 return r0, r1
6753 }
6854
@@ -79,31 +65,24 @@ func (_e *MockWebViewPool_Expecter) Acquire(ctx interface{}) *MockWebViewPool_Ac
7965
8066 func (_c *MockWebViewPool_Acquire_Call) Run(run func(ctx context.Context)) *MockWebViewPool_Acquire_Call {
8167 _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- )
68+ run(args[0].(context.Context))
8969 })
9070 return _c
9171 }
9272
93-func (_c *MockWebViewPool_Acquire_Call) Return(webView port.WebView, err error) *MockWebViewPool_Acquire_Call {
94- _c.Call.Return(webView, err)
73+func (_c *MockWebViewPool_Acquire_Call) Return(_a0 port.WebView, _a1 error) *MockWebViewPool_Acquire_Call {
74+ _c.Call.Return(_a0, _a1)
9575 return _c
9676 }
9777
98-func (_c *MockWebViewPool_Acquire_Call) RunAndReturn(run func(ctx context.Context) (port.WebView, error)) *MockWebViewPool_Acquire_Call {
78+func (_c *MockWebViewPool_Acquire_Call) RunAndReturn(run func(context.Context) (port.WebView, error)) *MockWebViewPool_Acquire_Call {
9979 _c.Call.Return(run)
10080 return _c
10181 }
10282
103-// Close provides a mock function for the type MockWebViewPool
104-func (_mock *MockWebViewPool) Close() {
105- _mock.Called()
106- return
83+// Close provides a mock function with no fields
84+func (_m *MockWebViewPool) Close() {
85+ _m.Called()
10786 }
10887
10988 // MockWebViewPool_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
@@ -133,10 +112,9 @@ func (_c *MockWebViewPool_Close_Call) RunAndReturn(run func()) *MockWebViewPool_
133112 return _c
134113 }
135114
136-// Prewarm provides a mock function for the type MockWebViewPool
137-func (_mock *MockWebViewPool) Prewarm(count int) {
138- _mock.Called(count)
139- return
115+// Prewarm provides a mock function with given fields: count
116+func (_m *MockWebViewPool) Prewarm(count int) {
117+ _m.Called(count)
140118 }
141119
142120 // MockWebViewPool_Prewarm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prewarm'
@@ -152,13 +130,7 @@ func (_e *MockWebViewPool_Expecter) Prewarm(count interface{}) *MockWebViewPool_
152130
153131 func (_c *MockWebViewPool_Prewarm_Call) Run(run func(count int)) *MockWebViewPool_Prewarm_Call {
154132 _c.Call.Run(func(args mock.Arguments) {
155- var arg0 int
156- if args[0] != nil {
157- arg0 = args[0].(int)
158- }
159- run(
160- arg0,
161- )
133+ run(args[0].(int))
162134 })
163135 return _c
164136 }
@@ -168,15 +140,14 @@ func (_c *MockWebViewPool_Prewarm_Call) Return() *MockWebViewPool_Prewarm_Call {
168140 return _c
169141 }
170142
171-func (_c *MockWebViewPool_Prewarm_Call) RunAndReturn(run func(count int)) *MockWebViewPool_Prewarm_Call {
143+func (_c *MockWebViewPool_Prewarm_Call) RunAndReturn(run func(int)) *MockWebViewPool_Prewarm_Call {
172144 _c.Run(run)
173145 return _c
174146 }
175147
176-// Release provides a mock function for the type MockWebViewPool
177-func (_mock *MockWebViewPool) Release(wv port.WebView) {
178- _mock.Called(wv)
179- return
148+// Release provides a mock function with given fields: wv
149+func (_m *MockWebViewPool) Release(wv port.WebView) {
150+ _m.Called(wv)
180151 }
181152
182153 // MockWebViewPool_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release'
@@ -192,13 +163,7 @@ func (_e *MockWebViewPool_Expecter) Release(wv interface{}) *MockWebViewPool_Rel
192163
193164 func (_c *MockWebViewPool_Release_Call) Run(run func(wv port.WebView)) *MockWebViewPool_Release_Call {
194165 _c.Call.Run(func(args mock.Arguments) {
195- var arg0 port.WebView
196- if args[0] != nil {
197- arg0 = args[0].(port.WebView)
198- }
199- run(
200- arg0,
201- )
166+ run(args[0].(port.WebView))
202167 })
203168 return _c
204169 }
@@ -208,25 +173,26 @@ func (_c *MockWebViewPool_Release_Call) Return() *MockWebViewPool_Release_Call {
208173 return _c
209174 }
210175
211-func (_c *MockWebViewPool_Release_Call) RunAndReturn(run func(wv port.WebView)) *MockWebViewPool_Release_Call {
176+func (_c *MockWebViewPool_Release_Call) RunAndReturn(run func(port.WebView)) *MockWebViewPool_Release_Call {
212177 _c.Run(run)
213178 return _c
214179 }
215180
216-// Size provides a mock function for the type MockWebViewPool
217-func (_mock *MockWebViewPool) Size() int {
218- ret := _mock.Called()
181+// Size provides a mock function with no fields
182+func (_m *MockWebViewPool) Size() int {
183+ ret := _m.Called()
219184
220185 if len(ret) == 0 {
221186 panic("no return value specified for Size")
222187 }
223188
224189 var r0 int
225- if returnFunc, ok := ret.Get(0).(func() int); ok {
226- r0 = returnFunc()
190+ if rf, ok := ret.Get(0).(func() int); ok {
191+ r0 = rf()
227192 } else {
228193 r0 = ret.Get(0).(int)
229194 }
195+
230196 return r0
231197 }
232198
@@ -247,8 +213,8 @@ func (_c *MockWebViewPool_Size_Call) Run(run func()) *MockWebViewPool_Size_Call
247213 return _c
248214 }
249215
250-func (_c *MockWebViewPool_Size_Call) Return(n int) *MockWebViewPool_Size_Call {
251- _c.Call.Return(n)
216+func (_c *MockWebViewPool_Size_Call) Return(_a0 int) *MockWebViewPool_Size_Call {
217+ _c.Call.Return(_a0)
252218 return _c
253219 }
254220
@@ -256,3 +222,17 @@ func (_c *MockWebViewPool_Size_Call) RunAndReturn(run func() int) *MockWebViewPo
256222 _c.Call.Return(run)
257223 return _c
258224 }
225+
226+// 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.
227+// The first argument is typically a *testing.T value.
228+func NewMockWebViewPool(t interface {
229+ mock.TestingT
230+ Cleanup(func())
231+}) *MockWebViewPool {
232+ mock := &MockWebViewPool{}
233+ mock.Mock.Test(t)
234+
235+ t.Cleanup(func() { mock.AssertExpectations(t) })
236+
237+ return mock
238+}
M internal/domain/repository/mocks/mock_content_whitelist_repository.go +66 -101
@@ -1,29 +1,13 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
108 mock "github.com/stretchr/testify/mock"
119 )
1210
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-
2711 // MockContentWhitelistRepository is an autogenerated mock type for the ContentWhitelistRepository type
2812 type MockContentWhitelistRepository struct {
2913 mock.Mock
@@ -37,20 +21,21 @@ func (_m *MockContentWhitelistRepository) EXPECT() *MockContentWhitelistReposito
3721 return &MockContentWhitelistRepository_Expecter{mock: &_m.Mock}
3822 }
3923
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)
24+// Add provides a mock function with given fields: ctx, domain
25+func (_m *MockContentWhitelistRepository) Add(ctx context.Context, domain string) error {
26+ ret := _m.Called(ctx, domain)
4327
4428 if len(ret) == 0 {
4529 panic("no return value specified for Add")
4630 }
4731
4832 var r0 error
49- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
50- r0 = returnFunc(ctx, domain)
33+ if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
34+ r0 = rf(ctx, domain)
5135 } else {
5236 r0 = ret.Error(0)
5337 }
38+
5439 return r0
5540 }
5641
@@ -68,35 +53,24 @@ func (_e *MockContentWhitelistRepository_Expecter) Add(ctx interface{}, domain i
6853
6954 func (_c *MockContentWhitelistRepository_Add_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Add_Call {
7055 _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- )
56+ run(args[0].(context.Context), args[1].(string))
8357 })
8458 return _c
8559 }
8660
87-func (_c *MockContentWhitelistRepository_Add_Call) Return(err error) *MockContentWhitelistRepository_Add_Call {
88- _c.Call.Return(err)
61+func (_c *MockContentWhitelistRepository_Add_Call) Return(_a0 error) *MockContentWhitelistRepository_Add_Call {
62+ _c.Call.Return(_a0)
8963 return _c
9064 }
9165
92-func (_c *MockContentWhitelistRepository_Add_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Add_Call {
66+func (_c *MockContentWhitelistRepository_Add_Call) RunAndReturn(run func(context.Context, string) error) *MockContentWhitelistRepository_Add_Call {
9367 _c.Call.Return(run)
9468 return _c
9569 }
9670
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)
71+// Contains provides a mock function with given fields: ctx, domain
72+func (_m *MockContentWhitelistRepository) Contains(ctx context.Context, domain string) (bool, error) {
73+ ret := _m.Called(ctx, domain)
10074
10175 if len(ret) == 0 {
10276 panic("no return value specified for Contains")
@@ -104,19 +78,21 @@ func (_mock *MockContentWhitelistRepository) Contains(ctx context.Context, domai
10478
10579 var r0 bool
10680 var r1 error
107- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
108- return returnFunc(ctx, domain)
81+ if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
82+ return rf(ctx, domain)
10983 }
110- if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
111- r0 = returnFunc(ctx, domain)
84+ if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
85+ r0 = rf(ctx, domain)
11286 } else {
11387 r0 = ret.Get(0).(bool)
11488 }
115- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
116- r1 = returnFunc(ctx, domain)
89+
90+ if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
91+ r1 = rf(ctx, domain)
11792 } else {
11893 r1 = ret.Error(1)
11994 }
95+
12096 return r0, r1
12197 }
12298
@@ -134,35 +110,24 @@ func (_e *MockContentWhitelistRepository_Expecter) Contains(ctx interface{}, dom
134110
135111 func (_c *MockContentWhitelistRepository_Contains_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Contains_Call {
136112 _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- )
113+ run(args[0].(context.Context), args[1].(string))
149114 })
150115 return _c
151116 }
152117
153-func (_c *MockContentWhitelistRepository_Contains_Call) Return(b bool, err error) *MockContentWhitelistRepository_Contains_Call {
154- _c.Call.Return(b, err)
118+func (_c *MockContentWhitelistRepository_Contains_Call) Return(_a0 bool, _a1 error) *MockContentWhitelistRepository_Contains_Call {
119+ _c.Call.Return(_a0, _a1)
155120 return _c
156121 }
157122
158-func (_c *MockContentWhitelistRepository_Contains_Call) RunAndReturn(run func(ctx context.Context, domain string) (bool, error)) *MockContentWhitelistRepository_Contains_Call {
123+func (_c *MockContentWhitelistRepository_Contains_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *MockContentWhitelistRepository_Contains_Call {
159124 _c.Call.Return(run)
160125 return _c
161126 }
162127
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)
128+// GetAll provides a mock function with given fields: ctx
129+func (_m *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]string, error) {
130+ ret := _m.Called(ctx)
166131
167132 if len(ret) == 0 {
168133 panic("no return value specified for GetAll")
@@ -170,21 +135,23 @@ func (_mock *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]stri
170135
171136 var r0 []string
172137 var r1 error
173- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
174- return returnFunc(ctx)
138+ if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
139+ return rf(ctx)
175140 }
176- if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
177- r0 = returnFunc(ctx)
141+ if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
142+ r0 = rf(ctx)
178143 } else {
179144 if ret.Get(0) != nil {
180145 r0 = ret.Get(0).([]string)
181146 }
182147 }
183- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
184- r1 = returnFunc(ctx)
148+
149+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
150+ r1 = rf(ctx)
185151 } else {
186152 r1 = ret.Error(1)
187153 }
154+
188155 return r0, r1
189156 }
190157
@@ -201,41 +168,36 @@ func (_e *MockContentWhitelistRepository_Expecter) GetAll(ctx interface{}) *Mock
201168
202169 func (_c *MockContentWhitelistRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockContentWhitelistRepository_GetAll_Call {
203170 _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- )
171+ run(args[0].(context.Context))
211172 })
212173 return _c
213174 }
214175
215-func (_c *MockContentWhitelistRepository_GetAll_Call) Return(strings []string, err error) *MockContentWhitelistRepository_GetAll_Call {
216- _c.Call.Return(strings, err)
176+func (_c *MockContentWhitelistRepository_GetAll_Call) Return(_a0 []string, _a1 error) *MockContentWhitelistRepository_GetAll_Call {
177+ _c.Call.Return(_a0, _a1)
217178 return _c
218179 }
219180
220-func (_c *MockContentWhitelistRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockContentWhitelistRepository_GetAll_Call {
181+func (_c *MockContentWhitelistRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]string, error)) *MockContentWhitelistRepository_GetAll_Call {
221182 _c.Call.Return(run)
222183 return _c
223184 }
224185
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)
186+// Remove provides a mock function with given fields: ctx, domain
187+func (_m *MockContentWhitelistRepository) Remove(ctx context.Context, domain string) error {
188+ ret := _m.Called(ctx, domain)
228189
229190 if len(ret) == 0 {
230191 panic("no return value specified for Remove")
231192 }
232193
233194 var r0 error
234- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
235- r0 = returnFunc(ctx, domain)
195+ if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
196+ r0 = rf(ctx, domain)
236197 } else {
237198 r0 = ret.Error(0)
238199 }
200+
239201 return r0
240202 }
241203
@@ -253,28 +215,31 @@ func (_e *MockContentWhitelistRepository_Expecter) Remove(ctx interface{}, domai
253215
254216 func (_c *MockContentWhitelistRepository_Remove_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Remove_Call {
255217 _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- )
218+ run(args[0].(context.Context), args[1].(string))
268219 })
269220 return _c
270221 }
271222
272-func (_c *MockContentWhitelistRepository_Remove_Call) Return(err error) *MockContentWhitelistRepository_Remove_Call {
273- _c.Call.Return(err)
223+func (_c *MockContentWhitelistRepository_Remove_Call) Return(_a0 error) *MockContentWhitelistRepository_Remove_Call {
224+ _c.Call.Return(_a0)
274225 return _c
275226 }
276227
277-func (_c *MockContentWhitelistRepository_Remove_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Remove_Call {
228+func (_c *MockContentWhitelistRepository_Remove_Call) RunAndReturn(run func(context.Context, string) error) *MockContentWhitelistRepository_Remove_Call {
278229 _c.Call.Return(run)
279230 return _c
280231 }
232+
233+// 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.
234+// The first argument is typically a *testing.T value.
235+func NewMockContentWhitelistRepository(t interface {
236+ mock.TestingT
237+ Cleanup(func())
238+}) *MockContentWhitelistRepository {
239+ mock := &MockContentWhitelistRepository{}
240+ mock.Mock.Test(t)
241+
242+ t.Cleanup(func() { mock.AssertExpectations(t) })
243+
244+ return mock
245+}
M internal/domain/repository/mocks/mock_favorite_repository.go +142 -249
@@ -1,30 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
10- "github.com/bnema/dumber/internal/domain/entity"
8+ entity "github.com/bnema/dumber/internal/domain/entity"
119 mock "github.com/stretchr/testify/mock"
1210 )
1311
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-
2812 // MockFavoriteRepository is an autogenerated mock type for the FavoriteRepository type
2913 type MockFavoriteRepository struct {
3014 mock.Mock
@@ -38,20 +22,21 @@ func (_m *MockFavoriteRepository) EXPECT() *MockFavoriteRepository_Expecter {
3822 return &MockFavoriteRepository_Expecter{mock: &_m.Mock}
3923 }
4024
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)
25+// Delete provides a mock function with given fields: ctx, id
26+func (_m *MockFavoriteRepository) Delete(ctx context.Context, id entity.FavoriteID) error {
27+ ret := _m.Called(ctx, id)
4428
4529 if len(ret) == 0 {
4630 panic("no return value specified for Delete")
4731 }
4832
4933 var r0 error
50- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok {
51- r0 = returnFunc(ctx, id)
34+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok {
35+ r0 = rf(ctx, id)
5236 } else {
5337 r0 = ret.Error(0)
5438 }
39+
5540 return r0
5641 }
5742
@@ -69,35 +54,24 @@ func (_e *MockFavoriteRepository_Expecter) Delete(ctx interface{}, id interface{
6954
7055 func (_c *MockFavoriteRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_Delete_Call {
7156 _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- )
57+ run(args[0].(context.Context), args[1].(entity.FavoriteID))
8458 })
8559 return _c
8660 }
8761
88-func (_c *MockFavoriteRepository_Delete_Call) Return(err error) *MockFavoriteRepository_Delete_Call {
89- _c.Call.Return(err)
62+func (_c *MockFavoriteRepository_Delete_Call) Return(_a0 error) *MockFavoriteRepository_Delete_Call {
63+ _c.Call.Return(_a0)
9064 return _c
9165 }
9266
93-func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call {
67+func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(context.Context, entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call {
9468 _c.Call.Return(run)
9569 return _c
9670 }
9771
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)
72+// FindByID provides a mock function with given fields: ctx, id
73+func (_m *MockFavoriteRepository) FindByID(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error) {
74+ ret := _m.Called(ctx, id)
10175
10276 if len(ret) == 0 {
10377 panic("no return value specified for FindByID")
@@ -105,21 +79,23 @@ func (_mock *MockFavoriteRepository) FindByID(ctx context.Context, id entity.Fav
10579
10680 var r0 *entity.Favorite
10781 var r1 error
108- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok {
109- return returnFunc(ctx, id)
82+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok {
83+ return rf(ctx, id)
11084 }
111- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok {
112- r0 = returnFunc(ctx, id)
85+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok {
86+ r0 = rf(ctx, id)
11387 } else {
11488 if ret.Get(0) != nil {
11589 r0 = ret.Get(0).(*entity.Favorite)
11690 }
11791 }
118- if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
119- r1 = returnFunc(ctx, id)
92+
93+ if rf, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
94+ r1 = rf(ctx, id)
12095 } else {
12196 r1 = ret.Error(1)
12297 }
98+
12399 return r0, r1
124100 }
125101
@@ -137,35 +113,24 @@ func (_e *MockFavoriteRepository_Expecter) FindByID(ctx interface{}, id interfac
137113
138114 func (_c *MockFavoriteRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_FindByID_Call {
139115 _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- )
116+ run(args[0].(context.Context), args[1].(entity.FavoriteID))
152117 })
153118 return _c
154119 }
155120
156-func (_c *MockFavoriteRepository_FindByID_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByID_Call {
157- _c.Call.Return(favorite, err)
121+func (_c *MockFavoriteRepository_FindByID_Call) Return(_a0 *entity.Favorite, _a1 error) *MockFavoriteRepository_FindByID_Call {
122+ _c.Call.Return(_a0, _a1)
158123 return _c
159124 }
160125
161-func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call {
126+func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(context.Context, entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call {
162127 _c.Call.Return(run)
163128 return _c
164129 }
165130
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)
131+// FindByURL provides a mock function with given fields: ctx, url
132+func (_m *MockFavoriteRepository) FindByURL(ctx context.Context, url string) (*entity.Favorite, error) {
133+ ret := _m.Called(ctx, url)
169134
170135 if len(ret) == 0 {
171136 panic("no return value specified for FindByURL")
@@ -173,21 +138,23 @@ func (_mock *MockFavoriteRepository) FindByURL(ctx context.Context, url string)
173138
174139 var r0 *entity.Favorite
175140 var r1 error
176- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok {
177- return returnFunc(ctx, url)
141+ if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok {
142+ return rf(ctx, url)
178143 }
179- if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok {
180- r0 = returnFunc(ctx, url)
144+ if rf, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok {
145+ r0 = rf(ctx, url)
181146 } else {
182147 if ret.Get(0) != nil {
183148 r0 = ret.Get(0).(*entity.Favorite)
184149 }
185150 }
186- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
187- r1 = returnFunc(ctx, url)
151+
152+ if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
153+ r1 = rf(ctx, url)
188154 } else {
189155 r1 = ret.Error(1)
190156 }
157+
191158 return r0, r1
192159 }
193160
@@ -205,35 +172,24 @@ func (_e *MockFavoriteRepository_Expecter) FindByURL(ctx interface{}, url interf
205172
206173 func (_c *MockFavoriteRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockFavoriteRepository_FindByURL_Call {
207174 _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- )
175+ run(args[0].(context.Context), args[1].(string))
220176 })
221177 return _c
222178 }
223179
224-func (_c *MockFavoriteRepository_FindByURL_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByURL_Call {
225- _c.Call.Return(favorite, err)
180+func (_c *MockFavoriteRepository_FindByURL_Call) Return(_a0 *entity.Favorite, _a1 error) *MockFavoriteRepository_FindByURL_Call {
181+ _c.Call.Return(_a0, _a1)
226182 return _c
227183 }
228184
229-func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call {
185+func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(context.Context, string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call {
230186 _c.Call.Return(run)
231187 return _c
232188 }
233189
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)
190+// GetAll provides a mock function with given fields: ctx
191+func (_m *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favorite, error) {
192+ ret := _m.Called(ctx)
237193
238194 if len(ret) == 0 {
239195 panic("no return value specified for GetAll")
@@ -241,21 +197,23 @@ func (_mock *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favo
241197
242198 var r0 []*entity.Favorite
243199 var r1 error
244- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok {
245- return returnFunc(ctx)
200+ if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok {
201+ return rf(ctx)
246202 }
247- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok {
248- r0 = returnFunc(ctx)
203+ if rf, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok {
204+ r0 = rf(ctx)
249205 } else {
250206 if ret.Get(0) != nil {
251207 r0 = ret.Get(0).([]*entity.Favorite)
252208 }
253209 }
254- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
255- r1 = returnFunc(ctx)
210+
211+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
212+ r1 = rf(ctx)
256213 } else {
257214 r1 = ret.Error(1)
258215 }
216+
259217 return r0, r1
260218 }
261219
@@ -272,30 +230,24 @@ func (_e *MockFavoriteRepository_Expecter) GetAll(ctx interface{}) *MockFavorite
272230
273231 func (_c *MockFavoriteRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFavoriteRepository_GetAll_Call {
274232 _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- )
233+ run(args[0].(context.Context))
282234 })
283235 return _c
284236 }
285237
286-func (_c *MockFavoriteRepository_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetAll_Call {
287- _c.Call.Return(favorites, err)
238+func (_c *MockFavoriteRepository_GetAll_Call) Return(_a0 []*entity.Favorite, _a1 error) *MockFavoriteRepository_GetAll_Call {
239+ _c.Call.Return(_a0, _a1)
288240 return _c
289241 }
290242
291-func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call {
243+func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call {
292244 _c.Call.Return(run)
293245 return _c
294246 }
295247
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)
248+// GetByFolder provides a mock function with given fields: ctx, folderID
249+func (_m *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error) {
250+ ret := _m.Called(ctx, folderID)
299251
300252 if len(ret) == 0 {
301253 panic("no return value specified for GetByFolder")
@@ -303,21 +255,23 @@ func (_mock *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID *
303255
304256 var r0 []*entity.Favorite
305257 var r1 error
306- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)); ok {
307- return returnFunc(ctx, folderID)
258+ if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)); ok {
259+ return rf(ctx, folderID)
308260 }
309- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Favorite); ok {
310- r0 = returnFunc(ctx, folderID)
261+ if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Favorite); ok {
262+ r0 = rf(ctx, folderID)
311263 } else {
312264 if ret.Get(0) != nil {
313265 r0 = ret.Get(0).([]*entity.Favorite)
314266 }
315267 }
316- if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
317- r1 = returnFunc(ctx, folderID)
268+
269+ if rf, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
270+ r1 = rf(ctx, folderID)
318271 } else {
319272 r1 = ret.Error(1)
320273 }
274+
321275 return r0, r1
322276 }
323277
@@ -335,35 +289,24 @@ func (_e *MockFavoriteRepository_Expecter) GetByFolder(ctx interface{}, folderID
335289
336290 func (_c *MockFavoriteRepository_GetByFolder_Call) Run(run func(ctx context.Context, folderID *entity.FolderID)) *MockFavoriteRepository_GetByFolder_Call {
337291 _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- )
292+ run(args[0].(context.Context), args[1].(*entity.FolderID))
350293 })
351294 return _c
352295 }
353296
354-func (_c *MockFavoriteRepository_GetByFolder_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetByFolder_Call {
355- _c.Call.Return(favorites, err)
297+func (_c *MockFavoriteRepository_GetByFolder_Call) Return(_a0 []*entity.Favorite, _a1 error) *MockFavoriteRepository_GetByFolder_Call {
298+ _c.Call.Return(_a0, _a1)
356299 return _c
357300 }
358301
359-func (_c *MockFavoriteRepository_GetByFolder_Call) RunAndReturn(run func(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByFolder_Call {
302+func (_c *MockFavoriteRepository_GetByFolder_Call) RunAndReturn(run func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByFolder_Call {
360303 _c.Call.Return(run)
361304 return _c
362305 }
363306
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)
307+// GetByShortcut provides a mock function with given fields: ctx, key
308+func (_m *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) {
309+ ret := _m.Called(ctx, key)
367310
368311 if len(ret) == 0 {
369312 panic("no return value specified for GetByShortcut")
@@ -371,21 +314,23 @@ func (_mock *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int)
371314
372315 var r0 *entity.Favorite
373316 var r1 error
374- if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok {
375- return returnFunc(ctx, key)
317+ if rf, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok {
318+ return rf(ctx, key)
376319 }
377- if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok {
378- r0 = returnFunc(ctx, key)
320+ if rf, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok {
321+ r0 = rf(ctx, key)
379322 } else {
380323 if ret.Get(0) != nil {
381324 r0 = ret.Get(0).(*entity.Favorite)
382325 }
383326 }
384- if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
385- r1 = returnFunc(ctx, key)
327+
328+ if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
329+ r1 = rf(ctx, key)
386330 } else {
387331 r1 = ret.Error(1)
388332 }
333+
389334 return r0, r1
390335 }
391336
@@ -403,46 +348,36 @@ func (_e *MockFavoriteRepository_Expecter) GetByShortcut(ctx interface{}, key in
403348
404349 func (_c *MockFavoriteRepository_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockFavoriteRepository_GetByShortcut_Call {
405350 _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- )
351+ run(args[0].(context.Context), args[1].(int))
418352 })
419353 return _c
420354 }
421355
422-func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_GetByShortcut_Call {
423- _c.Call.Return(favorite, err)
356+func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(_a0 *entity.Favorite, _a1 error) *MockFavoriteRepository_GetByShortcut_Call {
357+ _c.Call.Return(_a0, _a1)
424358 return _c
425359 }
426360
427-func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call {
361+func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(context.Context, int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call {
428362 _c.Call.Return(run)
429363 return _c
430364 }
431365
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)
366+// Save provides a mock function with given fields: ctx, fav
367+func (_m *MockFavoriteRepository) Save(ctx context.Context, fav *entity.Favorite) error {
368+ ret := _m.Called(ctx, fav)
435369
436370 if len(ret) == 0 {
437371 panic("no return value specified for Save")
438372 }
439373
440374 var r0 error
441- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok {
442- r0 = returnFunc(ctx, fav)
375+ if rf, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok {
376+ r0 = rf(ctx, fav)
443377 } else {
444378 r0 = ret.Error(0)
445379 }
380+
446381 return r0
447382 }
448383
@@ -460,46 +395,36 @@ func (_e *MockFavoriteRepository_Expecter) Save(ctx interface{}, fav interface{}
460395
461396 func (_c *MockFavoriteRepository_Save_Call) Run(run func(ctx context.Context, fav *entity.Favorite)) *MockFavoriteRepository_Save_Call {
462397 _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- )
398+ run(args[0].(context.Context), args[1].(*entity.Favorite))
475399 })
476400 return _c
477401 }
478402
479-func (_c *MockFavoriteRepository_Save_Call) Return(err error) *MockFavoriteRepository_Save_Call {
480- _c.Call.Return(err)
403+func (_c *MockFavoriteRepository_Save_Call) Return(_a0 error) *MockFavoriteRepository_Save_Call {
404+ _c.Call.Return(_a0)
481405 return _c
482406 }
483407
484-func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(ctx context.Context, fav *entity.Favorite) error) *MockFavoriteRepository_Save_Call {
408+func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.Favorite) error) *MockFavoriteRepository_Save_Call {
485409 _c.Call.Return(run)
486410 return _c
487411 }
488412
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)
413+// SetFolder provides a mock function with given fields: ctx, id, folderID
414+func (_m *MockFavoriteRepository) SetFolder(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error {
415+ ret := _m.Called(ctx, id, folderID)
492416
493417 if len(ret) == 0 {
494418 panic("no return value specified for SetFolder")
495419 }
496420
497421 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)
422+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok {
423+ r0 = rf(ctx, id, folderID)
500424 } else {
501425 r0 = ret.Error(0)
502426 }
427+
503428 return r0
504429 }
505430
@@ -518,51 +443,36 @@ func (_e *MockFavoriteRepository_Expecter) SetFolder(ctx interface{}, id interfa
518443
519444 func (_c *MockFavoriteRepository_SetFolder_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockFavoriteRepository_SetFolder_Call {
520445 _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- )
446+ run(args[0].(context.Context), args[1].(entity.FavoriteID), args[2].(*entity.FolderID))
538447 })
539448 return _c
540449 }
541450
542-func (_c *MockFavoriteRepository_SetFolder_Call) Return(err error) *MockFavoriteRepository_SetFolder_Call {
543- _c.Call.Return(err)
451+func (_c *MockFavoriteRepository_SetFolder_Call) Return(_a0 error) *MockFavoriteRepository_SetFolder_Call {
452+ _c.Call.Return(_a0)
544453 return _c
545454 }
546455
547-func (_c *MockFavoriteRepository_SetFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockFavoriteRepository_SetFolder_Call {
456+func (_c *MockFavoriteRepository_SetFolder_Call) RunAndReturn(run func(context.Context, entity.FavoriteID, *entity.FolderID) error) *MockFavoriteRepository_SetFolder_Call {
548457 _c.Call.Return(run)
549458 return _c
550459 }
551460
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)
461+// SetShortcut provides a mock function with given fields: ctx, id, key
462+func (_m *MockFavoriteRepository) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error {
463+ ret := _m.Called(ctx, id, key)
555464
556465 if len(ret) == 0 {
557466 panic("no return value specified for SetShortcut")
558467 }
559468
560469 var r0 error
561- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok {
562- r0 = returnFunc(ctx, id, key)
470+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok {
471+ r0 = rf(ctx, id, key)
563472 } else {
564473 r0 = ret.Error(0)
565474 }
475+
566476 return r0
567477 }
568478
@@ -581,51 +491,36 @@ func (_e *MockFavoriteRepository_Expecter) SetShortcut(ctx interface{}, id inter
581491
582492 func (_c *MockFavoriteRepository_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockFavoriteRepository_SetShortcut_Call {
583493 _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- )
494+ run(args[0].(context.Context), args[1].(entity.FavoriteID), args[2].(*int))
601495 })
602496 return _c
603497 }
604498
605-func (_c *MockFavoriteRepository_SetShortcut_Call) Return(err error) *MockFavoriteRepository_SetShortcut_Call {
606- _c.Call.Return(err)
499+func (_c *MockFavoriteRepository_SetShortcut_Call) Return(_a0 error) *MockFavoriteRepository_SetShortcut_Call {
500+ _c.Call.Return(_a0)
607501 return _c
608502 }
609503
610-func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockFavoriteRepository_SetShortcut_Call {
504+func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(context.Context, entity.FavoriteID, *int) error) *MockFavoriteRepository_SetShortcut_Call {
611505 _c.Call.Return(run)
612506 return _c
613507 }
614508
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)
509+// UpdatePosition provides a mock function with given fields: ctx, id, position
510+func (_m *MockFavoriteRepository) UpdatePosition(ctx context.Context, id entity.FavoriteID, position int) error {
511+ ret := _m.Called(ctx, id, position)
618512
619513 if len(ret) == 0 {
620514 panic("no return value specified for UpdatePosition")
621515 }
622516
623517 var r0 error
624- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok {
625- r0 = returnFunc(ctx, id, position)
518+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok {
519+ r0 = rf(ctx, id, position)
626520 } else {
627521 r0 = ret.Error(0)
628522 }
523+
629524 return r0
630525 }
631526
@@ -644,33 +539,31 @@ func (_e *MockFavoriteRepository_Expecter) UpdatePosition(ctx interface{}, id in
644539
645540 func (_c *MockFavoriteRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FavoriteID, position int)) *MockFavoriteRepository_UpdatePosition_Call {
646541 _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- )
542+ run(args[0].(context.Context), args[1].(entity.FavoriteID), args[2].(int))
664543 })
665544 return _c
666545 }
667546
668-func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(err error) *MockFavoriteRepository_UpdatePosition_Call {
669- _c.Call.Return(err)
547+func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(_a0 error) *MockFavoriteRepository_UpdatePosition_Call {
548+ _c.Call.Return(_a0)
670549 return _c
671550 }
672551
673-func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, position int) error) *MockFavoriteRepository_UpdatePosition_Call {
552+func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(context.Context, entity.FavoriteID, int) error) *MockFavoriteRepository_UpdatePosition_Call {
674553 _c.Call.Return(run)
675554 return _c
676555 }
556+
557+// 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.
558+// The first argument is typically a *testing.T value.
559+func NewMockFavoriteRepository(t interface {
560+ mock.TestingT
561+ Cleanup(func())
562+}) *MockFavoriteRepository {
563+ mock := &MockFavoriteRepository{}
564+ mock.Mock.Test(t)
565+
566+ t.Cleanup(func() { mock.AssertExpectations(t) })
567+
568+ return mock
569+}
M internal/domain/repository/mocks/mock_folder_repository.go +92 -151
@@ -1,30 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
10- "github.com/bnema/dumber/internal/domain/entity"
8+ entity "github.com/bnema/dumber/internal/domain/entity"
119 mock "github.com/stretchr/testify/mock"
1210 )
1311
14-// 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.
15-// The first argument is typically a *testing.T value.
16-func NewMockFolderRepository(t interface {
17- mock.TestingT
18- Cleanup(func())
19-}) *MockFolderRepository {
20- mock := &MockFolderRepository{}
21- mock.Mock.Test(t)
22-
23- t.Cleanup(func() { mock.AssertExpectations(t) })
24-
25- return mock
26-}
27-
2812 // MockFolderRepository is an autogenerated mock type for the FolderRepository type
2913 type MockFolderRepository struct {
3014 mock.Mock
@@ -38,20 +22,21 @@ func (_m *MockFolderRepository) EXPECT() *MockFolderRepository_Expecter {
3822 return &MockFolderRepository_Expecter{mock: &_m.Mock}
3923 }
4024
41-// Delete provides a mock function for the type MockFolderRepository
42-func (_mock *MockFolderRepository) Delete(ctx context.Context, id entity.FolderID) error {
43- ret := _mock.Called(ctx, id)
25+// Delete provides a mock function with given fields: ctx, id
26+func (_m *MockFolderRepository) Delete(ctx context.Context, id entity.FolderID) error {
27+ ret := _m.Called(ctx, id)
4428
4529 if len(ret) == 0 {
4630 panic("no return value specified for Delete")
4731 }
4832
4933 var r0 error
50- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok {
51- r0 = returnFunc(ctx, id)
34+ if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok {
35+ r0 = rf(ctx, id)
5236 } else {
5337 r0 = ret.Error(0)
5438 }
39+
5540 return r0
5641 }
5742
@@ -69,35 +54,24 @@ func (_e *MockFolderRepository_Expecter) Delete(ctx interface{}, id interface{})
6954
7055 func (_c *MockFolderRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_Delete_Call {
7156 _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.FolderID
77- if args[1] != nil {
78- arg1 = args[1].(entity.FolderID)
79- }
80- run(
81- arg0,
82- arg1,
83- )
57+ run(args[0].(context.Context), args[1].(entity.FolderID))
8458 })
8559 return _c
8660 }
8761
88-func (_c *MockFolderRepository_Delete_Call) Return(err error) *MockFolderRepository_Delete_Call {
89- _c.Call.Return(err)
62+func (_c *MockFolderRepository_Delete_Call) Return(_a0 error) *MockFolderRepository_Delete_Call {
63+ _c.Call.Return(_a0)
9064 return _c
9165 }
9266
93-func (_c *MockFolderRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockFolderRepository_Delete_Call {
67+func (_c *MockFolderRepository_Delete_Call) RunAndReturn(run func(context.Context, entity.FolderID) error) *MockFolderRepository_Delete_Call {
9468 _c.Call.Return(run)
9569 return _c
9670 }
9771
98-// FindByID provides a mock function for the type MockFolderRepository
99-func (_mock *MockFolderRepository) FindByID(ctx context.Context, id entity.FolderID) (*entity.Folder, error) {
100- ret := _mock.Called(ctx, id)
72+// FindByID provides a mock function with given fields: ctx, id
73+func (_m *MockFolderRepository) FindByID(ctx context.Context, id entity.FolderID) (*entity.Folder, error) {
74+ ret := _m.Called(ctx, id)
10175
10276 if len(ret) == 0 {
10377 panic("no return value specified for FindByID")
@@ -105,21 +79,23 @@ func (_mock *MockFolderRepository) FindByID(ctx context.Context, id entity.Folde
10579
10680 var r0 *entity.Folder
10781 var r1 error
108- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) (*entity.Folder, error)); ok {
109- return returnFunc(ctx, id)
82+ if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID) (*entity.Folder, error)); ok {
83+ return rf(ctx, id)
11084 }
111- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) *entity.Folder); ok {
112- r0 = returnFunc(ctx, id)
85+ if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID) *entity.Folder); ok {
86+ r0 = rf(ctx, id)
11387 } else {
11488 if ret.Get(0) != nil {
11589 r0 = ret.Get(0).(*entity.Folder)
11690 }
11791 }
118- if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FolderID) error); ok {
119- r1 = returnFunc(ctx, id)
92+
93+ if rf, ok := ret.Get(1).(func(context.Context, entity.FolderID) error); ok {
94+ r1 = rf(ctx, id)
12095 } else {
12196 r1 = ret.Error(1)
12297 }
98+
12399 return r0, r1
124100 }
125101
@@ -137,35 +113,24 @@ func (_e *MockFolderRepository_Expecter) FindByID(ctx interface{}, id interface{
137113
138114 func (_c *MockFolderRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_FindByID_Call {
139115 _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.FolderID
145- if args[1] != nil {
146- arg1 = args[1].(entity.FolderID)
147- }
148- run(
149- arg0,
150- arg1,
151- )
116+ run(args[0].(context.Context), args[1].(entity.FolderID))
152117 })
153118 return _c
154119 }
155120
156-func (_c *MockFolderRepository_FindByID_Call) Return(folder *entity.Folder, err error) *MockFolderRepository_FindByID_Call {
157- _c.Call.Return(folder, err)
121+func (_c *MockFolderRepository_FindByID_Call) Return(_a0 *entity.Folder, _a1 error) *MockFolderRepository_FindByID_Call {
122+ _c.Call.Return(_a0, _a1)
158123 return _c
159124 }
160125
161-func (_c *MockFolderRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) (*entity.Folder, error)) *MockFolderRepository_FindByID_Call {
126+func (_c *MockFolderRepository_FindByID_Call) RunAndReturn(run func(context.Context, entity.FolderID) (*entity.Folder, error)) *MockFolderRepository_FindByID_Call {
162127 _c.Call.Return(run)
163128 return _c
164129 }
165130
166-// GetAll provides a mock function for the type MockFolderRepository
167-func (_mock *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder, error) {
168- ret := _mock.Called(ctx)
131+// GetAll provides a mock function with given fields: ctx
132+func (_m *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder, error) {
133+ ret := _m.Called(ctx)
169134
170135 if len(ret) == 0 {
171136 panic("no return value specified for GetAll")
@@ -173,21 +138,23 @@ func (_mock *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder
173138
174139 var r0 []*entity.Folder
175140 var r1 error
176- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok {
177- return returnFunc(ctx)
141+ if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok {
142+ return rf(ctx)
178143 }
179- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok {
180- r0 = returnFunc(ctx)
144+ if rf, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok {
145+ r0 = rf(ctx)
181146 } else {
182147 if ret.Get(0) != nil {
183148 r0 = ret.Get(0).([]*entity.Folder)
184149 }
185150 }
186- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
187- r1 = returnFunc(ctx)
151+
152+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
153+ r1 = rf(ctx)
188154 } else {
189155 r1 = ret.Error(1)
190156 }
157+
191158 return r0, r1
192159 }
193160
@@ -204,30 +171,24 @@ func (_e *MockFolderRepository_Expecter) GetAll(ctx interface{}) *MockFolderRepo
204171
205172 func (_c *MockFolderRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFolderRepository_GetAll_Call {
206173 _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- )
174+ run(args[0].(context.Context))
214175 })
215176 return _c
216177 }
217178
218-func (_c *MockFolderRepository_GetAll_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetAll_Call {
219- _c.Call.Return(folders, err)
179+func (_c *MockFolderRepository_GetAll_Call) Return(_a0 []*entity.Folder, _a1 error) *MockFolderRepository_GetAll_Call {
180+ _c.Call.Return(_a0, _a1)
220181 return _c
221182 }
222183
223-func (_c *MockFolderRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockFolderRepository_GetAll_Call {
184+func (_c *MockFolderRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.Folder, error)) *MockFolderRepository_GetAll_Call {
224185 _c.Call.Return(run)
225186 return _c
226187 }
227188
228-// GetChildren provides a mock function for the type MockFolderRepository
229-func (_mock *MockFolderRepository) GetChildren(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error) {
230- ret := _mock.Called(ctx, parentID)
189+// GetChildren provides a mock function with given fields: ctx, parentID
190+func (_m *MockFolderRepository) GetChildren(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error) {
191+ ret := _m.Called(ctx, parentID)
231192
232193 if len(ret) == 0 {
233194 panic("no return value specified for GetChildren")
@@ -235,21 +196,23 @@ func (_mock *MockFolderRepository) GetChildren(ctx context.Context, parentID *en
235196
236197 var r0 []*entity.Folder
237198 var r1 error
238- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Folder, error)); ok {
239- return returnFunc(ctx, parentID)
199+ if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Folder, error)); ok {
200+ return rf(ctx, parentID)
240201 }
241- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Folder); ok {
242- r0 = returnFunc(ctx, parentID)
202+ if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Folder); ok {
203+ r0 = rf(ctx, parentID)
243204 } else {
244205 if ret.Get(0) != nil {
245206 r0 = ret.Get(0).([]*entity.Folder)
246207 }
247208 }
248- if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
249- r1 = returnFunc(ctx, parentID)
209+
210+ if rf, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok {
211+ r1 = rf(ctx, parentID)
250212 } else {
251213 r1 = ret.Error(1)
252214 }
215+
253216 return r0, r1
254217 }
255218
@@ -267,46 +230,36 @@ func (_e *MockFolderRepository_Expecter) GetChildren(ctx interface{}, parentID i
267230
268231 func (_c *MockFolderRepository_GetChildren_Call) Run(run func(ctx context.Context, parentID *entity.FolderID)) *MockFolderRepository_GetChildren_Call {
269232 _c.Call.Run(func(args mock.Arguments) {
270- var arg0 context.Context
271- if args[0] != nil {
272- arg0 = args[0].(context.Context)
273- }
274- var arg1 *entity.FolderID
275- if args[1] != nil {
276- arg1 = args[1].(*entity.FolderID)
277- }
278- run(
279- arg0,
280- arg1,
281- )
233+ run(args[0].(context.Context), args[1].(*entity.FolderID))
282234 })
283235 return _c
284236 }
285237
286-func (_c *MockFolderRepository_GetChildren_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetChildren_Call {
287- _c.Call.Return(folders, err)
238+func (_c *MockFolderRepository_GetChildren_Call) Return(_a0 []*entity.Folder, _a1 error) *MockFolderRepository_GetChildren_Call {
239+ _c.Call.Return(_a0, _a1)
288240 return _c
289241 }
290242
291-func (_c *MockFolderRepository_GetChildren_Call) RunAndReturn(run func(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error)) *MockFolderRepository_GetChildren_Call {
243+func (_c *MockFolderRepository_GetChildren_Call) RunAndReturn(run func(context.Context, *entity.FolderID) ([]*entity.Folder, error)) *MockFolderRepository_GetChildren_Call {
292244 _c.Call.Return(run)
293245 return _c
294246 }
295247
296-// Save provides a mock function for the type MockFolderRepository
297-func (_mock *MockFolderRepository) Save(ctx context.Context, folder *entity.Folder) error {
298- ret := _mock.Called(ctx, folder)
248+// Save provides a mock function with given fields: ctx, folder
249+func (_m *MockFolderRepository) Save(ctx context.Context, folder *entity.Folder) error {
250+ ret := _m.Called(ctx, folder)
299251
300252 if len(ret) == 0 {
301253 panic("no return value specified for Save")
302254 }
303255
304256 var r0 error
305- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Folder) error); ok {
306- r0 = returnFunc(ctx, folder)
257+ if rf, ok := ret.Get(0).(func(context.Context, *entity.Folder) error); ok {
258+ r0 = rf(ctx, folder)
307259 } else {
308260 r0 = ret.Error(0)
309261 }
262+
310263 return r0
311264 }
312265
@@ -324,46 +277,36 @@ func (_e *MockFolderRepository_Expecter) Save(ctx interface{}, folder interface{
324277
325278 func (_c *MockFolderRepository_Save_Call) Run(run func(ctx context.Context, folder *entity.Folder)) *MockFolderRepository_Save_Call {
326279 _c.Call.Run(func(args mock.Arguments) {
327- var arg0 context.Context
328- if args[0] != nil {
329- arg0 = args[0].(context.Context)
330- }
331- var arg1 *entity.Folder
332- if args[1] != nil {
333- arg1 = args[1].(*entity.Folder)
334- }
335- run(
336- arg0,
337- arg1,
338- )
280+ run(args[0].(context.Context), args[1].(*entity.Folder))
339281 })
340282 return _c
341283 }
342284
343-func (_c *MockFolderRepository_Save_Call) Return(err error) *MockFolderRepository_Save_Call {
344- _c.Call.Return(err)
285+func (_c *MockFolderRepository_Save_Call) Return(_a0 error) *MockFolderRepository_Save_Call {
286+ _c.Call.Return(_a0)
345287 return _c
346288 }
347289
348-func (_c *MockFolderRepository_Save_Call) RunAndReturn(run func(ctx context.Context, folder *entity.Folder) error) *MockFolderRepository_Save_Call {
290+func (_c *MockFolderRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.Folder) error) *MockFolderRepository_Save_Call {
349291 _c.Call.Return(run)
350292 return _c
351293 }
352294
353-// UpdatePosition provides a mock function for the type MockFolderRepository
354-func (_mock *MockFolderRepository) UpdatePosition(ctx context.Context, id entity.FolderID, position int) error {
355- ret := _mock.Called(ctx, id, position)
295+// UpdatePosition provides a mock function with given fields: ctx, id, position
296+func (_m *MockFolderRepository) UpdatePosition(ctx context.Context, id entity.FolderID, position int) error {
297+ ret := _m.Called(ctx, id, position)
356298
357299 if len(ret) == 0 {
358300 panic("no return value specified for UpdatePosition")
359301 }
360302
361303 var r0 error
362- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, int) error); ok {
363- r0 = returnFunc(ctx, id, position)
304+ if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID, int) error); ok {
305+ r0 = rf(ctx, id, position)
364306 } else {
365307 r0 = ret.Error(0)
366308 }
309+
367310 return r0
368311 }
369312
@@ -382,33 +325,31 @@ func (_e *MockFolderRepository_Expecter) UpdatePosition(ctx interface{}, id inte
382325
383326 func (_c *MockFolderRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FolderID, position int)) *MockFolderRepository_UpdatePosition_Call {
384327 _c.Call.Run(func(args mock.Arguments) {
385- var arg0 context.Context
386- if args[0] != nil {
387- arg0 = args[0].(context.Context)
388- }
389- var arg1 entity.FolderID
390- if args[1] != nil {
391- arg1 = args[1].(entity.FolderID)
392- }
393- var arg2 int
394- if args[2] != nil {
395- arg2 = args[2].(int)
396- }
397- run(
398- arg0,
399- arg1,
400- arg2,
401- )
328+ run(args[0].(context.Context), args[1].(entity.FolderID), args[2].(int))
402329 })
403330 return _c
404331 }
405332
406-func (_c *MockFolderRepository_UpdatePosition_Call) Return(err error) *MockFolderRepository_UpdatePosition_Call {
407- _c.Call.Return(err)
333+func (_c *MockFolderRepository_UpdatePosition_Call) Return(_a0 error) *MockFolderRepository_UpdatePosition_Call {
334+ _c.Call.Return(_a0)
408335 return _c
409336 }
410337
411-func (_c *MockFolderRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, position int) error) *MockFolderRepository_UpdatePosition_Call {
338+func (_c *MockFolderRepository_UpdatePosition_Call) RunAndReturn(run func(context.Context, entity.FolderID, int) error) *MockFolderRepository_UpdatePosition_Call {
412339 _c.Call.Return(run)
413340 return _c
414341 }
342+
343+// 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.
344+// The first argument is typically a *testing.T value.
345+func NewMockFolderRepository(t interface {
346+ mock.TestingT
347+ Cleanup(func())
348+}) *MockFolderRepository {
349+ mock := &MockFolderRepository{}
350+ mock.Mock.Test(t)
351+
352+ t.Cleanup(func() { mock.AssertExpectations(t) })
353+
354+ return mock
355+}
M internal/domain/repository/mocks/mock_history_repository.go +184 -303
@@ -1,30 +1,15 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
9- "time"
6+ context "context"
107
11- "github.com/bnema/dumber/internal/domain/entity"
8+ entity "github.com/bnema/dumber/internal/domain/entity"
129 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)
2310
24- t.Cleanup(func() { mock.AssertExpectations(t) })
25-
26- return mock
27-}
11+ time "time"
12+)
2813
2914 // MockHistoryRepository is an autogenerated mock type for the HistoryRepository type
3015 type MockHistoryRepository struct {
@@ -39,20 +24,21 @@ func (_m *MockHistoryRepository) EXPECT() *MockHistoryRepository_Expecter {
3924 return &MockHistoryRepository_Expecter{mock: &_m.Mock}
4025 }
4126
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)
27+// Delete provides a mock function with given fields: ctx, id
28+func (_m *MockHistoryRepository) Delete(ctx context.Context, id int64) error {
29+ ret := _m.Called(ctx, id)
4530
4631 if len(ret) == 0 {
4732 panic("no return value specified for Delete")
4833 }
4934
5035 var r0 error
51- if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok {
52- r0 = returnFunc(ctx, id)
36+ if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
37+ r0 = rf(ctx, id)
5338 } else {
5439 r0 = ret.Error(0)
5540 }
41+
5642 return r0
5743 }
5844
@@ -70,46 +56,36 @@ func (_e *MockHistoryRepository_Expecter) Delete(ctx interface{}, id interface{}
7056
7157 func (_c *MockHistoryRepository_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistoryRepository_Delete_Call {
7258 _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- )
59+ run(args[0].(context.Context), args[1].(int64))
8560 })
8661 return _c
8762 }
8863
89-func (_c *MockHistoryRepository_Delete_Call) Return(err error) *MockHistoryRepository_Delete_Call {
90- _c.Call.Return(err)
64+func (_c *MockHistoryRepository_Delete_Call) Return(_a0 error) *MockHistoryRepository_Delete_Call {
65+ _c.Call.Return(_a0)
9166 return _c
9267 }
9368
94-func (_c *MockHistoryRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistoryRepository_Delete_Call {
69+func (_c *MockHistoryRepository_Delete_Call) RunAndReturn(run func(context.Context, int64) error) *MockHistoryRepository_Delete_Call {
9570 _c.Call.Return(run)
9671 return _c
9772 }
9873
99-// DeleteAll provides a mock function for the type MockHistoryRepository
100-func (_mock *MockHistoryRepository) DeleteAll(ctx context.Context) error {
101- ret := _mock.Called(ctx)
74+// DeleteAll provides a mock function with given fields: ctx
75+func (_m *MockHistoryRepository) DeleteAll(ctx context.Context) error {
76+ ret := _m.Called(ctx)
10277
10378 if len(ret) == 0 {
10479 panic("no return value specified for DeleteAll")
10580 }
10681
10782 var r0 error
108- if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
109- r0 = returnFunc(ctx)
83+ if rf, ok := ret.Get(0).(func(context.Context) error); ok {
84+ r0 = rf(ctx)
11085 } else {
11186 r0 = ret.Error(0)
11287 }
88+
11389 return r0
11490 }
11591
@@ -126,41 +102,36 @@ func (_e *MockHistoryRepository_Expecter) DeleteAll(ctx interface{}) *MockHistor
126102
127103 func (_c *MockHistoryRepository_DeleteAll_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_DeleteAll_Call {
128104 _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- )
105+ run(args[0].(context.Context))
136106 })
137107 return _c
138108 }
139109
140-func (_c *MockHistoryRepository_DeleteAll_Call) Return(err error) *MockHistoryRepository_DeleteAll_Call {
141- _c.Call.Return(err)
110+func (_c *MockHistoryRepository_DeleteAll_Call) Return(_a0 error) *MockHistoryRepository_DeleteAll_Call {
111+ _c.Call.Return(_a0)
142112 return _c
143113 }
144114
145-func (_c *MockHistoryRepository_DeleteAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHistoryRepository_DeleteAll_Call {
115+func (_c *MockHistoryRepository_DeleteAll_Call) RunAndReturn(run func(context.Context) error) *MockHistoryRepository_DeleteAll_Call {
146116 _c.Call.Return(run)
147117 return _c
148118 }
149119
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)
120+// DeleteByDomain provides a mock function with given fields: ctx, domain
121+func (_m *MockHistoryRepository) DeleteByDomain(ctx context.Context, domain string) error {
122+ ret := _m.Called(ctx, domain)
153123
154124 if len(ret) == 0 {
155125 panic("no return value specified for DeleteByDomain")
156126 }
157127
158128 var r0 error
159- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
160- r0 = returnFunc(ctx, domain)
129+ if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
130+ r0 = rf(ctx, domain)
161131 } else {
162132 r0 = ret.Error(0)
163133 }
134+
164135 return r0
165136 }
166137
@@ -178,46 +149,36 @@ func (_e *MockHistoryRepository_Expecter) DeleteByDomain(ctx interface{}, domain
178149
179150 func (_c *MockHistoryRepository_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHistoryRepository_DeleteByDomain_Call {
180151 _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- )
152+ run(args[0].(context.Context), args[1].(string))
193153 })
194154 return _c
195155 }
196156
197-func (_c *MockHistoryRepository_DeleteByDomain_Call) Return(err error) *MockHistoryRepository_DeleteByDomain_Call {
198- _c.Call.Return(err)
157+func (_c *MockHistoryRepository_DeleteByDomain_Call) Return(_a0 error) *MockHistoryRepository_DeleteByDomain_Call {
158+ _c.Call.Return(_a0)
199159 return _c
200160 }
201161
202-func (_c *MockHistoryRepository_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHistoryRepository_DeleteByDomain_Call {
162+func (_c *MockHistoryRepository_DeleteByDomain_Call) RunAndReturn(run func(context.Context, string) error) *MockHistoryRepository_DeleteByDomain_Call {
203163 _c.Call.Return(run)
204164 return _c
205165 }
206166
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)
167+// DeleteOlderThan provides a mock function with given fields: ctx, before
168+func (_m *MockHistoryRepository) DeleteOlderThan(ctx context.Context, before time.Time) error {
169+ ret := _m.Called(ctx, before)
210170
211171 if len(ret) == 0 {
212172 panic("no return value specified for DeleteOlderThan")
213173 }
214174
215175 var r0 error
216- if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
217- r0 = returnFunc(ctx, before)
176+ if rf, ok := ret.Get(0).(func(context.Context, time.Time) error); ok {
177+ r0 = rf(ctx, before)
218178 } else {
219179 r0 = ret.Error(0)
220180 }
181+
221182 return r0
222183 }
223184
@@ -235,35 +196,24 @@ func (_e *MockHistoryRepository_Expecter) DeleteOlderThan(ctx interface{}, befor
235196
236197 func (_c *MockHistoryRepository_DeleteOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHistoryRepository_DeleteOlderThan_Call {
237198 _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- )
199+ run(args[0].(context.Context), args[1].(time.Time))
250200 })
251201 return _c
252202 }
253203
254-func (_c *MockHistoryRepository_DeleteOlderThan_Call) Return(err error) *MockHistoryRepository_DeleteOlderThan_Call {
255- _c.Call.Return(err)
204+func (_c *MockHistoryRepository_DeleteOlderThan_Call) Return(_a0 error) *MockHistoryRepository_DeleteOlderThan_Call {
205+ _c.Call.Return(_a0)
256206 return _c
257207 }
258208
259-func (_c *MockHistoryRepository_DeleteOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHistoryRepository_DeleteOlderThan_Call {
209+func (_c *MockHistoryRepository_DeleteOlderThan_Call) RunAndReturn(run func(context.Context, time.Time) error) *MockHistoryRepository_DeleteOlderThan_Call {
260210 _c.Call.Return(run)
261211 return _c
262212 }
263213
264-// FindByURL provides a mock function for the type MockHistoryRepository
265-func (_mock *MockHistoryRepository) FindByURL(ctx context.Context, url string) (*entity.HistoryEntry, error) {
266- ret := _mock.Called(ctx, url)
214+// FindByURL provides a mock function with given fields: ctx, url
215+func (_m *MockHistoryRepository) FindByURL(ctx context.Context, url string) (*entity.HistoryEntry, error) {
216+ ret := _m.Called(ctx, url)
267217
268218 if len(ret) == 0 {
269219 panic("no return value specified for FindByURL")
@@ -271,21 +221,23 @@ func (_mock *MockHistoryRepository) FindByURL(ctx context.Context, url string) (
271221
272222 var r0 *entity.HistoryEntry
273223 var r1 error
274- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.HistoryEntry, error)); ok {
275- return returnFunc(ctx, url)
224+ if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.HistoryEntry, error)); ok {
225+ return rf(ctx, url)
276226 }
277- if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.HistoryEntry); ok {
278- r0 = returnFunc(ctx, url)
227+ if rf, ok := ret.Get(0).(func(context.Context, string) *entity.HistoryEntry); ok {
228+ r0 = rf(ctx, url)
279229 } else {
280230 if ret.Get(0) != nil {
281231 r0 = ret.Get(0).(*entity.HistoryEntry)
282232 }
283233 }
284- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
285- r1 = returnFunc(ctx, url)
234+
235+ if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
236+ r1 = rf(ctx, url)
286237 } else {
287238 r1 = ret.Error(1)
288239 }
240+
289241 return r0, r1
290242 }
291243
@@ -303,35 +255,24 @@ func (_e *MockHistoryRepository_Expecter) FindByURL(ctx interface{}, url interfa
303255
304256 func (_c *MockHistoryRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_FindByURL_Call {
305257 _c.Call.Run(func(args mock.Arguments) {
306- var arg0 context.Context
307- if args[0] != nil {
308- arg0 = args[0].(context.Context)
309- }
310- var arg1 string
311- if args[1] != nil {
312- arg1 = args[1].(string)
313- }
314- run(
315- arg0,
316- arg1,
317- )
258+ run(args[0].(context.Context), args[1].(string))
318259 })
319260 return _c
320261 }
321262
322-func (_c *MockHistoryRepository_FindByURL_Call) Return(historyEntry *entity.HistoryEntry, err error) *MockHistoryRepository_FindByURL_Call {
323- _c.Call.Return(historyEntry, err)
263+func (_c *MockHistoryRepository_FindByURL_Call) Return(_a0 *entity.HistoryEntry, _a1 error) *MockHistoryRepository_FindByURL_Call {
264+ _c.Call.Return(_a0, _a1)
324265 return _c
325266 }
326267
327-func (_c *MockHistoryRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.HistoryEntry, error)) *MockHistoryRepository_FindByURL_Call {
268+func (_c *MockHistoryRepository_FindByURL_Call) RunAndReturn(run func(context.Context, string) (*entity.HistoryEntry, error)) *MockHistoryRepository_FindByURL_Call {
328269 _c.Call.Return(run)
329270 return _c
330271 }
331272
332-// GetDailyVisitCount provides a mock function for the type MockHistoryRepository
333-func (_mock *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error) {
334- ret := _mock.Called(ctx, daysAgo)
273+// GetDailyVisitCount provides a mock function with given fields: ctx, daysAgo
274+func (_m *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error) {
275+ ret := _m.Called(ctx, daysAgo)
335276
336277 if len(ret) == 0 {
337278 panic("no return value specified for GetDailyVisitCount")
@@ -339,21 +280,23 @@ func (_mock *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, days
339280
340281 var r0 []*entity.DailyVisitCount
341282 var r1 error
342- if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.DailyVisitCount, error)); ok {
343- return returnFunc(ctx, daysAgo)
283+ if rf, ok := ret.Get(0).(func(context.Context, string) ([]*entity.DailyVisitCount, error)); ok {
284+ return rf(ctx, daysAgo)
344285 }
345- if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.DailyVisitCount); ok {
346- r0 = returnFunc(ctx, daysAgo)
286+ if rf, ok := ret.Get(0).(func(context.Context, string) []*entity.DailyVisitCount); ok {
287+ r0 = rf(ctx, daysAgo)
347288 } else {
348289 if ret.Get(0) != nil {
349290 r0 = ret.Get(0).([]*entity.DailyVisitCount)
350291 }
351292 }
352- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
353- r1 = returnFunc(ctx, daysAgo)
293+
294+ if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
295+ r1 = rf(ctx, daysAgo)
354296 } else {
355297 r1 = ret.Error(1)
356298 }
299+
357300 return r0, r1
358301 }
359302
@@ -371,35 +314,24 @@ func (_e *MockHistoryRepository_Expecter) GetDailyVisitCount(ctx interface{}, da
371314
372315 func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Run(run func(ctx context.Context, daysAgo string)) *MockHistoryRepository_GetDailyVisitCount_Call {
373316 _c.Call.Run(func(args mock.Arguments) {
374- var arg0 context.Context
375- if args[0] != nil {
376- arg0 = args[0].(context.Context)
377- }
378- var arg1 string
379- if args[1] != nil {
380- arg1 = args[1].(string)
381- }
382- run(
383- arg0,
384- arg1,
385- )
317+ run(args[0].(context.Context), args[1].(string))
386318 })
387319 return _c
388320 }
389321
390-func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Return(dailyVisitCounts []*entity.DailyVisitCount, err error) *MockHistoryRepository_GetDailyVisitCount_Call {
391- _c.Call.Return(dailyVisitCounts, err)
322+func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Return(_a0 []*entity.DailyVisitCount, _a1 error) *MockHistoryRepository_GetDailyVisitCount_Call {
323+ _c.Call.Return(_a0, _a1)
392324 return _c
393325 }
394326
395-func (_c *MockHistoryRepository_GetDailyVisitCount_Call) RunAndReturn(run func(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error)) *MockHistoryRepository_GetDailyVisitCount_Call {
327+func (_c *MockHistoryRepository_GetDailyVisitCount_Call) RunAndReturn(run func(context.Context, string) ([]*entity.DailyVisitCount, error)) *MockHistoryRepository_GetDailyVisitCount_Call {
396328 _c.Call.Return(run)
397329 return _c
398330 }
399331
400-// GetDomainStats provides a mock function for the type MockHistoryRepository
401-func (_mock *MockHistoryRepository) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) {
402- ret := _mock.Called(ctx, limit)
332+// GetDomainStats provides a mock function with given fields: ctx, limit
333+func (_m *MockHistoryRepository) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) {
334+ ret := _m.Called(ctx, limit)
403335
404336 if len(ret) == 0 {
405337 panic("no return value specified for GetDomainStats")
@@ -407,21 +339,23 @@ func (_mock *MockHistoryRepository) GetDomainStats(ctx context.Context, limit in
407339
408340 var r0 []*entity.DomainStat
409341 var r1 error
410- if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok {
411- return returnFunc(ctx, limit)
342+ if rf, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok {
343+ return rf(ctx, limit)
412344 }
413- if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok {
414- r0 = returnFunc(ctx, limit)
345+ if rf, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok {
346+ r0 = rf(ctx, limit)
415347 } else {
416348 if ret.Get(0) != nil {
417349 r0 = ret.Get(0).([]*entity.DomainStat)
418350 }
419351 }
420- if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
421- r1 = returnFunc(ctx, limit)
352+
353+ if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
354+ r1 = rf(ctx, limit)
422355 } else {
423356 r1 = ret.Error(1)
424357 }
358+
425359 return r0, r1
426360 }
427361
@@ -439,35 +373,24 @@ func (_e *MockHistoryRepository_Expecter) GetDomainStats(ctx interface{}, limit
439373
440374 func (_c *MockHistoryRepository_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHistoryRepository_GetDomainStats_Call {
441375 _c.Call.Run(func(args mock.Arguments) {
442- var arg0 context.Context
443- if args[0] != nil {
444- arg0 = args[0].(context.Context)
445- }
446- var arg1 int
447- if args[1] != nil {
448- arg1 = args[1].(int)
449- }
450- run(
451- arg0,
452- arg1,
453- )
376+ run(args[0].(context.Context), args[1].(int))
454377 })
455378 return _c
456379 }
457380
458-func (_c *MockHistoryRepository_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHistoryRepository_GetDomainStats_Call {
459- _c.Call.Return(domainStats, err)
381+func (_c *MockHistoryRepository_GetDomainStats_Call) Return(_a0 []*entity.DomainStat, _a1 error) *MockHistoryRepository_GetDomainStats_Call {
382+ _c.Call.Return(_a0, _a1)
460383 return _c
461384 }
462385
463-func (_c *MockHistoryRepository_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHistoryRepository_GetDomainStats_Call {
386+func (_c *MockHistoryRepository_GetDomainStats_Call) RunAndReturn(run func(context.Context, int) ([]*entity.DomainStat, error)) *MockHistoryRepository_GetDomainStats_Call {
464387 _c.Call.Return(run)
465388 return _c
466389 }
467390
468-// GetHourlyDistribution provides a mock function for the type MockHistoryRepository
469-func (_mock *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ([]*entity.HourlyDistribution, error) {
470- ret := _mock.Called(ctx)
391+// GetHourlyDistribution provides a mock function with given fields: ctx
392+func (_m *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ([]*entity.HourlyDistribution, error) {
393+ ret := _m.Called(ctx)
471394
472395 if len(ret) == 0 {
473396 panic("no return value specified for GetHourlyDistribution")
@@ -475,21 +398,23 @@ func (_mock *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) (
475398
476399 var r0 []*entity.HourlyDistribution
477400 var r1 error
478- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HourlyDistribution, error)); ok {
479- return returnFunc(ctx)
401+ if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.HourlyDistribution, error)); ok {
402+ return rf(ctx)
480403 }
481- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HourlyDistribution); ok {
482- r0 = returnFunc(ctx)
404+ if rf, ok := ret.Get(0).(func(context.Context) []*entity.HourlyDistribution); ok {
405+ r0 = rf(ctx)
483406 } else {
484407 if ret.Get(0) != nil {
485408 r0 = ret.Get(0).([]*entity.HourlyDistribution)
486409 }
487410 }
488- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
489- r1 = returnFunc(ctx)
411+
412+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
413+ r1 = rf(ctx)
490414 } else {
491415 r1 = ret.Error(1)
492416 }
417+
493418 return r0, r1
494419 }
495420
@@ -506,30 +431,24 @@ func (_e *MockHistoryRepository_Expecter) GetHourlyDistribution(ctx interface{})
506431
507432 func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetHourlyDistribution_Call {
508433 _c.Call.Run(func(args mock.Arguments) {
509- var arg0 context.Context
510- if args[0] != nil {
511- arg0 = args[0].(context.Context)
512- }
513- run(
514- arg0,
515- )
434+ run(args[0].(context.Context))
516435 })
517436 return _c
518437 }
519438
520-func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Return(hourlyDistributions []*entity.HourlyDistribution, err error) *MockHistoryRepository_GetHourlyDistribution_Call {
521- _c.Call.Return(hourlyDistributions, err)
439+func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Return(_a0 []*entity.HourlyDistribution, _a1 error) *MockHistoryRepository_GetHourlyDistribution_Call {
440+ _c.Call.Return(_a0, _a1)
522441 return _c
523442 }
524443
525-func (_c *MockHistoryRepository_GetHourlyDistribution_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HourlyDistribution, error)) *MockHistoryRepository_GetHourlyDistribution_Call {
444+func (_c *MockHistoryRepository_GetHourlyDistribution_Call) RunAndReturn(run func(context.Context) ([]*entity.HourlyDistribution, error)) *MockHistoryRepository_GetHourlyDistribution_Call {
526445 _c.Call.Return(run)
527446 return _c
528447 }
529448
530-// GetRecent provides a mock function for the type MockHistoryRepository
531-func (_mock *MockHistoryRepository) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
532- ret := _mock.Called(ctx, limit, offset)
449+// GetRecent provides a mock function with given fields: ctx, limit, offset
450+func (_m *MockHistoryRepository) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) {
451+ ret := _m.Called(ctx, limit, offset)
533452
534453 if len(ret) == 0 {
535454 panic("no return value specified for GetRecent")
@@ -537,21 +456,23 @@ func (_mock *MockHistoryRepository) GetRecent(ctx context.Context, limit int, of
537456
538457 var r0 []*entity.HistoryEntry
539458 var r1 error
540- if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
541- return returnFunc(ctx, limit, offset)
459+ if rf, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok {
460+ return rf(ctx, limit, offset)
542461 }
543- if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
544- r0 = returnFunc(ctx, limit, offset)
462+ if rf, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok {
463+ r0 = rf(ctx, limit, offset)
545464 } else {
546465 if ret.Get(0) != nil {
547466 r0 = ret.Get(0).([]*entity.HistoryEntry)
548467 }
549468 }
550- if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
551- r1 = returnFunc(ctx, limit, offset)
469+
470+ if rf, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
471+ r1 = rf(ctx, limit, offset)
552472 } else {
553473 r1 = ret.Error(1)
554474 }
475+
555476 return r0, r1
556477 }
557478
@@ -570,40 +491,24 @@ func (_e *MockHistoryRepository_Expecter) GetRecent(ctx interface{}, limit inter
570491
571492 func (_c *MockHistoryRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistoryRepository_GetRecent_Call {
572493 _c.Call.Run(func(args mock.Arguments) {
573- var arg0 context.Context
574- if args[0] != nil {
575- arg0 = args[0].(context.Context)
576- }
577- var arg1 int
578- if args[1] != nil {
579- arg1 = args[1].(int)
580- }
581- var arg2 int
582- if args[2] != nil {
583- arg2 = args[2].(int)
584- }
585- run(
586- arg0,
587- arg1,
588- arg2,
589- )
494+ run(args[0].(context.Context), args[1].(int), args[2].(int))
590495 })
591496 return _c
592497 }
593498
594-func (_c *MockHistoryRepository_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecent_Call {
595- _c.Call.Return(historyEntrys, err)
499+func (_c *MockHistoryRepository_GetRecent_Call) Return(_a0 []*entity.HistoryEntry, _a1 error) *MockHistoryRepository_GetRecent_Call {
500+ _c.Call.Return(_a0, _a1)
596501 return _c
597502 }
598503
599-func (_c *MockHistoryRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecent_Call {
504+func (_c *MockHistoryRepository_GetRecent_Call) RunAndReturn(run func(context.Context, int, int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecent_Call {
600505 _c.Call.Return(run)
601506 return _c
602507 }
603508
604-// GetStats provides a mock function for the type MockHistoryRepository
605-func (_mock *MockHistoryRepository) GetStats(ctx context.Context) (*entity.HistoryStats, error) {
606- ret := _mock.Called(ctx)
509+// GetStats provides a mock function with given fields: ctx
510+func (_m *MockHistoryRepository) GetStats(ctx context.Context) (*entity.HistoryStats, error) {
511+ ret := _m.Called(ctx)
607512
608513 if len(ret) == 0 {
609514 panic("no return value specified for GetStats")
@@ -611,21 +516,23 @@ func (_mock *MockHistoryRepository) GetStats(ctx context.Context) (*entity.Histo
611516
612517 var r0 *entity.HistoryStats
613518 var r1 error
614- if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok {
615- return returnFunc(ctx)
519+ if rf, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok {
520+ return rf(ctx)
616521 }
617- if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok {
618- r0 = returnFunc(ctx)
522+ if rf, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok {
523+ r0 = rf(ctx)
619524 } else {
620525 if ret.Get(0) != nil {
621526 r0 = ret.Get(0).(*entity.HistoryStats)
622527 }
623528 }
624- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
625- r1 = returnFunc(ctx)
529+
530+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
531+ r1 = rf(ctx)
626532 } else {
627533 r1 = ret.Error(1)
628534 }
535+
629536 return r0, r1
630537 }
631538
@@ -642,41 +549,36 @@ func (_e *MockHistoryRepository_Expecter) GetStats(ctx interface{}) *MockHistory
642549
643550 func (_c *MockHistoryRepository_GetStats_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetStats_Call {
644551 _c.Call.Run(func(args mock.Arguments) {
645- var arg0 context.Context
646- if args[0] != nil {
647- arg0 = args[0].(context.Context)
648- }
649- run(
650- arg0,
651- )
552+ run(args[0].(context.Context))
652553 })
653554 return _c
654555 }
655556
656-func (_c *MockHistoryRepository_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHistoryRepository_GetStats_Call {
657- _c.Call.Return(historyStats, err)
557+func (_c *MockHistoryRepository_GetStats_Call) Return(_a0 *entity.HistoryStats, _a1 error) *MockHistoryRepository_GetStats_Call {
558+ _c.Call.Return(_a0, _a1)
658559 return _c
659560 }
660561
661-func (_c *MockHistoryRepository_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHistoryRepository_GetStats_Call {
562+func (_c *MockHistoryRepository_GetStats_Call) RunAndReturn(run func(context.Context) (*entity.HistoryStats, error)) *MockHistoryRepository_GetStats_Call {
662563 _c.Call.Return(run)
663564 return _c
664565 }
665566
666-// IncrementVisitCount provides a mock function for the type MockHistoryRepository
667-func (_mock *MockHistoryRepository) IncrementVisitCount(ctx context.Context, url string) error {
668- ret := _mock.Called(ctx, url)
567+// IncrementVisitCount provides a mock function with given fields: ctx, url
568+func (_m *MockHistoryRepository) IncrementVisitCount(ctx context.Context, url string) error {
569+ ret := _m.Called(ctx, url)
669570
670571 if len(ret) == 0 {
671572 panic("no return value specified for IncrementVisitCount")
672573 }
673574
674575 var r0 error
675- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
676- r0 = returnFunc(ctx, url)
576+ if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
577+ r0 = rf(ctx, url)
677578 } else {
678579 r0 = ret.Error(0)
679580 }
581+
680582 return r0
681583 }
682584
@@ -694,46 +596,36 @@ func (_e *MockHistoryRepository_Expecter) IncrementVisitCount(ctx interface{}, u
694596
695597 func (_c *MockHistoryRepository_IncrementVisitCount_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_IncrementVisitCount_Call {
696598 _c.Call.Run(func(args mock.Arguments) {
697- var arg0 context.Context
698- if args[0] != nil {
699- arg0 = args[0].(context.Context)
700- }
701- var arg1 string
702- if args[1] != nil {
703- arg1 = args[1].(string)
704- }
705- run(
706- arg0,
707- arg1,
708- )
599+ run(args[0].(context.Context), args[1].(string))
709600 })
710601 return _c
711602 }
712603
713-func (_c *MockHistoryRepository_IncrementVisitCount_Call) Return(err error) *MockHistoryRepository_IncrementVisitCount_Call {
714- _c.Call.Return(err)
604+func (_c *MockHistoryRepository_IncrementVisitCount_Call) Return(_a0 error) *MockHistoryRepository_IncrementVisitCount_Call {
605+ _c.Call.Return(_a0)
715606 return _c
716607 }
717608
718-func (_c *MockHistoryRepository_IncrementVisitCount_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockHistoryRepository_IncrementVisitCount_Call {
609+func (_c *MockHistoryRepository_IncrementVisitCount_Call) RunAndReturn(run func(context.Context, string) error) *MockHistoryRepository_IncrementVisitCount_Call {
719610 _c.Call.Return(run)
720611 return _c
721612 }
722613
723-// Save provides a mock function for the type MockHistoryRepository
724-func (_mock *MockHistoryRepository) Save(ctx context.Context, entry *entity.HistoryEntry) error {
725- ret := _mock.Called(ctx, entry)
614+// Save provides a mock function with given fields: ctx, entry
615+func (_m *MockHistoryRepository) Save(ctx context.Context, entry *entity.HistoryEntry) error {
616+ ret := _m.Called(ctx, entry)
726617
727618 if len(ret) == 0 {
728619 panic("no return value specified for Save")
729620 }
730621
731622 var r0 error
732- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.HistoryEntry) error); ok {
733- r0 = returnFunc(ctx, entry)
623+ if rf, ok := ret.Get(0).(func(context.Context, *entity.HistoryEntry) error); ok {
624+ r0 = rf(ctx, entry)
734625 } else {
735626 r0 = ret.Error(0)
736627 }
628+
737629 return r0
738630 }
739631
@@ -751,35 +643,24 @@ func (_e *MockHistoryRepository_Expecter) Save(ctx interface{}, entry interface{
751643
752644 func (_c *MockHistoryRepository_Save_Call) Run(run func(ctx context.Context, entry *entity.HistoryEntry)) *MockHistoryRepository_Save_Call {
753645 _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- var arg1 *entity.HistoryEntry
759- if args[1] != nil {
760- arg1 = args[1].(*entity.HistoryEntry)
761- }
762- run(
763- arg0,
764- arg1,
765- )
646+ run(args[0].(context.Context), args[1].(*entity.HistoryEntry))
766647 })
767648 return _c
768649 }
769650
770-func (_c *MockHistoryRepository_Save_Call) Return(err error) *MockHistoryRepository_Save_Call {
771- _c.Call.Return(err)
651+func (_c *MockHistoryRepository_Save_Call) Return(_a0 error) *MockHistoryRepository_Save_Call {
652+ _c.Call.Return(_a0)
772653 return _c
773654 }
774655
775-func (_c *MockHistoryRepository_Save_Call) RunAndReturn(run func(ctx context.Context, entry *entity.HistoryEntry) error) *MockHistoryRepository_Save_Call {
656+func (_c *MockHistoryRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.HistoryEntry) error) *MockHistoryRepository_Save_Call {
776657 _c.Call.Return(run)
777658 return _c
778659 }
779660
780-// Search provides a mock function for the type MockHistoryRepository
781-func (_mock *MockHistoryRepository) Search(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error) {
782- ret := _mock.Called(ctx, query, limit)
661+// Search provides a mock function with given fields: ctx, query, limit
662+func (_m *MockHistoryRepository) Search(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error) {
663+ ret := _m.Called(ctx, query, limit)
783664
784665 if len(ret) == 0 {
785666 panic("no return value specified for Search")
@@ -787,21 +668,23 @@ func (_mock *MockHistoryRepository) Search(ctx context.Context, query string, li
787668
788669 var r0 []entity.HistoryMatch
789670 var r1 error
790- if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]entity.HistoryMatch, error)); ok {
791- return returnFunc(ctx, query, limit)
671+ if rf, ok := ret.Get(0).(func(context.Context, string, int) ([]entity.HistoryMatch, error)); ok {
672+ return rf(ctx, query, limit)
792673 }
793- if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []entity.HistoryMatch); ok {
794- r0 = returnFunc(ctx, query, limit)
674+ if rf, ok := ret.Get(0).(func(context.Context, string, int) []entity.HistoryMatch); ok {
675+ r0 = rf(ctx, query, limit)
795676 } else {
796677 if ret.Get(0) != nil {
797678 r0 = ret.Get(0).([]entity.HistoryMatch)
798679 }
799680 }
800- if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok {
801- r1 = returnFunc(ctx, query, limit)
681+
682+ if rf, ok := ret.Get(1).(func(context.Context, string, int) error); ok {
683+ r1 = rf(ctx, query, limit)
802684 } else {
803685 r1 = ret.Error(1)
804686 }
687+
805688 return r0, r1
806689 }
807690
@@ -820,33 +703,31 @@ func (_e *MockHistoryRepository_Expecter) Search(ctx interface{}, query interfac
820703
821704 func (_c *MockHistoryRepository_Search_Call) Run(run func(ctx context.Context, query string, limit int)) *MockHistoryRepository_Search_Call {
822705 _c.Call.Run(func(args mock.Arguments) {
823- var arg0 context.Context
824- if args[0] != nil {
825- arg0 = args[0].(context.Context)
826- }
827- var arg1 string
828- if args[1] != nil {
829- arg1 = args[1].(string)
830- }
831- var arg2 int
832- if args[2] != nil {
833- arg2 = args[2].(int)
834- }
835- run(
836- arg0,
837- arg1,
838- arg2,
839- )
706+ run(args[0].(context.Context), args[1].(string), args[2].(int))
840707 })
841708 return _c
842709 }
843710
844-func (_c *MockHistoryRepository_Search_Call) Return(historyMatchs []entity.HistoryMatch, err error) *MockHistoryRepository_Search_Call {
845- _c.Call.Return(historyMatchs, err)
711+func (_c *MockHistoryRepository_Search_Call) Return(_a0 []entity.HistoryMatch, _a1 error) *MockHistoryRepository_Search_Call {
712+ _c.Call.Return(_a0, _a1)
846713 return _c
847714 }
848715
849-func (_c *MockHistoryRepository_Search_Call) RunAndReturn(run func(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error)) *MockHistoryRepository_Search_Call {
716+func (_c *MockHistoryRepository_Search_Call) RunAndReturn(run func(context.Context, string, int) ([]entity.HistoryMatch, error)) *MockHistoryRepository_Search_Call {
850717 _c.Call.Return(run)
851718 return _c
852719 }
720+
721+// 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.
722+// The first argument is typically a *testing.T value.
723+func NewMockHistoryRepository(t interface {
724+ mock.TestingT
725+ Cleanup(func())
726+}) *MockHistoryRepository {
727+ mock := &MockHistoryRepository{}
728+ mock.Mock.Test(t)
729+
730+ t.Cleanup(func() { mock.AssertExpectations(t) })
731+
732+ return mock
733+}
M internal/domain/repository/mocks/mock_tag_repository.go +117 -200
@@ -1,30 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
10- "github.com/bnema/dumber/internal/domain/entity"
8+ entity "github.com/bnema/dumber/internal/domain/entity"
119 mock "github.com/stretchr/testify/mock"
1210 )
1311
14-// 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.
15-// The first argument is typically a *testing.T value.
16-func NewMockTagRepository(t interface {
17- mock.TestingT
18- Cleanup(func())
19-}) *MockTagRepository {
20- mock := &MockTagRepository{}
21- mock.Mock.Test(t)
22-
23- t.Cleanup(func() { mock.AssertExpectations(t) })
24-
25- return mock
26-}
27-
2812 // MockTagRepository is an autogenerated mock type for the TagRepository type
2913 type MockTagRepository struct {
3014 mock.Mock
@@ -38,20 +22,21 @@ func (_m *MockTagRepository) EXPECT() *MockTagRepository_Expecter {
3822 return &MockTagRepository_Expecter{mock: &_m.Mock}
3923 }
4024
41-// AssignToFavorite provides a mock function for the type MockTagRepository
42-func (_mock *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
43- ret := _mock.Called(ctx, tagID, favID)
25+// AssignToFavorite provides a mock function with given fields: ctx, tagID, favID
26+func (_m *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
27+ ret := _m.Called(ctx, tagID, favID)
4428
4529 if len(ret) == 0 {
4630 panic("no return value specified for AssignToFavorite")
4731 }
4832
4933 var r0 error
50- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
51- r0 = returnFunc(ctx, tagID, favID)
34+ if rf, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
35+ r0 = rf(ctx, tagID, favID)
5236 } else {
5337 r0 = ret.Error(0)
5438 }
39+
5540 return r0
5641 }
5742
@@ -70,51 +55,36 @@ func (_e *MockTagRepository_Expecter) AssignToFavorite(ctx interface{}, tagID in
7055
7156 func (_c *MockTagRepository_AssignToFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_AssignToFavorite_Call {
7257 _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.TagID
78- if args[1] != nil {
79- arg1 = args[1].(entity.TagID)
80- }
81- var arg2 entity.FavoriteID
82- if args[2] != nil {
83- arg2 = args[2].(entity.FavoriteID)
84- }
85- run(
86- arg0,
87- arg1,
88- arg2,
89- )
58+ run(args[0].(context.Context), args[1].(entity.TagID), args[2].(entity.FavoriteID))
9059 })
9160 return _c
9261 }
9362
94-func (_c *MockTagRepository_AssignToFavorite_Call) Return(err error) *MockTagRepository_AssignToFavorite_Call {
95- _c.Call.Return(err)
63+func (_c *MockTagRepository_AssignToFavorite_Call) Return(_a0 error) *MockTagRepository_AssignToFavorite_Call {
64+ _c.Call.Return(_a0)
9665 return _c
9766 }
9867
99-func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call {
68+func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(context.Context, entity.TagID, entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call {
10069 _c.Call.Return(run)
10170 return _c
10271 }
10372
104-// Delete provides a mock function for the type MockTagRepository
105-func (_mock *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error {
106- ret := _mock.Called(ctx, id)
73+// Delete provides a mock function with given fields: ctx, id
74+func (_m *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error {
75+ ret := _m.Called(ctx, id)
10776
10877 if len(ret) == 0 {
10978 panic("no return value specified for Delete")
11079 }
11180
11281 var r0 error
113- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok {
114- r0 = returnFunc(ctx, id)
82+ if rf, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok {
83+ r0 = rf(ctx, id)
11584 } else {
11685 r0 = ret.Error(0)
11786 }
87+
11888 return r0
11989 }
12090
@@ -132,35 +102,24 @@ func (_e *MockTagRepository_Expecter) Delete(ctx interface{}, id interface{}) *M
132102
133103 func (_c *MockTagRepository_Delete_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_Delete_Call {
134104 _c.Call.Run(func(args mock.Arguments) {
135- var arg0 context.Context
136- if args[0] != nil {
137- arg0 = args[0].(context.Context)
138- }
139- var arg1 entity.TagID
140- if args[1] != nil {
141- arg1 = args[1].(entity.TagID)
142- }
143- run(
144- arg0,
145- arg1,
146- )
105+ run(args[0].(context.Context), args[1].(entity.TagID))
147106 })
148107 return _c
149108 }
150109
151-func (_c *MockTagRepository_Delete_Call) Return(err error) *MockTagRepository_Delete_Call {
152- _c.Call.Return(err)
110+func (_c *MockTagRepository_Delete_Call) Return(_a0 error) *MockTagRepository_Delete_Call {
111+ _c.Call.Return(_a0)
153112 return _c
154113 }
155114
156-func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockTagRepository_Delete_Call {
115+func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(context.Context, entity.TagID) error) *MockTagRepository_Delete_Call {
157116 _c.Call.Return(run)
158117 return _c
159118 }
160119
161-// FindByID provides a mock function for the type MockTagRepository
162-func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) {
163- ret := _mock.Called(ctx, id)
120+// FindByID provides a mock function with given fields: ctx, id
121+func (_m *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) {
122+ ret := _m.Called(ctx, id)
164123
165124 if len(ret) == 0 {
166125 panic("no return value specified for FindByID")
@@ -168,21 +127,23 @@ func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (
168127
169128 var r0 *entity.Tag
170129 var r1 error
171- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok {
172- return returnFunc(ctx, id)
130+ if rf, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok {
131+ return rf(ctx, id)
173132 }
174- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok {
175- r0 = returnFunc(ctx, id)
133+ if rf, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok {
134+ r0 = rf(ctx, id)
176135 } else {
177136 if ret.Get(0) != nil {
178137 r0 = ret.Get(0).(*entity.Tag)
179138 }
180139 }
181- if returnFunc, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok {
182- r1 = returnFunc(ctx, id)
140+
141+ if rf, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok {
142+ r1 = rf(ctx, id)
183143 } else {
184144 r1 = ret.Error(1)
185145 }
146+
186147 return r0, r1
187148 }
188149
@@ -200,35 +161,24 @@ func (_e *MockTagRepository_Expecter) FindByID(ctx interface{}, id interface{})
200161
201162 func (_c *MockTagRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_FindByID_Call {
202163 _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 entity.TagID
208- if args[1] != nil {
209- arg1 = args[1].(entity.TagID)
210- }
211- run(
212- arg0,
213- arg1,
214- )
164+ run(args[0].(context.Context), args[1].(entity.TagID))
215165 })
216166 return _c
217167 }
218168
219-func (_c *MockTagRepository_FindByID_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByID_Call {
220- _c.Call.Return(tag, err)
169+func (_c *MockTagRepository_FindByID_Call) Return(_a0 *entity.Tag, _a1 error) *MockTagRepository_FindByID_Call {
170+ _c.Call.Return(_a0, _a1)
221171 return _c
222172 }
223173
224-func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call {
174+func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(context.Context, entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call {
225175 _c.Call.Return(run)
226176 return _c
227177 }
228178
229-// FindByName provides a mock function for the type MockTagRepository
230-func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) {
231- ret := _mock.Called(ctx, name)
179+// FindByName provides a mock function with given fields: ctx, name
180+func (_m *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) {
181+ ret := _m.Called(ctx, name)
232182
233183 if len(ret) == 0 {
234184 panic("no return value specified for FindByName")
@@ -236,21 +186,23 @@ func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*e
236186
237187 var r0 *entity.Tag
238188 var r1 error
239- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok {
240- return returnFunc(ctx, name)
189+ if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok {
190+ return rf(ctx, name)
241191 }
242- if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok {
243- r0 = returnFunc(ctx, name)
192+ if rf, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok {
193+ r0 = rf(ctx, name)
244194 } else {
245195 if ret.Get(0) != nil {
246196 r0 = ret.Get(0).(*entity.Tag)
247197 }
248198 }
249- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
250- r1 = returnFunc(ctx, name)
199+
200+ if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
201+ r1 = rf(ctx, name)
251202 } else {
252203 r1 = ret.Error(1)
253204 }
205+
254206 return r0, r1
255207 }
256208
@@ -268,35 +220,24 @@ func (_e *MockTagRepository_Expecter) FindByName(ctx interface{}, name interface
268220
269221 func (_c *MockTagRepository_FindByName_Call) Run(run func(ctx context.Context, name string)) *MockTagRepository_FindByName_Call {
270222 _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- run(
280- arg0,
281- arg1,
282- )
223+ run(args[0].(context.Context), args[1].(string))
283224 })
284225 return _c
285226 }
286227
287-func (_c *MockTagRepository_FindByName_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByName_Call {
288- _c.Call.Return(tag, err)
228+func (_c *MockTagRepository_FindByName_Call) Return(_a0 *entity.Tag, _a1 error) *MockTagRepository_FindByName_Call {
229+ _c.Call.Return(_a0, _a1)
289230 return _c
290231 }
291232
292-func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(ctx context.Context, name string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call {
233+func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(context.Context, string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call {
293234 _c.Call.Return(run)
294235 return _c
295236 }
296237
297-// GetAll provides a mock function for the type MockTagRepository
298-func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) {
299- ret := _mock.Called(ctx)
238+// GetAll provides a mock function with given fields: ctx
239+func (_m *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) {
240+ ret := _m.Called(ctx)
300241
301242 if len(ret) == 0 {
302243 panic("no return value specified for GetAll")
@@ -304,21 +245,23 @@ func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, erro
304245
305246 var r0 []*entity.Tag
306247 var r1 error
307- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok {
308- return returnFunc(ctx)
248+ if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok {
249+ return rf(ctx)
309250 }
310- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok {
311- r0 = returnFunc(ctx)
251+ if rf, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok {
252+ r0 = rf(ctx)
312253 } else {
313254 if ret.Get(0) != nil {
314255 r0 = ret.Get(0).([]*entity.Tag)
315256 }
316257 }
317- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
318- r1 = returnFunc(ctx)
258+
259+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
260+ r1 = rf(ctx)
319261 } else {
320262 r1 = ret.Error(1)
321263 }
264+
322265 return r0, r1
323266 }
324267
@@ -335,30 +278,24 @@ func (_e *MockTagRepository_Expecter) GetAll(ctx interface{}) *MockTagRepository
335278
336279 func (_c *MockTagRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockTagRepository_GetAll_Call {
337280 _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- run(
343- arg0,
344- )
281+ run(args[0].(context.Context))
345282 })
346283 return _c
347284 }
348285
349-func (_c *MockTagRepository_GetAll_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetAll_Call {
350- _c.Call.Return(tags, err)
286+func (_c *MockTagRepository_GetAll_Call) Return(_a0 []*entity.Tag, _a1 error) *MockTagRepository_GetAll_Call {
287+ _c.Call.Return(_a0, _a1)
351288 return _c
352289 }
353290
354-func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call {
291+func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call {
355292 _c.Call.Return(run)
356293 return _c
357294 }
358295
359-// GetForFavorite provides a mock function for the type MockTagRepository
360-func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) {
361- ret := _mock.Called(ctx, favID)
296+// GetForFavorite provides a mock function with given fields: ctx, favID
297+func (_m *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) {
298+ ret := _m.Called(ctx, favID)
362299
363300 if len(ret) == 0 {
364301 panic("no return value specified for GetForFavorite")
@@ -366,21 +303,23 @@ func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity
366303
367304 var r0 []*entity.Tag
368305 var r1 error
369- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok {
370- return returnFunc(ctx, favID)
306+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok {
307+ return rf(ctx, favID)
371308 }
372- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok {
373- r0 = returnFunc(ctx, favID)
309+ if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok {
310+ r0 = rf(ctx, favID)
374311 } else {
375312 if ret.Get(0) != nil {
376313 r0 = ret.Get(0).([]*entity.Tag)
377314 }
378315 }
379- if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
380- r1 = returnFunc(ctx, favID)
316+
317+ if rf, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok {
318+ r1 = rf(ctx, favID)
381319 } else {
382320 r1 = ret.Error(1)
383321 }
322+
384323 return r0, r1
385324 }
386325
@@ -398,46 +337,36 @@ func (_e *MockTagRepository_Expecter) GetForFavorite(ctx interface{}, favID inte
398337
399338 func (_c *MockTagRepository_GetForFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID)) *MockTagRepository_GetForFavorite_Call {
400339 _c.Call.Run(func(args mock.Arguments) {
401- var arg0 context.Context
402- if args[0] != nil {
403- arg0 = args[0].(context.Context)
404- }
405- var arg1 entity.FavoriteID
406- if args[1] != nil {
407- arg1 = args[1].(entity.FavoriteID)
408- }
409- run(
410- arg0,
411- arg1,
412- )
340+ run(args[0].(context.Context), args[1].(entity.FavoriteID))
413341 })
414342 return _c
415343 }
416344
417-func (_c *MockTagRepository_GetForFavorite_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetForFavorite_Call {
418- _c.Call.Return(tags, err)
345+func (_c *MockTagRepository_GetForFavorite_Call) Return(_a0 []*entity.Tag, _a1 error) *MockTagRepository_GetForFavorite_Call {
346+ _c.Call.Return(_a0, _a1)
419347 return _c
420348 }
421349
422-func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call {
350+func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call {
423351 _c.Call.Return(run)
424352 return _c
425353 }
426354
427-// RemoveFromFavorite provides a mock function for the type MockTagRepository
428-func (_mock *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
429- ret := _mock.Called(ctx, tagID, favID)
355+// RemoveFromFavorite provides a mock function with given fields: ctx, tagID, favID
356+func (_m *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error {
357+ ret := _m.Called(ctx, tagID, favID)
430358
431359 if len(ret) == 0 {
432360 panic("no return value specified for RemoveFromFavorite")
433361 }
434362
435363 var r0 error
436- if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
437- r0 = returnFunc(ctx, tagID, favID)
364+ if rf, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok {
365+ r0 = rf(ctx, tagID, favID)
438366 } else {
439367 r0 = ret.Error(0)
440368 }
369+
441370 return r0
442371 }
443372
@@ -456,51 +385,36 @@ func (_e *MockTagRepository_Expecter) RemoveFromFavorite(ctx interface{}, tagID
456385
457386 func (_c *MockTagRepository_RemoveFromFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_RemoveFromFavorite_Call {
458387 _c.Call.Run(func(args mock.Arguments) {
459- var arg0 context.Context
460- if args[0] != nil {
461- arg0 = args[0].(context.Context)
462- }
463- var arg1 entity.TagID
464- if args[1] != nil {
465- arg1 = args[1].(entity.TagID)
466- }
467- var arg2 entity.FavoriteID
468- if args[2] != nil {
469- arg2 = args[2].(entity.FavoriteID)
470- }
471- run(
472- arg0,
473- arg1,
474- arg2,
475- )
388+ run(args[0].(context.Context), args[1].(entity.TagID), args[2].(entity.FavoriteID))
476389 })
477390 return _c
478391 }
479392
480-func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(err error) *MockTagRepository_RemoveFromFavorite_Call {
481- _c.Call.Return(err)
393+func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(_a0 error) *MockTagRepository_RemoveFromFavorite_Call {
394+ _c.Call.Return(_a0)
482395 return _c
483396 }
484397
485-func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call {
398+func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(context.Context, entity.TagID, entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call {
486399 _c.Call.Return(run)
487400 return _c
488401 }
489402
490-// Save provides a mock function for the type MockTagRepository
491-func (_mock *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error {
492- ret := _mock.Called(ctx, tag)
403+// Save provides a mock function with given fields: ctx, tag
404+func (_m *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error {
405+ ret := _m.Called(ctx, tag)
493406
494407 if len(ret) == 0 {
495408 panic("no return value specified for Save")
496409 }
497410
498411 var r0 error
499- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok {
500- r0 = returnFunc(ctx, tag)
412+ if rf, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok {
413+ r0 = rf(ctx, tag)
501414 } else {
502415 r0 = ret.Error(0)
503416 }
417+
504418 return r0
505419 }
506420
@@ -518,28 +432,31 @@ func (_e *MockTagRepository_Expecter) Save(ctx interface{}, tag interface{}) *Mo
518432
519433 func (_c *MockTagRepository_Save_Call) Run(run func(ctx context.Context, tag *entity.Tag)) *MockTagRepository_Save_Call {
520434 _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.Tag
526- if args[1] != nil {
527- arg1 = args[1].(*entity.Tag)
528- }
529- run(
530- arg0,
531- arg1,
532- )
435+ run(args[0].(context.Context), args[1].(*entity.Tag))
533436 })
534437 return _c
535438 }
536439
537-func (_c *MockTagRepository_Save_Call) Return(err error) *MockTagRepository_Save_Call {
538- _c.Call.Return(err)
440+func (_c *MockTagRepository_Save_Call) Return(_a0 error) *MockTagRepository_Save_Call {
441+ _c.Call.Return(_a0)
539442 return _c
540443 }
541444
542-func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(ctx context.Context, tag *entity.Tag) error) *MockTagRepository_Save_Call {
445+func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.Tag) error) *MockTagRepository_Save_Call {
543446 _c.Call.Return(run)
544447 return _c
545448 }
449+
450+// 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.
451+// The first argument is typically a *testing.T value.
452+func NewMockTagRepository(t interface {
453+ mock.TestingT
454+ Cleanup(func())
455+}) *MockTagRepository {
456+ mock := &MockTagRepository{}
457+ mock.Mock.Test(t)
458+
459+ t.Cleanup(func() { mock.AssertExpectations(t) })
460+
461+ return mock
462+}
M internal/domain/repository/mocks/mock_zoom_repository.go +67 -102
@@ -1,30 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "context"
6+ context "context"
97
10- "github.com/bnema/dumber/internal/domain/entity"
8+ entity "github.com/bnema/dumber/internal/domain/entity"
119 mock "github.com/stretchr/testify/mock"
1210 )
1311
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-
2812 // MockZoomRepository is an autogenerated mock type for the ZoomRepository type
2913 type MockZoomRepository struct {
3014 mock.Mock
@@ -38,20 +22,21 @@ func (_m *MockZoomRepository) EXPECT() *MockZoomRepository_Expecter {
3822 return &MockZoomRepository_Expecter{mock: &_m.Mock}
3923 }
4024
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)
25+// Delete provides a mock function with given fields: ctx, domain
26+func (_m *MockZoomRepository) Delete(ctx context.Context, domain string) error {
27+ ret := _m.Called(ctx, domain)
4428
4529 if len(ret) == 0 {
4630 panic("no return value specified for Delete")
4731 }
4832
4933 var r0 error
50- if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
51- r0 = returnFunc(ctx, domain)
34+ if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
35+ r0 = rf(ctx, domain)
5236 } else {
5337 r0 = ret.Error(0)
5438 }
39+
5540 return r0
5641 }
5742
@@ -69,35 +54,24 @@ func (_e *MockZoomRepository_Expecter) Delete(ctx interface{}, domain interface{
6954
7055 func (_c *MockZoomRepository_Delete_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Delete_Call {
7156 _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- )
57+ run(args[0].(context.Context), args[1].(string))
8458 })
8559 return _c
8660 }
8761
88-func (_c *MockZoomRepository_Delete_Call) Return(err error) *MockZoomRepository_Delete_Call {
89- _c.Call.Return(err)
62+func (_c *MockZoomRepository_Delete_Call) Return(_a0 error) *MockZoomRepository_Delete_Call {
63+ _c.Call.Return(_a0)
9064 return _c
9165 }
9266
93-func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockZoomRepository_Delete_Call {
67+func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(context.Context, string) error) *MockZoomRepository_Delete_Call {
9468 _c.Call.Return(run)
9569 return _c
9670 }
9771
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)
72+// Get provides a mock function with given fields: ctx, domain
73+func (_m *MockZoomRepository) Get(ctx context.Context, domain string) (*entity.ZoomLevel, error) {
74+ ret := _m.Called(ctx, domain)
10175
10276 if len(ret) == 0 {
10377 panic("no return value specified for Get")
@@ -105,21 +79,23 @@ func (_mock *MockZoomRepository) Get(ctx context.Context, domain string) (*entit
10579
10680 var r0 *entity.ZoomLevel
10781 var r1 error
108- if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok {
109- return returnFunc(ctx, domain)
82+ if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok {
83+ return rf(ctx, domain)
11084 }
111- if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok {
112- r0 = returnFunc(ctx, domain)
85+ if rf, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok {
86+ r0 = rf(ctx, domain)
11387 } else {
11488 if ret.Get(0) != nil {
11589 r0 = ret.Get(0).(*entity.ZoomLevel)
11690 }
11791 }
118- if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
119- r1 = returnFunc(ctx, domain)
92+
93+ if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
94+ r1 = rf(ctx, domain)
12095 } else {
12196 r1 = ret.Error(1)
12297 }
98+
12399 return r0, r1
124100 }
125101
@@ -137,35 +113,24 @@ func (_e *MockZoomRepository_Expecter) Get(ctx interface{}, domain interface{})
137113
138114 func (_c *MockZoomRepository_Get_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Get_Call {
139115 _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- )
116+ run(args[0].(context.Context), args[1].(string))
152117 })
153118 return _c
154119 }
155120
156-func (_c *MockZoomRepository_Get_Call) Return(zoomLevel *entity.ZoomLevel, err error) *MockZoomRepository_Get_Call {
157- _c.Call.Return(zoomLevel, err)
121+func (_c *MockZoomRepository_Get_Call) Return(_a0 *entity.ZoomLevel, _a1 error) *MockZoomRepository_Get_Call {
122+ _c.Call.Return(_a0, _a1)
158123 return _c
159124 }
160125
161-func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call {
126+func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(context.Context, string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call {
162127 _c.Call.Return(run)
163128 return _c
164129 }
165130
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)
131+// GetAll provides a mock function with given fields: ctx
132+func (_m *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLevel, error) {
133+ ret := _m.Called(ctx)
169134
170135 if len(ret) == 0 {
171136 panic("no return value specified for GetAll")
@@ -173,21 +138,23 @@ func (_mock *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLeve
173138
174139 var r0 []*entity.ZoomLevel
175140 var r1 error
176- if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok {
177- return returnFunc(ctx)
141+ if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok {
142+ return rf(ctx)
178143 }
179- if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok {
180- r0 = returnFunc(ctx)
144+ if rf, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok {
145+ r0 = rf(ctx)
181146 } else {
182147 if ret.Get(0) != nil {
183148 r0 = ret.Get(0).([]*entity.ZoomLevel)
184149 }
185150 }
186- if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
187- r1 = returnFunc(ctx)
151+
152+ if rf, ok := ret.Get(1).(func(context.Context) error); ok {
153+ r1 = rf(ctx)
188154 } else {
189155 r1 = ret.Error(1)
190156 }
157+
191158 return r0, r1
192159 }
193160
@@ -204,41 +171,36 @@ func (_e *MockZoomRepository_Expecter) GetAll(ctx interface{}) *MockZoomReposito
204171
205172 func (_c *MockZoomRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockZoomRepository_GetAll_Call {
206173 _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- )
174+ run(args[0].(context.Context))
214175 })
215176 return _c
216177 }
217178
218-func (_c *MockZoomRepository_GetAll_Call) Return(zoomLevels []*entity.ZoomLevel, err error) *MockZoomRepository_GetAll_Call {
219- _c.Call.Return(zoomLevels, err)
179+func (_c *MockZoomRepository_GetAll_Call) Return(_a0 []*entity.ZoomLevel, _a1 error) *MockZoomRepository_GetAll_Call {
180+ _c.Call.Return(_a0, _a1)
220181 return _c
221182 }
222183
223-func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call {
184+func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call {
224185 _c.Call.Return(run)
225186 return _c
226187 }
227188
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)
189+// Set provides a mock function with given fields: ctx, level
190+func (_m *MockZoomRepository) Set(ctx context.Context, level *entity.ZoomLevel) error {
191+ ret := _m.Called(ctx, level)
231192
232193 if len(ret) == 0 {
233194 panic("no return value specified for Set")
234195 }
235196
236197 var r0 error
237- if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok {
238- r0 = returnFunc(ctx, level)
198+ if rf, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok {
199+ r0 = rf(ctx, level)
239200 } else {
240201 r0 = ret.Error(0)
241202 }
203+
242204 return r0
243205 }
244206
@@ -256,28 +218,31 @@ func (_e *MockZoomRepository_Expecter) Set(ctx interface{}, level interface{}) *
256218
257219 func (_c *MockZoomRepository_Set_Call) Run(run func(ctx context.Context, level *entity.ZoomLevel)) *MockZoomRepository_Set_Call {
258220 _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- )
221+ run(args[0].(context.Context), args[1].(*entity.ZoomLevel))
271222 })
272223 return _c
273224 }
274225
275-func (_c *MockZoomRepository_Set_Call) Return(err error) *MockZoomRepository_Set_Call {
276- _c.Call.Return(err)
226+func (_c *MockZoomRepository_Set_Call) Return(_a0 error) *MockZoomRepository_Set_Call {
227+ _c.Call.Return(_a0)
277228 return _c
278229 }
279230
280-func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(ctx context.Context, level *entity.ZoomLevel) error) *MockZoomRepository_Set_Call {
231+func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(context.Context, *entity.ZoomLevel) error) *MockZoomRepository_Set_Call {
281232 _c.Call.Return(run)
282233 return _c
283234 }
235+
236+// 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.
237+// The first argument is typically a *testing.T value.
238+func NewMockZoomRepository(t interface {
239+ mock.TestingT
240+ Cleanup(func())
241+}) *MockZoomRepository {
242+ mock := &MockZoomRepository{}
243+ mock.Mock.Test(t)
244+
245+ t.Cleanup(func() { mock.AssertExpectations(t) })
246+
247+ return mock
248+}
M internal/ui/layout/mocks/mock_box_widget.go +254 -409
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// NewMockBoxWidget creates a new instance of MockBoxWidget. 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 NewMockBoxWidget(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockBoxWidget {
19- mock := &MockBoxWidget{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockBoxWidget is an autogenerated mock type for the BoxWidget type
2813 type MockBoxWidget struct {
2914 mock.Mock
@@ -37,10 +22,9 @@ func (_m *MockBoxWidget) EXPECT() *MockBoxWidget_Expecter {
3722 return &MockBoxWidget_Expecter{mock: &_m.Mock}
3823 }
3924
40-// AddController provides a mock function for the type MockBoxWidget
41-func (_mock *MockBoxWidget) AddController(controller *gtk.EventController) {
42- _mock.Called(controller)
43- return
25+// AddController provides a mock function with given fields: controller
26+func (_m *MockBoxWidget) AddController(controller *gtk.EventController) {
27+ _m.Called(controller)
4428 }
4529
4630 // MockBoxWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController'
@@ -56,13 +40,7 @@ func (_e *MockBoxWidget_Expecter) AddController(controller interface{}) *MockBox
5640
5741 func (_c *MockBoxWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockBoxWidget_AddController_Call {
5842 _c.Call.Run(func(args mock.Arguments) {
59- var arg0 *gtk.EventController
60- if args[0] != nil {
61- arg0 = args[0].(*gtk.EventController)
62- }
63- run(
64- arg0,
65- )
43+ run(args[0].(*gtk.EventController))
6644 })
6745 return _c
6846 }
@@ -72,15 +50,14 @@ func (_c *MockBoxWidget_AddController_Call) Return() *MockBoxWidget_AddControlle
7250 return _c
7351 }
7452
75-func (_c *MockBoxWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockBoxWidget_AddController_Call {
53+func (_c *MockBoxWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockBoxWidget_AddController_Call {
7654 _c.Run(run)
7755 return _c
7856 }
7957
80-// AddCssClass provides a mock function for the type MockBoxWidget
81-func (_mock *MockBoxWidget) AddCssClass(cssClass string) {
82- _mock.Called(cssClass)
83- return
58+// AddCssClass provides a mock function with given fields: cssClass
59+func (_m *MockBoxWidget) AddCssClass(cssClass string) {
60+ _m.Called(cssClass)
8461 }
8562
8663 // MockBoxWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass'
@@ -96,13 +73,7 @@ func (_e *MockBoxWidget_Expecter) AddCssClass(cssClass interface{}) *MockBoxWidg
9673
9774 func (_c *MockBoxWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockBoxWidget_AddCssClass_Call {
9875 _c.Call.Run(func(args mock.Arguments) {
99- var arg0 string
100- if args[0] != nil {
101- arg0 = args[0].(string)
102- }
103- run(
104- arg0,
105- )
76+ run(args[0].(string))
10677 })
10778 return _c
10879 }
@@ -112,15 +83,14 @@ func (_c *MockBoxWidget_AddCssClass_Call) Return() *MockBoxWidget_AddCssClass_Ca
11283 return _c
11384 }
11485
115-func (_c *MockBoxWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockBoxWidget_AddCssClass_Call {
86+func (_c *MockBoxWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockBoxWidget_AddCssClass_Call {
11687 _c.Run(run)
11788 return _c
11889 }
11990
120-// Append provides a mock function for the type MockBoxWidget
121-func (_mock *MockBoxWidget) Append(child layout.Widget) {
122- _mock.Called(child)
123- return
91+// Append provides a mock function with given fields: child
92+func (_m *MockBoxWidget) Append(child layout.Widget) {
93+ _m.Called(child)
12494 }
12595
12696 // MockBoxWidget_Append_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Append'
@@ -136,13 +106,7 @@ func (_e *MockBoxWidget_Expecter) Append(child interface{}) *MockBoxWidget_Appen
136106
137107 func (_c *MockBoxWidget_Append_Call) Run(run func(child layout.Widget)) *MockBoxWidget_Append_Call {
138108 _c.Call.Run(func(args mock.Arguments) {
139- var arg0 layout.Widget
140- if args[0] != nil {
141- arg0 = args[0].(layout.Widget)
142- }
143- run(
144- arg0,
145- )
109+ run(args[0].(layout.Widget))
146110 })
147111 return _c
148112 }
@@ -152,14 +116,14 @@ func (_c *MockBoxWidget_Append_Call) Return() *MockBoxWidget_Append_Call {
152116 return _c
153117 }
154118
155-func (_c *MockBoxWidget_Append_Call) RunAndReturn(run func(child layout.Widget)) *MockBoxWidget_Append_Call {
119+func (_c *MockBoxWidget_Append_Call) RunAndReturn(run func(layout.Widget)) *MockBoxWidget_Append_Call {
156120 _c.Run(run)
157121 return _c
158122 }
159123
160-// ComputePoint provides a mock function for the type MockBoxWidget
161-func (_mock *MockBoxWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
162- ret := _mock.Called(target)
124+// ComputePoint provides a mock function with given fields: target
125+func (_m *MockBoxWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
126+ ret := _m.Called(target)
163127
164128 if len(ret) == 0 {
165129 panic("no return value specified for ComputePoint")
@@ -168,24 +132,27 @@ func (_mock *MockBoxWidget) ComputePoint(target layout.Widget) (float64, float64
168132 var r0 float64
169133 var r1 float64
170134 var r2 bool
171- if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
172- return returnFunc(target)
135+ if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
136+ return rf(target)
173137 }
174- if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok {
175- r0 = returnFunc(target)
138+ if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok {
139+ r0 = rf(target)
176140 } else {
177141 r0 = ret.Get(0).(float64)
178142 }
179- if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok {
180- r1 = returnFunc(target)
143+
144+ if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok {
145+ r1 = rf(target)
181146 } else {
182147 r1 = ret.Get(1).(float64)
183148 }
184- if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok {
185- r2 = returnFunc(target)
149+
150+ if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok {
151+ r2 = rf(target)
186152 } else {
187153 r2 = ret.Get(2).(bool)
188154 }
155+
189156 return r0, r1, r2
190157 }
191158
@@ -202,13 +169,7 @@ func (_e *MockBoxWidget_Expecter) ComputePoint(target interface{}) *MockBoxWidge
202169
203170 func (_c *MockBoxWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockBoxWidget_ComputePoint_Call {
204171 _c.Call.Run(func(args mock.Arguments) {
205- var arg0 layout.Widget
206- if args[0] != nil {
207- arg0 = args[0].(layout.Widget)
208- }
209- run(
210- arg0,
211- )
172+ run(args[0].(layout.Widget))
212173 })
213174 return _c
214175 }
@@ -218,25 +179,26 @@ func (_c *MockBoxWidget_ComputePoint_Call) Return(x float64, y float64, ok bool)
218179 return _c
219180 }
220181
221-func (_c *MockBoxWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockBoxWidget_ComputePoint_Call {
182+func (_c *MockBoxWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockBoxWidget_ComputePoint_Call {
222183 _c.Call.Return(run)
223184 return _c
224185 }
225186
226-// GetAllocatedHeight provides a mock function for the type MockBoxWidget
227-func (_mock *MockBoxWidget) GetAllocatedHeight() int {
228- ret := _mock.Called()
187+// GetAllocatedHeight provides a mock function with no fields
188+func (_m *MockBoxWidget) GetAllocatedHeight() int {
189+ ret := _m.Called()
229190
230191 if len(ret) == 0 {
231192 panic("no return value specified for GetAllocatedHeight")
232193 }
233194
234195 var r0 int
235- if returnFunc, ok := ret.Get(0).(func() int); ok {
236- r0 = returnFunc()
196+ if rf, ok := ret.Get(0).(func() int); ok {
197+ r0 = rf()
237198 } else {
238199 r0 = ret.Get(0).(int)
239200 }
201+
240202 return r0
241203 }
242204
@@ -257,8 +219,8 @@ func (_c *MockBoxWidget_GetAllocatedHeight_Call) Run(run func()) *MockBoxWidget_
257219 return _c
258220 }
259221
260-func (_c *MockBoxWidget_GetAllocatedHeight_Call) Return(n int) *MockBoxWidget_GetAllocatedHeight_Call {
261- _c.Call.Return(n)
222+func (_c *MockBoxWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockBoxWidget_GetAllocatedHeight_Call {
223+ _c.Call.Return(_a0)
262224 return _c
263225 }
264226
@@ -267,20 +229,21 @@ func (_c *MockBoxWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) *M
267229 return _c
268230 }
269231
270-// GetAllocatedWidth provides a mock function for the type MockBoxWidget
271-func (_mock *MockBoxWidget) GetAllocatedWidth() int {
272- ret := _mock.Called()
232+// GetAllocatedWidth provides a mock function with no fields
233+func (_m *MockBoxWidget) GetAllocatedWidth() int {
234+ ret := _m.Called()
273235
274236 if len(ret) == 0 {
275237 panic("no return value specified for GetAllocatedWidth")
276238 }
277239
278240 var r0 int
279- if returnFunc, ok := ret.Get(0).(func() int); ok {
280- r0 = returnFunc()
241+ if rf, ok := ret.Get(0).(func() int); ok {
242+ r0 = rf()
281243 } else {
282244 r0 = ret.Get(0).(int)
283245 }
246+
284247 return r0
285248 }
286249
@@ -301,8 +264,8 @@ func (_c *MockBoxWidget_GetAllocatedWidth_Call) Run(run func()) *MockBoxWidget_G
301264 return _c
302265 }
303266
304-func (_c *MockBoxWidget_GetAllocatedWidth_Call) Return(n int) *MockBoxWidget_GetAllocatedWidth_Call {
305- _c.Call.Return(n)
267+func (_c *MockBoxWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockBoxWidget_GetAllocatedWidth_Call {
268+ _c.Call.Return(_a0)
306269 return _c
307270 }
308271
@@ -311,20 +274,21 @@ func (_c *MockBoxWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) *Mo
311274 return _c
312275 }
313276
314-// GetHexpand provides a mock function for the type MockBoxWidget
315-func (_mock *MockBoxWidget) GetHexpand() bool {
316- ret := _mock.Called()
277+// GetHexpand provides a mock function with no fields
278+func (_m *MockBoxWidget) GetHexpand() bool {
279+ ret := _m.Called()
317280
318281 if len(ret) == 0 {
319282 panic("no return value specified for GetHexpand")
320283 }
321284
322285 var r0 bool
323- if returnFunc, ok := ret.Get(0).(func() bool); ok {
324- r0 = returnFunc()
286+ if rf, ok := ret.Get(0).(func() bool); ok {
287+ r0 = rf()
325288 } else {
326289 r0 = ret.Get(0).(bool)
327290 }
291+
328292 return r0
329293 }
330294
@@ -345,8 +309,8 @@ func (_c *MockBoxWidget_GetHexpand_Call) Run(run func()) *MockBoxWidget_GetHexpa
345309 return _c
346310 }
347311
348-func (_c *MockBoxWidget_GetHexpand_Call) Return(b bool) *MockBoxWidget_GetHexpand_Call {
349- _c.Call.Return(b)
312+func (_c *MockBoxWidget_GetHexpand_Call) Return(_a0 bool) *MockBoxWidget_GetHexpand_Call {
313+ _c.Call.Return(_a0)
350314 return _c
351315 }
352316
@@ -355,20 +319,21 @@ func (_c *MockBoxWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockBoxW
355319 return _c
356320 }
357321
358-// GetHomogeneous provides a mock function for the type MockBoxWidget
359-func (_mock *MockBoxWidget) GetHomogeneous() bool {
360- ret := _mock.Called()
322+// GetHomogeneous provides a mock function with no fields
323+func (_m *MockBoxWidget) GetHomogeneous() bool {
324+ ret := _m.Called()
361325
362326 if len(ret) == 0 {
363327 panic("no return value specified for GetHomogeneous")
364328 }
365329
366330 var r0 bool
367- if returnFunc, ok := ret.Get(0).(func() bool); ok {
368- r0 = returnFunc()
331+ if rf, ok := ret.Get(0).(func() bool); ok {
332+ r0 = rf()
369333 } else {
370334 r0 = ret.Get(0).(bool)
371335 }
336+
372337 return r0
373338 }
374339
@@ -389,8 +354,8 @@ func (_c *MockBoxWidget_GetHomogeneous_Call) Run(run func()) *MockBoxWidget_GetH
389354 return _c
390355 }
391356
392-func (_c *MockBoxWidget_GetHomogeneous_Call) Return(b bool) *MockBoxWidget_GetHomogeneous_Call {
393- _c.Call.Return(b)
357+func (_c *MockBoxWidget_GetHomogeneous_Call) Return(_a0 bool) *MockBoxWidget_GetHomogeneous_Call {
358+ _c.Call.Return(_a0)
394359 return _c
395360 }
396361
@@ -399,20 +364,21 @@ func (_c *MockBoxWidget_GetHomogeneous_Call) RunAndReturn(run func() bool) *Mock
399364 return _c
400365 }
401366
402-// GetOrientation provides a mock function for the type MockBoxWidget
403-func (_mock *MockBoxWidget) GetOrientation() layout.Orientation {
404- ret := _mock.Called()
367+// GetOrientation provides a mock function with no fields
368+func (_m *MockBoxWidget) GetOrientation() gtk.Orientation {
369+ ret := _m.Called()
405370
406371 if len(ret) == 0 {
407372 panic("no return value specified for GetOrientation")
408373 }
409374
410- var r0 layout.Orientation
411- if returnFunc, ok := ret.Get(0).(func() layout.Orientation); ok {
412- r0 = returnFunc()
375+ var r0 gtk.Orientation
376+ if rf, ok := ret.Get(0).(func() gtk.Orientation); ok {
377+ r0 = rf()
413378 } else {
414- r0 = ret.Get(0).(layout.Orientation)
379+ r0 = ret.Get(0).(gtk.Orientation)
415380 }
381+
416382 return r0
417383 }
418384
@@ -433,32 +399,33 @@ func (_c *MockBoxWidget_GetOrientation_Call) Run(run func()) *MockBoxWidget_GetO
433399 return _c
434400 }
435401
436-func (_c *MockBoxWidget_GetOrientation_Call) Return(v layout.Orientation) *MockBoxWidget_GetOrientation_Call {
437- _c.Call.Return(v)
402+func (_c *MockBoxWidget_GetOrientation_Call) Return(_a0 gtk.Orientation) *MockBoxWidget_GetOrientation_Call {
403+ _c.Call.Return(_a0)
438404 return _c
439405 }
440406
441-func (_c *MockBoxWidget_GetOrientation_Call) RunAndReturn(run func() layout.Orientation) *MockBoxWidget_GetOrientation_Call {
407+func (_c *MockBoxWidget_GetOrientation_Call) RunAndReturn(run func() gtk.Orientation) *MockBoxWidget_GetOrientation_Call {
442408 _c.Call.Return(run)
443409 return _c
444410 }
445411
446-// GetParent provides a mock function for the type MockBoxWidget
447-func (_mock *MockBoxWidget) GetParent() layout.Widget {
448- ret := _mock.Called()
412+// GetParent provides a mock function with no fields
413+func (_m *MockBoxWidget) GetParent() layout.Widget {
414+ ret := _m.Called()
449415
450416 if len(ret) == 0 {
451417 panic("no return value specified for GetParent")
452418 }
453419
454420 var r0 layout.Widget
455- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
456- r0 = returnFunc()
421+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
422+ r0 = rf()
457423 } else {
458424 if ret.Get(0) != nil {
459425 r0 = ret.Get(0).(layout.Widget)
460426 }
461427 }
428+
462429 return r0
463430 }
464431
@@ -479,8 +446,8 @@ func (_c *MockBoxWidget_GetParent_Call) Run(run func()) *MockBoxWidget_GetParent
479446 return _c
480447 }
481448
482-func (_c *MockBoxWidget_GetParent_Call) Return(widget layout.Widget) *MockBoxWidget_GetParent_Call {
483- _c.Call.Return(widget)
449+func (_c *MockBoxWidget_GetParent_Call) Return(_a0 layout.Widget) *MockBoxWidget_GetParent_Call {
450+ _c.Call.Return(_a0)
484451 return _c
485452 }
486453
@@ -489,20 +456,21 @@ func (_c *MockBoxWidget_GetParent_Call) RunAndReturn(run func() layout.Widget) *
489456 return _c
490457 }
491458
492-// GetSpacing provides a mock function for the type MockBoxWidget
493-func (_mock *MockBoxWidget) GetSpacing() int {
494- ret := _mock.Called()
459+// GetSpacing provides a mock function with no fields
460+func (_m *MockBoxWidget) GetSpacing() int {
461+ ret := _m.Called()
495462
496463 if len(ret) == 0 {
497464 panic("no return value specified for GetSpacing")
498465 }
499466
500467 var r0 int
501- if returnFunc, ok := ret.Get(0).(func() int); ok {
502- r0 = returnFunc()
468+ if rf, ok := ret.Get(0).(func() int); ok {
469+ r0 = rf()
503470 } else {
504471 r0 = ret.Get(0).(int)
505472 }
473+
506474 return r0
507475 }
508476
@@ -523,8 +491,8 @@ func (_c *MockBoxWidget_GetSpacing_Call) Run(run func()) *MockBoxWidget_GetSpaci
523491 return _c
524492 }
525493
526-func (_c *MockBoxWidget_GetSpacing_Call) Return(n int) *MockBoxWidget_GetSpacing_Call {
527- _c.Call.Return(n)
494+func (_c *MockBoxWidget_GetSpacing_Call) Return(_a0 int) *MockBoxWidget_GetSpacing_Call {
495+ _c.Call.Return(_a0)
528496 return _c
529497 }
530498
@@ -533,20 +501,21 @@ func (_c *MockBoxWidget_GetSpacing_Call) RunAndReturn(run func() int) *MockBoxWi
533501 return _c
534502 }
535503
536-// GetVexpand provides a mock function for the type MockBoxWidget
537-func (_mock *MockBoxWidget) GetVexpand() bool {
538- ret := _mock.Called()
504+// GetVexpand provides a mock function with no fields
505+func (_m *MockBoxWidget) GetVexpand() bool {
506+ ret := _m.Called()
539507
540508 if len(ret) == 0 {
541509 panic("no return value specified for GetVexpand")
542510 }
543511
544512 var r0 bool
545- if returnFunc, ok := ret.Get(0).(func() bool); ok {
546- r0 = returnFunc()
513+ if rf, ok := ret.Get(0).(func() bool); ok {
514+ r0 = rf()
547515 } else {
548516 r0 = ret.Get(0).(bool)
549517 }
518+
550519 return r0
551520 }
552521
@@ -567,8 +536,8 @@ func (_c *MockBoxWidget_GetVexpand_Call) Run(run func()) *MockBoxWidget_GetVexpa
567536 return _c
568537 }
569538
570-func (_c *MockBoxWidget_GetVexpand_Call) Return(b bool) *MockBoxWidget_GetVexpand_Call {
571- _c.Call.Return(b)
539+func (_c *MockBoxWidget_GetVexpand_Call) Return(_a0 bool) *MockBoxWidget_GetVexpand_Call {
540+ _c.Call.Return(_a0)
572541 return _c
573542 }
574543
@@ -577,20 +546,21 @@ func (_c *MockBoxWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockBoxW
577546 return _c
578547 }
579548
580-// GrabFocus provides a mock function for the type MockBoxWidget
581-func (_mock *MockBoxWidget) GrabFocus() bool {
582- ret := _mock.Called()
549+// GrabFocus provides a mock function with no fields
550+func (_m *MockBoxWidget) GrabFocus() bool {
551+ ret := _m.Called()
583552
584553 if len(ret) == 0 {
585554 panic("no return value specified for GrabFocus")
586555 }
587556
588557 var r0 bool
589- if returnFunc, ok := ret.Get(0).(func() bool); ok {
590- r0 = returnFunc()
558+ if rf, ok := ret.Get(0).(func() bool); ok {
559+ r0 = rf()
591560 } else {
592561 r0 = ret.Get(0).(bool)
593562 }
563+
594564 return r0
595565 }
596566
@@ -611,8 +581,8 @@ func (_c *MockBoxWidget_GrabFocus_Call) Run(run func()) *MockBoxWidget_GrabFocus
611581 return _c
612582 }
613583
614-func (_c *MockBoxWidget_GrabFocus_Call) Return(b bool) *MockBoxWidget_GrabFocus_Call {
615- _c.Call.Return(b)
584+func (_c *MockBoxWidget_GrabFocus_Call) Return(_a0 bool) *MockBoxWidget_GrabFocus_Call {
585+ _c.Call.Return(_a0)
616586 return _c
617587 }
618588
@@ -621,22 +591,23 @@ func (_c *MockBoxWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockBoxWi
621591 return _c
622592 }
623593
624-// GtkWidget provides a mock function for the type MockBoxWidget
625-func (_mock *MockBoxWidget) GtkWidget() *gtk.Widget {
626- ret := _mock.Called()
594+// GtkWidget provides a mock function with no fields
595+func (_m *MockBoxWidget) GtkWidget() *gtk.Widget {
596+ ret := _m.Called()
627597
628598 if len(ret) == 0 {
629599 panic("no return value specified for GtkWidget")
630600 }
631601
632602 var r0 *gtk.Widget
633- if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok {
634- r0 = returnFunc()
603+ if rf, ok := ret.Get(0).(func() *gtk.Widget); ok {
604+ r0 = rf()
635605 } else {
636606 if ret.Get(0) != nil {
637607 r0 = ret.Get(0).(*gtk.Widget)
638608 }
639609 }
610+
640611 return r0
641612 }
642613
@@ -657,8 +628,8 @@ func (_c *MockBoxWidget_GtkWidget_Call) Run(run func()) *MockBoxWidget_GtkWidget
657628 return _c
658629 }
659630
660-func (_c *MockBoxWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockBoxWidget_GtkWidget_Call {
661- _c.Call.Return(widget)
631+func (_c *MockBoxWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockBoxWidget_GtkWidget_Call {
632+ _c.Call.Return(_a0)
662633 return _c
663634 }
664635
@@ -667,20 +638,21 @@ func (_c *MockBoxWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) *Mo
667638 return _c
668639 }
669640
670-// HasCssClass provides a mock function for the type MockBoxWidget
671-func (_mock *MockBoxWidget) HasCssClass(cssClass string) bool {
672- ret := _mock.Called(cssClass)
641+// HasCssClass provides a mock function with given fields: cssClass
642+func (_m *MockBoxWidget) HasCssClass(cssClass string) bool {
643+ ret := _m.Called(cssClass)
673644
674645 if len(ret) == 0 {
675646 panic("no return value specified for HasCssClass")
676647 }
677648
678649 var r0 bool
679- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
680- r0 = returnFunc(cssClass)
650+ if rf, ok := ret.Get(0).(func(string) bool); ok {
651+ r0 = rf(cssClass)
681652 } else {
682653 r0 = ret.Get(0).(bool)
683654 }
655+
684656 return r0
685657 }
686658
@@ -697,41 +669,36 @@ func (_e *MockBoxWidget_Expecter) HasCssClass(cssClass interface{}) *MockBoxWidg
697669
698670 func (_c *MockBoxWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockBoxWidget_HasCssClass_Call {
699671 _c.Call.Run(func(args mock.Arguments) {
700- var arg0 string
701- if args[0] != nil {
702- arg0 = args[0].(string)
703- }
704- run(
705- arg0,
706- )
672+ run(args[0].(string))
707673 })
708674 return _c
709675 }
710676
711-func (_c *MockBoxWidget_HasCssClass_Call) Return(b bool) *MockBoxWidget_HasCssClass_Call {
712- _c.Call.Return(b)
677+func (_c *MockBoxWidget_HasCssClass_Call) Return(_a0 bool) *MockBoxWidget_HasCssClass_Call {
678+ _c.Call.Return(_a0)
713679 return _c
714680 }
715681
716-func (_c *MockBoxWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockBoxWidget_HasCssClass_Call {
682+func (_c *MockBoxWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockBoxWidget_HasCssClass_Call {
717683 _c.Call.Return(run)
718684 return _c
719685 }
720686
721-// HasFocus provides a mock function for the type MockBoxWidget
722-func (_mock *MockBoxWidget) HasFocus() bool {
723- ret := _mock.Called()
687+// HasFocus provides a mock function with no fields
688+func (_m *MockBoxWidget) HasFocus() bool {
689+ ret := _m.Called()
724690
725691 if len(ret) == 0 {
726692 panic("no return value specified for HasFocus")
727693 }
728694
729695 var r0 bool
730- if returnFunc, ok := ret.Get(0).(func() bool); ok {
731- r0 = returnFunc()
696+ if rf, ok := ret.Get(0).(func() bool); ok {
697+ r0 = rf()
732698 } else {
733699 r0 = ret.Get(0).(bool)
734700 }
701+
735702 return r0
736703 }
737704
@@ -752,8 +719,8 @@ func (_c *MockBoxWidget_HasFocus_Call) Run(run func()) *MockBoxWidget_HasFocus_C
752719 return _c
753720 }
754721
755-func (_c *MockBoxWidget_HasFocus_Call) Return(b bool) *MockBoxWidget_HasFocus_Call {
756- _c.Call.Return(b)
722+func (_c *MockBoxWidget_HasFocus_Call) Return(_a0 bool) *MockBoxWidget_HasFocus_Call {
723+ _c.Call.Return(_a0)
757724 return _c
758725 }
759726
@@ -762,10 +729,9 @@ func (_c *MockBoxWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockBoxWid
762729 return _c
763730 }
764731
765-// Hide provides a mock function for the type MockBoxWidget
766-func (_mock *MockBoxWidget) Hide() {
767- _mock.Called()
768- return
732+// Hide provides a mock function with no fields
733+func (_m *MockBoxWidget) Hide() {
734+ _m.Called()
769735 }
770736
771737 // MockBoxWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
@@ -795,10 +761,9 @@ func (_c *MockBoxWidget_Hide_Call) RunAndReturn(run func()) *MockBoxWidget_Hide_
795761 return _c
796762 }
797763
798-// InsertChildAfter provides a mock function for the type MockBoxWidget
799-func (_mock *MockBoxWidget) InsertChildAfter(child layout.Widget, sibling layout.Widget) {
800- _mock.Called(child, sibling)
801- return
764+// InsertChildAfter provides a mock function with given fields: child, sibling
765+func (_m *MockBoxWidget) InsertChildAfter(child layout.Widget, sibling layout.Widget) {
766+ _m.Called(child, sibling)
802767 }
803768
804769 // MockBoxWidget_InsertChildAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertChildAfter'
@@ -815,18 +780,7 @@ func (_e *MockBoxWidget_Expecter) InsertChildAfter(child interface{}, sibling in
815780
816781 func (_c *MockBoxWidget_InsertChildAfter_Call) Run(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_InsertChildAfter_Call {
817782 _c.Call.Run(func(args mock.Arguments) {
818- var arg0 layout.Widget
819- if args[0] != nil {
820- arg0 = args[0].(layout.Widget)
821- }
822- var arg1 layout.Widget
823- if args[1] != nil {
824- arg1 = args[1].(layout.Widget)
825- }
826- run(
827- arg0,
828- arg1,
829- )
783+ run(args[0].(layout.Widget), args[1].(layout.Widget))
830784 })
831785 return _c
832786 }
@@ -836,25 +790,26 @@ func (_c *MockBoxWidget_InsertChildAfter_Call) Return() *MockBoxWidget_InsertChi
836790 return _c
837791 }
838792
839-func (_c *MockBoxWidget_InsertChildAfter_Call) RunAndReturn(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_InsertChildAfter_Call {
793+func (_c *MockBoxWidget_InsertChildAfter_Call) RunAndReturn(run func(layout.Widget, layout.Widget)) *MockBoxWidget_InsertChildAfter_Call {
840794 _c.Run(run)
841795 return _c
842796 }
843797
844-// IsVisible provides a mock function for the type MockBoxWidget
845-func (_mock *MockBoxWidget) IsVisible() bool {
846- ret := _mock.Called()
798+// IsVisible provides a mock function with no fields
799+func (_m *MockBoxWidget) IsVisible() bool {
800+ ret := _m.Called()
847801
848802 if len(ret) == 0 {
849803 panic("no return value specified for IsVisible")
850804 }
851805
852806 var r0 bool
853- if returnFunc, ok := ret.Get(0).(func() bool); ok {
854- r0 = returnFunc()
807+ if rf, ok := ret.Get(0).(func() bool); ok {
808+ r0 = rf()
855809 } else {
856810 r0 = ret.Get(0).(bool)
857811 }
812+
858813 return r0
859814 }
860815
@@ -875,8 +830,8 @@ func (_c *MockBoxWidget_IsVisible_Call) Run(run func()) *MockBoxWidget_IsVisible
875830 return _c
876831 }
877832
878-func (_c *MockBoxWidget_IsVisible_Call) Return(b bool) *MockBoxWidget_IsVisible_Call {
879- _c.Call.Return(b)
833+func (_c *MockBoxWidget_IsVisible_Call) Return(_a0 bool) *MockBoxWidget_IsVisible_Call {
834+ _c.Call.Return(_a0)
880835 return _c
881836 }
882837
@@ -885,10 +840,9 @@ func (_c *MockBoxWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockBoxWi
885840 return _c
886841 }
887842
888-// Prepend provides a mock function for the type MockBoxWidget
889-func (_mock *MockBoxWidget) Prepend(child layout.Widget) {
890- _mock.Called(child)
891- return
843+// Prepend provides a mock function with given fields: child
844+func (_m *MockBoxWidget) Prepend(child layout.Widget) {
845+ _m.Called(child)
892846 }
893847
894848 // MockBoxWidget_Prepend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prepend'
@@ -904,13 +858,7 @@ func (_e *MockBoxWidget_Expecter) Prepend(child interface{}) *MockBoxWidget_Prep
904858
905859 func (_c *MockBoxWidget_Prepend_Call) Run(run func(child layout.Widget)) *MockBoxWidget_Prepend_Call {
906860 _c.Call.Run(func(args mock.Arguments) {
907- var arg0 layout.Widget
908- if args[0] != nil {
909- arg0 = args[0].(layout.Widget)
910- }
911- run(
912- arg0,
913- )
861+ run(args[0].(layout.Widget))
914862 })
915863 return _c
916864 }
@@ -920,15 +868,14 @@ func (_c *MockBoxWidget_Prepend_Call) Return() *MockBoxWidget_Prepend_Call {
920868 return _c
921869 }
922870
923-func (_c *MockBoxWidget_Prepend_Call) RunAndReturn(run func(child layout.Widget)) *MockBoxWidget_Prepend_Call {
871+func (_c *MockBoxWidget_Prepend_Call) RunAndReturn(run func(layout.Widget)) *MockBoxWidget_Prepend_Call {
924872 _c.Run(run)
925873 return _c
926874 }
927875
928-// Remove provides a mock function for the type MockBoxWidget
929-func (_mock *MockBoxWidget) Remove(child layout.Widget) {
930- _mock.Called(child)
931- return
876+// Remove provides a mock function with given fields: child
877+func (_m *MockBoxWidget) Remove(child layout.Widget) {
878+ _m.Called(child)
932879 }
933880
934881 // MockBoxWidget_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
@@ -944,13 +891,7 @@ func (_e *MockBoxWidget_Expecter) Remove(child interface{}) *MockBoxWidget_Remov
944891
945892 func (_c *MockBoxWidget_Remove_Call) Run(run func(child layout.Widget)) *MockBoxWidget_Remove_Call {
946893 _c.Call.Run(func(args mock.Arguments) {
947- var arg0 layout.Widget
948- if args[0] != nil {
949- arg0 = args[0].(layout.Widget)
950- }
951- run(
952- arg0,
953- )
894+ run(args[0].(layout.Widget))
954895 })
955896 return _c
956897 }
@@ -960,15 +901,14 @@ func (_c *MockBoxWidget_Remove_Call) Return() *MockBoxWidget_Remove_Call {
960901 return _c
961902 }
962903
963-func (_c *MockBoxWidget_Remove_Call) RunAndReturn(run func(child layout.Widget)) *MockBoxWidget_Remove_Call {
904+func (_c *MockBoxWidget_Remove_Call) RunAndReturn(run func(layout.Widget)) *MockBoxWidget_Remove_Call {
964905 _c.Run(run)
965906 return _c
966907 }
967908
968-// RemoveCssClass provides a mock function for the type MockBoxWidget
969-func (_mock *MockBoxWidget) RemoveCssClass(cssClass string) {
970- _mock.Called(cssClass)
971- return
909+// RemoveCssClass provides a mock function with given fields: cssClass
910+func (_m *MockBoxWidget) RemoveCssClass(cssClass string) {
911+ _m.Called(cssClass)
972912 }
973913
974914 // MockBoxWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass'
@@ -984,13 +924,7 @@ func (_e *MockBoxWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockBoxW
984924
985925 func (_c *MockBoxWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockBoxWidget_RemoveCssClass_Call {
986926 _c.Call.Run(func(args mock.Arguments) {
987- var arg0 string
988- if args[0] != nil {
989- arg0 = args[0].(string)
990- }
991- run(
992- arg0,
993- )
927+ run(args[0].(string))
994928 })
995929 return _c
996930 }
@@ -1000,15 +934,14 @@ func (_c *MockBoxWidget_RemoveCssClass_Call) Return() *MockBoxWidget_RemoveCssCl
1000934 return _c
1001935 }
1002936
1003-func (_c *MockBoxWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockBoxWidget_RemoveCssClass_Call {
937+func (_c *MockBoxWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockBoxWidget_RemoveCssClass_Call {
1004938 _c.Run(run)
1005939 return _c
1006940 }
1007941
1008-// ReorderChildAfter provides a mock function for the type MockBoxWidget
1009-func (_mock *MockBoxWidget) ReorderChildAfter(child layout.Widget, sibling layout.Widget) {
1010- _mock.Called(child, sibling)
1011- return
942+// ReorderChildAfter provides a mock function with given fields: child, sibling
943+func (_m *MockBoxWidget) ReorderChildAfter(child layout.Widget, sibling layout.Widget) {
944+ _m.Called(child, sibling)
1012945 }
1013946
1014947 // MockBoxWidget_ReorderChildAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReorderChildAfter'
@@ -1025,18 +958,7 @@ func (_e *MockBoxWidget_Expecter) ReorderChildAfter(child interface{}, sibling i
1025958
1026959 func (_c *MockBoxWidget_ReorderChildAfter_Call) Run(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_ReorderChildAfter_Call {
1027960 _c.Call.Run(func(args mock.Arguments) {
1028- var arg0 layout.Widget
1029- if args[0] != nil {
1030- arg0 = args[0].(layout.Widget)
1031- }
1032- var arg1 layout.Widget
1033- if args[1] != nil {
1034- arg1 = args[1].(layout.Widget)
1035- }
1036- run(
1037- arg0,
1038- arg1,
1039- )
961+ run(args[0].(layout.Widget), args[1].(layout.Widget))
1040962 })
1041963 return _c
1042964 }
@@ -1046,15 +968,14 @@ func (_c *MockBoxWidget_ReorderChildAfter_Call) Return() *MockBoxWidget_ReorderC
1046968 return _c
1047969 }
1048970
1049-func (_c *MockBoxWidget_ReorderChildAfter_Call) RunAndReturn(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_ReorderChildAfter_Call {
971+func (_c *MockBoxWidget_ReorderChildAfter_Call) RunAndReturn(run func(layout.Widget, layout.Widget)) *MockBoxWidget_ReorderChildAfter_Call {
1050972 _c.Run(run)
1051973 return _c
1052974 }
1053975
1054-// SetCanFocus provides a mock function for the type MockBoxWidget
1055-func (_mock *MockBoxWidget) SetCanFocus(canFocus bool) {
1056- _mock.Called(canFocus)
1057- return
976+// SetCanFocus provides a mock function with given fields: canFocus
977+func (_m *MockBoxWidget) SetCanFocus(canFocus bool) {
978+ _m.Called(canFocus)
1058979 }
1059980
1060981 // MockBoxWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus'
@@ -1070,13 +991,7 @@ func (_e *MockBoxWidget_Expecter) SetCanFocus(canFocus interface{}) *MockBoxWidg
1070991
1071992 func (_c *MockBoxWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockBoxWidget_SetCanFocus_Call {
1072993 _c.Call.Run(func(args mock.Arguments) {
1073- var arg0 bool
1074- if args[0] != nil {
1075- arg0 = args[0].(bool)
1076- }
1077- run(
1078- arg0,
1079- )
994+ run(args[0].(bool))
1080995 })
1081996 return _c
1082997 }
@@ -1086,15 +1001,14 @@ func (_c *MockBoxWidget_SetCanFocus_Call) Return() *MockBoxWidget_SetCanFocus_Ca
10861001 return _c
10871002 }
10881003
1089-func (_c *MockBoxWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockBoxWidget_SetCanFocus_Call {
1004+func (_c *MockBoxWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetCanFocus_Call {
10901005 _c.Run(run)
10911006 return _c
10921007 }
10931008
1094-// SetCanTarget provides a mock function for the type MockBoxWidget
1095-func (_mock *MockBoxWidget) SetCanTarget(canTarget bool) {
1096- _mock.Called(canTarget)
1097- return
1009+// SetCanTarget provides a mock function with given fields: canTarget
1010+func (_m *MockBoxWidget) SetCanTarget(canTarget bool) {
1011+ _m.Called(canTarget)
10981012 }
10991013
11001014 // MockBoxWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget'
@@ -1110,13 +1024,7 @@ func (_e *MockBoxWidget_Expecter) SetCanTarget(canTarget interface{}) *MockBoxWi
11101024
11111025 func (_c *MockBoxWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockBoxWidget_SetCanTarget_Call {
11121026 _c.Call.Run(func(args mock.Arguments) {
1113- var arg0 bool
1114- if args[0] != nil {
1115- arg0 = args[0].(bool)
1116- }
1117- run(
1118- arg0,
1119- )
1027+ run(args[0].(bool))
11201028 })
11211029 return _c
11221030 }
@@ -1126,15 +1034,14 @@ func (_c *MockBoxWidget_SetCanTarget_Call) Return() *MockBoxWidget_SetCanTarget_
11261034 return _c
11271035 }
11281036
1129-func (_c *MockBoxWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockBoxWidget_SetCanTarget_Call {
1037+func (_c *MockBoxWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetCanTarget_Call {
11301038 _c.Run(run)
11311039 return _c
11321040 }
11331041
1134-// SetFocusOnClick provides a mock function for the type MockBoxWidget
1135-func (_mock *MockBoxWidget) SetFocusOnClick(focusOnClick bool) {
1136- _mock.Called(focusOnClick)
1137- return
1042+// SetFocusOnClick provides a mock function with given fields: focusOnClick
1043+func (_m *MockBoxWidget) SetFocusOnClick(focusOnClick bool) {
1044+ _m.Called(focusOnClick)
11381045 }
11391046
11401047 // MockBoxWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick'
@@ -1150,13 +1057,7 @@ func (_e *MockBoxWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *Moc
11501057
11511058 func (_c *MockBoxWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockBoxWidget_SetFocusOnClick_Call {
11521059 _c.Call.Run(func(args mock.Arguments) {
1153- var arg0 bool
1154- if args[0] != nil {
1155- arg0 = args[0].(bool)
1156- }
1157- run(
1158- arg0,
1159- )
1060+ run(args[0].(bool))
11601061 })
11611062 return _c
11621063 }
@@ -1166,15 +1067,14 @@ func (_c *MockBoxWidget_SetFocusOnClick_Call) Return() *MockBoxWidget_SetFocusOn
11661067 return _c
11671068 }
11681069
1169-func (_c *MockBoxWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockBoxWidget_SetFocusOnClick_Call {
1070+func (_c *MockBoxWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetFocusOnClick_Call {
11701071 _c.Run(run)
11711072 return _c
11721073 }
11731074
1174-// SetHalign provides a mock function for the type MockBoxWidget
1175-func (_mock *MockBoxWidget) SetHalign(align gtk.Align) {
1176- _mock.Called(align)
1177- return
1075+// SetHalign provides a mock function with given fields: align
1076+func (_m *MockBoxWidget) SetHalign(align gtk.Align) {
1077+ _m.Called(align)
11781078 }
11791079
11801080 // MockBoxWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign'
@@ -1190,13 +1090,7 @@ func (_e *MockBoxWidget_Expecter) SetHalign(align interface{}) *MockBoxWidget_Se
11901090
11911091 func (_c *MockBoxWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockBoxWidget_SetHalign_Call {
11921092 _c.Call.Run(func(args mock.Arguments) {
1193- var arg0 gtk.Align
1194- if args[0] != nil {
1195- arg0 = args[0].(gtk.Align)
1196- }
1197- run(
1198- arg0,
1199- )
1093+ run(args[0].(gtk.Align))
12001094 })
12011095 return _c
12021096 }
@@ -1206,15 +1100,14 @@ func (_c *MockBoxWidget_SetHalign_Call) Return() *MockBoxWidget_SetHalign_Call {
12061100 return _c
12071101 }
12081102
1209-func (_c *MockBoxWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockBoxWidget_SetHalign_Call {
1103+func (_c *MockBoxWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockBoxWidget_SetHalign_Call {
12101104 _c.Run(run)
12111105 return _c
12121106 }
12131107
1214-// SetHexpand provides a mock function for the type MockBoxWidget
1215-func (_mock *MockBoxWidget) SetHexpand(expand bool) {
1216- _mock.Called(expand)
1217- return
1108+// SetHexpand provides a mock function with given fields: expand
1109+func (_m *MockBoxWidget) SetHexpand(expand bool) {
1110+ _m.Called(expand)
12181111 }
12191112
12201113 // MockBoxWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand'
@@ -1230,13 +1123,7 @@ func (_e *MockBoxWidget_Expecter) SetHexpand(expand interface{}) *MockBoxWidget_
12301123
12311124 func (_c *MockBoxWidget_SetHexpand_Call) Run(run func(expand bool)) *MockBoxWidget_SetHexpand_Call {
12321125 _c.Call.Run(func(args mock.Arguments) {
1233- var arg0 bool
1234- if args[0] != nil {
1235- arg0 = args[0].(bool)
1236- }
1237- run(
1238- arg0,
1239- )
1126+ run(args[0].(bool))
12401127 })
12411128 return _c
12421129 }
@@ -1246,15 +1133,14 @@ func (_c *MockBoxWidget_SetHexpand_Call) Return() *MockBoxWidget_SetHexpand_Call
12461133 return _c
12471134 }
12481135
1249-func (_c *MockBoxWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockBoxWidget_SetHexpand_Call {
1136+func (_c *MockBoxWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetHexpand_Call {
12501137 _c.Run(run)
12511138 return _c
12521139 }
12531140
1254-// SetHomogeneous provides a mock function for the type MockBoxWidget
1255-func (_mock *MockBoxWidget) SetHomogeneous(homogeneous bool) {
1256- _mock.Called(homogeneous)
1257- return
1141+// SetHomogeneous provides a mock function with given fields: homogeneous
1142+func (_m *MockBoxWidget) SetHomogeneous(homogeneous bool) {
1143+ _m.Called(homogeneous)
12581144 }
12591145
12601146 // MockBoxWidget_SetHomogeneous_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHomogeneous'
@@ -1270,13 +1156,7 @@ func (_e *MockBoxWidget_Expecter) SetHomogeneous(homogeneous interface{}) *MockB
12701156
12711157 func (_c *MockBoxWidget_SetHomogeneous_Call) Run(run func(homogeneous bool)) *MockBoxWidget_SetHomogeneous_Call {
12721158 _c.Call.Run(func(args mock.Arguments) {
1273- var arg0 bool
1274- if args[0] != nil {
1275- arg0 = args[0].(bool)
1276- }
1277- run(
1278- arg0,
1279- )
1159+ run(args[0].(bool))
12801160 })
12811161 return _c
12821162 }
@@ -1286,15 +1166,14 @@ func (_c *MockBoxWidget_SetHomogeneous_Call) Return() *MockBoxWidget_SetHomogene
12861166 return _c
12871167 }
12881168
1289-func (_c *MockBoxWidget_SetHomogeneous_Call) RunAndReturn(run func(homogeneous bool)) *MockBoxWidget_SetHomogeneous_Call {
1169+func (_c *MockBoxWidget_SetHomogeneous_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetHomogeneous_Call {
12901170 _c.Run(run)
12911171 return _c
12921172 }
12931173
1294-// SetOrientation provides a mock function for the type MockBoxWidget
1295-func (_mock *MockBoxWidget) SetOrientation(orientation layout.Orientation) {
1296- _mock.Called(orientation)
1297- return
1174+// SetOrientation provides a mock function with given fields: orientation
1175+func (_m *MockBoxWidget) SetOrientation(orientation gtk.Orientation) {
1176+ _m.Called(orientation)
12981177 }
12991178
13001179 // MockBoxWidget_SetOrientation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOrientation'
@@ -1303,20 +1182,14 @@ type MockBoxWidget_SetOrientation_Call struct {
13031182 }
13041183
13051184 // SetOrientation is a helper method to define mock.On call
1306-// - orientation layout.Orientation
1185+// - orientation gtk.Orientation
13071186 func (_e *MockBoxWidget_Expecter) SetOrientation(orientation interface{}) *MockBoxWidget_SetOrientation_Call {
13081187 return &MockBoxWidget_SetOrientation_Call{Call: _e.mock.On("SetOrientation", orientation)}
13091188 }
13101189
1311-func (_c *MockBoxWidget_SetOrientation_Call) Run(run func(orientation layout.Orientation)) *MockBoxWidget_SetOrientation_Call {
1190+func (_c *MockBoxWidget_SetOrientation_Call) Run(run func(orientation gtk.Orientation)) *MockBoxWidget_SetOrientation_Call {
13121191 _c.Call.Run(func(args mock.Arguments) {
1313- var arg0 layout.Orientation
1314- if args[0] != nil {
1315- arg0 = args[0].(layout.Orientation)
1316- }
1317- run(
1318- arg0,
1319- )
1192+ run(args[0].(gtk.Orientation))
13201193 })
13211194 return _c
13221195 }
@@ -1326,15 +1199,14 @@ func (_c *MockBoxWidget_SetOrientation_Call) Return() *MockBoxWidget_SetOrientat
13261199 return _c
13271200 }
13281201
1329-func (_c *MockBoxWidget_SetOrientation_Call) RunAndReturn(run func(orientation layout.Orientation)) *MockBoxWidget_SetOrientation_Call {
1202+func (_c *MockBoxWidget_SetOrientation_Call) RunAndReturn(run func(gtk.Orientation)) *MockBoxWidget_SetOrientation_Call {
13301203 _c.Run(run)
13311204 return _c
13321205 }
13331206
1334-// SetSizeRequest provides a mock function for the type MockBoxWidget
1335-func (_mock *MockBoxWidget) SetSizeRequest(width int, height int) {
1336- _mock.Called(width, height)
1337- return
1207+// SetSizeRequest provides a mock function with given fields: width, height
1208+func (_m *MockBoxWidget) SetSizeRequest(width int, height int) {
1209+ _m.Called(width, height)
13381210 }
13391211
13401212 // MockBoxWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest'
@@ -1351,18 +1223,7 @@ func (_e *MockBoxWidget_Expecter) SetSizeRequest(width interface{}, height inter
13511223
13521224 func (_c *MockBoxWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockBoxWidget_SetSizeRequest_Call {
13531225 _c.Call.Run(func(args mock.Arguments) {
1354- var arg0 int
1355- if args[0] != nil {
1356- arg0 = args[0].(int)
1357- }
1358- var arg1 int
1359- if args[1] != nil {
1360- arg1 = args[1].(int)
1361- }
1362- run(
1363- arg0,
1364- arg1,
1365- )
1226+ run(args[0].(int), args[1].(int))
13661227 })
13671228 return _c
13681229 }
@@ -1372,15 +1233,14 @@ func (_c *MockBoxWidget_SetSizeRequest_Call) Return() *MockBoxWidget_SetSizeRequ
13721233 return _c
13731234 }
13741235
1375-func (_c *MockBoxWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockBoxWidget_SetSizeRequest_Call {
1236+func (_c *MockBoxWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockBoxWidget_SetSizeRequest_Call {
13761237 _c.Run(run)
13771238 return _c
13781239 }
13791240
1380-// SetSpacing provides a mock function for the type MockBoxWidget
1381-func (_mock *MockBoxWidget) SetSpacing(spacing int) {
1382- _mock.Called(spacing)
1383- return
1241+// SetSpacing provides a mock function with given fields: spacing
1242+func (_m *MockBoxWidget) SetSpacing(spacing int) {
1243+ _m.Called(spacing)
13841244 }
13851245
13861246 // MockBoxWidget_SetSpacing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSpacing'
@@ -1396,13 +1256,7 @@ func (_e *MockBoxWidget_Expecter) SetSpacing(spacing interface{}) *MockBoxWidget
13961256
13971257 func (_c *MockBoxWidget_SetSpacing_Call) Run(run func(spacing int)) *MockBoxWidget_SetSpacing_Call {
13981258 _c.Call.Run(func(args mock.Arguments) {
1399- var arg0 int
1400- if args[0] != nil {
1401- arg0 = args[0].(int)
1402- }
1403- run(
1404- arg0,
1405- )
1259+ run(args[0].(int))
14061260 })
14071261 return _c
14081262 }
@@ -1412,15 +1266,14 @@ func (_c *MockBoxWidget_SetSpacing_Call) Return() *MockBoxWidget_SetSpacing_Call
14121266 return _c
14131267 }
14141268
1415-func (_c *MockBoxWidget_SetSpacing_Call) RunAndReturn(run func(spacing int)) *MockBoxWidget_SetSpacing_Call {
1269+func (_c *MockBoxWidget_SetSpacing_Call) RunAndReturn(run func(int)) *MockBoxWidget_SetSpacing_Call {
14161270 _c.Run(run)
14171271 return _c
14181272 }
14191273
1420-// SetValign provides a mock function for the type MockBoxWidget
1421-func (_mock *MockBoxWidget) SetValign(align gtk.Align) {
1422- _mock.Called(align)
1423- return
1274+// SetValign provides a mock function with given fields: align
1275+func (_m *MockBoxWidget) SetValign(align gtk.Align) {
1276+ _m.Called(align)
14241277 }
14251278
14261279 // MockBoxWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign'
@@ -1436,13 +1289,7 @@ func (_e *MockBoxWidget_Expecter) SetValign(align interface{}) *MockBoxWidget_Se
14361289
14371290 func (_c *MockBoxWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockBoxWidget_SetValign_Call {
14381291 _c.Call.Run(func(args mock.Arguments) {
1439- var arg0 gtk.Align
1440- if args[0] != nil {
1441- arg0 = args[0].(gtk.Align)
1442- }
1443- run(
1444- arg0,
1445- )
1292+ run(args[0].(gtk.Align))
14461293 })
14471294 return _c
14481295 }
@@ -1452,15 +1299,14 @@ func (_c *MockBoxWidget_SetValign_Call) Return() *MockBoxWidget_SetValign_Call {
14521299 return _c
14531300 }
14541301
1455-func (_c *MockBoxWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockBoxWidget_SetValign_Call {
1302+func (_c *MockBoxWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockBoxWidget_SetValign_Call {
14561303 _c.Run(run)
14571304 return _c
14581305 }
14591306
1460-// SetVexpand provides a mock function for the type MockBoxWidget
1461-func (_mock *MockBoxWidget) SetVexpand(expand bool) {
1462- _mock.Called(expand)
1463- return
1307+// SetVexpand provides a mock function with given fields: expand
1308+func (_m *MockBoxWidget) SetVexpand(expand bool) {
1309+ _m.Called(expand)
14641310 }
14651311
14661312 // MockBoxWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand'
@@ -1476,13 +1322,7 @@ func (_e *MockBoxWidget_Expecter) SetVexpand(expand interface{}) *MockBoxWidget_
14761322
14771323 func (_c *MockBoxWidget_SetVexpand_Call) Run(run func(expand bool)) *MockBoxWidget_SetVexpand_Call {
14781324 _c.Call.Run(func(args mock.Arguments) {
1479- var arg0 bool
1480- if args[0] != nil {
1481- arg0 = args[0].(bool)
1482- }
1483- run(
1484- arg0,
1485- )
1325+ run(args[0].(bool))
14861326 })
14871327 return _c
14881328 }
@@ -1492,15 +1332,14 @@ func (_c *MockBoxWidget_SetVexpand_Call) Return() *MockBoxWidget_SetVexpand_Call
14921332 return _c
14931333 }
14941334
1495-func (_c *MockBoxWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockBoxWidget_SetVexpand_Call {
1335+func (_c *MockBoxWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetVexpand_Call {
14961336 _c.Run(run)
14971337 return _c
14981338 }
14991339
1500-// SetVisible provides a mock function for the type MockBoxWidget
1501-func (_mock *MockBoxWidget) SetVisible(visible bool) {
1502- _mock.Called(visible)
1503- return
1340+// SetVisible provides a mock function with given fields: visible
1341+func (_m *MockBoxWidget) SetVisible(visible bool) {
1342+ _m.Called(visible)
15041343 }
15051344
15061345 // MockBoxWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible'
@@ -1516,13 +1355,7 @@ func (_e *MockBoxWidget_Expecter) SetVisible(visible interface{}) *MockBoxWidget
15161355
15171356 func (_c *MockBoxWidget_SetVisible_Call) Run(run func(visible bool)) *MockBoxWidget_SetVisible_Call {
15181357 _c.Call.Run(func(args mock.Arguments) {
1519- var arg0 bool
1520- if args[0] != nil {
1521- arg0 = args[0].(bool)
1522- }
1523- run(
1524- arg0,
1525- )
1358+ run(args[0].(bool))
15261359 })
15271360 return _c
15281361 }
@@ -1532,15 +1365,14 @@ func (_c *MockBoxWidget_SetVisible_Call) Return() *MockBoxWidget_SetVisible_Call
15321365 return _c
15331366 }
15341367
1535-func (_c *MockBoxWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockBoxWidget_SetVisible_Call {
1368+func (_c *MockBoxWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetVisible_Call {
15361369 _c.Run(run)
15371370 return _c
15381371 }
15391372
1540-// Show provides a mock function for the type MockBoxWidget
1541-func (_mock *MockBoxWidget) Show() {
1542- _mock.Called()
1543- return
1373+// Show provides a mock function with no fields
1374+func (_m *MockBoxWidget) Show() {
1375+ _m.Called()
15441376 }
15451377
15461378 // MockBoxWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
@@ -1570,10 +1402,9 @@ func (_c *MockBoxWidget_Show_Call) RunAndReturn(run func()) *MockBoxWidget_Show_
15701402 return _c
15711403 }
15721404
1573-// Unparent provides a mock function for the type MockBoxWidget
1574-func (_mock *MockBoxWidget) Unparent() {
1575- _mock.Called()
1576- return
1405+// Unparent provides a mock function with no fields
1406+func (_m *MockBoxWidget) Unparent() {
1407+ _m.Called()
15771408 }
15781409
15791410 // MockBoxWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent'
@@ -1602,3 +1433,17 @@ func (_c *MockBoxWidget_Unparent_Call) RunAndReturn(run func()) *MockBoxWidget_U
16021433 _c.Run(run)
16031434 return _c
16041435 }
1436+
1437+// NewMockBoxWidget creates a new instance of MockBoxWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1438+// The first argument is typically a *testing.T value.
1439+func NewMockBoxWidget(t interface {
1440+ mock.TestingT
1441+ Cleanup(func())
1442+}) *MockBoxWidget {
1443+ mock := &MockBoxWidget{}
1444+ mock.Mock.Test(t)
1445+
1446+ t.Cleanup(func() { mock.AssertExpectations(t) })
1447+
1448+ return mock
1449+}
M internal/ui/layout/mocks/mock_button_widget.go +221 -330
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// NewMockButtonWidget creates a new instance of MockButtonWidget. 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 NewMockButtonWidget(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockButtonWidget {
19- mock := &MockButtonWidget{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockButtonWidget is an autogenerated mock type for the ButtonWidget type
2813 type MockButtonWidget struct {
2914 mock.Mock
@@ -37,10 +22,9 @@ func (_m *MockButtonWidget) EXPECT() *MockButtonWidget_Expecter {
3722 return &MockButtonWidget_Expecter{mock: &_m.Mock}
3823 }
3924
40-// AddController provides a mock function for the type MockButtonWidget
41-func (_mock *MockButtonWidget) AddController(controller *gtk.EventController) {
42- _mock.Called(controller)
43- return
25+// AddController provides a mock function with given fields: controller
26+func (_m *MockButtonWidget) AddController(controller *gtk.EventController) {
27+ _m.Called(controller)
4428 }
4529
4630 // MockButtonWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController'
@@ -56,13 +40,7 @@ func (_e *MockButtonWidget_Expecter) AddController(controller interface{}) *Mock
5640
5741 func (_c *MockButtonWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockButtonWidget_AddController_Call {
5842 _c.Call.Run(func(args mock.Arguments) {
59- var arg0 *gtk.EventController
60- if args[0] != nil {
61- arg0 = args[0].(*gtk.EventController)
62- }
63- run(
64- arg0,
65- )
43+ run(args[0].(*gtk.EventController))
6644 })
6745 return _c
6846 }
@@ -72,15 +50,14 @@ func (_c *MockButtonWidget_AddController_Call) Return() *MockButtonWidget_AddCon
7250 return _c
7351 }
7452
75-func (_c *MockButtonWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockButtonWidget_AddController_Call {
53+func (_c *MockButtonWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockButtonWidget_AddController_Call {
7654 _c.Run(run)
7755 return _c
7856 }
7957
80-// AddCssClass provides a mock function for the type MockButtonWidget
81-func (_mock *MockButtonWidget) AddCssClass(cssClass string) {
82- _mock.Called(cssClass)
83- return
58+// AddCssClass provides a mock function with given fields: cssClass
59+func (_m *MockButtonWidget) AddCssClass(cssClass string) {
60+ _m.Called(cssClass)
8461 }
8562
8663 // MockButtonWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass'
@@ -96,13 +73,7 @@ func (_e *MockButtonWidget_Expecter) AddCssClass(cssClass interface{}) *MockButt
9673
9774 func (_c *MockButtonWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockButtonWidget_AddCssClass_Call {
9875 _c.Call.Run(func(args mock.Arguments) {
99- var arg0 string
100- if args[0] != nil {
101- arg0 = args[0].(string)
102- }
103- run(
104- arg0,
105- )
76+ run(args[0].(string))
10677 })
10778 return _c
10879 }
@@ -112,14 +83,14 @@ func (_c *MockButtonWidget_AddCssClass_Call) Return() *MockButtonWidget_AddCssCl
11283 return _c
11384 }
11485
115-func (_c *MockButtonWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockButtonWidget_AddCssClass_Call {
86+func (_c *MockButtonWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockButtonWidget_AddCssClass_Call {
11687 _c.Run(run)
11788 return _c
11889 }
11990
120-// ComputePoint provides a mock function for the type MockButtonWidget
121-func (_mock *MockButtonWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
122- ret := _mock.Called(target)
91+// ComputePoint provides a mock function with given fields: target
92+func (_m *MockButtonWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
93+ ret := _m.Called(target)
12394
12495 if len(ret) == 0 {
12596 panic("no return value specified for ComputePoint")
@@ -128,24 +99,27 @@ func (_mock *MockButtonWidget) ComputePoint(target layout.Widget) (float64, floa
12899 var r0 float64
129100 var r1 float64
130101 var r2 bool
131- if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
132- return returnFunc(target)
102+ if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
103+ return rf(target)
133104 }
134- if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok {
135- r0 = returnFunc(target)
105+ if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok {
106+ r0 = rf(target)
136107 } else {
137108 r0 = ret.Get(0).(float64)
138109 }
139- if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok {
140- r1 = returnFunc(target)
110+
111+ if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok {
112+ r1 = rf(target)
141113 } else {
142114 r1 = ret.Get(1).(float64)
143115 }
144- if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok {
145- r2 = returnFunc(target)
116+
117+ if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok {
118+ r2 = rf(target)
146119 } else {
147120 r2 = ret.Get(2).(bool)
148121 }
122+
149123 return r0, r1, r2
150124 }
151125
@@ -162,13 +136,7 @@ func (_e *MockButtonWidget_Expecter) ComputePoint(target interface{}) *MockButto
162136
163137 func (_c *MockButtonWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockButtonWidget_ComputePoint_Call {
164138 _c.Call.Run(func(args mock.Arguments) {
165- var arg0 layout.Widget
166- if args[0] != nil {
167- arg0 = args[0].(layout.Widget)
168- }
169- run(
170- arg0,
171- )
139+ run(args[0].(layout.Widget))
172140 })
173141 return _c
174142 }
@@ -178,25 +146,26 @@ func (_c *MockButtonWidget_ComputePoint_Call) Return(x float64, y float64, ok bo
178146 return _c
179147 }
180148
181-func (_c *MockButtonWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockButtonWidget_ComputePoint_Call {
149+func (_c *MockButtonWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockButtonWidget_ComputePoint_Call {
182150 _c.Call.Return(run)
183151 return _c
184152 }
185153
186-// ConnectClicked provides a mock function for the type MockButtonWidget
187-func (_mock *MockButtonWidget) ConnectClicked(callback func()) uint32 {
188- ret := _mock.Called(callback)
154+// ConnectClicked provides a mock function with given fields: callback
155+func (_m *MockButtonWidget) ConnectClicked(callback func()) uint32 {
156+ ret := _m.Called(callback)
189157
190158 if len(ret) == 0 {
191159 panic("no return value specified for ConnectClicked")
192160 }
193161
194162 var r0 uint32
195- if returnFunc, ok := ret.Get(0).(func(func()) uint32); ok {
196- r0 = returnFunc(callback)
163+ if rf, ok := ret.Get(0).(func(func()) uint32); ok {
164+ r0 = rf(callback)
197165 } else {
198166 r0 = ret.Get(0).(uint32)
199167 }
168+
200169 return r0
201170 }
202171
@@ -213,41 +182,36 @@ func (_e *MockButtonWidget_Expecter) ConnectClicked(callback interface{}) *MockB
213182
214183 func (_c *MockButtonWidget_ConnectClicked_Call) Run(run func(callback func())) *MockButtonWidget_ConnectClicked_Call {
215184 _c.Call.Run(func(args mock.Arguments) {
216- var arg0 func()
217- if args[0] != nil {
218- arg0 = args[0].(func())
219- }
220- run(
221- arg0,
222- )
185+ run(args[0].(func()))
223186 })
224187 return _c
225188 }
226189
227-func (_c *MockButtonWidget_ConnectClicked_Call) Return(v uint32) *MockButtonWidget_ConnectClicked_Call {
228- _c.Call.Return(v)
190+func (_c *MockButtonWidget_ConnectClicked_Call) Return(_a0 uint32) *MockButtonWidget_ConnectClicked_Call {
191+ _c.Call.Return(_a0)
229192 return _c
230193 }
231194
232-func (_c *MockButtonWidget_ConnectClicked_Call) RunAndReturn(run func(callback func()) uint32) *MockButtonWidget_ConnectClicked_Call {
195+func (_c *MockButtonWidget_ConnectClicked_Call) RunAndReturn(run func(func()) uint32) *MockButtonWidget_ConnectClicked_Call {
233196 _c.Call.Return(run)
234197 return _c
235198 }
236199
237-// GetAllocatedHeight provides a mock function for the type MockButtonWidget
238-func (_mock *MockButtonWidget) GetAllocatedHeight() int {
239- ret := _mock.Called()
200+// GetAllocatedHeight provides a mock function with no fields
201+func (_m *MockButtonWidget) GetAllocatedHeight() int {
202+ ret := _m.Called()
240203
241204 if len(ret) == 0 {
242205 panic("no return value specified for GetAllocatedHeight")
243206 }
244207
245208 var r0 int
246- if returnFunc, ok := ret.Get(0).(func() int); ok {
247- r0 = returnFunc()
209+ if rf, ok := ret.Get(0).(func() int); ok {
210+ r0 = rf()
248211 } else {
249212 r0 = ret.Get(0).(int)
250213 }
214+
251215 return r0
252216 }
253217
@@ -268,8 +232,8 @@ func (_c *MockButtonWidget_GetAllocatedHeight_Call) Run(run func()) *MockButtonW
268232 return _c
269233 }
270234
271-func (_c *MockButtonWidget_GetAllocatedHeight_Call) Return(n int) *MockButtonWidget_GetAllocatedHeight_Call {
272- _c.Call.Return(n)
235+func (_c *MockButtonWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockButtonWidget_GetAllocatedHeight_Call {
236+ _c.Call.Return(_a0)
273237 return _c
274238 }
275239
@@ -278,20 +242,21 @@ func (_c *MockButtonWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int)
278242 return _c
279243 }
280244
281-// GetAllocatedWidth provides a mock function for the type MockButtonWidget
282-func (_mock *MockButtonWidget) GetAllocatedWidth() int {
283- ret := _mock.Called()
245+// GetAllocatedWidth provides a mock function with no fields
246+func (_m *MockButtonWidget) GetAllocatedWidth() int {
247+ ret := _m.Called()
284248
285249 if len(ret) == 0 {
286250 panic("no return value specified for GetAllocatedWidth")
287251 }
288252
289253 var r0 int
290- if returnFunc, ok := ret.Get(0).(func() int); ok {
291- r0 = returnFunc()
254+ if rf, ok := ret.Get(0).(func() int); ok {
255+ r0 = rf()
292256 } else {
293257 r0 = ret.Get(0).(int)
294258 }
259+
295260 return r0
296261 }
297262
@@ -312,8 +277,8 @@ func (_c *MockButtonWidget_GetAllocatedWidth_Call) Run(run func()) *MockButtonWi
312277 return _c
313278 }
314279
315-func (_c *MockButtonWidget_GetAllocatedWidth_Call) Return(n int) *MockButtonWidget_GetAllocatedWidth_Call {
316- _c.Call.Return(n)
280+func (_c *MockButtonWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockButtonWidget_GetAllocatedWidth_Call {
281+ _c.Call.Return(_a0)
317282 return _c
318283 }
319284
@@ -322,22 +287,23 @@ func (_c *MockButtonWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int)
322287 return _c
323288 }
324289
325-// GetChild provides a mock function for the type MockButtonWidget
326-func (_mock *MockButtonWidget) GetChild() layout.Widget {
327- ret := _mock.Called()
290+// GetChild provides a mock function with no fields
291+func (_m *MockButtonWidget) GetChild() layout.Widget {
292+ ret := _m.Called()
328293
329294 if len(ret) == 0 {
330295 panic("no return value specified for GetChild")
331296 }
332297
333298 var r0 layout.Widget
334- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
335- r0 = returnFunc()
299+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
300+ r0 = rf()
336301 } else {
337302 if ret.Get(0) != nil {
338303 r0 = ret.Get(0).(layout.Widget)
339304 }
340305 }
306+
341307 return r0
342308 }
343309
@@ -358,8 +324,8 @@ func (_c *MockButtonWidget_GetChild_Call) Run(run func()) *MockButtonWidget_GetC
358324 return _c
359325 }
360326
361-func (_c *MockButtonWidget_GetChild_Call) Return(widget layout.Widget) *MockButtonWidget_GetChild_Call {
362- _c.Call.Return(widget)
327+func (_c *MockButtonWidget_GetChild_Call) Return(_a0 layout.Widget) *MockButtonWidget_GetChild_Call {
328+ _c.Call.Return(_a0)
363329 return _c
364330 }
365331
@@ -368,20 +334,21 @@ func (_c *MockButtonWidget_GetChild_Call) RunAndReturn(run func() layout.Widget)
368334 return _c
369335 }
370336
371-// GetHexpand provides a mock function for the type MockButtonWidget
372-func (_mock *MockButtonWidget) GetHexpand() bool {
373- ret := _mock.Called()
337+// GetHexpand provides a mock function with no fields
338+func (_m *MockButtonWidget) GetHexpand() bool {
339+ ret := _m.Called()
374340
375341 if len(ret) == 0 {
376342 panic("no return value specified for GetHexpand")
377343 }
378344
379345 var r0 bool
380- if returnFunc, ok := ret.Get(0).(func() bool); ok {
381- r0 = returnFunc()
346+ if rf, ok := ret.Get(0).(func() bool); ok {
347+ r0 = rf()
382348 } else {
383349 r0 = ret.Get(0).(bool)
384350 }
351+
385352 return r0
386353 }
387354
@@ -402,8 +369,8 @@ func (_c *MockButtonWidget_GetHexpand_Call) Run(run func()) *MockButtonWidget_Ge
402369 return _c
403370 }
404371
405-func (_c *MockButtonWidget_GetHexpand_Call) Return(b bool) *MockButtonWidget_GetHexpand_Call {
406- _c.Call.Return(b)
372+func (_c *MockButtonWidget_GetHexpand_Call) Return(_a0 bool) *MockButtonWidget_GetHexpand_Call {
373+ _c.Call.Return(_a0)
407374 return _c
408375 }
409376
@@ -412,20 +379,21 @@ func (_c *MockButtonWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockB
412379 return _c
413380 }
414381
415-// GetLabel provides a mock function for the type MockButtonWidget
416-func (_mock *MockButtonWidget) GetLabel() string {
417- ret := _mock.Called()
382+// GetLabel provides a mock function with no fields
383+func (_m *MockButtonWidget) GetLabel() string {
384+ ret := _m.Called()
418385
419386 if len(ret) == 0 {
420387 panic("no return value specified for GetLabel")
421388 }
422389
423390 var r0 string
424- if returnFunc, ok := ret.Get(0).(func() string); ok {
425- r0 = returnFunc()
391+ if rf, ok := ret.Get(0).(func() string); ok {
392+ r0 = rf()
426393 } else {
427394 r0 = ret.Get(0).(string)
428395 }
396+
429397 return r0
430398 }
431399
@@ -446,8 +414,8 @@ func (_c *MockButtonWidget_GetLabel_Call) Run(run func()) *MockButtonWidget_GetL
446414 return _c
447415 }
448416
449-func (_c *MockButtonWidget_GetLabel_Call) Return(s string) *MockButtonWidget_GetLabel_Call {
450- _c.Call.Return(s)
417+func (_c *MockButtonWidget_GetLabel_Call) Return(_a0 string) *MockButtonWidget_GetLabel_Call {
418+ _c.Call.Return(_a0)
451419 return _c
452420 }
453421
@@ -456,22 +424,23 @@ func (_c *MockButtonWidget_GetLabel_Call) RunAndReturn(run func() string) *MockB
456424 return _c
457425 }
458426
459-// GetParent provides a mock function for the type MockButtonWidget
460-func (_mock *MockButtonWidget) GetParent() layout.Widget {
461- ret := _mock.Called()
427+// GetParent provides a mock function with no fields
428+func (_m *MockButtonWidget) GetParent() layout.Widget {
429+ ret := _m.Called()
462430
463431 if len(ret) == 0 {
464432 panic("no return value specified for GetParent")
465433 }
466434
467435 var r0 layout.Widget
468- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
469- r0 = returnFunc()
436+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
437+ r0 = rf()
470438 } else {
471439 if ret.Get(0) != nil {
472440 r0 = ret.Get(0).(layout.Widget)
473441 }
474442 }
443+
475444 return r0
476445 }
477446
@@ -492,8 +461,8 @@ func (_c *MockButtonWidget_GetParent_Call) Run(run func()) *MockButtonWidget_Get
492461 return _c
493462 }
494463
495-func (_c *MockButtonWidget_GetParent_Call) Return(widget layout.Widget) *MockButtonWidget_GetParent_Call {
496- _c.Call.Return(widget)
464+func (_c *MockButtonWidget_GetParent_Call) Return(_a0 layout.Widget) *MockButtonWidget_GetParent_Call {
465+ _c.Call.Return(_a0)
497466 return _c
498467 }
499468
@@ -502,20 +471,21 @@ func (_c *MockButtonWidget_GetParent_Call) RunAndReturn(run func() layout.Widget
502471 return _c
503472 }
504473
505-// GetVexpand provides a mock function for the type MockButtonWidget
506-func (_mock *MockButtonWidget) GetVexpand() bool {
507- ret := _mock.Called()
474+// GetVexpand provides a mock function with no fields
475+func (_m *MockButtonWidget) GetVexpand() bool {
476+ ret := _m.Called()
508477
509478 if len(ret) == 0 {
510479 panic("no return value specified for GetVexpand")
511480 }
512481
513482 var r0 bool
514- if returnFunc, ok := ret.Get(0).(func() bool); ok {
515- r0 = returnFunc()
483+ if rf, ok := ret.Get(0).(func() bool); ok {
484+ r0 = rf()
516485 } else {
517486 r0 = ret.Get(0).(bool)
518487 }
488+
519489 return r0
520490 }
521491
@@ -536,8 +506,8 @@ func (_c *MockButtonWidget_GetVexpand_Call) Run(run func()) *MockButtonWidget_Ge
536506 return _c
537507 }
538508
539-func (_c *MockButtonWidget_GetVexpand_Call) Return(b bool) *MockButtonWidget_GetVexpand_Call {
540- _c.Call.Return(b)
509+func (_c *MockButtonWidget_GetVexpand_Call) Return(_a0 bool) *MockButtonWidget_GetVexpand_Call {
510+ _c.Call.Return(_a0)
541511 return _c
542512 }
543513
@@ -546,20 +516,21 @@ func (_c *MockButtonWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockB
546516 return _c
547517 }
548518
549-// GrabFocus provides a mock function for the type MockButtonWidget
550-func (_mock *MockButtonWidget) GrabFocus() bool {
551- ret := _mock.Called()
519+// GrabFocus provides a mock function with no fields
520+func (_m *MockButtonWidget) GrabFocus() bool {
521+ ret := _m.Called()
552522
553523 if len(ret) == 0 {
554524 panic("no return value specified for GrabFocus")
555525 }
556526
557527 var r0 bool
558- if returnFunc, ok := ret.Get(0).(func() bool); ok {
559- r0 = returnFunc()
528+ if rf, ok := ret.Get(0).(func() bool); ok {
529+ r0 = rf()
560530 } else {
561531 r0 = ret.Get(0).(bool)
562532 }
533+
563534 return r0
564535 }
565536
@@ -580,8 +551,8 @@ func (_c *MockButtonWidget_GrabFocus_Call) Run(run func()) *MockButtonWidget_Gra
580551 return _c
581552 }
582553
583-func (_c *MockButtonWidget_GrabFocus_Call) Return(b bool) *MockButtonWidget_GrabFocus_Call {
584- _c.Call.Return(b)
554+func (_c *MockButtonWidget_GrabFocus_Call) Return(_a0 bool) *MockButtonWidget_GrabFocus_Call {
555+ _c.Call.Return(_a0)
585556 return _c
586557 }
587558
@@ -590,22 +561,23 @@ func (_c *MockButtonWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockBu
590561 return _c
591562 }
592563
593-// GtkWidget provides a mock function for the type MockButtonWidget
594-func (_mock *MockButtonWidget) GtkWidget() *gtk.Widget {
595- ret := _mock.Called()
564+// GtkWidget provides a mock function with no fields
565+func (_m *MockButtonWidget) GtkWidget() *gtk.Widget {
566+ ret := _m.Called()
596567
597568 if len(ret) == 0 {
598569 panic("no return value specified for GtkWidget")
599570 }
600571
601572 var r0 *gtk.Widget
602- if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok {
603- r0 = returnFunc()
573+ if rf, ok := ret.Get(0).(func() *gtk.Widget); ok {
574+ r0 = rf()
604575 } else {
605576 if ret.Get(0) != nil {
606577 r0 = ret.Get(0).(*gtk.Widget)
607578 }
608579 }
580+
609581 return r0
610582 }
611583
@@ -626,8 +598,8 @@ func (_c *MockButtonWidget_GtkWidget_Call) Run(run func()) *MockButtonWidget_Gtk
626598 return _c
627599 }
628600
629-func (_c *MockButtonWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockButtonWidget_GtkWidget_Call {
630- _c.Call.Return(widget)
601+func (_c *MockButtonWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockButtonWidget_GtkWidget_Call {
602+ _c.Call.Return(_a0)
631603 return _c
632604 }
633605
@@ -636,20 +608,21 @@ func (_c *MockButtonWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget)
636608 return _c
637609 }
638610
639-// HasCssClass provides a mock function for the type MockButtonWidget
640-func (_mock *MockButtonWidget) HasCssClass(cssClass string) bool {
641- ret := _mock.Called(cssClass)
611+// HasCssClass provides a mock function with given fields: cssClass
612+func (_m *MockButtonWidget) HasCssClass(cssClass string) bool {
613+ ret := _m.Called(cssClass)
642614
643615 if len(ret) == 0 {
644616 panic("no return value specified for HasCssClass")
645617 }
646618
647619 var r0 bool
648- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
649- r0 = returnFunc(cssClass)
620+ if rf, ok := ret.Get(0).(func(string) bool); ok {
621+ r0 = rf(cssClass)
650622 } else {
651623 r0 = ret.Get(0).(bool)
652624 }
625+
653626 return r0
654627 }
655628
@@ -666,41 +639,36 @@ func (_e *MockButtonWidget_Expecter) HasCssClass(cssClass interface{}) *MockButt
666639
667640 func (_c *MockButtonWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockButtonWidget_HasCssClass_Call {
668641 _c.Call.Run(func(args mock.Arguments) {
669- var arg0 string
670- if args[0] != nil {
671- arg0 = args[0].(string)
672- }
673- run(
674- arg0,
675- )
642+ run(args[0].(string))
676643 })
677644 return _c
678645 }
679646
680-func (_c *MockButtonWidget_HasCssClass_Call) Return(b bool) *MockButtonWidget_HasCssClass_Call {
681- _c.Call.Return(b)
647+func (_c *MockButtonWidget_HasCssClass_Call) Return(_a0 bool) *MockButtonWidget_HasCssClass_Call {
648+ _c.Call.Return(_a0)
682649 return _c
683650 }
684651
685-func (_c *MockButtonWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockButtonWidget_HasCssClass_Call {
652+func (_c *MockButtonWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockButtonWidget_HasCssClass_Call {
686653 _c.Call.Return(run)
687654 return _c
688655 }
689656
690-// HasFocus provides a mock function for the type MockButtonWidget
691-func (_mock *MockButtonWidget) HasFocus() bool {
692- ret := _mock.Called()
657+// HasFocus provides a mock function with no fields
658+func (_m *MockButtonWidget) HasFocus() bool {
659+ ret := _m.Called()
693660
694661 if len(ret) == 0 {
695662 panic("no return value specified for HasFocus")
696663 }
697664
698665 var r0 bool
699- if returnFunc, ok := ret.Get(0).(func() bool); ok {
700- r0 = returnFunc()
666+ if rf, ok := ret.Get(0).(func() bool); ok {
667+ r0 = rf()
701668 } else {
702669 r0 = ret.Get(0).(bool)
703670 }
671+
704672 return r0
705673 }
706674
@@ -721,8 +689,8 @@ func (_c *MockButtonWidget_HasFocus_Call) Run(run func()) *MockButtonWidget_HasF
721689 return _c
722690 }
723691
724-func (_c *MockButtonWidget_HasFocus_Call) Return(b bool) *MockButtonWidget_HasFocus_Call {
725- _c.Call.Return(b)
692+func (_c *MockButtonWidget_HasFocus_Call) Return(_a0 bool) *MockButtonWidget_HasFocus_Call {
693+ _c.Call.Return(_a0)
726694 return _c
727695 }
728696
@@ -731,10 +699,9 @@ func (_c *MockButtonWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockBut
731699 return _c
732700 }
733701
734-// Hide provides a mock function for the type MockButtonWidget
735-func (_mock *MockButtonWidget) Hide() {
736- _mock.Called()
737- return
702+// Hide provides a mock function with no fields
703+func (_m *MockButtonWidget) Hide() {
704+ _m.Called()
738705 }
739706
740707 // MockButtonWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
@@ -764,20 +731,21 @@ func (_c *MockButtonWidget_Hide_Call) RunAndReturn(run func()) *MockButtonWidget
764731 return _c
765732 }
766733
767-// IsVisible provides a mock function for the type MockButtonWidget
768-func (_mock *MockButtonWidget) IsVisible() bool {
769- ret := _mock.Called()
734+// IsVisible provides a mock function with no fields
735+func (_m *MockButtonWidget) IsVisible() bool {
736+ ret := _m.Called()
770737
771738 if len(ret) == 0 {
772739 panic("no return value specified for IsVisible")
773740 }
774741
775742 var r0 bool
776- if returnFunc, ok := ret.Get(0).(func() bool); ok {
777- r0 = returnFunc()
743+ if rf, ok := ret.Get(0).(func() bool); ok {
744+ r0 = rf()
778745 } else {
779746 r0 = ret.Get(0).(bool)
780747 }
748+
781749 return r0
782750 }
783751
@@ -798,8 +766,8 @@ func (_c *MockButtonWidget_IsVisible_Call) Run(run func()) *MockButtonWidget_IsV
798766 return _c
799767 }
800768
801-func (_c *MockButtonWidget_IsVisible_Call) Return(b bool) *MockButtonWidget_IsVisible_Call {
802- _c.Call.Return(b)
769+func (_c *MockButtonWidget_IsVisible_Call) Return(_a0 bool) *MockButtonWidget_IsVisible_Call {
770+ _c.Call.Return(_a0)
803771 return _c
804772 }
805773
@@ -808,10 +776,9 @@ func (_c *MockButtonWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockBu
808776 return _c
809777 }
810778
811-// RemoveCssClass provides a mock function for the type MockButtonWidget
812-func (_mock *MockButtonWidget) RemoveCssClass(cssClass string) {
813- _mock.Called(cssClass)
814- return
779+// RemoveCssClass provides a mock function with given fields: cssClass
780+func (_m *MockButtonWidget) RemoveCssClass(cssClass string) {
781+ _m.Called(cssClass)
815782 }
816783
817784 // MockButtonWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass'
@@ -827,13 +794,7 @@ func (_e *MockButtonWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockB
827794
828795 func (_c *MockButtonWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockButtonWidget_RemoveCssClass_Call {
829796 _c.Call.Run(func(args mock.Arguments) {
830- var arg0 string
831- if args[0] != nil {
832- arg0 = args[0].(string)
833- }
834- run(
835- arg0,
836- )
797+ run(args[0].(string))
837798 })
838799 return _c
839800 }
@@ -843,15 +804,14 @@ func (_c *MockButtonWidget_RemoveCssClass_Call) Return() *MockButtonWidget_Remov
843804 return _c
844805 }
845806
846-func (_c *MockButtonWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockButtonWidget_RemoveCssClass_Call {
807+func (_c *MockButtonWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockButtonWidget_RemoveCssClass_Call {
847808 _c.Run(run)
848809 return _c
849810 }
850811
851-// SetCanFocus provides a mock function for the type MockButtonWidget
852-func (_mock *MockButtonWidget) SetCanFocus(canFocus bool) {
853- _mock.Called(canFocus)
854- return
812+// SetCanFocus provides a mock function with given fields: canFocus
813+func (_m *MockButtonWidget) SetCanFocus(canFocus bool) {
814+ _m.Called(canFocus)
855815 }
856816
857817 // MockButtonWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus'
@@ -867,13 +827,7 @@ func (_e *MockButtonWidget_Expecter) SetCanFocus(canFocus interface{}) *MockButt
867827
868828 func (_c *MockButtonWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockButtonWidget_SetCanFocus_Call {
869829 _c.Call.Run(func(args mock.Arguments) {
870- var arg0 bool
871- if args[0] != nil {
872- arg0 = args[0].(bool)
873- }
874- run(
875- arg0,
876- )
830+ run(args[0].(bool))
877831 })
878832 return _c
879833 }
@@ -883,15 +837,14 @@ func (_c *MockButtonWidget_SetCanFocus_Call) Return() *MockButtonWidget_SetCanFo
883837 return _c
884838 }
885839
886-func (_c *MockButtonWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockButtonWidget_SetCanFocus_Call {
840+func (_c *MockButtonWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetCanFocus_Call {
887841 _c.Run(run)
888842 return _c
889843 }
890844
891-// SetCanTarget provides a mock function for the type MockButtonWidget
892-func (_mock *MockButtonWidget) SetCanTarget(canTarget bool) {
893- _mock.Called(canTarget)
894- return
845+// SetCanTarget provides a mock function with given fields: canTarget
846+func (_m *MockButtonWidget) SetCanTarget(canTarget bool) {
847+ _m.Called(canTarget)
895848 }
896849
897850 // MockButtonWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget'
@@ -907,13 +860,7 @@ func (_e *MockButtonWidget_Expecter) SetCanTarget(canTarget interface{}) *MockBu
907860
908861 func (_c *MockButtonWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockButtonWidget_SetCanTarget_Call {
909862 _c.Call.Run(func(args mock.Arguments) {
910- var arg0 bool
911- if args[0] != nil {
912- arg0 = args[0].(bool)
913- }
914- run(
915- arg0,
916- )
863+ run(args[0].(bool))
917864 })
918865 return _c
919866 }
@@ -923,15 +870,14 @@ func (_c *MockButtonWidget_SetCanTarget_Call) Return() *MockButtonWidget_SetCanT
923870 return _c
924871 }
925872
926-func (_c *MockButtonWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockButtonWidget_SetCanTarget_Call {
873+func (_c *MockButtonWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetCanTarget_Call {
927874 _c.Run(run)
928875 return _c
929876 }
930877
931-// SetChild provides a mock function for the type MockButtonWidget
932-func (_mock *MockButtonWidget) SetChild(child layout.Widget) {
933- _mock.Called(child)
934- return
878+// SetChild provides a mock function with given fields: child
879+func (_m *MockButtonWidget) SetChild(child layout.Widget) {
880+ _m.Called(child)
935881 }
936882
937883 // MockButtonWidget_SetChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetChild'
@@ -947,13 +893,7 @@ func (_e *MockButtonWidget_Expecter) SetChild(child interface{}) *MockButtonWidg
947893
948894 func (_c *MockButtonWidget_SetChild_Call) Run(run func(child layout.Widget)) *MockButtonWidget_SetChild_Call {
949895 _c.Call.Run(func(args mock.Arguments) {
950- var arg0 layout.Widget
951- if args[0] != nil {
952- arg0 = args[0].(layout.Widget)
953- }
954- run(
955- arg0,
956- )
896+ run(args[0].(layout.Widget))
957897 })
958898 return _c
959899 }
@@ -963,15 +903,14 @@ func (_c *MockButtonWidget_SetChild_Call) Return() *MockButtonWidget_SetChild_Ca
963903 return _c
964904 }
965905
966-func (_c *MockButtonWidget_SetChild_Call) RunAndReturn(run func(child layout.Widget)) *MockButtonWidget_SetChild_Call {
906+func (_c *MockButtonWidget_SetChild_Call) RunAndReturn(run func(layout.Widget)) *MockButtonWidget_SetChild_Call {
967907 _c.Run(run)
968908 return _c
969909 }
970910
971-// SetFocusOnClick provides a mock function for the type MockButtonWidget
972-func (_mock *MockButtonWidget) SetFocusOnClick(focusOnClick bool) {
973- _mock.Called(focusOnClick)
974- return
911+// SetFocusOnClick provides a mock function with given fields: focusOnClick
912+func (_m *MockButtonWidget) SetFocusOnClick(focusOnClick bool) {
913+ _m.Called(focusOnClick)
975914 }
976915
977916 // MockButtonWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick'
@@ -987,13 +926,7 @@ func (_e *MockButtonWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *
987926
988927 func (_c *MockButtonWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockButtonWidget_SetFocusOnClick_Call {
989928 _c.Call.Run(func(args mock.Arguments) {
990- var arg0 bool
991- if args[0] != nil {
992- arg0 = args[0].(bool)
993- }
994- run(
995- arg0,
996- )
929+ run(args[0].(bool))
997930 })
998931 return _c
999932 }
@@ -1003,15 +936,14 @@ func (_c *MockButtonWidget_SetFocusOnClick_Call) Return() *MockButtonWidget_SetF
1003936 return _c
1004937 }
1005938
1006-func (_c *MockButtonWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockButtonWidget_SetFocusOnClick_Call {
939+func (_c *MockButtonWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetFocusOnClick_Call {
1007940 _c.Run(run)
1008941 return _c
1009942 }
1010943
1011-// SetHalign provides a mock function for the type MockButtonWidget
1012-func (_mock *MockButtonWidget) SetHalign(align gtk.Align) {
1013- _mock.Called(align)
1014- return
944+// SetHalign provides a mock function with given fields: align
945+func (_m *MockButtonWidget) SetHalign(align gtk.Align) {
946+ _m.Called(align)
1015947 }
1016948
1017949 // MockButtonWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign'
@@ -1027,13 +959,7 @@ func (_e *MockButtonWidget_Expecter) SetHalign(align interface{}) *MockButtonWid
1027959
1028960 func (_c *MockButtonWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockButtonWidget_SetHalign_Call {
1029961 _c.Call.Run(func(args mock.Arguments) {
1030- var arg0 gtk.Align
1031- if args[0] != nil {
1032- arg0 = args[0].(gtk.Align)
1033- }
1034- run(
1035- arg0,
1036- )
962+ run(args[0].(gtk.Align))
1037963 })
1038964 return _c
1039965 }
@@ -1043,15 +969,14 @@ func (_c *MockButtonWidget_SetHalign_Call) Return() *MockButtonWidget_SetHalign_
1043969 return _c
1044970 }
1045971
1046-func (_c *MockButtonWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockButtonWidget_SetHalign_Call {
972+func (_c *MockButtonWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockButtonWidget_SetHalign_Call {
1047973 _c.Run(run)
1048974 return _c
1049975 }
1050976
1051-// SetHexpand provides a mock function for the type MockButtonWidget
1052-func (_mock *MockButtonWidget) SetHexpand(expand bool) {
1053- _mock.Called(expand)
1054- return
977+// SetHexpand provides a mock function with given fields: expand
978+func (_m *MockButtonWidget) SetHexpand(expand bool) {
979+ _m.Called(expand)
1055980 }
1056981
1057982 // MockButtonWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand'
@@ -1067,13 +992,7 @@ func (_e *MockButtonWidget_Expecter) SetHexpand(expand interface{}) *MockButtonW
1067992
1068993 func (_c *MockButtonWidget_SetHexpand_Call) Run(run func(expand bool)) *MockButtonWidget_SetHexpand_Call {
1069994 _c.Call.Run(func(args mock.Arguments) {
1070- var arg0 bool
1071- if args[0] != nil {
1072- arg0 = args[0].(bool)
1073- }
1074- run(
1075- arg0,
1076- )
995+ run(args[0].(bool))
1077996 })
1078997 return _c
1079998 }
@@ -1083,15 +1002,14 @@ func (_c *MockButtonWidget_SetHexpand_Call) Return() *MockButtonWidget_SetHexpan
10831002 return _c
10841003 }
10851004
1086-func (_c *MockButtonWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockButtonWidget_SetHexpand_Call {
1005+func (_c *MockButtonWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetHexpand_Call {
10871006 _c.Run(run)
10881007 return _c
10891008 }
10901009
1091-// SetLabel provides a mock function for the type MockButtonWidget
1092-func (_mock *MockButtonWidget) SetLabel(label string) {
1093- _mock.Called(label)
1094- return
1010+// SetLabel provides a mock function with given fields: label
1011+func (_m *MockButtonWidget) SetLabel(label string) {
1012+ _m.Called(label)
10951013 }
10961014
10971015 // MockButtonWidget_SetLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLabel'
@@ -1107,13 +1025,7 @@ func (_e *MockButtonWidget_Expecter) SetLabel(label interface{}) *MockButtonWidg
11071025
11081026 func (_c *MockButtonWidget_SetLabel_Call) Run(run func(label string)) *MockButtonWidget_SetLabel_Call {
11091027 _c.Call.Run(func(args mock.Arguments) {
1110- var arg0 string
1111- if args[0] != nil {
1112- arg0 = args[0].(string)
1113- }
1114- run(
1115- arg0,
1116- )
1028+ run(args[0].(string))
11171029 })
11181030 return _c
11191031 }
@@ -1123,15 +1035,14 @@ func (_c *MockButtonWidget_SetLabel_Call) Return() *MockButtonWidget_SetLabel_Ca
11231035 return _c
11241036 }
11251037
1126-func (_c *MockButtonWidget_SetLabel_Call) RunAndReturn(run func(label string)) *MockButtonWidget_SetLabel_Call {
1038+func (_c *MockButtonWidget_SetLabel_Call) RunAndReturn(run func(string)) *MockButtonWidget_SetLabel_Call {
11271039 _c.Run(run)
11281040 return _c
11291041 }
11301042
1131-// SetSizeRequest provides a mock function for the type MockButtonWidget
1132-func (_mock *MockButtonWidget) SetSizeRequest(width int, height int) {
1133- _mock.Called(width, height)
1134- return
1043+// SetSizeRequest provides a mock function with given fields: width, height
1044+func (_m *MockButtonWidget) SetSizeRequest(width int, height int) {
1045+ _m.Called(width, height)
11351046 }
11361047
11371048 // MockButtonWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest'
@@ -1148,18 +1059,7 @@ func (_e *MockButtonWidget_Expecter) SetSizeRequest(width interface{}, height in
11481059
11491060 func (_c *MockButtonWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockButtonWidget_SetSizeRequest_Call {
11501061 _c.Call.Run(func(args mock.Arguments) {
1151- var arg0 int
1152- if args[0] != nil {
1153- arg0 = args[0].(int)
1154- }
1155- var arg1 int
1156- if args[1] != nil {
1157- arg1 = args[1].(int)
1158- }
1159- run(
1160- arg0,
1161- arg1,
1162- )
1062+ run(args[0].(int), args[1].(int))
11631063 })
11641064 return _c
11651065 }
@@ -1169,15 +1069,14 @@ func (_c *MockButtonWidget_SetSizeRequest_Call) Return() *MockButtonWidget_SetSi
11691069 return _c
11701070 }
11711071
1172-func (_c *MockButtonWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockButtonWidget_SetSizeRequest_Call {
1072+func (_c *MockButtonWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockButtonWidget_SetSizeRequest_Call {
11731073 _c.Run(run)
11741074 return _c
11751075 }
11761076
1177-// SetValign provides a mock function for the type MockButtonWidget
1178-func (_mock *MockButtonWidget) SetValign(align gtk.Align) {
1179- _mock.Called(align)
1180- return
1077+// SetValign provides a mock function with given fields: align
1078+func (_m *MockButtonWidget) SetValign(align gtk.Align) {
1079+ _m.Called(align)
11811080 }
11821081
11831082 // MockButtonWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign'
@@ -1193,13 +1092,7 @@ func (_e *MockButtonWidget_Expecter) SetValign(align interface{}) *MockButtonWid
11931092
11941093 func (_c *MockButtonWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockButtonWidget_SetValign_Call {
11951094 _c.Call.Run(func(args mock.Arguments) {
1196- var arg0 gtk.Align
1197- if args[0] != nil {
1198- arg0 = args[0].(gtk.Align)
1199- }
1200- run(
1201- arg0,
1202- )
1095+ run(args[0].(gtk.Align))
12031096 })
12041097 return _c
12051098 }
@@ -1209,15 +1102,14 @@ func (_c *MockButtonWidget_SetValign_Call) Return() *MockButtonWidget_SetValign_
12091102 return _c
12101103 }
12111104
1212-func (_c *MockButtonWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockButtonWidget_SetValign_Call {
1105+func (_c *MockButtonWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockButtonWidget_SetValign_Call {
12131106 _c.Run(run)
12141107 return _c
12151108 }
12161109
1217-// SetVexpand provides a mock function for the type MockButtonWidget
1218-func (_mock *MockButtonWidget) SetVexpand(expand bool) {
1219- _mock.Called(expand)
1220- return
1110+// SetVexpand provides a mock function with given fields: expand
1111+func (_m *MockButtonWidget) SetVexpand(expand bool) {
1112+ _m.Called(expand)
12211113 }
12221114
12231115 // MockButtonWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand'
@@ -1233,13 +1125,7 @@ func (_e *MockButtonWidget_Expecter) SetVexpand(expand interface{}) *MockButtonW
12331125
12341126 func (_c *MockButtonWidget_SetVexpand_Call) Run(run func(expand bool)) *MockButtonWidget_SetVexpand_Call {
12351127 _c.Call.Run(func(args mock.Arguments) {
1236- var arg0 bool
1237- if args[0] != nil {
1238- arg0 = args[0].(bool)
1239- }
1240- run(
1241- arg0,
1242- )
1128+ run(args[0].(bool))
12431129 })
12441130 return _c
12451131 }
@@ -1249,15 +1135,14 @@ func (_c *MockButtonWidget_SetVexpand_Call) Return() *MockButtonWidget_SetVexpan
12491135 return _c
12501136 }
12511137
1252-func (_c *MockButtonWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockButtonWidget_SetVexpand_Call {
1138+func (_c *MockButtonWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetVexpand_Call {
12531139 _c.Run(run)
12541140 return _c
12551141 }
12561142
1257-// SetVisible provides a mock function for the type MockButtonWidget
1258-func (_mock *MockButtonWidget) SetVisible(visible bool) {
1259- _mock.Called(visible)
1260- return
1143+// SetVisible provides a mock function with given fields: visible
1144+func (_m *MockButtonWidget) SetVisible(visible bool) {
1145+ _m.Called(visible)
12611146 }
12621147
12631148 // MockButtonWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible'
@@ -1273,13 +1158,7 @@ func (_e *MockButtonWidget_Expecter) SetVisible(visible interface{}) *MockButton
12731158
12741159 func (_c *MockButtonWidget_SetVisible_Call) Run(run func(visible bool)) *MockButtonWidget_SetVisible_Call {
12751160 _c.Call.Run(func(args mock.Arguments) {
1276- var arg0 bool
1277- if args[0] != nil {
1278- arg0 = args[0].(bool)
1279- }
1280- run(
1281- arg0,
1282- )
1161+ run(args[0].(bool))
12831162 })
12841163 return _c
12851164 }
@@ -1289,15 +1168,14 @@ func (_c *MockButtonWidget_SetVisible_Call) Return() *MockButtonWidget_SetVisibl
12891168 return _c
12901169 }
12911170
1292-func (_c *MockButtonWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockButtonWidget_SetVisible_Call {
1171+func (_c *MockButtonWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetVisible_Call {
12931172 _c.Run(run)
12941173 return _c
12951174 }
12961175
1297-// Show provides a mock function for the type MockButtonWidget
1298-func (_mock *MockButtonWidget) Show() {
1299- _mock.Called()
1300- return
1176+// Show provides a mock function with no fields
1177+func (_m *MockButtonWidget) Show() {
1178+ _m.Called()
13011179 }
13021180
13031181 // MockButtonWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
@@ -1327,10 +1205,9 @@ func (_c *MockButtonWidget_Show_Call) RunAndReturn(run func()) *MockButtonWidget
13271205 return _c
13281206 }
13291207
1330-// Unparent provides a mock function for the type MockButtonWidget
1331-func (_mock *MockButtonWidget) Unparent() {
1332- _mock.Called()
1333- return
1208+// Unparent provides a mock function with no fields
1209+func (_m *MockButtonWidget) Unparent() {
1210+ _m.Called()
13341211 }
13351212
13361213 // MockButtonWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent'
@@ -1359,3 +1236,17 @@ func (_c *MockButtonWidget_Unparent_Call) RunAndReturn(run func()) *MockButtonWi
13591236 _c.Run(run)
13601237 return _c
13611238 }
1239+
1240+// NewMockButtonWidget creates a new instance of MockButtonWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1241+// The first argument is typically a *testing.T value.
1242+func NewMockButtonWidget(t interface {
1243+ mock.TestingT
1244+ Cleanup(func())
1245+}) *MockButtonWidget {
1246+ mock := &MockButtonWidget{}
1247+ mock.Mock.Test(t)
1248+
1249+ t.Cleanup(func() { mock.AssertExpectations(t) })
1250+
1251+ return mock
1252+}
M internal/ui/layout/mocks/mock_image_widget.go +208 -329
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// NewMockImageWidget creates a new instance of MockImageWidget. 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 NewMockImageWidget(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockImageWidget {
19- mock := &MockImageWidget{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockImageWidget is an autogenerated mock type for the ImageWidget type
2813 type MockImageWidget struct {
2914 mock.Mock
@@ -37,10 +22,9 @@ func (_m *MockImageWidget) EXPECT() *MockImageWidget_Expecter {
3722 return &MockImageWidget_Expecter{mock: &_m.Mock}
3823 }
3924
40-// AddController provides a mock function for the type MockImageWidget
41-func (_mock *MockImageWidget) AddController(controller *gtk.EventController) {
42- _mock.Called(controller)
43- return
25+// AddController provides a mock function with given fields: controller
26+func (_m *MockImageWidget) AddController(controller *gtk.EventController) {
27+ _m.Called(controller)
4428 }
4529
4630 // MockImageWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController'
@@ -56,13 +40,7 @@ func (_e *MockImageWidget_Expecter) AddController(controller interface{}) *MockI
5640
5741 func (_c *MockImageWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockImageWidget_AddController_Call {
5842 _c.Call.Run(func(args mock.Arguments) {
59- var arg0 *gtk.EventController
60- if args[0] != nil {
61- arg0 = args[0].(*gtk.EventController)
62- }
63- run(
64- arg0,
65- )
43+ run(args[0].(*gtk.EventController))
6644 })
6745 return _c
6846 }
@@ -72,15 +50,14 @@ func (_c *MockImageWidget_AddController_Call) Return() *MockImageWidget_AddContr
7250 return _c
7351 }
7452
75-func (_c *MockImageWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockImageWidget_AddController_Call {
53+func (_c *MockImageWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockImageWidget_AddController_Call {
7654 _c.Run(run)
7755 return _c
7856 }
7957
80-// AddCssClass provides a mock function for the type MockImageWidget
81-func (_mock *MockImageWidget) AddCssClass(cssClass string) {
82- _mock.Called(cssClass)
83- return
58+// AddCssClass provides a mock function with given fields: cssClass
59+func (_m *MockImageWidget) AddCssClass(cssClass string) {
60+ _m.Called(cssClass)
8461 }
8562
8663 // MockImageWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass'
@@ -96,13 +73,7 @@ func (_e *MockImageWidget_Expecter) AddCssClass(cssClass interface{}) *MockImage
9673
9774 func (_c *MockImageWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockImageWidget_AddCssClass_Call {
9875 _c.Call.Run(func(args mock.Arguments) {
99- var arg0 string
100- if args[0] != nil {
101- arg0 = args[0].(string)
102- }
103- run(
104- arg0,
105- )
76+ run(args[0].(string))
10677 })
10778 return _c
10879 }
@@ -112,15 +83,14 @@ func (_c *MockImageWidget_AddCssClass_Call) Return() *MockImageWidget_AddCssClas
11283 return _c
11384 }
11485
115-func (_c *MockImageWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockImageWidget_AddCssClass_Call {
86+func (_c *MockImageWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockImageWidget_AddCssClass_Call {
11687 _c.Run(run)
11788 return _c
11889 }
11990
120-// Clear provides a mock function for the type MockImageWidget
121-func (_mock *MockImageWidget) Clear() {
122- _mock.Called()
123- return
91+// Clear provides a mock function with no fields
92+func (_m *MockImageWidget) Clear() {
93+ _m.Called()
12494 }
12595
12696 // MockImageWidget_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
@@ -150,9 +120,9 @@ func (_c *MockImageWidget_Clear_Call) RunAndReturn(run func()) *MockImageWidget_
150120 return _c
151121 }
152122
153-// ComputePoint provides a mock function for the type MockImageWidget
154-func (_mock *MockImageWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
155- ret := _mock.Called(target)
123+// ComputePoint provides a mock function with given fields: target
124+func (_m *MockImageWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
125+ ret := _m.Called(target)
156126
157127 if len(ret) == 0 {
158128 panic("no return value specified for ComputePoint")
@@ -161,24 +131,27 @@ func (_mock *MockImageWidget) ComputePoint(target layout.Widget) (float64, float
161131 var r0 float64
162132 var r1 float64
163133 var r2 bool
164- if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
165- return returnFunc(target)
134+ if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
135+ return rf(target)
166136 }
167- if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok {
168- r0 = returnFunc(target)
137+ if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok {
138+ r0 = rf(target)
169139 } else {
170140 r0 = ret.Get(0).(float64)
171141 }
172- if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok {
173- r1 = returnFunc(target)
142+
143+ if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok {
144+ r1 = rf(target)
174145 } else {
175146 r1 = ret.Get(1).(float64)
176147 }
177- if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok {
178- r2 = returnFunc(target)
148+
149+ if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok {
150+ r2 = rf(target)
179151 } else {
180152 r2 = ret.Get(2).(bool)
181153 }
154+
182155 return r0, r1, r2
183156 }
184157
@@ -195,13 +168,7 @@ func (_e *MockImageWidget_Expecter) ComputePoint(target interface{}) *MockImageW
195168
196169 func (_c *MockImageWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockImageWidget_ComputePoint_Call {
197170 _c.Call.Run(func(args mock.Arguments) {
198- var arg0 layout.Widget
199- if args[0] != nil {
200- arg0 = args[0].(layout.Widget)
201- }
202- run(
203- arg0,
204- )
171+ run(args[0].(layout.Widget))
205172 })
206173 return _c
207174 }
@@ -211,25 +178,26 @@ func (_c *MockImageWidget_ComputePoint_Call) Return(x float64, y float64, ok boo
211178 return _c
212179 }
213180
214-func (_c *MockImageWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockImageWidget_ComputePoint_Call {
181+func (_c *MockImageWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockImageWidget_ComputePoint_Call {
215182 _c.Call.Return(run)
216183 return _c
217184 }
218185
219-// GetAllocatedHeight provides a mock function for the type MockImageWidget
220-func (_mock *MockImageWidget) GetAllocatedHeight() int {
221- ret := _mock.Called()
186+// GetAllocatedHeight provides a mock function with no fields
187+func (_m *MockImageWidget) GetAllocatedHeight() int {
188+ ret := _m.Called()
222189
223190 if len(ret) == 0 {
224191 panic("no return value specified for GetAllocatedHeight")
225192 }
226193
227194 var r0 int
228- if returnFunc, ok := ret.Get(0).(func() int); ok {
229- r0 = returnFunc()
195+ if rf, ok := ret.Get(0).(func() int); ok {
196+ r0 = rf()
230197 } else {
231198 r0 = ret.Get(0).(int)
232199 }
200+
233201 return r0
234202 }
235203
@@ -250,8 +218,8 @@ func (_c *MockImageWidget_GetAllocatedHeight_Call) Run(run func()) *MockImageWid
250218 return _c
251219 }
252220
253-func (_c *MockImageWidget_GetAllocatedHeight_Call) Return(n int) *MockImageWidget_GetAllocatedHeight_Call {
254- _c.Call.Return(n)
221+func (_c *MockImageWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockImageWidget_GetAllocatedHeight_Call {
222+ _c.Call.Return(_a0)
255223 return _c
256224 }
257225
@@ -260,20 +228,21 @@ func (_c *MockImageWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int)
260228 return _c
261229 }
262230
263-// GetAllocatedWidth provides a mock function for the type MockImageWidget
264-func (_mock *MockImageWidget) GetAllocatedWidth() int {
265- ret := _mock.Called()
231+// GetAllocatedWidth provides a mock function with no fields
232+func (_m *MockImageWidget) GetAllocatedWidth() int {
233+ ret := _m.Called()
266234
267235 if len(ret) == 0 {
268236 panic("no return value specified for GetAllocatedWidth")
269237 }
270238
271239 var r0 int
272- if returnFunc, ok := ret.Get(0).(func() int); ok {
273- r0 = returnFunc()
240+ if rf, ok := ret.Get(0).(func() int); ok {
241+ r0 = rf()
274242 } else {
275243 r0 = ret.Get(0).(int)
276244 }
245+
277246 return r0
278247 }
279248
@@ -294,8 +263,8 @@ func (_c *MockImageWidget_GetAllocatedWidth_Call) Run(run func()) *MockImageWidg
294263 return _c
295264 }
296265
297-func (_c *MockImageWidget_GetAllocatedWidth_Call) Return(n int) *MockImageWidget_GetAllocatedWidth_Call {
298- _c.Call.Return(n)
266+func (_c *MockImageWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockImageWidget_GetAllocatedWidth_Call {
267+ _c.Call.Return(_a0)
299268 return _c
300269 }
301270
@@ -304,20 +273,21 @@ func (_c *MockImageWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) *
304273 return _c
305274 }
306275
307-// GetHexpand provides a mock function for the type MockImageWidget
308-func (_mock *MockImageWidget) GetHexpand() bool {
309- ret := _mock.Called()
276+// GetHexpand provides a mock function with no fields
277+func (_m *MockImageWidget) GetHexpand() bool {
278+ ret := _m.Called()
310279
311280 if len(ret) == 0 {
312281 panic("no return value specified for GetHexpand")
313282 }
314283
315284 var r0 bool
316- if returnFunc, ok := ret.Get(0).(func() bool); ok {
317- r0 = returnFunc()
285+ if rf, ok := ret.Get(0).(func() bool); ok {
286+ r0 = rf()
318287 } else {
319288 r0 = ret.Get(0).(bool)
320289 }
290+
321291 return r0
322292 }
323293
@@ -338,8 +308,8 @@ func (_c *MockImageWidget_GetHexpand_Call) Run(run func()) *MockImageWidget_GetH
338308 return _c
339309 }
340310
341-func (_c *MockImageWidget_GetHexpand_Call) Return(b bool) *MockImageWidget_GetHexpand_Call {
342- _c.Call.Return(b)
311+func (_c *MockImageWidget_GetHexpand_Call) Return(_a0 bool) *MockImageWidget_GetHexpand_Call {
312+ _c.Call.Return(_a0)
343313 return _c
344314 }
345315
@@ -348,22 +318,23 @@ func (_c *MockImageWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockIm
348318 return _c
349319 }
350320
351-// GetParent provides a mock function for the type MockImageWidget
352-func (_mock *MockImageWidget) GetParent() layout.Widget {
353- ret := _mock.Called()
321+// GetParent provides a mock function with no fields
322+func (_m *MockImageWidget) GetParent() layout.Widget {
323+ ret := _m.Called()
354324
355325 if len(ret) == 0 {
356326 panic("no return value specified for GetParent")
357327 }
358328
359329 var r0 layout.Widget
360- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
361- r0 = returnFunc()
330+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
331+ r0 = rf()
362332 } else {
363333 if ret.Get(0) != nil {
364334 r0 = ret.Get(0).(layout.Widget)
365335 }
366336 }
337+
367338 return r0
368339 }
369340
@@ -384,8 +355,8 @@ func (_c *MockImageWidget_GetParent_Call) Run(run func()) *MockImageWidget_GetPa
384355 return _c
385356 }
386357
387-func (_c *MockImageWidget_GetParent_Call) Return(widget layout.Widget) *MockImageWidget_GetParent_Call {
388- _c.Call.Return(widget)
358+func (_c *MockImageWidget_GetParent_Call) Return(_a0 layout.Widget) *MockImageWidget_GetParent_Call {
359+ _c.Call.Return(_a0)
389360 return _c
390361 }
391362
@@ -394,20 +365,21 @@ func (_c *MockImageWidget_GetParent_Call) RunAndReturn(run func() layout.Widget)
394365 return _c
395366 }
396367
397-// GetVexpand provides a mock function for the type MockImageWidget
398-func (_mock *MockImageWidget) GetVexpand() bool {
399- ret := _mock.Called()
368+// GetVexpand provides a mock function with no fields
369+func (_m *MockImageWidget) GetVexpand() bool {
370+ ret := _m.Called()
400371
401372 if len(ret) == 0 {
402373 panic("no return value specified for GetVexpand")
403374 }
404375
405376 var r0 bool
406- if returnFunc, ok := ret.Get(0).(func() bool); ok {
407- r0 = returnFunc()
377+ if rf, ok := ret.Get(0).(func() bool); ok {
378+ r0 = rf()
408379 } else {
409380 r0 = ret.Get(0).(bool)
410381 }
382+
411383 return r0
412384 }
413385
@@ -428,8 +400,8 @@ func (_c *MockImageWidget_GetVexpand_Call) Run(run func()) *MockImageWidget_GetV
428400 return _c
429401 }
430402
431-func (_c *MockImageWidget_GetVexpand_Call) Return(b bool) *MockImageWidget_GetVexpand_Call {
432- _c.Call.Return(b)
403+func (_c *MockImageWidget_GetVexpand_Call) Return(_a0 bool) *MockImageWidget_GetVexpand_Call {
404+ _c.Call.Return(_a0)
433405 return _c
434406 }
435407
@@ -438,20 +410,21 @@ func (_c *MockImageWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockIm
438410 return _c
439411 }
440412
441-// GrabFocus provides a mock function for the type MockImageWidget
442-func (_mock *MockImageWidget) GrabFocus() bool {
443- ret := _mock.Called()
413+// GrabFocus provides a mock function with no fields
414+func (_m *MockImageWidget) GrabFocus() bool {
415+ ret := _m.Called()
444416
445417 if len(ret) == 0 {
446418 panic("no return value specified for GrabFocus")
447419 }
448420
449421 var r0 bool
450- if returnFunc, ok := ret.Get(0).(func() bool); ok {
451- r0 = returnFunc()
422+ if rf, ok := ret.Get(0).(func() bool); ok {
423+ r0 = rf()
452424 } else {
453425 r0 = ret.Get(0).(bool)
454426 }
427+
455428 return r0
456429 }
457430
@@ -472,8 +445,8 @@ func (_c *MockImageWidget_GrabFocus_Call) Run(run func()) *MockImageWidget_GrabF
472445 return _c
473446 }
474447
475-func (_c *MockImageWidget_GrabFocus_Call) Return(b bool) *MockImageWidget_GrabFocus_Call {
476- _c.Call.Return(b)
448+func (_c *MockImageWidget_GrabFocus_Call) Return(_a0 bool) *MockImageWidget_GrabFocus_Call {
449+ _c.Call.Return(_a0)
477450 return _c
478451 }
479452
@@ -482,22 +455,23 @@ func (_c *MockImageWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockIma
482455 return _c
483456 }
484457
485-// GtkWidget provides a mock function for the type MockImageWidget
486-func (_mock *MockImageWidget) GtkWidget() *gtk.Widget {
487- ret := _mock.Called()
458+// GtkWidget provides a mock function with no fields
459+func (_m *MockImageWidget) GtkWidget() *gtk.Widget {
460+ ret := _m.Called()
488461
489462 if len(ret) == 0 {
490463 panic("no return value specified for GtkWidget")
491464 }
492465
493466 var r0 *gtk.Widget
494- if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok {
495- r0 = returnFunc()
467+ if rf, ok := ret.Get(0).(func() *gtk.Widget); ok {
468+ r0 = rf()
496469 } else {
497470 if ret.Get(0) != nil {
498471 r0 = ret.Get(0).(*gtk.Widget)
499472 }
500473 }
474+
501475 return r0
502476 }
503477
@@ -518,8 +492,8 @@ func (_c *MockImageWidget_GtkWidget_Call) Run(run func()) *MockImageWidget_GtkWi
518492 return _c
519493 }
520494
521-func (_c *MockImageWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockImageWidget_GtkWidget_Call {
522- _c.Call.Return(widget)
495+func (_c *MockImageWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockImageWidget_GtkWidget_Call {
496+ _c.Call.Return(_a0)
523497 return _c
524498 }
525499
@@ -528,20 +502,21 @@ func (_c *MockImageWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) *
528502 return _c
529503 }
530504
531-// HasCssClass provides a mock function for the type MockImageWidget
532-func (_mock *MockImageWidget) HasCssClass(cssClass string) bool {
533- ret := _mock.Called(cssClass)
505+// HasCssClass provides a mock function with given fields: cssClass
506+func (_m *MockImageWidget) HasCssClass(cssClass string) bool {
507+ ret := _m.Called(cssClass)
534508
535509 if len(ret) == 0 {
536510 panic("no return value specified for HasCssClass")
537511 }
538512
539513 var r0 bool
540- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
541- r0 = returnFunc(cssClass)
514+ if rf, ok := ret.Get(0).(func(string) bool); ok {
515+ r0 = rf(cssClass)
542516 } else {
543517 r0 = ret.Get(0).(bool)
544518 }
519+
545520 return r0
546521 }
547522
@@ -558,41 +533,36 @@ func (_e *MockImageWidget_Expecter) HasCssClass(cssClass interface{}) *MockImage
558533
559534 func (_c *MockImageWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockImageWidget_HasCssClass_Call {
560535 _c.Call.Run(func(args mock.Arguments) {
561- var arg0 string
562- if args[0] != nil {
563- arg0 = args[0].(string)
564- }
565- run(
566- arg0,
567- )
536+ run(args[0].(string))
568537 })
569538 return _c
570539 }
571540
572-func (_c *MockImageWidget_HasCssClass_Call) Return(b bool) *MockImageWidget_HasCssClass_Call {
573- _c.Call.Return(b)
541+func (_c *MockImageWidget_HasCssClass_Call) Return(_a0 bool) *MockImageWidget_HasCssClass_Call {
542+ _c.Call.Return(_a0)
574543 return _c
575544 }
576545
577-func (_c *MockImageWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockImageWidget_HasCssClass_Call {
546+func (_c *MockImageWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockImageWidget_HasCssClass_Call {
578547 _c.Call.Return(run)
579548 return _c
580549 }
581550
582-// HasFocus provides a mock function for the type MockImageWidget
583-func (_mock *MockImageWidget) HasFocus() bool {
584- ret := _mock.Called()
551+// HasFocus provides a mock function with no fields
552+func (_m *MockImageWidget) HasFocus() bool {
553+ ret := _m.Called()
585554
586555 if len(ret) == 0 {
587556 panic("no return value specified for HasFocus")
588557 }
589558
590559 var r0 bool
591- if returnFunc, ok := ret.Get(0).(func() bool); ok {
592- r0 = returnFunc()
560+ if rf, ok := ret.Get(0).(func() bool); ok {
561+ r0 = rf()
593562 } else {
594563 r0 = ret.Get(0).(bool)
595564 }
565+
596566 return r0
597567 }
598568
@@ -613,8 +583,8 @@ func (_c *MockImageWidget_HasFocus_Call) Run(run func()) *MockImageWidget_HasFoc
613583 return _c
614584 }
615585
616-func (_c *MockImageWidget_HasFocus_Call) Return(b bool) *MockImageWidget_HasFocus_Call {
617- _c.Call.Return(b)
586+func (_c *MockImageWidget_HasFocus_Call) Return(_a0 bool) *MockImageWidget_HasFocus_Call {
587+ _c.Call.Return(_a0)
618588 return _c
619589 }
620590
@@ -623,10 +593,9 @@ func (_c *MockImageWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockImag
623593 return _c
624594 }
625595
626-// Hide provides a mock function for the type MockImageWidget
627-func (_mock *MockImageWidget) Hide() {
628- _mock.Called()
629- return
596+// Hide provides a mock function with no fields
597+func (_m *MockImageWidget) Hide() {
598+ _m.Called()
630599 }
631600
632601 // MockImageWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
@@ -656,20 +625,21 @@ func (_c *MockImageWidget_Hide_Call) RunAndReturn(run func()) *MockImageWidget_H
656625 return _c
657626 }
658627
659-// IsVisible provides a mock function for the type MockImageWidget
660-func (_mock *MockImageWidget) IsVisible() bool {
661- ret := _mock.Called()
628+// IsVisible provides a mock function with no fields
629+func (_m *MockImageWidget) IsVisible() bool {
630+ ret := _m.Called()
662631
663632 if len(ret) == 0 {
664633 panic("no return value specified for IsVisible")
665634 }
666635
667636 var r0 bool
668- if returnFunc, ok := ret.Get(0).(func() bool); ok {
669- r0 = returnFunc()
637+ if rf, ok := ret.Get(0).(func() bool); ok {
638+ r0 = rf()
670639 } else {
671640 r0 = ret.Get(0).(bool)
672641 }
642+
673643 return r0
674644 }
675645
@@ -690,8 +660,8 @@ func (_c *MockImageWidget_IsVisible_Call) Run(run func()) *MockImageWidget_IsVis
690660 return _c
691661 }
692662
693-func (_c *MockImageWidget_IsVisible_Call) Return(b bool) *MockImageWidget_IsVisible_Call {
694- _c.Call.Return(b)
663+func (_c *MockImageWidget_IsVisible_Call) Return(_a0 bool) *MockImageWidget_IsVisible_Call {
664+ _c.Call.Return(_a0)
695665 return _c
696666 }
697667
@@ -700,10 +670,9 @@ func (_c *MockImageWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockIma
700670 return _c
701671 }
702672
703-// RemoveCssClass provides a mock function for the type MockImageWidget
704-func (_mock *MockImageWidget) RemoveCssClass(cssClass string) {
705- _mock.Called(cssClass)
706- return
673+// RemoveCssClass provides a mock function with given fields: cssClass
674+func (_m *MockImageWidget) RemoveCssClass(cssClass string) {
675+ _m.Called(cssClass)
707676 }
708677
709678 // MockImageWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass'
@@ -719,13 +688,7 @@ func (_e *MockImageWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockIm
719688
720689 func (_c *MockImageWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockImageWidget_RemoveCssClass_Call {
721690 _c.Call.Run(func(args mock.Arguments) {
722- var arg0 string
723- if args[0] != nil {
724- arg0 = args[0].(string)
725- }
726- run(
727- arg0,
728- )
691+ run(args[0].(string))
729692 })
730693 return _c
731694 }
@@ -735,15 +698,14 @@ func (_c *MockImageWidget_RemoveCssClass_Call) Return() *MockImageWidget_RemoveC
735698 return _c
736699 }
737700
738-func (_c *MockImageWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockImageWidget_RemoveCssClass_Call {
701+func (_c *MockImageWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockImageWidget_RemoveCssClass_Call {
739702 _c.Run(run)
740703 return _c
741704 }
742705
743-// SetCanFocus provides a mock function for the type MockImageWidget
744-func (_mock *MockImageWidget) SetCanFocus(canFocus bool) {
745- _mock.Called(canFocus)
746- return
706+// SetCanFocus provides a mock function with given fields: canFocus
707+func (_m *MockImageWidget) SetCanFocus(canFocus bool) {
708+ _m.Called(canFocus)
747709 }
748710
749711 // MockImageWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus'
@@ -759,13 +721,7 @@ func (_e *MockImageWidget_Expecter) SetCanFocus(canFocus interface{}) *MockImage
759721
760722 func (_c *MockImageWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockImageWidget_SetCanFocus_Call {
761723 _c.Call.Run(func(args mock.Arguments) {
762- var arg0 bool
763- if args[0] != nil {
764- arg0 = args[0].(bool)
765- }
766- run(
767- arg0,
768- )
724+ run(args[0].(bool))
769725 })
770726 return _c
771727 }
@@ -775,15 +731,14 @@ func (_c *MockImageWidget_SetCanFocus_Call) Return() *MockImageWidget_SetCanFocu
775731 return _c
776732 }
777733
778-func (_c *MockImageWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockImageWidget_SetCanFocus_Call {
734+func (_c *MockImageWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetCanFocus_Call {
779735 _c.Run(run)
780736 return _c
781737 }
782738
783-// SetCanTarget provides a mock function for the type MockImageWidget
784-func (_mock *MockImageWidget) SetCanTarget(canTarget bool) {
785- _mock.Called(canTarget)
786- return
739+// SetCanTarget provides a mock function with given fields: canTarget
740+func (_m *MockImageWidget) SetCanTarget(canTarget bool) {
741+ _m.Called(canTarget)
787742 }
788743
789744 // MockImageWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget'
@@ -799,13 +754,7 @@ func (_e *MockImageWidget_Expecter) SetCanTarget(canTarget interface{}) *MockIma
799754
800755 func (_c *MockImageWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockImageWidget_SetCanTarget_Call {
801756 _c.Call.Run(func(args mock.Arguments) {
802- var arg0 bool
803- if args[0] != nil {
804- arg0 = args[0].(bool)
805- }
806- run(
807- arg0,
808- )
757+ run(args[0].(bool))
809758 })
810759 return _c
811760 }
@@ -815,15 +764,14 @@ func (_c *MockImageWidget_SetCanTarget_Call) Return() *MockImageWidget_SetCanTar
815764 return _c
816765 }
817766
818-func (_c *MockImageWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockImageWidget_SetCanTarget_Call {
767+func (_c *MockImageWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetCanTarget_Call {
819768 _c.Run(run)
820769 return _c
821770 }
822771
823-// SetFocusOnClick provides a mock function for the type MockImageWidget
824-func (_mock *MockImageWidget) SetFocusOnClick(focusOnClick bool) {
825- _mock.Called(focusOnClick)
826- return
772+// SetFocusOnClick provides a mock function with given fields: focusOnClick
773+func (_m *MockImageWidget) SetFocusOnClick(focusOnClick bool) {
774+ _m.Called(focusOnClick)
827775 }
828776
829777 // MockImageWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick'
@@ -839,13 +787,7 @@ func (_e *MockImageWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *M
839787
840788 func (_c *MockImageWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockImageWidget_SetFocusOnClick_Call {
841789 _c.Call.Run(func(args mock.Arguments) {
842- var arg0 bool
843- if args[0] != nil {
844- arg0 = args[0].(bool)
845- }
846- run(
847- arg0,
848- )
790+ run(args[0].(bool))
849791 })
850792 return _c
851793 }
@@ -855,15 +797,14 @@ func (_c *MockImageWidget_SetFocusOnClick_Call) Return() *MockImageWidget_SetFoc
855797 return _c
856798 }
857799
858-func (_c *MockImageWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockImageWidget_SetFocusOnClick_Call {
800+func (_c *MockImageWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetFocusOnClick_Call {
859801 _c.Run(run)
860802 return _c
861803 }
862804
863-// SetFromFile provides a mock function for the type MockImageWidget
864-func (_mock *MockImageWidget) SetFromFile(filename string) {
865- _mock.Called(filename)
866- return
805+// SetFromFile provides a mock function with given fields: filename
806+func (_m *MockImageWidget) SetFromFile(filename string) {
807+ _m.Called(filename)
867808 }
868809
869810 // MockImageWidget_SetFromFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFromFile'
@@ -879,13 +820,7 @@ func (_e *MockImageWidget_Expecter) SetFromFile(filename interface{}) *MockImage
879820
880821 func (_c *MockImageWidget_SetFromFile_Call) Run(run func(filename string)) *MockImageWidget_SetFromFile_Call {
881822 _c.Call.Run(func(args mock.Arguments) {
882- var arg0 string
883- if args[0] != nil {
884- arg0 = args[0].(string)
885- }
886- run(
887- arg0,
888- )
823+ run(args[0].(string))
889824 })
890825 return _c
891826 }
@@ -895,15 +830,14 @@ func (_c *MockImageWidget_SetFromFile_Call) Return() *MockImageWidget_SetFromFil
895830 return _c
896831 }
897832
898-func (_c *MockImageWidget_SetFromFile_Call) RunAndReturn(run func(filename string)) *MockImageWidget_SetFromFile_Call {
833+func (_c *MockImageWidget_SetFromFile_Call) RunAndReturn(run func(string)) *MockImageWidget_SetFromFile_Call {
899834 _c.Run(run)
900835 return _c
901836 }
902837
903-// SetFromIconName provides a mock function for the type MockImageWidget
904-func (_mock *MockImageWidget) SetFromIconName(iconName string) {
905- _mock.Called(iconName)
906- return
838+// SetFromIconName provides a mock function with given fields: iconName
839+func (_m *MockImageWidget) SetFromIconName(iconName string) {
840+ _m.Called(iconName)
907841 }
908842
909843 // MockImageWidget_SetFromIconName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFromIconName'
@@ -919,13 +853,7 @@ func (_e *MockImageWidget_Expecter) SetFromIconName(iconName interface{}) *MockI
919853
920854 func (_c *MockImageWidget_SetFromIconName_Call) Run(run func(iconName string)) *MockImageWidget_SetFromIconName_Call {
921855 _c.Call.Run(func(args mock.Arguments) {
922- var arg0 string
923- if args[0] != nil {
924- arg0 = args[0].(string)
925- }
926- run(
927- arg0,
928- )
856+ run(args[0].(string))
929857 })
930858 return _c
931859 }
@@ -935,15 +863,14 @@ func (_c *MockImageWidget_SetFromIconName_Call) Return() *MockImageWidget_SetFro
935863 return _c
936864 }
937865
938-func (_c *MockImageWidget_SetFromIconName_Call) RunAndReturn(run func(iconName string)) *MockImageWidget_SetFromIconName_Call {
866+func (_c *MockImageWidget_SetFromIconName_Call) RunAndReturn(run func(string)) *MockImageWidget_SetFromIconName_Call {
939867 _c.Run(run)
940868 return _c
941869 }
942870
943-// SetFromPaintable provides a mock function for the type MockImageWidget
944-func (_mock *MockImageWidget) SetFromPaintable(paintable layout.Paintable) {
945- _mock.Called(paintable)
946- return
871+// SetFromPaintable provides a mock function with given fields: paintable
872+func (_m *MockImageWidget) SetFromPaintable(paintable layout.Paintable) {
873+ _m.Called(paintable)
947874 }
948875
949876 // MockImageWidget_SetFromPaintable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFromPaintable'
@@ -959,13 +886,7 @@ func (_e *MockImageWidget_Expecter) SetFromPaintable(paintable interface{}) *Moc
959886
960887 func (_c *MockImageWidget_SetFromPaintable_Call) Run(run func(paintable layout.Paintable)) *MockImageWidget_SetFromPaintable_Call {
961888 _c.Call.Run(func(args mock.Arguments) {
962- var arg0 layout.Paintable
963- if args[0] != nil {
964- arg0 = args[0].(layout.Paintable)
965- }
966- run(
967- arg0,
968- )
889+ run(args[0].(layout.Paintable))
969890 })
970891 return _c
971892 }
@@ -975,15 +896,14 @@ func (_c *MockImageWidget_SetFromPaintable_Call) Return() *MockImageWidget_SetFr
975896 return _c
976897 }
977898
978-func (_c *MockImageWidget_SetFromPaintable_Call) RunAndReturn(run func(paintable layout.Paintable)) *MockImageWidget_SetFromPaintable_Call {
899+func (_c *MockImageWidget_SetFromPaintable_Call) RunAndReturn(run func(layout.Paintable)) *MockImageWidget_SetFromPaintable_Call {
979900 _c.Run(run)
980901 return _c
981902 }
982903
983-// SetHalign provides a mock function for the type MockImageWidget
984-func (_mock *MockImageWidget) SetHalign(align gtk.Align) {
985- _mock.Called(align)
986- return
904+// SetHalign provides a mock function with given fields: align
905+func (_m *MockImageWidget) SetHalign(align gtk.Align) {
906+ _m.Called(align)
987907 }
988908
989909 // MockImageWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign'
@@ -999,13 +919,7 @@ func (_e *MockImageWidget_Expecter) SetHalign(align interface{}) *MockImageWidge
999919
1000920 func (_c *MockImageWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockImageWidget_SetHalign_Call {
1001921 _c.Call.Run(func(args mock.Arguments) {
1002- var arg0 gtk.Align
1003- if args[0] != nil {
1004- arg0 = args[0].(gtk.Align)
1005- }
1006- run(
1007- arg0,
1008- )
922+ run(args[0].(gtk.Align))
1009923 })
1010924 return _c
1011925 }
@@ -1015,15 +929,14 @@ func (_c *MockImageWidget_SetHalign_Call) Return() *MockImageWidget_SetHalign_Ca
1015929 return _c
1016930 }
1017931
1018-func (_c *MockImageWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockImageWidget_SetHalign_Call {
932+func (_c *MockImageWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockImageWidget_SetHalign_Call {
1019933 _c.Run(run)
1020934 return _c
1021935 }
1022936
1023-// SetHexpand provides a mock function for the type MockImageWidget
1024-func (_mock *MockImageWidget) SetHexpand(expand bool) {
1025- _mock.Called(expand)
1026- return
937+// SetHexpand provides a mock function with given fields: expand
938+func (_m *MockImageWidget) SetHexpand(expand bool) {
939+ _m.Called(expand)
1027940 }
1028941
1029942 // MockImageWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand'
@@ -1039,13 +952,7 @@ func (_e *MockImageWidget_Expecter) SetHexpand(expand interface{}) *MockImageWid
1039952
1040953 func (_c *MockImageWidget_SetHexpand_Call) Run(run func(expand bool)) *MockImageWidget_SetHexpand_Call {
1041954 _c.Call.Run(func(args mock.Arguments) {
1042- var arg0 bool
1043- if args[0] != nil {
1044- arg0 = args[0].(bool)
1045- }
1046- run(
1047- arg0,
1048- )
955+ run(args[0].(bool))
1049956 })
1050957 return _c
1051958 }
@@ -1055,15 +962,14 @@ func (_c *MockImageWidget_SetHexpand_Call) Return() *MockImageWidget_SetHexpand_
1055962 return _c
1056963 }
1057964
1058-func (_c *MockImageWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockImageWidget_SetHexpand_Call {
965+func (_c *MockImageWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetHexpand_Call {
1059966 _c.Run(run)
1060967 return _c
1061968 }
1062969
1063-// SetPixelSize provides a mock function for the type MockImageWidget
1064-func (_mock *MockImageWidget) SetPixelSize(pixelSize int) {
1065- _mock.Called(pixelSize)
1066- return
970+// SetPixelSize provides a mock function with given fields: pixelSize
971+func (_m *MockImageWidget) SetPixelSize(pixelSize int) {
972+ _m.Called(pixelSize)
1067973 }
1068974
1069975 // MockImageWidget_SetPixelSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPixelSize'
@@ -1079,13 +985,7 @@ func (_e *MockImageWidget_Expecter) SetPixelSize(pixelSize interface{}) *MockIma
1079985
1080986 func (_c *MockImageWidget_SetPixelSize_Call) Run(run func(pixelSize int)) *MockImageWidget_SetPixelSize_Call {
1081987 _c.Call.Run(func(args mock.Arguments) {
1082- var arg0 int
1083- if args[0] != nil {
1084- arg0 = args[0].(int)
1085- }
1086- run(
1087- arg0,
1088- )
988+ run(args[0].(int))
1089989 })
1090990 return _c
1091991 }
@@ -1095,15 +995,14 @@ func (_c *MockImageWidget_SetPixelSize_Call) Return() *MockImageWidget_SetPixelS
1095995 return _c
1096996 }
1097997
1098-func (_c *MockImageWidget_SetPixelSize_Call) RunAndReturn(run func(pixelSize int)) *MockImageWidget_SetPixelSize_Call {
998+func (_c *MockImageWidget_SetPixelSize_Call) RunAndReturn(run func(int)) *MockImageWidget_SetPixelSize_Call {
1099999 _c.Run(run)
11001000 return _c
11011001 }
11021002
1103-// SetSizeRequest provides a mock function for the type MockImageWidget
1104-func (_mock *MockImageWidget) SetSizeRequest(width int, height int) {
1105- _mock.Called(width, height)
1106- return
1003+// SetSizeRequest provides a mock function with given fields: width, height
1004+func (_m *MockImageWidget) SetSizeRequest(width int, height int) {
1005+ _m.Called(width, height)
11071006 }
11081007
11091008 // MockImageWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest'
@@ -1120,18 +1019,7 @@ func (_e *MockImageWidget_Expecter) SetSizeRequest(width interface{}, height int
11201019
11211020 func (_c *MockImageWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockImageWidget_SetSizeRequest_Call {
11221021 _c.Call.Run(func(args mock.Arguments) {
1123- var arg0 int
1124- if args[0] != nil {
1125- arg0 = args[0].(int)
1126- }
1127- var arg1 int
1128- if args[1] != nil {
1129- arg1 = args[1].(int)
1130- }
1131- run(
1132- arg0,
1133- arg1,
1134- )
1022+ run(args[0].(int), args[1].(int))
11351023 })
11361024 return _c
11371025 }
@@ -1141,15 +1029,14 @@ func (_c *MockImageWidget_SetSizeRequest_Call) Return() *MockImageWidget_SetSize
11411029 return _c
11421030 }
11431031
1144-func (_c *MockImageWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockImageWidget_SetSizeRequest_Call {
1032+func (_c *MockImageWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockImageWidget_SetSizeRequest_Call {
11451033 _c.Run(run)
11461034 return _c
11471035 }
11481036
1149-// SetValign provides a mock function for the type MockImageWidget
1150-func (_mock *MockImageWidget) SetValign(align gtk.Align) {
1151- _mock.Called(align)
1152- return
1037+// SetValign provides a mock function with given fields: align
1038+func (_m *MockImageWidget) SetValign(align gtk.Align) {
1039+ _m.Called(align)
11531040 }
11541041
11551042 // MockImageWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign'
@@ -1165,13 +1052,7 @@ func (_e *MockImageWidget_Expecter) SetValign(align interface{}) *MockImageWidge
11651052
11661053 func (_c *MockImageWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockImageWidget_SetValign_Call {
11671054 _c.Call.Run(func(args mock.Arguments) {
1168- var arg0 gtk.Align
1169- if args[0] != nil {
1170- arg0 = args[0].(gtk.Align)
1171- }
1172- run(
1173- arg0,
1174- )
1055+ run(args[0].(gtk.Align))
11751056 })
11761057 return _c
11771058 }
@@ -1181,15 +1062,14 @@ func (_c *MockImageWidget_SetValign_Call) Return() *MockImageWidget_SetValign_Ca
11811062 return _c
11821063 }
11831064
1184-func (_c *MockImageWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockImageWidget_SetValign_Call {
1065+func (_c *MockImageWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockImageWidget_SetValign_Call {
11851066 _c.Run(run)
11861067 return _c
11871068 }
11881069
1189-// SetVexpand provides a mock function for the type MockImageWidget
1190-func (_mock *MockImageWidget) SetVexpand(expand bool) {
1191- _mock.Called(expand)
1192- return
1070+// SetVexpand provides a mock function with given fields: expand
1071+func (_m *MockImageWidget) SetVexpand(expand bool) {
1072+ _m.Called(expand)
11931073 }
11941074
11951075 // MockImageWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand'
@@ -1205,13 +1085,7 @@ func (_e *MockImageWidget_Expecter) SetVexpand(expand interface{}) *MockImageWid
12051085
12061086 func (_c *MockImageWidget_SetVexpand_Call) Run(run func(expand bool)) *MockImageWidget_SetVexpand_Call {
12071087 _c.Call.Run(func(args mock.Arguments) {
1208- var arg0 bool
1209- if args[0] != nil {
1210- arg0 = args[0].(bool)
1211- }
1212- run(
1213- arg0,
1214- )
1088+ run(args[0].(bool))
12151089 })
12161090 return _c
12171091 }
@@ -1221,15 +1095,14 @@ func (_c *MockImageWidget_SetVexpand_Call) Return() *MockImageWidget_SetVexpand_
12211095 return _c
12221096 }
12231097
1224-func (_c *MockImageWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockImageWidget_SetVexpand_Call {
1098+func (_c *MockImageWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetVexpand_Call {
12251099 _c.Run(run)
12261100 return _c
12271101 }
12281102
1229-// SetVisible provides a mock function for the type MockImageWidget
1230-func (_mock *MockImageWidget) SetVisible(visible bool) {
1231- _mock.Called(visible)
1232- return
1103+// SetVisible provides a mock function with given fields: visible
1104+func (_m *MockImageWidget) SetVisible(visible bool) {
1105+ _m.Called(visible)
12331106 }
12341107
12351108 // MockImageWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible'
@@ -1245,13 +1118,7 @@ func (_e *MockImageWidget_Expecter) SetVisible(visible interface{}) *MockImageWi
12451118
12461119 func (_c *MockImageWidget_SetVisible_Call) Run(run func(visible bool)) *MockImageWidget_SetVisible_Call {
12471120 _c.Call.Run(func(args mock.Arguments) {
1248- var arg0 bool
1249- if args[0] != nil {
1250- arg0 = args[0].(bool)
1251- }
1252- run(
1253- arg0,
1254- )
1121+ run(args[0].(bool))
12551122 })
12561123 return _c
12571124 }
@@ -1261,15 +1128,14 @@ func (_c *MockImageWidget_SetVisible_Call) Return() *MockImageWidget_SetVisible_
12611128 return _c
12621129 }
12631130
1264-func (_c *MockImageWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockImageWidget_SetVisible_Call {
1131+func (_c *MockImageWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetVisible_Call {
12651132 _c.Run(run)
12661133 return _c
12671134 }
12681135
1269-// Show provides a mock function for the type MockImageWidget
1270-func (_mock *MockImageWidget) Show() {
1271- _mock.Called()
1272- return
1136+// Show provides a mock function with no fields
1137+func (_m *MockImageWidget) Show() {
1138+ _m.Called()
12731139 }
12741140
12751141 // MockImageWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
@@ -1299,10 +1165,9 @@ func (_c *MockImageWidget_Show_Call) RunAndReturn(run func()) *MockImageWidget_S
12991165 return _c
13001166 }
13011167
1302-// Unparent provides a mock function for the type MockImageWidget
1303-func (_mock *MockImageWidget) Unparent() {
1304- _mock.Called()
1305- return
1168+// Unparent provides a mock function with no fields
1169+func (_m *MockImageWidget) Unparent() {
1170+ _m.Called()
13061171 }
13071172
13081173 // MockImageWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent'
@@ -1331,3 +1196,17 @@ func (_c *MockImageWidget_Unparent_Call) RunAndReturn(run func()) *MockImageWidg
13311196 _c.Run(run)
13321197 return _c
13331198 }
1199+
1200+// NewMockImageWidget creates a new instance of MockImageWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1201+// The first argument is typically a *testing.T value.
1202+func NewMockImageWidget(t interface {
1203+ mock.TestingT
1204+ Cleanup(func())
1205+}) *MockImageWidget {
1206+ mock := &MockImageWidget{}
1207+ mock.Mock.Test(t)
1208+
1209+ t.Cleanup(func() { mock.AssertExpectations(t) })
1210+
1211+ return mock
1212+}
M internal/ui/layout/mocks/mock_label_widget.go +220 -346
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// NewMockLabelWidget creates a new instance of MockLabelWidget. 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 NewMockLabelWidget(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockLabelWidget {
19- mock := &MockLabelWidget{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockLabelWidget is an autogenerated mock type for the LabelWidget type
2813 type MockLabelWidget struct {
2914 mock.Mock
@@ -37,10 +22,9 @@ func (_m *MockLabelWidget) EXPECT() *MockLabelWidget_Expecter {
3722 return &MockLabelWidget_Expecter{mock: &_m.Mock}
3823 }
3924
40-// AddController provides a mock function for the type MockLabelWidget
41-func (_mock *MockLabelWidget) AddController(controller *gtk.EventController) {
42- _mock.Called(controller)
43- return
25+// AddController provides a mock function with given fields: controller
26+func (_m *MockLabelWidget) AddController(controller *gtk.EventController) {
27+ _m.Called(controller)
4428 }
4529
4630 // MockLabelWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController'
@@ -56,13 +40,7 @@ func (_e *MockLabelWidget_Expecter) AddController(controller interface{}) *MockL
5640
5741 func (_c *MockLabelWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockLabelWidget_AddController_Call {
5842 _c.Call.Run(func(args mock.Arguments) {
59- var arg0 *gtk.EventController
60- if args[0] != nil {
61- arg0 = args[0].(*gtk.EventController)
62- }
63- run(
64- arg0,
65- )
43+ run(args[0].(*gtk.EventController))
6644 })
6745 return _c
6846 }
@@ -72,15 +50,14 @@ func (_c *MockLabelWidget_AddController_Call) Return() *MockLabelWidget_AddContr
7250 return _c
7351 }
7452
75-func (_c *MockLabelWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockLabelWidget_AddController_Call {
53+func (_c *MockLabelWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockLabelWidget_AddController_Call {
7654 _c.Run(run)
7755 return _c
7856 }
7957
80-// AddCssClass provides a mock function for the type MockLabelWidget
81-func (_mock *MockLabelWidget) AddCssClass(cssClass string) {
82- _mock.Called(cssClass)
83- return
58+// AddCssClass provides a mock function with given fields: cssClass
59+func (_m *MockLabelWidget) AddCssClass(cssClass string) {
60+ _m.Called(cssClass)
8461 }
8562
8663 // MockLabelWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass'
@@ -96,13 +73,7 @@ func (_e *MockLabelWidget_Expecter) AddCssClass(cssClass interface{}) *MockLabel
9673
9774 func (_c *MockLabelWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockLabelWidget_AddCssClass_Call {
9875 _c.Call.Run(func(args mock.Arguments) {
99- var arg0 string
100- if args[0] != nil {
101- arg0 = args[0].(string)
102- }
103- run(
104- arg0,
105- )
76+ run(args[0].(string))
10677 })
10778 return _c
10879 }
@@ -112,14 +83,14 @@ func (_c *MockLabelWidget_AddCssClass_Call) Return() *MockLabelWidget_AddCssClas
11283 return _c
11384 }
11485
115-func (_c *MockLabelWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockLabelWidget_AddCssClass_Call {
86+func (_c *MockLabelWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockLabelWidget_AddCssClass_Call {
11687 _c.Run(run)
11788 return _c
11889 }
11990
120-// ComputePoint provides a mock function for the type MockLabelWidget
121-func (_mock *MockLabelWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
122- ret := _mock.Called(target)
91+// ComputePoint provides a mock function with given fields: target
92+func (_m *MockLabelWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
93+ ret := _m.Called(target)
12394
12495 if len(ret) == 0 {
12596 panic("no return value specified for ComputePoint")
@@ -128,24 +99,27 @@ func (_mock *MockLabelWidget) ComputePoint(target layout.Widget) (float64, float
12899 var r0 float64
129100 var r1 float64
130101 var r2 bool
131- if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
132- return returnFunc(target)
102+ if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
103+ return rf(target)
133104 }
134- if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok {
135- r0 = returnFunc(target)
105+ if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok {
106+ r0 = rf(target)
136107 } else {
137108 r0 = ret.Get(0).(float64)
138109 }
139- if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok {
140- r1 = returnFunc(target)
110+
111+ if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok {
112+ r1 = rf(target)
141113 } else {
142114 r1 = ret.Get(1).(float64)
143115 }
144- if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok {
145- r2 = returnFunc(target)
116+
117+ if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok {
118+ r2 = rf(target)
146119 } else {
147120 r2 = ret.Get(2).(bool)
148121 }
122+
149123 return r0, r1, r2
150124 }
151125
@@ -162,13 +136,7 @@ func (_e *MockLabelWidget_Expecter) ComputePoint(target interface{}) *MockLabelW
162136
163137 func (_c *MockLabelWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockLabelWidget_ComputePoint_Call {
164138 _c.Call.Run(func(args mock.Arguments) {
165- var arg0 layout.Widget
166- if args[0] != nil {
167- arg0 = args[0].(layout.Widget)
168- }
169- run(
170- arg0,
171- )
139+ run(args[0].(layout.Widget))
172140 })
173141 return _c
174142 }
@@ -178,25 +146,26 @@ func (_c *MockLabelWidget_ComputePoint_Call) Return(x float64, y float64, ok boo
178146 return _c
179147 }
180148
181-func (_c *MockLabelWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockLabelWidget_ComputePoint_Call {
149+func (_c *MockLabelWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockLabelWidget_ComputePoint_Call {
182150 _c.Call.Return(run)
183151 return _c
184152 }
185153
186-// GetAllocatedHeight provides a mock function for the type MockLabelWidget
187-func (_mock *MockLabelWidget) GetAllocatedHeight() int {
188- ret := _mock.Called()
154+// GetAllocatedHeight provides a mock function with no fields
155+func (_m *MockLabelWidget) GetAllocatedHeight() int {
156+ ret := _m.Called()
189157
190158 if len(ret) == 0 {
191159 panic("no return value specified for GetAllocatedHeight")
192160 }
193161
194162 var r0 int
195- if returnFunc, ok := ret.Get(0).(func() int); ok {
196- r0 = returnFunc()
163+ if rf, ok := ret.Get(0).(func() int); ok {
164+ r0 = rf()
197165 } else {
198166 r0 = ret.Get(0).(int)
199167 }
168+
200169 return r0
201170 }
202171
@@ -217,8 +186,8 @@ func (_c *MockLabelWidget_GetAllocatedHeight_Call) Run(run func()) *MockLabelWid
217186 return _c
218187 }
219188
220-func (_c *MockLabelWidget_GetAllocatedHeight_Call) Return(n int) *MockLabelWidget_GetAllocatedHeight_Call {
221- _c.Call.Return(n)
189+func (_c *MockLabelWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockLabelWidget_GetAllocatedHeight_Call {
190+ _c.Call.Return(_a0)
222191 return _c
223192 }
224193
@@ -227,20 +196,21 @@ func (_c *MockLabelWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int)
227196 return _c
228197 }
229198
230-// GetAllocatedWidth provides a mock function for the type MockLabelWidget
231-func (_mock *MockLabelWidget) GetAllocatedWidth() int {
232- ret := _mock.Called()
199+// GetAllocatedWidth provides a mock function with no fields
200+func (_m *MockLabelWidget) GetAllocatedWidth() int {
201+ ret := _m.Called()
233202
234203 if len(ret) == 0 {
235204 panic("no return value specified for GetAllocatedWidth")
236205 }
237206
238207 var r0 int
239- if returnFunc, ok := ret.Get(0).(func() int); ok {
240- r0 = returnFunc()
208+ if rf, ok := ret.Get(0).(func() int); ok {
209+ r0 = rf()
241210 } else {
242211 r0 = ret.Get(0).(int)
243212 }
213+
244214 return r0
245215 }
246216
@@ -261,8 +231,8 @@ func (_c *MockLabelWidget_GetAllocatedWidth_Call) Run(run func()) *MockLabelWidg
261231 return _c
262232 }
263233
264-func (_c *MockLabelWidget_GetAllocatedWidth_Call) Return(n int) *MockLabelWidget_GetAllocatedWidth_Call {
265- _c.Call.Return(n)
234+func (_c *MockLabelWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockLabelWidget_GetAllocatedWidth_Call {
235+ _c.Call.Return(_a0)
266236 return _c
267237 }
268238
@@ -271,20 +241,21 @@ func (_c *MockLabelWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) *
271241 return _c
272242 }
273243
274-// GetHexpand provides a mock function for the type MockLabelWidget
275-func (_mock *MockLabelWidget) GetHexpand() bool {
276- ret := _mock.Called()
244+// GetHexpand provides a mock function with no fields
245+func (_m *MockLabelWidget) GetHexpand() bool {
246+ ret := _m.Called()
277247
278248 if len(ret) == 0 {
279249 panic("no return value specified for GetHexpand")
280250 }
281251
282252 var r0 bool
283- if returnFunc, ok := ret.Get(0).(func() bool); ok {
284- r0 = returnFunc()
253+ if rf, ok := ret.Get(0).(func() bool); ok {
254+ r0 = rf()
285255 } else {
286256 r0 = ret.Get(0).(bool)
287257 }
258+
288259 return r0
289260 }
290261
@@ -305,8 +276,8 @@ func (_c *MockLabelWidget_GetHexpand_Call) Run(run func()) *MockLabelWidget_GetH
305276 return _c
306277 }
307278
308-func (_c *MockLabelWidget_GetHexpand_Call) Return(b bool) *MockLabelWidget_GetHexpand_Call {
309- _c.Call.Return(b)
279+func (_c *MockLabelWidget_GetHexpand_Call) Return(_a0 bool) *MockLabelWidget_GetHexpand_Call {
280+ _c.Call.Return(_a0)
310281 return _c
311282 }
312283
@@ -315,22 +286,23 @@ func (_c *MockLabelWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockLa
315286 return _c
316287 }
317288
318-// GetParent provides a mock function for the type MockLabelWidget
319-func (_mock *MockLabelWidget) GetParent() layout.Widget {
320- ret := _mock.Called()
289+// GetParent provides a mock function with no fields
290+func (_m *MockLabelWidget) GetParent() layout.Widget {
291+ ret := _m.Called()
321292
322293 if len(ret) == 0 {
323294 panic("no return value specified for GetParent")
324295 }
325296
326297 var r0 layout.Widget
327- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
328- r0 = returnFunc()
298+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
299+ r0 = rf()
329300 } else {
330301 if ret.Get(0) != nil {
331302 r0 = ret.Get(0).(layout.Widget)
332303 }
333304 }
305+
334306 return r0
335307 }
336308
@@ -351,8 +323,8 @@ func (_c *MockLabelWidget_GetParent_Call) Run(run func()) *MockLabelWidget_GetPa
351323 return _c
352324 }
353325
354-func (_c *MockLabelWidget_GetParent_Call) Return(widget layout.Widget) *MockLabelWidget_GetParent_Call {
355- _c.Call.Return(widget)
326+func (_c *MockLabelWidget_GetParent_Call) Return(_a0 layout.Widget) *MockLabelWidget_GetParent_Call {
327+ _c.Call.Return(_a0)
356328 return _c
357329 }
358330
@@ -361,20 +333,21 @@ func (_c *MockLabelWidget_GetParent_Call) RunAndReturn(run func() layout.Widget)
361333 return _c
362334 }
363335
364-// GetText provides a mock function for the type MockLabelWidget
365-func (_mock *MockLabelWidget) GetText() string {
366- ret := _mock.Called()
336+// GetText provides a mock function with no fields
337+func (_m *MockLabelWidget) GetText() string {
338+ ret := _m.Called()
367339
368340 if len(ret) == 0 {
369341 panic("no return value specified for GetText")
370342 }
371343
372344 var r0 string
373- if returnFunc, ok := ret.Get(0).(func() string); ok {
374- r0 = returnFunc()
345+ if rf, ok := ret.Get(0).(func() string); ok {
346+ r0 = rf()
375347 } else {
376348 r0 = ret.Get(0).(string)
377349 }
350+
378351 return r0
379352 }
380353
@@ -395,8 +368,8 @@ func (_c *MockLabelWidget_GetText_Call) Run(run func()) *MockLabelWidget_GetText
395368 return _c
396369 }
397370
398-func (_c *MockLabelWidget_GetText_Call) Return(s string) *MockLabelWidget_GetText_Call {
399- _c.Call.Return(s)
371+func (_c *MockLabelWidget_GetText_Call) Return(_a0 string) *MockLabelWidget_GetText_Call {
372+ _c.Call.Return(_a0)
400373 return _c
401374 }
402375
@@ -405,20 +378,21 @@ func (_c *MockLabelWidget_GetText_Call) RunAndReturn(run func() string) *MockLab
405378 return _c
406379 }
407380
408-// GetVexpand provides a mock function for the type MockLabelWidget
409-func (_mock *MockLabelWidget) GetVexpand() bool {
410- ret := _mock.Called()
381+// GetVexpand provides a mock function with no fields
382+func (_m *MockLabelWidget) GetVexpand() bool {
383+ ret := _m.Called()
411384
412385 if len(ret) == 0 {
413386 panic("no return value specified for GetVexpand")
414387 }
415388
416389 var r0 bool
417- if returnFunc, ok := ret.Get(0).(func() bool); ok {
418- r0 = returnFunc()
390+ if rf, ok := ret.Get(0).(func() bool); ok {
391+ r0 = rf()
419392 } else {
420393 r0 = ret.Get(0).(bool)
421394 }
395+
422396 return r0
423397 }
424398
@@ -439,8 +413,8 @@ func (_c *MockLabelWidget_GetVexpand_Call) Run(run func()) *MockLabelWidget_GetV
439413 return _c
440414 }
441415
442-func (_c *MockLabelWidget_GetVexpand_Call) Return(b bool) *MockLabelWidget_GetVexpand_Call {
443- _c.Call.Return(b)
416+func (_c *MockLabelWidget_GetVexpand_Call) Return(_a0 bool) *MockLabelWidget_GetVexpand_Call {
417+ _c.Call.Return(_a0)
444418 return _c
445419 }
446420
@@ -449,20 +423,21 @@ func (_c *MockLabelWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockLa
449423 return _c
450424 }
451425
452-// GrabFocus provides a mock function for the type MockLabelWidget
453-func (_mock *MockLabelWidget) GrabFocus() bool {
454- ret := _mock.Called()
426+// GrabFocus provides a mock function with no fields
427+func (_m *MockLabelWidget) GrabFocus() bool {
428+ ret := _m.Called()
455429
456430 if len(ret) == 0 {
457431 panic("no return value specified for GrabFocus")
458432 }
459433
460434 var r0 bool
461- if returnFunc, ok := ret.Get(0).(func() bool); ok {
462- r0 = returnFunc()
435+ if rf, ok := ret.Get(0).(func() bool); ok {
436+ r0 = rf()
463437 } else {
464438 r0 = ret.Get(0).(bool)
465439 }
440+
466441 return r0
467442 }
468443
@@ -483,8 +458,8 @@ func (_c *MockLabelWidget_GrabFocus_Call) Run(run func()) *MockLabelWidget_GrabF
483458 return _c
484459 }
485460
486-func (_c *MockLabelWidget_GrabFocus_Call) Return(b bool) *MockLabelWidget_GrabFocus_Call {
487- _c.Call.Return(b)
461+func (_c *MockLabelWidget_GrabFocus_Call) Return(_a0 bool) *MockLabelWidget_GrabFocus_Call {
462+ _c.Call.Return(_a0)
488463 return _c
489464 }
490465
@@ -493,22 +468,23 @@ func (_c *MockLabelWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockLab
493468 return _c
494469 }
495470
496-// GtkWidget provides a mock function for the type MockLabelWidget
497-func (_mock *MockLabelWidget) GtkWidget() *gtk.Widget {
498- ret := _mock.Called()
471+// GtkWidget provides a mock function with no fields
472+func (_m *MockLabelWidget) GtkWidget() *gtk.Widget {
473+ ret := _m.Called()
499474
500475 if len(ret) == 0 {
501476 panic("no return value specified for GtkWidget")
502477 }
503478
504479 var r0 *gtk.Widget
505- if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok {
506- r0 = returnFunc()
480+ if rf, ok := ret.Get(0).(func() *gtk.Widget); ok {
481+ r0 = rf()
507482 } else {
508483 if ret.Get(0) != nil {
509484 r0 = ret.Get(0).(*gtk.Widget)
510485 }
511486 }
487+
512488 return r0
513489 }
514490
@@ -529,8 +505,8 @@ func (_c *MockLabelWidget_GtkWidget_Call) Run(run func()) *MockLabelWidget_GtkWi
529505 return _c
530506 }
531507
532-func (_c *MockLabelWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockLabelWidget_GtkWidget_Call {
533- _c.Call.Return(widget)
508+func (_c *MockLabelWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockLabelWidget_GtkWidget_Call {
509+ _c.Call.Return(_a0)
534510 return _c
535511 }
536512
@@ -539,20 +515,21 @@ func (_c *MockLabelWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) *
539515 return _c
540516 }
541517
542-// HasCssClass provides a mock function for the type MockLabelWidget
543-func (_mock *MockLabelWidget) HasCssClass(cssClass string) bool {
544- ret := _mock.Called(cssClass)
518+// HasCssClass provides a mock function with given fields: cssClass
519+func (_m *MockLabelWidget) HasCssClass(cssClass string) bool {
520+ ret := _m.Called(cssClass)
545521
546522 if len(ret) == 0 {
547523 panic("no return value specified for HasCssClass")
548524 }
549525
550526 var r0 bool
551- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
552- r0 = returnFunc(cssClass)
527+ if rf, ok := ret.Get(0).(func(string) bool); ok {
528+ r0 = rf(cssClass)
553529 } else {
554530 r0 = ret.Get(0).(bool)
555531 }
532+
556533 return r0
557534 }
558535
@@ -569,41 +546,36 @@ func (_e *MockLabelWidget_Expecter) HasCssClass(cssClass interface{}) *MockLabel
569546
570547 func (_c *MockLabelWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockLabelWidget_HasCssClass_Call {
571548 _c.Call.Run(func(args mock.Arguments) {
572- var arg0 string
573- if args[0] != nil {
574- arg0 = args[0].(string)
575- }
576- run(
577- arg0,
578- )
549+ run(args[0].(string))
579550 })
580551 return _c
581552 }
582553
583-func (_c *MockLabelWidget_HasCssClass_Call) Return(b bool) *MockLabelWidget_HasCssClass_Call {
584- _c.Call.Return(b)
554+func (_c *MockLabelWidget_HasCssClass_Call) Return(_a0 bool) *MockLabelWidget_HasCssClass_Call {
555+ _c.Call.Return(_a0)
585556 return _c
586557 }
587558
588-func (_c *MockLabelWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockLabelWidget_HasCssClass_Call {
559+func (_c *MockLabelWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockLabelWidget_HasCssClass_Call {
589560 _c.Call.Return(run)
590561 return _c
591562 }
592563
593-// HasFocus provides a mock function for the type MockLabelWidget
594-func (_mock *MockLabelWidget) HasFocus() bool {
595- ret := _mock.Called()
564+// HasFocus provides a mock function with no fields
565+func (_m *MockLabelWidget) HasFocus() bool {
566+ ret := _m.Called()
596567
597568 if len(ret) == 0 {
598569 panic("no return value specified for HasFocus")
599570 }
600571
601572 var r0 bool
602- if returnFunc, ok := ret.Get(0).(func() bool); ok {
603- r0 = returnFunc()
573+ if rf, ok := ret.Get(0).(func() bool); ok {
574+ r0 = rf()
604575 } else {
605576 r0 = ret.Get(0).(bool)
606577 }
578+
607579 return r0
608580 }
609581
@@ -624,8 +596,8 @@ func (_c *MockLabelWidget_HasFocus_Call) Run(run func()) *MockLabelWidget_HasFoc
624596 return _c
625597 }
626598
627-func (_c *MockLabelWidget_HasFocus_Call) Return(b bool) *MockLabelWidget_HasFocus_Call {
628- _c.Call.Return(b)
599+func (_c *MockLabelWidget_HasFocus_Call) Return(_a0 bool) *MockLabelWidget_HasFocus_Call {
600+ _c.Call.Return(_a0)
629601 return _c
630602 }
631603
@@ -634,10 +606,9 @@ func (_c *MockLabelWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockLabe
634606 return _c
635607 }
636608
637-// Hide provides a mock function for the type MockLabelWidget
638-func (_mock *MockLabelWidget) Hide() {
639- _mock.Called()
640- return
609+// Hide provides a mock function with no fields
610+func (_m *MockLabelWidget) Hide() {
611+ _m.Called()
641612 }
642613
643614 // MockLabelWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
@@ -667,20 +638,21 @@ func (_c *MockLabelWidget_Hide_Call) RunAndReturn(run func()) *MockLabelWidget_H
667638 return _c
668639 }
669640
670-// IsVisible provides a mock function for the type MockLabelWidget
671-func (_mock *MockLabelWidget) IsVisible() bool {
672- ret := _mock.Called()
641+// IsVisible provides a mock function with no fields
642+func (_m *MockLabelWidget) IsVisible() bool {
643+ ret := _m.Called()
673644
674645 if len(ret) == 0 {
675646 panic("no return value specified for IsVisible")
676647 }
677648
678649 var r0 bool
679- if returnFunc, ok := ret.Get(0).(func() bool); ok {
680- r0 = returnFunc()
650+ if rf, ok := ret.Get(0).(func() bool); ok {
651+ r0 = rf()
681652 } else {
682653 r0 = ret.Get(0).(bool)
683654 }
655+
684656 return r0
685657 }
686658
@@ -701,8 +673,8 @@ func (_c *MockLabelWidget_IsVisible_Call) Run(run func()) *MockLabelWidget_IsVis
701673 return _c
702674 }
703675
704-func (_c *MockLabelWidget_IsVisible_Call) Return(b bool) *MockLabelWidget_IsVisible_Call {
705- _c.Call.Return(b)
676+func (_c *MockLabelWidget_IsVisible_Call) Return(_a0 bool) *MockLabelWidget_IsVisible_Call {
677+ _c.Call.Return(_a0)
706678 return _c
707679 }
708680
@@ -711,10 +683,9 @@ func (_c *MockLabelWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockLab
711683 return _c
712684 }
713685
714-// RemoveCssClass provides a mock function for the type MockLabelWidget
715-func (_mock *MockLabelWidget) RemoveCssClass(cssClass string) {
716- _mock.Called(cssClass)
717- return
686+// RemoveCssClass provides a mock function with given fields: cssClass
687+func (_m *MockLabelWidget) RemoveCssClass(cssClass string) {
688+ _m.Called(cssClass)
718689 }
719690
720691 // MockLabelWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass'
@@ -730,13 +701,7 @@ func (_e *MockLabelWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockLa
730701
731702 func (_c *MockLabelWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockLabelWidget_RemoveCssClass_Call {
732703 _c.Call.Run(func(args mock.Arguments) {
733- var arg0 string
734- if args[0] != nil {
735- arg0 = args[0].(string)
736- }
737- run(
738- arg0,
739- )
704+ run(args[0].(string))
740705 })
741706 return _c
742707 }
@@ -746,15 +711,14 @@ func (_c *MockLabelWidget_RemoveCssClass_Call) Return() *MockLabelWidget_RemoveC
746711 return _c
747712 }
748713
749-func (_c *MockLabelWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockLabelWidget_RemoveCssClass_Call {
714+func (_c *MockLabelWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockLabelWidget_RemoveCssClass_Call {
750715 _c.Run(run)
751716 return _c
752717 }
753718
754-// SetCanFocus provides a mock function for the type MockLabelWidget
755-func (_mock *MockLabelWidget) SetCanFocus(canFocus bool) {
756- _mock.Called(canFocus)
757- return
719+// SetCanFocus provides a mock function with given fields: canFocus
720+func (_m *MockLabelWidget) SetCanFocus(canFocus bool) {
721+ _m.Called(canFocus)
758722 }
759723
760724 // MockLabelWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus'
@@ -770,13 +734,7 @@ func (_e *MockLabelWidget_Expecter) SetCanFocus(canFocus interface{}) *MockLabel
770734
771735 func (_c *MockLabelWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockLabelWidget_SetCanFocus_Call {
772736 _c.Call.Run(func(args mock.Arguments) {
773- var arg0 bool
774- if args[0] != nil {
775- arg0 = args[0].(bool)
776- }
777- run(
778- arg0,
779- )
737+ run(args[0].(bool))
780738 })
781739 return _c
782740 }
@@ -786,15 +744,14 @@ func (_c *MockLabelWidget_SetCanFocus_Call) Return() *MockLabelWidget_SetCanFocu
786744 return _c
787745 }
788746
789-func (_c *MockLabelWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockLabelWidget_SetCanFocus_Call {
747+func (_c *MockLabelWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetCanFocus_Call {
790748 _c.Run(run)
791749 return _c
792750 }
793751
794-// SetCanTarget provides a mock function for the type MockLabelWidget
795-func (_mock *MockLabelWidget) SetCanTarget(canTarget bool) {
796- _mock.Called(canTarget)
797- return
752+// SetCanTarget provides a mock function with given fields: canTarget
753+func (_m *MockLabelWidget) SetCanTarget(canTarget bool) {
754+ _m.Called(canTarget)
798755 }
799756
800757 // MockLabelWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget'
@@ -810,13 +767,7 @@ func (_e *MockLabelWidget_Expecter) SetCanTarget(canTarget interface{}) *MockLab
810767
811768 func (_c *MockLabelWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockLabelWidget_SetCanTarget_Call {
812769 _c.Call.Run(func(args mock.Arguments) {
813- var arg0 bool
814- if args[0] != nil {
815- arg0 = args[0].(bool)
816- }
817- run(
818- arg0,
819- )
770+ run(args[0].(bool))
820771 })
821772 return _c
822773 }
@@ -826,15 +777,14 @@ func (_c *MockLabelWidget_SetCanTarget_Call) Return() *MockLabelWidget_SetCanTar
826777 return _c
827778 }
828779
829-func (_c *MockLabelWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockLabelWidget_SetCanTarget_Call {
780+func (_c *MockLabelWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetCanTarget_Call {
830781 _c.Run(run)
831782 return _c
832783 }
833784
834-// SetEllipsize provides a mock function for the type MockLabelWidget
835-func (_mock *MockLabelWidget) SetEllipsize(mode layout.EllipsizeMode) {
836- _mock.Called(mode)
837- return
785+// SetEllipsize provides a mock function with given fields: mode
786+func (_m *MockLabelWidget) SetEllipsize(mode int) {
787+ _m.Called(mode)
838788 }
839789
840790 // MockLabelWidget_SetEllipsize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEllipsize'
@@ -843,20 +793,14 @@ type MockLabelWidget_SetEllipsize_Call struct {
843793 }
844794
845795 // SetEllipsize is a helper method to define mock.On call
846-// - mode layout.EllipsizeMode
796+// - mode int
847797 func (_e *MockLabelWidget_Expecter) SetEllipsize(mode interface{}) *MockLabelWidget_SetEllipsize_Call {
848798 return &MockLabelWidget_SetEllipsize_Call{Call: _e.mock.On("SetEllipsize", mode)}
849799 }
850800
851-func (_c *MockLabelWidget_SetEllipsize_Call) Run(run func(mode layout.EllipsizeMode)) *MockLabelWidget_SetEllipsize_Call {
801+func (_c *MockLabelWidget_SetEllipsize_Call) Run(run func(mode int)) *MockLabelWidget_SetEllipsize_Call {
852802 _c.Call.Run(func(args mock.Arguments) {
853- var arg0 layout.EllipsizeMode
854- if args[0] != nil {
855- arg0 = args[0].(layout.EllipsizeMode)
856- }
857- run(
858- arg0,
859- )
803+ run(args[0].(int))
860804 })
861805 return _c
862806 }
@@ -866,15 +810,14 @@ func (_c *MockLabelWidget_SetEllipsize_Call) Return() *MockLabelWidget_SetEllips
866810 return _c
867811 }
868812
869-func (_c *MockLabelWidget_SetEllipsize_Call) RunAndReturn(run func(mode layout.EllipsizeMode)) *MockLabelWidget_SetEllipsize_Call {
813+func (_c *MockLabelWidget_SetEllipsize_Call) RunAndReturn(run func(int)) *MockLabelWidget_SetEllipsize_Call {
870814 _c.Run(run)
871815 return _c
872816 }
873817
874-// SetFocusOnClick provides a mock function for the type MockLabelWidget
875-func (_mock *MockLabelWidget) SetFocusOnClick(focusOnClick bool) {
876- _mock.Called(focusOnClick)
877- return
818+// SetFocusOnClick provides a mock function with given fields: focusOnClick
819+func (_m *MockLabelWidget) SetFocusOnClick(focusOnClick bool) {
820+ _m.Called(focusOnClick)
878821 }
879822
880823 // MockLabelWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick'
@@ -890,13 +833,7 @@ func (_e *MockLabelWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *M
890833
891834 func (_c *MockLabelWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockLabelWidget_SetFocusOnClick_Call {
892835 _c.Call.Run(func(args mock.Arguments) {
893- var arg0 bool
894- if args[0] != nil {
895- arg0 = args[0].(bool)
896- }
897- run(
898- arg0,
899- )
836+ run(args[0].(bool))
900837 })
901838 return _c
902839 }
@@ -906,15 +843,14 @@ func (_c *MockLabelWidget_SetFocusOnClick_Call) Return() *MockLabelWidget_SetFoc
906843 return _c
907844 }
908845
909-func (_c *MockLabelWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockLabelWidget_SetFocusOnClick_Call {
846+func (_c *MockLabelWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetFocusOnClick_Call {
910847 _c.Run(run)
911848 return _c
912849 }
913850
914-// SetHalign provides a mock function for the type MockLabelWidget
915-func (_mock *MockLabelWidget) SetHalign(align gtk.Align) {
916- _mock.Called(align)
917- return
851+// SetHalign provides a mock function with given fields: align
852+func (_m *MockLabelWidget) SetHalign(align gtk.Align) {
853+ _m.Called(align)
918854 }
919855
920856 // MockLabelWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign'
@@ -930,13 +866,7 @@ func (_e *MockLabelWidget_Expecter) SetHalign(align interface{}) *MockLabelWidge
930866
931867 func (_c *MockLabelWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockLabelWidget_SetHalign_Call {
932868 _c.Call.Run(func(args mock.Arguments) {
933- var arg0 gtk.Align
934- if args[0] != nil {
935- arg0 = args[0].(gtk.Align)
936- }
937- run(
938- arg0,
939- )
869+ run(args[0].(gtk.Align))
940870 })
941871 return _c
942872 }
@@ -946,15 +876,14 @@ func (_c *MockLabelWidget_SetHalign_Call) Return() *MockLabelWidget_SetHalign_Ca
946876 return _c
947877 }
948878
949-func (_c *MockLabelWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockLabelWidget_SetHalign_Call {
879+func (_c *MockLabelWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockLabelWidget_SetHalign_Call {
950880 _c.Run(run)
951881 return _c
952882 }
953883
954-// SetHexpand provides a mock function for the type MockLabelWidget
955-func (_mock *MockLabelWidget) SetHexpand(expand bool) {
956- _mock.Called(expand)
957- return
884+// SetHexpand provides a mock function with given fields: expand
885+func (_m *MockLabelWidget) SetHexpand(expand bool) {
886+ _m.Called(expand)
958887 }
959888
960889 // MockLabelWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand'
@@ -970,13 +899,7 @@ func (_e *MockLabelWidget_Expecter) SetHexpand(expand interface{}) *MockLabelWid
970899
971900 func (_c *MockLabelWidget_SetHexpand_Call) Run(run func(expand bool)) *MockLabelWidget_SetHexpand_Call {
972901 _c.Call.Run(func(args mock.Arguments) {
973- var arg0 bool
974- if args[0] != nil {
975- arg0 = args[0].(bool)
976- }
977- run(
978- arg0,
979- )
902+ run(args[0].(bool))
980903 })
981904 return _c
982905 }
@@ -986,15 +909,14 @@ func (_c *MockLabelWidget_SetHexpand_Call) Return() *MockLabelWidget_SetHexpand_
986909 return _c
987910 }
988911
989-func (_c *MockLabelWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockLabelWidget_SetHexpand_Call {
912+func (_c *MockLabelWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetHexpand_Call {
990913 _c.Run(run)
991914 return _c
992915 }
993916
994-// SetMarkup provides a mock function for the type MockLabelWidget
995-func (_mock *MockLabelWidget) SetMarkup(markup string) {
996- _mock.Called(markup)
997- return
917+// SetMarkup provides a mock function with given fields: markup
918+func (_m *MockLabelWidget) SetMarkup(markup string) {
919+ _m.Called(markup)
998920 }
999921
1000922 // MockLabelWidget_SetMarkup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMarkup'
@@ -1010,13 +932,7 @@ func (_e *MockLabelWidget_Expecter) SetMarkup(markup interface{}) *MockLabelWidg
1010932
1011933 func (_c *MockLabelWidget_SetMarkup_Call) Run(run func(markup string)) *MockLabelWidget_SetMarkup_Call {
1012934 _c.Call.Run(func(args mock.Arguments) {
1013- var arg0 string
1014- if args[0] != nil {
1015- arg0 = args[0].(string)
1016- }
1017- run(
1018- arg0,
1019- )
935+ run(args[0].(string))
1020936 })
1021937 return _c
1022938 }
@@ -1026,15 +942,14 @@ func (_c *MockLabelWidget_SetMarkup_Call) Return() *MockLabelWidget_SetMarkup_Ca
1026942 return _c
1027943 }
1028944
1029-func (_c *MockLabelWidget_SetMarkup_Call) RunAndReturn(run func(markup string)) *MockLabelWidget_SetMarkup_Call {
945+func (_c *MockLabelWidget_SetMarkup_Call) RunAndReturn(run func(string)) *MockLabelWidget_SetMarkup_Call {
1030946 _c.Run(run)
1031947 return _c
1032948 }
1033949
1034-// SetMaxWidthChars provides a mock function for the type MockLabelWidget
1035-func (_mock *MockLabelWidget) SetMaxWidthChars(nChars int) {
1036- _mock.Called(nChars)
1037- return
950+// SetMaxWidthChars provides a mock function with given fields: nChars
951+func (_m *MockLabelWidget) SetMaxWidthChars(nChars int) {
952+ _m.Called(nChars)
1038953 }
1039954
1040955 // MockLabelWidget_SetMaxWidthChars_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMaxWidthChars'
@@ -1050,13 +965,7 @@ func (_e *MockLabelWidget_Expecter) SetMaxWidthChars(nChars interface{}) *MockLa
1050965
1051966 func (_c *MockLabelWidget_SetMaxWidthChars_Call) Run(run func(nChars int)) *MockLabelWidget_SetMaxWidthChars_Call {
1052967 _c.Call.Run(func(args mock.Arguments) {
1053- var arg0 int
1054- if args[0] != nil {
1055- arg0 = args[0].(int)
1056- }
1057- run(
1058- arg0,
1059- )
968+ run(args[0].(int))
1060969 })
1061970 return _c
1062971 }
@@ -1066,15 +975,14 @@ func (_c *MockLabelWidget_SetMaxWidthChars_Call) Return() *MockLabelWidget_SetMa
1066975 return _c
1067976 }
1068977
1069-func (_c *MockLabelWidget_SetMaxWidthChars_Call) RunAndReturn(run func(nChars int)) *MockLabelWidget_SetMaxWidthChars_Call {
978+func (_c *MockLabelWidget_SetMaxWidthChars_Call) RunAndReturn(run func(int)) *MockLabelWidget_SetMaxWidthChars_Call {
1070979 _c.Run(run)
1071980 return _c
1072981 }
1073982
1074-// SetSizeRequest provides a mock function for the type MockLabelWidget
1075-func (_mock *MockLabelWidget) SetSizeRequest(width int, height int) {
1076- _mock.Called(width, height)
1077- return
983+// SetSizeRequest provides a mock function with given fields: width, height
984+func (_m *MockLabelWidget) SetSizeRequest(width int, height int) {
985+ _m.Called(width, height)
1078986 }
1079987
1080988 // MockLabelWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest'
@@ -1091,18 +999,7 @@ func (_e *MockLabelWidget_Expecter) SetSizeRequest(width interface{}, height int
1091999
10921000 func (_c *MockLabelWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockLabelWidget_SetSizeRequest_Call {
10931001 _c.Call.Run(func(args mock.Arguments) {
1094- var arg0 int
1095- if args[0] != nil {
1096- arg0 = args[0].(int)
1097- }
1098- var arg1 int
1099- if args[1] != nil {
1100- arg1 = args[1].(int)
1101- }
1102- run(
1103- arg0,
1104- arg1,
1105- )
1002+ run(args[0].(int), args[1].(int))
11061003 })
11071004 return _c
11081005 }
@@ -1112,15 +1009,14 @@ func (_c *MockLabelWidget_SetSizeRequest_Call) Return() *MockLabelWidget_SetSize
11121009 return _c
11131010 }
11141011
1115-func (_c *MockLabelWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockLabelWidget_SetSizeRequest_Call {
1012+func (_c *MockLabelWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockLabelWidget_SetSizeRequest_Call {
11161013 _c.Run(run)
11171014 return _c
11181015 }
11191016
1120-// SetText provides a mock function for the type MockLabelWidget
1121-func (_mock *MockLabelWidget) SetText(text string) {
1122- _mock.Called(text)
1123- return
1017+// SetText provides a mock function with given fields: text
1018+func (_m *MockLabelWidget) SetText(text string) {
1019+ _m.Called(text)
11241020 }
11251021
11261022 // MockLabelWidget_SetText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetText'
@@ -1136,13 +1032,7 @@ func (_e *MockLabelWidget_Expecter) SetText(text interface{}) *MockLabelWidget_S
11361032
11371033 func (_c *MockLabelWidget_SetText_Call) Run(run func(text string)) *MockLabelWidget_SetText_Call {
11381034 _c.Call.Run(func(args mock.Arguments) {
1139- var arg0 string
1140- if args[0] != nil {
1141- arg0 = args[0].(string)
1142- }
1143- run(
1144- arg0,
1145- )
1035+ run(args[0].(string))
11461036 })
11471037 return _c
11481038 }
@@ -1152,15 +1042,14 @@ func (_c *MockLabelWidget_SetText_Call) Return() *MockLabelWidget_SetText_Call {
11521042 return _c
11531043 }
11541044
1155-func (_c *MockLabelWidget_SetText_Call) RunAndReturn(run func(text string)) *MockLabelWidget_SetText_Call {
1045+func (_c *MockLabelWidget_SetText_Call) RunAndReturn(run func(string)) *MockLabelWidget_SetText_Call {
11561046 _c.Run(run)
11571047 return _c
11581048 }
11591049
1160-// SetValign provides a mock function for the type MockLabelWidget
1161-func (_mock *MockLabelWidget) SetValign(align gtk.Align) {
1162- _mock.Called(align)
1163- return
1050+// SetValign provides a mock function with given fields: align
1051+func (_m *MockLabelWidget) SetValign(align gtk.Align) {
1052+ _m.Called(align)
11641053 }
11651054
11661055 // MockLabelWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign'
@@ -1176,13 +1065,7 @@ func (_e *MockLabelWidget_Expecter) SetValign(align interface{}) *MockLabelWidge
11761065
11771066 func (_c *MockLabelWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockLabelWidget_SetValign_Call {
11781067 _c.Call.Run(func(args mock.Arguments) {
1179- var arg0 gtk.Align
1180- if args[0] != nil {
1181- arg0 = args[0].(gtk.Align)
1182- }
1183- run(
1184- arg0,
1185- )
1068+ run(args[0].(gtk.Align))
11861069 })
11871070 return _c
11881071 }
@@ -1192,15 +1075,14 @@ func (_c *MockLabelWidget_SetValign_Call) Return() *MockLabelWidget_SetValign_Ca
11921075 return _c
11931076 }
11941077
1195-func (_c *MockLabelWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockLabelWidget_SetValign_Call {
1078+func (_c *MockLabelWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockLabelWidget_SetValign_Call {
11961079 _c.Run(run)
11971080 return _c
11981081 }
11991082
1200-// SetVexpand provides a mock function for the type MockLabelWidget
1201-func (_mock *MockLabelWidget) SetVexpand(expand bool) {
1202- _mock.Called(expand)
1203- return
1083+// SetVexpand provides a mock function with given fields: expand
1084+func (_m *MockLabelWidget) SetVexpand(expand bool) {
1085+ _m.Called(expand)
12041086 }
12051087
12061088 // MockLabelWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand'
@@ -1216,13 +1098,7 @@ func (_e *MockLabelWidget_Expecter) SetVexpand(expand interface{}) *MockLabelWid
12161098
12171099 func (_c *MockLabelWidget_SetVexpand_Call) Run(run func(expand bool)) *MockLabelWidget_SetVexpand_Call {
12181100 _c.Call.Run(func(args mock.Arguments) {
1219- var arg0 bool
1220- if args[0] != nil {
1221- arg0 = args[0].(bool)
1222- }
1223- run(
1224- arg0,
1225- )
1101+ run(args[0].(bool))
12261102 })
12271103 return _c
12281104 }
@@ -1232,15 +1108,14 @@ func (_c *MockLabelWidget_SetVexpand_Call) Return() *MockLabelWidget_SetVexpand_
12321108 return _c
12331109 }
12341110
1235-func (_c *MockLabelWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockLabelWidget_SetVexpand_Call {
1111+func (_c *MockLabelWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetVexpand_Call {
12361112 _c.Run(run)
12371113 return _c
12381114 }
12391115
1240-// SetVisible provides a mock function for the type MockLabelWidget
1241-func (_mock *MockLabelWidget) SetVisible(visible bool) {
1242- _mock.Called(visible)
1243- return
1116+// SetVisible provides a mock function with given fields: visible
1117+func (_m *MockLabelWidget) SetVisible(visible bool) {
1118+ _m.Called(visible)
12441119 }
12451120
12461121 // MockLabelWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible'
@@ -1256,13 +1131,7 @@ func (_e *MockLabelWidget_Expecter) SetVisible(visible interface{}) *MockLabelWi
12561131
12571132 func (_c *MockLabelWidget_SetVisible_Call) Run(run func(visible bool)) *MockLabelWidget_SetVisible_Call {
12581133 _c.Call.Run(func(args mock.Arguments) {
1259- var arg0 bool
1260- if args[0] != nil {
1261- arg0 = args[0].(bool)
1262- }
1263- run(
1264- arg0,
1265- )
1134+ run(args[0].(bool))
12661135 })
12671136 return _c
12681137 }
@@ -1272,15 +1141,14 @@ func (_c *MockLabelWidget_SetVisible_Call) Return() *MockLabelWidget_SetVisible_
12721141 return _c
12731142 }
12741143
1275-func (_c *MockLabelWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockLabelWidget_SetVisible_Call {
1144+func (_c *MockLabelWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetVisible_Call {
12761145 _c.Run(run)
12771146 return _c
12781147 }
12791148
1280-// SetXalign provides a mock function for the type MockLabelWidget
1281-func (_mock *MockLabelWidget) SetXalign(xalign float32) {
1282- _mock.Called(xalign)
1283- return
1149+// SetXalign provides a mock function with given fields: xalign
1150+func (_m *MockLabelWidget) SetXalign(xalign float32) {
1151+ _m.Called(xalign)
12841152 }
12851153
12861154 // MockLabelWidget_SetXalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetXalign'
@@ -1296,13 +1164,7 @@ func (_e *MockLabelWidget_Expecter) SetXalign(xalign interface{}) *MockLabelWidg
12961164
12971165 func (_c *MockLabelWidget_SetXalign_Call) Run(run func(xalign float32)) *MockLabelWidget_SetXalign_Call {
12981166 _c.Call.Run(func(args mock.Arguments) {
1299- var arg0 float32
1300- if args[0] != nil {
1301- arg0 = args[0].(float32)
1302- }
1303- run(
1304- arg0,
1305- )
1167+ run(args[0].(float32))
13061168 })
13071169 return _c
13081170 }
@@ -1312,15 +1174,14 @@ func (_c *MockLabelWidget_SetXalign_Call) Return() *MockLabelWidget_SetXalign_Ca
13121174 return _c
13131175 }
13141176
1315-func (_c *MockLabelWidget_SetXalign_Call) RunAndReturn(run func(xalign float32)) *MockLabelWidget_SetXalign_Call {
1177+func (_c *MockLabelWidget_SetXalign_Call) RunAndReturn(run func(float32)) *MockLabelWidget_SetXalign_Call {
13161178 _c.Run(run)
13171179 return _c
13181180 }
13191181
1320-// Show provides a mock function for the type MockLabelWidget
1321-func (_mock *MockLabelWidget) Show() {
1322- _mock.Called()
1323- return
1182+// Show provides a mock function with no fields
1183+func (_m *MockLabelWidget) Show() {
1184+ _m.Called()
13241185 }
13251186
13261187 // MockLabelWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
@@ -1350,10 +1211,9 @@ func (_c *MockLabelWidget_Show_Call) RunAndReturn(run func()) *MockLabelWidget_S
13501211 return _c
13511212 }
13521213
1353-// Unparent provides a mock function for the type MockLabelWidget
1354-func (_mock *MockLabelWidget) Unparent() {
1355- _mock.Called()
1356- return
1214+// Unparent provides a mock function with no fields
1215+func (_m *MockLabelWidget) Unparent() {
1216+ _m.Called()
13571217 }
13581218
13591219 // MockLabelWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent'
@@ -1382,3 +1242,17 @@ func (_c *MockLabelWidget_Unparent_Call) RunAndReturn(run func()) *MockLabelWidg
13821242 _c.Run(run)
13831243 return _c
13841244 }
1245+
1246+// NewMockLabelWidget creates a new instance of MockLabelWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1247+// The first argument is typically a *testing.T value.
1248+func NewMockLabelWidget(t interface {
1249+ mock.TestingT
1250+ Cleanup(func())
1251+}) *MockLabelWidget {
1252+ mock := &MockLabelWidget{}
1253+ mock.Mock.Test(t)
1254+
1255+ t.Cleanup(func() { mock.AssertExpectations(t) })
1256+
1257+ return mock
1258+}
M internal/ui/layout/mocks/mock_overlay_widget.go +238 -384
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// NewMockOverlayWidget creates a new instance of MockOverlayWidget. 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 NewMockOverlayWidget(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockOverlayWidget {
19- mock := &MockOverlayWidget{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockOverlayWidget is an autogenerated mock type for the OverlayWidget type
2813 type MockOverlayWidget struct {
2914 mock.Mock
@@ -37,10 +22,9 @@ func (_m *MockOverlayWidget) EXPECT() *MockOverlayWidget_Expecter {
3722 return &MockOverlayWidget_Expecter{mock: &_m.Mock}
3823 }
3924
40-// AddController provides a mock function for the type MockOverlayWidget
41-func (_mock *MockOverlayWidget) AddController(controller *gtk.EventController) {
42- _mock.Called(controller)
43- return
25+// AddController provides a mock function with given fields: controller
26+func (_m *MockOverlayWidget) AddController(controller *gtk.EventController) {
27+ _m.Called(controller)
4428 }
4529
4630 // MockOverlayWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController'
@@ -56,13 +40,7 @@ func (_e *MockOverlayWidget_Expecter) AddController(controller interface{}) *Moc
5640
5741 func (_c *MockOverlayWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockOverlayWidget_AddController_Call {
5842 _c.Call.Run(func(args mock.Arguments) {
59- var arg0 *gtk.EventController
60- if args[0] != nil {
61- arg0 = args[0].(*gtk.EventController)
62- }
63- run(
64- arg0,
65- )
43+ run(args[0].(*gtk.EventController))
6644 })
6745 return _c
6846 }
@@ -72,15 +50,14 @@ func (_c *MockOverlayWidget_AddController_Call) Return() *MockOverlayWidget_AddC
7250 return _c
7351 }
7452
75-func (_c *MockOverlayWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockOverlayWidget_AddController_Call {
53+func (_c *MockOverlayWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockOverlayWidget_AddController_Call {
7654 _c.Run(run)
7755 return _c
7856 }
7957
80-// AddCssClass provides a mock function for the type MockOverlayWidget
81-func (_mock *MockOverlayWidget) AddCssClass(cssClass string) {
82- _mock.Called(cssClass)
83- return
58+// AddCssClass provides a mock function with given fields: cssClass
59+func (_m *MockOverlayWidget) AddCssClass(cssClass string) {
60+ _m.Called(cssClass)
8461 }
8562
8663 // MockOverlayWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass'
@@ -96,13 +73,7 @@ func (_e *MockOverlayWidget_Expecter) AddCssClass(cssClass interface{}) *MockOve
9673
9774 func (_c *MockOverlayWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockOverlayWidget_AddCssClass_Call {
9875 _c.Call.Run(func(args mock.Arguments) {
99- var arg0 string
100- if args[0] != nil {
101- arg0 = args[0].(string)
102- }
103- run(
104- arg0,
105- )
76+ run(args[0].(string))
10677 })
10778 return _c
10879 }
@@ -112,15 +83,14 @@ func (_c *MockOverlayWidget_AddCssClass_Call) Return() *MockOverlayWidget_AddCss
11283 return _c
11384 }
11485
115-func (_c *MockOverlayWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockOverlayWidget_AddCssClass_Call {
86+func (_c *MockOverlayWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockOverlayWidget_AddCssClass_Call {
11687 _c.Run(run)
11788 return _c
11889 }
11990
120-// AddOverlay provides a mock function for the type MockOverlayWidget
121-func (_mock *MockOverlayWidget) AddOverlay(overlay layout.Widget) {
122- _mock.Called(overlay)
123- return
91+// AddOverlay provides a mock function with given fields: overlay
92+func (_m *MockOverlayWidget) AddOverlay(overlay layout.Widget) {
93+ _m.Called(overlay)
12494 }
12595
12696 // MockOverlayWidget_AddOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddOverlay'
@@ -136,13 +106,7 @@ func (_e *MockOverlayWidget_Expecter) AddOverlay(overlay interface{}) *MockOverl
136106
137107 func (_c *MockOverlayWidget_AddOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_AddOverlay_Call {
138108 _c.Call.Run(func(args mock.Arguments) {
139- var arg0 layout.Widget
140- if args[0] != nil {
141- arg0 = args[0].(layout.Widget)
142- }
143- run(
144- arg0,
145- )
109+ run(args[0].(layout.Widget))
146110 })
147111 return _c
148112 }
@@ -152,14 +116,14 @@ func (_c *MockOverlayWidget_AddOverlay_Call) Return() *MockOverlayWidget_AddOver
152116 return _c
153117 }
154118
155-func (_c *MockOverlayWidget_AddOverlay_Call) RunAndReturn(run func(overlay layout.Widget)) *MockOverlayWidget_AddOverlay_Call {
119+func (_c *MockOverlayWidget_AddOverlay_Call) RunAndReturn(run func(layout.Widget)) *MockOverlayWidget_AddOverlay_Call {
156120 _c.Run(run)
157121 return _c
158122 }
159123
160-// ComputePoint provides a mock function for the type MockOverlayWidget
161-func (_mock *MockOverlayWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
162- ret := _mock.Called(target)
124+// ComputePoint provides a mock function with given fields: target
125+func (_m *MockOverlayWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
126+ ret := _m.Called(target)
163127
164128 if len(ret) == 0 {
165129 panic("no return value specified for ComputePoint")
@@ -168,24 +132,27 @@ func (_mock *MockOverlayWidget) ComputePoint(target layout.Widget) (float64, flo
168132 var r0 float64
169133 var r1 float64
170134 var r2 bool
171- if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
172- return returnFunc(target)
135+ if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
136+ return rf(target)
173137 }
174- if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok {
175- r0 = returnFunc(target)
138+ if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok {
139+ r0 = rf(target)
176140 } else {
177141 r0 = ret.Get(0).(float64)
178142 }
179- if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok {
180- r1 = returnFunc(target)
143+
144+ if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok {
145+ r1 = rf(target)
181146 } else {
182147 r1 = ret.Get(1).(float64)
183148 }
184- if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok {
185- r2 = returnFunc(target)
149+
150+ if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok {
151+ r2 = rf(target)
186152 } else {
187153 r2 = ret.Get(2).(bool)
188154 }
155+
189156 return r0, r1, r2
190157 }
191158
@@ -202,13 +169,7 @@ func (_e *MockOverlayWidget_Expecter) ComputePoint(target interface{}) *MockOver
202169
203170 func (_c *MockOverlayWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockOverlayWidget_ComputePoint_Call {
204171 _c.Call.Run(func(args mock.Arguments) {
205- var arg0 layout.Widget
206- if args[0] != nil {
207- arg0 = args[0].(layout.Widget)
208- }
209- run(
210- arg0,
211- )
172+ run(args[0].(layout.Widget))
212173 })
213174 return _c
214175 }
@@ -218,25 +179,26 @@ func (_c *MockOverlayWidget_ComputePoint_Call) Return(x float64, y float64, ok b
218179 return _c
219180 }
220181
221-func (_c *MockOverlayWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockOverlayWidget_ComputePoint_Call {
182+func (_c *MockOverlayWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockOverlayWidget_ComputePoint_Call {
222183 _c.Call.Return(run)
223184 return _c
224185 }
225186
226-// GetAllocatedHeight provides a mock function for the type MockOverlayWidget
227-func (_mock *MockOverlayWidget) GetAllocatedHeight() int {
228- ret := _mock.Called()
187+// GetAllocatedHeight provides a mock function with no fields
188+func (_m *MockOverlayWidget) GetAllocatedHeight() int {
189+ ret := _m.Called()
229190
230191 if len(ret) == 0 {
231192 panic("no return value specified for GetAllocatedHeight")
232193 }
233194
234195 var r0 int
235- if returnFunc, ok := ret.Get(0).(func() int); ok {
236- r0 = returnFunc()
196+ if rf, ok := ret.Get(0).(func() int); ok {
197+ r0 = rf()
237198 } else {
238199 r0 = ret.Get(0).(int)
239200 }
201+
240202 return r0
241203 }
242204
@@ -257,8 +219,8 @@ func (_c *MockOverlayWidget_GetAllocatedHeight_Call) Run(run func()) *MockOverla
257219 return _c
258220 }
259221
260-func (_c *MockOverlayWidget_GetAllocatedHeight_Call) Return(n int) *MockOverlayWidget_GetAllocatedHeight_Call {
261- _c.Call.Return(n)
222+func (_c *MockOverlayWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockOverlayWidget_GetAllocatedHeight_Call {
223+ _c.Call.Return(_a0)
262224 return _c
263225 }
264226
@@ -267,20 +229,21 @@ func (_c *MockOverlayWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int
267229 return _c
268230 }
269231
270-// GetAllocatedWidth provides a mock function for the type MockOverlayWidget
271-func (_mock *MockOverlayWidget) GetAllocatedWidth() int {
272- ret := _mock.Called()
232+// GetAllocatedWidth provides a mock function with no fields
233+func (_m *MockOverlayWidget) GetAllocatedWidth() int {
234+ ret := _m.Called()
273235
274236 if len(ret) == 0 {
275237 panic("no return value specified for GetAllocatedWidth")
276238 }
277239
278240 var r0 int
279- if returnFunc, ok := ret.Get(0).(func() int); ok {
280- r0 = returnFunc()
241+ if rf, ok := ret.Get(0).(func() int); ok {
242+ r0 = rf()
281243 } else {
282244 r0 = ret.Get(0).(int)
283245 }
246+
284247 return r0
285248 }
286249
@@ -301,8 +264,8 @@ func (_c *MockOverlayWidget_GetAllocatedWidth_Call) Run(run func()) *MockOverlay
301264 return _c
302265 }
303266
304-func (_c *MockOverlayWidget_GetAllocatedWidth_Call) Return(n int) *MockOverlayWidget_GetAllocatedWidth_Call {
305- _c.Call.Return(n)
267+func (_c *MockOverlayWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockOverlayWidget_GetAllocatedWidth_Call {
268+ _c.Call.Return(_a0)
306269 return _c
307270 }
308271
@@ -311,22 +274,23 @@ func (_c *MockOverlayWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int)
311274 return _c
312275 }
313276
314-// GetChild provides a mock function for the type MockOverlayWidget
315-func (_mock *MockOverlayWidget) GetChild() layout.Widget {
316- ret := _mock.Called()
277+// GetChild provides a mock function with no fields
278+func (_m *MockOverlayWidget) GetChild() layout.Widget {
279+ ret := _m.Called()
317280
318281 if len(ret) == 0 {
319282 panic("no return value specified for GetChild")
320283 }
321284
322285 var r0 layout.Widget
323- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
324- r0 = returnFunc()
286+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
287+ r0 = rf()
325288 } else {
326289 if ret.Get(0) != nil {
327290 r0 = ret.Get(0).(layout.Widget)
328291 }
329292 }
293+
330294 return r0
331295 }
332296
@@ -347,8 +311,8 @@ func (_c *MockOverlayWidget_GetChild_Call) Run(run func()) *MockOverlayWidget_Ge
347311 return _c
348312 }
349313
350-func (_c *MockOverlayWidget_GetChild_Call) Return(widget layout.Widget) *MockOverlayWidget_GetChild_Call {
351- _c.Call.Return(widget)
314+func (_c *MockOverlayWidget_GetChild_Call) Return(_a0 layout.Widget) *MockOverlayWidget_GetChild_Call {
315+ _c.Call.Return(_a0)
352316 return _c
353317 }
354318
@@ -357,20 +321,21 @@ func (_c *MockOverlayWidget_GetChild_Call) RunAndReturn(run func() layout.Widget
357321 return _c
358322 }
359323
360-// GetClipOverlay provides a mock function for the type MockOverlayWidget
361-func (_mock *MockOverlayWidget) GetClipOverlay(overlay layout.Widget) bool {
362- ret := _mock.Called(overlay)
324+// GetClipOverlay provides a mock function with given fields: overlay
325+func (_m *MockOverlayWidget) GetClipOverlay(overlay layout.Widget) bool {
326+ ret := _m.Called(overlay)
363327
364328 if len(ret) == 0 {
365329 panic("no return value specified for GetClipOverlay")
366330 }
367331
368332 var r0 bool
369- if returnFunc, ok := ret.Get(0).(func(layout.Widget) bool); ok {
370- r0 = returnFunc(overlay)
333+ if rf, ok := ret.Get(0).(func(layout.Widget) bool); ok {
334+ r0 = rf(overlay)
371335 } else {
372336 r0 = ret.Get(0).(bool)
373337 }
338+
374339 return r0
375340 }
376341
@@ -387,41 +352,36 @@ func (_e *MockOverlayWidget_Expecter) GetClipOverlay(overlay interface{}) *MockO
387352
388353 func (_c *MockOverlayWidget_GetClipOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_GetClipOverlay_Call {
389354 _c.Call.Run(func(args mock.Arguments) {
390- var arg0 layout.Widget
391- if args[0] != nil {
392- arg0 = args[0].(layout.Widget)
393- }
394- run(
395- arg0,
396- )
355+ run(args[0].(layout.Widget))
397356 })
398357 return _c
399358 }
400359
401-func (_c *MockOverlayWidget_GetClipOverlay_Call) Return(b bool) *MockOverlayWidget_GetClipOverlay_Call {
402- _c.Call.Return(b)
360+func (_c *MockOverlayWidget_GetClipOverlay_Call) Return(_a0 bool) *MockOverlayWidget_GetClipOverlay_Call {
361+ _c.Call.Return(_a0)
403362 return _c
404363 }
405364
406-func (_c *MockOverlayWidget_GetClipOverlay_Call) RunAndReturn(run func(overlay layout.Widget) bool) *MockOverlayWidget_GetClipOverlay_Call {
365+func (_c *MockOverlayWidget_GetClipOverlay_Call) RunAndReturn(run func(layout.Widget) bool) *MockOverlayWidget_GetClipOverlay_Call {
407366 _c.Call.Return(run)
408367 return _c
409368 }
410369
411-// GetHexpand provides a mock function for the type MockOverlayWidget
412-func (_mock *MockOverlayWidget) GetHexpand() bool {
413- ret := _mock.Called()
370+// GetHexpand provides a mock function with no fields
371+func (_m *MockOverlayWidget) GetHexpand() bool {
372+ ret := _m.Called()
414373
415374 if len(ret) == 0 {
416375 panic("no return value specified for GetHexpand")
417376 }
418377
419378 var r0 bool
420- if returnFunc, ok := ret.Get(0).(func() bool); ok {
421- r0 = returnFunc()
379+ if rf, ok := ret.Get(0).(func() bool); ok {
380+ r0 = rf()
422381 } else {
423382 r0 = ret.Get(0).(bool)
424383 }
384+
425385 return r0
426386 }
427387
@@ -442,8 +402,8 @@ func (_c *MockOverlayWidget_GetHexpand_Call) Run(run func()) *MockOverlayWidget_
442402 return _c
443403 }
444404
445-func (_c *MockOverlayWidget_GetHexpand_Call) Return(b bool) *MockOverlayWidget_GetHexpand_Call {
446- _c.Call.Return(b)
405+func (_c *MockOverlayWidget_GetHexpand_Call) Return(_a0 bool) *MockOverlayWidget_GetHexpand_Call {
406+ _c.Call.Return(_a0)
447407 return _c
448408 }
449409
@@ -452,20 +412,21 @@ func (_c *MockOverlayWidget_GetHexpand_Call) RunAndReturn(run func() bool) *Mock
452412 return _c
453413 }
454414
455-// GetMeasureOverlay provides a mock function for the type MockOverlayWidget
456-func (_mock *MockOverlayWidget) GetMeasureOverlay(overlay layout.Widget) bool {
457- ret := _mock.Called(overlay)
415+// GetMeasureOverlay provides a mock function with given fields: overlay
416+func (_m *MockOverlayWidget) GetMeasureOverlay(overlay layout.Widget) bool {
417+ ret := _m.Called(overlay)
458418
459419 if len(ret) == 0 {
460420 panic("no return value specified for GetMeasureOverlay")
461421 }
462422
463423 var r0 bool
464- if returnFunc, ok := ret.Get(0).(func(layout.Widget) bool); ok {
465- r0 = returnFunc(overlay)
424+ if rf, ok := ret.Get(0).(func(layout.Widget) bool); ok {
425+ r0 = rf(overlay)
466426 } else {
467427 r0 = ret.Get(0).(bool)
468428 }
429+
469430 return r0
470431 }
471432
@@ -482,43 +443,38 @@ func (_e *MockOverlayWidget_Expecter) GetMeasureOverlay(overlay interface{}) *Mo
482443
483444 func (_c *MockOverlayWidget_GetMeasureOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_GetMeasureOverlay_Call {
484445 _c.Call.Run(func(args mock.Arguments) {
485- var arg0 layout.Widget
486- if args[0] != nil {
487- arg0 = args[0].(layout.Widget)
488- }
489- run(
490- arg0,
491- )
446+ run(args[0].(layout.Widget))
492447 })
493448 return _c
494449 }
495450
496-func (_c *MockOverlayWidget_GetMeasureOverlay_Call) Return(b bool) *MockOverlayWidget_GetMeasureOverlay_Call {
497- _c.Call.Return(b)
451+func (_c *MockOverlayWidget_GetMeasureOverlay_Call) Return(_a0 bool) *MockOverlayWidget_GetMeasureOverlay_Call {
452+ _c.Call.Return(_a0)
498453 return _c
499454 }
500455
501-func (_c *MockOverlayWidget_GetMeasureOverlay_Call) RunAndReturn(run func(overlay layout.Widget) bool) *MockOverlayWidget_GetMeasureOverlay_Call {
456+func (_c *MockOverlayWidget_GetMeasureOverlay_Call) RunAndReturn(run func(layout.Widget) bool) *MockOverlayWidget_GetMeasureOverlay_Call {
502457 _c.Call.Return(run)
503458 return _c
504459 }
505460
506-// GetParent provides a mock function for the type MockOverlayWidget
507-func (_mock *MockOverlayWidget) GetParent() layout.Widget {
508- ret := _mock.Called()
461+// GetParent provides a mock function with no fields
462+func (_m *MockOverlayWidget) GetParent() layout.Widget {
463+ ret := _m.Called()
509464
510465 if len(ret) == 0 {
511466 panic("no return value specified for GetParent")
512467 }
513468
514469 var r0 layout.Widget
515- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
516- r0 = returnFunc()
470+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
471+ r0 = rf()
517472 } else {
518473 if ret.Get(0) != nil {
519474 r0 = ret.Get(0).(layout.Widget)
520475 }
521476 }
477+
522478 return r0
523479 }
524480
@@ -539,8 +495,8 @@ func (_c *MockOverlayWidget_GetParent_Call) Run(run func()) *MockOverlayWidget_G
539495 return _c
540496 }
541497
542-func (_c *MockOverlayWidget_GetParent_Call) Return(widget layout.Widget) *MockOverlayWidget_GetParent_Call {
543- _c.Call.Return(widget)
498+func (_c *MockOverlayWidget_GetParent_Call) Return(_a0 layout.Widget) *MockOverlayWidget_GetParent_Call {
499+ _c.Call.Return(_a0)
544500 return _c
545501 }
546502
@@ -549,20 +505,21 @@ func (_c *MockOverlayWidget_GetParent_Call) RunAndReturn(run func() layout.Widge
549505 return _c
550506 }
551507
552-// GetVexpand provides a mock function for the type MockOverlayWidget
553-func (_mock *MockOverlayWidget) GetVexpand() bool {
554- ret := _mock.Called()
508+// GetVexpand provides a mock function with no fields
509+func (_m *MockOverlayWidget) GetVexpand() bool {
510+ ret := _m.Called()
555511
556512 if len(ret) == 0 {
557513 panic("no return value specified for GetVexpand")
558514 }
559515
560516 var r0 bool
561- if returnFunc, ok := ret.Get(0).(func() bool); ok {
562- r0 = returnFunc()
517+ if rf, ok := ret.Get(0).(func() bool); ok {
518+ r0 = rf()
563519 } else {
564520 r0 = ret.Get(0).(bool)
565521 }
522+
566523 return r0
567524 }
568525
@@ -583,8 +540,8 @@ func (_c *MockOverlayWidget_GetVexpand_Call) Run(run func()) *MockOverlayWidget_
583540 return _c
584541 }
585542
586-func (_c *MockOverlayWidget_GetVexpand_Call) Return(b bool) *MockOverlayWidget_GetVexpand_Call {
587- _c.Call.Return(b)
543+func (_c *MockOverlayWidget_GetVexpand_Call) Return(_a0 bool) *MockOverlayWidget_GetVexpand_Call {
544+ _c.Call.Return(_a0)
588545 return _c
589546 }
590547
@@ -593,20 +550,21 @@ func (_c *MockOverlayWidget_GetVexpand_Call) RunAndReturn(run func() bool) *Mock
593550 return _c
594551 }
595552
596-// GrabFocus provides a mock function for the type MockOverlayWidget
597-func (_mock *MockOverlayWidget) GrabFocus() bool {
598- ret := _mock.Called()
553+// GrabFocus provides a mock function with no fields
554+func (_m *MockOverlayWidget) GrabFocus() bool {
555+ ret := _m.Called()
599556
600557 if len(ret) == 0 {
601558 panic("no return value specified for GrabFocus")
602559 }
603560
604561 var r0 bool
605- if returnFunc, ok := ret.Get(0).(func() bool); ok {
606- r0 = returnFunc()
562+ if rf, ok := ret.Get(0).(func() bool); ok {
563+ r0 = rf()
607564 } else {
608565 r0 = ret.Get(0).(bool)
609566 }
567+
610568 return r0
611569 }
612570
@@ -627,8 +585,8 @@ func (_c *MockOverlayWidget_GrabFocus_Call) Run(run func()) *MockOverlayWidget_G
627585 return _c
628586 }
629587
630-func (_c *MockOverlayWidget_GrabFocus_Call) Return(b bool) *MockOverlayWidget_GrabFocus_Call {
631- _c.Call.Return(b)
588+func (_c *MockOverlayWidget_GrabFocus_Call) Return(_a0 bool) *MockOverlayWidget_GrabFocus_Call {
589+ _c.Call.Return(_a0)
632590 return _c
633591 }
634592
@@ -637,22 +595,23 @@ func (_c *MockOverlayWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockO
637595 return _c
638596 }
639597
640-// GtkWidget provides a mock function for the type MockOverlayWidget
641-func (_mock *MockOverlayWidget) GtkWidget() *gtk.Widget {
642- ret := _mock.Called()
598+// GtkWidget provides a mock function with no fields
599+func (_m *MockOverlayWidget) GtkWidget() *gtk.Widget {
600+ ret := _m.Called()
643601
644602 if len(ret) == 0 {
645603 panic("no return value specified for GtkWidget")
646604 }
647605
648606 var r0 *gtk.Widget
649- if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok {
650- r0 = returnFunc()
607+ if rf, ok := ret.Get(0).(func() *gtk.Widget); ok {
608+ r0 = rf()
651609 } else {
652610 if ret.Get(0) != nil {
653611 r0 = ret.Get(0).(*gtk.Widget)
654612 }
655613 }
614+
656615 return r0
657616 }
658617
@@ -673,8 +632,8 @@ func (_c *MockOverlayWidget_GtkWidget_Call) Run(run func()) *MockOverlayWidget_G
673632 return _c
674633 }
675634
676-func (_c *MockOverlayWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockOverlayWidget_GtkWidget_Call {
677- _c.Call.Return(widget)
635+func (_c *MockOverlayWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockOverlayWidget_GtkWidget_Call {
636+ _c.Call.Return(_a0)
678637 return _c
679638 }
680639
@@ -683,20 +642,21 @@ func (_c *MockOverlayWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget)
683642 return _c
684643 }
685644
686-// HasCssClass provides a mock function for the type MockOverlayWidget
687-func (_mock *MockOverlayWidget) HasCssClass(cssClass string) bool {
688- ret := _mock.Called(cssClass)
645+// HasCssClass provides a mock function with given fields: cssClass
646+func (_m *MockOverlayWidget) HasCssClass(cssClass string) bool {
647+ ret := _m.Called(cssClass)
689648
690649 if len(ret) == 0 {
691650 panic("no return value specified for HasCssClass")
692651 }
693652
694653 var r0 bool
695- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
696- r0 = returnFunc(cssClass)
654+ if rf, ok := ret.Get(0).(func(string) bool); ok {
655+ r0 = rf(cssClass)
697656 } else {
698657 r0 = ret.Get(0).(bool)
699658 }
659+
700660 return r0
701661 }
702662
@@ -713,41 +673,36 @@ func (_e *MockOverlayWidget_Expecter) HasCssClass(cssClass interface{}) *MockOve
713673
714674 func (_c *MockOverlayWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockOverlayWidget_HasCssClass_Call {
715675 _c.Call.Run(func(args mock.Arguments) {
716- var arg0 string
717- if args[0] != nil {
718- arg0 = args[0].(string)
719- }
720- run(
721- arg0,
722- )
676+ run(args[0].(string))
723677 })
724678 return _c
725679 }
726680
727-func (_c *MockOverlayWidget_HasCssClass_Call) Return(b bool) *MockOverlayWidget_HasCssClass_Call {
728- _c.Call.Return(b)
681+func (_c *MockOverlayWidget_HasCssClass_Call) Return(_a0 bool) *MockOverlayWidget_HasCssClass_Call {
682+ _c.Call.Return(_a0)
729683 return _c
730684 }
731685
732-func (_c *MockOverlayWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockOverlayWidget_HasCssClass_Call {
686+func (_c *MockOverlayWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockOverlayWidget_HasCssClass_Call {
733687 _c.Call.Return(run)
734688 return _c
735689 }
736690
737-// HasFocus provides a mock function for the type MockOverlayWidget
738-func (_mock *MockOverlayWidget) HasFocus() bool {
739- ret := _mock.Called()
691+// HasFocus provides a mock function with no fields
692+func (_m *MockOverlayWidget) HasFocus() bool {
693+ ret := _m.Called()
740694
741695 if len(ret) == 0 {
742696 panic("no return value specified for HasFocus")
743697 }
744698
745699 var r0 bool
746- if returnFunc, ok := ret.Get(0).(func() bool); ok {
747- r0 = returnFunc()
700+ if rf, ok := ret.Get(0).(func() bool); ok {
701+ r0 = rf()
748702 } else {
749703 r0 = ret.Get(0).(bool)
750704 }
705+
751706 return r0
752707 }
753708
@@ -768,8 +723,8 @@ func (_c *MockOverlayWidget_HasFocus_Call) Run(run func()) *MockOverlayWidget_Ha
768723 return _c
769724 }
770725
771-func (_c *MockOverlayWidget_HasFocus_Call) Return(b bool) *MockOverlayWidget_HasFocus_Call {
772- _c.Call.Return(b)
726+func (_c *MockOverlayWidget_HasFocus_Call) Return(_a0 bool) *MockOverlayWidget_HasFocus_Call {
727+ _c.Call.Return(_a0)
773728 return _c
774729 }
775730
@@ -778,10 +733,9 @@ func (_c *MockOverlayWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockOv
778733 return _c
779734 }
780735
781-// Hide provides a mock function for the type MockOverlayWidget
782-func (_mock *MockOverlayWidget) Hide() {
783- _mock.Called()
784- return
736+// Hide provides a mock function with no fields
737+func (_m *MockOverlayWidget) Hide() {
738+ _m.Called()
785739 }
786740
787741 // MockOverlayWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
@@ -811,20 +765,21 @@ func (_c *MockOverlayWidget_Hide_Call) RunAndReturn(run func()) *MockOverlayWidg
811765 return _c
812766 }
813767
814-// IsVisible provides a mock function for the type MockOverlayWidget
815-func (_mock *MockOverlayWidget) IsVisible() bool {
816- ret := _mock.Called()
768+// IsVisible provides a mock function with no fields
769+func (_m *MockOverlayWidget) IsVisible() bool {
770+ ret := _m.Called()
817771
818772 if len(ret) == 0 {
819773 panic("no return value specified for IsVisible")
820774 }
821775
822776 var r0 bool
823- if returnFunc, ok := ret.Get(0).(func() bool); ok {
824- r0 = returnFunc()
777+ if rf, ok := ret.Get(0).(func() bool); ok {
778+ r0 = rf()
825779 } else {
826780 r0 = ret.Get(0).(bool)
827781 }
782+
828783 return r0
829784 }
830785
@@ -845,8 +800,8 @@ func (_c *MockOverlayWidget_IsVisible_Call) Run(run func()) *MockOverlayWidget_I
845800 return _c
846801 }
847802
848-func (_c *MockOverlayWidget_IsVisible_Call) Return(b bool) *MockOverlayWidget_IsVisible_Call {
849- _c.Call.Return(b)
803+func (_c *MockOverlayWidget_IsVisible_Call) Return(_a0 bool) *MockOverlayWidget_IsVisible_Call {
804+ _c.Call.Return(_a0)
850805 return _c
851806 }
852807
@@ -855,10 +810,9 @@ func (_c *MockOverlayWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockO
855810 return _c
856811 }
857812
858-// RemoveCssClass provides a mock function for the type MockOverlayWidget
859-func (_mock *MockOverlayWidget) RemoveCssClass(cssClass string) {
860- _mock.Called(cssClass)
861- return
813+// RemoveCssClass provides a mock function with given fields: cssClass
814+func (_m *MockOverlayWidget) RemoveCssClass(cssClass string) {
815+ _m.Called(cssClass)
862816 }
863817
864818 // MockOverlayWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass'
@@ -874,13 +828,7 @@ func (_e *MockOverlayWidget_Expecter) RemoveCssClass(cssClass interface{}) *Mock
874828
875829 func (_c *MockOverlayWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockOverlayWidget_RemoveCssClass_Call {
876830 _c.Call.Run(func(args mock.Arguments) {
877- var arg0 string
878- if args[0] != nil {
879- arg0 = args[0].(string)
880- }
881- run(
882- arg0,
883- )
831+ run(args[0].(string))
884832 })
885833 return _c
886834 }
@@ -890,15 +838,14 @@ func (_c *MockOverlayWidget_RemoveCssClass_Call) Return() *MockOverlayWidget_Rem
890838 return _c
891839 }
892840
893-func (_c *MockOverlayWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockOverlayWidget_RemoveCssClass_Call {
841+func (_c *MockOverlayWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockOverlayWidget_RemoveCssClass_Call {
894842 _c.Run(run)
895843 return _c
896844 }
897845
898-// RemoveOverlay provides a mock function for the type MockOverlayWidget
899-func (_mock *MockOverlayWidget) RemoveOverlay(overlay layout.Widget) {
900- _mock.Called(overlay)
901- return
846+// RemoveOverlay provides a mock function with given fields: overlay
847+func (_m *MockOverlayWidget) RemoveOverlay(overlay layout.Widget) {
848+ _m.Called(overlay)
902849 }
903850
904851 // MockOverlayWidget_RemoveOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveOverlay'
@@ -914,13 +861,7 @@ func (_e *MockOverlayWidget_Expecter) RemoveOverlay(overlay interface{}) *MockOv
914861
915862 func (_c *MockOverlayWidget_RemoveOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_RemoveOverlay_Call {
916863 _c.Call.Run(func(args mock.Arguments) {
917- var arg0 layout.Widget
918- if args[0] != nil {
919- arg0 = args[0].(layout.Widget)
920- }
921- run(
922- arg0,
923- )
864+ run(args[0].(layout.Widget))
924865 })
925866 return _c
926867 }
@@ -930,15 +871,14 @@ func (_c *MockOverlayWidget_RemoveOverlay_Call) Return() *MockOverlayWidget_Remo
930871 return _c
931872 }
932873
933-func (_c *MockOverlayWidget_RemoveOverlay_Call) RunAndReturn(run func(overlay layout.Widget)) *MockOverlayWidget_RemoveOverlay_Call {
874+func (_c *MockOverlayWidget_RemoveOverlay_Call) RunAndReturn(run func(layout.Widget)) *MockOverlayWidget_RemoveOverlay_Call {
934875 _c.Run(run)
935876 return _c
936877 }
937878
938-// SetCanFocus provides a mock function for the type MockOverlayWidget
939-func (_mock *MockOverlayWidget) SetCanFocus(canFocus bool) {
940- _mock.Called(canFocus)
941- return
879+// SetCanFocus provides a mock function with given fields: canFocus
880+func (_m *MockOverlayWidget) SetCanFocus(canFocus bool) {
881+ _m.Called(canFocus)
942882 }
943883
944884 // MockOverlayWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus'
@@ -954,13 +894,7 @@ func (_e *MockOverlayWidget_Expecter) SetCanFocus(canFocus interface{}) *MockOve
954894
955895 func (_c *MockOverlayWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockOverlayWidget_SetCanFocus_Call {
956896 _c.Call.Run(func(args mock.Arguments) {
957- var arg0 bool
958- if args[0] != nil {
959- arg0 = args[0].(bool)
960- }
961- run(
962- arg0,
963- )
897+ run(args[0].(bool))
964898 })
965899 return _c
966900 }
@@ -970,15 +904,14 @@ func (_c *MockOverlayWidget_SetCanFocus_Call) Return() *MockOverlayWidget_SetCan
970904 return _c
971905 }
972906
973-func (_c *MockOverlayWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockOverlayWidget_SetCanFocus_Call {
907+func (_c *MockOverlayWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetCanFocus_Call {
974908 _c.Run(run)
975909 return _c
976910 }
977911
978-// SetCanTarget provides a mock function for the type MockOverlayWidget
979-func (_mock *MockOverlayWidget) SetCanTarget(canTarget bool) {
980- _mock.Called(canTarget)
981- return
912+// SetCanTarget provides a mock function with given fields: canTarget
913+func (_m *MockOverlayWidget) SetCanTarget(canTarget bool) {
914+ _m.Called(canTarget)
982915 }
983916
984917 // MockOverlayWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget'
@@ -994,13 +927,7 @@ func (_e *MockOverlayWidget_Expecter) SetCanTarget(canTarget interface{}) *MockO
994927
995928 func (_c *MockOverlayWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockOverlayWidget_SetCanTarget_Call {
996929 _c.Call.Run(func(args mock.Arguments) {
997- var arg0 bool
998- if args[0] != nil {
999- arg0 = args[0].(bool)
1000- }
1001- run(
1002- arg0,
1003- )
930+ run(args[0].(bool))
1004931 })
1005932 return _c
1006933 }
@@ -1010,15 +937,14 @@ func (_c *MockOverlayWidget_SetCanTarget_Call) Return() *MockOverlayWidget_SetCa
1010937 return _c
1011938 }
1012939
1013-func (_c *MockOverlayWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockOverlayWidget_SetCanTarget_Call {
940+func (_c *MockOverlayWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetCanTarget_Call {
1014941 _c.Run(run)
1015942 return _c
1016943 }
1017944
1018-// SetChild provides a mock function for the type MockOverlayWidget
1019-func (_mock *MockOverlayWidget) SetChild(child layout.Widget) {
1020- _mock.Called(child)
1021- return
945+// SetChild provides a mock function with given fields: child
946+func (_m *MockOverlayWidget) SetChild(child layout.Widget) {
947+ _m.Called(child)
1022948 }
1023949
1024950 // MockOverlayWidget_SetChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetChild'
@@ -1034,13 +960,7 @@ func (_e *MockOverlayWidget_Expecter) SetChild(child interface{}) *MockOverlayWi
1034960
1035961 func (_c *MockOverlayWidget_SetChild_Call) Run(run func(child layout.Widget)) *MockOverlayWidget_SetChild_Call {
1036962 _c.Call.Run(func(args mock.Arguments) {
1037- var arg0 layout.Widget
1038- if args[0] != nil {
1039- arg0 = args[0].(layout.Widget)
1040- }
1041- run(
1042- arg0,
1043- )
963+ run(args[0].(layout.Widget))
1044964 })
1045965 return _c
1046966 }
@@ -1050,15 +970,14 @@ func (_c *MockOverlayWidget_SetChild_Call) Return() *MockOverlayWidget_SetChild_
1050970 return _c
1051971 }
1052972
1053-func (_c *MockOverlayWidget_SetChild_Call) RunAndReturn(run func(child layout.Widget)) *MockOverlayWidget_SetChild_Call {
973+func (_c *MockOverlayWidget_SetChild_Call) RunAndReturn(run func(layout.Widget)) *MockOverlayWidget_SetChild_Call {
1054974 _c.Run(run)
1055975 return _c
1056976 }
1057977
1058-// SetClipOverlay provides a mock function for the type MockOverlayWidget
1059-func (_mock *MockOverlayWidget) SetClipOverlay(overlay layout.Widget, clip bool) {
1060- _mock.Called(overlay, clip)
1061- return
978+// SetClipOverlay provides a mock function with given fields: overlay, clip
979+func (_m *MockOverlayWidget) SetClipOverlay(overlay layout.Widget, clip bool) {
980+ _m.Called(overlay, clip)
1062981 }
1063982
1064983 // MockOverlayWidget_SetClipOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetClipOverlay'
@@ -1075,18 +994,7 @@ func (_e *MockOverlayWidget_Expecter) SetClipOverlay(overlay interface{}, clip i
1075994
1076995 func (_c *MockOverlayWidget_SetClipOverlay_Call) Run(run func(overlay layout.Widget, clip bool)) *MockOverlayWidget_SetClipOverlay_Call {
1077996 _c.Call.Run(func(args mock.Arguments) {
1078- var arg0 layout.Widget
1079- if args[0] != nil {
1080- arg0 = args[0].(layout.Widget)
1081- }
1082- var arg1 bool
1083- if args[1] != nil {
1084- arg1 = args[1].(bool)
1085- }
1086- run(
1087- arg0,
1088- arg1,
1089- )
997+ run(args[0].(layout.Widget), args[1].(bool))
1090998 })
1091999 return _c
10921000 }
@@ -1096,15 +1004,14 @@ func (_c *MockOverlayWidget_SetClipOverlay_Call) Return() *MockOverlayWidget_Set
10961004 return _c
10971005 }
10981006
1099-func (_c *MockOverlayWidget_SetClipOverlay_Call) RunAndReturn(run func(overlay layout.Widget, clip bool)) *MockOverlayWidget_SetClipOverlay_Call {
1007+func (_c *MockOverlayWidget_SetClipOverlay_Call) RunAndReturn(run func(layout.Widget, bool)) *MockOverlayWidget_SetClipOverlay_Call {
11001008 _c.Run(run)
11011009 return _c
11021010 }
11031011
1104-// SetFocusOnClick provides a mock function for the type MockOverlayWidget
1105-func (_mock *MockOverlayWidget) SetFocusOnClick(focusOnClick bool) {
1106- _mock.Called(focusOnClick)
1107- return
1012+// SetFocusOnClick provides a mock function with given fields: focusOnClick
1013+func (_m *MockOverlayWidget) SetFocusOnClick(focusOnClick bool) {
1014+ _m.Called(focusOnClick)
11081015 }
11091016
11101017 // MockOverlayWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick'
@@ -1120,13 +1027,7 @@ func (_e *MockOverlayWidget_Expecter) SetFocusOnClick(focusOnClick interface{})
11201027
11211028 func (_c *MockOverlayWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockOverlayWidget_SetFocusOnClick_Call {
11221029 _c.Call.Run(func(args mock.Arguments) {
1123- var arg0 bool
1124- if args[0] != nil {
1125- arg0 = args[0].(bool)
1126- }
1127- run(
1128- arg0,
1129- )
1030+ run(args[0].(bool))
11301031 })
11311032 return _c
11321033 }
@@ -1136,15 +1037,14 @@ func (_c *MockOverlayWidget_SetFocusOnClick_Call) Return() *MockOverlayWidget_Se
11361037 return _c
11371038 }
11381039
1139-func (_c *MockOverlayWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockOverlayWidget_SetFocusOnClick_Call {
1040+func (_c *MockOverlayWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetFocusOnClick_Call {
11401041 _c.Run(run)
11411042 return _c
11421043 }
11431044
1144-// SetHalign provides a mock function for the type MockOverlayWidget
1145-func (_mock *MockOverlayWidget) SetHalign(align gtk.Align) {
1146- _mock.Called(align)
1147- return
1045+// SetHalign provides a mock function with given fields: align
1046+func (_m *MockOverlayWidget) SetHalign(align gtk.Align) {
1047+ _m.Called(align)
11481048 }
11491049
11501050 // MockOverlayWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign'
@@ -1160,13 +1060,7 @@ func (_e *MockOverlayWidget_Expecter) SetHalign(align interface{}) *MockOverlayW
11601060
11611061 func (_c *MockOverlayWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockOverlayWidget_SetHalign_Call {
11621062 _c.Call.Run(func(args mock.Arguments) {
1163- var arg0 gtk.Align
1164- if args[0] != nil {
1165- arg0 = args[0].(gtk.Align)
1166- }
1167- run(
1168- arg0,
1169- )
1063+ run(args[0].(gtk.Align))
11701064 })
11711065 return _c
11721066 }
@@ -1176,15 +1070,14 @@ func (_c *MockOverlayWidget_SetHalign_Call) Return() *MockOverlayWidget_SetHalig
11761070 return _c
11771071 }
11781072
1179-func (_c *MockOverlayWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockOverlayWidget_SetHalign_Call {
1073+func (_c *MockOverlayWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockOverlayWidget_SetHalign_Call {
11801074 _c.Run(run)
11811075 return _c
11821076 }
11831077
1184-// SetHexpand provides a mock function for the type MockOverlayWidget
1185-func (_mock *MockOverlayWidget) SetHexpand(expand bool) {
1186- _mock.Called(expand)
1187- return
1078+// SetHexpand provides a mock function with given fields: expand
1079+func (_m *MockOverlayWidget) SetHexpand(expand bool) {
1080+ _m.Called(expand)
11881081 }
11891082
11901083 // MockOverlayWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand'
@@ -1200,13 +1093,7 @@ func (_e *MockOverlayWidget_Expecter) SetHexpand(expand interface{}) *MockOverla
12001093
12011094 func (_c *MockOverlayWidget_SetHexpand_Call) Run(run func(expand bool)) *MockOverlayWidget_SetHexpand_Call {
12021095 _c.Call.Run(func(args mock.Arguments) {
1203- var arg0 bool
1204- if args[0] != nil {
1205- arg0 = args[0].(bool)
1206- }
1207- run(
1208- arg0,
1209- )
1096+ run(args[0].(bool))
12101097 })
12111098 return _c
12121099 }
@@ -1216,15 +1103,14 @@ func (_c *MockOverlayWidget_SetHexpand_Call) Return() *MockOverlayWidget_SetHexp
12161103 return _c
12171104 }
12181105
1219-func (_c *MockOverlayWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockOverlayWidget_SetHexpand_Call {
1106+func (_c *MockOverlayWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetHexpand_Call {
12201107 _c.Run(run)
12211108 return _c
12221109 }
12231110
1224-// SetMeasureOverlay provides a mock function for the type MockOverlayWidget
1225-func (_mock *MockOverlayWidget) SetMeasureOverlay(overlay layout.Widget, measure bool) {
1226- _mock.Called(overlay, measure)
1227- return
1111+// SetMeasureOverlay provides a mock function with given fields: overlay, measure
1112+func (_m *MockOverlayWidget) SetMeasureOverlay(overlay layout.Widget, measure bool) {
1113+ _m.Called(overlay, measure)
12281114 }
12291115
12301116 // MockOverlayWidget_SetMeasureOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMeasureOverlay'
@@ -1241,18 +1127,7 @@ func (_e *MockOverlayWidget_Expecter) SetMeasureOverlay(overlay interface{}, mea
12411127
12421128 func (_c *MockOverlayWidget_SetMeasureOverlay_Call) Run(run func(overlay layout.Widget, measure bool)) *MockOverlayWidget_SetMeasureOverlay_Call {
12431129 _c.Call.Run(func(args mock.Arguments) {
1244- var arg0 layout.Widget
1245- if args[0] != nil {
1246- arg0 = args[0].(layout.Widget)
1247- }
1248- var arg1 bool
1249- if args[1] != nil {
1250- arg1 = args[1].(bool)
1251- }
1252- run(
1253- arg0,
1254- arg1,
1255- )
1130+ run(args[0].(layout.Widget), args[1].(bool))
12561131 })
12571132 return _c
12581133 }
@@ -1262,15 +1137,14 @@ func (_c *MockOverlayWidget_SetMeasureOverlay_Call) Return() *MockOverlayWidget_
12621137 return _c
12631138 }
12641139
1265-func (_c *MockOverlayWidget_SetMeasureOverlay_Call) RunAndReturn(run func(overlay layout.Widget, measure bool)) *MockOverlayWidget_SetMeasureOverlay_Call {
1140+func (_c *MockOverlayWidget_SetMeasureOverlay_Call) RunAndReturn(run func(layout.Widget, bool)) *MockOverlayWidget_SetMeasureOverlay_Call {
12661141 _c.Run(run)
12671142 return _c
12681143 }
12691144
1270-// SetSizeRequest provides a mock function for the type MockOverlayWidget
1271-func (_mock *MockOverlayWidget) SetSizeRequest(width int, height int) {
1272- _mock.Called(width, height)
1273- return
1145+// SetSizeRequest provides a mock function with given fields: width, height
1146+func (_m *MockOverlayWidget) SetSizeRequest(width int, height int) {
1147+ _m.Called(width, height)
12741148 }
12751149
12761150 // MockOverlayWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest'
@@ -1287,18 +1161,7 @@ func (_e *MockOverlayWidget_Expecter) SetSizeRequest(width interface{}, height i
12871161
12881162 func (_c *MockOverlayWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockOverlayWidget_SetSizeRequest_Call {
12891163 _c.Call.Run(func(args mock.Arguments) {
1290- var arg0 int
1291- if args[0] != nil {
1292- arg0 = args[0].(int)
1293- }
1294- var arg1 int
1295- if args[1] != nil {
1296- arg1 = args[1].(int)
1297- }
1298- run(
1299- arg0,
1300- arg1,
1301- )
1164+ run(args[0].(int), args[1].(int))
13021165 })
13031166 return _c
13041167 }
@@ -1308,15 +1171,14 @@ func (_c *MockOverlayWidget_SetSizeRequest_Call) Return() *MockOverlayWidget_Set
13081171 return _c
13091172 }
13101173
1311-func (_c *MockOverlayWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockOverlayWidget_SetSizeRequest_Call {
1174+func (_c *MockOverlayWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockOverlayWidget_SetSizeRequest_Call {
13121175 _c.Run(run)
13131176 return _c
13141177 }
13151178
1316-// SetValign provides a mock function for the type MockOverlayWidget
1317-func (_mock *MockOverlayWidget) SetValign(align gtk.Align) {
1318- _mock.Called(align)
1319- return
1179+// SetValign provides a mock function with given fields: align
1180+func (_m *MockOverlayWidget) SetValign(align gtk.Align) {
1181+ _m.Called(align)
13201182 }
13211183
13221184 // MockOverlayWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign'
@@ -1332,13 +1194,7 @@ func (_e *MockOverlayWidget_Expecter) SetValign(align interface{}) *MockOverlayW
13321194
13331195 func (_c *MockOverlayWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockOverlayWidget_SetValign_Call {
13341196 _c.Call.Run(func(args mock.Arguments) {
1335- var arg0 gtk.Align
1336- if args[0] != nil {
1337- arg0 = args[0].(gtk.Align)
1338- }
1339- run(
1340- arg0,
1341- )
1197+ run(args[0].(gtk.Align))
13421198 })
13431199 return _c
13441200 }
@@ -1348,15 +1204,14 @@ func (_c *MockOverlayWidget_SetValign_Call) Return() *MockOverlayWidget_SetValig
13481204 return _c
13491205 }
13501206
1351-func (_c *MockOverlayWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockOverlayWidget_SetValign_Call {
1207+func (_c *MockOverlayWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockOverlayWidget_SetValign_Call {
13521208 _c.Run(run)
13531209 return _c
13541210 }
13551211
1356-// SetVexpand provides a mock function for the type MockOverlayWidget
1357-func (_mock *MockOverlayWidget) SetVexpand(expand bool) {
1358- _mock.Called(expand)
1359- return
1212+// SetVexpand provides a mock function with given fields: expand
1213+func (_m *MockOverlayWidget) SetVexpand(expand bool) {
1214+ _m.Called(expand)
13601215 }
13611216
13621217 // MockOverlayWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand'
@@ -1372,13 +1227,7 @@ func (_e *MockOverlayWidget_Expecter) SetVexpand(expand interface{}) *MockOverla
13721227
13731228 func (_c *MockOverlayWidget_SetVexpand_Call) Run(run func(expand bool)) *MockOverlayWidget_SetVexpand_Call {
13741229 _c.Call.Run(func(args mock.Arguments) {
1375- var arg0 bool
1376- if args[0] != nil {
1377- arg0 = args[0].(bool)
1378- }
1379- run(
1380- arg0,
1381- )
1230+ run(args[0].(bool))
13821231 })
13831232 return _c
13841233 }
@@ -1388,15 +1237,14 @@ func (_c *MockOverlayWidget_SetVexpand_Call) Return() *MockOverlayWidget_SetVexp
13881237 return _c
13891238 }
13901239
1391-func (_c *MockOverlayWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockOverlayWidget_SetVexpand_Call {
1240+func (_c *MockOverlayWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetVexpand_Call {
13921241 _c.Run(run)
13931242 return _c
13941243 }
13951244
1396-// SetVisible provides a mock function for the type MockOverlayWidget
1397-func (_mock *MockOverlayWidget) SetVisible(visible bool) {
1398- _mock.Called(visible)
1399- return
1245+// SetVisible provides a mock function with given fields: visible
1246+func (_m *MockOverlayWidget) SetVisible(visible bool) {
1247+ _m.Called(visible)
14001248 }
14011249
14021250 // MockOverlayWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible'
@@ -1412,13 +1260,7 @@ func (_e *MockOverlayWidget_Expecter) SetVisible(visible interface{}) *MockOverl
14121260
14131261 func (_c *MockOverlayWidget_SetVisible_Call) Run(run func(visible bool)) *MockOverlayWidget_SetVisible_Call {
14141262 _c.Call.Run(func(args mock.Arguments) {
1415- var arg0 bool
1416- if args[0] != nil {
1417- arg0 = args[0].(bool)
1418- }
1419- run(
1420- arg0,
1421- )
1263+ run(args[0].(bool))
14221264 })
14231265 return _c
14241266 }
@@ -1428,15 +1270,14 @@ func (_c *MockOverlayWidget_SetVisible_Call) Return() *MockOverlayWidget_SetVisi
14281270 return _c
14291271 }
14301272
1431-func (_c *MockOverlayWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockOverlayWidget_SetVisible_Call {
1273+func (_c *MockOverlayWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetVisible_Call {
14321274 _c.Run(run)
14331275 return _c
14341276 }
14351277
1436-// Show provides a mock function for the type MockOverlayWidget
1437-func (_mock *MockOverlayWidget) Show() {
1438- _mock.Called()
1439- return
1278+// Show provides a mock function with no fields
1279+func (_m *MockOverlayWidget) Show() {
1280+ _m.Called()
14401281 }
14411282
14421283 // MockOverlayWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
@@ -1466,10 +1307,9 @@ func (_c *MockOverlayWidget_Show_Call) RunAndReturn(run func()) *MockOverlayWidg
14661307 return _c
14671308 }
14681309
1469-// Unparent provides a mock function for the type MockOverlayWidget
1470-func (_mock *MockOverlayWidget) Unparent() {
1471- _mock.Called()
1472- return
1310+// Unparent provides a mock function with no fields
1311+func (_m *MockOverlayWidget) Unparent() {
1312+ _m.Called()
14731313 }
14741314
14751315 // MockOverlayWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent'
@@ -1498,3 +1338,17 @@ func (_c *MockOverlayWidget_Unparent_Call) RunAndReturn(run func()) *MockOverlay
14981338 _c.Run(run)
14991339 return _c
15001340 }
1341+
1342+// NewMockOverlayWidget creates a new instance of MockOverlayWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1343+// The first argument is typically a *testing.T value.
1344+func NewMockOverlayWidget(t interface {
1345+ mock.TestingT
1346+ Cleanup(func())
1347+}) *MockOverlayWidget {
1348+ mock := &MockOverlayWidget{}
1349+ mock.Mock.Test(t)
1350+
1351+ t.Cleanup(func() { mock.AssertExpectations(t) })
1352+
1353+ return mock
1354+}
M internal/ui/layout/mocks/mock_pane_renderer.go +26 -38
@@ -1,28 +1,12 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
97 mock "github.com/stretchr/testify/mock"
108 )
119
12-// NewMockPaneRenderer creates a new instance of MockPaneRenderer. 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 NewMockPaneRenderer(t interface {
15- mock.TestingT
16- Cleanup(func())
17-}) *MockPaneRenderer {
18- mock := &MockPaneRenderer{}
19- mock.Mock.Test(t)
20-
21- t.Cleanup(func() { mock.AssertExpectations(t) })
22-
23- return mock
24-}
25-
2610 // MockPaneRenderer is an autogenerated mock type for the PaneRenderer type
2711 type MockPaneRenderer struct {
2812 mock.Mock
@@ -36,22 +20,23 @@ func (_m *MockPaneRenderer) EXPECT() *MockPaneRenderer_Expecter {
3620 return &MockPaneRenderer_Expecter{mock: &_m.Mock}
3721 }
3822
39-// RenderPane provides a mock function for the type MockPaneRenderer
40-func (_mock *MockPaneRenderer) RenderPane(paneID string, webViewWidget layout.Widget) layout.Widget {
41- ret := _mock.Called(paneID, webViewWidget)
23+// RenderPane provides a mock function with given fields: paneID, webViewWidget
24+func (_m *MockPaneRenderer) RenderPane(paneID string, webViewWidget layout.Widget) layout.Widget {
25+ ret := _m.Called(paneID, webViewWidget)
4226
4327 if len(ret) == 0 {
4428 panic("no return value specified for RenderPane")
4529 }
4630
4731 var r0 layout.Widget
48- if returnFunc, ok := ret.Get(0).(func(string, layout.Widget) layout.Widget); ok {
49- r0 = returnFunc(paneID, webViewWidget)
32+ if rf, ok := ret.Get(0).(func(string, layout.Widget) layout.Widget); ok {
33+ r0 = rf(paneID, webViewWidget)
5034 } else {
5135 if ret.Get(0) != nil {
5236 r0 = ret.Get(0).(layout.Widget)
5337 }
5438 }
39+
5540 return r0
5641 }
5742
@@ -69,28 +54,31 @@ func (_e *MockPaneRenderer_Expecter) RenderPane(paneID interface{}, webViewWidge
6954
7055 func (_c *MockPaneRenderer_RenderPane_Call) Run(run func(paneID string, webViewWidget layout.Widget)) *MockPaneRenderer_RenderPane_Call {
7156 _c.Call.Run(func(args mock.Arguments) {
72- var arg0 string
73- if args[0] != nil {
74- arg0 = args[0].(string)
75- }
76- var arg1 layout.Widget
77- if args[1] != nil {
78- arg1 = args[1].(layout.Widget)
79- }
80- run(
81- arg0,
82- arg1,
83- )
57+ run(args[0].(string), args[1].(layout.Widget))
8458 })
8559 return _c
8660 }
8761
88-func (_c *MockPaneRenderer_RenderPane_Call) Return(widget layout.Widget) *MockPaneRenderer_RenderPane_Call {
89- _c.Call.Return(widget)
62+func (_c *MockPaneRenderer_RenderPane_Call) Return(_a0 layout.Widget) *MockPaneRenderer_RenderPane_Call {
63+ _c.Call.Return(_a0)
9064 return _c
9165 }
9266
93-func (_c *MockPaneRenderer_RenderPane_Call) RunAndReturn(run func(paneID string, webViewWidget layout.Widget) layout.Widget) *MockPaneRenderer_RenderPane_Call {
67+func (_c *MockPaneRenderer_RenderPane_Call) RunAndReturn(run func(string, layout.Widget) layout.Widget) *MockPaneRenderer_RenderPane_Call {
9468 _c.Call.Return(run)
9569 return _c
9670 }
71+
72+// NewMockPaneRenderer creates a new instance of MockPaneRenderer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
73+// The first argument is typically a *testing.T value.
74+func NewMockPaneRenderer(t interface {
75+ mock.TestingT
76+ Cleanup(func())
77+}) *MockPaneRenderer {
78+ mock := &MockPaneRenderer{}
79+ mock.Mock.Test(t)
80+
81+ t.Cleanup(func() { mock.AssertExpectations(t) })
82+
83+ return mock
84+}
M internal/ui/layout/mocks/mock_pane_view_factory.go +28 -34
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/domain/entity"
9- "github.com/bnema/dumber/internal/ui/layout"
6+ entity "github.com/bnema/dumber/internal/domain/entity"
7+ layout "github.com/bnema/dumber/internal/ui/layout"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
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-
2712 // MockPaneViewFactory is an autogenerated mock type for the PaneViewFactory type
2813 type MockPaneViewFactory struct {
2914 mock.Mock
@@ -37,22 +22,23 @@ func (_m *MockPaneViewFactory) EXPECT() *MockPaneViewFactory_Expecter {
3722 return &MockPaneViewFactory_Expecter{mock: &_m.Mock}
3823 }
3924
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)
25+// CreatePaneView provides a mock function with given fields: node
26+func (_m *MockPaneViewFactory) CreatePaneView(node *entity.PaneNode) layout.Widget {
27+ ret := _m.Called(node)
4328
4429 if len(ret) == 0 {
4530 panic("no return value specified for CreatePaneView")
4631 }
4732
4833 var r0 layout.Widget
49- if returnFunc, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok {
50- r0 = returnFunc(node)
34+ if rf, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok {
35+ r0 = rf(node)
5136 } else {
5237 if ret.Get(0) != nil {
5338 r0 = ret.Get(0).(layout.Widget)
5439 }
5540 }
41+
5642 return r0
5743 }
5844
@@ -69,23 +55,31 @@ func (_e *MockPaneViewFactory_Expecter) CreatePaneView(node interface{}) *MockPa
6955
7056 func (_c *MockPaneViewFactory_CreatePaneView_Call) Run(run func(node *entity.PaneNode)) *MockPaneViewFactory_CreatePaneView_Call {
7157 _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- )
58+ run(args[0].(*entity.PaneNode))
7959 })
8060 return _c
8161 }
8262
83-func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(widget layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
84- _c.Call.Return(widget)
63+func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(_a0 layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
64+ _c.Call.Return(_a0)
8565 return _c
8666 }
8767
88-func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(node *entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
68+func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(*entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call {
8969 _c.Call.Return(run)
9070 return _c
9171 }
72+
73+// 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.
74+// The first argument is typically a *testing.T value.
75+func NewMockPaneViewFactory(t interface {
76+ mock.TestingT
77+ Cleanup(func())
78+}) *MockPaneViewFactory {
79+ mock := &MockPaneViewFactory{}
80+ mock.Mock.Test(t)
81+
82+ t.Cleanup(func() { mock.AssertExpectations(t) })
83+
84+ return mock
85+}
M internal/ui/layout/mocks/mock_paned_widget.go +309 -459
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// NewMockPanedWidget creates a new instance of MockPanedWidget. 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 NewMockPanedWidget(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockPanedWidget {
19- mock := &MockPanedWidget{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockPanedWidget is an autogenerated mock type for the PanedWidget type
2813 type MockPanedWidget struct {
2914 mock.Mock
@@ -37,10 +22,9 @@ func (_m *MockPanedWidget) EXPECT() *MockPanedWidget_Expecter {
3722 return &MockPanedWidget_Expecter{mock: &_m.Mock}
3823 }
3924
40-// AddController provides a mock function for the type MockPanedWidget
41-func (_mock *MockPanedWidget) AddController(controller *gtk.EventController) {
42- _mock.Called(controller)
43- return
25+// AddController provides a mock function with given fields: controller
26+func (_m *MockPanedWidget) AddController(controller *gtk.EventController) {
27+ _m.Called(controller)
4428 }
4529
4630 // MockPanedWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController'
@@ -56,13 +40,7 @@ func (_e *MockPanedWidget_Expecter) AddController(controller interface{}) *MockP
5640
5741 func (_c *MockPanedWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockPanedWidget_AddController_Call {
5842 _c.Call.Run(func(args mock.Arguments) {
59- var arg0 *gtk.EventController
60- if args[0] != nil {
61- arg0 = args[0].(*gtk.EventController)
62- }
63- run(
64- arg0,
65- )
43+ run(args[0].(*gtk.EventController))
6644 })
6745 return _c
6846 }
@@ -72,15 +50,14 @@ func (_c *MockPanedWidget_AddController_Call) Return() *MockPanedWidget_AddContr
7250 return _c
7351 }
7452
75-func (_c *MockPanedWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockPanedWidget_AddController_Call {
53+func (_c *MockPanedWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockPanedWidget_AddController_Call {
7654 _c.Run(run)
7755 return _c
7856 }
7957
80-// AddCssClass provides a mock function for the type MockPanedWidget
81-func (_mock *MockPanedWidget) AddCssClass(cssClass string) {
82- _mock.Called(cssClass)
83- return
58+// AddCssClass provides a mock function with given fields: cssClass
59+func (_m *MockPanedWidget) AddCssClass(cssClass string) {
60+ _m.Called(cssClass)
8461 }
8562
8663 // MockPanedWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass'
@@ -96,13 +73,7 @@ func (_e *MockPanedWidget_Expecter) AddCssClass(cssClass interface{}) *MockPaned
9673
9774 func (_c *MockPanedWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockPanedWidget_AddCssClass_Call {
9875 _c.Call.Run(func(args mock.Arguments) {
99- var arg0 string
100- if args[0] != nil {
101- arg0 = args[0].(string)
102- }
103- run(
104- arg0,
105- )
76+ run(args[0].(string))
10677 })
10778 return _c
10879 }
@@ -112,25 +83,26 @@ func (_c *MockPanedWidget_AddCssClass_Call) Return() *MockPanedWidget_AddCssClas
11283 return _c
11384 }
11485
115-func (_c *MockPanedWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockPanedWidget_AddCssClass_Call {
86+func (_c *MockPanedWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockPanedWidget_AddCssClass_Call {
11687 _c.Run(run)
11788 return _c
11889 }
11990
120-// AddTickCallback provides a mock function for the type MockPanedWidget
121-func (_mock *MockPanedWidget) AddTickCallback(callback func() bool) uint {
122- ret := _mock.Called(callback)
91+// AddTickCallback provides a mock function with given fields: callback
92+func (_m *MockPanedWidget) AddTickCallback(callback func() bool) uint {
93+ ret := _m.Called(callback)
12394
12495 if len(ret) == 0 {
12596 panic("no return value specified for AddTickCallback")
12697 }
12798
12899 var r0 uint
129- if returnFunc, ok := ret.Get(0).(func(func() bool) uint); ok {
130- r0 = returnFunc(callback)
100+ if rf, ok := ret.Get(0).(func(func() bool) uint); ok {
101+ r0 = rf(callback)
131102 } else {
132103 r0 = ret.Get(0).(uint)
133104 }
105+
134106 return r0
135107 }
136108
@@ -147,30 +119,24 @@ func (_e *MockPanedWidget_Expecter) AddTickCallback(callback interface{}) *MockP
147119
148120 func (_c *MockPanedWidget_AddTickCallback_Call) Run(run func(callback func() bool)) *MockPanedWidget_AddTickCallback_Call {
149121 _c.Call.Run(func(args mock.Arguments) {
150- var arg0 func() bool
151- if args[0] != nil {
152- arg0 = args[0].(func() bool)
153- }
154- run(
155- arg0,
156- )
122+ run(args[0].(func() bool))
157123 })
158124 return _c
159125 }
160126
161-func (_c *MockPanedWidget_AddTickCallback_Call) Return(v uint) *MockPanedWidget_AddTickCallback_Call {
162- _c.Call.Return(v)
127+func (_c *MockPanedWidget_AddTickCallback_Call) Return(_a0 uint) *MockPanedWidget_AddTickCallback_Call {
128+ _c.Call.Return(_a0)
163129 return _c
164130 }
165131
166-func (_c *MockPanedWidget_AddTickCallback_Call) RunAndReturn(run func(callback func() bool) uint) *MockPanedWidget_AddTickCallback_Call {
132+func (_c *MockPanedWidget_AddTickCallback_Call) RunAndReturn(run func(func() bool) uint) *MockPanedWidget_AddTickCallback_Call {
167133 _c.Call.Return(run)
168134 return _c
169135 }
170136
171-// ComputePoint provides a mock function for the type MockPanedWidget
172-func (_mock *MockPanedWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
173- ret := _mock.Called(target)
137+// ComputePoint provides a mock function with given fields: target
138+func (_m *MockPanedWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
139+ ret := _m.Called(target)
174140
175141 if len(ret) == 0 {
176142 panic("no return value specified for ComputePoint")
@@ -179,24 +145,27 @@ func (_mock *MockPanedWidget) ComputePoint(target layout.Widget) (float64, float
179145 var r0 float64
180146 var r1 float64
181147 var r2 bool
182- if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
183- return returnFunc(target)
148+ if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
149+ return rf(target)
184150 }
185- if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok {
186- r0 = returnFunc(target)
151+ if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok {
152+ r0 = rf(target)
187153 } else {
188154 r0 = ret.Get(0).(float64)
189155 }
190- if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok {
191- r1 = returnFunc(target)
156+
157+ if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok {
158+ r1 = rf(target)
192159 } else {
193160 r1 = ret.Get(1).(float64)
194161 }
195- if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok {
196- r2 = returnFunc(target)
162+
163+ if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok {
164+ r2 = rf(target)
197165 } else {
198166 r2 = ret.Get(2).(bool)
199167 }
168+
200169 return r0, r1, r2
201170 }
202171
@@ -213,13 +182,7 @@ func (_e *MockPanedWidget_Expecter) ComputePoint(target interface{}) *MockPanedW
213182
214183 func (_c *MockPanedWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockPanedWidget_ComputePoint_Call {
215184 _c.Call.Run(func(args mock.Arguments) {
216- var arg0 layout.Widget
217- if args[0] != nil {
218- arg0 = args[0].(layout.Widget)
219- }
220- run(
221- arg0,
222- )
185+ run(args[0].(layout.Widget))
223186 })
224187 return _c
225188 }
@@ -229,25 +192,26 @@ func (_c *MockPanedWidget_ComputePoint_Call) Return(x float64, y float64, ok boo
229192 return _c
230193 }
231194
232-func (_c *MockPanedWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockPanedWidget_ComputePoint_Call {
195+func (_c *MockPanedWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockPanedWidget_ComputePoint_Call {
233196 _c.Call.Return(run)
234197 return _c
235198 }
236199
237-// ConnectMap provides a mock function for the type MockPanedWidget
238-func (_mock *MockPanedWidget) ConnectMap(callback func()) uint32 {
239- ret := _mock.Called(callback)
200+// ConnectMap provides a mock function with given fields: callback
201+func (_m *MockPanedWidget) ConnectMap(callback func()) uint32 {
202+ ret := _m.Called(callback)
240203
241204 if len(ret) == 0 {
242205 panic("no return value specified for ConnectMap")
243206 }
244207
245208 var r0 uint32
246- if returnFunc, ok := ret.Get(0).(func(func()) uint32); ok {
247- r0 = returnFunc(callback)
209+ if rf, ok := ret.Get(0).(func(func()) uint32); ok {
210+ r0 = rf(callback)
248211 } else {
249212 r0 = ret.Get(0).(uint32)
250213 }
214+
251215 return r0
252216 }
253217
@@ -264,41 +228,36 @@ func (_e *MockPanedWidget_Expecter) ConnectMap(callback interface{}) *MockPanedW
264228
265229 func (_c *MockPanedWidget_ConnectMap_Call) Run(run func(callback func())) *MockPanedWidget_ConnectMap_Call {
266230 _c.Call.Run(func(args mock.Arguments) {
267- var arg0 func()
268- if args[0] != nil {
269- arg0 = args[0].(func())
270- }
271- run(
272- arg0,
273- )
231+ run(args[0].(func()))
274232 })
275233 return _c
276234 }
277235
278-func (_c *MockPanedWidget_ConnectMap_Call) Return(v uint32) *MockPanedWidget_ConnectMap_Call {
279- _c.Call.Return(v)
236+func (_c *MockPanedWidget_ConnectMap_Call) Return(_a0 uint32) *MockPanedWidget_ConnectMap_Call {
237+ _c.Call.Return(_a0)
280238 return _c
281239 }
282240
283-func (_c *MockPanedWidget_ConnectMap_Call) RunAndReturn(run func(callback func()) uint32) *MockPanedWidget_ConnectMap_Call {
241+func (_c *MockPanedWidget_ConnectMap_Call) RunAndReturn(run func(func()) uint32) *MockPanedWidget_ConnectMap_Call {
284242 _c.Call.Return(run)
285243 return _c
286244 }
287245
288-// GetAllocatedHeight provides a mock function for the type MockPanedWidget
289-func (_mock *MockPanedWidget) GetAllocatedHeight() int {
290- ret := _mock.Called()
246+// GetAllocatedHeight provides a mock function with no fields
247+func (_m *MockPanedWidget) GetAllocatedHeight() int {
248+ ret := _m.Called()
291249
292250 if len(ret) == 0 {
293251 panic("no return value specified for GetAllocatedHeight")
294252 }
295253
296254 var r0 int
297- if returnFunc, ok := ret.Get(0).(func() int); ok {
298- r0 = returnFunc()
255+ if rf, ok := ret.Get(0).(func() int); ok {
256+ r0 = rf()
299257 } else {
300258 r0 = ret.Get(0).(int)
301259 }
260+
302261 return r0
303262 }
304263
@@ -319,8 +278,8 @@ func (_c *MockPanedWidget_GetAllocatedHeight_Call) Run(run func()) *MockPanedWid
319278 return _c
320279 }
321280
322-func (_c *MockPanedWidget_GetAllocatedHeight_Call) Return(n int) *MockPanedWidget_GetAllocatedHeight_Call {
323- _c.Call.Return(n)
281+func (_c *MockPanedWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockPanedWidget_GetAllocatedHeight_Call {
282+ _c.Call.Return(_a0)
324283 return _c
325284 }
326285
@@ -329,20 +288,21 @@ func (_c *MockPanedWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int)
329288 return _c
330289 }
331290
332-// GetAllocatedWidth provides a mock function for the type MockPanedWidget
333-func (_mock *MockPanedWidget) GetAllocatedWidth() int {
334- ret := _mock.Called()
291+// GetAllocatedWidth provides a mock function with no fields
292+func (_m *MockPanedWidget) GetAllocatedWidth() int {
293+ ret := _m.Called()
335294
336295 if len(ret) == 0 {
337296 panic("no return value specified for GetAllocatedWidth")
338297 }
339298
340299 var r0 int
341- if returnFunc, ok := ret.Get(0).(func() int); ok {
342- r0 = returnFunc()
300+ if rf, ok := ret.Get(0).(func() int); ok {
301+ r0 = rf()
343302 } else {
344303 r0 = ret.Get(0).(int)
345304 }
305+
346306 return r0
347307 }
348308
@@ -363,8 +323,8 @@ func (_c *MockPanedWidget_GetAllocatedWidth_Call) Run(run func()) *MockPanedWidg
363323 return _c
364324 }
365325
366-func (_c *MockPanedWidget_GetAllocatedWidth_Call) Return(n int) *MockPanedWidget_GetAllocatedWidth_Call {
367- _c.Call.Return(n)
326+func (_c *MockPanedWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockPanedWidget_GetAllocatedWidth_Call {
327+ _c.Call.Return(_a0)
368328 return _c
369329 }
370330
@@ -373,22 +333,23 @@ func (_c *MockPanedWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) *
373333 return _c
374334 }
375335
376-// GetEndChild provides a mock function for the type MockPanedWidget
377-func (_mock *MockPanedWidget) GetEndChild() layout.Widget {
378- ret := _mock.Called()
336+// GetEndChild provides a mock function with no fields
337+func (_m *MockPanedWidget) GetEndChild() layout.Widget {
338+ ret := _m.Called()
379339
380340 if len(ret) == 0 {
381341 panic("no return value specified for GetEndChild")
382342 }
383343
384344 var r0 layout.Widget
385- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
386- r0 = returnFunc()
345+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
346+ r0 = rf()
387347 } else {
388348 if ret.Get(0) != nil {
389349 r0 = ret.Get(0).(layout.Widget)
390350 }
391351 }
352+
392353 return r0
393354 }
394355
@@ -409,8 +370,8 @@ func (_c *MockPanedWidget_GetEndChild_Call) Run(run func()) *MockPanedWidget_Get
409370 return _c
410371 }
411372
412-func (_c *MockPanedWidget_GetEndChild_Call) Return(widget layout.Widget) *MockPanedWidget_GetEndChild_Call {
413- _c.Call.Return(widget)
373+func (_c *MockPanedWidget_GetEndChild_Call) Return(_a0 layout.Widget) *MockPanedWidget_GetEndChild_Call {
374+ _c.Call.Return(_a0)
414375 return _c
415376 }
416377
@@ -419,20 +380,21 @@ func (_c *MockPanedWidget_GetEndChild_Call) RunAndReturn(run func() layout.Widge
419380 return _c
420381 }
421382
422-// GetHexpand provides a mock function for the type MockPanedWidget
423-func (_mock *MockPanedWidget) GetHexpand() bool {
424- ret := _mock.Called()
383+// GetHexpand provides a mock function with no fields
384+func (_m *MockPanedWidget) GetHexpand() bool {
385+ ret := _m.Called()
425386
426387 if len(ret) == 0 {
427388 panic("no return value specified for GetHexpand")
428389 }
429390
430391 var r0 bool
431- if returnFunc, ok := ret.Get(0).(func() bool); ok {
432- r0 = returnFunc()
392+ if rf, ok := ret.Get(0).(func() bool); ok {
393+ r0 = rf()
433394 } else {
434395 r0 = ret.Get(0).(bool)
435396 }
397+
436398 return r0
437399 }
438400
@@ -453,8 +415,8 @@ func (_c *MockPanedWidget_GetHexpand_Call) Run(run func()) *MockPanedWidget_GetH
453415 return _c
454416 }
455417
456-func (_c *MockPanedWidget_GetHexpand_Call) Return(b bool) *MockPanedWidget_GetHexpand_Call {
457- _c.Call.Return(b)
418+func (_c *MockPanedWidget_GetHexpand_Call) Return(_a0 bool) *MockPanedWidget_GetHexpand_Call {
419+ _c.Call.Return(_a0)
458420 return _c
459421 }
460422
@@ -463,22 +425,23 @@ func (_c *MockPanedWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockPa
463425 return _c
464426 }
465427
466-// GetParent provides a mock function for the type MockPanedWidget
467-func (_mock *MockPanedWidget) GetParent() layout.Widget {
468- ret := _mock.Called()
428+// GetParent provides a mock function with no fields
429+func (_m *MockPanedWidget) GetParent() layout.Widget {
430+ ret := _m.Called()
469431
470432 if len(ret) == 0 {
471433 panic("no return value specified for GetParent")
472434 }
473435
474436 var r0 layout.Widget
475- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
476- r0 = returnFunc()
437+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
438+ r0 = rf()
477439 } else {
478440 if ret.Get(0) != nil {
479441 r0 = ret.Get(0).(layout.Widget)
480442 }
481443 }
444+
482445 return r0
483446 }
484447
@@ -499,8 +462,8 @@ func (_c *MockPanedWidget_GetParent_Call) Run(run func()) *MockPanedWidget_GetPa
499462 return _c
500463 }
501464
502-func (_c *MockPanedWidget_GetParent_Call) Return(widget layout.Widget) *MockPanedWidget_GetParent_Call {
503- _c.Call.Return(widget)
465+func (_c *MockPanedWidget_GetParent_Call) Return(_a0 layout.Widget) *MockPanedWidget_GetParent_Call {
466+ _c.Call.Return(_a0)
504467 return _c
505468 }
506469
@@ -509,20 +472,21 @@ func (_c *MockPanedWidget_GetParent_Call) RunAndReturn(run func() layout.Widget)
509472 return _c
510473 }
511474
512-// GetPosition provides a mock function for the type MockPanedWidget
513-func (_mock *MockPanedWidget) GetPosition() int {
514- ret := _mock.Called()
475+// GetPosition provides a mock function with no fields
476+func (_m *MockPanedWidget) GetPosition() int {
477+ ret := _m.Called()
515478
516479 if len(ret) == 0 {
517480 panic("no return value specified for GetPosition")
518481 }
519482
520483 var r0 int
521- if returnFunc, ok := ret.Get(0).(func() int); ok {
522- r0 = returnFunc()
484+ if rf, ok := ret.Get(0).(func() int); ok {
485+ r0 = rf()
523486 } else {
524487 r0 = ret.Get(0).(int)
525488 }
489+
526490 return r0
527491 }
528492
@@ -543,8 +507,8 @@ func (_c *MockPanedWidget_GetPosition_Call) Run(run func()) *MockPanedWidget_Get
543507 return _c
544508 }
545509
546-func (_c *MockPanedWidget_GetPosition_Call) Return(n int) *MockPanedWidget_GetPosition_Call {
547- _c.Call.Return(n)
510+func (_c *MockPanedWidget_GetPosition_Call) Return(_a0 int) *MockPanedWidget_GetPosition_Call {
511+ _c.Call.Return(_a0)
548512 return _c
549513 }
550514
@@ -553,20 +517,21 @@ func (_c *MockPanedWidget_GetPosition_Call) RunAndReturn(run func() int) *MockPa
553517 return _c
554518 }
555519
556-// GetResizeEndChild provides a mock function for the type MockPanedWidget
557-func (_mock *MockPanedWidget) GetResizeEndChild() bool {
558- ret := _mock.Called()
520+// GetResizeEndChild provides a mock function with no fields
521+func (_m *MockPanedWidget) GetResizeEndChild() bool {
522+ ret := _m.Called()
559523
560524 if len(ret) == 0 {
561525 panic("no return value specified for GetResizeEndChild")
562526 }
563527
564528 var r0 bool
565- if returnFunc, ok := ret.Get(0).(func() bool); ok {
566- r0 = returnFunc()
529+ if rf, ok := ret.Get(0).(func() bool); ok {
530+ r0 = rf()
567531 } else {
568532 r0 = ret.Get(0).(bool)
569533 }
534+
570535 return r0
571536 }
572537
@@ -587,8 +552,8 @@ func (_c *MockPanedWidget_GetResizeEndChild_Call) Run(run func()) *MockPanedWidg
587552 return _c
588553 }
589554
590-func (_c *MockPanedWidget_GetResizeEndChild_Call) Return(b bool) *MockPanedWidget_GetResizeEndChild_Call {
591- _c.Call.Return(b)
555+func (_c *MockPanedWidget_GetResizeEndChild_Call) Return(_a0 bool) *MockPanedWidget_GetResizeEndChild_Call {
556+ _c.Call.Return(_a0)
592557 return _c
593558 }
594559
@@ -597,20 +562,21 @@ func (_c *MockPanedWidget_GetResizeEndChild_Call) RunAndReturn(run func() bool)
597562 return _c
598563 }
599564
600-// GetResizeStartChild provides a mock function for the type MockPanedWidget
601-func (_mock *MockPanedWidget) GetResizeStartChild() bool {
602- ret := _mock.Called()
565+// GetResizeStartChild provides a mock function with no fields
566+func (_m *MockPanedWidget) GetResizeStartChild() bool {
567+ ret := _m.Called()
603568
604569 if len(ret) == 0 {
605570 panic("no return value specified for GetResizeStartChild")
606571 }
607572
608573 var r0 bool
609- if returnFunc, ok := ret.Get(0).(func() bool); ok {
610- r0 = returnFunc()
574+ if rf, ok := ret.Get(0).(func() bool); ok {
575+ r0 = rf()
611576 } else {
612577 r0 = ret.Get(0).(bool)
613578 }
579+
614580 return r0
615581 }
616582
@@ -631,8 +597,8 @@ func (_c *MockPanedWidget_GetResizeStartChild_Call) Run(run func()) *MockPanedWi
631597 return _c
632598 }
633599
634-func (_c *MockPanedWidget_GetResizeStartChild_Call) Return(b bool) *MockPanedWidget_GetResizeStartChild_Call {
635- _c.Call.Return(b)
600+func (_c *MockPanedWidget_GetResizeStartChild_Call) Return(_a0 bool) *MockPanedWidget_GetResizeStartChild_Call {
601+ _c.Call.Return(_a0)
636602 return _c
637603 }
638604
@@ -641,20 +607,21 @@ func (_c *MockPanedWidget_GetResizeStartChild_Call) RunAndReturn(run func() bool
641607 return _c
642608 }
643609
644-// GetShrinkEndChild provides a mock function for the type MockPanedWidget
645-func (_mock *MockPanedWidget) GetShrinkEndChild() bool {
646- ret := _mock.Called()
610+// GetShrinkEndChild provides a mock function with no fields
611+func (_m *MockPanedWidget) GetShrinkEndChild() bool {
612+ ret := _m.Called()
647613
648614 if len(ret) == 0 {
649615 panic("no return value specified for GetShrinkEndChild")
650616 }
651617
652618 var r0 bool
653- if returnFunc, ok := ret.Get(0).(func() bool); ok {
654- r0 = returnFunc()
619+ if rf, ok := ret.Get(0).(func() bool); ok {
620+ r0 = rf()
655621 } else {
656622 r0 = ret.Get(0).(bool)
657623 }
624+
658625 return r0
659626 }
660627
@@ -675,8 +642,8 @@ func (_c *MockPanedWidget_GetShrinkEndChild_Call) Run(run func()) *MockPanedWidg
675642 return _c
676643 }
677644
678-func (_c *MockPanedWidget_GetShrinkEndChild_Call) Return(b bool) *MockPanedWidget_GetShrinkEndChild_Call {
679- _c.Call.Return(b)
645+func (_c *MockPanedWidget_GetShrinkEndChild_Call) Return(_a0 bool) *MockPanedWidget_GetShrinkEndChild_Call {
646+ _c.Call.Return(_a0)
680647 return _c
681648 }
682649
@@ -685,20 +652,21 @@ func (_c *MockPanedWidget_GetShrinkEndChild_Call) RunAndReturn(run func() bool)
685652 return _c
686653 }
687654
688-// GetShrinkStartChild provides a mock function for the type MockPanedWidget
689-func (_mock *MockPanedWidget) GetShrinkStartChild() bool {
690- ret := _mock.Called()
655+// GetShrinkStartChild provides a mock function with no fields
656+func (_m *MockPanedWidget) GetShrinkStartChild() bool {
657+ ret := _m.Called()
691658
692659 if len(ret) == 0 {
693660 panic("no return value specified for GetShrinkStartChild")
694661 }
695662
696663 var r0 bool
697- if returnFunc, ok := ret.Get(0).(func() bool); ok {
698- r0 = returnFunc()
664+ if rf, ok := ret.Get(0).(func() bool); ok {
665+ r0 = rf()
699666 } else {
700667 r0 = ret.Get(0).(bool)
701668 }
669+
702670 return r0
703671 }
704672
@@ -719,8 +687,8 @@ func (_c *MockPanedWidget_GetShrinkStartChild_Call) Run(run func()) *MockPanedWi
719687 return _c
720688 }
721689
722-func (_c *MockPanedWidget_GetShrinkStartChild_Call) Return(b bool) *MockPanedWidget_GetShrinkStartChild_Call {
723- _c.Call.Return(b)
690+func (_c *MockPanedWidget_GetShrinkStartChild_Call) Return(_a0 bool) *MockPanedWidget_GetShrinkStartChild_Call {
691+ _c.Call.Return(_a0)
724692 return _c
725693 }
726694
@@ -729,22 +697,23 @@ func (_c *MockPanedWidget_GetShrinkStartChild_Call) RunAndReturn(run func() bool
729697 return _c
730698 }
731699
732-// GetStartChild provides a mock function for the type MockPanedWidget
733-func (_mock *MockPanedWidget) GetStartChild() layout.Widget {
734- ret := _mock.Called()
700+// GetStartChild provides a mock function with no fields
701+func (_m *MockPanedWidget) GetStartChild() layout.Widget {
702+ ret := _m.Called()
735703
736704 if len(ret) == 0 {
737705 panic("no return value specified for GetStartChild")
738706 }
739707
740708 var r0 layout.Widget
741- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
742- r0 = returnFunc()
709+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
710+ r0 = rf()
743711 } else {
744712 if ret.Get(0) != nil {
745713 r0 = ret.Get(0).(layout.Widget)
746714 }
747715 }
716+
748717 return r0
749718 }
750719
@@ -765,8 +734,8 @@ func (_c *MockPanedWidget_GetStartChild_Call) Run(run func()) *MockPanedWidget_G
765734 return _c
766735 }
767736
768-func (_c *MockPanedWidget_GetStartChild_Call) Return(widget layout.Widget) *MockPanedWidget_GetStartChild_Call {
769- _c.Call.Return(widget)
737+func (_c *MockPanedWidget_GetStartChild_Call) Return(_a0 layout.Widget) *MockPanedWidget_GetStartChild_Call {
738+ _c.Call.Return(_a0)
770739 return _c
771740 }
772741
@@ -775,20 +744,21 @@ func (_c *MockPanedWidget_GetStartChild_Call) RunAndReturn(run func() layout.Wid
775744 return _c
776745 }
777746
778-// GetVexpand provides a mock function for the type MockPanedWidget
779-func (_mock *MockPanedWidget) GetVexpand() bool {
780- ret := _mock.Called()
747+// GetVexpand provides a mock function with no fields
748+func (_m *MockPanedWidget) GetVexpand() bool {
749+ ret := _m.Called()
781750
782751 if len(ret) == 0 {
783752 panic("no return value specified for GetVexpand")
784753 }
785754
786755 var r0 bool
787- if returnFunc, ok := ret.Get(0).(func() bool); ok {
788- r0 = returnFunc()
756+ if rf, ok := ret.Get(0).(func() bool); ok {
757+ r0 = rf()
789758 } else {
790759 r0 = ret.Get(0).(bool)
791760 }
761+
792762 return r0
793763 }
794764
@@ -809,8 +779,8 @@ func (_c *MockPanedWidget_GetVexpand_Call) Run(run func()) *MockPanedWidget_GetV
809779 return _c
810780 }
811781
812-func (_c *MockPanedWidget_GetVexpand_Call) Return(b bool) *MockPanedWidget_GetVexpand_Call {
813- _c.Call.Return(b)
782+func (_c *MockPanedWidget_GetVexpand_Call) Return(_a0 bool) *MockPanedWidget_GetVexpand_Call {
783+ _c.Call.Return(_a0)
814784 return _c
815785 }
816786
@@ -819,20 +789,21 @@ func (_c *MockPanedWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockPa
819789 return _c
820790 }
821791
822-// GetWideHandle provides a mock function for the type MockPanedWidget
823-func (_mock *MockPanedWidget) GetWideHandle() bool {
824- ret := _mock.Called()
792+// GetWideHandle provides a mock function with no fields
793+func (_m *MockPanedWidget) GetWideHandle() bool {
794+ ret := _m.Called()
825795
826796 if len(ret) == 0 {
827797 panic("no return value specified for GetWideHandle")
828798 }
829799
830800 var r0 bool
831- if returnFunc, ok := ret.Get(0).(func() bool); ok {
832- r0 = returnFunc()
801+ if rf, ok := ret.Get(0).(func() bool); ok {
802+ r0 = rf()
833803 } else {
834804 r0 = ret.Get(0).(bool)
835805 }
806+
836807 return r0
837808 }
838809
@@ -853,8 +824,8 @@ func (_c *MockPanedWidget_GetWideHandle_Call) Run(run func()) *MockPanedWidget_G
853824 return _c
854825 }
855826
856-func (_c *MockPanedWidget_GetWideHandle_Call) Return(b bool) *MockPanedWidget_GetWideHandle_Call {
857- _c.Call.Return(b)
827+func (_c *MockPanedWidget_GetWideHandle_Call) Return(_a0 bool) *MockPanedWidget_GetWideHandle_Call {
828+ _c.Call.Return(_a0)
858829 return _c
859830 }
860831
@@ -863,20 +834,21 @@ func (_c *MockPanedWidget_GetWideHandle_Call) RunAndReturn(run func() bool) *Moc
863834 return _c
864835 }
865836
866-// GrabFocus provides a mock function for the type MockPanedWidget
867-func (_mock *MockPanedWidget) GrabFocus() bool {
868- ret := _mock.Called()
837+// GrabFocus provides a mock function with no fields
838+func (_m *MockPanedWidget) GrabFocus() bool {
839+ ret := _m.Called()
869840
870841 if len(ret) == 0 {
871842 panic("no return value specified for GrabFocus")
872843 }
873844
874845 var r0 bool
875- if returnFunc, ok := ret.Get(0).(func() bool); ok {
876- r0 = returnFunc()
846+ if rf, ok := ret.Get(0).(func() bool); ok {
847+ r0 = rf()
877848 } else {
878849 r0 = ret.Get(0).(bool)
879850 }
851+
880852 return r0
881853 }
882854
@@ -897,8 +869,8 @@ func (_c *MockPanedWidget_GrabFocus_Call) Run(run func()) *MockPanedWidget_GrabF
897869 return _c
898870 }
899871
900-func (_c *MockPanedWidget_GrabFocus_Call) Return(b bool) *MockPanedWidget_GrabFocus_Call {
901- _c.Call.Return(b)
872+func (_c *MockPanedWidget_GrabFocus_Call) Return(_a0 bool) *MockPanedWidget_GrabFocus_Call {
873+ _c.Call.Return(_a0)
902874 return _c
903875 }
904876
@@ -907,22 +879,23 @@ func (_c *MockPanedWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockPan
907879 return _c
908880 }
909881
910-// GtkWidget provides a mock function for the type MockPanedWidget
911-func (_mock *MockPanedWidget) GtkWidget() *gtk.Widget {
912- ret := _mock.Called()
882+// GtkWidget provides a mock function with no fields
883+func (_m *MockPanedWidget) GtkWidget() *gtk.Widget {
884+ ret := _m.Called()
913885
914886 if len(ret) == 0 {
915887 panic("no return value specified for GtkWidget")
916888 }
917889
918890 var r0 *gtk.Widget
919- if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok {
920- r0 = returnFunc()
891+ if rf, ok := ret.Get(0).(func() *gtk.Widget); ok {
892+ r0 = rf()
921893 } else {
922894 if ret.Get(0) != nil {
923895 r0 = ret.Get(0).(*gtk.Widget)
924896 }
925897 }
898+
926899 return r0
927900 }
928901
@@ -943,8 +916,8 @@ func (_c *MockPanedWidget_GtkWidget_Call) Run(run func()) *MockPanedWidget_GtkWi
943916 return _c
944917 }
945918
946-func (_c *MockPanedWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockPanedWidget_GtkWidget_Call {
947- _c.Call.Return(widget)
919+func (_c *MockPanedWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockPanedWidget_GtkWidget_Call {
920+ _c.Call.Return(_a0)
948921 return _c
949922 }
950923
@@ -953,20 +926,21 @@ func (_c *MockPanedWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) *
953926 return _c
954927 }
955928
956-// HasCssClass provides a mock function for the type MockPanedWidget
957-func (_mock *MockPanedWidget) HasCssClass(cssClass string) bool {
958- ret := _mock.Called(cssClass)
929+// HasCssClass provides a mock function with given fields: cssClass
930+func (_m *MockPanedWidget) HasCssClass(cssClass string) bool {
931+ ret := _m.Called(cssClass)
959932
960933 if len(ret) == 0 {
961934 panic("no return value specified for HasCssClass")
962935 }
963936
964937 var r0 bool
965- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
966- r0 = returnFunc(cssClass)
938+ if rf, ok := ret.Get(0).(func(string) bool); ok {
939+ r0 = rf(cssClass)
967940 } else {
968941 r0 = ret.Get(0).(bool)
969942 }
943+
970944 return r0
971945 }
972946
@@ -983,41 +957,36 @@ func (_e *MockPanedWidget_Expecter) HasCssClass(cssClass interface{}) *MockPaned
983957
984958 func (_c *MockPanedWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockPanedWidget_HasCssClass_Call {
985959 _c.Call.Run(func(args mock.Arguments) {
986- var arg0 string
987- if args[0] != nil {
988- arg0 = args[0].(string)
989- }
990- run(
991- arg0,
992- )
960+ run(args[0].(string))
993961 })
994962 return _c
995963 }
996964
997-func (_c *MockPanedWidget_HasCssClass_Call) Return(b bool) *MockPanedWidget_HasCssClass_Call {
998- _c.Call.Return(b)
965+func (_c *MockPanedWidget_HasCssClass_Call) Return(_a0 bool) *MockPanedWidget_HasCssClass_Call {
966+ _c.Call.Return(_a0)
999967 return _c
1000968 }
1001969
1002-func (_c *MockPanedWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockPanedWidget_HasCssClass_Call {
970+func (_c *MockPanedWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockPanedWidget_HasCssClass_Call {
1003971 _c.Call.Return(run)
1004972 return _c
1005973 }
1006974
1007-// HasFocus provides a mock function for the type MockPanedWidget
1008-func (_mock *MockPanedWidget) HasFocus() bool {
1009- ret := _mock.Called()
975+// HasFocus provides a mock function with no fields
976+func (_m *MockPanedWidget) HasFocus() bool {
977+ ret := _m.Called()
1010978
1011979 if len(ret) == 0 {
1012980 panic("no return value specified for HasFocus")
1013981 }
1014982
1015983 var r0 bool
1016- if returnFunc, ok := ret.Get(0).(func() bool); ok {
1017- r0 = returnFunc()
984+ if rf, ok := ret.Get(0).(func() bool); ok {
985+ r0 = rf()
1018986 } else {
1019987 r0 = ret.Get(0).(bool)
1020988 }
989+
1021990 return r0
1022991 }
1023992
@@ -1038,8 +1007,8 @@ func (_c *MockPanedWidget_HasFocus_Call) Run(run func()) *MockPanedWidget_HasFoc
10381007 return _c
10391008 }
10401009
1041-func (_c *MockPanedWidget_HasFocus_Call) Return(b bool) *MockPanedWidget_HasFocus_Call {
1042- _c.Call.Return(b)
1010+func (_c *MockPanedWidget_HasFocus_Call) Return(_a0 bool) *MockPanedWidget_HasFocus_Call {
1011+ _c.Call.Return(_a0)
10431012 return _c
10441013 }
10451014
@@ -1048,10 +1017,9 @@ func (_c *MockPanedWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockPane
10481017 return _c
10491018 }
10501019
1051-// Hide provides a mock function for the type MockPanedWidget
1052-func (_mock *MockPanedWidget) Hide() {
1053- _mock.Called()
1054- return
1020+// Hide provides a mock function with no fields
1021+func (_m *MockPanedWidget) Hide() {
1022+ _m.Called()
10551023 }
10561024
10571025 // MockPanedWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
@@ -1081,20 +1049,21 @@ func (_c *MockPanedWidget_Hide_Call) RunAndReturn(run func()) *MockPanedWidget_H
10811049 return _c
10821050 }
10831051
1084-// IsVisible provides a mock function for the type MockPanedWidget
1085-func (_mock *MockPanedWidget) IsVisible() bool {
1086- ret := _mock.Called()
1052+// IsVisible provides a mock function with no fields
1053+func (_m *MockPanedWidget) IsVisible() bool {
1054+ ret := _m.Called()
10871055
10881056 if len(ret) == 0 {
10891057 panic("no return value specified for IsVisible")
10901058 }
10911059
10921060 var r0 bool
1093- if returnFunc, ok := ret.Get(0).(func() bool); ok {
1094- r0 = returnFunc()
1061+ if rf, ok := ret.Get(0).(func() bool); ok {
1062+ r0 = rf()
10951063 } else {
10961064 r0 = ret.Get(0).(bool)
10971065 }
1066+
10981067 return r0
10991068 }
11001069
@@ -1115,8 +1084,8 @@ func (_c *MockPanedWidget_IsVisible_Call) Run(run func()) *MockPanedWidget_IsVis
11151084 return _c
11161085 }
11171086
1118-func (_c *MockPanedWidget_IsVisible_Call) Return(b bool) *MockPanedWidget_IsVisible_Call {
1119- _c.Call.Return(b)
1087+func (_c *MockPanedWidget_IsVisible_Call) Return(_a0 bool) *MockPanedWidget_IsVisible_Call {
1088+ _c.Call.Return(_a0)
11201089 return _c
11211090 }
11221091
@@ -1125,10 +1094,9 @@ func (_c *MockPanedWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockPan
11251094 return _c
11261095 }
11271096
1128-// RemoveCssClass provides a mock function for the type MockPanedWidget
1129-func (_mock *MockPanedWidget) RemoveCssClass(cssClass string) {
1130- _mock.Called(cssClass)
1131- return
1097+// RemoveCssClass provides a mock function with given fields: cssClass
1098+func (_m *MockPanedWidget) RemoveCssClass(cssClass string) {
1099+ _m.Called(cssClass)
11321100 }
11331101
11341102 // MockPanedWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass'
@@ -1144,13 +1112,7 @@ func (_e *MockPanedWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockPa
11441112
11451113 func (_c *MockPanedWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockPanedWidget_RemoveCssClass_Call {
11461114 _c.Call.Run(func(args mock.Arguments) {
1147- var arg0 string
1148- if args[0] != nil {
1149- arg0 = args[0].(string)
1150- }
1151- run(
1152- arg0,
1153- )
1115+ run(args[0].(string))
11541116 })
11551117 return _c
11561118 }
@@ -1160,15 +1122,14 @@ func (_c *MockPanedWidget_RemoveCssClass_Call) Return() *MockPanedWidget_RemoveC
11601122 return _c
11611123 }
11621124
1163-func (_c *MockPanedWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockPanedWidget_RemoveCssClass_Call {
1125+func (_c *MockPanedWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockPanedWidget_RemoveCssClass_Call {
11641126 _c.Run(run)
11651127 return _c
11661128 }
11671129
1168-// SetCanFocus provides a mock function for the type MockPanedWidget
1169-func (_mock *MockPanedWidget) SetCanFocus(canFocus bool) {
1170- _mock.Called(canFocus)
1171- return
1130+// SetCanFocus provides a mock function with given fields: canFocus
1131+func (_m *MockPanedWidget) SetCanFocus(canFocus bool) {
1132+ _m.Called(canFocus)
11721133 }
11731134
11741135 // MockPanedWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus'
@@ -1184,13 +1145,7 @@ func (_e *MockPanedWidget_Expecter) SetCanFocus(canFocus interface{}) *MockPaned
11841145
11851146 func (_c *MockPanedWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockPanedWidget_SetCanFocus_Call {
11861147 _c.Call.Run(func(args mock.Arguments) {
1187- var arg0 bool
1188- if args[0] != nil {
1189- arg0 = args[0].(bool)
1190- }
1191- run(
1192- arg0,
1193- )
1148+ run(args[0].(bool))
11941149 })
11951150 return _c
11961151 }
@@ -1200,15 +1155,14 @@ func (_c *MockPanedWidget_SetCanFocus_Call) Return() *MockPanedWidget_SetCanFocu
12001155 return _c
12011156 }
12021157
1203-func (_c *MockPanedWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockPanedWidget_SetCanFocus_Call {
1158+func (_c *MockPanedWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetCanFocus_Call {
12041159 _c.Run(run)
12051160 return _c
12061161 }
12071162
1208-// SetCanTarget provides a mock function for the type MockPanedWidget
1209-func (_mock *MockPanedWidget) SetCanTarget(canTarget bool) {
1210- _mock.Called(canTarget)
1211- return
1163+// SetCanTarget provides a mock function with given fields: canTarget
1164+func (_m *MockPanedWidget) SetCanTarget(canTarget bool) {
1165+ _m.Called(canTarget)
12121166 }
12131167
12141168 // MockPanedWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget'
@@ -1224,13 +1178,7 @@ func (_e *MockPanedWidget_Expecter) SetCanTarget(canTarget interface{}) *MockPan
12241178
12251179 func (_c *MockPanedWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockPanedWidget_SetCanTarget_Call {
12261180 _c.Call.Run(func(args mock.Arguments) {
1227- var arg0 bool
1228- if args[0] != nil {
1229- arg0 = args[0].(bool)
1230- }
1231- run(
1232- arg0,
1233- )
1181+ run(args[0].(bool))
12341182 })
12351183 return _c
12361184 }
@@ -1240,15 +1188,14 @@ func (_c *MockPanedWidget_SetCanTarget_Call) Return() *MockPanedWidget_SetCanTar
12401188 return _c
12411189 }
12421190
1243-func (_c *MockPanedWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockPanedWidget_SetCanTarget_Call {
1191+func (_c *MockPanedWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetCanTarget_Call {
12441192 _c.Run(run)
12451193 return _c
12461194 }
12471195
1248-// SetEndChild provides a mock function for the type MockPanedWidget
1249-func (_mock *MockPanedWidget) SetEndChild(child layout.Widget) {
1250- _mock.Called(child)
1251- return
1196+// SetEndChild provides a mock function with given fields: child
1197+func (_m *MockPanedWidget) SetEndChild(child layout.Widget) {
1198+ _m.Called(child)
12521199 }
12531200
12541201 // MockPanedWidget_SetEndChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEndChild'
@@ -1264,13 +1211,7 @@ func (_e *MockPanedWidget_Expecter) SetEndChild(child interface{}) *MockPanedWid
12641211
12651212 func (_c *MockPanedWidget_SetEndChild_Call) Run(run func(child layout.Widget)) *MockPanedWidget_SetEndChild_Call {
12661213 _c.Call.Run(func(args mock.Arguments) {
1267- var arg0 layout.Widget
1268- if args[0] != nil {
1269- arg0 = args[0].(layout.Widget)
1270- }
1271- run(
1272- arg0,
1273- )
1214+ run(args[0].(layout.Widget))
12741215 })
12751216 return _c
12761217 }
@@ -1280,15 +1221,14 @@ func (_c *MockPanedWidget_SetEndChild_Call) Return() *MockPanedWidget_SetEndChil
12801221 return _c
12811222 }
12821223
1283-func (_c *MockPanedWidget_SetEndChild_Call) RunAndReturn(run func(child layout.Widget)) *MockPanedWidget_SetEndChild_Call {
1224+func (_c *MockPanedWidget_SetEndChild_Call) RunAndReturn(run func(layout.Widget)) *MockPanedWidget_SetEndChild_Call {
12841225 _c.Run(run)
12851226 return _c
12861227 }
12871228
1288-// SetFocusOnClick provides a mock function for the type MockPanedWidget
1289-func (_mock *MockPanedWidget) SetFocusOnClick(focusOnClick bool) {
1290- _mock.Called(focusOnClick)
1291- return
1229+// SetFocusOnClick provides a mock function with given fields: focusOnClick
1230+func (_m *MockPanedWidget) SetFocusOnClick(focusOnClick bool) {
1231+ _m.Called(focusOnClick)
12921232 }
12931233
12941234 // MockPanedWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick'
@@ -1304,13 +1244,7 @@ func (_e *MockPanedWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *M
13041244
13051245 func (_c *MockPanedWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockPanedWidget_SetFocusOnClick_Call {
13061246 _c.Call.Run(func(args mock.Arguments) {
1307- var arg0 bool
1308- if args[0] != nil {
1309- arg0 = args[0].(bool)
1310- }
1311- run(
1312- arg0,
1313- )
1247+ run(args[0].(bool))
13141248 })
13151249 return _c
13161250 }
@@ -1320,15 +1254,14 @@ func (_c *MockPanedWidget_SetFocusOnClick_Call) Return() *MockPanedWidget_SetFoc
13201254 return _c
13211255 }
13221256
1323-func (_c *MockPanedWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockPanedWidget_SetFocusOnClick_Call {
1257+func (_c *MockPanedWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetFocusOnClick_Call {
13241258 _c.Run(run)
13251259 return _c
13261260 }
13271261
1328-// SetHalign provides a mock function for the type MockPanedWidget
1329-func (_mock *MockPanedWidget) SetHalign(align gtk.Align) {
1330- _mock.Called(align)
1331- return
1262+// SetHalign provides a mock function with given fields: align
1263+func (_m *MockPanedWidget) SetHalign(align gtk.Align) {
1264+ _m.Called(align)
13321265 }
13331266
13341267 // MockPanedWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign'
@@ -1344,13 +1277,7 @@ func (_e *MockPanedWidget_Expecter) SetHalign(align interface{}) *MockPanedWidge
13441277
13451278 func (_c *MockPanedWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockPanedWidget_SetHalign_Call {
13461279 _c.Call.Run(func(args mock.Arguments) {
1347- var arg0 gtk.Align
1348- if args[0] != nil {
1349- arg0 = args[0].(gtk.Align)
1350- }
1351- run(
1352- arg0,
1353- )
1280+ run(args[0].(gtk.Align))
13541281 })
13551282 return _c
13561283 }
@@ -1360,15 +1287,14 @@ func (_c *MockPanedWidget_SetHalign_Call) Return() *MockPanedWidget_SetHalign_Ca
13601287 return _c
13611288 }
13621289
1363-func (_c *MockPanedWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockPanedWidget_SetHalign_Call {
1290+func (_c *MockPanedWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockPanedWidget_SetHalign_Call {
13641291 _c.Run(run)
13651292 return _c
13661293 }
13671294
1368-// SetHexpand provides a mock function for the type MockPanedWidget
1369-func (_mock *MockPanedWidget) SetHexpand(expand bool) {
1370- _mock.Called(expand)
1371- return
1295+// SetHexpand provides a mock function with given fields: expand
1296+func (_m *MockPanedWidget) SetHexpand(expand bool) {
1297+ _m.Called(expand)
13721298 }
13731299
13741300 // MockPanedWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand'
@@ -1384,13 +1310,7 @@ func (_e *MockPanedWidget_Expecter) SetHexpand(expand interface{}) *MockPanedWid
13841310
13851311 func (_c *MockPanedWidget_SetHexpand_Call) Run(run func(expand bool)) *MockPanedWidget_SetHexpand_Call {
13861312 _c.Call.Run(func(args mock.Arguments) {
1387- var arg0 bool
1388- if args[0] != nil {
1389- arg0 = args[0].(bool)
1390- }
1391- run(
1392- arg0,
1393- )
1313+ run(args[0].(bool))
13941314 })
13951315 return _c
13961316 }
@@ -1400,15 +1320,14 @@ func (_c *MockPanedWidget_SetHexpand_Call) Return() *MockPanedWidget_SetHexpand_
14001320 return _c
14011321 }
14021322
1403-func (_c *MockPanedWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockPanedWidget_SetHexpand_Call {
1323+func (_c *MockPanedWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetHexpand_Call {
14041324 _c.Run(run)
14051325 return _c
14061326 }
14071327
1408-// SetPosition provides a mock function for the type MockPanedWidget
1409-func (_mock *MockPanedWidget) SetPosition(position int) {
1410- _mock.Called(position)
1411- return
1328+// SetPosition provides a mock function with given fields: position
1329+func (_m *MockPanedWidget) SetPosition(position int) {
1330+ _m.Called(position)
14121331 }
14131332
14141333 // MockPanedWidget_SetPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPosition'
@@ -1424,13 +1343,7 @@ func (_e *MockPanedWidget_Expecter) SetPosition(position interface{}) *MockPaned
14241343
14251344 func (_c *MockPanedWidget_SetPosition_Call) Run(run func(position int)) *MockPanedWidget_SetPosition_Call {
14261345 _c.Call.Run(func(args mock.Arguments) {
1427- var arg0 int
1428- if args[0] != nil {
1429- arg0 = args[0].(int)
1430- }
1431- run(
1432- arg0,
1433- )
1346+ run(args[0].(int))
14341347 })
14351348 return _c
14361349 }
@@ -1440,15 +1353,14 @@ func (_c *MockPanedWidget_SetPosition_Call) Return() *MockPanedWidget_SetPositio
14401353 return _c
14411354 }
14421355
1443-func (_c *MockPanedWidget_SetPosition_Call) RunAndReturn(run func(position int)) *MockPanedWidget_SetPosition_Call {
1356+func (_c *MockPanedWidget_SetPosition_Call) RunAndReturn(run func(int)) *MockPanedWidget_SetPosition_Call {
14441357 _c.Run(run)
14451358 return _c
14461359 }
14471360
1448-// SetResizeEndChild provides a mock function for the type MockPanedWidget
1449-func (_mock *MockPanedWidget) SetResizeEndChild(resize bool) {
1450- _mock.Called(resize)
1451- return
1361+// SetResizeEndChild provides a mock function with given fields: resize
1362+func (_m *MockPanedWidget) SetResizeEndChild(resize bool) {
1363+ _m.Called(resize)
14521364 }
14531365
14541366 // MockPanedWidget_SetResizeEndChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetResizeEndChild'
@@ -1464,13 +1376,7 @@ func (_e *MockPanedWidget_Expecter) SetResizeEndChild(resize interface{}) *MockP
14641376
14651377 func (_c *MockPanedWidget_SetResizeEndChild_Call) Run(run func(resize bool)) *MockPanedWidget_SetResizeEndChild_Call {
14661378 _c.Call.Run(func(args mock.Arguments) {
1467- var arg0 bool
1468- if args[0] != nil {
1469- arg0 = args[0].(bool)
1470- }
1471- run(
1472- arg0,
1473- )
1379+ run(args[0].(bool))
14741380 })
14751381 return _c
14761382 }
@@ -1480,15 +1386,14 @@ func (_c *MockPanedWidget_SetResizeEndChild_Call) Return() *MockPanedWidget_SetR
14801386 return _c
14811387 }
14821388
1483-func (_c *MockPanedWidget_SetResizeEndChild_Call) RunAndReturn(run func(resize bool)) *MockPanedWidget_SetResizeEndChild_Call {
1389+func (_c *MockPanedWidget_SetResizeEndChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetResizeEndChild_Call {
14841390 _c.Run(run)
14851391 return _c
14861392 }
14871393
1488-// SetResizeStartChild provides a mock function for the type MockPanedWidget
1489-func (_mock *MockPanedWidget) SetResizeStartChild(resize bool) {
1490- _mock.Called(resize)
1491- return
1394+// SetResizeStartChild provides a mock function with given fields: resize
1395+func (_m *MockPanedWidget) SetResizeStartChild(resize bool) {
1396+ _m.Called(resize)
14921397 }
14931398
14941399 // MockPanedWidget_SetResizeStartChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetResizeStartChild'
@@ -1504,13 +1409,7 @@ func (_e *MockPanedWidget_Expecter) SetResizeStartChild(resize interface{}) *Moc
15041409
15051410 func (_c *MockPanedWidget_SetResizeStartChild_Call) Run(run func(resize bool)) *MockPanedWidget_SetResizeStartChild_Call {
15061411 _c.Call.Run(func(args mock.Arguments) {
1507- var arg0 bool
1508- if args[0] != nil {
1509- arg0 = args[0].(bool)
1510- }
1511- run(
1512- arg0,
1513- )
1412+ run(args[0].(bool))
15141413 })
15151414 return _c
15161415 }
@@ -1520,15 +1419,14 @@ func (_c *MockPanedWidget_SetResizeStartChild_Call) Return() *MockPanedWidget_Se
15201419 return _c
15211420 }
15221421
1523-func (_c *MockPanedWidget_SetResizeStartChild_Call) RunAndReturn(run func(resize bool)) *MockPanedWidget_SetResizeStartChild_Call {
1422+func (_c *MockPanedWidget_SetResizeStartChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetResizeStartChild_Call {
15241423 _c.Run(run)
15251424 return _c
15261425 }
15271426
1528-// SetShrinkEndChild provides a mock function for the type MockPanedWidget
1529-func (_mock *MockPanedWidget) SetShrinkEndChild(shrink bool) {
1530- _mock.Called(shrink)
1531- return
1427+// SetShrinkEndChild provides a mock function with given fields: shrink
1428+func (_m *MockPanedWidget) SetShrinkEndChild(shrink bool) {
1429+ _m.Called(shrink)
15321430 }
15331431
15341432 // MockPanedWidget_SetShrinkEndChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShrinkEndChild'
@@ -1544,13 +1442,7 @@ func (_e *MockPanedWidget_Expecter) SetShrinkEndChild(shrink interface{}) *MockP
15441442
15451443 func (_c *MockPanedWidget_SetShrinkEndChild_Call) Run(run func(shrink bool)) *MockPanedWidget_SetShrinkEndChild_Call {
15461444 _c.Call.Run(func(args mock.Arguments) {
1547- var arg0 bool
1548- if args[0] != nil {
1549- arg0 = args[0].(bool)
1550- }
1551- run(
1552- arg0,
1553- )
1445+ run(args[0].(bool))
15541446 })
15551447 return _c
15561448 }
@@ -1560,15 +1452,14 @@ func (_c *MockPanedWidget_SetShrinkEndChild_Call) Return() *MockPanedWidget_SetS
15601452 return _c
15611453 }
15621454
1563-func (_c *MockPanedWidget_SetShrinkEndChild_Call) RunAndReturn(run func(shrink bool)) *MockPanedWidget_SetShrinkEndChild_Call {
1455+func (_c *MockPanedWidget_SetShrinkEndChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetShrinkEndChild_Call {
15641456 _c.Run(run)
15651457 return _c
15661458 }
15671459
1568-// SetShrinkStartChild provides a mock function for the type MockPanedWidget
1569-func (_mock *MockPanedWidget) SetShrinkStartChild(shrink bool) {
1570- _mock.Called(shrink)
1571- return
1460+// SetShrinkStartChild provides a mock function with given fields: shrink
1461+func (_m *MockPanedWidget) SetShrinkStartChild(shrink bool) {
1462+ _m.Called(shrink)
15721463 }
15731464
15741465 // MockPanedWidget_SetShrinkStartChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShrinkStartChild'
@@ -1584,13 +1475,7 @@ func (_e *MockPanedWidget_Expecter) SetShrinkStartChild(shrink interface{}) *Moc
15841475
15851476 func (_c *MockPanedWidget_SetShrinkStartChild_Call) Run(run func(shrink bool)) *MockPanedWidget_SetShrinkStartChild_Call {
15861477 _c.Call.Run(func(args mock.Arguments) {
1587- var arg0 bool
1588- if args[0] != nil {
1589- arg0 = args[0].(bool)
1590- }
1591- run(
1592- arg0,
1593- )
1478+ run(args[0].(bool))
15941479 })
15951480 return _c
15961481 }
@@ -1600,15 +1485,14 @@ func (_c *MockPanedWidget_SetShrinkStartChild_Call) Return() *MockPanedWidget_Se
16001485 return _c
16011486 }
16021487
1603-func (_c *MockPanedWidget_SetShrinkStartChild_Call) RunAndReturn(run func(shrink bool)) *MockPanedWidget_SetShrinkStartChild_Call {
1488+func (_c *MockPanedWidget_SetShrinkStartChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetShrinkStartChild_Call {
16041489 _c.Run(run)
16051490 return _c
16061491 }
16071492
1608-// SetSizeRequest provides a mock function for the type MockPanedWidget
1609-func (_mock *MockPanedWidget) SetSizeRequest(width int, height int) {
1610- _mock.Called(width, height)
1611- return
1493+// SetSizeRequest provides a mock function with given fields: width, height
1494+func (_m *MockPanedWidget) SetSizeRequest(width int, height int) {
1495+ _m.Called(width, height)
16121496 }
16131497
16141498 // MockPanedWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest'
@@ -1625,18 +1509,7 @@ func (_e *MockPanedWidget_Expecter) SetSizeRequest(width interface{}, height int
16251509
16261510 func (_c *MockPanedWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockPanedWidget_SetSizeRequest_Call {
16271511 _c.Call.Run(func(args mock.Arguments) {
1628- var arg0 int
1629- if args[0] != nil {
1630- arg0 = args[0].(int)
1631- }
1632- var arg1 int
1633- if args[1] != nil {
1634- arg1 = args[1].(int)
1635- }
1636- run(
1637- arg0,
1638- arg1,
1639- )
1512+ run(args[0].(int), args[1].(int))
16401513 })
16411514 return _c
16421515 }
@@ -1646,15 +1519,14 @@ func (_c *MockPanedWidget_SetSizeRequest_Call) Return() *MockPanedWidget_SetSize
16461519 return _c
16471520 }
16481521
1649-func (_c *MockPanedWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockPanedWidget_SetSizeRequest_Call {
1522+func (_c *MockPanedWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockPanedWidget_SetSizeRequest_Call {
16501523 _c.Run(run)
16511524 return _c
16521525 }
16531526
1654-// SetStartChild provides a mock function for the type MockPanedWidget
1655-func (_mock *MockPanedWidget) SetStartChild(child layout.Widget) {
1656- _mock.Called(child)
1657- return
1527+// SetStartChild provides a mock function with given fields: child
1528+func (_m *MockPanedWidget) SetStartChild(child layout.Widget) {
1529+ _m.Called(child)
16581530 }
16591531
16601532 // MockPanedWidget_SetStartChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStartChild'
@@ -1670,13 +1542,7 @@ func (_e *MockPanedWidget_Expecter) SetStartChild(child interface{}) *MockPanedW
16701542
16711543 func (_c *MockPanedWidget_SetStartChild_Call) Run(run func(child layout.Widget)) *MockPanedWidget_SetStartChild_Call {
16721544 _c.Call.Run(func(args mock.Arguments) {
1673- var arg0 layout.Widget
1674- if args[0] != nil {
1675- arg0 = args[0].(layout.Widget)
1676- }
1677- run(
1678- arg0,
1679- )
1545+ run(args[0].(layout.Widget))
16801546 })
16811547 return _c
16821548 }
@@ -1686,15 +1552,14 @@ func (_c *MockPanedWidget_SetStartChild_Call) Return() *MockPanedWidget_SetStart
16861552 return _c
16871553 }
16881554
1689-func (_c *MockPanedWidget_SetStartChild_Call) RunAndReturn(run func(child layout.Widget)) *MockPanedWidget_SetStartChild_Call {
1555+func (_c *MockPanedWidget_SetStartChild_Call) RunAndReturn(run func(layout.Widget)) *MockPanedWidget_SetStartChild_Call {
16901556 _c.Run(run)
16911557 return _c
16921558 }
16931559
1694-// SetValign provides a mock function for the type MockPanedWidget
1695-func (_mock *MockPanedWidget) SetValign(align gtk.Align) {
1696- _mock.Called(align)
1697- return
1560+// SetValign provides a mock function with given fields: align
1561+func (_m *MockPanedWidget) SetValign(align gtk.Align) {
1562+ _m.Called(align)
16981563 }
16991564
17001565 // MockPanedWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign'
@@ -1710,13 +1575,7 @@ func (_e *MockPanedWidget_Expecter) SetValign(align interface{}) *MockPanedWidge
17101575
17111576 func (_c *MockPanedWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockPanedWidget_SetValign_Call {
17121577 _c.Call.Run(func(args mock.Arguments) {
1713- var arg0 gtk.Align
1714- if args[0] != nil {
1715- arg0 = args[0].(gtk.Align)
1716- }
1717- run(
1718- arg0,
1719- )
1578+ run(args[0].(gtk.Align))
17201579 })
17211580 return _c
17221581 }
@@ -1726,15 +1585,14 @@ func (_c *MockPanedWidget_SetValign_Call) Return() *MockPanedWidget_SetValign_Ca
17261585 return _c
17271586 }
17281587
1729-func (_c *MockPanedWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockPanedWidget_SetValign_Call {
1588+func (_c *MockPanedWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockPanedWidget_SetValign_Call {
17301589 _c.Run(run)
17311590 return _c
17321591 }
17331592
1734-// SetVexpand provides a mock function for the type MockPanedWidget
1735-func (_mock *MockPanedWidget) SetVexpand(expand bool) {
1736- _mock.Called(expand)
1737- return
1593+// SetVexpand provides a mock function with given fields: expand
1594+func (_m *MockPanedWidget) SetVexpand(expand bool) {
1595+ _m.Called(expand)
17381596 }
17391597
17401598 // MockPanedWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand'
@@ -1750,13 +1608,7 @@ func (_e *MockPanedWidget_Expecter) SetVexpand(expand interface{}) *MockPanedWid
17501608
17511609 func (_c *MockPanedWidget_SetVexpand_Call) Run(run func(expand bool)) *MockPanedWidget_SetVexpand_Call {
17521610 _c.Call.Run(func(args mock.Arguments) {
1753- var arg0 bool
1754- if args[0] != nil {
1755- arg0 = args[0].(bool)
1756- }
1757- run(
1758- arg0,
1759- )
1611+ run(args[0].(bool))
17601612 })
17611613 return _c
17621614 }
@@ -1766,15 +1618,14 @@ func (_c *MockPanedWidget_SetVexpand_Call) Return() *MockPanedWidget_SetVexpand_
17661618 return _c
17671619 }
17681620
1769-func (_c *MockPanedWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockPanedWidget_SetVexpand_Call {
1621+func (_c *MockPanedWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetVexpand_Call {
17701622 _c.Run(run)
17711623 return _c
17721624 }
17731625
1774-// SetVisible provides a mock function for the type MockPanedWidget
1775-func (_mock *MockPanedWidget) SetVisible(visible bool) {
1776- _mock.Called(visible)
1777- return
1626+// SetVisible provides a mock function with given fields: visible
1627+func (_m *MockPanedWidget) SetVisible(visible bool) {
1628+ _m.Called(visible)
17781629 }
17791630
17801631 // MockPanedWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible'
@@ -1790,13 +1641,7 @@ func (_e *MockPanedWidget_Expecter) SetVisible(visible interface{}) *MockPanedWi
17901641
17911642 func (_c *MockPanedWidget_SetVisible_Call) Run(run func(visible bool)) *MockPanedWidget_SetVisible_Call {
17921643 _c.Call.Run(func(args mock.Arguments) {
1793- var arg0 bool
1794- if args[0] != nil {
1795- arg0 = args[0].(bool)
1796- }
1797- run(
1798- arg0,
1799- )
1644+ run(args[0].(bool))
18001645 })
18011646 return _c
18021647 }
@@ -1806,15 +1651,14 @@ func (_c *MockPanedWidget_SetVisible_Call) Return() *MockPanedWidget_SetVisible_
18061651 return _c
18071652 }
18081653
1809-func (_c *MockPanedWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockPanedWidget_SetVisible_Call {
1654+func (_c *MockPanedWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetVisible_Call {
18101655 _c.Run(run)
18111656 return _c
18121657 }
18131658
1814-// SetWideHandle provides a mock function for the type MockPanedWidget
1815-func (_mock *MockPanedWidget) SetWideHandle(wide bool) {
1816- _mock.Called(wide)
1817- return
1659+// SetWideHandle provides a mock function with given fields: wide
1660+func (_m *MockPanedWidget) SetWideHandle(wide bool) {
1661+ _m.Called(wide)
18181662 }
18191663
18201664 // MockPanedWidget_SetWideHandle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWideHandle'
@@ -1830,13 +1674,7 @@ func (_e *MockPanedWidget_Expecter) SetWideHandle(wide interface{}) *MockPanedWi
18301674
18311675 func (_c *MockPanedWidget_SetWideHandle_Call) Run(run func(wide bool)) *MockPanedWidget_SetWideHandle_Call {
18321676 _c.Call.Run(func(args mock.Arguments) {
1833- var arg0 bool
1834- if args[0] != nil {
1835- arg0 = args[0].(bool)
1836- }
1837- run(
1838- arg0,
1839- )
1677+ run(args[0].(bool))
18401678 })
18411679 return _c
18421680 }
@@ -1846,15 +1684,14 @@ func (_c *MockPanedWidget_SetWideHandle_Call) Return() *MockPanedWidget_SetWideH
18461684 return _c
18471685 }
18481686
1849-func (_c *MockPanedWidget_SetWideHandle_Call) RunAndReturn(run func(wide bool)) *MockPanedWidget_SetWideHandle_Call {
1687+func (_c *MockPanedWidget_SetWideHandle_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetWideHandle_Call {
18501688 _c.Run(run)
18511689 return _c
18521690 }
18531691
1854-// Show provides a mock function for the type MockPanedWidget
1855-func (_mock *MockPanedWidget) Show() {
1856- _mock.Called()
1857- return
1692+// Show provides a mock function with no fields
1693+func (_m *MockPanedWidget) Show() {
1694+ _m.Called()
18581695 }
18591696
18601697 // MockPanedWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
@@ -1884,10 +1721,9 @@ func (_c *MockPanedWidget_Show_Call) RunAndReturn(run func()) *MockPanedWidget_S
18841721 return _c
18851722 }
18861723
1887-// Unparent provides a mock function for the type MockPanedWidget
1888-func (_mock *MockPanedWidget) Unparent() {
1889- _mock.Called()
1890- return
1724+// Unparent provides a mock function with no fields
1725+func (_m *MockPanedWidget) Unparent() {
1726+ _m.Called()
18911727 }
18921728
18931729 // MockPanedWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent'
@@ -1916,3 +1752,17 @@ func (_c *MockPanedWidget_Unparent_Call) RunAndReturn(run func()) *MockPanedWidg
19161752 _c.Run(run)
19171753 return _c
19181754 }
1755+
1756+// NewMockPanedWidget creates a new instance of MockPanedWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
1757+// The first argument is typically a *testing.T value.
1758+func NewMockPanedWidget(t interface {
1759+ mock.TestingT
1760+ Cleanup(func())
1761+}) *MockPanedWidget {
1762+ mock := &MockPanedWidget{}
1763+ mock.Mock.Test(t)
1764+
1765+ t.Cleanup(func() { mock.AssertExpectations(t) })
1766+
1767+ return mock
1768+}
M internal/ui/layout/mocks/mock_widget.go +185 -277
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// 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.
14-// The first argument is typically a *testing.T value.
15-func NewMockWidget(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockWidget {
19- mock := &MockWidget{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockWidget is an autogenerated mock type for the Widget type
2813 type MockWidget struct {
2914 mock.Mock
@@ -37,10 +22,9 @@ func (_m *MockWidget) EXPECT() *MockWidget_Expecter {
3722 return &MockWidget_Expecter{mock: &_m.Mock}
3823 }
3924
40-// AddController provides a mock function for the type MockWidget
41-func (_mock *MockWidget) AddController(controller *gtk.EventController) {
42- _mock.Called(controller)
43- return
25+// AddController provides a mock function with given fields: controller
26+func (_m *MockWidget) AddController(controller *gtk.EventController) {
27+ _m.Called(controller)
4428 }
4529
4630 // MockWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController'
@@ -56,13 +40,7 @@ func (_e *MockWidget_Expecter) AddController(controller interface{}) *MockWidget
5640
5741 func (_c *MockWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockWidget_AddController_Call {
5842 _c.Call.Run(func(args mock.Arguments) {
59- var arg0 *gtk.EventController
60- if args[0] != nil {
61- arg0 = args[0].(*gtk.EventController)
62- }
63- run(
64- arg0,
65- )
43+ run(args[0].(*gtk.EventController))
6644 })
6745 return _c
6846 }
@@ -72,15 +50,14 @@ func (_c *MockWidget_AddController_Call) Return() *MockWidget_AddController_Call
7250 return _c
7351 }
7452
75-func (_c *MockWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockWidget_AddController_Call {
53+func (_c *MockWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockWidget_AddController_Call {
7654 _c.Run(run)
7755 return _c
7856 }
7957
80-// AddCssClass provides a mock function for the type MockWidget
81-func (_mock *MockWidget) AddCssClass(cssClass string) {
82- _mock.Called(cssClass)
83- return
58+// AddCssClass provides a mock function with given fields: cssClass
59+func (_m *MockWidget) AddCssClass(cssClass string) {
60+ _m.Called(cssClass)
8461 }
8562
8663 // MockWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass'
@@ -96,13 +73,7 @@ func (_e *MockWidget_Expecter) AddCssClass(cssClass interface{}) *MockWidget_Add
9673
9774 func (_c *MockWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockWidget_AddCssClass_Call {
9875 _c.Call.Run(func(args mock.Arguments) {
99- var arg0 string
100- if args[0] != nil {
101- arg0 = args[0].(string)
102- }
103- run(
104- arg0,
105- )
76+ run(args[0].(string))
10677 })
10778 return _c
10879 }
@@ -112,14 +83,14 @@ func (_c *MockWidget_AddCssClass_Call) Return() *MockWidget_AddCssClass_Call {
11283 return _c
11384 }
11485
115-func (_c *MockWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockWidget_AddCssClass_Call {
86+func (_c *MockWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockWidget_AddCssClass_Call {
11687 _c.Run(run)
11788 return _c
11889 }
11990
120-// ComputePoint provides a mock function for the type MockWidget
121-func (_mock *MockWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
122- ret := _mock.Called(target)
91+// ComputePoint provides a mock function with given fields: target
92+func (_m *MockWidget) ComputePoint(target layout.Widget) (float64, float64, bool) {
93+ ret := _m.Called(target)
12394
12495 if len(ret) == 0 {
12596 panic("no return value specified for ComputePoint")
@@ -128,24 +99,27 @@ func (_mock *MockWidget) ComputePoint(target layout.Widget) (float64, float64, b
12899 var r0 float64
129100 var r1 float64
130101 var r2 bool
131- if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
132- return returnFunc(target)
102+ if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok {
103+ return rf(target)
133104 }
134- if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok {
135- r0 = returnFunc(target)
105+ if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok {
106+ r0 = rf(target)
136107 } else {
137108 r0 = ret.Get(0).(float64)
138109 }
139- if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok {
140- r1 = returnFunc(target)
110+
111+ if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok {
112+ r1 = rf(target)
141113 } else {
142114 r1 = ret.Get(1).(float64)
143115 }
144- if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok {
145- r2 = returnFunc(target)
116+
117+ if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok {
118+ r2 = rf(target)
146119 } else {
147120 r2 = ret.Get(2).(bool)
148121 }
122+
149123 return r0, r1, r2
150124 }
151125
@@ -162,13 +136,7 @@ func (_e *MockWidget_Expecter) ComputePoint(target interface{}) *MockWidget_Comp
162136
163137 func (_c *MockWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockWidget_ComputePoint_Call {
164138 _c.Call.Run(func(args mock.Arguments) {
165- var arg0 layout.Widget
166- if args[0] != nil {
167- arg0 = args[0].(layout.Widget)
168- }
169- run(
170- arg0,
171- )
139+ run(args[0].(layout.Widget))
172140 })
173141 return _c
174142 }
@@ -178,25 +146,26 @@ func (_c *MockWidget_ComputePoint_Call) Return(x float64, y float64, ok bool) *M
178146 return _c
179147 }
180148
181-func (_c *MockWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockWidget_ComputePoint_Call {
149+func (_c *MockWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockWidget_ComputePoint_Call {
182150 _c.Call.Return(run)
183151 return _c
184152 }
185153
186-// GetAllocatedHeight provides a mock function for the type MockWidget
187-func (_mock *MockWidget) GetAllocatedHeight() int {
188- ret := _mock.Called()
154+// GetAllocatedHeight provides a mock function with no fields
155+func (_m *MockWidget) GetAllocatedHeight() int {
156+ ret := _m.Called()
189157
190158 if len(ret) == 0 {
191159 panic("no return value specified for GetAllocatedHeight")
192160 }
193161
194162 var r0 int
195- if returnFunc, ok := ret.Get(0).(func() int); ok {
196- r0 = returnFunc()
163+ if rf, ok := ret.Get(0).(func() int); ok {
164+ r0 = rf()
197165 } else {
198166 r0 = ret.Get(0).(int)
199167 }
168+
200169 return r0
201170 }
202171
@@ -217,8 +186,8 @@ func (_c *MockWidget_GetAllocatedHeight_Call) Run(run func()) *MockWidget_GetAll
217186 return _c
218187 }
219188
220-func (_c *MockWidget_GetAllocatedHeight_Call) Return(n int) *MockWidget_GetAllocatedHeight_Call {
221- _c.Call.Return(n)
189+func (_c *MockWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockWidget_GetAllocatedHeight_Call {
190+ _c.Call.Return(_a0)
222191 return _c
223192 }
224193
@@ -227,20 +196,21 @@ func (_c *MockWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) *Mock
227196 return _c
228197 }
229198
230-// GetAllocatedWidth provides a mock function for the type MockWidget
231-func (_mock *MockWidget) GetAllocatedWidth() int {
232- ret := _mock.Called()
199+// GetAllocatedWidth provides a mock function with no fields
200+func (_m *MockWidget) GetAllocatedWidth() int {
201+ ret := _m.Called()
233202
234203 if len(ret) == 0 {
235204 panic("no return value specified for GetAllocatedWidth")
236205 }
237206
238207 var r0 int
239- if returnFunc, ok := ret.Get(0).(func() int); ok {
240- r0 = returnFunc()
208+ if rf, ok := ret.Get(0).(func() int); ok {
209+ r0 = rf()
241210 } else {
242211 r0 = ret.Get(0).(int)
243212 }
213+
244214 return r0
245215 }
246216
@@ -261,8 +231,8 @@ func (_c *MockWidget_GetAllocatedWidth_Call) Run(run func()) *MockWidget_GetAllo
261231 return _c
262232 }
263233
264-func (_c *MockWidget_GetAllocatedWidth_Call) Return(n int) *MockWidget_GetAllocatedWidth_Call {
265- _c.Call.Return(n)
234+func (_c *MockWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockWidget_GetAllocatedWidth_Call {
235+ _c.Call.Return(_a0)
266236 return _c
267237 }
268238
@@ -271,20 +241,21 @@ func (_c *MockWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) *MockW
271241 return _c
272242 }
273243
274-// GetHexpand provides a mock function for the type MockWidget
275-func (_mock *MockWidget) GetHexpand() bool {
276- ret := _mock.Called()
244+// GetHexpand provides a mock function with no fields
245+func (_m *MockWidget) GetHexpand() bool {
246+ ret := _m.Called()
277247
278248 if len(ret) == 0 {
279249 panic("no return value specified for GetHexpand")
280250 }
281251
282252 var r0 bool
283- if returnFunc, ok := ret.Get(0).(func() bool); ok {
284- r0 = returnFunc()
253+ if rf, ok := ret.Get(0).(func() bool); ok {
254+ r0 = rf()
285255 } else {
286256 r0 = ret.Get(0).(bool)
287257 }
258+
288259 return r0
289260 }
290261
@@ -305,8 +276,8 @@ func (_c *MockWidget_GetHexpand_Call) Run(run func()) *MockWidget_GetHexpand_Cal
305276 return _c
306277 }
307278
308-func (_c *MockWidget_GetHexpand_Call) Return(b bool) *MockWidget_GetHexpand_Call {
309- _c.Call.Return(b)
279+func (_c *MockWidget_GetHexpand_Call) Return(_a0 bool) *MockWidget_GetHexpand_Call {
280+ _c.Call.Return(_a0)
310281 return _c
311282 }
312283
@@ -315,22 +286,23 @@ func (_c *MockWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockWidget_
315286 return _c
316287 }
317288
318-// GetParent provides a mock function for the type MockWidget
319-func (_mock *MockWidget) GetParent() layout.Widget {
320- ret := _mock.Called()
289+// GetParent provides a mock function with no fields
290+func (_m *MockWidget) GetParent() layout.Widget {
291+ ret := _m.Called()
321292
322293 if len(ret) == 0 {
323294 panic("no return value specified for GetParent")
324295 }
325296
326297 var r0 layout.Widget
327- if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok {
328- r0 = returnFunc()
298+ if rf, ok := ret.Get(0).(func() layout.Widget); ok {
299+ r0 = rf()
329300 } else {
330301 if ret.Get(0) != nil {
331302 r0 = ret.Get(0).(layout.Widget)
332303 }
333304 }
305+
334306 return r0
335307 }
336308
@@ -351,8 +323,8 @@ func (_c *MockWidget_GetParent_Call) Run(run func()) *MockWidget_GetParent_Call
351323 return _c
352324 }
353325
354-func (_c *MockWidget_GetParent_Call) Return(widget layout.Widget) *MockWidget_GetParent_Call {
355- _c.Call.Return(widget)
326+func (_c *MockWidget_GetParent_Call) Return(_a0 layout.Widget) *MockWidget_GetParent_Call {
327+ _c.Call.Return(_a0)
356328 return _c
357329 }
358330
@@ -361,20 +333,21 @@ func (_c *MockWidget_GetParent_Call) RunAndReturn(run func() layout.Widget) *Moc
361333 return _c
362334 }
363335
364-// GetVexpand provides a mock function for the type MockWidget
365-func (_mock *MockWidget) GetVexpand() bool {
366- ret := _mock.Called()
336+// GetVexpand provides a mock function with no fields
337+func (_m *MockWidget) GetVexpand() bool {
338+ ret := _m.Called()
367339
368340 if len(ret) == 0 {
369341 panic("no return value specified for GetVexpand")
370342 }
371343
372344 var r0 bool
373- if returnFunc, ok := ret.Get(0).(func() bool); ok {
374- r0 = returnFunc()
345+ if rf, ok := ret.Get(0).(func() bool); ok {
346+ r0 = rf()
375347 } else {
376348 r0 = ret.Get(0).(bool)
377349 }
350+
378351 return r0
379352 }
380353
@@ -395,8 +368,8 @@ func (_c *MockWidget_GetVexpand_Call) Run(run func()) *MockWidget_GetVexpand_Cal
395368 return _c
396369 }
397370
398-func (_c *MockWidget_GetVexpand_Call) Return(b bool) *MockWidget_GetVexpand_Call {
399- _c.Call.Return(b)
371+func (_c *MockWidget_GetVexpand_Call) Return(_a0 bool) *MockWidget_GetVexpand_Call {
372+ _c.Call.Return(_a0)
400373 return _c
401374 }
402375
@@ -405,20 +378,21 @@ func (_c *MockWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockWidget_
405378 return _c
406379 }
407380
408-// GrabFocus provides a mock function for the type MockWidget
409-func (_mock *MockWidget) GrabFocus() bool {
410- ret := _mock.Called()
381+// GrabFocus provides a mock function with no fields
382+func (_m *MockWidget) GrabFocus() bool {
383+ ret := _m.Called()
411384
412385 if len(ret) == 0 {
413386 panic("no return value specified for GrabFocus")
414387 }
415388
416389 var r0 bool
417- if returnFunc, ok := ret.Get(0).(func() bool); ok {
418- r0 = returnFunc()
390+ if rf, ok := ret.Get(0).(func() bool); ok {
391+ r0 = rf()
419392 } else {
420393 r0 = ret.Get(0).(bool)
421394 }
395+
422396 return r0
423397 }
424398
@@ -439,8 +413,8 @@ func (_c *MockWidget_GrabFocus_Call) Run(run func()) *MockWidget_GrabFocus_Call
439413 return _c
440414 }
441415
442-func (_c *MockWidget_GrabFocus_Call) Return(b bool) *MockWidget_GrabFocus_Call {
443- _c.Call.Return(b)
416+func (_c *MockWidget_GrabFocus_Call) Return(_a0 bool) *MockWidget_GrabFocus_Call {
417+ _c.Call.Return(_a0)
444418 return _c
445419 }
446420
@@ -449,22 +423,23 @@ func (_c *MockWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockWidget_G
449423 return _c
450424 }
451425
452-// GtkWidget provides a mock function for the type MockWidget
453-func (_mock *MockWidget) GtkWidget() *gtk.Widget {
454- ret := _mock.Called()
426+// GtkWidget provides a mock function with no fields
427+func (_m *MockWidget) GtkWidget() *gtk.Widget {
428+ ret := _m.Called()
455429
456430 if len(ret) == 0 {
457431 panic("no return value specified for GtkWidget")
458432 }
459433
460434 var r0 *gtk.Widget
461- if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok {
462- r0 = returnFunc()
435+ if rf, ok := ret.Get(0).(func() *gtk.Widget); ok {
436+ r0 = rf()
463437 } else {
464438 if ret.Get(0) != nil {
465439 r0 = ret.Get(0).(*gtk.Widget)
466440 }
467441 }
442+
468443 return r0
469444 }
470445
@@ -485,8 +460,8 @@ func (_c *MockWidget_GtkWidget_Call) Run(run func()) *MockWidget_GtkWidget_Call
485460 return _c
486461 }
487462
488-func (_c *MockWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockWidget_GtkWidget_Call {
489- _c.Call.Return(widget)
463+func (_c *MockWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockWidget_GtkWidget_Call {
464+ _c.Call.Return(_a0)
490465 return _c
491466 }
492467
@@ -495,20 +470,21 @@ func (_c *MockWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) *MockW
495470 return _c
496471 }
497472
498-// HasCssClass provides a mock function for the type MockWidget
499-func (_mock *MockWidget) HasCssClass(cssClass string) bool {
500- ret := _mock.Called(cssClass)
473+// HasCssClass provides a mock function with given fields: cssClass
474+func (_m *MockWidget) HasCssClass(cssClass string) bool {
475+ ret := _m.Called(cssClass)
501476
502477 if len(ret) == 0 {
503478 panic("no return value specified for HasCssClass")
504479 }
505480
506481 var r0 bool
507- if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
508- r0 = returnFunc(cssClass)
482+ if rf, ok := ret.Get(0).(func(string) bool); ok {
483+ r0 = rf(cssClass)
509484 } else {
510485 r0 = ret.Get(0).(bool)
511486 }
487+
512488 return r0
513489 }
514490
@@ -525,41 +501,36 @@ func (_e *MockWidget_Expecter) HasCssClass(cssClass interface{}) *MockWidget_Has
525501
526502 func (_c *MockWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockWidget_HasCssClass_Call {
527503 _c.Call.Run(func(args mock.Arguments) {
528- var arg0 string
529- if args[0] != nil {
530- arg0 = args[0].(string)
531- }
532- run(
533- arg0,
534- )
504+ run(args[0].(string))
535505 })
536506 return _c
537507 }
538508
539-func (_c *MockWidget_HasCssClass_Call) Return(b bool) *MockWidget_HasCssClass_Call {
540- _c.Call.Return(b)
509+func (_c *MockWidget_HasCssClass_Call) Return(_a0 bool) *MockWidget_HasCssClass_Call {
510+ _c.Call.Return(_a0)
541511 return _c
542512 }
543513
544-func (_c *MockWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockWidget_HasCssClass_Call {
514+func (_c *MockWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockWidget_HasCssClass_Call {
545515 _c.Call.Return(run)
546516 return _c
547517 }
548518
549-// HasFocus provides a mock function for the type MockWidget
550-func (_mock *MockWidget) HasFocus() bool {
551- ret := _mock.Called()
519+// HasFocus provides a mock function with no fields
520+func (_m *MockWidget) HasFocus() bool {
521+ ret := _m.Called()
552522
553523 if len(ret) == 0 {
554524 panic("no return value specified for HasFocus")
555525 }
556526
557527 var r0 bool
558- if returnFunc, ok := ret.Get(0).(func() bool); ok {
559- r0 = returnFunc()
528+ if rf, ok := ret.Get(0).(func() bool); ok {
529+ r0 = rf()
560530 } else {
561531 r0 = ret.Get(0).(bool)
562532 }
533+
563534 return r0
564535 }
565536
@@ -580,8 +551,8 @@ func (_c *MockWidget_HasFocus_Call) Run(run func()) *MockWidget_HasFocus_Call {
580551 return _c
581552 }
582553
583-func (_c *MockWidget_HasFocus_Call) Return(b bool) *MockWidget_HasFocus_Call {
584- _c.Call.Return(b)
554+func (_c *MockWidget_HasFocus_Call) Return(_a0 bool) *MockWidget_HasFocus_Call {
555+ _c.Call.Return(_a0)
585556 return _c
586557 }
587558
@@ -590,10 +561,9 @@ func (_c *MockWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockWidget_Ha
590561 return _c
591562 }
592563
593-// Hide provides a mock function for the type MockWidget
594-func (_mock *MockWidget) Hide() {
595- _mock.Called()
596- return
564+// Hide provides a mock function with no fields
565+func (_m *MockWidget) Hide() {
566+ _m.Called()
597567 }
598568
599569 // MockWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide'
@@ -623,20 +593,21 @@ func (_c *MockWidget_Hide_Call) RunAndReturn(run func()) *MockWidget_Hide_Call {
623593 return _c
624594 }
625595
626-// IsVisible provides a mock function for the type MockWidget
627-func (_mock *MockWidget) IsVisible() bool {
628- ret := _mock.Called()
596+// IsVisible provides a mock function with no fields
597+func (_m *MockWidget) IsVisible() bool {
598+ ret := _m.Called()
629599
630600 if len(ret) == 0 {
631601 panic("no return value specified for IsVisible")
632602 }
633603
634604 var r0 bool
635- if returnFunc, ok := ret.Get(0).(func() bool); ok {
636- r0 = returnFunc()
605+ if rf, ok := ret.Get(0).(func() bool); ok {
606+ r0 = rf()
637607 } else {
638608 r0 = ret.Get(0).(bool)
639609 }
610+
640611 return r0
641612 }
642613
@@ -657,8 +628,8 @@ func (_c *MockWidget_IsVisible_Call) Run(run func()) *MockWidget_IsVisible_Call
657628 return _c
658629 }
659630
660-func (_c *MockWidget_IsVisible_Call) Return(b bool) *MockWidget_IsVisible_Call {
661- _c.Call.Return(b)
631+func (_c *MockWidget_IsVisible_Call) Return(_a0 bool) *MockWidget_IsVisible_Call {
632+ _c.Call.Return(_a0)
662633 return _c
663634 }
664635
@@ -667,10 +638,9 @@ func (_c *MockWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockWidget_I
667638 return _c
668639 }
669640
670-// RemoveCssClass provides a mock function for the type MockWidget
671-func (_mock *MockWidget) RemoveCssClass(cssClass string) {
672- _mock.Called(cssClass)
673- return
641+// RemoveCssClass provides a mock function with given fields: cssClass
642+func (_m *MockWidget) RemoveCssClass(cssClass string) {
643+ _m.Called(cssClass)
674644 }
675645
676646 // MockWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass'
@@ -686,13 +656,7 @@ func (_e *MockWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockWidget_
686656
687657 func (_c *MockWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockWidget_RemoveCssClass_Call {
688658 _c.Call.Run(func(args mock.Arguments) {
689- var arg0 string
690- if args[0] != nil {
691- arg0 = args[0].(string)
692- }
693- run(
694- arg0,
695- )
659+ run(args[0].(string))
696660 })
697661 return _c
698662 }
@@ -702,15 +666,14 @@ func (_c *MockWidget_RemoveCssClass_Call) Return() *MockWidget_RemoveCssClass_Ca
702666 return _c
703667 }
704668
705-func (_c *MockWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockWidget_RemoveCssClass_Call {
669+func (_c *MockWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockWidget_RemoveCssClass_Call {
706670 _c.Run(run)
707671 return _c
708672 }
709673
710-// SetCanFocus provides a mock function for the type MockWidget
711-func (_mock *MockWidget) SetCanFocus(canFocus bool) {
712- _mock.Called(canFocus)
713- return
674+// SetCanFocus provides a mock function with given fields: canFocus
675+func (_m *MockWidget) SetCanFocus(canFocus bool) {
676+ _m.Called(canFocus)
714677 }
715678
716679 // MockWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus'
@@ -726,13 +689,7 @@ func (_e *MockWidget_Expecter) SetCanFocus(canFocus interface{}) *MockWidget_Set
726689
727690 func (_c *MockWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockWidget_SetCanFocus_Call {
728691 _c.Call.Run(func(args mock.Arguments) {
729- var arg0 bool
730- if args[0] != nil {
731- arg0 = args[0].(bool)
732- }
733- run(
734- arg0,
735- )
692+ run(args[0].(bool))
736693 })
737694 return _c
738695 }
@@ -742,15 +699,14 @@ func (_c *MockWidget_SetCanFocus_Call) Return() *MockWidget_SetCanFocus_Call {
742699 return _c
743700 }
744701
745-func (_c *MockWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockWidget_SetCanFocus_Call {
702+func (_c *MockWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockWidget_SetCanFocus_Call {
746703 _c.Run(run)
747704 return _c
748705 }
749706
750-// SetCanTarget provides a mock function for the type MockWidget
751-func (_mock *MockWidget) SetCanTarget(canTarget bool) {
752- _mock.Called(canTarget)
753- return
707+// SetCanTarget provides a mock function with given fields: canTarget
708+func (_m *MockWidget) SetCanTarget(canTarget bool) {
709+ _m.Called(canTarget)
754710 }
755711
756712 // MockWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget'
@@ -766,13 +722,7 @@ func (_e *MockWidget_Expecter) SetCanTarget(canTarget interface{}) *MockWidget_S
766722
767723 func (_c *MockWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockWidget_SetCanTarget_Call {
768724 _c.Call.Run(func(args mock.Arguments) {
769- var arg0 bool
770- if args[0] != nil {
771- arg0 = args[0].(bool)
772- }
773- run(
774- arg0,
775- )
725+ run(args[0].(bool))
776726 })
777727 return _c
778728 }
@@ -782,15 +732,14 @@ func (_c *MockWidget_SetCanTarget_Call) Return() *MockWidget_SetCanTarget_Call {
782732 return _c
783733 }
784734
785-func (_c *MockWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockWidget_SetCanTarget_Call {
735+func (_c *MockWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockWidget_SetCanTarget_Call {
786736 _c.Run(run)
787737 return _c
788738 }
789739
790-// SetFocusOnClick provides a mock function for the type MockWidget
791-func (_mock *MockWidget) SetFocusOnClick(focusOnClick bool) {
792- _mock.Called(focusOnClick)
793- return
740+// SetFocusOnClick provides a mock function with given fields: focusOnClick
741+func (_m *MockWidget) SetFocusOnClick(focusOnClick bool) {
742+ _m.Called(focusOnClick)
794743 }
795744
796745 // MockWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick'
@@ -806,13 +755,7 @@ func (_e *MockWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockWi
806755
807756 func (_c *MockWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockWidget_SetFocusOnClick_Call {
808757 _c.Call.Run(func(args mock.Arguments) {
809- var arg0 bool
810- if args[0] != nil {
811- arg0 = args[0].(bool)
812- }
813- run(
814- arg0,
815- )
758+ run(args[0].(bool))
816759 })
817760 return _c
818761 }
@@ -822,15 +765,14 @@ func (_c *MockWidget_SetFocusOnClick_Call) Return() *MockWidget_SetFocusOnClick_
822765 return _c
823766 }
824767
825-func (_c *MockWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockWidget_SetFocusOnClick_Call {
768+func (_c *MockWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockWidget_SetFocusOnClick_Call {
826769 _c.Run(run)
827770 return _c
828771 }
829772
830-// SetHalign provides a mock function for the type MockWidget
831-func (_mock *MockWidget) SetHalign(align gtk.Align) {
832- _mock.Called(align)
833- return
773+// SetHalign provides a mock function with given fields: align
774+func (_m *MockWidget) SetHalign(align gtk.Align) {
775+ _m.Called(align)
834776 }
835777
836778 // MockWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign'
@@ -846,13 +788,7 @@ func (_e *MockWidget_Expecter) SetHalign(align interface{}) *MockWidget_SetHalig
846788
847789 func (_c *MockWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockWidget_SetHalign_Call {
848790 _c.Call.Run(func(args mock.Arguments) {
849- var arg0 gtk.Align
850- if args[0] != nil {
851- arg0 = args[0].(gtk.Align)
852- }
853- run(
854- arg0,
855- )
791+ run(args[0].(gtk.Align))
856792 })
857793 return _c
858794 }
@@ -862,15 +798,14 @@ func (_c *MockWidget_SetHalign_Call) Return() *MockWidget_SetHalign_Call {
862798 return _c
863799 }
864800
865-func (_c *MockWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockWidget_SetHalign_Call {
801+func (_c *MockWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockWidget_SetHalign_Call {
866802 _c.Run(run)
867803 return _c
868804 }
869805
870-// SetHexpand provides a mock function for the type MockWidget
871-func (_mock *MockWidget) SetHexpand(expand bool) {
872- _mock.Called(expand)
873- return
806+// SetHexpand provides a mock function with given fields: expand
807+func (_m *MockWidget) SetHexpand(expand bool) {
808+ _m.Called(expand)
874809 }
875810
876811 // MockWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand'
@@ -886,13 +821,7 @@ func (_e *MockWidget_Expecter) SetHexpand(expand interface{}) *MockWidget_SetHex
886821
887822 func (_c *MockWidget_SetHexpand_Call) Run(run func(expand bool)) *MockWidget_SetHexpand_Call {
888823 _c.Call.Run(func(args mock.Arguments) {
889- var arg0 bool
890- if args[0] != nil {
891- arg0 = args[0].(bool)
892- }
893- run(
894- arg0,
895- )
824+ run(args[0].(bool))
896825 })
897826 return _c
898827 }
@@ -902,15 +831,14 @@ func (_c *MockWidget_SetHexpand_Call) Return() *MockWidget_SetHexpand_Call {
902831 return _c
903832 }
904833
905-func (_c *MockWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockWidget_SetHexpand_Call {
834+func (_c *MockWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockWidget_SetHexpand_Call {
906835 _c.Run(run)
907836 return _c
908837 }
909838
910-// SetSizeRequest provides a mock function for the type MockWidget
911-func (_mock *MockWidget) SetSizeRequest(width int, height int) {
912- _mock.Called(width, height)
913- return
839+// SetSizeRequest provides a mock function with given fields: width, height
840+func (_m *MockWidget) SetSizeRequest(width int, height int) {
841+ _m.Called(width, height)
914842 }
915843
916844 // MockWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest'
@@ -927,18 +855,7 @@ func (_e *MockWidget_Expecter) SetSizeRequest(width interface{}, height interfac
927855
928856 func (_c *MockWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockWidget_SetSizeRequest_Call {
929857 _c.Call.Run(func(args mock.Arguments) {
930- var arg0 int
931- if args[0] != nil {
932- arg0 = args[0].(int)
933- }
934- var arg1 int
935- if args[1] != nil {
936- arg1 = args[1].(int)
937- }
938- run(
939- arg0,
940- arg1,
941- )
858+ run(args[0].(int), args[1].(int))
942859 })
943860 return _c
944861 }
@@ -948,15 +865,14 @@ func (_c *MockWidget_SetSizeRequest_Call) Return() *MockWidget_SetSizeRequest_Ca
948865 return _c
949866 }
950867
951-func (_c *MockWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockWidget_SetSizeRequest_Call {
868+func (_c *MockWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockWidget_SetSizeRequest_Call {
952869 _c.Run(run)
953870 return _c
954871 }
955872
956-// SetValign provides a mock function for the type MockWidget
957-func (_mock *MockWidget) SetValign(align gtk.Align) {
958- _mock.Called(align)
959- return
873+// SetValign provides a mock function with given fields: align
874+func (_m *MockWidget) SetValign(align gtk.Align) {
875+ _m.Called(align)
960876 }
961877
962878 // MockWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign'
@@ -972,13 +888,7 @@ func (_e *MockWidget_Expecter) SetValign(align interface{}) *MockWidget_SetValig
972888
973889 func (_c *MockWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockWidget_SetValign_Call {
974890 _c.Call.Run(func(args mock.Arguments) {
975- var arg0 gtk.Align
976- if args[0] != nil {
977- arg0 = args[0].(gtk.Align)
978- }
979- run(
980- arg0,
981- )
891+ run(args[0].(gtk.Align))
982892 })
983893 return _c
984894 }
@@ -988,15 +898,14 @@ func (_c *MockWidget_SetValign_Call) Return() *MockWidget_SetValign_Call {
988898 return _c
989899 }
990900
991-func (_c *MockWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockWidget_SetValign_Call {
901+func (_c *MockWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockWidget_SetValign_Call {
992902 _c.Run(run)
993903 return _c
994904 }
995905
996-// SetVexpand provides a mock function for the type MockWidget
997-func (_mock *MockWidget) SetVexpand(expand bool) {
998- _mock.Called(expand)
999- return
906+// SetVexpand provides a mock function with given fields: expand
907+func (_m *MockWidget) SetVexpand(expand bool) {
908+ _m.Called(expand)
1000909 }
1001910
1002911 // MockWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand'
@@ -1012,13 +921,7 @@ func (_e *MockWidget_Expecter) SetVexpand(expand interface{}) *MockWidget_SetVex
1012921
1013922 func (_c *MockWidget_SetVexpand_Call) Run(run func(expand bool)) *MockWidget_SetVexpand_Call {
1014923 _c.Call.Run(func(args mock.Arguments) {
1015- var arg0 bool
1016- if args[0] != nil {
1017- arg0 = args[0].(bool)
1018- }
1019- run(
1020- arg0,
1021- )
924+ run(args[0].(bool))
1022925 })
1023926 return _c
1024927 }
@@ -1028,15 +931,14 @@ func (_c *MockWidget_SetVexpand_Call) Return() *MockWidget_SetVexpand_Call {
1028931 return _c
1029932 }
1030933
1031-func (_c *MockWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockWidget_SetVexpand_Call {
934+func (_c *MockWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockWidget_SetVexpand_Call {
1032935 _c.Run(run)
1033936 return _c
1034937 }
1035938
1036-// SetVisible provides a mock function for the type MockWidget
1037-func (_mock *MockWidget) SetVisible(visible bool) {
1038- _mock.Called(visible)
1039- return
939+// SetVisible provides a mock function with given fields: visible
940+func (_m *MockWidget) SetVisible(visible bool) {
941+ _m.Called(visible)
1040942 }
1041943
1042944 // MockWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible'
@@ -1052,13 +954,7 @@ func (_e *MockWidget_Expecter) SetVisible(visible interface{}) *MockWidget_SetVi
1052954
1053955 func (_c *MockWidget_SetVisible_Call) Run(run func(visible bool)) *MockWidget_SetVisible_Call {
1054956 _c.Call.Run(func(args mock.Arguments) {
1055- var arg0 bool
1056- if args[0] != nil {
1057- arg0 = args[0].(bool)
1058- }
1059- run(
1060- arg0,
1061- )
957+ run(args[0].(bool))
1062958 })
1063959 return _c
1064960 }
@@ -1068,15 +964,14 @@ func (_c *MockWidget_SetVisible_Call) Return() *MockWidget_SetVisible_Call {
1068964 return _c
1069965 }
1070966
1071-func (_c *MockWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockWidget_SetVisible_Call {
967+func (_c *MockWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockWidget_SetVisible_Call {
1072968 _c.Run(run)
1073969 return _c
1074970 }
1075971
1076-// Show provides a mock function for the type MockWidget
1077-func (_mock *MockWidget) Show() {
1078- _mock.Called()
1079- return
972+// Show provides a mock function with no fields
973+func (_m *MockWidget) Show() {
974+ _m.Called()
1080975 }
1081976
1082977 // MockWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
@@ -1106,10 +1001,9 @@ func (_c *MockWidget_Show_Call) RunAndReturn(run func()) *MockWidget_Show_Call {
11061001 return _c
11071002 }
11081003
1109-// Unparent provides a mock function for the type MockWidget
1110-func (_mock *MockWidget) Unparent() {
1111- _mock.Called()
1112- return
1004+// Unparent provides a mock function with no fields
1005+func (_m *MockWidget) Unparent() {
1006+ _m.Called()
11131007 }
11141008
11151009 // MockWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent'
@@ -1138,3 +1032,17 @@ func (_c *MockWidget_Unparent_Call) RunAndReturn(run func()) *MockWidget_Unparen
11381032 _c.Run(run)
11391033 return _c
11401034 }
1035+
1036+// 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.
1037+// The first argument is typically a *testing.T value.
1038+func NewMockWidget(t interface {
1039+ mock.TestingT
1040+ Cleanup(func())
1041+}) *MockWidget {
1042+ mock := &MockWidget{}
1043+ mock.Mock.Test(t)
1044+
1045+ t.Cleanup(func() { mock.AssertExpectations(t) })
1046+
1047+ return mock
1048+}
M internal/ui/layout/mocks/mock_widget_factory.go +132 -108
@@ -1,29 +1,14 @@
1-// Code generated by mockery; DO NOT EDIT.
2-// github.com/vektra/mockery
3-// template: testify
1+// Code generated by mockery v2.53.5. DO NOT EDIT.
42
53 package mocks
64
75 import (
8- "github.com/bnema/dumber/internal/ui/layout"
9- "github.com/jwijenbergh/puregotk/v4/gtk"
6+ layout "github.com/bnema/dumber/internal/ui/layout"
7+ gtk "github.com/jwijenbergh/puregotk/v4/gtk"
8+
109 mock "github.com/stretchr/testify/mock"
1110 )
1211
13-// NewMockWidgetFactory creates a new instance of MockWidgetFactory. 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 NewMockWidgetFactory(t interface {
16- mock.TestingT
17- Cleanup(func())
18-}) *MockWidgetFactory {
19- mock := &MockWidgetFactory{}
20- mock.Mock.Test(t)
21-
22- t.Cleanup(func() { mock.AssertExpectations(t) })
23-
24- return mock
25-}
26-
2712 // MockWidgetFactory is an autogenerated mock type for the WidgetFactory type
2813 type MockWidgetFactory struct {
2914 mock.Mock
@@ -37,22 +22,23 @@ func (_m *MockWidgetFactory) EXPECT() *MockWidgetFactory_Expecter {
3722 return &MockWidgetFactory_Expecter{mock: &_m.Mock}
3823 }
3924
40-// NewBox provides a mock function for the type MockWidgetFactory
41-func (_mock *MockWidgetFactory) NewBox(orientation layout.Orientation, spacing int) layout.BoxWidget {
42- ret := _mock.Called(orientation, spacing)
25+// NewBox provides a mock function with given fields: orientation, spacing
26+func (_m *MockWidgetFactory) NewBox(orientation gtk.Orientation, spacing int) layout.BoxWidget {
27+ ret := _m.Called(orientation, spacing)
4328
4429 if len(ret) == 0 {
4530 panic("no return value specified for NewBox")
4631 }
4732
4833 var r0 layout.BoxWidget
49- if returnFunc, ok := ret.Get(0).(func(layout.Orientation, int) layout.BoxWidget); ok {
50- r0 = returnFunc(orientation, spacing)
34+ if rf, ok := ret.Get(0).(func(gtk.Orientation, int) layout.BoxWidget); ok {
35+ r0 = rf(orientation, spacing)
5136 } else {
5237 if ret.Get(0) != nil {
5338 r0 = ret.Get(0).(layout.BoxWidget)
5439 }
5540 }
41+
5642 return r0
5743 }
5844
@@ -62,56 +48,46 @@ type MockWidgetFactory_NewBox_Call struct {
6248 }
6349
6450 // NewBox is a helper method to define mock.On call
65-// - orientation layout.Orientation
51+// - orientation gtk.Orientation
6652 // - spacing int
6753 func (_e *MockWidgetFactory_Expecter) NewBox(orientation interface{}, spacing interface{}) *MockWidgetFactory_NewBox_Call {
6854 return &MockWidgetFactory_NewBox_Call{Call: _e.mock.On("NewBox", orientation, spacing)}
6955 }
7056
71-func (_c *MockWidgetFactory_NewBox_Call) Run(run func(orientation layout.Orientation, spacing int)) *MockWidgetFactory_NewBox_Call {
57+func (_c *MockWidgetFactory_NewBox_Call) Run(run func(orientation gtk.Orientation, spacing int)) *MockWidgetFactory_NewBox_Call {
7258 _c.Call.Run(func(args mock.Arguments) {
73- var arg0 layout.Orientation
74- if args[0] != nil {
75- arg0 = args[0].(layout.Orientation)
76- }
77- var arg1 int
78- if args[1] != nil {
79- arg1 = args[1].(int)
80- }
81- run(
82- arg0,
83- arg1,
84- )
59+ run(args[0].(gtk.Orientation), args[1].(int))
8560 })
8661 return _c
8762 }
8863
89-func (_c *MockWidgetFactory_NewBox_Call) Return(boxWidget layout.BoxWidget) *MockWidgetFactory_NewBox_Call {
90- _c.Call.Return(boxWidget)
64+func (_c *MockWidgetFactory_NewBox_Call) Return(_a0 layout.BoxWidget) *MockWidgetFactory_NewBox_Call {
65+ _c.Call.Return(_a0)
9166 return _c
9267 }
9368
94-func (_c *MockWidgetFactory_NewBox_Call) RunAndReturn(run func(orientation layout.Orientation, spacing int) layout.BoxWidget) *MockWidgetFactory_NewBox_Call {
69+func (_c *MockWidgetFactory_NewBox_Call) RunAndReturn(run func(gtk.Orientation, int) layout.BoxWidget) *MockWidgetFactory_NewBox_Call {
9570 _c.Call.Return(run)
9671 return _c
9772 }
9873
99-// NewButton provides a mock function for the type MockWidgetFactory
100-func (_mock *MockWidgetFactory) NewButton() layout.ButtonWidget {
101- ret := _mock.Called()
74+// NewButton provides a mock function with no fields
75+func (_m *MockWidgetFactory) NewButton() layout.ButtonWidget {
76+ ret := _m.Called()
10277
10378 if len(ret) == 0 {
10479 panic("no return value specified for NewButton")
10580 }
10681
10782 var r0 layout.ButtonWidget
108- if returnFunc, ok := ret.Get(0).(func() layout.ButtonWidget); ok {
109- r0 = returnFunc()
83+ if rf, ok := ret.Get(0).(func() layout.ButtonWidget); ok {
84+ r0 = rf()
11085 } else {
11186 if ret.Get(0) != nil {
11287 r0 = ret.Get(0).(layout.ButtonWidget)
11388 }
11489 }
90+
11591 return r0
11692 }
11793
@@ -132,8 +108,8 @@ func (_c *MockWidgetFactory_NewButton_Call) Run(run func()) *MockWidgetFactory_N
132108 return _c
133109 }
134110
135-func (_c *MockWidgetFactory_NewButton_Call) Return(buttonWidget layout.ButtonWidget) *MockWidgetFactory_NewButton_Call {
136- _c.Call.Return(buttonWidget)
111+func (_c *MockWidgetFactory_NewButton_Call) Return(_a0 layout.ButtonWidget) *MockWidgetFactory_NewButton_Call {
112+ _c.Call.Return(_a0)
137113 return _c
138114 }
139115
@@ -142,22 +118,23 @@ func (_c *MockWidgetFactory_NewButton_Call) RunAndReturn(run func() layout.Butto
142118 return _c
143119 }
144120
145-// NewImage provides a mock function for the type MockWidgetFactory
146-func (_mock *MockWidgetFactory) NewImage() layout.ImageWidget {
147- ret := _mock.Called()
121+// NewImage provides a mock function with no fields
122+func (_m *MockWidgetFactory) NewImage() layout.ImageWidget {
123+ ret := _m.Called()
148124
149125 if len(ret) == 0 {
150126 panic("no return value specified for NewImage")
151127 }
152128
153129 var r0 layout.ImageWidget
154- if returnFunc, ok := ret.Get(0).(func() layout.ImageWidget); ok {
155- r0 = returnFunc()
130+ if rf, ok := ret.Get(0).(func() layout.ImageWidget); ok {
131+ r0 = rf()
156132 } else {
157133 if ret.Get(0) != nil {
158134 r0 = ret.Get(0).(layout.ImageWidget)
159135 }
160136 }
137+
161138 return r0
162139 }
163140
@@ -178,8 +155,8 @@ func (_c *MockWidgetFactory_NewImage_Call) Run(run func()) *MockWidgetFactory_Ne
178155 return _c
179156 }
180157
181-func (_c *MockWidgetFactory_NewImage_Call) Return(imageWidget layout.ImageWidget) *MockWidgetFactory_NewImage_Call {
182- _c.Call.Return(imageWidget)
158+func (_c *MockWidgetFactory_NewImage_Call) Return(_a0 layout.ImageWidget) *MockWidgetFactory_NewImage_Call {
159+ _c.Call.Return(_a0)
183160 return _c
184161 }
185162
@@ -188,22 +165,23 @@ func (_c *MockWidgetFactory_NewImage_Call) RunAndReturn(run func() layout.ImageW
188165 return _c
189166 }
190167
191-// NewLabel provides a mock function for the type MockWidgetFactory
192-func (_mock *MockWidgetFactory) NewLabel(text string) layout.LabelWidget {
193- ret := _mock.Called(text)
168+// NewLabel provides a mock function with given fields: text
169+func (_m *MockWidgetFactory) NewLabel(text string) layout.LabelWidget {
170+ ret := _m.Called(text)
194171
195172 if len(ret) == 0 {
196173 panic("no return value specified for NewLabel")
197174 }
198175
199176 var r0 layout.LabelWidget
200- if returnFunc, ok := ret.Get(0).(func(string) layout.LabelWidget); ok {
201- r0 = returnFunc(text)
177+ if rf, ok := ret.Get(0).(func(string) layout.LabelWidget); ok {
178+ r0 = rf(text)
202179 } else {
203180 if ret.Get(0) != nil {
204181 r0 = ret.Get(0).(layout.LabelWidget)
205182 }
206183 }
184+
207185 return r0
208186 }
209187
@@ -220,43 +198,38 @@ func (_e *MockWidgetFactory_Expecter) NewLabel(text interface{}) *MockWidgetFact
220198
221199 func (_c *MockWidgetFactory_NewLabel_Call) Run(run func(text string)) *MockWidgetFactory_NewLabel_Call {
222200 _c.Call.Run(func(args mock.Arguments) {
223- var arg0 string
224- if args[0] != nil {
225- arg0 = args[0].(string)
226- }
227- run(
228- arg0,
229- )
201+ run(args[0].(string))
230202 })
231203 return _c
232204 }
233205
234-func (_c *MockWidgetFactory_NewLabel_Call) Return(labelWidget layout.LabelWidget) *MockWidgetFactory_NewLabel_Call {
235- _c.Call.Return(labelWidget)
206+func (_c *MockWidgetFactory_NewLabel_Call) Return(_a0 layout.LabelWidget) *MockWidgetFactory_NewLabel_Call {
207+ _c.Call.Return(_a0)
236208 return _c
237209 }
238210
239-func (_c *MockWidgetFactory_NewLabel_Call) RunAndReturn(run func(text string) layout.LabelWidget) *MockWidgetFactory_NewLabel_Call {
211+func (_c *MockWidgetFactory_NewLabel_Call) RunAndReturn(run func(string) layout.LabelWidget) *MockWidgetFactory_NewLabel_Call {
240212 _c.Call.Return(run)
241213 return _c
242214 }
243215
244-// NewOverlay provides a mock function for the type MockWidgetFactory
245-func (_mock *MockWidgetFactory) NewOverlay() layout.OverlayWidget {
246- ret := _mock.Called()
216+// NewOverlay provides a mock function with no fields
217+func (_m *MockWidgetFactory) NewOverlay() layout.OverlayWidget {
218+ ret := _m.Called()
247219
248220 if len(ret) == 0 {
249221 panic("no return value specified for NewOverlay")
250222 }
251223
252224 var r0 layout.OverlayWidget
253- if returnFunc, ok := ret.Get(0).(func() layout.OverlayWidget); ok {
254- r0 = returnFunc()
225+ if rf, ok := ret.Get(0).(func() layout.OverlayWidget); ok {
226+ r0 = rf()
255227 } else {
256228 if ret.Get(0) != nil {
257229 r0 = ret.Get(0).(layout.OverlayWidget)
258230 }
259231 }
232+
260233 return r0
261234 }
262235
@@ -277,8 +250,8 @@ func (_c *MockWidgetFactory_NewOverlay_Call) Run(run func()) *MockWidgetFactory_
277250 return _c
278251 }
279252
280-func (_c *MockWidgetFactory_NewOverlay_Call) Return(overlayWidget layout.OverlayWidget) *MockWidgetFactory_NewOverlay_Call {
281- _c.Call.Return(overlayWidget)
253+func (_c *MockWidgetFactory_NewOverlay_Call) Return(_a0 layout.OverlayWidget) *MockWidgetFactory_NewOverlay_Call {
254+ _c.Call.Return(_a0)
282255 return _c
283256 }
284257
@@ -287,22 +260,23 @@ func (_c *MockWidgetFactory_NewOverlay_Call) RunAndReturn(run func() layout.Over
287260 return _c
288261 }
289262
290-// NewPaned provides a mock function for the type MockWidgetFactory
291-func (_mock *MockWidgetFactory) NewPaned(orientation layout.Orientation) layout.PanedWidget {
292- ret := _mock.Called(orientation)
263+// NewPaned provides a mock function with given fields: orientation
264+func (_m *MockWidgetFactory) NewPaned(orientation gtk.Orientation) layout.PanedWidget {
265+ ret := _m.Called(orientation)
293266
294267 if len(ret) == 0 {
295268 panic("no return value specified for NewPaned")
296269 }
297270
298271 var r0 layout.PanedWidget
299- if returnFunc, ok := ret.Get(0).(func(layout.Orientation) layout.PanedWidget); ok {
300- r0 = returnFunc(orientation)
272+ if rf, ok := ret.Get(0).(func(gtk.Orientation) layout.PanedWidget); ok {
273+ r0 = rf(orientation)
301274 } else {
302275 if ret.Get(0) != nil {
303276 r0 = ret.Get(0).(layout.PanedWidget)
304277 }
305278 }
279+
306280 return r0
307281 }
308282
@@ -312,50 +286,92 @@ type MockWidgetFactory_NewPaned_Call struct {
312286 }
313287
314288 // NewPaned is a helper method to define mock.On call
315-// - orientation layout.Orientation
289+// - orientation gtk.Orientation
316290 func (_e *MockWidgetFactory_Expecter) NewPaned(orientation interface{}) *MockWidgetFactory_NewPaned_Call {
317291 return &MockWidgetFactory_NewPaned_Call{Call: _e.mock.On("NewPaned", orientation)}
318292 }
319293
320-func (_c *MockWidgetFactory_NewPaned_Call) Run(run func(orientation layout.Orientation)) *MockWidgetFactory_NewPaned_Call {
294+func (_c *MockWidgetFactory_NewPaned_Call) Run(run func(orientation gtk.Orientation)) *MockWidgetFactory_NewPaned_Call {
321295 _c.Call.Run(func(args mock.Arguments) {
322- var arg0 layout.Orientation
323- if args[0] != nil {
324- arg0 = args[0].(layout.Orientation)
296+ run(args[0].(gtk.Orientation))
297+ })
298+ return _c
299+}
300+
301+func (_c *MockWidgetFactory_NewPaned_Call) Return(_a0 layout.PanedWidget) *MockWidgetFactory_NewPaned_Call {
302+ _c.Call.Return(_a0)
303+ return _c
304+}
305+
306+func (_c *MockWidgetFactory_NewPaned_Call) RunAndReturn(run func(gtk.Orientation) layout.PanedWidget) *MockWidgetFactory_NewPaned_Call {
307+ _c.Call.Return(run)
308+ return _c
309+}
310+
311+// NewProgressBar provides a mock function with no fields
312+func (_m *MockWidgetFactory) NewProgressBar() layout.ProgressBarWidget {
313+ ret := _m.Called()
314+
315+ if len(ret) == 0 {
316+ panic("no return value specified for NewProgressBar")
317+ }
318+
319+ var r0 layout.ProgressBarWidget
320+ if rf, ok := ret.Get(0).(func() layout.ProgressBarWidget); ok {
321+ r0 = rf()
322+ } else {
323+ if ret.Get(0) != nil {
324+ r0 = ret.Get(0).(layout.ProgressBarWidget)
325325 }
326- run(
327- arg0,
328- )
326+ }
327+
328+ return r0
329+}
330+
331+// MockWidgetFactory_NewProgressBar_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewProgressBar'
332+type MockWidgetFactory_NewProgressBar_Call struct {
333+ *mock.Call
334+}
335+
336+// NewProgressBar is a helper method to define mock.On call
337+func (_e *MockWidgetFactory_Expecter) NewProgressBar() *MockWidgetFactory_NewProgressBar_Call {
338+ return &MockWidgetFactory_NewProgressBar_Call{Call: _e.mock.On("NewProgressBar")}
339+}
340+
341+func (_c *MockWidgetFactory_NewProgressBar_Call) Run(run func()) *MockWidgetFactory_NewProgressBar_Call {
342+ _c.Call.Run(func(args mock.Arguments) {
343+ run()
329344 })
330345 return _c
331346 }
332347
333-func (_c *MockWidgetFactory_NewPaned_Call) Return(panedWidget layout.PanedWidget) *MockWidgetFactory_NewPaned_Call {
334- _c.Call.Return(panedWidget)
348+func (_c *MockWidgetFactory_NewProgressBar_Call) Return(_a0 layout.ProgressBarWidget) *MockWidgetFactory_NewProgressBar_Call {
349+ _c.Call.Return(_a0)
335350 return _c
336351 }
337352
338-func (_c *MockWidgetFactory_NewPaned_Call) RunAndReturn(run func(orientation layout.Orientation) layout.PanedWidget) *MockWidgetFactory_NewPaned_Call {
353+func (_c *MockWidgetFactory_NewProgressBar_Call) RunAndReturn(run func() layout.ProgressBarWidget) *MockWidgetFactory_NewProgressBar_Call {
339354 _c.Call.Return(run)
340355 return _c
341356 }
342357
343-// WrapWidget provides a mock function for the type MockWidgetFactory
344-func (_mock *MockWidgetFactory) WrapWidget(w *gtk.Widget) layout.Widget {
345- ret := _mock.Called(w)
358+// WrapWidget provides a mock function with given fields: w
359+func (_m *MockWidgetFactory) WrapWidget(w *gtk.Widget) layout.Widget {
360+ ret := _m.Called(w)
346361
347362 if len(ret) == 0 {
348363 panic("no return value specified for WrapWidget")
349364 }
350365
351366 var r0 layout.Widget
352- if returnFunc, ok := ret.Get(0).(func(*gtk.Widget) layout.Widget); ok {
353- r0 = returnFunc(w)
367+ if rf, ok := ret.Get(0).(func(*gtk.Widget) layout.Widget); ok {
368+ r0 = rf(w)
354369 } else {
355370 if ret.Get(0) != nil {
356371 r0 = ret.Get(0).(layout.Widget)
357372 }
358373 }
374+
359375 return r0
360376 }
361377
@@ -372,23 +388,31 @@ func (_e *MockWidgetFactory_Expecter) WrapWidget(w interface{}) *MockWidgetFacto
372388
373389 func (_c *MockWidgetFactory_WrapWidget_Call) Run(run func(w *gtk.Widget)) *MockWidgetFactory_WrapWidget_Call {
374390 _c.Call.Run(func(args mock.Arguments) {
375- var arg0 *gtk.Widget
376- if args[0] != nil {
377- arg0 = args[0].(*gtk.Widget)
378- }
379- run(
380- arg0,
381- )
391+ run(args[0].(*gtk.Widget))
382392 })
383393 return _c
384394 }
385395
386-func (_c *MockWidgetFactory_WrapWidget_Call) Return(widget layout.Widget) *MockWidgetFactory_WrapWidget_Call {
387- _c.Call.Return(widget)
396+func (_c *MockWidgetFactory_WrapWidget_Call) Return(_a0 layout.Widget) *MockWidgetFactory_WrapWidget_Call {
397+ _c.Call.Return(_a0)
388398 return _c
389399 }
390400
391-func (_c *MockWidgetFactory_WrapWidget_Call) RunAndReturn(run func(w *gtk.Widget) layout.Widget) *MockWidgetFactory_WrapWidget_Call {
401+func (_c *MockWidgetFactory_WrapWidget_Call) RunAndReturn(run func(*gtk.Widget) layout.Widget) *MockWidgetFactory_WrapWidget_Call {
392402 _c.Call.Return(run)
393403 return _c
394404 }
405+
406+// NewMockWidgetFactory creates a new instance of MockWidgetFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
407+// The first argument is typically a *testing.T value.
408+func NewMockWidgetFactory(t interface {
409+ mock.TestingT
410+ Cleanup(func())
411+}) *MockWidgetFactory {
412+ mock := &MockWidgetFactory{}
413+ mock.Mock.Test(t)
414+
415+ t.Cleanup(func() { mock.AssertExpectations(t) })
416+
417+ return mock
418+}

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