chore(mockery): split generated mocks by source file
- commit
- 94cc600f25c33b702cb7b1d7c8598bc0a288500f
- author
- brice · · 2026-06-23 14:53 UTC
- committer
- brice · · 2026-06-23 20:01 UTC
- parent
- 3a44e8a
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
54 files · +21873 -21353
M .mockery.yaml +6 -7
| @@ -5,7 +5,7 @@ packages: | |||||
| 5 | github.com/bnema/dumber/internal/application/port: | 5 | github.com/bnema/dumber/internal/application/port: | ||
| 6 | config: | 6 | config: | ||
| 7 | dir: '{{.InterfaceDir}}/mocks' | 7 | dir: '{{.InterfaceDir}}/mocks' | ||
| 8 | - | filename: mocks.go | 8 | + | filename: '{{ .InterfaceFile | base }}' |
| 9 | pkgname: mocks | 9 | pkgname: mocks | ||
| 10 | interfaces: | 10 | interfaces: | ||
| 11 | ConfigMigrator: {} | 11 | ConfigMigrator: {} | ||
| @@ -75,9 +75,8 @@ packages: | |||||
| 75 | NativeWidgetProvider: {} | 75 | NativeWidgetProvider: {} | ||
| 76 | Notification: {} | 76 | Notification: {} | ||
| 77 | RenderingEnvManager: {} | 77 | RenderingEnvManager: {} | ||
| 78 | - | RuntimeConfigProvider: | 78 | + | FaviconResolver: {} |
| 79 | - | config: | 79 | + | RuntimeConfigProvider: {} |
| 80 | - | filename: runtime_config_provider.go | |||
| 81 | RuntimeVersionProbe: {} | 80 | RuntimeVersionProbe: {} | ||
| 82 | ScriptRefresher: {} | 81 | ScriptRefresher: {} | ||
| 83 | SnapshotService: {} | 82 | SnapshotService: {} | ||
| @@ -98,7 +97,7 @@ packages: | |||||
| 98 | github.com/bnema/dumber/internal/domain/repository: | 97 | github.com/bnema/dumber/internal/domain/repository: | ||
| 99 | config: | 98 | config: | ||
| 100 | dir: '{{.InterfaceDir}}/mocks' | 99 | dir: '{{.InterfaceDir}}/mocks' | ||
| 101 | - | filename: mocks.go | 100 | + | filename: '{{ .InterfaceFile | base }}' |
| 102 | pkgname: mocks | 101 | pkgname: mocks | ||
| 103 | interfaces: | 102 | interfaces: | ||
| 104 | ContentWhitelistRepository: {} | 103 | ContentWhitelistRepository: {} | ||
| @@ -112,7 +111,7 @@ packages: | |||||
| 112 | github.com/bnema/dumber/internal/infrastructure/filtering: | 111 | github.com/bnema/dumber/internal/infrastructure/filtering: | ||
| 113 | config: | 112 | config: | ||
| 114 | dir: '{{.InterfaceDir}}/mocks' | 113 | dir: '{{.InterfaceDir}}/mocks' | ||
| 115 | - | filename: mocks.go | 114 | + | filename: '{{ .InterfaceFile | base }}' |
| 116 | pkgname: mocks | 115 | pkgname: mocks | ||
| 117 | interfaces: | 116 | interfaces: | ||
| 118 | FilterDownloader: {} | 117 | FilterDownloader: {} | ||
| @@ -120,7 +119,7 @@ packages: | |||||
| 120 | github.com/bnema/dumber/internal/ui/layout: | 119 | github.com/bnema/dumber/internal/ui/layout: | ||
| 121 | config: | 120 | config: | ||
| 122 | dir: '{{.InterfaceDir}}/mocks' | 121 | dir: '{{.InterfaceDir}}/mocks' | ||
| 123 | - | filename: mocks.go | 122 | + | filename: '{{ .InterfaceFile | base }}' |
| 124 | pkgname: mocks | 123 | pkgname: mocks | ||
| 125 | interfaces: | 124 | interfaces: | ||
| 126 | BoxWidget: {} | 125 | BoxWidget: {} | ||
A internal/application/port/mocks/accent_picker.go +165 -0
| @@ -0,0 +1,165 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | mock "github.com/stretchr/testify/mock" | |||
| 9 | + | ) | |||
| 10 | + | ||||
| 11 | + | // NewMockAccentPickerUI creates a new instance of MockAccentPickerUI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 12 | + | // The first argument is typically a *testing.T value. | |||
| 13 | + | func NewMockAccentPickerUI(t interface { | |||
| 14 | + | mock.TestingT | |||
| 15 | + | Cleanup(func()) | |||
| 16 | + | }) *MockAccentPickerUI { | |||
| 17 | + | mock := &MockAccentPickerUI{} | |||
| 18 | + | mock.Mock.Test(t) | |||
| 19 | + | ||||
| 20 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 21 | + | ||||
| 22 | + | return mock | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | // MockAccentPickerUI is an autogenerated mock type for the AccentPickerUI type | |||
| 26 | + | type MockAccentPickerUI struct { | |||
| 27 | + | mock.Mock | |||
| 28 | + | } | |||
| 29 | + | ||||
| 30 | + | type MockAccentPickerUI_Expecter struct { | |||
| 31 | + | mock *mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | func (_m *MockAccentPickerUI) EXPECT() *MockAccentPickerUI_Expecter { | |||
| 35 | + | return &MockAccentPickerUI_Expecter{mock: &_m.Mock} | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | // Hide provides a mock function for the type MockAccentPickerUI | |||
| 39 | + | func (_mock *MockAccentPickerUI) Hide() { | |||
| 40 | + | _mock.Called() | |||
| 41 | + | return | |||
| 42 | + | } | |||
| 43 | + | ||||
| 44 | + | // MockAccentPickerUI_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |||
| 45 | + | type MockAccentPickerUI_Hide_Call struct { | |||
| 46 | + | *mock.Call | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | // Hide is a helper method to define mock.On call | |||
| 50 | + | func (_e *MockAccentPickerUI_Expecter) Hide() *MockAccentPickerUI_Hide_Call { | |||
| 51 | + | return &MockAccentPickerUI_Hide_Call{Call: _e.mock.On("Hide")} | |||
| 52 | + | } | |||
| 53 | + | ||||
| 54 | + | func (_c *MockAccentPickerUI_Hide_Call) Run(run func()) *MockAccentPickerUI_Hide_Call { | |||
| 55 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 56 | + | run() | |||
| 57 | + | }) | |||
| 58 | + | return _c | |||
| 59 | + | } | |||
| 60 | + | ||||
| 61 | + | func (_c *MockAccentPickerUI_Hide_Call) Return() *MockAccentPickerUI_Hide_Call { | |||
| 62 | + | _c.Call.Return() | |||
| 63 | + | return _c | |||
| 64 | + | } | |||
| 65 | + | ||||
| 66 | + | func (_c *MockAccentPickerUI_Hide_Call) RunAndReturn(run func()) *MockAccentPickerUI_Hide_Call { | |||
| 67 | + | _c.Run(run) | |||
| 68 | + | return _c | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | // IsVisible provides a mock function for the type MockAccentPickerUI | |||
| 72 | + | func (_mock *MockAccentPickerUI) IsVisible() bool { | |||
| 73 | + | ret := _mock.Called() | |||
| 74 | + | ||||
| 75 | + | if len(ret) == 0 { | |||
| 76 | + | panic("no return value specified for IsVisible") | |||
| 77 | + | } | |||
| 78 | + | ||||
| 79 | + | var r0 bool | |||
| 80 | + | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |||
| 81 | + | r0 = returnFunc() | |||
| 82 | + | } else { | |||
| 83 | + | r0 = ret.Get(0).(bool) | |||
| 84 | + | } | |||
| 85 | + | return r0 | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | // MockAccentPickerUI_IsVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsVisible' | |||
| 89 | + | type MockAccentPickerUI_IsVisible_Call struct { | |||
| 90 | + | *mock.Call | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | // IsVisible is a helper method to define mock.On call | |||
| 94 | + | func (_e *MockAccentPickerUI_Expecter) IsVisible() *MockAccentPickerUI_IsVisible_Call { | |||
| 95 | + | return &MockAccentPickerUI_IsVisible_Call{Call: _e.mock.On("IsVisible")} | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | func (_c *MockAccentPickerUI_IsVisible_Call) Run(run func()) *MockAccentPickerUI_IsVisible_Call { | |||
| 99 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 100 | + | run() | |||
| 101 | + | }) | |||
| 102 | + | return _c | |||
| 103 | + | } | |||
| 104 | + | ||||
| 105 | + | func (_c *MockAccentPickerUI_IsVisible_Call) Return(b bool) *MockAccentPickerUI_IsVisible_Call { | |||
| 106 | + | _c.Call.Return(b) | |||
| 107 | + | return _c | |||
| 108 | + | } | |||
| 109 | + | ||||
| 110 | + | func (_c *MockAccentPickerUI_IsVisible_Call) RunAndReturn(run func() bool) *MockAccentPickerUI_IsVisible_Call { | |||
| 111 | + | _c.Call.Return(run) | |||
| 112 | + | return _c | |||
| 113 | + | } | |||
| 114 | + | ||||
| 115 | + | // Show provides a mock function for the type MockAccentPickerUI | |||
| 116 | + | func (_mock *MockAccentPickerUI) Show(accents []rune, selectedCallback func(accent rune), cancelCallback func()) { | |||
| 117 | + | _mock.Called(accents, selectedCallback, cancelCallback) | |||
| 118 | + | return | |||
| 119 | + | } | |||
| 120 | + | ||||
| 121 | + | // MockAccentPickerUI_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |||
| 122 | + | type MockAccentPickerUI_Show_Call struct { | |||
| 123 | + | *mock.Call | |||
| 124 | + | } | |||
| 125 | + | ||||
| 126 | + | // Show is a helper method to define mock.On call | |||
| 127 | + | // - accents []rune | |||
| 128 | + | // - selectedCallback func(accent rune) | |||
| 129 | + | // - cancelCallback func() | |||
| 130 | + | func (_e *MockAccentPickerUI_Expecter) Show(accents any, selectedCallback any, cancelCallback any) *MockAccentPickerUI_Show_Call { | |||
| 131 | + | return &MockAccentPickerUI_Show_Call{Call: _e.mock.On("Show", accents, selectedCallback, cancelCallback)} | |||
| 132 | + | } | |||
| 133 | + | ||||
| 134 | + | func (_c *MockAccentPickerUI_Show_Call) Run(run func(accents []rune, selectedCallback func(accent rune), cancelCallback func())) *MockAccentPickerUI_Show_Call { | |||
| 135 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 136 | + | var arg0 []rune | |||
| 137 | + | if args[0] != nil { | |||
| 138 | + | arg0 = args[0].([]rune) | |||
| 139 | + | } | |||
| 140 | + | var arg1 func(accent rune) | |||
| 141 | + | if args[1] != nil { | |||
| 142 | + | arg1 = args[1].(func(accent rune)) | |||
| 143 | + | } | |||
| 144 | + | var arg2 func() | |||
| 145 | + | if args[2] != nil { | |||
| 146 | + | arg2 = args[2].(func()) | |||
| 147 | + | } | |||
| 148 | + | run( | |||
| 149 | + | arg0, | |||
| 150 | + | arg1, | |||
| 151 | + | arg2, | |||
| 152 | + | ) | |||
| 153 | + | }) | |||
| 154 | + | return _c | |||
| 155 | + | } | |||
| 156 | + | ||||
| 157 | + | func (_c *MockAccentPickerUI_Show_Call) Return() *MockAccentPickerUI_Show_Call { | |||
| 158 | + | _c.Call.Return() | |||
| 159 | + | return _c | |||
| 160 | + | } | |||
| 161 | + | ||||
| 162 | + | func (_c *MockAccentPickerUI_Show_Call) RunAndReturn(run func(accents []rune, selectedCallback func(accent rune), cancelCallback func())) *MockAccentPickerUI_Show_Call { | |||
| 163 | + | _c.Run(run) | |||
| 164 | + | return _c | |||
| 165 | + | } | |||
A internal/application/port/mocks/browser_launch.go +258 -0
| @@ -0,0 +1,258 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | "io" | |||
| 10 | + | ||||
| 11 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockBrowserWindowOpener creates a new instance of MockBrowserWindowOpener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockBrowserWindowOpener(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockBrowserWindowOpener { | |||
| 21 | + | mock := &MockBrowserWindowOpener{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockBrowserWindowOpener is an autogenerated mock type for the BrowserWindowOpener type | |||
| 30 | + | type MockBrowserWindowOpener struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockBrowserWindowOpener_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockBrowserWindowOpener) EXPECT() *MockBrowserWindowOpener_Expecter { | |||
| 39 | + | return &MockBrowserWindowOpener_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // OpenFreshWindow provides a mock function for the type MockBrowserWindowOpener | |||
| 43 | + | func (_mock *MockBrowserWindowOpener) OpenFreshWindow(ctx context.Context, url string) error { | |||
| 44 | + | ret := _mock.Called(ctx, url) | |||
| 45 | + | ||||
| 46 | + | if len(ret) == 0 { | |||
| 47 | + | panic("no return value specified for OpenFreshWindow") | |||
| 48 | + | } | |||
| 49 | + | ||||
| 50 | + | var r0 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 52 | + | r0 = returnFunc(ctx, url) | |||
| 53 | + | } else { | |||
| 54 | + | r0 = ret.Error(0) | |||
| 55 | + | } | |||
| 56 | + | return r0 | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | // MockBrowserWindowOpener_OpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFreshWindow' | |||
| 60 | + | type MockBrowserWindowOpener_OpenFreshWindow_Call struct { | |||
| 61 | + | *mock.Call | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | // OpenFreshWindow is a helper method to define mock.On call | |||
| 65 | + | // - ctx context.Context | |||
| 66 | + | // - url string | |||
| 67 | + | func (_e *MockBrowserWindowOpener_Expecter) OpenFreshWindow(ctx any, url any) *MockBrowserWindowOpener_OpenFreshWindow_Call { | |||
| 68 | + | return &MockBrowserWindowOpener_OpenFreshWindow_Call{Call: _e.mock.On("OpenFreshWindow", ctx, url)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserWindowOpener_OpenFreshWindow_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | var arg1 string | |||
| 78 | + | if args[1] != nil { | |||
| 79 | + | arg1 = args[1].(string) | |||
| 80 | + | } | |||
| 81 | + | run( | |||
| 82 | + | arg0, | |||
| 83 | + | arg1, | |||
| 84 | + | ) | |||
| 85 | + | }) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) Return(err error) *MockBrowserWindowOpener_OpenFreshWindow_Call { | |||
| 90 | + | _c.Call.Return(err) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | func (_c *MockBrowserWindowOpener_OpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockBrowserWindowOpener_OpenFreshWindow_Call { | |||
| 95 | + | _c.Call.Return(run) | |||
| 96 | + | return _c | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | // NewMockBrowserLaunchRelay creates a new instance of MockBrowserLaunchRelay. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 100 | + | // The first argument is typically a *testing.T value. | |||
| 101 | + | func NewMockBrowserLaunchRelay(t interface { | |||
| 102 | + | mock.TestingT | |||
| 103 | + | Cleanup(func()) | |||
| 104 | + | }) *MockBrowserLaunchRelay { | |||
| 105 | + | mock := &MockBrowserLaunchRelay{} | |||
| 106 | + | mock.Mock.Test(t) | |||
| 107 | + | ||||
| 108 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 109 | + | ||||
| 110 | + | return mock | |||
| 111 | + | } | |||
| 112 | + | ||||
| 113 | + | // MockBrowserLaunchRelay is an autogenerated mock type for the BrowserLaunchRelay type | |||
| 114 | + | type MockBrowserLaunchRelay struct { | |||
| 115 | + | mock.Mock | |||
| 116 | + | } | |||
| 117 | + | ||||
| 118 | + | type MockBrowserLaunchRelay_Expecter struct { | |||
| 119 | + | mock *mock.Mock | |||
| 120 | + | } | |||
| 121 | + | ||||
| 122 | + | func (_m *MockBrowserLaunchRelay) EXPECT() *MockBrowserLaunchRelay_Expecter { | |||
| 123 | + | return &MockBrowserLaunchRelay_Expecter{mock: &_m.Mock} | |||
| 124 | + | } | |||
| 125 | + | ||||
| 126 | + | // DeliverOpenFreshWindow provides a mock function for the type MockBrowserLaunchRelay | |||
| 127 | + | func (_mock *MockBrowserLaunchRelay) DeliverOpenFreshWindow(ctx context.Context, url string) (bool, error) { | |||
| 128 | + | ret := _mock.Called(ctx, url) | |||
| 129 | + | ||||
| 130 | + | if len(ret) == 0 { | |||
| 131 | + | panic("no return value specified for DeliverOpenFreshWindow") | |||
| 132 | + | } | |||
| 133 | + | ||||
| 134 | + | var r0 bool | |||
| 135 | + | var r1 error | |||
| 136 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { | |||
| 137 | + | return returnFunc(ctx, url) | |||
| 138 | + | } | |||
| 139 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { | |||
| 140 | + | r0 = returnFunc(ctx, url) | |||
| 141 | + | } else { | |||
| 142 | + | r0 = ret.Get(0).(bool) | |||
| 143 | + | } | |||
| 144 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 145 | + | r1 = returnFunc(ctx, url) | |||
| 146 | + | } else { | |||
| 147 | + | r1 = ret.Error(1) | |||
| 148 | + | } | |||
| 149 | + | return r0, r1 | |||
| 150 | + | } | |||
| 151 | + | ||||
| 152 | + | // MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeliverOpenFreshWindow' | |||
| 153 | + | type MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call struct { | |||
| 154 | + | *mock.Call | |||
| 155 | + | } | |||
| 156 | + | ||||
| 157 | + | // DeliverOpenFreshWindow is a helper method to define mock.On call | |||
| 158 | + | // - ctx context.Context | |||
| 159 | + | // - url string | |||
| 160 | + | func (_e *MockBrowserLaunchRelay_Expecter) DeliverOpenFreshWindow(ctx any, url any) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { | |||
| 161 | + | return &MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call{Call: _e.mock.On("DeliverOpenFreshWindow", ctx, url)} | |||
| 162 | + | } | |||
| 163 | + | ||||
| 164 | + | func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Run(run func(ctx context.Context, url string)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { | |||
| 165 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 166 | + | var arg0 context.Context | |||
| 167 | + | if args[0] != nil { | |||
| 168 | + | arg0 = args[0].(context.Context) | |||
| 169 | + | } | |||
| 170 | + | var arg1 string | |||
| 171 | + | if args[1] != nil { | |||
| 172 | + | arg1 = args[1].(string) | |||
| 173 | + | } | |||
| 174 | + | run( | |||
| 175 | + | arg0, | |||
| 176 | + | arg1, | |||
| 177 | + | ) | |||
| 178 | + | }) | |||
| 179 | + | return _c | |||
| 180 | + | } | |||
| 181 | + | ||||
| 182 | + | func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) Return(b bool, err error) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { | |||
| 183 | + | _c.Call.Return(b, err) | |||
| 184 | + | return _c | |||
| 185 | + | } | |||
| 186 | + | ||||
| 187 | + | func (_c *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call) RunAndReturn(run func(ctx context.Context, url string) (bool, error)) *MockBrowserLaunchRelay_DeliverOpenFreshWindow_Call { | |||
| 188 | + | _c.Call.Return(run) | |||
| 189 | + | return _c | |||
| 190 | + | } | |||
| 191 | + | ||||
| 192 | + | // Listen provides a mock function for the type MockBrowserLaunchRelay | |||
| 193 | + | func (_mock *MockBrowserLaunchRelay) Listen(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error) { | |||
| 194 | + | ret := _mock.Called(ctx, opener) | |||
| 195 | + | ||||
| 196 | + | if len(ret) == 0 { | |||
| 197 | + | panic("no return value specified for Listen") | |||
| 198 | + | } | |||
| 199 | + | ||||
| 200 | + | var r0 io.Closer | |||
| 201 | + | var r1 error | |||
| 202 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) (io.Closer, error)); ok { | |||
| 203 | + | return returnFunc(ctx, opener) | |||
| 204 | + | } | |||
| 205 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.BrowserWindowOpener) io.Closer); ok { | |||
| 206 | + | r0 = returnFunc(ctx, opener) | |||
| 207 | + | } else { | |||
| 208 | + | if ret.Get(0) != nil { | |||
| 209 | + | r0 = ret.Get(0).(io.Closer) | |||
| 210 | + | } | |||
| 211 | + | } | |||
| 212 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, port.BrowserWindowOpener) error); ok { | |||
| 213 | + | r1 = returnFunc(ctx, opener) | |||
| 214 | + | } else { | |||
| 215 | + | r1 = ret.Error(1) | |||
| 216 | + | } | |||
| 217 | + | return r0, r1 | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | // MockBrowserLaunchRelay_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen' | |||
| 221 | + | type MockBrowserLaunchRelay_Listen_Call struct { | |||
| 222 | + | *mock.Call | |||
| 223 | + | } | |||
| 224 | + | ||||
| 225 | + | // Listen is a helper method to define mock.On call | |||
| 226 | + | // - ctx context.Context | |||
| 227 | + | // - opener port.BrowserWindowOpener | |||
| 228 | + | func (_e *MockBrowserLaunchRelay_Expecter) Listen(ctx any, opener any) *MockBrowserLaunchRelay_Listen_Call { | |||
| 229 | + | return &MockBrowserLaunchRelay_Listen_Call{Call: _e.mock.On("Listen", ctx, opener)} | |||
| 230 | + | } | |||
| 231 | + | ||||
| 232 | + | func (_c *MockBrowserLaunchRelay_Listen_Call) Run(run func(ctx context.Context, opener port.BrowserWindowOpener)) *MockBrowserLaunchRelay_Listen_Call { | |||
| 233 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 234 | + | var arg0 context.Context | |||
| 235 | + | if args[0] != nil { | |||
| 236 | + | arg0 = args[0].(context.Context) | |||
| 237 | + | } | |||
| 238 | + | var arg1 port.BrowserWindowOpener | |||
| 239 | + | if args[1] != nil { | |||
| 240 | + | arg1 = args[1].(port.BrowserWindowOpener) | |||
| 241 | + | } | |||
| 242 | + | run( | |||
| 243 | + | arg0, | |||
| 244 | + | arg1, | |||
| 245 | + | ) | |||
| 246 | + | }) | |||
| 247 | + | return _c | |||
| 248 | + | } | |||
| 249 | + | ||||
| 250 | + | func (_c *MockBrowserLaunchRelay_Listen_Call) Return(closer io.Closer, err error) *MockBrowserLaunchRelay_Listen_Call { | |||
| 251 | + | _c.Call.Return(closer, err) | |||
| 252 | + | return _c | |||
| 253 | + | } | |||
| 254 | + | ||||
| 255 | + | func (_c *MockBrowserLaunchRelay_Listen_Call) RunAndReturn(run func(ctx context.Context, opener port.BrowserWindowOpener) (io.Closer, error)) *MockBrowserLaunchRelay_Listen_Call { | |||
| 256 | + | _c.Call.Return(run) | |||
| 257 | + | return _c | |||
| 258 | + | } | |||
A internal/application/port/mocks/clipboard.go +324 -0
| @@ -0,0 +1,324 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockClipboard creates a new instance of MockClipboard. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockClipboard(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockClipboard { | |||
| 20 | + | mock := &MockClipboard{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockClipboard is an autogenerated mock type for the Clipboard type | |||
| 29 | + | type MockClipboard struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockClipboard_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockClipboard) EXPECT() *MockClipboard_Expecter { | |||
| 38 | + | return &MockClipboard_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Clear provides a mock function for the type MockClipboard | |||
| 42 | + | func (_mock *MockClipboard) Clear(ctx context.Context) error { | |||
| 43 | + | ret := _mock.Called(ctx) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Clear") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockClipboard_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear' | |||
| 59 | + | type MockClipboard_Clear_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // Clear is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | func (_e *MockClipboard_Expecter) Clear(ctx any) *MockClipboard_Clear_Call { | |||
| 66 | + | return &MockClipboard_Clear_Call{Call: _e.mock.On("Clear", ctx)} | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | func (_c *MockClipboard_Clear_Call) Run(run func(ctx context.Context)) *MockClipboard_Clear_Call { | |||
| 70 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 71 | + | var arg0 context.Context | |||
| 72 | + | if args[0] != nil { | |||
| 73 | + | arg0 = args[0].(context.Context) | |||
| 74 | + | } | |||
| 75 | + | run( | |||
| 76 | + | arg0, | |||
| 77 | + | ) | |||
| 78 | + | }) | |||
| 79 | + | return _c | |||
| 80 | + | } | |||
| 81 | + | ||||
| 82 | + | func (_c *MockClipboard_Clear_Call) Return(err error) *MockClipboard_Clear_Call { | |||
| 83 | + | _c.Call.Return(err) | |||
| 84 | + | return _c | |||
| 85 | + | } | |||
| 86 | + | ||||
| 87 | + | func (_c *MockClipboard_Clear_Call) RunAndReturn(run func(ctx context.Context) error) *MockClipboard_Clear_Call { | |||
| 88 | + | _c.Call.Return(run) | |||
| 89 | + | return _c | |||
| 90 | + | } | |||
| 91 | + | ||||
| 92 | + | // HasText provides a mock function for the type MockClipboard | |||
| 93 | + | func (_mock *MockClipboard) HasText(ctx context.Context) (bool, error) { | |||
| 94 | + | ret := _mock.Called(ctx) | |||
| 95 | + | ||||
| 96 | + | if len(ret) == 0 { | |||
| 97 | + | panic("no return value specified for HasText") | |||
| 98 | + | } | |||
| 99 | + | ||||
| 100 | + | var r0 bool | |||
| 101 | + | var r1 error | |||
| 102 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (bool, error)); ok { | |||
| 103 | + | return returnFunc(ctx) | |||
| 104 | + | } | |||
| 105 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok { | |||
| 106 | + | r0 = returnFunc(ctx) | |||
| 107 | + | } else { | |||
| 108 | + | r0 = ret.Get(0).(bool) | |||
| 109 | + | } | |||
| 110 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 111 | + | r1 = returnFunc(ctx) | |||
| 112 | + | } else { | |||
| 113 | + | r1 = ret.Error(1) | |||
| 114 | + | } | |||
| 115 | + | return r0, r1 | |||
| 116 | + | } | |||
| 117 | + | ||||
| 118 | + | // MockClipboard_HasText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasText' | |||
| 119 | + | type MockClipboard_HasText_Call struct { | |||
| 120 | + | *mock.Call | |||
| 121 | + | } | |||
| 122 | + | ||||
| 123 | + | // HasText is a helper method to define mock.On call | |||
| 124 | + | // - ctx context.Context | |||
| 125 | + | func (_e *MockClipboard_Expecter) HasText(ctx any) *MockClipboard_HasText_Call { | |||
| 126 | + | return &MockClipboard_HasText_Call{Call: _e.mock.On("HasText", ctx)} | |||
| 127 | + | } | |||
| 128 | + | ||||
| 129 | + | func (_c *MockClipboard_HasText_Call) Run(run func(ctx context.Context)) *MockClipboard_HasText_Call { | |||
| 130 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 131 | + | var arg0 context.Context | |||
| 132 | + | if args[0] != nil { | |||
| 133 | + | arg0 = args[0].(context.Context) | |||
| 134 | + | } | |||
| 135 | + | run( | |||
| 136 | + | arg0, | |||
| 137 | + | ) | |||
| 138 | + | }) | |||
| 139 | + | return _c | |||
| 140 | + | } | |||
| 141 | + | ||||
| 142 | + | func (_c *MockClipboard_HasText_Call) Return(b bool, err error) *MockClipboard_HasText_Call { | |||
| 143 | + | _c.Call.Return(b, err) | |||
| 144 | + | return _c | |||
| 145 | + | } | |||
| 146 | + | ||||
| 147 | + | func (_c *MockClipboard_HasText_Call) RunAndReturn(run func(ctx context.Context) (bool, error)) *MockClipboard_HasText_Call { | |||
| 148 | + | _c.Call.Return(run) | |||
| 149 | + | return _c | |||
| 150 | + | } | |||
| 151 | + | ||||
| 152 | + | // ReadText provides a mock function for the type MockClipboard | |||
| 153 | + | func (_mock *MockClipboard) ReadText(ctx context.Context) (string, error) { | |||
| 154 | + | ret := _mock.Called(ctx) | |||
| 155 | + | ||||
| 156 | + | if len(ret) == 0 { | |||
| 157 | + | panic("no return value specified for ReadText") | |||
| 158 | + | } | |||
| 159 | + | ||||
| 160 | + | var r0 string | |||
| 161 | + | var r1 error | |||
| 162 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok { | |||
| 163 | + | return returnFunc(ctx) | |||
| 164 | + | } | |||
| 165 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok { | |||
| 166 | + | r0 = returnFunc(ctx) | |||
| 167 | + | } else { | |||
| 168 | + | r0 = ret.Get(0).(string) | |||
| 169 | + | } | |||
| 170 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 171 | + | r1 = returnFunc(ctx) | |||
| 172 | + | } else { | |||
| 173 | + | r1 = ret.Error(1) | |||
| 174 | + | } | |||
| 175 | + | return r0, r1 | |||
| 176 | + | } | |||
| 177 | + | ||||
| 178 | + | // MockClipboard_ReadText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadText' | |||
| 179 | + | type MockClipboard_ReadText_Call struct { | |||
| 180 | + | *mock.Call | |||
| 181 | + | } | |||
| 182 | + | ||||
| 183 | + | // ReadText is a helper method to define mock.On call | |||
| 184 | + | // - ctx context.Context | |||
| 185 | + | func (_e *MockClipboard_Expecter) ReadText(ctx any) *MockClipboard_ReadText_Call { | |||
| 186 | + | return &MockClipboard_ReadText_Call{Call: _e.mock.On("ReadText", ctx)} | |||
| 187 | + | } | |||
| 188 | + | ||||
| 189 | + | func (_c *MockClipboard_ReadText_Call) Run(run func(ctx context.Context)) *MockClipboard_ReadText_Call { | |||
| 190 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 191 | + | var arg0 context.Context | |||
| 192 | + | if args[0] != nil { | |||
| 193 | + | arg0 = args[0].(context.Context) | |||
| 194 | + | } | |||
| 195 | + | run( | |||
| 196 | + | arg0, | |||
| 197 | + | ) | |||
| 198 | + | }) | |||
| 199 | + | return _c | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | func (_c *MockClipboard_ReadText_Call) Return(s string, err error) *MockClipboard_ReadText_Call { | |||
| 203 | + | _c.Call.Return(s, err) | |||
| 204 | + | return _c | |||
| 205 | + | } | |||
| 206 | + | ||||
| 207 | + | func (_c *MockClipboard_ReadText_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockClipboard_ReadText_Call { | |||
| 208 | + | _c.Call.Return(run) | |||
| 209 | + | return _c | |||
| 210 | + | } | |||
| 211 | + | ||||
| 212 | + | // WriteImage provides a mock function for the type MockClipboard | |||
| 213 | + | func (_mock *MockClipboard) WriteImage(ctx context.Context, image entity.ImageData) error { | |||
| 214 | + | ret := _mock.Called(ctx, image) | |||
| 215 | + | ||||
| 216 | + | if len(ret) == 0 { | |||
| 217 | + | panic("no return value specified for WriteImage") | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | var r0 error | |||
| 221 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.ImageData) error); ok { | |||
| 222 | + | r0 = returnFunc(ctx, image) | |||
| 223 | + | } else { | |||
| 224 | + | r0 = ret.Error(0) | |||
| 225 | + | } | |||
| 226 | + | return r0 | |||
| 227 | + | } | |||
| 228 | + | ||||
| 229 | + | // MockClipboard_WriteImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteImage' | |||
| 230 | + | type MockClipboard_WriteImage_Call struct { | |||
| 231 | + | *mock.Call | |||
| 232 | + | } | |||
| 233 | + | ||||
| 234 | + | // WriteImage is a helper method to define mock.On call | |||
| 235 | + | // - ctx context.Context | |||
| 236 | + | // - image entity.ImageData | |||
| 237 | + | func (_e *MockClipboard_Expecter) WriteImage(ctx any, image any) *MockClipboard_WriteImage_Call { | |||
| 238 | + | return &MockClipboard_WriteImage_Call{Call: _e.mock.On("WriteImage", ctx, image)} | |||
| 239 | + | } | |||
| 240 | + | ||||
| 241 | + | func (_c *MockClipboard_WriteImage_Call) Run(run func(ctx context.Context, image entity.ImageData)) *MockClipboard_WriteImage_Call { | |||
| 242 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 243 | + | var arg0 context.Context | |||
| 244 | + | if args[0] != nil { | |||
| 245 | + | arg0 = args[0].(context.Context) | |||
| 246 | + | } | |||
| 247 | + | var arg1 entity.ImageData | |||
| 248 | + | if args[1] != nil { | |||
| 249 | + | arg1 = args[1].(entity.ImageData) | |||
| 250 | + | } | |||
| 251 | + | run( | |||
| 252 | + | arg0, | |||
| 253 | + | arg1, | |||
| 254 | + | ) | |||
| 255 | + | }) | |||
| 256 | + | return _c | |||
| 257 | + | } | |||
| 258 | + | ||||
| 259 | + | func (_c *MockClipboard_WriteImage_Call) Return(err error) *MockClipboard_WriteImage_Call { | |||
| 260 | + | _c.Call.Return(err) | |||
| 261 | + | return _c | |||
| 262 | + | } | |||
| 263 | + | ||||
| 264 | + | func (_c *MockClipboard_WriteImage_Call) RunAndReturn(run func(ctx context.Context, image entity.ImageData) error) *MockClipboard_WriteImage_Call { | |||
| 265 | + | _c.Call.Return(run) | |||
| 266 | + | return _c | |||
| 267 | + | } | |||
| 268 | + | ||||
| 269 | + | // WriteText provides a mock function for the type MockClipboard | |||
| 270 | + | func (_mock *MockClipboard) WriteText(ctx context.Context, text string) error { | |||
| 271 | + | ret := _mock.Called(ctx, text) | |||
| 272 | + | ||||
| 273 | + | if len(ret) == 0 { | |||
| 274 | + | panic("no return value specified for WriteText") | |||
| 275 | + | } | |||
| 276 | + | ||||
| 277 | + | var r0 error | |||
| 278 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 279 | + | r0 = returnFunc(ctx, text) | |||
| 280 | + | } else { | |||
| 281 | + | r0 = ret.Error(0) | |||
| 282 | + | } | |||
| 283 | + | return r0 | |||
| 284 | + | } | |||
| 285 | + | ||||
| 286 | + | // MockClipboard_WriteText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteText' | |||
| 287 | + | type MockClipboard_WriteText_Call struct { | |||
| 288 | + | *mock.Call | |||
| 289 | + | } | |||
| 290 | + | ||||
| 291 | + | // WriteText is a helper method to define mock.On call | |||
| 292 | + | // - ctx context.Context | |||
| 293 | + | // - text string | |||
| 294 | + | func (_e *MockClipboard_Expecter) WriteText(ctx any, text any) *MockClipboard_WriteText_Call { | |||
| 295 | + | return &MockClipboard_WriteText_Call{Call: _e.mock.On("WriteText", ctx, text)} | |||
| 296 | + | } | |||
| 297 | + | ||||
| 298 | + | func (_c *MockClipboard_WriteText_Call) Run(run func(ctx context.Context, text string)) *MockClipboard_WriteText_Call { | |||
| 299 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 300 | + | var arg0 context.Context | |||
| 301 | + | if args[0] != nil { | |||
| 302 | + | arg0 = args[0].(context.Context) | |||
| 303 | + | } | |||
| 304 | + | var arg1 string | |||
| 305 | + | if args[1] != nil { | |||
| 306 | + | arg1 = args[1].(string) | |||
| 307 | + | } | |||
| 308 | + | run( | |||
| 309 | + | arg0, | |||
| 310 | + | arg1, | |||
| 311 | + | ) | |||
| 312 | + | }) | |||
| 313 | + | return _c | |||
| 314 | + | } | |||
| 315 | + | ||||
| 316 | + | func (_c *MockClipboard_WriteText_Call) Return(err error) *MockClipboard_WriteText_Call { | |||
| 317 | + | _c.Call.Return(err) | |||
| 318 | + | return _c | |||
| 319 | + | } | |||
| 320 | + | ||||
| 321 | + | func (_c *MockClipboard_WriteText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockClipboard_WriteText_Call { | |||
| 322 | + | _c.Call.Return(run) | |||
| 323 | + | return _c | |||
| 324 | + | } | |||
A internal/application/port/mocks/clipboard_events.go +153 -0
| @@ -0,0 +1,153 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/dto" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockClipboardTextOrchestrator creates a new instance of MockClipboardTextOrchestrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockClipboardTextOrchestrator(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockClipboardTextOrchestrator { | |||
| 20 | + | mock := &MockClipboardTextOrchestrator{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockClipboardTextOrchestrator is an autogenerated mock type for the ClipboardTextOrchestrator type | |||
| 29 | + | type MockClipboardTextOrchestrator struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockClipboardTextOrchestrator_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockClipboardTextOrchestrator) EXPECT() *MockClipboardTextOrchestrator_Expecter { | |||
| 38 | + | return &MockClipboardTextOrchestrator_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // HandleExplicitCopy provides a mock function for the type MockClipboardTextOrchestrator | |||
| 42 | + | func (_mock *MockClipboardTextOrchestrator) HandleExplicitCopy(ctx context.Context, input dto.ExplicitClipboardInput) error { | |||
| 43 | + | ret := _mock.Called(ctx, input) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for HandleExplicitCopy") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.ExplicitClipboardInput) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, input) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockClipboardTextOrchestrator_HandleExplicitCopy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleExplicitCopy' | |||
| 59 | + | type MockClipboardTextOrchestrator_HandleExplicitCopy_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // HandleExplicitCopy is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - input dto.ExplicitClipboardInput | |||
| 66 | + | func (_e *MockClipboardTextOrchestrator_Expecter) HandleExplicitCopy(ctx any, input any) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call { | |||
| 67 | + | return &MockClipboardTextOrchestrator_HandleExplicitCopy_Call{Call: _e.mock.On("HandleExplicitCopy", ctx, input)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) Run(run func(ctx context.Context, input dto.ExplicitClipboardInput)) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 context.Context | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(context.Context) | |||
| 75 | + | } | |||
| 76 | + | var arg1 dto.ExplicitClipboardInput | |||
| 77 | + | if args[1] != nil { | |||
| 78 | + | arg1 = args[1].(dto.ExplicitClipboardInput) | |||
| 79 | + | } | |||
| 80 | + | run( | |||
| 81 | + | arg0, | |||
| 82 | + | arg1, | |||
| 83 | + | ) | |||
| 84 | + | }) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) Return(err error) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call { | |||
| 89 | + | _c.Call.Return(err) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockClipboardTextOrchestrator_HandleExplicitCopy_Call) RunAndReturn(run func(ctx context.Context, input dto.ExplicitClipboardInput) error) *MockClipboardTextOrchestrator_HandleExplicitCopy_Call { | |||
| 94 | + | _c.Call.Return(run) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | // HandleSelectionUpdate provides a mock function for the type MockClipboardTextOrchestrator | |||
| 99 | + | func (_mock *MockClipboardTextOrchestrator) HandleSelectionUpdate(ctx context.Context, input dto.SelectionClipboardInput) error { | |||
| 100 | + | ret := _mock.Called(ctx, input) | |||
| 101 | + | ||||
| 102 | + | if len(ret) == 0 { | |||
| 103 | + | panic("no return value specified for HandleSelectionUpdate") | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | var r0 error | |||
| 107 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.SelectionClipboardInput) error); ok { | |||
| 108 | + | r0 = returnFunc(ctx, input) | |||
| 109 | + | } else { | |||
| 110 | + | r0 = ret.Error(0) | |||
| 111 | + | } | |||
| 112 | + | return r0 | |||
| 113 | + | } | |||
| 114 | + | ||||
| 115 | + | // MockClipboardTextOrchestrator_HandleSelectionUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleSelectionUpdate' | |||
| 116 | + | type MockClipboardTextOrchestrator_HandleSelectionUpdate_Call struct { | |||
| 117 | + | *mock.Call | |||
| 118 | + | } | |||
| 119 | + | ||||
| 120 | + | // HandleSelectionUpdate is a helper method to define mock.On call | |||
| 121 | + | // - ctx context.Context | |||
| 122 | + | // - input dto.SelectionClipboardInput | |||
| 123 | + | func (_e *MockClipboardTextOrchestrator_Expecter) HandleSelectionUpdate(ctx any, input any) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call { | |||
| 124 | + | return &MockClipboardTextOrchestrator_HandleSelectionUpdate_Call{Call: _e.mock.On("HandleSelectionUpdate", ctx, input)} | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) Run(run func(ctx context.Context, input dto.SelectionClipboardInput)) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call { | |||
| 128 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 129 | + | var arg0 context.Context | |||
| 130 | + | if args[0] != nil { | |||
| 131 | + | arg0 = args[0].(context.Context) | |||
| 132 | + | } | |||
| 133 | + | var arg1 dto.SelectionClipboardInput | |||
| 134 | + | if args[1] != nil { | |||
| 135 | + | arg1 = args[1].(dto.SelectionClipboardInput) | |||
| 136 | + | } | |||
| 137 | + | run( | |||
| 138 | + | arg0, | |||
| 139 | + | arg1, | |||
| 140 | + | ) | |||
| 141 | + | }) | |||
| 142 | + | return _c | |||
| 143 | + | } | |||
| 144 | + | ||||
| 145 | + | func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) Return(err error) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call { | |||
| 146 | + | _c.Call.Return(err) | |||
| 147 | + | return _c | |||
| 148 | + | } | |||
| 149 | + | ||||
| 150 | + | func (_c *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call) RunAndReturn(run func(ctx context.Context, input dto.SelectionClipboardInput) error) *MockClipboardTextOrchestrator_HandleSelectionUpdate_Call { | |||
| 151 | + | _c.Call.Return(run) | |||
| 152 | + | return _c | |||
| 153 | + | } | |||
A internal/application/port/mocks/color_scheme.go +490 -0
| @@ -0,0 +1,490 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 9 | + | mock "github.com/stretchr/testify/mock" | |||
| 10 | + | ) | |||
| 11 | + | ||||
| 12 | + | // NewMockColorSchemeDetector creates a new instance of MockColorSchemeDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 13 | + | // The first argument is typically a *testing.T value. | |||
| 14 | + | func NewMockColorSchemeDetector(t interface { | |||
| 15 | + | mock.TestingT | |||
| 16 | + | Cleanup(func()) | |||
| 17 | + | }) *MockColorSchemeDetector { | |||
| 18 | + | mock := &MockColorSchemeDetector{} | |||
| 19 | + | mock.Mock.Test(t) | |||
| 20 | + | ||||
| 21 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 22 | + | ||||
| 23 | + | return mock | |||
| 24 | + | } | |||
| 25 | + | ||||
| 26 | + | // MockColorSchemeDetector is an autogenerated mock type for the ColorSchemeDetector type | |||
| 27 | + | type MockColorSchemeDetector struct { | |||
| 28 | + | mock.Mock | |||
| 29 | + | } | |||
| 30 | + | ||||
| 31 | + | type MockColorSchemeDetector_Expecter struct { | |||
| 32 | + | mock *mock.Mock | |||
| 33 | + | } | |||
| 34 | + | ||||
| 35 | + | func (_m *MockColorSchemeDetector) EXPECT() *MockColorSchemeDetector_Expecter { | |||
| 36 | + | return &MockColorSchemeDetector_Expecter{mock: &_m.Mock} | |||
| 37 | + | } | |||
| 38 | + | ||||
| 39 | + | // Available provides a mock function for the type MockColorSchemeDetector | |||
| 40 | + | func (_mock *MockColorSchemeDetector) Available() bool { | |||
| 41 | + | ret := _mock.Called() | |||
| 42 | + | ||||
| 43 | + | if len(ret) == 0 { | |||
| 44 | + | panic("no return value specified for Available") | |||
| 45 | + | } | |||
| 46 | + | ||||
| 47 | + | var r0 bool | |||
| 48 | + | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |||
| 49 | + | r0 = returnFunc() | |||
| 50 | + | } else { | |||
| 51 | + | r0 = ret.Get(0).(bool) | |||
| 52 | + | } | |||
| 53 | + | return r0 | |||
| 54 | + | } | |||
| 55 | + | ||||
| 56 | + | // MockColorSchemeDetector_Available_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Available' | |||
| 57 | + | type MockColorSchemeDetector_Available_Call struct { | |||
| 58 | + | *mock.Call | |||
| 59 | + | } | |||
| 60 | + | ||||
| 61 | + | // Available is a helper method to define mock.On call | |||
| 62 | + | func (_e *MockColorSchemeDetector_Expecter) Available() *MockColorSchemeDetector_Available_Call { | |||
| 63 | + | return &MockColorSchemeDetector_Available_Call{Call: _e.mock.On("Available")} | |||
| 64 | + | } | |||
| 65 | + | ||||
| 66 | + | func (_c *MockColorSchemeDetector_Available_Call) Run(run func()) *MockColorSchemeDetector_Available_Call { | |||
| 67 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 68 | + | run() | |||
| 69 | + | }) | |||
| 70 | + | return _c | |||
| 71 | + | } | |||
| 72 | + | ||||
| 73 | + | func (_c *MockColorSchemeDetector_Available_Call) Return(b bool) *MockColorSchemeDetector_Available_Call { | |||
| 74 | + | _c.Call.Return(b) | |||
| 75 | + | return _c | |||
| 76 | + | } | |||
| 77 | + | ||||
| 78 | + | func (_c *MockColorSchemeDetector_Available_Call) RunAndReturn(run func() bool) *MockColorSchemeDetector_Available_Call { | |||
| 79 | + | _c.Call.Return(run) | |||
| 80 | + | return _c | |||
| 81 | + | } | |||
| 82 | + | ||||
| 83 | + | // Detect provides a mock function for the type MockColorSchemeDetector | |||
| 84 | + | func (_mock *MockColorSchemeDetector) Detect() (bool, bool) { | |||
| 85 | + | ret := _mock.Called() | |||
| 86 | + | ||||
| 87 | + | if len(ret) == 0 { | |||
| 88 | + | panic("no return value specified for Detect") | |||
| 89 | + | } | |||
| 90 | + | ||||
| 91 | + | var r0 bool | |||
| 92 | + | var r1 bool | |||
| 93 | + | if returnFunc, ok := ret.Get(0).(func() (bool, bool)); ok { | |||
| 94 | + | return returnFunc() | |||
| 95 | + | } | |||
| 96 | + | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |||
| 97 | + | r0 = returnFunc() | |||
| 98 | + | } else { | |||
| 99 | + | r0 = ret.Get(0).(bool) | |||
| 100 | + | } | |||
| 101 | + | if returnFunc, ok := ret.Get(1).(func() bool); ok { | |||
| 102 | + | r1 = returnFunc() | |||
| 103 | + | } else { | |||
| 104 | + | r1 = ret.Get(1).(bool) | |||
| 105 | + | } | |||
| 106 | + | return r0, r1 | |||
| 107 | + | } | |||
| 108 | + | ||||
| 109 | + | // MockColorSchemeDetector_Detect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Detect' | |||
| 110 | + | type MockColorSchemeDetector_Detect_Call struct { | |||
| 111 | + | *mock.Call | |||
| 112 | + | } | |||
| 113 | + | ||||
| 114 | + | // Detect is a helper method to define mock.On call | |||
| 115 | + | func (_e *MockColorSchemeDetector_Expecter) Detect() *MockColorSchemeDetector_Detect_Call { | |||
| 116 | + | return &MockColorSchemeDetector_Detect_Call{Call: _e.mock.On("Detect")} | |||
| 117 | + | } | |||
| 118 | + | ||||
| 119 | + | func (_c *MockColorSchemeDetector_Detect_Call) Run(run func()) *MockColorSchemeDetector_Detect_Call { | |||
| 120 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 121 | + | run() | |||
| 122 | + | }) | |||
| 123 | + | return _c | |||
| 124 | + | } | |||
| 125 | + | ||||
| 126 | + | func (_c *MockColorSchemeDetector_Detect_Call) Return(prefersDark bool, ok bool) *MockColorSchemeDetector_Detect_Call { | |||
| 127 | + | _c.Call.Return(prefersDark, ok) | |||
| 128 | + | return _c | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | func (_c *MockColorSchemeDetector_Detect_Call) RunAndReturn(run func() (bool, bool)) *MockColorSchemeDetector_Detect_Call { | |||
| 132 | + | _c.Call.Return(run) | |||
| 133 | + | return _c | |||
| 134 | + | } | |||
| 135 | + | ||||
| 136 | + | // Name provides a mock function for the type MockColorSchemeDetector | |||
| 137 | + | func (_mock *MockColorSchemeDetector) Name() string { | |||
| 138 | + | ret := _mock.Called() | |||
| 139 | + | ||||
| 140 | + | if len(ret) == 0 { | |||
| 141 | + | panic("no return value specified for Name") | |||
| 142 | + | } | |||
| 143 | + | ||||
| 144 | + | var r0 string | |||
| 145 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 146 | + | r0 = returnFunc() | |||
| 147 | + | } else { | |||
| 148 | + | r0 = ret.Get(0).(string) | |||
| 149 | + | } | |||
| 150 | + | return r0 | |||
| 151 | + | } | |||
| 152 | + | ||||
| 153 | + | // MockColorSchemeDetector_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' | |||
| 154 | + | type MockColorSchemeDetector_Name_Call struct { | |||
| 155 | + | *mock.Call | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | // Name is a helper method to define mock.On call | |||
| 159 | + | func (_e *MockColorSchemeDetector_Expecter) Name() *MockColorSchemeDetector_Name_Call { | |||
| 160 | + | return &MockColorSchemeDetector_Name_Call{Call: _e.mock.On("Name")} | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | func (_c *MockColorSchemeDetector_Name_Call) Run(run func()) *MockColorSchemeDetector_Name_Call { | |||
| 164 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 165 | + | run() | |||
| 166 | + | }) | |||
| 167 | + | return _c | |||
| 168 | + | } | |||
| 169 | + | ||||
| 170 | + | func (_c *MockColorSchemeDetector_Name_Call) Return(s string) *MockColorSchemeDetector_Name_Call { | |||
| 171 | + | _c.Call.Return(s) | |||
| 172 | + | return _c | |||
| 173 | + | } | |||
| 174 | + | ||||
| 175 | + | func (_c *MockColorSchemeDetector_Name_Call) RunAndReturn(run func() string) *MockColorSchemeDetector_Name_Call { | |||
| 176 | + | _c.Call.Return(run) | |||
| 177 | + | return _c | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | // Priority provides a mock function for the type MockColorSchemeDetector | |||
| 181 | + | func (_mock *MockColorSchemeDetector) Priority() int { | |||
| 182 | + | ret := _mock.Called() | |||
| 183 | + | ||||
| 184 | + | if len(ret) == 0 { | |||
| 185 | + | panic("no return value specified for Priority") | |||
| 186 | + | } | |||
| 187 | + | ||||
| 188 | + | var r0 int | |||
| 189 | + | if returnFunc, ok := ret.Get(0).(func() int); ok { | |||
| 190 | + | r0 = returnFunc() | |||
| 191 | + | } else { | |||
| 192 | + | r0 = ret.Get(0).(int) | |||
| 193 | + | } | |||
| 194 | + | return r0 | |||
| 195 | + | } | |||
| 196 | + | ||||
| 197 | + | // MockColorSchemeDetector_Priority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Priority' | |||
| 198 | + | type MockColorSchemeDetector_Priority_Call struct { | |||
| 199 | + | *mock.Call | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | // Priority is a helper method to define mock.On call | |||
| 203 | + | func (_e *MockColorSchemeDetector_Expecter) Priority() *MockColorSchemeDetector_Priority_Call { | |||
| 204 | + | return &MockColorSchemeDetector_Priority_Call{Call: _e.mock.On("Priority")} | |||
| 205 | + | } | |||
| 206 | + | ||||
| 207 | + | func (_c *MockColorSchemeDetector_Priority_Call) Run(run func()) *MockColorSchemeDetector_Priority_Call { | |||
| 208 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 209 | + | run() | |||
| 210 | + | }) | |||
| 211 | + | return _c | |||
| 212 | + | } | |||
| 213 | + | ||||
| 214 | + | func (_c *MockColorSchemeDetector_Priority_Call) Return(n int) *MockColorSchemeDetector_Priority_Call { | |||
| 215 | + | _c.Call.Return(n) | |||
| 216 | + | return _c | |||
| 217 | + | } | |||
| 218 | + | ||||
| 219 | + | func (_c *MockColorSchemeDetector_Priority_Call) RunAndReturn(run func() int) *MockColorSchemeDetector_Priority_Call { | |||
| 220 | + | _c.Call.Return(run) | |||
| 221 | + | return _c | |||
| 222 | + | } | |||
| 223 | + | ||||
| 224 | + | // NewMockToolkitAvailabilityNotifier creates a new instance of MockToolkitAvailabilityNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 225 | + | // The first argument is typically a *testing.T value. | |||
| 226 | + | func NewMockToolkitAvailabilityNotifier(t interface { | |||
| 227 | + | mock.TestingT | |||
| 228 | + | Cleanup(func()) | |||
| 229 | + | }) *MockToolkitAvailabilityNotifier { | |||
| 230 | + | mock := &MockToolkitAvailabilityNotifier{} | |||
| 231 | + | mock.Mock.Test(t) | |||
| 232 | + | ||||
| 233 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 234 | + | ||||
| 235 | + | return mock | |||
| 236 | + | } | |||
| 237 | + | ||||
| 238 | + | // MockToolkitAvailabilityNotifier is an autogenerated mock type for the ToolkitAvailabilityNotifier type | |||
| 239 | + | type MockToolkitAvailabilityNotifier struct { | |||
| 240 | + | mock.Mock | |||
| 241 | + | } | |||
| 242 | + | ||||
| 243 | + | type MockToolkitAvailabilityNotifier_Expecter struct { | |||
| 244 | + | mock *mock.Mock | |||
| 245 | + | } | |||
| 246 | + | ||||
| 247 | + | func (_m *MockToolkitAvailabilityNotifier) EXPECT() *MockToolkitAvailabilityNotifier_Expecter { | |||
| 248 | + | return &MockToolkitAvailabilityNotifier_Expecter{mock: &_m.Mock} | |||
| 249 | + | } | |||
| 250 | + | ||||
| 251 | + | // MarkAvailable provides a mock function for the type MockToolkitAvailabilityNotifier | |||
| 252 | + | func (_mock *MockToolkitAvailabilityNotifier) MarkAvailable() { | |||
| 253 | + | _mock.Called() | |||
| 254 | + | return | |||
| 255 | + | } | |||
| 256 | + | ||||
| 257 | + | // MockToolkitAvailabilityNotifier_MarkAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkAvailable' | |||
| 258 | + | type MockToolkitAvailabilityNotifier_MarkAvailable_Call struct { | |||
| 259 | + | *mock.Call | |||
| 260 | + | } | |||
| 261 | + | ||||
| 262 | + | // MarkAvailable is a helper method to define mock.On call | |||
| 263 | + | func (_e *MockToolkitAvailabilityNotifier_Expecter) MarkAvailable() *MockToolkitAvailabilityNotifier_MarkAvailable_Call { | |||
| 264 | + | return &MockToolkitAvailabilityNotifier_MarkAvailable_Call{Call: _e.mock.On("MarkAvailable")} | |||
| 265 | + | } | |||
| 266 | + | ||||
| 267 | + | func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) Run(run func()) *MockToolkitAvailabilityNotifier_MarkAvailable_Call { | |||
| 268 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 269 | + | run() | |||
| 270 | + | }) | |||
| 271 | + | return _c | |||
| 272 | + | } | |||
| 273 | + | ||||
| 274 | + | func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) Return() *MockToolkitAvailabilityNotifier_MarkAvailable_Call { | |||
| 275 | + | _c.Call.Return() | |||
| 276 | + | return _c | |||
| 277 | + | } | |||
| 278 | + | ||||
| 279 | + | func (_c *MockToolkitAvailabilityNotifier_MarkAvailable_Call) RunAndReturn(run func()) *MockToolkitAvailabilityNotifier_MarkAvailable_Call { | |||
| 280 | + | _c.Run(run) | |||
| 281 | + | return _c | |||
| 282 | + | } | |||
| 283 | + | ||||
| 284 | + | // NewMockColorSchemeResolver creates a new instance of MockColorSchemeResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 285 | + | // The first argument is typically a *testing.T value. | |||
| 286 | + | func NewMockColorSchemeResolver(t interface { | |||
| 287 | + | mock.TestingT | |||
| 288 | + | Cleanup(func()) | |||
| 289 | + | }) *MockColorSchemeResolver { | |||
| 290 | + | mock := &MockColorSchemeResolver{} | |||
| 291 | + | mock.Mock.Test(t) | |||
| 292 | + | ||||
| 293 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 294 | + | ||||
| 295 | + | return mock | |||
| 296 | + | } | |||
| 297 | + | ||||
| 298 | + | // MockColorSchemeResolver is an autogenerated mock type for the ColorSchemeResolver type | |||
| 299 | + | type MockColorSchemeResolver struct { | |||
| 300 | + | mock.Mock | |||
| 301 | + | } | |||
| 302 | + | ||||
| 303 | + | type MockColorSchemeResolver_Expecter struct { | |||
| 304 | + | mock *mock.Mock | |||
| 305 | + | } | |||
| 306 | + | ||||
| 307 | + | func (_m *MockColorSchemeResolver) EXPECT() *MockColorSchemeResolver_Expecter { | |||
| 308 | + | return &MockColorSchemeResolver_Expecter{mock: &_m.Mock} | |||
| 309 | + | } | |||
| 310 | + | ||||
| 311 | + | // OnChange provides a mock function for the type MockColorSchemeResolver | |||
| 312 | + | func (_mock *MockColorSchemeResolver) OnChange(callback func(port.ColorSchemePreference)) func() { | |||
| 313 | + | ret := _mock.Called(callback) | |||
| 314 | + | ||||
| 315 | + | if len(ret) == 0 { | |||
| 316 | + | panic("no return value specified for OnChange") | |||
| 317 | + | } | |||
| 318 | + | ||||
| 319 | + | var r0 func() | |||
| 320 | + | if returnFunc, ok := ret.Get(0).(func(func(port.ColorSchemePreference)) func()); ok { | |||
| 321 | + | r0 = returnFunc(callback) | |||
| 322 | + | } else { | |||
| 323 | + | if ret.Get(0) != nil { | |||
| 324 | + | r0 = ret.Get(0).(func()) | |||
| 325 | + | } | |||
| 326 | + | } | |||
| 327 | + | return r0 | |||
| 328 | + | } | |||
| 329 | + | ||||
| 330 | + | // MockColorSchemeResolver_OnChange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnChange' | |||
| 331 | + | type MockColorSchemeResolver_OnChange_Call struct { | |||
| 332 | + | *mock.Call | |||
| 333 | + | } | |||
| 334 | + | ||||
| 335 | + | // OnChange is a helper method to define mock.On call | |||
| 336 | + | // - callback func(port.ColorSchemePreference) | |||
| 337 | + | func (_e *MockColorSchemeResolver_Expecter) OnChange(callback any) *MockColorSchemeResolver_OnChange_Call { | |||
| 338 | + | return &MockColorSchemeResolver_OnChange_Call{Call: _e.mock.On("OnChange", callback)} | |||
| 339 | + | } | |||
| 340 | + | ||||
| 341 | + | func (_c *MockColorSchemeResolver_OnChange_Call) Run(run func(callback func(port.ColorSchemePreference))) *MockColorSchemeResolver_OnChange_Call { | |||
| 342 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 343 | + | var arg0 func(port.ColorSchemePreference) | |||
| 344 | + | if args[0] != nil { | |||
| 345 | + | arg0 = args[0].(func(port.ColorSchemePreference)) | |||
| 346 | + | } | |||
| 347 | + | run( | |||
| 348 | + | arg0, | |||
| 349 | + | ) | |||
| 350 | + | }) | |||
| 351 | + | return _c | |||
| 352 | + | } | |||
| 353 | + | ||||
| 354 | + | func (_c *MockColorSchemeResolver_OnChange_Call) Return(fn func()) *MockColorSchemeResolver_OnChange_Call { | |||
| 355 | + | _c.Call.Return(fn) | |||
| 356 | + | return _c | |||
| 357 | + | } | |||
| 358 | + | ||||
| 359 | + | func (_c *MockColorSchemeResolver_OnChange_Call) RunAndReturn(run func(callback func(port.ColorSchemePreference)) func()) *MockColorSchemeResolver_OnChange_Call { | |||
| 360 | + | _c.Call.Return(run) | |||
| 361 | + | return _c | |||
| 362 | + | } | |||
| 363 | + | ||||
| 364 | + | // Refresh provides a mock function for the type MockColorSchemeResolver | |||
| 365 | + | func (_mock *MockColorSchemeResolver) Refresh() port.ColorSchemePreference { | |||
| 366 | + | ret := _mock.Called() | |||
| 367 | + | ||||
| 368 | + | if len(ret) == 0 { | |||
| 369 | + | panic("no return value specified for Refresh") | |||
| 370 | + | } | |||
| 371 | + | ||||
| 372 | + | var r0 port.ColorSchemePreference | |||
| 373 | + | if returnFunc, ok := ret.Get(0).(func() port.ColorSchemePreference); ok { | |||
| 374 | + | r0 = returnFunc() | |||
| 375 | + | } else { | |||
| 376 | + | r0 = ret.Get(0).(port.ColorSchemePreference) | |||
| 377 | + | } | |||
| 378 | + | return r0 | |||
| 379 | + | } | |||
| 380 | + | ||||
| 381 | + | // MockColorSchemeResolver_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh' | |||
| 382 | + | type MockColorSchemeResolver_Refresh_Call struct { | |||
| 383 | + | *mock.Call | |||
| 384 | + | } | |||
| 385 | + | ||||
| 386 | + | // Refresh is a helper method to define mock.On call | |||
| 387 | + | func (_e *MockColorSchemeResolver_Expecter) Refresh() *MockColorSchemeResolver_Refresh_Call { | |||
| 388 | + | return &MockColorSchemeResolver_Refresh_Call{Call: _e.mock.On("Refresh")} | |||
| 389 | + | } | |||
| 390 | + | ||||
| 391 | + | func (_c *MockColorSchemeResolver_Refresh_Call) Run(run func()) *MockColorSchemeResolver_Refresh_Call { | |||
| 392 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 393 | + | run() | |||
| 394 | + | }) | |||
| 395 | + | return _c | |||
| 396 | + | } | |||
| 397 | + | ||||
| 398 | + | func (_c *MockColorSchemeResolver_Refresh_Call) Return(colorSchemePreference port.ColorSchemePreference) *MockColorSchemeResolver_Refresh_Call { | |||
| 399 | + | _c.Call.Return(colorSchemePreference) | |||
| 400 | + | return _c | |||
| 401 | + | } | |||
| 402 | + | ||||
| 403 | + | func (_c *MockColorSchemeResolver_Refresh_Call) RunAndReturn(run func() port.ColorSchemePreference) *MockColorSchemeResolver_Refresh_Call { | |||
| 404 | + | _c.Call.Return(run) | |||
| 405 | + | return _c | |||
| 406 | + | } | |||
| 407 | + | ||||
| 408 | + | // RegisterDetector provides a mock function for the type MockColorSchemeResolver | |||
| 409 | + | func (_mock *MockColorSchemeResolver) RegisterDetector(detector port.ColorSchemeDetector) { | |||
| 410 | + | _mock.Called(detector) | |||
| 411 | + | return | |||
| 412 | + | } | |||
| 413 | + | ||||
| 414 | + | // MockColorSchemeResolver_RegisterDetector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterDetector' | |||
| 415 | + | type MockColorSchemeResolver_RegisterDetector_Call struct { | |||
| 416 | + | *mock.Call | |||
| 417 | + | } | |||
| 418 | + | ||||
| 419 | + | // RegisterDetector is a helper method to define mock.On call | |||
| 420 | + | // - detector port.ColorSchemeDetector | |||
| 421 | + | func (_e *MockColorSchemeResolver_Expecter) RegisterDetector(detector any) *MockColorSchemeResolver_RegisterDetector_Call { | |||
| 422 | + | return &MockColorSchemeResolver_RegisterDetector_Call{Call: _e.mock.On("RegisterDetector", detector)} | |||
| 423 | + | } | |||
| 424 | + | ||||
| 425 | + | func (_c *MockColorSchemeResolver_RegisterDetector_Call) Run(run func(detector port.ColorSchemeDetector)) *MockColorSchemeResolver_RegisterDetector_Call { | |||
| 426 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 427 | + | var arg0 port.ColorSchemeDetector | |||
| 428 | + | if args[0] != nil { | |||
| 429 | + | arg0 = args[0].(port.ColorSchemeDetector) | |||
| 430 | + | } | |||
| 431 | + | run( | |||
| 432 | + | arg0, | |||
| 433 | + | ) | |||
| 434 | + | }) | |||
| 435 | + | return _c | |||
| 436 | + | } | |||
| 437 | + | ||||
| 438 | + | func (_c *MockColorSchemeResolver_RegisterDetector_Call) Return() *MockColorSchemeResolver_RegisterDetector_Call { | |||
| 439 | + | _c.Call.Return() | |||
| 440 | + | return _c | |||
| 441 | + | } | |||
| 442 | + | ||||
| 443 | + | func (_c *MockColorSchemeResolver_RegisterDetector_Call) RunAndReturn(run func(detector port.ColorSchemeDetector)) *MockColorSchemeResolver_RegisterDetector_Call { | |||
| 444 | + | _c.Run(run) | |||
| 445 | + | return _c | |||
| 446 | + | } | |||
| 447 | + | ||||
| 448 | + | // Resolve provides a mock function for the type MockColorSchemeResolver | |||
| 449 | + | func (_mock *MockColorSchemeResolver) Resolve() port.ColorSchemePreference { | |||
| 450 | + | ret := _mock.Called() | |||
| 451 | + | ||||
| 452 | + | if len(ret) == 0 { | |||
| 453 | + | panic("no return value specified for Resolve") | |||
| 454 | + | } | |||
| 455 | + | ||||
| 456 | + | var r0 port.ColorSchemePreference | |||
| 457 | + | if returnFunc, ok := ret.Get(0).(func() port.ColorSchemePreference); ok { | |||
| 458 | + | r0 = returnFunc() | |||
| 459 | + | } else { | |||
| 460 | + | r0 = ret.Get(0).(port.ColorSchemePreference) | |||
| 461 | + | } | |||
| 462 | + | return r0 | |||
| 463 | + | } | |||
| 464 | + | ||||
| 465 | + | // MockColorSchemeResolver_Resolve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resolve' | |||
| 466 | + | type MockColorSchemeResolver_Resolve_Call struct { | |||
| 467 | + | *mock.Call | |||
| 468 | + | } | |||
| 469 | + | ||||
| 470 | + | // Resolve is a helper method to define mock.On call | |||
| 471 | + | func (_e *MockColorSchemeResolver_Expecter) Resolve() *MockColorSchemeResolver_Resolve_Call { | |||
| 472 | + | return &MockColorSchemeResolver_Resolve_Call{Call: _e.mock.On("Resolve")} | |||
| 473 | + | } | |||
| 474 | + | ||||
| 475 | + | func (_c *MockColorSchemeResolver_Resolve_Call) Run(run func()) *MockColorSchemeResolver_Resolve_Call { | |||
| 476 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 477 | + | run() | |||
| 478 | + | }) | |||
| 479 | + | return _c | |||
| 480 | + | } | |||
| 481 | + | ||||
| 482 | + | func (_c *MockColorSchemeResolver_Resolve_Call) Return(colorSchemePreference port.ColorSchemePreference) *MockColorSchemeResolver_Resolve_Call { | |||
| 483 | + | _c.Call.Return(colorSchemePreference) | |||
| 484 | + | return _c | |||
| 485 | + | } | |||
| 486 | + | ||||
| 487 | + | func (_c *MockColorSchemeResolver_Resolve_Call) RunAndReturn(run func() port.ColorSchemePreference) *MockColorSchemeResolver_Resolve_Call { | |||
| 488 | + | _c.Call.Return(run) | |||
| 489 | + | return _c | |||
| 490 | + | } | |||
A internal/application/port/mocks/config_migrator.go +384 -0
| @@ -0,0 +1,384 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 9 | + | mock "github.com/stretchr/testify/mock" | |||
| 10 | + | ) | |||
| 11 | + | ||||
| 12 | + | // NewMockConfigMigrator creates a new instance of MockConfigMigrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 13 | + | // The first argument is typically a *testing.T value. | |||
| 14 | + | func NewMockConfigMigrator(t interface { | |||
| 15 | + | mock.TestingT | |||
| 16 | + | Cleanup(func()) | |||
| 17 | + | }) *MockConfigMigrator { | |||
| 18 | + | mock := &MockConfigMigrator{} | |||
| 19 | + | mock.Mock.Test(t) | |||
| 20 | + | ||||
| 21 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 22 | + | ||||
| 23 | + | return mock | |||
| 24 | + | } | |||
| 25 | + | ||||
| 26 | + | // MockConfigMigrator is an autogenerated mock type for the ConfigMigrator type | |||
| 27 | + | type MockConfigMigrator struct { | |||
| 28 | + | mock.Mock | |||
| 29 | + | } | |||
| 30 | + | ||||
| 31 | + | type MockConfigMigrator_Expecter struct { | |||
| 32 | + | mock *mock.Mock | |||
| 33 | + | } | |||
| 34 | + | ||||
| 35 | + | func (_m *MockConfigMigrator) EXPECT() *MockConfigMigrator_Expecter { | |||
| 36 | + | return &MockConfigMigrator_Expecter{mock: &_m.Mock} | |||
| 37 | + | } | |||
| 38 | + | ||||
| 39 | + | // CheckMigration provides a mock function for the type MockConfigMigrator | |||
| 40 | + | func (_mock *MockConfigMigrator) CheckMigration() (*port.MigrationResult, error) { | |||
| 41 | + | ret := _mock.Called() | |||
| 42 | + | ||||
| 43 | + | if len(ret) == 0 { | |||
| 44 | + | panic("no return value specified for CheckMigration") | |||
| 45 | + | } | |||
| 46 | + | ||||
| 47 | + | var r0 *port.MigrationResult | |||
| 48 | + | var r1 error | |||
| 49 | + | if returnFunc, ok := ret.Get(0).(func() (*port.MigrationResult, error)); ok { | |||
| 50 | + | return returnFunc() | |||
| 51 | + | } | |||
| 52 | + | if returnFunc, ok := ret.Get(0).(func() *port.MigrationResult); ok { | |||
| 53 | + | r0 = returnFunc() | |||
| 54 | + | } else { | |||
| 55 | + | if ret.Get(0) != nil { | |||
| 56 | + | r0 = ret.Get(0).(*port.MigrationResult) | |||
| 57 | + | } | |||
| 58 | + | } | |||
| 59 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 60 | + | r1 = returnFunc() | |||
| 61 | + | } else { | |||
| 62 | + | r1 = ret.Error(1) | |||
| 63 | + | } | |||
| 64 | + | return r0, r1 | |||
| 65 | + | } | |||
| 66 | + | ||||
| 67 | + | // MockConfigMigrator_CheckMigration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckMigration' | |||
| 68 | + | type MockConfigMigrator_CheckMigration_Call struct { | |||
| 69 | + | *mock.Call | |||
| 70 | + | } | |||
| 71 | + | ||||
| 72 | + | // CheckMigration is a helper method to define mock.On call | |||
| 73 | + | func (_e *MockConfigMigrator_Expecter) CheckMigration() *MockConfigMigrator_CheckMigration_Call { | |||
| 74 | + | return &MockConfigMigrator_CheckMigration_Call{Call: _e.mock.On("CheckMigration")} | |||
| 75 | + | } | |||
| 76 | + | ||||
| 77 | + | func (_c *MockConfigMigrator_CheckMigration_Call) Run(run func()) *MockConfigMigrator_CheckMigration_Call { | |||
| 78 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 79 | + | run() | |||
| 80 | + | }) | |||
| 81 | + | return _c | |||
| 82 | + | } | |||
| 83 | + | ||||
| 84 | + | func (_c *MockConfigMigrator_CheckMigration_Call) Return(migrationResult *port.MigrationResult, err error) *MockConfigMigrator_CheckMigration_Call { | |||
| 85 | + | _c.Call.Return(migrationResult, err) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockConfigMigrator_CheckMigration_Call) RunAndReturn(run func() (*port.MigrationResult, error)) *MockConfigMigrator_CheckMigration_Call { | |||
| 90 | + | _c.Call.Return(run) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | // DetectChanges provides a mock function for the type MockConfigMigrator | |||
| 95 | + | func (_mock *MockConfigMigrator) DetectChanges() ([]port.KeyChange, error) { | |||
| 96 | + | ret := _mock.Called() | |||
| 97 | + | ||||
| 98 | + | if len(ret) == 0 { | |||
| 99 | + | panic("no return value specified for DetectChanges") | |||
| 100 | + | } | |||
| 101 | + | ||||
| 102 | + | var r0 []port.KeyChange | |||
| 103 | + | var r1 error | |||
| 104 | + | if returnFunc, ok := ret.Get(0).(func() ([]port.KeyChange, error)); ok { | |||
| 105 | + | return returnFunc() | |||
| 106 | + | } | |||
| 107 | + | if returnFunc, ok := ret.Get(0).(func() []port.KeyChange); ok { | |||
| 108 | + | r0 = returnFunc() | |||
| 109 | + | } else { | |||
| 110 | + | if ret.Get(0) != nil { | |||
| 111 | + | r0 = ret.Get(0).([]port.KeyChange) | |||
| 112 | + | } | |||
| 113 | + | } | |||
| 114 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 115 | + | r1 = returnFunc() | |||
| 116 | + | } else { | |||
| 117 | + | r1 = ret.Error(1) | |||
| 118 | + | } | |||
| 119 | + | return r0, r1 | |||
| 120 | + | } | |||
| 121 | + | ||||
| 122 | + | // MockConfigMigrator_DetectChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectChanges' | |||
| 123 | + | type MockConfigMigrator_DetectChanges_Call struct { | |||
| 124 | + | *mock.Call | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | // DetectChanges is a helper method to define mock.On call | |||
| 128 | + | func (_e *MockConfigMigrator_Expecter) DetectChanges() *MockConfigMigrator_DetectChanges_Call { | |||
| 129 | + | return &MockConfigMigrator_DetectChanges_Call{Call: _e.mock.On("DetectChanges")} | |||
| 130 | + | } | |||
| 131 | + | ||||
| 132 | + | func (_c *MockConfigMigrator_DetectChanges_Call) Run(run func()) *MockConfigMigrator_DetectChanges_Call { | |||
| 133 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 134 | + | run() | |||
| 135 | + | }) | |||
| 136 | + | return _c | |||
| 137 | + | } | |||
| 138 | + | ||||
| 139 | + | func (_c *MockConfigMigrator_DetectChanges_Call) Return(keyChanges []port.KeyChange, err error) *MockConfigMigrator_DetectChanges_Call { | |||
| 140 | + | _c.Call.Return(keyChanges, err) | |||
| 141 | + | return _c | |||
| 142 | + | } | |||
| 143 | + | ||||
| 144 | + | func (_c *MockConfigMigrator_DetectChanges_Call) RunAndReturn(run func() ([]port.KeyChange, error)) *MockConfigMigrator_DetectChanges_Call { | |||
| 145 | + | _c.Call.Return(run) | |||
| 146 | + | return _c | |||
| 147 | + | } | |||
| 148 | + | ||||
| 149 | + | // GetConfigFile provides a mock function for the type MockConfigMigrator | |||
| 150 | + | func (_mock *MockConfigMigrator) GetConfigFile() (string, error) { | |||
| 151 | + | ret := _mock.Called() | |||
| 152 | + | ||||
| 153 | + | if len(ret) == 0 { | |||
| 154 | + | panic("no return value specified for GetConfigFile") | |||
| 155 | + | } | |||
| 156 | + | ||||
| 157 | + | var r0 string | |||
| 158 | + | var r1 error | |||
| 159 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 160 | + | return returnFunc() | |||
| 161 | + | } | |||
| 162 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 163 | + | r0 = returnFunc() | |||
| 164 | + | } else { | |||
| 165 | + | r0 = ret.Get(0).(string) | |||
| 166 | + | } | |||
| 167 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 168 | + | r1 = returnFunc() | |||
| 169 | + | } else { | |||
| 170 | + | r1 = ret.Error(1) | |||
| 171 | + | } | |||
| 172 | + | return r0, r1 | |||
| 173 | + | } | |||
| 174 | + | ||||
| 175 | + | // MockConfigMigrator_GetConfigFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfigFile' | |||
| 176 | + | type MockConfigMigrator_GetConfigFile_Call struct { | |||
| 177 | + | *mock.Call | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | // GetConfigFile is a helper method to define mock.On call | |||
| 181 | + | func (_e *MockConfigMigrator_Expecter) GetConfigFile() *MockConfigMigrator_GetConfigFile_Call { | |||
| 182 | + | return &MockConfigMigrator_GetConfigFile_Call{Call: _e.mock.On("GetConfigFile")} | |||
| 183 | + | } | |||
| 184 | + | ||||
| 185 | + | func (_c *MockConfigMigrator_GetConfigFile_Call) Run(run func()) *MockConfigMigrator_GetConfigFile_Call { | |||
| 186 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 187 | + | run() | |||
| 188 | + | }) | |||
| 189 | + | return _c | |||
| 190 | + | } | |||
| 191 | + | ||||
| 192 | + | func (_c *MockConfigMigrator_GetConfigFile_Call) Return(s string, err error) *MockConfigMigrator_GetConfigFile_Call { | |||
| 193 | + | _c.Call.Return(s, err) | |||
| 194 | + | return _c | |||
| 195 | + | } | |||
| 196 | + | ||||
| 197 | + | func (_c *MockConfigMigrator_GetConfigFile_Call) RunAndReturn(run func() (string, error)) *MockConfigMigrator_GetConfigFile_Call { | |||
| 198 | + | _c.Call.Return(run) | |||
| 199 | + | return _c | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | // GetKeyInfo provides a mock function for the type MockConfigMigrator | |||
| 203 | + | func (_mock *MockConfigMigrator) GetKeyInfo(key string) port.KeyInfo { | |||
| 204 | + | ret := _mock.Called(key) | |||
| 205 | + | ||||
| 206 | + | if len(ret) == 0 { | |||
| 207 | + | panic("no return value specified for GetKeyInfo") | |||
| 208 | + | } | |||
| 209 | + | ||||
| 210 | + | var r0 port.KeyInfo | |||
| 211 | + | if returnFunc, ok := ret.Get(0).(func(string) port.KeyInfo); ok { | |||
| 212 | + | r0 = returnFunc(key) | |||
| 213 | + | } else { | |||
| 214 | + | r0 = ret.Get(0).(port.KeyInfo) | |||
| 215 | + | } | |||
| 216 | + | return r0 | |||
| 217 | + | } | |||
| 218 | + | ||||
| 219 | + | // MockConfigMigrator_GetKeyInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyInfo' | |||
| 220 | + | type MockConfigMigrator_GetKeyInfo_Call struct { | |||
| 221 | + | *mock.Call | |||
| 222 | + | } | |||
| 223 | + | ||||
| 224 | + | // GetKeyInfo is a helper method to define mock.On call | |||
| 225 | + | // - key string | |||
| 226 | + | func (_e *MockConfigMigrator_Expecter) GetKeyInfo(key any) *MockConfigMigrator_GetKeyInfo_Call { | |||
| 227 | + | return &MockConfigMigrator_GetKeyInfo_Call{Call: _e.mock.On("GetKeyInfo", key)} | |||
| 228 | + | } | |||
| 229 | + | ||||
| 230 | + | func (_c *MockConfigMigrator_GetKeyInfo_Call) Run(run func(key string)) *MockConfigMigrator_GetKeyInfo_Call { | |||
| 231 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 232 | + | var arg0 string | |||
| 233 | + | if args[0] != nil { | |||
| 234 | + | arg0 = args[0].(string) | |||
| 235 | + | } | |||
| 236 | + | run( | |||
| 237 | + | arg0, | |||
| 238 | + | ) | |||
| 239 | + | }) | |||
| 240 | + | return _c | |||
| 241 | + | } | |||
| 242 | + | ||||
| 243 | + | func (_c *MockConfigMigrator_GetKeyInfo_Call) Return(keyInfo port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call { | |||
| 244 | + | _c.Call.Return(keyInfo) | |||
| 245 | + | return _c | |||
| 246 | + | } | |||
| 247 | + | ||||
| 248 | + | func (_c *MockConfigMigrator_GetKeyInfo_Call) RunAndReturn(run func(key string) port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call { | |||
| 249 | + | _c.Call.Return(run) | |||
| 250 | + | return _c | |||
| 251 | + | } | |||
| 252 | + | ||||
| 253 | + | // Migrate provides a mock function for the type MockConfigMigrator | |||
| 254 | + | func (_mock *MockConfigMigrator) Migrate() ([]string, error) { | |||
| 255 | + | ret := _mock.Called() | |||
| 256 | + | ||||
| 257 | + | if len(ret) == 0 { | |||
| 258 | + | panic("no return value specified for Migrate") | |||
| 259 | + | } | |||
| 260 | + | ||||
| 261 | + | var r0 []string | |||
| 262 | + | var r1 error | |||
| 263 | + | if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { | |||
| 264 | + | return returnFunc() | |||
| 265 | + | } | |||
| 266 | + | if returnFunc, ok := ret.Get(0).(func() []string); ok { | |||
| 267 | + | r0 = returnFunc() | |||
| 268 | + | } else { | |||
| 269 | + | if ret.Get(0) != nil { | |||
| 270 | + | r0 = ret.Get(0).([]string) | |||
| 271 | + | } | |||
| 272 | + | } | |||
| 273 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 274 | + | r1 = returnFunc() | |||
| 275 | + | } else { | |||
| 276 | + | r1 = ret.Error(1) | |||
| 277 | + | } | |||
| 278 | + | return r0, r1 | |||
| 279 | + | } | |||
| 280 | + | ||||
| 281 | + | // MockConfigMigrator_Migrate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Migrate' | |||
| 282 | + | type MockConfigMigrator_Migrate_Call struct { | |||
| 283 | + | *mock.Call | |||
| 284 | + | } | |||
| 285 | + | ||||
| 286 | + | // Migrate is a helper method to define mock.On call | |||
| 287 | + | func (_e *MockConfigMigrator_Expecter) Migrate() *MockConfigMigrator_Migrate_Call { | |||
| 288 | + | return &MockConfigMigrator_Migrate_Call{Call: _e.mock.On("Migrate")} | |||
| 289 | + | } | |||
| 290 | + | ||||
| 291 | + | func (_c *MockConfigMigrator_Migrate_Call) Run(run func()) *MockConfigMigrator_Migrate_Call { | |||
| 292 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 293 | + | run() | |||
| 294 | + | }) | |||
| 295 | + | return _c | |||
| 296 | + | } | |||
| 297 | + | ||||
| 298 | + | func (_c *MockConfigMigrator_Migrate_Call) Return(strings []string, err error) *MockConfigMigrator_Migrate_Call { | |||
| 299 | + | _c.Call.Return(strings, err) | |||
| 300 | + | return _c | |||
| 301 | + | } | |||
| 302 | + | ||||
| 303 | + | func (_c *MockConfigMigrator_Migrate_Call) RunAndReturn(run func() ([]string, error)) *MockConfigMigrator_Migrate_Call { | |||
| 304 | + | _c.Call.Return(run) | |||
| 305 | + | return _c | |||
| 306 | + | } | |||
| 307 | + | ||||
| 308 | + | // NewMockDiffFormatter creates a new instance of MockDiffFormatter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 309 | + | // The first argument is typically a *testing.T value. | |||
| 310 | + | func NewMockDiffFormatter(t interface { | |||
| 311 | + | mock.TestingT | |||
| 312 | + | Cleanup(func()) | |||
| 313 | + | }) *MockDiffFormatter { | |||
| 314 | + | mock := &MockDiffFormatter{} | |||
| 315 | + | mock.Mock.Test(t) | |||
| 316 | + | ||||
| 317 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 318 | + | ||||
| 319 | + | return mock | |||
| 320 | + | } | |||
| 321 | + | ||||
| 322 | + | // MockDiffFormatter is an autogenerated mock type for the DiffFormatter type | |||
| 323 | + | type MockDiffFormatter struct { | |||
| 324 | + | mock.Mock | |||
| 325 | + | } | |||
| 326 | + | ||||
| 327 | + | type MockDiffFormatter_Expecter struct { | |||
| 328 | + | mock *mock.Mock | |||
| 329 | + | } | |||
| 330 | + | ||||
| 331 | + | func (_m *MockDiffFormatter) EXPECT() *MockDiffFormatter_Expecter { | |||
| 332 | + | return &MockDiffFormatter_Expecter{mock: &_m.Mock} | |||
| 333 | + | } | |||
| 334 | + | ||||
| 335 | + | // FormatChangesAsDiff provides a mock function for the type MockDiffFormatter | |||
| 336 | + | func (_mock *MockDiffFormatter) FormatChangesAsDiff(changes []port.KeyChange) string { | |||
| 337 | + | ret := _mock.Called(changes) | |||
| 338 | + | ||||
| 339 | + | if len(ret) == 0 { | |||
| 340 | + | panic("no return value specified for FormatChangesAsDiff") | |||
| 341 | + | } | |||
| 342 | + | ||||
| 343 | + | var r0 string | |||
| 344 | + | if returnFunc, ok := ret.Get(0).(func([]port.KeyChange) string); ok { | |||
| 345 | + | r0 = returnFunc(changes) | |||
| 346 | + | } else { | |||
| 347 | + | r0 = ret.Get(0).(string) | |||
| 348 | + | } | |||
| 349 | + | return r0 | |||
| 350 | + | } | |||
| 351 | + | ||||
| 352 | + | // MockDiffFormatter_FormatChangesAsDiff_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FormatChangesAsDiff' | |||
| 353 | + | type MockDiffFormatter_FormatChangesAsDiff_Call struct { | |||
| 354 | + | *mock.Call | |||
| 355 | + | } | |||
| 356 | + | ||||
| 357 | + | // FormatChangesAsDiff is a helper method to define mock.On call | |||
| 358 | + | // - changes []port.KeyChange | |||
| 359 | + | func (_e *MockDiffFormatter_Expecter) FormatChangesAsDiff(changes any) *MockDiffFormatter_FormatChangesAsDiff_Call { | |||
| 360 | + | return &MockDiffFormatter_FormatChangesAsDiff_Call{Call: _e.mock.On("FormatChangesAsDiff", changes)} | |||
| 361 | + | } | |||
| 362 | + | ||||
| 363 | + | func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Run(run func(changes []port.KeyChange)) *MockDiffFormatter_FormatChangesAsDiff_Call { | |||
| 364 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 365 | + | var arg0 []port.KeyChange | |||
| 366 | + | if args[0] != nil { | |||
| 367 | + | arg0 = args[0].([]port.KeyChange) | |||
| 368 | + | } | |||
| 369 | + | run( | |||
| 370 | + | arg0, | |||
| 371 | + | ) | |||
| 372 | + | }) | |||
| 373 | + | return _c | |||
| 374 | + | } | |||
| 375 | + | ||||
| 376 | + | func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Return(s string) *MockDiffFormatter_FormatChangesAsDiff_Call { | |||
| 377 | + | _c.Call.Return(s) | |||
| 378 | + | return _c | |||
| 379 | + | } | |||
| 380 | + | ||||
| 381 | + | func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) RunAndReturn(run func(changes []port.KeyChange) string) *MockDiffFormatter_FormatChangesAsDiff_Call { | |||
| 382 | + | _c.Call.Return(run) | |||
| 383 | + | return _c | |||
| 384 | + | } | |||
A internal/application/port/mocks/config_schema.go +83 -0
| @@ -0,0 +1,83 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 9 | + | mock "github.com/stretchr/testify/mock" | |||
| 10 | + | ) | |||
| 11 | + | ||||
| 12 | + | // NewMockConfigSchemaProvider creates a new instance of MockConfigSchemaProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 13 | + | // The first argument is typically a *testing.T value. | |||
| 14 | + | func NewMockConfigSchemaProvider(t interface { | |||
| 15 | + | mock.TestingT | |||
| 16 | + | Cleanup(func()) | |||
| 17 | + | }) *MockConfigSchemaProvider { | |||
| 18 | + | mock := &MockConfigSchemaProvider{} | |||
| 19 | + | mock.Mock.Test(t) | |||
| 20 | + | ||||
| 21 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 22 | + | ||||
| 23 | + | return mock | |||
| 24 | + | } | |||
| 25 | + | ||||
| 26 | + | // MockConfigSchemaProvider is an autogenerated mock type for the ConfigSchemaProvider type | |||
| 27 | + | type MockConfigSchemaProvider struct { | |||
| 28 | + | mock.Mock | |||
| 29 | + | } | |||
| 30 | + | ||||
| 31 | + | type MockConfigSchemaProvider_Expecter struct { | |||
| 32 | + | mock *mock.Mock | |||
| 33 | + | } | |||
| 34 | + | ||||
| 35 | + | func (_m *MockConfigSchemaProvider) EXPECT() *MockConfigSchemaProvider_Expecter { | |||
| 36 | + | return &MockConfigSchemaProvider_Expecter{mock: &_m.Mock} | |||
| 37 | + | } | |||
| 38 | + | ||||
| 39 | + | // GetSchema provides a mock function for the type MockConfigSchemaProvider | |||
| 40 | + | func (_mock *MockConfigSchemaProvider) GetSchema() []entity.ConfigKeyInfo { | |||
| 41 | + | ret := _mock.Called() | |||
| 42 | + | ||||
| 43 | + | if len(ret) == 0 { | |||
| 44 | + | panic("no return value specified for GetSchema") | |||
| 45 | + | } | |||
| 46 | + | ||||
| 47 | + | var r0 []entity.ConfigKeyInfo | |||
| 48 | + | if returnFunc, ok := ret.Get(0).(func() []entity.ConfigKeyInfo); ok { | |||
| 49 | + | r0 = returnFunc() | |||
| 50 | + | } else { | |||
| 51 | + | if ret.Get(0) != nil { | |||
| 52 | + | r0 = ret.Get(0).([]entity.ConfigKeyInfo) | |||
| 53 | + | } | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockConfigSchemaProvider_GetSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchema' | |||
| 59 | + | type MockConfigSchemaProvider_GetSchema_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // GetSchema is a helper method to define mock.On call | |||
| 64 | + | func (_e *MockConfigSchemaProvider_Expecter) GetSchema() *MockConfigSchemaProvider_GetSchema_Call { | |||
| 65 | + | return &MockConfigSchemaProvider_GetSchema_Call{Call: _e.mock.On("GetSchema")} | |||
| 66 | + | } | |||
| 67 | + | ||||
| 68 | + | func (_c *MockConfigSchemaProvider_GetSchema_Call) Run(run func()) *MockConfigSchemaProvider_GetSchema_Call { | |||
| 69 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 70 | + | run() | |||
| 71 | + | }) | |||
| 72 | + | return _c | |||
| 73 | + | } | |||
| 74 | + | ||||
| 75 | + | func (_c *MockConfigSchemaProvider_GetSchema_Call) Return(configKeyInfos []entity.ConfigKeyInfo) *MockConfigSchemaProvider_GetSchema_Call { | |||
| 76 | + | _c.Call.Return(configKeyInfos) | |||
| 77 | + | return _c | |||
| 78 | + | } | |||
| 79 | + | ||||
| 80 | + | func (_c *MockConfigSchemaProvider_GetSchema_Call) RunAndReturn(run func() []entity.ConfigKeyInfo) *MockConfigSchemaProvider_GetSchema_Call { | |||
| 81 | + | _c.Call.Return(run) | |||
| 82 | + | return _c | |||
| 83 | + | } | |||
A internal/application/port/mocks/config_transformer.go +116 -0
| @@ -0,0 +1,116 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | mock "github.com/stretchr/testify/mock" | |||
| 9 | + | ) | |||
| 10 | + | ||||
| 11 | + | // NewMockConfigTransformer creates a new instance of MockConfigTransformer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 12 | + | // The first argument is typically a *testing.T value. | |||
| 13 | + | func NewMockConfigTransformer(t interface { | |||
| 14 | + | mock.TestingT | |||
| 15 | + | Cleanup(func()) | |||
| 16 | + | }) *MockConfigTransformer { | |||
| 17 | + | mock := &MockConfigTransformer{} | |||
| 18 | + | mock.Mock.Test(t) | |||
| 19 | + | ||||
| 20 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 21 | + | ||||
| 22 | + | return mock | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | // MockConfigTransformer is an autogenerated mock type for the ConfigTransformer type | |||
| 26 | + | type MockConfigTransformer struct { | |||
| 27 | + | mock.Mock | |||
| 28 | + | } | |||
| 29 | + | ||||
| 30 | + | type MockConfigTransformer_Expecter struct { | |||
| 31 | + | mock *mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | func (_m *MockConfigTransformer) EXPECT() *MockConfigTransformer_Expecter { | |||
| 35 | + | return &MockConfigTransformer_Expecter{mock: &_m.Mock} | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | // TransformLegacyActions provides a mock function for the type MockConfigTransformer | |||
| 39 | + | func (_mock *MockConfigTransformer) TransformLegacyActions(rawConfig map[string]any) { | |||
| 40 | + | _mock.Called(rawConfig) | |||
| 41 | + | return | |||
| 42 | + | } | |||
| 43 | + | ||||
| 44 | + | // MockConfigTransformer_TransformLegacyActions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransformLegacyActions' | |||
| 45 | + | type MockConfigTransformer_TransformLegacyActions_Call struct { | |||
| 46 | + | *mock.Call | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | // TransformLegacyActions is a helper method to define mock.On call | |||
| 50 | + | // - rawConfig map[string]any | |||
| 51 | + | func (_e *MockConfigTransformer_Expecter) TransformLegacyActions(rawConfig any) *MockConfigTransformer_TransformLegacyActions_Call { | |||
| 52 | + | return &MockConfigTransformer_TransformLegacyActions_Call{Call: _e.mock.On("TransformLegacyActions", rawConfig)} | |||
| 53 | + | } | |||
| 54 | + | ||||
| 55 | + | func (_c *MockConfigTransformer_TransformLegacyActions_Call) Run(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyActions_Call { | |||
| 56 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 57 | + | var arg0 map[string]any | |||
| 58 | + | if args[0] != nil { | |||
| 59 | + | arg0 = args[0].(map[string]any) | |||
| 60 | + | } | |||
| 61 | + | run( | |||
| 62 | + | arg0, | |||
| 63 | + | ) | |||
| 64 | + | }) | |||
| 65 | + | return _c | |||
| 66 | + | } | |||
| 67 | + | ||||
| 68 | + | func (_c *MockConfigTransformer_TransformLegacyActions_Call) Return() *MockConfigTransformer_TransformLegacyActions_Call { | |||
| 69 | + | _c.Call.Return() | |||
| 70 | + | return _c | |||
| 71 | + | } | |||
| 72 | + | ||||
| 73 | + | func (_c *MockConfigTransformer_TransformLegacyActions_Call) RunAndReturn(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyActions_Call { | |||
| 74 | + | _c.Run(run) | |||
| 75 | + | return _c | |||
| 76 | + | } | |||
| 77 | + | ||||
| 78 | + | // TransformLegacyEngineConfig provides a mock function for the type MockConfigTransformer | |||
| 79 | + | func (_mock *MockConfigTransformer) TransformLegacyEngineConfig(rawConfig map[string]any) { | |||
| 80 | + | _mock.Called(rawConfig) | |||
| 81 | + | return | |||
| 82 | + | } | |||
| 83 | + | ||||
| 84 | + | // MockConfigTransformer_TransformLegacyEngineConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransformLegacyEngineConfig' | |||
| 85 | + | type MockConfigTransformer_TransformLegacyEngineConfig_Call struct { | |||
| 86 | + | *mock.Call | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | // TransformLegacyEngineConfig is a helper method to define mock.On call | |||
| 90 | + | // - rawConfig map[string]any | |||
| 91 | + | func (_e *MockConfigTransformer_Expecter) TransformLegacyEngineConfig(rawConfig any) *MockConfigTransformer_TransformLegacyEngineConfig_Call { | |||
| 92 | + | return &MockConfigTransformer_TransformLegacyEngineConfig_Call{Call: _e.mock.On("TransformLegacyEngineConfig", rawConfig)} | |||
| 93 | + | } | |||
| 94 | + | ||||
| 95 | + | func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) Run(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyEngineConfig_Call { | |||
| 96 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 97 | + | var arg0 map[string]any | |||
| 98 | + | if args[0] != nil { | |||
| 99 | + | arg0 = args[0].(map[string]any) | |||
| 100 | + | } | |||
| 101 | + | run( | |||
| 102 | + | arg0, | |||
| 103 | + | ) | |||
| 104 | + | }) | |||
| 105 | + | return _c | |||
| 106 | + | } | |||
| 107 | + | ||||
| 108 | + | func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) Return() *MockConfigTransformer_TransformLegacyEngineConfig_Call { | |||
| 109 | + | _c.Call.Return() | |||
| 110 | + | return _c | |||
| 111 | + | } | |||
| 112 | + | ||||
| 113 | + | func (_c *MockConfigTransformer_TransformLegacyEngineConfig_Call) RunAndReturn(run func(rawConfig map[string]any)) *MockConfigTransformer_TransformLegacyEngineConfig_Call { | |||
| 114 | + | _c.Run(run) | |||
| 115 | + | return _c | |||
| 116 | + | } | |||
A internal/application/port/mocks/content_injector.go +210 -0
| @@ -0,0 +1,210 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockContentInjector creates a new instance of MockContentInjector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockContentInjector(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockContentInjector { | |||
| 20 | + | mock := &MockContentInjector{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockContentInjector is an autogenerated mock type for the ContentInjector type | |||
| 29 | + | type MockContentInjector struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockContentInjector_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockContentInjector) EXPECT() *MockContentInjector_Expecter { | |||
| 38 | + | return &MockContentInjector_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // InjectFindHighlightCSS provides a mock function for the type MockContentInjector | |||
| 42 | + | func (_mock *MockContentInjector) InjectFindHighlightCSS(ctx context.Context, css string) error { | |||
| 43 | + | ret := _mock.Called(ctx, css) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for InjectFindHighlightCSS") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, css) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockContentInjector_InjectFindHighlightCSS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InjectFindHighlightCSS' | |||
| 59 | + | type MockContentInjector_InjectFindHighlightCSS_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // InjectFindHighlightCSS is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - css string | |||
| 66 | + | func (_e *MockContentInjector_Expecter) InjectFindHighlightCSS(ctx any, css any) *MockContentInjector_InjectFindHighlightCSS_Call { | |||
| 67 | + | return &MockContentInjector_InjectFindHighlightCSS_Call{Call: _e.mock.On("InjectFindHighlightCSS", ctx, css)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockContentInjector_InjectFindHighlightCSS_Call) Run(run func(ctx context.Context, css string)) *MockContentInjector_InjectFindHighlightCSS_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 context.Context | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(context.Context) | |||
| 75 | + | } | |||
| 76 | + | var arg1 string | |||
| 77 | + | if args[1] != nil { | |||
| 78 | + | arg1 = args[1].(string) | |||
| 79 | + | } | |||
| 80 | + | run( | |||
| 81 | + | arg0, | |||
| 82 | + | arg1, | |||
| 83 | + | ) | |||
| 84 | + | }) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockContentInjector_InjectFindHighlightCSS_Call) Return(err error) *MockContentInjector_InjectFindHighlightCSS_Call { | |||
| 89 | + | _c.Call.Return(err) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockContentInjector_InjectFindHighlightCSS_Call) RunAndReturn(run func(ctx context.Context, css string) error) *MockContentInjector_InjectFindHighlightCSS_Call { | |||
| 94 | + | _c.Call.Return(run) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | // InjectThemeCSS provides a mock function for the type MockContentInjector | |||
| 99 | + | func (_mock *MockContentInjector) InjectThemeCSS(ctx context.Context, css string) error { | |||
| 100 | + | ret := _mock.Called(ctx, css) | |||
| 101 | + | ||||
| 102 | + | if len(ret) == 0 { | |||
| 103 | + | panic("no return value specified for InjectThemeCSS") | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | var r0 error | |||
| 107 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 108 | + | r0 = returnFunc(ctx, css) | |||
| 109 | + | } else { | |||
| 110 | + | r0 = ret.Error(0) | |||
| 111 | + | } | |||
| 112 | + | return r0 | |||
| 113 | + | } | |||
| 114 | + | ||||
| 115 | + | // MockContentInjector_InjectThemeCSS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InjectThemeCSS' | |||
| 116 | + | type MockContentInjector_InjectThemeCSS_Call struct { | |||
| 117 | + | *mock.Call | |||
| 118 | + | } | |||
| 119 | + | ||||
| 120 | + | // InjectThemeCSS is a helper method to define mock.On call | |||
| 121 | + | // - ctx context.Context | |||
| 122 | + | // - css string | |||
| 123 | + | func (_e *MockContentInjector_Expecter) InjectThemeCSS(ctx any, css any) *MockContentInjector_InjectThemeCSS_Call { | |||
| 124 | + | return &MockContentInjector_InjectThemeCSS_Call{Call: _e.mock.On("InjectThemeCSS", ctx, css)} | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | func (_c *MockContentInjector_InjectThemeCSS_Call) Run(run func(ctx context.Context, css string)) *MockContentInjector_InjectThemeCSS_Call { | |||
| 128 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 129 | + | var arg0 context.Context | |||
| 130 | + | if args[0] != nil { | |||
| 131 | + | arg0 = args[0].(context.Context) | |||
| 132 | + | } | |||
| 133 | + | var arg1 string | |||
| 134 | + | if args[1] != nil { | |||
| 135 | + | arg1 = args[1].(string) | |||
| 136 | + | } | |||
| 137 | + | run( | |||
| 138 | + | arg0, | |||
| 139 | + | arg1, | |||
| 140 | + | ) | |||
| 141 | + | }) | |||
| 142 | + | return _c | |||
| 143 | + | } | |||
| 144 | + | ||||
| 145 | + | func (_c *MockContentInjector_InjectThemeCSS_Call) Return(err error) *MockContentInjector_InjectThemeCSS_Call { | |||
| 146 | + | _c.Call.Return(err) | |||
| 147 | + | return _c | |||
| 148 | + | } | |||
| 149 | + | ||||
| 150 | + | func (_c *MockContentInjector_InjectThemeCSS_Call) RunAndReturn(run func(ctx context.Context, css string) error) *MockContentInjector_InjectThemeCSS_Call { | |||
| 151 | + | _c.Call.Return(run) | |||
| 152 | + | return _c | |||
| 153 | + | } | |||
| 154 | + | ||||
| 155 | + | // RefreshScripts provides a mock function for the type MockContentInjector | |||
| 156 | + | func (_mock *MockContentInjector) RefreshScripts(ctx context.Context, wv port.WebView) error { | |||
| 157 | + | ret := _mock.Called(ctx, wv) | |||
| 158 | + | ||||
| 159 | + | if len(ret) == 0 { | |||
| 160 | + | panic("no return value specified for RefreshScripts") | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | var r0 error | |||
| 164 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebView) error); ok { | |||
| 165 | + | r0 = returnFunc(ctx, wv) | |||
| 166 | + | } else { | |||
| 167 | + | r0 = ret.Error(0) | |||
| 168 | + | } | |||
| 169 | + | return r0 | |||
| 170 | + | } | |||
| 171 | + | ||||
| 172 | + | // MockContentInjector_RefreshScripts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshScripts' | |||
| 173 | + | type MockContentInjector_RefreshScripts_Call struct { | |||
| 174 | + | *mock.Call | |||
| 175 | + | } | |||
| 176 | + | ||||
| 177 | + | // RefreshScripts is a helper method to define mock.On call | |||
| 178 | + | // - ctx context.Context | |||
| 179 | + | // - wv port.WebView | |||
| 180 | + | func (_e *MockContentInjector_Expecter) RefreshScripts(ctx any, wv any) *MockContentInjector_RefreshScripts_Call { | |||
| 181 | + | return &MockContentInjector_RefreshScripts_Call{Call: _e.mock.On("RefreshScripts", ctx, wv)} | |||
| 182 | + | } | |||
| 183 | + | ||||
| 184 | + | func (_c *MockContentInjector_RefreshScripts_Call) Run(run func(ctx context.Context, wv port.WebView)) *MockContentInjector_RefreshScripts_Call { | |||
| 185 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 186 | + | var arg0 context.Context | |||
| 187 | + | if args[0] != nil { | |||
| 188 | + | arg0 = args[0].(context.Context) | |||
| 189 | + | } | |||
| 190 | + | var arg1 port.WebView | |||
| 191 | + | if args[1] != nil { | |||
| 192 | + | arg1 = args[1].(port.WebView) | |||
| 193 | + | } | |||
| 194 | + | run( | |||
| 195 | + | arg0, | |||
| 196 | + | arg1, | |||
| 197 | + | ) | |||
| 198 | + | }) | |||
| 199 | + | return _c | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | func (_c *MockContentInjector_RefreshScripts_Call) Return(err error) *MockContentInjector_RefreshScripts_Call { | |||
| 203 | + | _c.Call.Return(err) | |||
| 204 | + | return _c | |||
| 205 | + | } | |||
| 206 | + | ||||
| 207 | + | func (_c *MockContentInjector_RefreshScripts_Call) RunAndReturn(run func(ctx context.Context, wv port.WebView) error) *MockContentInjector_RefreshScripts_Call { | |||
| 208 | + | _c.Call.Return(run) | |||
| 209 | + | return _c | |||
| 210 | + | } | |||
A internal/application/port/mocks/context_menu.go +376 -0
| @@ -0,0 +1,376 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockContextMenuBuilder creates a new instance of MockContextMenuBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockContextMenuBuilder(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockContextMenuBuilder { | |||
| 20 | + | mock := &MockContextMenuBuilder{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockContextMenuBuilder is an autogenerated mock type for the ContextMenuBuilder type | |||
| 29 | + | type MockContextMenuBuilder struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockContextMenuBuilder_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockContextMenuBuilder) EXPECT() *MockContextMenuBuilder_Expecter { | |||
| 38 | + | return &MockContextMenuBuilder_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Build provides a mock function for the type MockContextMenuBuilder | |||
| 42 | + | func (_mock *MockContextMenuBuilder) Build(ctx context.Context, menuContext port.MenuContext) []port.MenuItem { | |||
| 43 | + | ret := _mock.Called(ctx, menuContext) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Build") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 []port.MenuItem | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuContext) []port.MenuItem); ok { | |||
| 51 | + | r0 = returnFunc(ctx, menuContext) | |||
| 52 | + | } else { | |||
| 53 | + | if ret.Get(0) != nil { | |||
| 54 | + | r0 = ret.Get(0).([]port.MenuItem) | |||
| 55 | + | } | |||
| 56 | + | } | |||
| 57 | + | return r0 | |||
| 58 | + | } | |||
| 59 | + | ||||
| 60 | + | // MockContextMenuBuilder_Build_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Build' | |||
| 61 | + | type MockContextMenuBuilder_Build_Call struct { | |||
| 62 | + | *mock.Call | |||
| 63 | + | } | |||
| 64 | + | ||||
| 65 | + | // Build is a helper method to define mock.On call | |||
| 66 | + | // - ctx context.Context | |||
| 67 | + | // - menuContext port.MenuContext | |||
| 68 | + | func (_e *MockContextMenuBuilder_Expecter) Build(ctx any, menuContext any) *MockContextMenuBuilder_Build_Call { | |||
| 69 | + | return &MockContextMenuBuilder_Build_Call{Call: _e.mock.On("Build", ctx, menuContext)} | |||
| 70 | + | } | |||
| 71 | + | ||||
| 72 | + | func (_c *MockContextMenuBuilder_Build_Call) Run(run func(ctx context.Context, menuContext port.MenuContext)) *MockContextMenuBuilder_Build_Call { | |||
| 73 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 74 | + | var arg0 context.Context | |||
| 75 | + | if args[0] != nil { | |||
| 76 | + | arg0 = args[0].(context.Context) | |||
| 77 | + | } | |||
| 78 | + | var arg1 port.MenuContext | |||
| 79 | + | if args[1] != nil { | |||
| 80 | + | arg1 = args[1].(port.MenuContext) | |||
| 81 | + | } | |||
| 82 | + | run( | |||
| 83 | + | arg0, | |||
| 84 | + | arg1, | |||
| 85 | + | ) | |||
| 86 | + | }) | |||
| 87 | + | return _c | |||
| 88 | + | } | |||
| 89 | + | ||||
| 90 | + | func (_c *MockContextMenuBuilder_Build_Call) Return(menuItems []port.MenuItem) *MockContextMenuBuilder_Build_Call { | |||
| 91 | + | _c.Call.Return(menuItems) | |||
| 92 | + | return _c | |||
| 93 | + | } | |||
| 94 | + | ||||
| 95 | + | func (_c *MockContextMenuBuilder_Build_Call) RunAndReturn(run func(ctx context.Context, menuContext port.MenuContext) []port.MenuItem) *MockContextMenuBuilder_Build_Call { | |||
| 96 | + | _c.Call.Return(run) | |||
| 97 | + | return _c | |||
| 98 | + | } | |||
| 99 | + | ||||
| 100 | + | // NewMockContextMenuActionExecutor creates a new instance of MockContextMenuActionExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 101 | + | // The first argument is typically a *testing.T value. | |||
| 102 | + | func NewMockContextMenuActionExecutor(t interface { | |||
| 103 | + | mock.TestingT | |||
| 104 | + | Cleanup(func()) | |||
| 105 | + | }) *MockContextMenuActionExecutor { | |||
| 106 | + | mock := &MockContextMenuActionExecutor{} | |||
| 107 | + | mock.Mock.Test(t) | |||
| 108 | + | ||||
| 109 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 110 | + | ||||
| 111 | + | return mock | |||
| 112 | + | } | |||
| 113 | + | ||||
| 114 | + | // MockContextMenuActionExecutor is an autogenerated mock type for the ContextMenuActionExecutor type | |||
| 115 | + | type MockContextMenuActionExecutor struct { | |||
| 116 | + | mock.Mock | |||
| 117 | + | } | |||
| 118 | + | ||||
| 119 | + | type MockContextMenuActionExecutor_Expecter struct { | |||
| 120 | + | mock *mock.Mock | |||
| 121 | + | } | |||
| 122 | + | ||||
| 123 | + | func (_m *MockContextMenuActionExecutor) EXPECT() *MockContextMenuActionExecutor_Expecter { | |||
| 124 | + | return &MockContextMenuActionExecutor_Expecter{mock: &_m.Mock} | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | // ExecuteMenuAction provides a mock function for the type MockContextMenuActionExecutor | |||
| 128 | + | func (_mock *MockContextMenuActionExecutor) ExecuteMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error { | |||
| 129 | + | ret := _mock.Called(ctx, action, menuContext) | |||
| 130 | + | ||||
| 131 | + | if len(ret) == 0 { | |||
| 132 | + | panic("no return value specified for ExecuteMenuAction") | |||
| 133 | + | } | |||
| 134 | + | ||||
| 135 | + | var r0 error | |||
| 136 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok { | |||
| 137 | + | r0 = returnFunc(ctx, action, menuContext) | |||
| 138 | + | } else { | |||
| 139 | + | r0 = ret.Error(0) | |||
| 140 | + | } | |||
| 141 | + | return r0 | |||
| 142 | + | } | |||
| 143 | + | ||||
| 144 | + | // MockContextMenuActionExecutor_ExecuteMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteMenuAction' | |||
| 145 | + | type MockContextMenuActionExecutor_ExecuteMenuAction_Call struct { | |||
| 146 | + | *mock.Call | |||
| 147 | + | } | |||
| 148 | + | ||||
| 149 | + | // ExecuteMenuAction is a helper method to define mock.On call | |||
| 150 | + | // - ctx context.Context | |||
| 151 | + | // - action port.MenuAction | |||
| 152 | + | // - menuContext port.MenuContext | |||
| 153 | + | func (_e *MockContextMenuActionExecutor_Expecter) ExecuteMenuAction(ctx any, action any, menuContext any) *MockContextMenuActionExecutor_ExecuteMenuAction_Call { | |||
| 154 | + | return &MockContextMenuActionExecutor_ExecuteMenuAction_Call{Call: _e.mock.On("ExecuteMenuAction", ctx, action, menuContext)} | |||
| 155 | + | } | |||
| 156 | + | ||||
| 157 | + | func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockContextMenuActionExecutor_ExecuteMenuAction_Call { | |||
| 158 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 159 | + | var arg0 context.Context | |||
| 160 | + | if args[0] != nil { | |||
| 161 | + | arg0 = args[0].(context.Context) | |||
| 162 | + | } | |||
| 163 | + | var arg1 port.MenuAction | |||
| 164 | + | if args[1] != nil { | |||
| 165 | + | arg1 = args[1].(port.MenuAction) | |||
| 166 | + | } | |||
| 167 | + | var arg2 port.MenuContext | |||
| 168 | + | if args[2] != nil { | |||
| 169 | + | arg2 = args[2].(port.MenuContext) | |||
| 170 | + | } | |||
| 171 | + | run( | |||
| 172 | + | arg0, | |||
| 173 | + | arg1, | |||
| 174 | + | arg2, | |||
| 175 | + | ) | |||
| 176 | + | }) | |||
| 177 | + | return _c | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) Return(err error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call { | |||
| 181 | + | _c.Call.Return(err) | |||
| 182 | + | return _c | |||
| 183 | + | } | |||
| 184 | + | ||||
| 185 | + | func (_c *MockContextMenuActionExecutor_ExecuteMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockContextMenuActionExecutor_ExecuteMenuAction_Call { | |||
| 186 | + | _c.Call.Return(run) | |||
| 187 | + | return _c | |||
| 188 | + | } | |||
| 189 | + | ||||
| 190 | + | // NewMockContextMenuActionExecutorFactory creates a new instance of MockContextMenuActionExecutorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 191 | + | // The first argument is typically a *testing.T value. | |||
| 192 | + | func NewMockContextMenuActionExecutorFactory(t interface { | |||
| 193 | + | mock.TestingT | |||
| 194 | + | Cleanup(func()) | |||
| 195 | + | }) *MockContextMenuActionExecutorFactory { | |||
| 196 | + | mock := &MockContextMenuActionExecutorFactory{} | |||
| 197 | + | mock.Mock.Test(t) | |||
| 198 | + | ||||
| 199 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 200 | + | ||||
| 201 | + | return mock | |||
| 202 | + | } | |||
| 203 | + | ||||
| 204 | + | // MockContextMenuActionExecutorFactory is an autogenerated mock type for the ContextMenuActionExecutorFactory type | |||
| 205 | + | type MockContextMenuActionExecutorFactory struct { | |||
| 206 | + | mock.Mock | |||
| 207 | + | } | |||
| 208 | + | ||||
| 209 | + | type MockContextMenuActionExecutorFactory_Expecter struct { | |||
| 210 | + | mock *mock.Mock | |||
| 211 | + | } | |||
| 212 | + | ||||
| 213 | + | func (_m *MockContextMenuActionExecutorFactory) EXPECT() *MockContextMenuActionExecutorFactory_Expecter { | |||
| 214 | + | return &MockContextMenuActionExecutorFactory_Expecter{mock: &_m.Mock} | |||
| 215 | + | } | |||
| 216 | + | ||||
| 217 | + | // NewContextMenuActionExecutor provides a mock function for the type MockContextMenuActionExecutorFactory | |||
| 218 | + | func (_mock *MockContextMenuActionExecutorFactory) NewContextMenuActionExecutor(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor { | |||
| 219 | + | ret := _mock.Called(clipboard, resolver, saver, delegator) | |||
| 220 | + | ||||
| 221 | + | if len(ret) == 0 { | |||
| 222 | + | panic("no return value specified for NewContextMenuActionExecutor") | |||
| 223 | + | } | |||
| 224 | + | ||||
| 225 | + | var r0 port.ContextMenuActionExecutor | |||
| 226 | + | if returnFunc, ok := ret.Get(0).(func(port.Clipboard, port.ImageDataResolver, port.ResolvedImageSaver, port.MenuActionDelegator) port.ContextMenuActionExecutor); ok { | |||
| 227 | + | r0 = returnFunc(clipboard, resolver, saver, delegator) | |||
| 228 | + | } else { | |||
| 229 | + | if ret.Get(0) != nil { | |||
| 230 | + | r0 = ret.Get(0).(port.ContextMenuActionExecutor) | |||
| 231 | + | } | |||
| 232 | + | } | |||
| 233 | + | return r0 | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | // MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewContextMenuActionExecutor' | |||
| 237 | + | type MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call struct { | |||
| 238 | + | *mock.Call | |||
| 239 | + | } | |||
| 240 | + | ||||
| 241 | + | // NewContextMenuActionExecutor is a helper method to define mock.On call | |||
| 242 | + | // - clipboard port.Clipboard | |||
| 243 | + | // - resolver port.ImageDataResolver | |||
| 244 | + | // - saver port.ResolvedImageSaver | |||
| 245 | + | // - delegator port.MenuActionDelegator | |||
| 246 | + | func (_e *MockContextMenuActionExecutorFactory_Expecter) NewContextMenuActionExecutor(clipboard any, resolver any, saver any, delegator any) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call { | |||
| 247 | + | return &MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call{Call: _e.mock.On("NewContextMenuActionExecutor", clipboard, resolver, saver, delegator)} | |||
| 248 | + | } | |||
| 249 | + | ||||
| 250 | + | func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Run(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator)) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call { | |||
| 251 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 252 | + | var arg0 port.Clipboard | |||
| 253 | + | if args[0] != nil { | |||
| 254 | + | arg0 = args[0].(port.Clipboard) | |||
| 255 | + | } | |||
| 256 | + | var arg1 port.ImageDataResolver | |||
| 257 | + | if args[1] != nil { | |||
| 258 | + | arg1 = args[1].(port.ImageDataResolver) | |||
| 259 | + | } | |||
| 260 | + | var arg2 port.ResolvedImageSaver | |||
| 261 | + | if args[2] != nil { | |||
| 262 | + | arg2 = args[2].(port.ResolvedImageSaver) | |||
| 263 | + | } | |||
| 264 | + | var arg3 port.MenuActionDelegator | |||
| 265 | + | if args[3] != nil { | |||
| 266 | + | arg3 = args[3].(port.MenuActionDelegator) | |||
| 267 | + | } | |||
| 268 | + | run( | |||
| 269 | + | arg0, | |||
| 270 | + | arg1, | |||
| 271 | + | arg2, | |||
| 272 | + | arg3, | |||
| 273 | + | ) | |||
| 274 | + | }) | |||
| 275 | + | return _c | |||
| 276 | + | } | |||
| 277 | + | ||||
| 278 | + | func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) Return(contextMenuActionExecutor port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call { | |||
| 279 | + | _c.Call.Return(contextMenuActionExecutor) | |||
| 280 | + | return _c | |||
| 281 | + | } | |||
| 282 | + | ||||
| 283 | + | func (_c *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call) RunAndReturn(run func(clipboard port.Clipboard, resolver port.ImageDataResolver, saver port.ResolvedImageSaver, delegator port.MenuActionDelegator) port.ContextMenuActionExecutor) *MockContextMenuActionExecutorFactory_NewContextMenuActionExecutor_Call { | |||
| 284 | + | _c.Call.Return(run) | |||
| 285 | + | return _c | |||
| 286 | + | } | |||
| 287 | + | ||||
| 288 | + | // NewMockMenuActionDelegator creates a new instance of MockMenuActionDelegator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 289 | + | // The first argument is typically a *testing.T value. | |||
| 290 | + | func NewMockMenuActionDelegator(t interface { | |||
| 291 | + | mock.TestingT | |||
| 292 | + | Cleanup(func()) | |||
| 293 | + | }) *MockMenuActionDelegator { | |||
| 294 | + | mock := &MockMenuActionDelegator{} | |||
| 295 | + | mock.Mock.Test(t) | |||
| 296 | + | ||||
| 297 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 298 | + | ||||
| 299 | + | return mock | |||
| 300 | + | } | |||
| 301 | + | ||||
| 302 | + | // MockMenuActionDelegator is an autogenerated mock type for the MenuActionDelegator type | |||
| 303 | + | type MockMenuActionDelegator struct { | |||
| 304 | + | mock.Mock | |||
| 305 | + | } | |||
| 306 | + | ||||
| 307 | + | type MockMenuActionDelegator_Expecter struct { | |||
| 308 | + | mock *mock.Mock | |||
| 309 | + | } | |||
| 310 | + | ||||
| 311 | + | func (_m *MockMenuActionDelegator) EXPECT() *MockMenuActionDelegator_Expecter { | |||
| 312 | + | return &MockMenuActionDelegator_Expecter{mock: &_m.Mock} | |||
| 313 | + | } | |||
| 314 | + | ||||
| 315 | + | // DelegateMenuAction provides a mock function for the type MockMenuActionDelegator | |||
| 316 | + | func (_mock *MockMenuActionDelegator) DelegateMenuAction(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error { | |||
| 317 | + | ret := _mock.Called(ctx, action, menuContext) | |||
| 318 | + | ||||
| 319 | + | if len(ret) == 0 { | |||
| 320 | + | panic("no return value specified for DelegateMenuAction") | |||
| 321 | + | } | |||
| 322 | + | ||||
| 323 | + | var r0 error | |||
| 324 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.MenuAction, port.MenuContext) error); ok { | |||
| 325 | + | r0 = returnFunc(ctx, action, menuContext) | |||
| 326 | + | } else { | |||
| 327 | + | r0 = ret.Error(0) | |||
| 328 | + | } | |||
| 329 | + | return r0 | |||
| 330 | + | } | |||
| 331 | + | ||||
| 332 | + | // MockMenuActionDelegator_DelegateMenuAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DelegateMenuAction' | |||
| 333 | + | type MockMenuActionDelegator_DelegateMenuAction_Call struct { | |||
| 334 | + | *mock.Call | |||
| 335 | + | } | |||
| 336 | + | ||||
| 337 | + | // DelegateMenuAction is a helper method to define mock.On call | |||
| 338 | + | // - ctx context.Context | |||
| 339 | + | // - action port.MenuAction | |||
| 340 | + | // - menuContext port.MenuContext | |||
| 341 | + | func (_e *MockMenuActionDelegator_Expecter) DelegateMenuAction(ctx any, action any, menuContext any) *MockMenuActionDelegator_DelegateMenuAction_Call { | |||
| 342 | + | return &MockMenuActionDelegator_DelegateMenuAction_Call{Call: _e.mock.On("DelegateMenuAction", ctx, action, menuContext)} | |||
| 343 | + | } | |||
| 344 | + | ||||
| 345 | + | func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Run(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext)) *MockMenuActionDelegator_DelegateMenuAction_Call { | |||
| 346 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 347 | + | var arg0 context.Context | |||
| 348 | + | if args[0] != nil { | |||
| 349 | + | arg0 = args[0].(context.Context) | |||
| 350 | + | } | |||
| 351 | + | var arg1 port.MenuAction | |||
| 352 | + | if args[1] != nil { | |||
| 353 | + | arg1 = args[1].(port.MenuAction) | |||
| 354 | + | } | |||
| 355 | + | var arg2 port.MenuContext | |||
| 356 | + | if args[2] != nil { | |||
| 357 | + | arg2 = args[2].(port.MenuContext) | |||
| 358 | + | } | |||
| 359 | + | run( | |||
| 360 | + | arg0, | |||
| 361 | + | arg1, | |||
| 362 | + | arg2, | |||
| 363 | + | ) | |||
| 364 | + | }) | |||
| 365 | + | return _c | |||
| 366 | + | } | |||
| 367 | + | ||||
| 368 | + | func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) Return(err error) *MockMenuActionDelegator_DelegateMenuAction_Call { | |||
| 369 | + | _c.Call.Return(err) | |||
| 370 | + | return _c | |||
| 371 | + | } | |||
| 372 | + | ||||
| 373 | + | func (_c *MockMenuActionDelegator_DelegateMenuAction_Call) RunAndReturn(run func(ctx context.Context, action port.MenuAction, menuContext port.MenuContext) error) *MockMenuActionDelegator_DelegateMenuAction_Call { | |||
| 374 | + | _c.Call.Return(run) | |||
| 375 | + | return _c | |||
| 376 | + | } | |||
A internal/application/port/mocks/database.go +189 -0
| @@ -0,0 +1,189 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | "database/sql" | |||
| 10 | + | ||||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockDatabaseProvider creates a new instance of MockDatabaseProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockDatabaseProvider(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockDatabaseProvider { | |||
| 20 | + | mock := &MockDatabaseProvider{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockDatabaseProvider is an autogenerated mock type for the DatabaseProvider type | |||
| 29 | + | type MockDatabaseProvider struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockDatabaseProvider_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockDatabaseProvider) EXPECT() *MockDatabaseProvider_Expecter { | |||
| 38 | + | return &MockDatabaseProvider_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Close provides a mock function for the type MockDatabaseProvider | |||
| 42 | + | func (_mock *MockDatabaseProvider) Close() error { | |||
| 43 | + | ret := _mock.Called() | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Close") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func() error); ok { | |||
| 51 | + | r0 = returnFunc() | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockDatabaseProvider_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' | |||
| 59 | + | type MockDatabaseProvider_Close_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // Close is a helper method to define mock.On call | |||
| 64 | + | func (_e *MockDatabaseProvider_Expecter) Close() *MockDatabaseProvider_Close_Call { | |||
| 65 | + | return &MockDatabaseProvider_Close_Call{Call: _e.mock.On("Close")} | |||
| 66 | + | } | |||
| 67 | + | ||||
| 68 | + | func (_c *MockDatabaseProvider_Close_Call) Run(run func()) *MockDatabaseProvider_Close_Call { | |||
| 69 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 70 | + | run() | |||
| 71 | + | }) | |||
| 72 | + | return _c | |||
| 73 | + | } | |||
| 74 | + | ||||
| 75 | + | func (_c *MockDatabaseProvider_Close_Call) Return(err error) *MockDatabaseProvider_Close_Call { | |||
| 76 | + | _c.Call.Return(err) | |||
| 77 | + | return _c | |||
| 78 | + | } | |||
| 79 | + | ||||
| 80 | + | func (_c *MockDatabaseProvider_Close_Call) RunAndReturn(run func() error) *MockDatabaseProvider_Close_Call { | |||
| 81 | + | _c.Call.Return(run) | |||
| 82 | + | return _c | |||
| 83 | + | } | |||
| 84 | + | ||||
| 85 | + | // DB provides a mock function for the type MockDatabaseProvider | |||
| 86 | + | func (_mock *MockDatabaseProvider) DB(ctx context.Context) (*sql.DB, error) { | |||
| 87 | + | ret := _mock.Called(ctx) | |||
| 88 | + | ||||
| 89 | + | if len(ret) == 0 { | |||
| 90 | + | panic("no return value specified for DB") | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | var r0 *sql.DB | |||
| 94 | + | var r1 error | |||
| 95 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*sql.DB, error)); ok { | |||
| 96 | + | return returnFunc(ctx) | |||
| 97 | + | } | |||
| 98 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *sql.DB); ok { | |||
| 99 | + | r0 = returnFunc(ctx) | |||
| 100 | + | } else { | |||
| 101 | + | if ret.Get(0) != nil { | |||
| 102 | + | r0 = ret.Get(0).(*sql.DB) | |||
| 103 | + | } | |||
| 104 | + | } | |||
| 105 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 106 | + | r1 = returnFunc(ctx) | |||
| 107 | + | } else { | |||
| 108 | + | r1 = ret.Error(1) | |||
| 109 | + | } | |||
| 110 | + | return r0, r1 | |||
| 111 | + | } | |||
| 112 | + | ||||
| 113 | + | // MockDatabaseProvider_DB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DB' | |||
| 114 | + | type MockDatabaseProvider_DB_Call struct { | |||
| 115 | + | *mock.Call | |||
| 116 | + | } | |||
| 117 | + | ||||
| 118 | + | // DB is a helper method to define mock.On call | |||
| 119 | + | // - ctx context.Context | |||
| 120 | + | func (_e *MockDatabaseProvider_Expecter) DB(ctx any) *MockDatabaseProvider_DB_Call { | |||
| 121 | + | return &MockDatabaseProvider_DB_Call{Call: _e.mock.On("DB", ctx)} | |||
| 122 | + | } | |||
| 123 | + | ||||
| 124 | + | func (_c *MockDatabaseProvider_DB_Call) Run(run func(ctx context.Context)) *MockDatabaseProvider_DB_Call { | |||
| 125 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 126 | + | var arg0 context.Context | |||
| 127 | + | if args[0] != nil { | |||
| 128 | + | arg0 = args[0].(context.Context) | |||
| 129 | + | } | |||
| 130 | + | run( | |||
| 131 | + | arg0, | |||
| 132 | + | ) | |||
| 133 | + | }) | |||
| 134 | + | return _c | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | func (_c *MockDatabaseProvider_DB_Call) Return(dB *sql.DB, err error) *MockDatabaseProvider_DB_Call { | |||
| 138 | + | _c.Call.Return(dB, err) | |||
| 139 | + | return _c | |||
| 140 | + | } | |||
| 141 | + | ||||
| 142 | + | func (_c *MockDatabaseProvider_DB_Call) RunAndReturn(run func(ctx context.Context) (*sql.DB, error)) *MockDatabaseProvider_DB_Call { | |||
| 143 | + | _c.Call.Return(run) | |||
| 144 | + | return _c | |||
| 145 | + | } | |||
| 146 | + | ||||
| 147 | + | // IsInitialized provides a mock function for the type MockDatabaseProvider | |||
| 148 | + | func (_mock *MockDatabaseProvider) IsInitialized() bool { | |||
| 149 | + | ret := _mock.Called() | |||
| 150 | + | ||||
| 151 | + | if len(ret) == 0 { | |||
| 152 | + | panic("no return value specified for IsInitialized") | |||
| 153 | + | } | |||
| 154 | + | ||||
| 155 | + | var r0 bool | |||
| 156 | + | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |||
| 157 | + | r0 = returnFunc() | |||
| 158 | + | } else { | |||
| 159 | + | r0 = ret.Get(0).(bool) | |||
| 160 | + | } | |||
| 161 | + | return r0 | |||
| 162 | + | } | |||
| 163 | + | ||||
| 164 | + | // MockDatabaseProvider_IsInitialized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInitialized' | |||
| 165 | + | type MockDatabaseProvider_IsInitialized_Call struct { | |||
| 166 | + | *mock.Call | |||
| 167 | + | } | |||
| 168 | + | ||||
| 169 | + | // IsInitialized is a helper method to define mock.On call | |||
| 170 | + | func (_e *MockDatabaseProvider_Expecter) IsInitialized() *MockDatabaseProvider_IsInitialized_Call { | |||
| 171 | + | return &MockDatabaseProvider_IsInitialized_Call{Call: _e.mock.On("IsInitialized")} | |||
| 172 | + | } | |||
| 173 | + | ||||
| 174 | + | func (_c *MockDatabaseProvider_IsInitialized_Call) Run(run func()) *MockDatabaseProvider_IsInitialized_Call { | |||
| 175 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 176 | + | run() | |||
| 177 | + | }) | |||
| 178 | + | return _c | |||
| 179 | + | } | |||
| 180 | + | ||||
| 181 | + | func (_c *MockDatabaseProvider_IsInitialized_Call) Return(b bool) *MockDatabaseProvider_IsInitialized_Call { | |||
| 182 | + | _c.Call.Return(b) | |||
| 183 | + | return _c | |||
| 184 | + | } | |||
| 185 | + | ||||
| 186 | + | func (_c *MockDatabaseProvider_IsInitialized_Call) RunAndReturn(run func() bool) *MockDatabaseProvider_IsInitialized_Call { | |||
| 187 | + | _c.Call.Return(run) | |||
| 188 | + | return _c | |||
| 189 | + | } | |||
A internal/application/port/mocks/desktop.go +431 -0
| @@ -0,0 +1,431 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockDesktopIntegration creates a new instance of MockDesktopIntegration. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockDesktopIntegration(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockDesktopIntegration { | |||
| 20 | + | mock := &MockDesktopIntegration{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockDesktopIntegration is an autogenerated mock type for the DesktopIntegration type | |||
| 29 | + | type MockDesktopIntegration struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockDesktopIntegration_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockDesktopIntegration) EXPECT() *MockDesktopIntegration_Expecter { | |||
| 38 | + | return &MockDesktopIntegration_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // GetStatus provides a mock function for the type MockDesktopIntegration | |||
| 42 | + | func (_mock *MockDesktopIntegration) GetStatus(ctx context.Context) (*port.DesktopIntegrationStatus, error) { | |||
| 43 | + | ret := _mock.Called(ctx) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for GetStatus") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 *port.DesktopIntegrationStatus | |||
| 50 | + | var r1 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*port.DesktopIntegrationStatus, error)); ok { | |||
| 52 | + | return returnFunc(ctx) | |||
| 53 | + | } | |||
| 54 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *port.DesktopIntegrationStatus); ok { | |||
| 55 | + | r0 = returnFunc(ctx) | |||
| 56 | + | } else { | |||
| 57 | + | if ret.Get(0) != nil { | |||
| 58 | + | r0 = ret.Get(0).(*port.DesktopIntegrationStatus) | |||
| 59 | + | } | |||
| 60 | + | } | |||
| 61 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 62 | + | r1 = returnFunc(ctx) | |||
| 63 | + | } else { | |||
| 64 | + | r1 = ret.Error(1) | |||
| 65 | + | } | |||
| 66 | + | return r0, r1 | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | // MockDesktopIntegration_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus' | |||
| 70 | + | type MockDesktopIntegration_GetStatus_Call struct { | |||
| 71 | + | *mock.Call | |||
| 72 | + | } | |||
| 73 | + | ||||
| 74 | + | // GetStatus is a helper method to define mock.On call | |||
| 75 | + | // - ctx context.Context | |||
| 76 | + | func (_e *MockDesktopIntegration_Expecter) GetStatus(ctx any) *MockDesktopIntegration_GetStatus_Call { | |||
| 77 | + | return &MockDesktopIntegration_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx)} | |||
| 78 | + | } | |||
| 79 | + | ||||
| 80 | + | func (_c *MockDesktopIntegration_GetStatus_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_GetStatus_Call { | |||
| 81 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 82 | + | var arg0 context.Context | |||
| 83 | + | if args[0] != nil { | |||
| 84 | + | arg0 = args[0].(context.Context) | |||
| 85 | + | } | |||
| 86 | + | run( | |||
| 87 | + | arg0, | |||
| 88 | + | ) | |||
| 89 | + | }) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockDesktopIntegration_GetStatus_Call) Return(desktopIntegrationStatus *port.DesktopIntegrationStatus, err error) *MockDesktopIntegration_GetStatus_Call { | |||
| 94 | + | _c.Call.Return(desktopIntegrationStatus, err) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | func (_c *MockDesktopIntegration_GetStatus_Call) RunAndReturn(run func(ctx context.Context) (*port.DesktopIntegrationStatus, error)) *MockDesktopIntegration_GetStatus_Call { | |||
| 99 | + | _c.Call.Return(run) | |||
| 100 | + | return _c | |||
| 101 | + | } | |||
| 102 | + | ||||
| 103 | + | // InstallDesktopFile provides a mock function for the type MockDesktopIntegration | |||
| 104 | + | func (_mock *MockDesktopIntegration) InstallDesktopFile(ctx context.Context) (string, error) { | |||
| 105 | + | ret := _mock.Called(ctx) | |||
| 106 | + | ||||
| 107 | + | if len(ret) == 0 { | |||
| 108 | + | panic("no return value specified for InstallDesktopFile") | |||
| 109 | + | } | |||
| 110 | + | ||||
| 111 | + | var r0 string | |||
| 112 | + | var r1 error | |||
| 113 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok { | |||
| 114 | + | return returnFunc(ctx) | |||
| 115 | + | } | |||
| 116 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok { | |||
| 117 | + | r0 = returnFunc(ctx) | |||
| 118 | + | } else { | |||
| 119 | + | r0 = ret.Get(0).(string) | |||
| 120 | + | } | |||
| 121 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 122 | + | r1 = returnFunc(ctx) | |||
| 123 | + | } else { | |||
| 124 | + | r1 = ret.Error(1) | |||
| 125 | + | } | |||
| 126 | + | return r0, r1 | |||
| 127 | + | } | |||
| 128 | + | ||||
| 129 | + | // MockDesktopIntegration_InstallDesktopFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallDesktopFile' | |||
| 130 | + | type MockDesktopIntegration_InstallDesktopFile_Call struct { | |||
| 131 | + | *mock.Call | |||
| 132 | + | } | |||
| 133 | + | ||||
| 134 | + | // InstallDesktopFile is a helper method to define mock.On call | |||
| 135 | + | // - ctx context.Context | |||
| 136 | + | func (_e *MockDesktopIntegration_Expecter) InstallDesktopFile(ctx any) *MockDesktopIntegration_InstallDesktopFile_Call { | |||
| 137 | + | return &MockDesktopIntegration_InstallDesktopFile_Call{Call: _e.mock.On("InstallDesktopFile", ctx)} | |||
| 138 | + | } | |||
| 139 | + | ||||
| 140 | + | func (_c *MockDesktopIntegration_InstallDesktopFile_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_InstallDesktopFile_Call { | |||
| 141 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 142 | + | var arg0 context.Context | |||
| 143 | + | if args[0] != nil { | |||
| 144 | + | arg0 = args[0].(context.Context) | |||
| 145 | + | } | |||
| 146 | + | run( | |||
| 147 | + | arg0, | |||
| 148 | + | ) | |||
| 149 | + | }) | |||
| 150 | + | return _c | |||
| 151 | + | } | |||
| 152 | + | ||||
| 153 | + | func (_c *MockDesktopIntegration_InstallDesktopFile_Call) Return(s string, err error) *MockDesktopIntegration_InstallDesktopFile_Call { | |||
| 154 | + | _c.Call.Return(s, err) | |||
| 155 | + | return _c | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | func (_c *MockDesktopIntegration_InstallDesktopFile_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockDesktopIntegration_InstallDesktopFile_Call { | |||
| 159 | + | _c.Call.Return(run) | |||
| 160 | + | return _c | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | // InstallIcon provides a mock function for the type MockDesktopIntegration | |||
| 164 | + | func (_mock *MockDesktopIntegration) InstallIcon(ctx context.Context, svgData []byte) (string, error) { | |||
| 165 | + | ret := _mock.Called(ctx, svgData) | |||
| 166 | + | ||||
| 167 | + | if len(ret) == 0 { | |||
| 168 | + | panic("no return value specified for InstallIcon") | |||
| 169 | + | } | |||
| 170 | + | ||||
| 171 | + | var r0 string | |||
| 172 | + | var r1 error | |||
| 173 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) (string, error)); ok { | |||
| 174 | + | return returnFunc(ctx, svgData) | |||
| 175 | + | } | |||
| 176 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) string); ok { | |||
| 177 | + | r0 = returnFunc(ctx, svgData) | |||
| 178 | + | } else { | |||
| 179 | + | r0 = ret.Get(0).(string) | |||
| 180 | + | } | |||
| 181 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok { | |||
| 182 | + | r1 = returnFunc(ctx, svgData) | |||
| 183 | + | } else { | |||
| 184 | + | r1 = ret.Error(1) | |||
| 185 | + | } | |||
| 186 | + | return r0, r1 | |||
| 187 | + | } | |||
| 188 | + | ||||
| 189 | + | // MockDesktopIntegration_InstallIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallIcon' | |||
| 190 | + | type MockDesktopIntegration_InstallIcon_Call struct { | |||
| 191 | + | *mock.Call | |||
| 192 | + | } | |||
| 193 | + | ||||
| 194 | + | // InstallIcon is a helper method to define mock.On call | |||
| 195 | + | // - ctx context.Context | |||
| 196 | + | // - svgData []byte | |||
| 197 | + | func (_e *MockDesktopIntegration_Expecter) InstallIcon(ctx any, svgData any) *MockDesktopIntegration_InstallIcon_Call { | |||
| 198 | + | return &MockDesktopIntegration_InstallIcon_Call{Call: _e.mock.On("InstallIcon", ctx, svgData)} | |||
| 199 | + | } | |||
| 200 | + | ||||
| 201 | + | func (_c *MockDesktopIntegration_InstallIcon_Call) Run(run func(ctx context.Context, svgData []byte)) *MockDesktopIntegration_InstallIcon_Call { | |||
| 202 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 203 | + | var arg0 context.Context | |||
| 204 | + | if args[0] != nil { | |||
| 205 | + | arg0 = args[0].(context.Context) | |||
| 206 | + | } | |||
| 207 | + | var arg1 []byte | |||
| 208 | + | if args[1] != nil { | |||
| 209 | + | arg1 = args[1].([]byte) | |||
| 210 | + | } | |||
| 211 | + | run( | |||
| 212 | + | arg0, | |||
| 213 | + | arg1, | |||
| 214 | + | ) | |||
| 215 | + | }) | |||
| 216 | + | return _c | |||
| 217 | + | } | |||
| 218 | + | ||||
| 219 | + | func (_c *MockDesktopIntegration_InstallIcon_Call) Return(s string, err error) *MockDesktopIntegration_InstallIcon_Call { | |||
| 220 | + | _c.Call.Return(s, err) | |||
| 221 | + | return _c | |||
| 222 | + | } | |||
| 223 | + | ||||
| 224 | + | func (_c *MockDesktopIntegration_InstallIcon_Call) RunAndReturn(run func(ctx context.Context, svgData []byte) (string, error)) *MockDesktopIntegration_InstallIcon_Call { | |||
| 225 | + | _c.Call.Return(run) | |||
| 226 | + | return _c | |||
| 227 | + | } | |||
| 228 | + | ||||
| 229 | + | // RemoveDesktopFile provides a mock function for the type MockDesktopIntegration | |||
| 230 | + | func (_mock *MockDesktopIntegration) RemoveDesktopFile(ctx context.Context) error { | |||
| 231 | + | ret := _mock.Called(ctx) | |||
| 232 | + | ||||
| 233 | + | if len(ret) == 0 { | |||
| 234 | + | panic("no return value specified for RemoveDesktopFile") | |||
| 235 | + | } | |||
| 236 | + | ||||
| 237 | + | var r0 error | |||
| 238 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 239 | + | r0 = returnFunc(ctx) | |||
| 240 | + | } else { | |||
| 241 | + | r0 = ret.Error(0) | |||
| 242 | + | } | |||
| 243 | + | return r0 | |||
| 244 | + | } | |||
| 245 | + | ||||
| 246 | + | // MockDesktopIntegration_RemoveDesktopFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDesktopFile' | |||
| 247 | + | type MockDesktopIntegration_RemoveDesktopFile_Call struct { | |||
| 248 | + | *mock.Call | |||
| 249 | + | } | |||
| 250 | + | ||||
| 251 | + | // RemoveDesktopFile is a helper method to define mock.On call | |||
| 252 | + | // - ctx context.Context | |||
| 253 | + | func (_e *MockDesktopIntegration_Expecter) RemoveDesktopFile(ctx any) *MockDesktopIntegration_RemoveDesktopFile_Call { | |||
| 254 | + | return &MockDesktopIntegration_RemoveDesktopFile_Call{Call: _e.mock.On("RemoveDesktopFile", ctx)} | |||
| 255 | + | } | |||
| 256 | + | ||||
| 257 | + | func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_RemoveDesktopFile_Call { | |||
| 258 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 259 | + | var arg0 context.Context | |||
| 260 | + | if args[0] != nil { | |||
| 261 | + | arg0 = args[0].(context.Context) | |||
| 262 | + | } | |||
| 263 | + | run( | |||
| 264 | + | arg0, | |||
| 265 | + | ) | |||
| 266 | + | }) | |||
| 267 | + | return _c | |||
| 268 | + | } | |||
| 269 | + | ||||
| 270 | + | func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) Return(err error) *MockDesktopIntegration_RemoveDesktopFile_Call { | |||
| 271 | + | _c.Call.Return(err) | |||
| 272 | + | return _c | |||
| 273 | + | } | |||
| 274 | + | ||||
| 275 | + | func (_c *MockDesktopIntegration_RemoveDesktopFile_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_RemoveDesktopFile_Call { | |||
| 276 | + | _c.Call.Return(run) | |||
| 277 | + | return _c | |||
| 278 | + | } | |||
| 279 | + | ||||
| 280 | + | // RemoveIcon provides a mock function for the type MockDesktopIntegration | |||
| 281 | + | func (_mock *MockDesktopIntegration) RemoveIcon(ctx context.Context) error { | |||
| 282 | + | ret := _mock.Called(ctx) | |||
| 283 | + | ||||
| 284 | + | if len(ret) == 0 { | |||
| 285 | + | panic("no return value specified for RemoveIcon") | |||
| 286 | + | } | |||
| 287 | + | ||||
| 288 | + | var r0 error | |||
| 289 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 290 | + | r0 = returnFunc(ctx) | |||
| 291 | + | } else { | |||
| 292 | + | r0 = ret.Error(0) | |||
| 293 | + | } | |||
| 294 | + | return r0 | |||
| 295 | + | } | |||
| 296 | + | ||||
| 297 | + | // MockDesktopIntegration_RemoveIcon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveIcon' | |||
| 298 | + | type MockDesktopIntegration_RemoveIcon_Call struct { | |||
| 299 | + | *mock.Call | |||
| 300 | + | } | |||
| 301 | + | ||||
| 302 | + | // RemoveIcon is a helper method to define mock.On call | |||
| 303 | + | // - ctx context.Context | |||
| 304 | + | func (_e *MockDesktopIntegration_Expecter) RemoveIcon(ctx any) *MockDesktopIntegration_RemoveIcon_Call { | |||
| 305 | + | return &MockDesktopIntegration_RemoveIcon_Call{Call: _e.mock.On("RemoveIcon", ctx)} | |||
| 306 | + | } | |||
| 307 | + | ||||
| 308 | + | func (_c *MockDesktopIntegration_RemoveIcon_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_RemoveIcon_Call { | |||
| 309 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 310 | + | var arg0 context.Context | |||
| 311 | + | if args[0] != nil { | |||
| 312 | + | arg0 = args[0].(context.Context) | |||
| 313 | + | } | |||
| 314 | + | run( | |||
| 315 | + | arg0, | |||
| 316 | + | ) | |||
| 317 | + | }) | |||
| 318 | + | return _c | |||
| 319 | + | } | |||
| 320 | + | ||||
| 321 | + | func (_c *MockDesktopIntegration_RemoveIcon_Call) Return(err error) *MockDesktopIntegration_RemoveIcon_Call { | |||
| 322 | + | _c.Call.Return(err) | |||
| 323 | + | return _c | |||
| 324 | + | } | |||
| 325 | + | ||||
| 326 | + | func (_c *MockDesktopIntegration_RemoveIcon_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_RemoveIcon_Call { | |||
| 327 | + | _c.Call.Return(run) | |||
| 328 | + | return _c | |||
| 329 | + | } | |||
| 330 | + | ||||
| 331 | + | // SetAsDefaultBrowser provides a mock function for the type MockDesktopIntegration | |||
| 332 | + | func (_mock *MockDesktopIntegration) SetAsDefaultBrowser(ctx context.Context) error { | |||
| 333 | + | ret := _mock.Called(ctx) | |||
| 334 | + | ||||
| 335 | + | if len(ret) == 0 { | |||
| 336 | + | panic("no return value specified for SetAsDefaultBrowser") | |||
| 337 | + | } | |||
| 338 | + | ||||
| 339 | + | var r0 error | |||
| 340 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 341 | + | r0 = returnFunc(ctx) | |||
| 342 | + | } else { | |||
| 343 | + | r0 = ret.Error(0) | |||
| 344 | + | } | |||
| 345 | + | return r0 | |||
| 346 | + | } | |||
| 347 | + | ||||
| 348 | + | // MockDesktopIntegration_SetAsDefaultBrowser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAsDefaultBrowser' | |||
| 349 | + | type MockDesktopIntegration_SetAsDefaultBrowser_Call struct { | |||
| 350 | + | *mock.Call | |||
| 351 | + | } | |||
| 352 | + | ||||
| 353 | + | // SetAsDefaultBrowser is a helper method to define mock.On call | |||
| 354 | + | // - ctx context.Context | |||
| 355 | + | func (_e *MockDesktopIntegration_Expecter) SetAsDefaultBrowser(ctx any) *MockDesktopIntegration_SetAsDefaultBrowser_Call { | |||
| 356 | + | return &MockDesktopIntegration_SetAsDefaultBrowser_Call{Call: _e.mock.On("SetAsDefaultBrowser", ctx)} | |||
| 357 | + | } | |||
| 358 | + | ||||
| 359 | + | func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_SetAsDefaultBrowser_Call { | |||
| 360 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 361 | + | var arg0 context.Context | |||
| 362 | + | if args[0] != nil { | |||
| 363 | + | arg0 = args[0].(context.Context) | |||
| 364 | + | } | |||
| 365 | + | run( | |||
| 366 | + | arg0, | |||
| 367 | + | ) | |||
| 368 | + | }) | |||
| 369 | + | return _c | |||
| 370 | + | } | |||
| 371 | + | ||||
| 372 | + | func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) Return(err error) *MockDesktopIntegration_SetAsDefaultBrowser_Call { | |||
| 373 | + | _c.Call.Return(err) | |||
| 374 | + | return _c | |||
| 375 | + | } | |||
| 376 | + | ||||
| 377 | + | func (_c *MockDesktopIntegration_SetAsDefaultBrowser_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_SetAsDefaultBrowser_Call { | |||
| 378 | + | _c.Call.Return(run) | |||
| 379 | + | return _c | |||
| 380 | + | } | |||
| 381 | + | ||||
| 382 | + | // UnsetAsDefaultBrowser provides a mock function for the type MockDesktopIntegration | |||
| 383 | + | func (_mock *MockDesktopIntegration) UnsetAsDefaultBrowser(ctx context.Context) error { | |||
| 384 | + | ret := _mock.Called(ctx) | |||
| 385 | + | ||||
| 386 | + | if len(ret) == 0 { | |||
| 387 | + | panic("no return value specified for UnsetAsDefaultBrowser") | |||
| 388 | + | } | |||
| 389 | + | ||||
| 390 | + | var r0 error | |||
| 391 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 392 | + | r0 = returnFunc(ctx) | |||
| 393 | + | } else { | |||
| 394 | + | r0 = ret.Error(0) | |||
| 395 | + | } | |||
| 396 | + | return r0 | |||
| 397 | + | } | |||
| 398 | + | ||||
| 399 | + | // MockDesktopIntegration_UnsetAsDefaultBrowser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsetAsDefaultBrowser' | |||
| 400 | + | type MockDesktopIntegration_UnsetAsDefaultBrowser_Call struct { | |||
| 401 | + | *mock.Call | |||
| 402 | + | } | |||
| 403 | + | ||||
| 404 | + | // UnsetAsDefaultBrowser is a helper method to define mock.On call | |||
| 405 | + | // - ctx context.Context | |||
| 406 | + | func (_e *MockDesktopIntegration_Expecter) UnsetAsDefaultBrowser(ctx any) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call { | |||
| 407 | + | return &MockDesktopIntegration_UnsetAsDefaultBrowser_Call{Call: _e.mock.On("UnsetAsDefaultBrowser", ctx)} | |||
| 408 | + | } | |||
| 409 | + | ||||
| 410 | + | func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) Run(run func(ctx context.Context)) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call { | |||
| 411 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 412 | + | var arg0 context.Context | |||
| 413 | + | if args[0] != nil { | |||
| 414 | + | arg0 = args[0].(context.Context) | |||
| 415 | + | } | |||
| 416 | + | run( | |||
| 417 | + | arg0, | |||
| 418 | + | ) | |||
| 419 | + | }) | |||
| 420 | + | return _c | |||
| 421 | + | } | |||
| 422 | + | ||||
| 423 | + | func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) Return(err error) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call { | |||
| 424 | + | _c.Call.Return(err) | |||
| 425 | + | return _c | |||
| 426 | + | } | |||
| 427 | + | ||||
| 428 | + | func (_c *MockDesktopIntegration_UnsetAsDefaultBrowser_Call) RunAndReturn(run func(ctx context.Context) error) *MockDesktopIntegration_UnsetAsDefaultBrowser_Call { | |||
| 429 | + | _c.Call.Return(run) | |||
| 430 | + | return _c | |||
| 431 | + | } | |||
A internal/application/port/mocks/download.go +244 -0
| @@ -0,0 +1,244 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockDownloadEventHandler creates a new instance of MockDownloadEventHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockDownloadEventHandler(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockDownloadEventHandler { | |||
| 20 | + | mock := &MockDownloadEventHandler{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockDownloadEventHandler is an autogenerated mock type for the DownloadEventHandler type | |||
| 29 | + | type MockDownloadEventHandler struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockDownloadEventHandler_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockDownloadEventHandler) EXPECT() *MockDownloadEventHandler_Expecter { | |||
| 38 | + | return &MockDownloadEventHandler_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // OnDownloadEvent provides a mock function for the type MockDownloadEventHandler | |||
| 42 | + | func (_mock *MockDownloadEventHandler) OnDownloadEvent(ctx context.Context, event port.DownloadEvent) { | |||
| 43 | + | _mock.Called(ctx, event) | |||
| 44 | + | return | |||
| 45 | + | } | |||
| 46 | + | ||||
| 47 | + | // MockDownloadEventHandler_OnDownloadEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnDownloadEvent' | |||
| 48 | + | type MockDownloadEventHandler_OnDownloadEvent_Call struct { | |||
| 49 | + | *mock.Call | |||
| 50 | + | } | |||
| 51 | + | ||||
| 52 | + | // OnDownloadEvent is a helper method to define mock.On call | |||
| 53 | + | // - ctx context.Context | |||
| 54 | + | // - event port.DownloadEvent | |||
| 55 | + | func (_e *MockDownloadEventHandler_Expecter) OnDownloadEvent(ctx any, event any) *MockDownloadEventHandler_OnDownloadEvent_Call { | |||
| 56 | + | return &MockDownloadEventHandler_OnDownloadEvent_Call{Call: _e.mock.On("OnDownloadEvent", ctx, event)} | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Run(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call { | |||
| 60 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 61 | + | var arg0 context.Context | |||
| 62 | + | if args[0] != nil { | |||
| 63 | + | arg0 = args[0].(context.Context) | |||
| 64 | + | } | |||
| 65 | + | var arg1 port.DownloadEvent | |||
| 66 | + | if args[1] != nil { | |||
| 67 | + | arg1 = args[1].(port.DownloadEvent) | |||
| 68 | + | } | |||
| 69 | + | run( | |||
| 70 | + | arg0, | |||
| 71 | + | arg1, | |||
| 72 | + | ) | |||
| 73 | + | }) | |||
| 74 | + | return _c | |||
| 75 | + | } | |||
| 76 | + | ||||
| 77 | + | func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Return() *MockDownloadEventHandler_OnDownloadEvent_Call { | |||
| 78 | + | _c.Call.Return() | |||
| 79 | + | return _c | |||
| 80 | + | } | |||
| 81 | + | ||||
| 82 | + | func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) RunAndReturn(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call { | |||
| 83 | + | _c.Run(run) | |||
| 84 | + | return _c | |||
| 85 | + | } | |||
| 86 | + | ||||
| 87 | + | // NewMockDownloadResponse creates a new instance of MockDownloadResponse. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 88 | + | // The first argument is typically a *testing.T value. | |||
| 89 | + | func NewMockDownloadResponse(t interface { | |||
| 90 | + | mock.TestingT | |||
| 91 | + | Cleanup(func()) | |||
| 92 | + | }) *MockDownloadResponse { | |||
| 93 | + | mock := &MockDownloadResponse{} | |||
| 94 | + | mock.Mock.Test(t) | |||
| 95 | + | ||||
| 96 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 97 | + | ||||
| 98 | + | return mock | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | // MockDownloadResponse is an autogenerated mock type for the DownloadResponse type | |||
| 102 | + | type MockDownloadResponse struct { | |||
| 103 | + | mock.Mock | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | type MockDownloadResponse_Expecter struct { | |||
| 107 | + | mock *mock.Mock | |||
| 108 | + | } | |||
| 109 | + | ||||
| 110 | + | func (_m *MockDownloadResponse) EXPECT() *MockDownloadResponse_Expecter { | |||
| 111 | + | return &MockDownloadResponse_Expecter{mock: &_m.Mock} | |||
| 112 | + | } | |||
| 113 | + | ||||
| 114 | + | // GetMimeType provides a mock function for the type MockDownloadResponse | |||
| 115 | + | func (_mock *MockDownloadResponse) GetMimeType() string { | |||
| 116 | + | ret := _mock.Called() | |||
| 117 | + | ||||
| 118 | + | if len(ret) == 0 { | |||
| 119 | + | panic("no return value specified for GetMimeType") | |||
| 120 | + | } | |||
| 121 | + | ||||
| 122 | + | var r0 string | |||
| 123 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 124 | + | r0 = returnFunc() | |||
| 125 | + | } else { | |||
| 126 | + | r0 = ret.Get(0).(string) | |||
| 127 | + | } | |||
| 128 | + | return r0 | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | // MockDownloadResponse_GetMimeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMimeType' | |||
| 132 | + | type MockDownloadResponse_GetMimeType_Call struct { | |||
| 133 | + | *mock.Call | |||
| 134 | + | } | |||
| 135 | + | ||||
| 136 | + | // GetMimeType is a helper method to define mock.On call | |||
| 137 | + | func (_e *MockDownloadResponse_Expecter) GetMimeType() *MockDownloadResponse_GetMimeType_Call { | |||
| 138 | + | return &MockDownloadResponse_GetMimeType_Call{Call: _e.mock.On("GetMimeType")} | |||
| 139 | + | } | |||
| 140 | + | ||||
| 141 | + | func (_c *MockDownloadResponse_GetMimeType_Call) Run(run func()) *MockDownloadResponse_GetMimeType_Call { | |||
| 142 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 143 | + | run() | |||
| 144 | + | }) | |||
| 145 | + | return _c | |||
| 146 | + | } | |||
| 147 | + | ||||
| 148 | + | func (_c *MockDownloadResponse_GetMimeType_Call) Return(s string) *MockDownloadResponse_GetMimeType_Call { | |||
| 149 | + | _c.Call.Return(s) | |||
| 150 | + | return _c | |||
| 151 | + | } | |||
| 152 | + | ||||
| 153 | + | func (_c *MockDownloadResponse_GetMimeType_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetMimeType_Call { | |||
| 154 | + | _c.Call.Return(run) | |||
| 155 | + | return _c | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | // GetSuggestedFilename provides a mock function for the type MockDownloadResponse | |||
| 159 | + | func (_mock *MockDownloadResponse) GetSuggestedFilename() string { | |||
| 160 | + | ret := _mock.Called() | |||
| 161 | + | ||||
| 162 | + | if len(ret) == 0 { | |||
| 163 | + | panic("no return value specified for GetSuggestedFilename") | |||
| 164 | + | } | |||
| 165 | + | ||||
| 166 | + | var r0 string | |||
| 167 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 168 | + | r0 = returnFunc() | |||
| 169 | + | } else { | |||
| 170 | + | r0 = ret.Get(0).(string) | |||
| 171 | + | } | |||
| 172 | + | return r0 | |||
| 173 | + | } | |||
| 174 | + | ||||
| 175 | + | // MockDownloadResponse_GetSuggestedFilename_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSuggestedFilename' | |||
| 176 | + | type MockDownloadResponse_GetSuggestedFilename_Call struct { | |||
| 177 | + | *mock.Call | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | // GetSuggestedFilename is a helper method to define mock.On call | |||
| 181 | + | func (_e *MockDownloadResponse_Expecter) GetSuggestedFilename() *MockDownloadResponse_GetSuggestedFilename_Call { | |||
| 182 | + | return &MockDownloadResponse_GetSuggestedFilename_Call{Call: _e.mock.On("GetSuggestedFilename")} | |||
| 183 | + | } | |||
| 184 | + | ||||
| 185 | + | func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Run(run func()) *MockDownloadResponse_GetSuggestedFilename_Call { | |||
| 186 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 187 | + | run() | |||
| 188 | + | }) | |||
| 189 | + | return _c | |||
| 190 | + | } | |||
| 191 | + | ||||
| 192 | + | func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Return(s string) *MockDownloadResponse_GetSuggestedFilename_Call { | |||
| 193 | + | _c.Call.Return(s) | |||
| 194 | + | return _c | |||
| 195 | + | } | |||
| 196 | + | ||||
| 197 | + | func (_c *MockDownloadResponse_GetSuggestedFilename_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetSuggestedFilename_Call { | |||
| 198 | + | _c.Call.Return(run) | |||
| 199 | + | return _c | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | // GetUri provides a mock function for the type MockDownloadResponse | |||
| 203 | + | func (_mock *MockDownloadResponse) GetUri() string { | |||
| 204 | + | ret := _mock.Called() | |||
| 205 | + | ||||
| 206 | + | if len(ret) == 0 { | |||
| 207 | + | panic("no return value specified for GetUri") | |||
| 208 | + | } | |||
| 209 | + | ||||
| 210 | + | var r0 string | |||
| 211 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 212 | + | r0 = returnFunc() | |||
| 213 | + | } else { | |||
| 214 | + | r0 = ret.Get(0).(string) | |||
| 215 | + | } | |||
| 216 | + | return r0 | |||
| 217 | + | } | |||
| 218 | + | ||||
| 219 | + | // MockDownloadResponse_GetUri_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUri' | |||
| 220 | + | type MockDownloadResponse_GetUri_Call struct { | |||
| 221 | + | *mock.Call | |||
| 222 | + | } | |||
| 223 | + | ||||
| 224 | + | // GetUri is a helper method to define mock.On call | |||
| 225 | + | func (_e *MockDownloadResponse_Expecter) GetUri() *MockDownloadResponse_GetUri_Call { | |||
| 226 | + | return &MockDownloadResponse_GetUri_Call{Call: _e.mock.On("GetUri")} | |||
| 227 | + | } | |||
| 228 | + | ||||
| 229 | + | func (_c *MockDownloadResponse_GetUri_Call) Run(run func()) *MockDownloadResponse_GetUri_Call { | |||
| 230 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 231 | + | run() | |||
| 232 | + | }) | |||
| 233 | + | return _c | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | func (_c *MockDownloadResponse_GetUri_Call) Return(s string) *MockDownloadResponse_GetUri_Call { | |||
| 237 | + | _c.Call.Return(s) | |||
| 238 | + | return _c | |||
| 239 | + | } | |||
| 240 | + | ||||
| 241 | + | func (_c *MockDownloadResponse_GetUri_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetUri_Call { | |||
| 242 | + | _c.Call.Return(run) | |||
| 243 | + | return _c | |||
| 244 | + | } | |||
A internal/application/port/mocks/engine.go +1658 -0
| @@ -0,0 +1,1658 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | "encoding/json" | |||
| 10 | + | ||||
| 11 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockMemoryPressureApplier creates a new instance of MockMemoryPressureApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockMemoryPressureApplier(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockMemoryPressureApplier { | |||
| 21 | + | mock := &MockMemoryPressureApplier{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockMemoryPressureApplier is an autogenerated mock type for the MemoryPressureApplier type | |||
| 30 | + | type MockMemoryPressureApplier struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockMemoryPressureApplier_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockMemoryPressureApplier) EXPECT() *MockMemoryPressureApplier_Expecter { | |||
| 39 | + | return &MockMemoryPressureApplier_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // ApplyNetworkProcessSettings provides a mock function for the type MockMemoryPressureApplier | |||
| 43 | + | func (_mock *MockMemoryPressureApplier) ApplyNetworkProcessSettings(ctx context.Context, cfg *port.MemoryPressureConfig) error { | |||
| 44 | + | ret := _mock.Called(ctx, cfg) | |||
| 45 | + | ||||
| 46 | + | if len(ret) == 0 { | |||
| 47 | + | panic("no return value specified for ApplyNetworkProcessSettings") | |||
| 48 | + | } | |||
| 49 | + | ||||
| 50 | + | var r0 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) error); ok { | |||
| 52 | + | r0 = returnFunc(ctx, cfg) | |||
| 53 | + | } else { | |||
| 54 | + | r0 = ret.Error(0) | |||
| 55 | + | } | |||
| 56 | + | return r0 | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | // MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyNetworkProcessSettings' | |||
| 60 | + | type MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call struct { | |||
| 61 | + | *mock.Call | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | // ApplyNetworkProcessSettings is a helper method to define mock.On call | |||
| 65 | + | // - ctx context.Context | |||
| 66 | + | // - cfg *port.MemoryPressureConfig | |||
| 67 | + | func (_e *MockMemoryPressureApplier_Expecter) ApplyNetworkProcessSettings(ctx any, cfg any) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call { | |||
| 68 | + | return &MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call{Call: _e.mock.On("ApplyNetworkProcessSettings", ctx, cfg)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) Run(run func(ctx context.Context, cfg *port.MemoryPressureConfig)) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | var arg1 *port.MemoryPressureConfig | |||
| 78 | + | if args[1] != nil { | |||
| 79 | + | arg1 = args[1].(*port.MemoryPressureConfig) | |||
| 80 | + | } | |||
| 81 | + | run( | |||
| 82 | + | arg0, | |||
| 83 | + | arg1, | |||
| 84 | + | ) | |||
| 85 | + | }) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) Return(err error) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call { | |||
| 90 | + | _c.Call.Return(err) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | func (_c *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call) RunAndReturn(run func(ctx context.Context, cfg *port.MemoryPressureConfig) error) *MockMemoryPressureApplier_ApplyNetworkProcessSettings_Call { | |||
| 95 | + | _c.Call.Return(run) | |||
| 96 | + | return _c | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | // ApplyWebProcessSettings provides a mock function for the type MockMemoryPressureApplier | |||
| 100 | + | func (_mock *MockMemoryPressureApplier) ApplyWebProcessSettings(ctx context.Context, cfg *port.MemoryPressureConfig) (any, error) { | |||
| 101 | + | ret := _mock.Called(ctx, cfg) | |||
| 102 | + | ||||
| 103 | + | if len(ret) == 0 { | |||
| 104 | + | panic("no return value specified for ApplyWebProcessSettings") | |||
| 105 | + | } | |||
| 106 | + | ||||
| 107 | + | var r0 any | |||
| 108 | + | var r1 error | |||
| 109 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) (any, error)); ok { | |||
| 110 | + | return returnFunc(ctx, cfg) | |||
| 111 | + | } | |||
| 112 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *port.MemoryPressureConfig) any); ok { | |||
| 113 | + | r0 = returnFunc(ctx, cfg) | |||
| 114 | + | } else { | |||
| 115 | + | if ret.Get(0) != nil { | |||
| 116 | + | r0 = ret.Get(0).(any) | |||
| 117 | + | } | |||
| 118 | + | } | |||
| 119 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, *port.MemoryPressureConfig) error); ok { | |||
| 120 | + | r1 = returnFunc(ctx, cfg) | |||
| 121 | + | } else { | |||
| 122 | + | r1 = ret.Error(1) | |||
| 123 | + | } | |||
| 124 | + | return r0, r1 | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | // MockMemoryPressureApplier_ApplyWebProcessSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyWebProcessSettings' | |||
| 128 | + | type MockMemoryPressureApplier_ApplyWebProcessSettings_Call struct { | |||
| 129 | + | *mock.Call | |||
| 130 | + | } | |||
| 131 | + | ||||
| 132 | + | // ApplyWebProcessSettings is a helper method to define mock.On call | |||
| 133 | + | // - ctx context.Context | |||
| 134 | + | // - cfg *port.MemoryPressureConfig | |||
| 135 | + | func (_e *MockMemoryPressureApplier_Expecter) ApplyWebProcessSettings(ctx any, cfg any) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call { | |||
| 136 | + | return &MockMemoryPressureApplier_ApplyWebProcessSettings_Call{Call: _e.mock.On("ApplyWebProcessSettings", ctx, cfg)} | |||
| 137 | + | } | |||
| 138 | + | ||||
| 139 | + | func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) Run(run func(ctx context.Context, cfg *port.MemoryPressureConfig)) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call { | |||
| 140 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 141 | + | var arg0 context.Context | |||
| 142 | + | if args[0] != nil { | |||
| 143 | + | arg0 = args[0].(context.Context) | |||
| 144 | + | } | |||
| 145 | + | var arg1 *port.MemoryPressureConfig | |||
| 146 | + | if args[1] != nil { | |||
| 147 | + | arg1 = args[1].(*port.MemoryPressureConfig) | |||
| 148 | + | } | |||
| 149 | + | run( | |||
| 150 | + | arg0, | |||
| 151 | + | arg1, | |||
| 152 | + | ) | |||
| 153 | + | }) | |||
| 154 | + | return _c | |||
| 155 | + | } | |||
| 156 | + | ||||
| 157 | + | func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) Return(v any, err error) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call { | |||
| 158 | + | _c.Call.Return(v, err) | |||
| 159 | + | return _c | |||
| 160 | + | } | |||
| 161 | + | ||||
| 162 | + | func (_c *MockMemoryPressureApplier_ApplyWebProcessSettings_Call) RunAndReturn(run func(ctx context.Context, cfg *port.MemoryPressureConfig) (any, error)) *MockMemoryPressureApplier_ApplyWebProcessSettings_Call { | |||
| 163 | + | _c.Call.Return(run) | |||
| 164 | + | return _c | |||
| 165 | + | } | |||
| 166 | + | ||||
| 167 | + | // NewMockEngine creates a new instance of MockEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 168 | + | // The first argument is typically a *testing.T value. | |||
| 169 | + | func NewMockEngine(t interface { | |||
| 170 | + | mock.TestingT | |||
| 171 | + | Cleanup(func()) | |||
| 172 | + | }) *MockEngine { | |||
| 173 | + | mock := &MockEngine{} | |||
| 174 | + | mock.Mock.Test(t) | |||
| 175 | + | ||||
| 176 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 177 | + | ||||
| 178 | + | return mock | |||
| 179 | + | } | |||
| 180 | + | ||||
| 181 | + | // MockEngine is an autogenerated mock type for the Engine type | |||
| 182 | + | type MockEngine struct { | |||
| 183 | + | mock.Mock | |||
| 184 | + | } | |||
| 185 | + | ||||
| 186 | + | type MockEngine_Expecter struct { | |||
| 187 | + | mock *mock.Mock | |||
| 188 | + | } | |||
| 189 | + | ||||
| 190 | + | func (_m *MockEngine) EXPECT() *MockEngine_Expecter { | |||
| 191 | + | return &MockEngine_Expecter{mock: &_m.Mock} | |||
| 192 | + | } | |||
| 193 | + | ||||
| 194 | + | // Close provides a mock function for the type MockEngine | |||
| 195 | + | func (_mock *MockEngine) Close() error { | |||
| 196 | + | ret := _mock.Called() | |||
| 197 | + | ||||
| 198 | + | if len(ret) == 0 { | |||
| 199 | + | panic("no return value specified for Close") | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | var r0 error | |||
| 203 | + | if returnFunc, ok := ret.Get(0).(func() error); ok { | |||
| 204 | + | r0 = returnFunc() | |||
| 205 | + | } else { | |||
| 206 | + | r0 = ret.Error(0) | |||
| 207 | + | } | |||
| 208 | + | return r0 | |||
| 209 | + | } | |||
| 210 | + | ||||
| 211 | + | // MockEngine_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' | |||
| 212 | + | type MockEngine_Close_Call struct { | |||
| 213 | + | *mock.Call | |||
| 214 | + | } | |||
| 215 | + | ||||
| 216 | + | // Close is a helper method to define mock.On call | |||
| 217 | + | func (_e *MockEngine_Expecter) Close() *MockEngine_Close_Call { | |||
| 218 | + | return &MockEngine_Close_Call{Call: _e.mock.On("Close")} | |||
| 219 | + | } | |||
| 220 | + | ||||
| 221 | + | func (_c *MockEngine_Close_Call) Run(run func()) *MockEngine_Close_Call { | |||
| 222 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 223 | + | run() | |||
| 224 | + | }) | |||
| 225 | + | return _c | |||
| 226 | + | } | |||
| 227 | + | ||||
| 228 | + | func (_c *MockEngine_Close_Call) Return(err error) *MockEngine_Close_Call { | |||
| 229 | + | _c.Call.Return(err) | |||
| 230 | + | return _c | |||
| 231 | + | } | |||
| 232 | + | ||||
| 233 | + | func (_c *MockEngine_Close_Call) RunAndReturn(run func() error) *MockEngine_Close_Call { | |||
| 234 | + | _c.Call.Return(run) | |||
| 235 | + | return _c | |||
| 236 | + | } | |||
| 237 | + | ||||
| 238 | + | // ConfigureDownloads provides a mock function for the type MockEngine | |||
| 239 | + | func (_mock *MockEngine) ConfigureDownloads(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer) error { | |||
| 240 | + | ret := _mock.Called(ctx, downloadPath, eventHandler, preparer) | |||
| 241 | + | ||||
| 242 | + | if len(ret) == 0 { | |||
| 243 | + | panic("no return value specified for ConfigureDownloads") | |||
| 244 | + | } | |||
| 245 | + | ||||
| 246 | + | var r0 error | |||
| 247 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, port.DownloadEventHandler, port.DownloadPreparer) error); ok { | |||
| 248 | + | r0 = returnFunc(ctx, downloadPath, eventHandler, preparer) | |||
| 249 | + | } else { | |||
| 250 | + | r0 = ret.Error(0) | |||
| 251 | + | } | |||
| 252 | + | return r0 | |||
| 253 | + | } | |||
| 254 | + | ||||
| 255 | + | // MockEngine_ConfigureDownloads_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigureDownloads' | |||
| 256 | + | type MockEngine_ConfigureDownloads_Call struct { | |||
| 257 | + | *mock.Call | |||
| 258 | + | } | |||
| 259 | + | ||||
| 260 | + | // ConfigureDownloads is a helper method to define mock.On call | |||
| 261 | + | // - ctx context.Context | |||
| 262 | + | // - downloadPath string | |||
| 263 | + | // - eventHandler port.DownloadEventHandler | |||
| 264 | + | // - preparer port.DownloadPreparer | |||
| 265 | + | func (_e *MockEngine_Expecter) ConfigureDownloads(ctx any, downloadPath any, eventHandler any, preparer any) *MockEngine_ConfigureDownloads_Call { | |||
| 266 | + | return &MockEngine_ConfigureDownloads_Call{Call: _e.mock.On("ConfigureDownloads", ctx, downloadPath, eventHandler, preparer)} | |||
| 267 | + | } | |||
| 268 | + | ||||
| 269 | + | func (_c *MockEngine_ConfigureDownloads_Call) Run(run func(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer)) *MockEngine_ConfigureDownloads_Call { | |||
| 270 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 271 | + | var arg0 context.Context | |||
| 272 | + | if args[0] != nil { | |||
| 273 | + | arg0 = args[0].(context.Context) | |||
| 274 | + | } | |||
| 275 | + | var arg1 string | |||
| 276 | + | if args[1] != nil { | |||
| 277 | + | arg1 = args[1].(string) | |||
| 278 | + | } | |||
| 279 | + | var arg2 port.DownloadEventHandler | |||
| 280 | + | if args[2] != nil { | |||
| 281 | + | arg2 = args[2].(port.DownloadEventHandler) | |||
| 282 | + | } | |||
| 283 | + | var arg3 port.DownloadPreparer | |||
| 284 | + | if args[3] != nil { | |||
| 285 | + | arg3 = args[3].(port.DownloadPreparer) | |||
| 286 | + | } | |||
| 287 | + | run( | |||
| 288 | + | arg0, | |||
| 289 | + | arg1, | |||
| 290 | + | arg2, | |||
| 291 | + | arg3, | |||
| 292 | + | ) | |||
| 293 | + | }) | |||
| 294 | + | return _c | |||
| 295 | + | } | |||
| 296 | + | ||||
| 297 | + | func (_c *MockEngine_ConfigureDownloads_Call) Return(err error) *MockEngine_ConfigureDownloads_Call { | |||
| 298 | + | _c.Call.Return(err) | |||
| 299 | + | return _c | |||
| 300 | + | } | |||
| 301 | + | ||||
| 302 | + | func (_c *MockEngine_ConfigureDownloads_Call) RunAndReturn(run func(ctx context.Context, downloadPath string, eventHandler port.DownloadEventHandler, preparer port.DownloadPreparer) error) *MockEngine_ConfigureDownloads_Call { | |||
| 303 | + | _c.Call.Return(run) | |||
| 304 | + | return _c | |||
| 305 | + | } | |||
| 306 | + | ||||
| 307 | + | // ContentInjector provides a mock function for the type MockEngine | |||
| 308 | + | func (_mock *MockEngine) ContentInjector() port.ContentInjector { | |||
| 309 | + | ret := _mock.Called() | |||
| 310 | + | ||||
| 311 | + | if len(ret) == 0 { | |||
| 312 | + | panic("no return value specified for ContentInjector") | |||
| 313 | + | } | |||
| 314 | + | ||||
| 315 | + | var r0 port.ContentInjector | |||
| 316 | + | if returnFunc, ok := ret.Get(0).(func() port.ContentInjector); ok { | |||
| 317 | + | r0 = returnFunc() | |||
| 318 | + | } else { | |||
| 319 | + | if ret.Get(0) != nil { | |||
| 320 | + | r0 = ret.Get(0).(port.ContentInjector) | |||
| 321 | + | } | |||
| 322 | + | } | |||
| 323 | + | return r0 | |||
| 324 | + | } | |||
| 325 | + | ||||
| 326 | + | // MockEngine_ContentInjector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContentInjector' | |||
| 327 | + | type MockEngine_ContentInjector_Call struct { | |||
| 328 | + | *mock.Call | |||
| 329 | + | } | |||
| 330 | + | ||||
| 331 | + | // ContentInjector is a helper method to define mock.On call | |||
| 332 | + | func (_e *MockEngine_Expecter) ContentInjector() *MockEngine_ContentInjector_Call { | |||
| 333 | + | return &MockEngine_ContentInjector_Call{Call: _e.mock.On("ContentInjector")} | |||
| 334 | + | } | |||
| 335 | + | ||||
| 336 | + | func (_c *MockEngine_ContentInjector_Call) Run(run func()) *MockEngine_ContentInjector_Call { | |||
| 337 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 338 | + | run() | |||
| 339 | + | }) | |||
| 340 | + | return _c | |||
| 341 | + | } | |||
| 342 | + | ||||
| 343 | + | func (_c *MockEngine_ContentInjector_Call) Return(contentInjector port.ContentInjector) *MockEngine_ContentInjector_Call { | |||
| 344 | + | _c.Call.Return(contentInjector) | |||
| 345 | + | return _c | |||
| 346 | + | } | |||
| 347 | + | ||||
| 348 | + | func (_c *MockEngine_ContentInjector_Call) RunAndReturn(run func() port.ContentInjector) *MockEngine_ContentInjector_Call { | |||
| 349 | + | _c.Call.Return(run) | |||
| 350 | + | return _c | |||
| 351 | + | } | |||
| 352 | + | ||||
| 353 | + | // Factory provides a mock function for the type MockEngine | |||
| 354 | + | func (_mock *MockEngine) Factory() port.WebViewFactory { | |||
| 355 | + | ret := _mock.Called() | |||
| 356 | + | ||||
| 357 | + | if len(ret) == 0 { | |||
| 358 | + | panic("no return value specified for Factory") | |||
| 359 | + | } | |||
| 360 | + | ||||
| 361 | + | var r0 port.WebViewFactory | |||
| 362 | + | if returnFunc, ok := ret.Get(0).(func() port.WebViewFactory); ok { | |||
| 363 | + | r0 = returnFunc() | |||
| 364 | + | } else { | |||
| 365 | + | if ret.Get(0) != nil { | |||
| 366 | + | r0 = ret.Get(0).(port.WebViewFactory) | |||
| 367 | + | } | |||
| 368 | + | } | |||
| 369 | + | return r0 | |||
| 370 | + | } | |||
| 371 | + | ||||
| 372 | + | // MockEngine_Factory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Factory' | |||
| 373 | + | type MockEngine_Factory_Call struct { | |||
| 374 | + | *mock.Call | |||
| 375 | + | } | |||
| 376 | + | ||||
| 377 | + | // Factory is a helper method to define mock.On call | |||
| 378 | + | func (_e *MockEngine_Expecter) Factory() *MockEngine_Factory_Call { | |||
| 379 | + | return &MockEngine_Factory_Call{Call: _e.mock.On("Factory")} | |||
| 380 | + | } | |||
| 381 | + | ||||
| 382 | + | func (_c *MockEngine_Factory_Call) Run(run func()) *MockEngine_Factory_Call { | |||
| 383 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 384 | + | run() | |||
| 385 | + | }) | |||
| 386 | + | return _c | |||
| 387 | + | } | |||
| 388 | + | ||||
| 389 | + | func (_c *MockEngine_Factory_Call) Return(webViewFactory port.WebViewFactory) *MockEngine_Factory_Call { | |||
| 390 | + | _c.Call.Return(webViewFactory) | |||
| 391 | + | return _c | |||
| 392 | + | } | |||
| 393 | + | ||||
| 394 | + | func (_c *MockEngine_Factory_Call) RunAndReturn(run func() port.WebViewFactory) *MockEngine_Factory_Call { | |||
| 395 | + | _c.Call.Return(run) | |||
| 396 | + | return _c | |||
| 397 | + | } | |||
| 398 | + | ||||
| 399 | + | // FaviconDatabase provides a mock function for the type MockEngine | |||
| 400 | + | func (_mock *MockEngine) FaviconDatabase() port.FaviconDatabase { | |||
| 401 | + | ret := _mock.Called() | |||
| 402 | + | ||||
| 403 | + | if len(ret) == 0 { | |||
| 404 | + | panic("no return value specified for FaviconDatabase") | |||
| 405 | + | } | |||
| 406 | + | ||||
| 407 | + | var r0 port.FaviconDatabase | |||
| 408 | + | if returnFunc, ok := ret.Get(0).(func() port.FaviconDatabase); ok { | |||
| 409 | + | r0 = returnFunc() | |||
| 410 | + | } else { | |||
| 411 | + | if ret.Get(0) != nil { | |||
| 412 | + | r0 = ret.Get(0).(port.FaviconDatabase) | |||
| 413 | + | } | |||
| 414 | + | } | |||
| 415 | + | return r0 | |||
| 416 | + | } | |||
| 417 | + | ||||
| 418 | + | // MockEngine_FaviconDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FaviconDatabase' | |||
| 419 | + | type MockEngine_FaviconDatabase_Call struct { | |||
| 420 | + | *mock.Call | |||
| 421 | + | } | |||
| 422 | + | ||||
| 423 | + | // FaviconDatabase is a helper method to define mock.On call | |||
| 424 | + | func (_e *MockEngine_Expecter) FaviconDatabase() *MockEngine_FaviconDatabase_Call { | |||
| 425 | + | return &MockEngine_FaviconDatabase_Call{Call: _e.mock.On("FaviconDatabase")} | |||
| 426 | + | } | |||
| 427 | + | ||||
| 428 | + | func (_c *MockEngine_FaviconDatabase_Call) Run(run func()) *MockEngine_FaviconDatabase_Call { | |||
| 429 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 430 | + | run() | |||
| 431 | + | }) | |||
| 432 | + | return _c | |||
| 433 | + | } | |||
| 434 | + | ||||
| 435 | + | func (_c *MockEngine_FaviconDatabase_Call) Return(faviconDatabase port.FaviconDatabase) *MockEngine_FaviconDatabase_Call { | |||
| 436 | + | _c.Call.Return(faviconDatabase) | |||
| 437 | + | return _c | |||
| 438 | + | } | |||
| 439 | + | ||||
| 440 | + | func (_c *MockEngine_FaviconDatabase_Call) RunAndReturn(run func() port.FaviconDatabase) *MockEngine_FaviconDatabase_Call { | |||
| 441 | + | _c.Call.Return(run) | |||
| 442 | + | return _c | |||
| 443 | + | } | |||
| 444 | + | ||||
| 445 | + | // FilterApplier provides a mock function for the type MockEngine | |||
| 446 | + | func (_mock *MockEngine) FilterApplier() port.FilterApplier { | |||
| 447 | + | ret := _mock.Called() | |||
| 448 | + | ||||
| 449 | + | if len(ret) == 0 { | |||
| 450 | + | panic("no return value specified for FilterApplier") | |||
| 451 | + | } | |||
| 452 | + | ||||
| 453 | + | var r0 port.FilterApplier | |||
| 454 | + | if returnFunc, ok := ret.Get(0).(func() port.FilterApplier); ok { | |||
| 455 | + | r0 = returnFunc() | |||
| 456 | + | } else { | |||
| 457 | + | if ret.Get(0) != nil { | |||
| 458 | + | r0 = ret.Get(0).(port.FilterApplier) | |||
| 459 | + | } | |||
| 460 | + | } | |||
| 461 | + | return r0 | |||
| 462 | + | } | |||
| 463 | + | ||||
| 464 | + | // MockEngine_FilterApplier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterApplier' | |||
| 465 | + | type MockEngine_FilterApplier_Call struct { | |||
| 466 | + | *mock.Call | |||
| 467 | + | } | |||
| 468 | + | ||||
| 469 | + | // FilterApplier is a helper method to define mock.On call | |||
| 470 | + | func (_e *MockEngine_Expecter) FilterApplier() *MockEngine_FilterApplier_Call { | |||
| 471 | + | return &MockEngine_FilterApplier_Call{Call: _e.mock.On("FilterApplier")} | |||
| 472 | + | } | |||
| 473 | + | ||||
| 474 | + | func (_c *MockEngine_FilterApplier_Call) Run(run func()) *MockEngine_FilterApplier_Call { | |||
| 475 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 476 | + | run() | |||
| 477 | + | }) | |||
| 478 | + | return _c | |||
| 479 | + | } | |||
| 480 | + | ||||
| 481 | + | func (_c *MockEngine_FilterApplier_Call) Return(filterApplier port.FilterApplier) *MockEngine_FilterApplier_Call { | |||
| 482 | + | _c.Call.Return(filterApplier) | |||
| 483 | + | return _c | |||
| 484 | + | } | |||
| 485 | + | ||||
| 486 | + | func (_c *MockEngine_FilterApplier_Call) RunAndReturn(run func() port.FilterApplier) *MockEngine_FilterApplier_Call { | |||
| 487 | + | _c.Call.Return(run) | |||
| 488 | + | return _c | |||
| 489 | + | } | |||
| 490 | + | ||||
| 491 | + | // InternalSchemePath provides a mock function for the type MockEngine | |||
| 492 | + | func (_mock *MockEngine) InternalSchemePath() string { | |||
| 493 | + | ret := _mock.Called() | |||
| 494 | + | ||||
| 495 | + | if len(ret) == 0 { | |||
| 496 | + | panic("no return value specified for InternalSchemePath") | |||
| 497 | + | } | |||
| 498 | + | ||||
| 499 | + | var r0 string | |||
| 500 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 501 | + | r0 = returnFunc() | |||
| 502 | + | } else { | |||
| 503 | + | r0 = ret.Get(0).(string) | |||
| 504 | + | } | |||
| 505 | + | return r0 | |||
| 506 | + | } | |||
| 507 | + | ||||
| 508 | + | // MockEngine_InternalSchemePath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InternalSchemePath' | |||
| 509 | + | type MockEngine_InternalSchemePath_Call struct { | |||
| 510 | + | *mock.Call | |||
| 511 | + | } | |||
| 512 | + | ||||
| 513 | + | // InternalSchemePath is a helper method to define mock.On call | |||
| 514 | + | func (_e *MockEngine_Expecter) InternalSchemePath() *MockEngine_InternalSchemePath_Call { | |||
| 515 | + | return &MockEngine_InternalSchemePath_Call{Call: _e.mock.On("InternalSchemePath")} | |||
| 516 | + | } | |||
| 517 | + | ||||
| 518 | + | func (_c *MockEngine_InternalSchemePath_Call) Run(run func()) *MockEngine_InternalSchemePath_Call { | |||
| 519 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 520 | + | run() | |||
| 521 | + | }) | |||
| 522 | + | return _c | |||
| 523 | + | } | |||
| 524 | + | ||||
| 525 | + | func (_c *MockEngine_InternalSchemePath_Call) Return(s string) *MockEngine_InternalSchemePath_Call { | |||
| 526 | + | _c.Call.Return(s) | |||
| 527 | + | return _c | |||
| 528 | + | } | |||
| 529 | + | ||||
| 530 | + | func (_c *MockEngine_InternalSchemePath_Call) RunAndReturn(run func() string) *MockEngine_InternalSchemePath_Call { | |||
| 531 | + | _c.Call.Return(run) | |||
| 532 | + | return _c | |||
| 533 | + | } | |||
| 534 | + | ||||
| 535 | + | // OnToolkitReady provides a mock function for the type MockEngine | |||
| 536 | + | func (_mock *MockEngine) OnToolkitReady(ctx context.Context) error { | |||
| 537 | + | ret := _mock.Called(ctx) | |||
| 538 | + | ||||
| 539 | + | if len(ret) == 0 { | |||
| 540 | + | panic("no return value specified for OnToolkitReady") | |||
| 541 | + | } | |||
| 542 | + | ||||
| 543 | + | var r0 error | |||
| 544 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 545 | + | r0 = returnFunc(ctx) | |||
| 546 | + | } else { | |||
| 547 | + | r0 = ret.Error(0) | |||
| 548 | + | } | |||
| 549 | + | return r0 | |||
| 550 | + | } | |||
| 551 | + | ||||
| 552 | + | // MockEngine_OnToolkitReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnToolkitReady' | |||
| 553 | + | type MockEngine_OnToolkitReady_Call struct { | |||
| 554 | + | *mock.Call | |||
| 555 | + | } | |||
| 556 | + | ||||
| 557 | + | // OnToolkitReady is a helper method to define mock.On call | |||
| 558 | + | // - ctx context.Context | |||
| 559 | + | func (_e *MockEngine_Expecter) OnToolkitReady(ctx any) *MockEngine_OnToolkitReady_Call { | |||
| 560 | + | return &MockEngine_OnToolkitReady_Call{Call: _e.mock.On("OnToolkitReady", ctx)} | |||
| 561 | + | } | |||
| 562 | + | ||||
| 563 | + | func (_c *MockEngine_OnToolkitReady_Call) Run(run func(ctx context.Context)) *MockEngine_OnToolkitReady_Call { | |||
| 564 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 565 | + | var arg0 context.Context | |||
| 566 | + | if args[0] != nil { | |||
| 567 | + | arg0 = args[0].(context.Context) | |||
| 568 | + | } | |||
| 569 | + | run( | |||
| 570 | + | arg0, | |||
| 571 | + | ) | |||
| 572 | + | }) | |||
| 573 | + | return _c | |||
| 574 | + | } | |||
| 575 | + | ||||
| 576 | + | func (_c *MockEngine_OnToolkitReady_Call) Return(err error) *MockEngine_OnToolkitReady_Call { | |||
| 577 | + | _c.Call.Return(err) | |||
| 578 | + | return _c | |||
| 579 | + | } | |||
| 580 | + | ||||
| 581 | + | func (_c *MockEngine_OnToolkitReady_Call) RunAndReturn(run func(ctx context.Context) error) *MockEngine_OnToolkitReady_Call { | |||
| 582 | + | _c.Call.Return(run) | |||
| 583 | + | return _c | |||
| 584 | + | } | |||
| 585 | + | ||||
| 586 | + | // Pool provides a mock function for the type MockEngine | |||
| 587 | + | func (_mock *MockEngine) Pool() port.WebViewPool { | |||
| 588 | + | ret := _mock.Called() | |||
| 589 | + | ||||
| 590 | + | if len(ret) == 0 { | |||
| 591 | + | panic("no return value specified for Pool") | |||
| 592 | + | } | |||
| 593 | + | ||||
| 594 | + | var r0 port.WebViewPool | |||
| 595 | + | if returnFunc, ok := ret.Get(0).(func() port.WebViewPool); ok { | |||
| 596 | + | r0 = returnFunc() | |||
| 597 | + | } else { | |||
| 598 | + | if ret.Get(0) != nil { | |||
| 599 | + | r0 = ret.Get(0).(port.WebViewPool) | |||
| 600 | + | } | |||
| 601 | + | } | |||
| 602 | + | return r0 | |||
| 603 | + | } | |||
| 604 | + | ||||
| 605 | + | // MockEngine_Pool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pool' | |||
| 606 | + | type MockEngine_Pool_Call struct { | |||
| 607 | + | *mock.Call | |||
| 608 | + | } | |||
| 609 | + | ||||
| 610 | + | // Pool is a helper method to define mock.On call | |||
| 611 | + | func (_e *MockEngine_Expecter) Pool() *MockEngine_Pool_Call { | |||
| 612 | + | return &MockEngine_Pool_Call{Call: _e.mock.On("Pool")} | |||
| 613 | + | } | |||
| 614 | + | ||||
| 615 | + | func (_c *MockEngine_Pool_Call) Run(run func()) *MockEngine_Pool_Call { | |||
| 616 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 617 | + | run() | |||
| 618 | + | }) | |||
| 619 | + | return _c | |||
| 620 | + | } | |||
| 621 | + | ||||
| 622 | + | func (_c *MockEngine_Pool_Call) Return(webViewPool port.WebViewPool) *MockEngine_Pool_Call { | |||
| 623 | + | _c.Call.Return(webViewPool) | |||
| 624 | + | return _c | |||
| 625 | + | } | |||
| 626 | + | ||||
| 627 | + | func (_c *MockEngine_Pool_Call) RunAndReturn(run func() port.WebViewPool) *MockEngine_Pool_Call { | |||
| 628 | + | _c.Call.Return(run) | |||
| 629 | + | return _c | |||
| 630 | + | } | |||
| 631 | + | ||||
| 632 | + | // RegisterAccentHandlers provides a mock function for the type MockEngine | |||
| 633 | + | func (_mock *MockEngine) RegisterAccentHandlers(ctx context.Context, handler port.AccentKeyHandler) error { | |||
| 634 | + | ret := _mock.Called(ctx, handler) | |||
| 635 | + | ||||
| 636 | + | if len(ret) == 0 { | |||
| 637 | + | panic("no return value specified for RegisterAccentHandlers") | |||
| 638 | + | } | |||
| 639 | + | ||||
| 640 | + | var r0 error | |||
| 641 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.AccentKeyHandler) error); ok { | |||
| 642 | + | r0 = returnFunc(ctx, handler) | |||
| 643 | + | } else { | |||
| 644 | + | r0 = ret.Error(0) | |||
| 645 | + | } | |||
| 646 | + | return r0 | |||
| 647 | + | } | |||
| 648 | + | ||||
| 649 | + | // MockEngine_RegisterAccentHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterAccentHandlers' | |||
| 650 | + | type MockEngine_RegisterAccentHandlers_Call struct { | |||
| 651 | + | *mock.Call | |||
| 652 | + | } | |||
| 653 | + | ||||
| 654 | + | // RegisterAccentHandlers is a helper method to define mock.On call | |||
| 655 | + | // - ctx context.Context | |||
| 656 | + | // - handler port.AccentKeyHandler | |||
| 657 | + | func (_e *MockEngine_Expecter) RegisterAccentHandlers(ctx any, handler any) *MockEngine_RegisterAccentHandlers_Call { | |||
| 658 | + | return &MockEngine_RegisterAccentHandlers_Call{Call: _e.mock.On("RegisterAccentHandlers", ctx, handler)} | |||
| 659 | + | } | |||
| 660 | + | ||||
| 661 | + | func (_c *MockEngine_RegisterAccentHandlers_Call) Run(run func(ctx context.Context, handler port.AccentKeyHandler)) *MockEngine_RegisterAccentHandlers_Call { | |||
| 662 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 663 | + | var arg0 context.Context | |||
| 664 | + | if args[0] != nil { | |||
| 665 | + | arg0 = args[0].(context.Context) | |||
| 666 | + | } | |||
| 667 | + | var arg1 port.AccentKeyHandler | |||
| 668 | + | if args[1] != nil { | |||
| 669 | + | arg1 = args[1].(port.AccentKeyHandler) | |||
| 670 | + | } | |||
| 671 | + | run( | |||
| 672 | + | arg0, | |||
| 673 | + | arg1, | |||
| 674 | + | ) | |||
| 675 | + | }) | |||
| 676 | + | return _c | |||
| 677 | + | } | |||
| 678 | + | ||||
| 679 | + | func (_c *MockEngine_RegisterAccentHandlers_Call) Return(err error) *MockEngine_RegisterAccentHandlers_Call { | |||
| 680 | + | _c.Call.Return(err) | |||
| 681 | + | return _c | |||
| 682 | + | } | |||
| 683 | + | ||||
| 684 | + | func (_c *MockEngine_RegisterAccentHandlers_Call) RunAndReturn(run func(ctx context.Context, handler port.AccentKeyHandler) error) *MockEngine_RegisterAccentHandlers_Call { | |||
| 685 | + | _c.Call.Return(run) | |||
| 686 | + | return _c | |||
| 687 | + | } | |||
| 688 | + | ||||
| 689 | + | // RegisterHandlers provides a mock function for the type MockEngine | |||
| 690 | + | func (_mock *MockEngine) RegisterHandlers(ctx context.Context, deps port.HandlerDependencies) error { | |||
| 691 | + | ret := _mock.Called(ctx, deps) | |||
| 692 | + | ||||
| 693 | + | if len(ret) == 0 { | |||
| 694 | + | panic("no return value specified for RegisterHandlers") | |||
| 695 | + | } | |||
| 696 | + | ||||
| 697 | + | var r0 error | |||
| 698 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.HandlerDependencies) error); ok { | |||
| 699 | + | r0 = returnFunc(ctx, deps) | |||
| 700 | + | } else { | |||
| 701 | + | r0 = ret.Error(0) | |||
| 702 | + | } | |||
| 703 | + | return r0 | |||
| 704 | + | } | |||
| 705 | + | ||||
| 706 | + | // MockEngine_RegisterHandlers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandlers' | |||
| 707 | + | type MockEngine_RegisterHandlers_Call struct { | |||
| 708 | + | *mock.Call | |||
| 709 | + | } | |||
| 710 | + | ||||
| 711 | + | // RegisterHandlers is a helper method to define mock.On call | |||
| 712 | + | // - ctx context.Context | |||
| 713 | + | // - deps port.HandlerDependencies | |||
| 714 | + | func (_e *MockEngine_Expecter) RegisterHandlers(ctx any, deps any) *MockEngine_RegisterHandlers_Call { | |||
| 715 | + | return &MockEngine_RegisterHandlers_Call{Call: _e.mock.On("RegisterHandlers", ctx, deps)} | |||
| 716 | + | } | |||
| 717 | + | ||||
| 718 | + | func (_c *MockEngine_RegisterHandlers_Call) Run(run func(ctx context.Context, deps port.HandlerDependencies)) *MockEngine_RegisterHandlers_Call { | |||
| 719 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 720 | + | var arg0 context.Context | |||
| 721 | + | if args[0] != nil { | |||
| 722 | + | arg0 = args[0].(context.Context) | |||
| 723 | + | } | |||
| 724 | + | var arg1 port.HandlerDependencies | |||
| 725 | + | if args[1] != nil { | |||
| 726 | + | arg1 = args[1].(port.HandlerDependencies) | |||
| 727 | + | } | |||
| 728 | + | run( | |||
| 729 | + | arg0, | |||
| 730 | + | arg1, | |||
| 731 | + | ) | |||
| 732 | + | }) | |||
| 733 | + | return _c | |||
| 734 | + | } | |||
| 735 | + | ||||
| 736 | + | func (_c *MockEngine_RegisterHandlers_Call) Return(err error) *MockEngine_RegisterHandlers_Call { | |||
| 737 | + | _c.Call.Return(err) | |||
| 738 | + | return _c | |||
| 739 | + | } | |||
| 740 | + | ||||
| 741 | + | func (_c *MockEngine_RegisterHandlers_Call) RunAndReturn(run func(ctx context.Context, deps port.HandlerDependencies) error) *MockEngine_RegisterHandlers_Call { | |||
| 742 | + | _c.Call.Return(run) | |||
| 743 | + | return _c | |||
| 744 | + | } | |||
| 745 | + | ||||
| 746 | + | // SetHandlerContext provides a mock function for the type MockEngine | |||
| 747 | + | func (_mock *MockEngine) SetHandlerContext(ctx context.Context) { | |||
| 748 | + | _mock.Called(ctx) | |||
| 749 | + | return | |||
| 750 | + | } | |||
| 751 | + | ||||
| 752 | + | // MockEngine_SetHandlerContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHandlerContext' | |||
| 753 | + | type MockEngine_SetHandlerContext_Call struct { | |||
| 754 | + | *mock.Call | |||
| 755 | + | } | |||
| 756 | + | ||||
| 757 | + | // SetHandlerContext is a helper method to define mock.On call | |||
| 758 | + | // - ctx context.Context | |||
| 759 | + | func (_e *MockEngine_Expecter) SetHandlerContext(ctx any) *MockEngine_SetHandlerContext_Call { | |||
| 760 | + | return &MockEngine_SetHandlerContext_Call{Call: _e.mock.On("SetHandlerContext", ctx)} | |||
| 761 | + | } | |||
| 762 | + | ||||
| 763 | + | func (_c *MockEngine_SetHandlerContext_Call) Run(run func(ctx context.Context)) *MockEngine_SetHandlerContext_Call { | |||
| 764 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 765 | + | var arg0 context.Context | |||
| 766 | + | if args[0] != nil { | |||
| 767 | + | arg0 = args[0].(context.Context) | |||
| 768 | + | } | |||
| 769 | + | run( | |||
| 770 | + | arg0, | |||
| 771 | + | ) | |||
| 772 | + | }) | |||
| 773 | + | return _c | |||
| 774 | + | } | |||
| 775 | + | ||||
| 776 | + | func (_c *MockEngine_SetHandlerContext_Call) Return() *MockEngine_SetHandlerContext_Call { | |||
| 777 | + | _c.Call.Return() | |||
| 778 | + | return _c | |||
| 779 | + | } | |||
| 780 | + | ||||
| 781 | + | func (_c *MockEngine_SetHandlerContext_Call) RunAndReturn(run func(ctx context.Context)) *MockEngine_SetHandlerContext_Call { | |||
| 782 | + | _c.Run(run) | |||
| 783 | + | return _c | |||
| 784 | + | } | |||
| 785 | + | ||||
| 786 | + | // SettingsApplier provides a mock function for the type MockEngine | |||
| 787 | + | func (_mock *MockEngine) SettingsApplier() port.SettingsApplier { | |||
| 788 | + | ret := _mock.Called() | |||
| 789 | + | ||||
| 790 | + | if len(ret) == 0 { | |||
| 791 | + | panic("no return value specified for SettingsApplier") | |||
| 792 | + | } | |||
| 793 | + | ||||
| 794 | + | var r0 port.SettingsApplier | |||
| 795 | + | if returnFunc, ok := ret.Get(0).(func() port.SettingsApplier); ok { | |||
| 796 | + | r0 = returnFunc() | |||
| 797 | + | } else { | |||
| 798 | + | if ret.Get(0) != nil { | |||
| 799 | + | r0 = ret.Get(0).(port.SettingsApplier) | |||
| 800 | + | } | |||
| 801 | + | } | |||
| 802 | + | return r0 | |||
| 803 | + | } | |||
| 804 | + | ||||
| 805 | + | // MockEngine_SettingsApplier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SettingsApplier' | |||
| 806 | + | type MockEngine_SettingsApplier_Call struct { | |||
| 807 | + | *mock.Call | |||
| 808 | + | } | |||
| 809 | + | ||||
| 810 | + | // SettingsApplier is a helper method to define mock.On call | |||
| 811 | + | func (_e *MockEngine_Expecter) SettingsApplier() *MockEngine_SettingsApplier_Call { | |||
| 812 | + | return &MockEngine_SettingsApplier_Call{Call: _e.mock.On("SettingsApplier")} | |||
| 813 | + | } | |||
| 814 | + | ||||
| 815 | + | func (_c *MockEngine_SettingsApplier_Call) Run(run func()) *MockEngine_SettingsApplier_Call { | |||
| 816 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 817 | + | run() | |||
| 818 | + | }) | |||
| 819 | + | return _c | |||
| 820 | + | } | |||
| 821 | + | ||||
| 822 | + | func (_c *MockEngine_SettingsApplier_Call) Return(settingsApplier port.SettingsApplier) *MockEngine_SettingsApplier_Call { | |||
| 823 | + | _c.Call.Return(settingsApplier) | |||
| 824 | + | return _c | |||
| 825 | + | } | |||
| 826 | + | ||||
| 827 | + | func (_c *MockEngine_SettingsApplier_Call) RunAndReturn(run func() port.SettingsApplier) *MockEngine_SettingsApplier_Call { | |||
| 828 | + | _c.Call.Return(run) | |||
| 829 | + | return _c | |||
| 830 | + | } | |||
| 831 | + | ||||
| 832 | + | // UpdateAppearance provides a mock function for the type MockEngine | |||
| 833 | + | func (_mock *MockEngine) UpdateAppearance(ctx context.Context, r float64, g float64, b float64, alpha float64) error { | |||
| 834 | + | ret := _mock.Called(ctx, r, g, b, alpha) | |||
| 835 | + | ||||
| 836 | + | if len(ret) == 0 { | |||
| 837 | + | panic("no return value specified for UpdateAppearance") | |||
| 838 | + | } | |||
| 839 | + | ||||
| 840 | + | var r0 error | |||
| 841 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, float64, float64, float64, float64) error); ok { | |||
| 842 | + | r0 = returnFunc(ctx, r, g, b, alpha) | |||
| 843 | + | } else { | |||
| 844 | + | r0 = ret.Error(0) | |||
| 845 | + | } | |||
| 846 | + | return r0 | |||
| 847 | + | } | |||
| 848 | + | ||||
| 849 | + | // MockEngine_UpdateAppearance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAppearance' | |||
| 850 | + | type MockEngine_UpdateAppearance_Call struct { | |||
| 851 | + | *mock.Call | |||
| 852 | + | } | |||
| 853 | + | ||||
| 854 | + | // UpdateAppearance is a helper method to define mock.On call | |||
| 855 | + | // - ctx context.Context | |||
| 856 | + | // - r float64 | |||
| 857 | + | // - g float64 | |||
| 858 | + | // - b float64 | |||
| 859 | + | // - alpha float64 | |||
| 860 | + | func (_e *MockEngine_Expecter) UpdateAppearance(ctx any, r any, g any, b any, alpha any) *MockEngine_UpdateAppearance_Call { | |||
| 861 | + | return &MockEngine_UpdateAppearance_Call{Call: _e.mock.On("UpdateAppearance", ctx, r, g, b, alpha)} | |||
| 862 | + | } | |||
| 863 | + | ||||
| 864 | + | func (_c *MockEngine_UpdateAppearance_Call) Run(run func(ctx context.Context, r float64, g float64, b float64, alpha float64)) *MockEngine_UpdateAppearance_Call { | |||
| 865 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 866 | + | var arg0 context.Context | |||
| 867 | + | if args[0] != nil { | |||
| 868 | + | arg0 = args[0].(context.Context) | |||
| 869 | + | } | |||
| 870 | + | var arg1 float64 | |||
| 871 | + | if args[1] != nil { | |||
| 872 | + | arg1 = args[1].(float64) | |||
| 873 | + | } | |||
| 874 | + | var arg2 float64 | |||
| 875 | + | if args[2] != nil { | |||
| 876 | + | arg2 = args[2].(float64) | |||
| 877 | + | } | |||
| 878 | + | var arg3 float64 | |||
| 879 | + | if args[3] != nil { | |||
| 880 | + | arg3 = args[3].(float64) | |||
| 881 | + | } | |||
| 882 | + | var arg4 float64 | |||
| 883 | + | if args[4] != nil { | |||
| 884 | + | arg4 = args[4].(float64) | |||
| 885 | + | } | |||
| 886 | + | run( | |||
| 887 | + | arg0, | |||
| 888 | + | arg1, | |||
| 889 | + | arg2, | |||
| 890 | + | arg3, | |||
| 891 | + | arg4, | |||
| 892 | + | ) | |||
| 893 | + | }) | |||
| 894 | + | return _c | |||
| 895 | + | } | |||
| 896 | + | ||||
| 897 | + | func (_c *MockEngine_UpdateAppearance_Call) Return(err error) *MockEngine_UpdateAppearance_Call { | |||
| 898 | + | _c.Call.Return(err) | |||
| 899 | + | return _c | |||
| 900 | + | } | |||
| 901 | + | ||||
| 902 | + | func (_c *MockEngine_UpdateAppearance_Call) RunAndReturn(run func(ctx context.Context, r float64, g float64, b float64, alpha float64) error) *MockEngine_UpdateAppearance_Call { | |||
| 903 | + | _c.Call.Return(run) | |||
| 904 | + | return _c | |||
| 905 | + | } | |||
| 906 | + | ||||
| 907 | + | // UpdateSettings provides a mock function for the type MockEngine | |||
| 908 | + | func (_mock *MockEngine) UpdateSettings(ctx context.Context, update port.EngineSettingsUpdate) error { | |||
| 909 | + | ret := _mock.Called(ctx, update) | |||
| 910 | + | ||||
| 911 | + | if len(ret) == 0 { | |||
| 912 | + | panic("no return value specified for UpdateSettings") | |||
| 913 | + | } | |||
| 914 | + | ||||
| 915 | + | var r0 error | |||
| 916 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.EngineSettingsUpdate) error); ok { | |||
| 917 | + | r0 = returnFunc(ctx, update) | |||
| 918 | + | } else { | |||
| 919 | + | r0 = ret.Error(0) | |||
| 920 | + | } | |||
| 921 | + | return r0 | |||
| 922 | + | } | |||
| 923 | + | ||||
| 924 | + | // MockEngine_UpdateSettings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSettings' | |||
| 925 | + | type MockEngine_UpdateSettings_Call struct { | |||
| 926 | + | *mock.Call | |||
| 927 | + | } | |||
| 928 | + | ||||
| 929 | + | // UpdateSettings is a helper method to define mock.On call | |||
| 930 | + | // - ctx context.Context | |||
| 931 | + | // - update port.EngineSettingsUpdate | |||
| 932 | + | func (_e *MockEngine_Expecter) UpdateSettings(ctx any, update any) *MockEngine_UpdateSettings_Call { | |||
| 933 | + | return &MockEngine_UpdateSettings_Call{Call: _e.mock.On("UpdateSettings", ctx, update)} | |||
| 934 | + | } | |||
| 935 | + | ||||
| 936 | + | func (_c *MockEngine_UpdateSettings_Call) Run(run func(ctx context.Context, update port.EngineSettingsUpdate)) *MockEngine_UpdateSettings_Call { | |||
| 937 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 938 | + | var arg0 context.Context | |||
| 939 | + | if args[0] != nil { | |||
| 940 | + | arg0 = args[0].(context.Context) | |||
| 941 | + | } | |||
| 942 | + | var arg1 port.EngineSettingsUpdate | |||
| 943 | + | if args[1] != nil { | |||
| 944 | + | arg1 = args[1].(port.EngineSettingsUpdate) | |||
| 945 | + | } | |||
| 946 | + | run( | |||
| 947 | + | arg0, | |||
| 948 | + | arg1, | |||
| 949 | + | ) | |||
| 950 | + | }) | |||
| 951 | + | return _c | |||
| 952 | + | } | |||
| 953 | + | ||||
| 954 | + | func (_c *MockEngine_UpdateSettings_Call) Return(err error) *MockEngine_UpdateSettings_Call { | |||
| 955 | + | _c.Call.Return(err) | |||
| 956 | + | return _c | |||
| 957 | + | } | |||
| 958 | + | ||||
| 959 | + | func (_c *MockEngine_UpdateSettings_Call) RunAndReturn(run func(ctx context.Context, update port.EngineSettingsUpdate) error) *MockEngine_UpdateSettings_Call { | |||
| 960 | + | _c.Call.Return(run) | |||
| 961 | + | return _c | |||
| 962 | + | } | |||
| 963 | + | ||||
| 964 | + | // NewMockWebUIMessageHandler creates a new instance of MockWebUIMessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 965 | + | // The first argument is typically a *testing.T value. | |||
| 966 | + | func NewMockWebUIMessageHandler(t interface { | |||
| 967 | + | mock.TestingT | |||
| 968 | + | Cleanup(func()) | |||
| 969 | + | }) *MockWebUIMessageHandler { | |||
| 970 | + | mock := &MockWebUIMessageHandler{} | |||
| 971 | + | mock.Mock.Test(t) | |||
| 972 | + | ||||
| 973 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 974 | + | ||||
| 975 | + | return mock | |||
| 976 | + | } | |||
| 977 | + | ||||
| 978 | + | // MockWebUIMessageHandler is an autogenerated mock type for the WebUIMessageHandler type | |||
| 979 | + | type MockWebUIMessageHandler struct { | |||
| 980 | + | mock.Mock | |||
| 981 | + | } | |||
| 982 | + | ||||
| 983 | + | type MockWebUIMessageHandler_Expecter struct { | |||
| 984 | + | mock *mock.Mock | |||
| 985 | + | } | |||
| 986 | + | ||||
| 987 | + | func (_m *MockWebUIMessageHandler) EXPECT() *MockWebUIMessageHandler_Expecter { | |||
| 988 | + | return &MockWebUIMessageHandler_Expecter{mock: &_m.Mock} | |||
| 989 | + | } | |||
| 990 | + | ||||
| 991 | + | // Handle provides a mock function for the type MockWebUIMessageHandler | |||
| 992 | + | func (_mock *MockWebUIMessageHandler) Handle(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage) (any, error) { | |||
| 993 | + | ret := _mock.Called(ctx, webviewID, payload) | |||
| 994 | + | ||||
| 995 | + | if len(ret) == 0 { | |||
| 996 | + | panic("no return value specified for Handle") | |||
| 997 | + | } | |||
| 998 | + | ||||
| 999 | + | var r0 any | |||
| 1000 | + | var r1 error | |||
| 1001 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID, json.RawMessage) (any, error)); ok { | |||
| 1002 | + | return returnFunc(ctx, webviewID, payload) | |||
| 1003 | + | } | |||
| 1004 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID, json.RawMessage) any); ok { | |||
| 1005 | + | r0 = returnFunc(ctx, webviewID, payload) | |||
| 1006 | + | } else { | |||
| 1007 | + | if ret.Get(0) != nil { | |||
| 1008 | + | r0 = ret.Get(0).(any) | |||
| 1009 | + | } | |||
| 1010 | + | } | |||
| 1011 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, port.WebViewID, json.RawMessage) error); ok { | |||
| 1012 | + | r1 = returnFunc(ctx, webviewID, payload) | |||
| 1013 | + | } else { | |||
| 1014 | + | r1 = ret.Error(1) | |||
| 1015 | + | } | |||
| 1016 | + | return r0, r1 | |||
| 1017 | + | } | |||
| 1018 | + | ||||
| 1019 | + | // MockWebUIMessageHandler_Handle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handle' | |||
| 1020 | + | type MockWebUIMessageHandler_Handle_Call struct { | |||
| 1021 | + | *mock.Call | |||
| 1022 | + | } | |||
| 1023 | + | ||||
| 1024 | + | // Handle is a helper method to define mock.On call | |||
| 1025 | + | // - ctx context.Context | |||
| 1026 | + | // - webviewID port.WebViewID | |||
| 1027 | + | // - payload json.RawMessage | |||
| 1028 | + | func (_e *MockWebUIMessageHandler_Expecter) Handle(ctx any, webviewID any, payload any) *MockWebUIMessageHandler_Handle_Call { | |||
| 1029 | + | return &MockWebUIMessageHandler_Handle_Call{Call: _e.mock.On("Handle", ctx, webviewID, payload)} | |||
| 1030 | + | } | |||
| 1031 | + | ||||
| 1032 | + | func (_c *MockWebUIMessageHandler_Handle_Call) Run(run func(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage)) *MockWebUIMessageHandler_Handle_Call { | |||
| 1033 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1034 | + | var arg0 context.Context | |||
| 1035 | + | if args[0] != nil { | |||
| 1036 | + | arg0 = args[0].(context.Context) | |||
| 1037 | + | } | |||
| 1038 | + | var arg1 port.WebViewID | |||
| 1039 | + | if args[1] != nil { | |||
| 1040 | + | arg1 = args[1].(port.WebViewID) | |||
| 1041 | + | } | |||
| 1042 | + | var arg2 json.RawMessage | |||
| 1043 | + | if args[2] != nil { | |||
| 1044 | + | arg2 = args[2].(json.RawMessage) | |||
| 1045 | + | } | |||
| 1046 | + | run( | |||
| 1047 | + | arg0, | |||
| 1048 | + | arg1, | |||
| 1049 | + | arg2, | |||
| 1050 | + | ) | |||
| 1051 | + | }) | |||
| 1052 | + | return _c | |||
| 1053 | + | } | |||
| 1054 | + | ||||
| 1055 | + | func (_c *MockWebUIMessageHandler_Handle_Call) Return(v any, err error) *MockWebUIMessageHandler_Handle_Call { | |||
| 1056 | + | _c.Call.Return(v, err) | |||
| 1057 | + | return _c | |||
| 1058 | + | } | |||
| 1059 | + | ||||
| 1060 | + | func (_c *MockWebUIMessageHandler_Handle_Call) RunAndReturn(run func(ctx context.Context, webviewID port.WebViewID, payload json.RawMessage) (any, error)) *MockWebUIMessageHandler_Handle_Call { | |||
| 1061 | + | _c.Call.Return(run) | |||
| 1062 | + | return _c | |||
| 1063 | + | } | |||
| 1064 | + | ||||
| 1065 | + | // NewMockWebUIHandlerRouter creates a new instance of MockWebUIHandlerRouter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1066 | + | // The first argument is typically a *testing.T value. | |||
| 1067 | + | func NewMockWebUIHandlerRouter(t interface { | |||
| 1068 | + | mock.TestingT | |||
| 1069 | + | Cleanup(func()) | |||
| 1070 | + | }) *MockWebUIHandlerRouter { | |||
| 1071 | + | mock := &MockWebUIHandlerRouter{} | |||
| 1072 | + | mock.Mock.Test(t) | |||
| 1073 | + | ||||
| 1074 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1075 | + | ||||
| 1076 | + | return mock | |||
| 1077 | + | } | |||
| 1078 | + | ||||
| 1079 | + | // MockWebUIHandlerRouter is an autogenerated mock type for the WebUIHandlerRouter type | |||
| 1080 | + | type MockWebUIHandlerRouter struct { | |||
| 1081 | + | mock.Mock | |||
| 1082 | + | } | |||
| 1083 | + | ||||
| 1084 | + | type MockWebUIHandlerRouter_Expecter struct { | |||
| 1085 | + | mock *mock.Mock | |||
| 1086 | + | } | |||
| 1087 | + | ||||
| 1088 | + | func (_m *MockWebUIHandlerRouter) EXPECT() *MockWebUIHandlerRouter_Expecter { | |||
| 1089 | + | return &MockWebUIHandlerRouter_Expecter{mock: &_m.Mock} | |||
| 1090 | + | } | |||
| 1091 | + | ||||
| 1092 | + | // RegisterHandler provides a mock function for the type MockWebUIHandlerRouter | |||
| 1093 | + | func (_mock *MockWebUIHandlerRouter) RegisterHandler(msgType string, handler port.WebUIMessageHandler) error { | |||
| 1094 | + | ret := _mock.Called(msgType, handler) | |||
| 1095 | + | ||||
| 1096 | + | if len(ret) == 0 { | |||
| 1097 | + | panic("no return value specified for RegisterHandler") | |||
| 1098 | + | } | |||
| 1099 | + | ||||
| 1100 | + | var r0 error | |||
| 1101 | + | if returnFunc, ok := ret.Get(0).(func(string, port.WebUIMessageHandler) error); ok { | |||
| 1102 | + | r0 = returnFunc(msgType, handler) | |||
| 1103 | + | } else { | |||
| 1104 | + | r0 = ret.Error(0) | |||
| 1105 | + | } | |||
| 1106 | + | return r0 | |||
| 1107 | + | } | |||
| 1108 | + | ||||
| 1109 | + | // MockWebUIHandlerRouter_RegisterHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandler' | |||
| 1110 | + | type MockWebUIHandlerRouter_RegisterHandler_Call struct { | |||
| 1111 | + | *mock.Call | |||
| 1112 | + | } | |||
| 1113 | + | ||||
| 1114 | + | // RegisterHandler is a helper method to define mock.On call | |||
| 1115 | + | // - msgType string | |||
| 1116 | + | // - handler port.WebUIMessageHandler | |||
| 1117 | + | func (_e *MockWebUIHandlerRouter_Expecter) RegisterHandler(msgType any, handler any) *MockWebUIHandlerRouter_RegisterHandler_Call { | |||
| 1118 | + | return &MockWebUIHandlerRouter_RegisterHandler_Call{Call: _e.mock.On("RegisterHandler", msgType, handler)} | |||
| 1119 | + | } | |||
| 1120 | + | ||||
| 1121 | + | func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) Run(run func(msgType string, handler port.WebUIMessageHandler)) *MockWebUIHandlerRouter_RegisterHandler_Call { | |||
| 1122 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1123 | + | var arg0 string | |||
| 1124 | + | if args[0] != nil { | |||
| 1125 | + | arg0 = args[0].(string) | |||
| 1126 | + | } | |||
| 1127 | + | var arg1 port.WebUIMessageHandler | |||
| 1128 | + | if args[1] != nil { | |||
| 1129 | + | arg1 = args[1].(port.WebUIMessageHandler) | |||
| 1130 | + | } | |||
| 1131 | + | run( | |||
| 1132 | + | arg0, | |||
| 1133 | + | arg1, | |||
| 1134 | + | ) | |||
| 1135 | + | }) | |||
| 1136 | + | return _c | |||
| 1137 | + | } | |||
| 1138 | + | ||||
| 1139 | + | func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) Return(err error) *MockWebUIHandlerRouter_RegisterHandler_Call { | |||
| 1140 | + | _c.Call.Return(err) | |||
| 1141 | + | return _c | |||
| 1142 | + | } | |||
| 1143 | + | ||||
| 1144 | + | func (_c *MockWebUIHandlerRouter_RegisterHandler_Call) RunAndReturn(run func(msgType string, handler port.WebUIMessageHandler) error) *MockWebUIHandlerRouter_RegisterHandler_Call { | |||
| 1145 | + | _c.Call.Return(run) | |||
| 1146 | + | return _c | |||
| 1147 | + | } | |||
| 1148 | + | ||||
| 1149 | + | // RegisterHandlerWithCallbacks provides a mock function for the type MockWebUIHandlerRouter | |||
| 1150 | + | func (_mock *MockWebUIHandlerRouter) RegisterHandlerWithCallbacks(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler) error { | |||
| 1151 | + | ret := _mock.Called(msgType, callback, errorCallback, worldName, handler) | |||
| 1152 | + | ||||
| 1153 | + | if len(ret) == 0 { | |||
| 1154 | + | panic("no return value specified for RegisterHandlerWithCallbacks") | |||
| 1155 | + | } | |||
| 1156 | + | ||||
| 1157 | + | var r0 error | |||
| 1158 | + | if returnFunc, ok := ret.Get(0).(func(string, string, string, string, port.WebUIMessageHandler) error); ok { | |||
| 1159 | + | r0 = returnFunc(msgType, callback, errorCallback, worldName, handler) | |||
| 1160 | + | } else { | |||
| 1161 | + | r0 = ret.Error(0) | |||
| 1162 | + | } | |||
| 1163 | + | return r0 | |||
| 1164 | + | } | |||
| 1165 | + | ||||
| 1166 | + | // MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterHandlerWithCallbacks' | |||
| 1167 | + | type MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call struct { | |||
| 1168 | + | *mock.Call | |||
| 1169 | + | } | |||
| 1170 | + | ||||
| 1171 | + | // RegisterHandlerWithCallbacks is a helper method to define mock.On call | |||
| 1172 | + | // - msgType string | |||
| 1173 | + | // - callback string | |||
| 1174 | + | // - errorCallback string | |||
| 1175 | + | // - worldName string | |||
| 1176 | + | // - handler port.WebUIMessageHandler | |||
| 1177 | + | func (_e *MockWebUIHandlerRouter_Expecter) RegisterHandlerWithCallbacks(msgType any, callback any, errorCallback any, worldName any, handler any) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call { | |||
| 1178 | + | return &MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call{Call: _e.mock.On("RegisterHandlerWithCallbacks", msgType, callback, errorCallback, worldName, handler)} | |||
| 1179 | + | } | |||
| 1180 | + | ||||
| 1181 | + | func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) Run(run func(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler)) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call { | |||
| 1182 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1183 | + | var arg0 string | |||
| 1184 | + | if args[0] != nil { | |||
| 1185 | + | arg0 = args[0].(string) | |||
| 1186 | + | } | |||
| 1187 | + | var arg1 string | |||
| 1188 | + | if args[1] != nil { | |||
| 1189 | + | arg1 = args[1].(string) | |||
| 1190 | + | } | |||
| 1191 | + | var arg2 string | |||
| 1192 | + | if args[2] != nil { | |||
| 1193 | + | arg2 = args[2].(string) | |||
| 1194 | + | } | |||
| 1195 | + | var arg3 string | |||
| 1196 | + | if args[3] != nil { | |||
| 1197 | + | arg3 = args[3].(string) | |||
| 1198 | + | } | |||
| 1199 | + | var arg4 port.WebUIMessageHandler | |||
| 1200 | + | if args[4] != nil { | |||
| 1201 | + | arg4 = args[4].(port.WebUIMessageHandler) | |||
| 1202 | + | } | |||
| 1203 | + | run( | |||
| 1204 | + | arg0, | |||
| 1205 | + | arg1, | |||
| 1206 | + | arg2, | |||
| 1207 | + | arg3, | |||
| 1208 | + | arg4, | |||
| 1209 | + | ) | |||
| 1210 | + | }) | |||
| 1211 | + | return _c | |||
| 1212 | + | } | |||
| 1213 | + | ||||
| 1214 | + | func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) Return(err error) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call { | |||
| 1215 | + | _c.Call.Return(err) | |||
| 1216 | + | return _c | |||
| 1217 | + | } | |||
| 1218 | + | ||||
| 1219 | + | func (_c *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call) RunAndReturn(run func(msgType string, callback string, errorCallback string, worldName string, handler port.WebUIMessageHandler) error) *MockWebUIHandlerRouter_RegisterHandlerWithCallbacks_Call { | |||
| 1220 | + | _c.Call.Return(run) | |||
| 1221 | + | return _c | |||
| 1222 | + | } | |||
| 1223 | + | ||||
| 1224 | + | // NewMockSchemeHandler creates a new instance of MockSchemeHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1225 | + | // The first argument is typically a *testing.T value. | |||
| 1226 | + | func NewMockSchemeHandler(t interface { | |||
| 1227 | + | mock.TestingT | |||
| 1228 | + | Cleanup(func()) | |||
| 1229 | + | }) *MockSchemeHandler { | |||
| 1230 | + | mock := &MockSchemeHandler{} | |||
| 1231 | + | mock.Mock.Test(t) | |||
| 1232 | + | ||||
| 1233 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1234 | + | ||||
| 1235 | + | return mock | |||
| 1236 | + | } | |||
| 1237 | + | ||||
| 1238 | + | // MockSchemeHandler is an autogenerated mock type for the SchemeHandler type | |||
| 1239 | + | type MockSchemeHandler struct { | |||
| 1240 | + | mock.Mock | |||
| 1241 | + | } | |||
| 1242 | + | ||||
| 1243 | + | type MockSchemeHandler_Expecter struct { | |||
| 1244 | + | mock *mock.Mock | |||
| 1245 | + | } | |||
| 1246 | + | ||||
| 1247 | + | func (_m *MockSchemeHandler) EXPECT() *MockSchemeHandler_Expecter { | |||
| 1248 | + | return &MockSchemeHandler_Expecter{mock: &_m.Mock} | |||
| 1249 | + | } | |||
| 1250 | + | ||||
| 1251 | + | // RegisterScheme provides a mock function for the type MockSchemeHandler | |||
| 1252 | + | func (_mock *MockSchemeHandler) RegisterScheme(scheme string, handler func(uri string) ([]byte, string, error)) { | |||
| 1253 | + | _mock.Called(scheme, handler) | |||
| 1254 | + | return | |||
| 1255 | + | } | |||
| 1256 | + | ||||
| 1257 | + | // MockSchemeHandler_RegisterScheme_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterScheme' | |||
| 1258 | + | type MockSchemeHandler_RegisterScheme_Call struct { | |||
| 1259 | + | *mock.Call | |||
| 1260 | + | } | |||
| 1261 | + | ||||
| 1262 | + | // RegisterScheme is a helper method to define mock.On call | |||
| 1263 | + | // - scheme string | |||
| 1264 | + | // - handler func(uri string) ([]byte, string, error) | |||
| 1265 | + | func (_e *MockSchemeHandler_Expecter) RegisterScheme(scheme any, handler any) *MockSchemeHandler_RegisterScheme_Call { | |||
| 1266 | + | return &MockSchemeHandler_RegisterScheme_Call{Call: _e.mock.On("RegisterScheme", scheme, handler)} | |||
| 1267 | + | } | |||
| 1268 | + | ||||
| 1269 | + | func (_c *MockSchemeHandler_RegisterScheme_Call) Run(run func(scheme string, handler func(uri string) ([]byte, string, error))) *MockSchemeHandler_RegisterScheme_Call { | |||
| 1270 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1271 | + | var arg0 string | |||
| 1272 | + | if args[0] != nil { | |||
| 1273 | + | arg0 = args[0].(string) | |||
| 1274 | + | } | |||
| 1275 | + | var arg1 func(uri string) ([]byte, string, error) | |||
| 1276 | + | if args[1] != nil { | |||
| 1277 | + | arg1 = args[1].(func(uri string) ([]byte, string, error)) | |||
| 1278 | + | } | |||
| 1279 | + | run( | |||
| 1280 | + | arg0, | |||
| 1281 | + | arg1, | |||
| 1282 | + | ) | |||
| 1283 | + | }) | |||
| 1284 | + | return _c | |||
| 1285 | + | } | |||
| 1286 | + | ||||
| 1287 | + | func (_c *MockSchemeHandler_RegisterScheme_Call) Return() *MockSchemeHandler_RegisterScheme_Call { | |||
| 1288 | + | _c.Call.Return() | |||
| 1289 | + | return _c | |||
| 1290 | + | } | |||
| 1291 | + | ||||
| 1292 | + | func (_c *MockSchemeHandler_RegisterScheme_Call) RunAndReturn(run func(scheme string, handler func(uri string) ([]byte, string, error))) *MockSchemeHandler_RegisterScheme_Call { | |||
| 1293 | + | _c.Run(run) | |||
| 1294 | + | return _c | |||
| 1295 | + | } | |||
| 1296 | + | ||||
| 1297 | + | // NewMockSettingsApplier creates a new instance of MockSettingsApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1298 | + | // The first argument is typically a *testing.T value. | |||
| 1299 | + | func NewMockSettingsApplier(t interface { | |||
| 1300 | + | mock.TestingT | |||
| 1301 | + | Cleanup(func()) | |||
| 1302 | + | }) *MockSettingsApplier { | |||
| 1303 | + | mock := &MockSettingsApplier{} | |||
| 1304 | + | mock.Mock.Test(t) | |||
| 1305 | + | ||||
| 1306 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1307 | + | ||||
| 1308 | + | return mock | |||
| 1309 | + | } | |||
| 1310 | + | ||||
| 1311 | + | // MockSettingsApplier is an autogenerated mock type for the SettingsApplier type | |||
| 1312 | + | type MockSettingsApplier struct { | |||
| 1313 | + | mock.Mock | |||
| 1314 | + | } | |||
| 1315 | + | ||||
| 1316 | + | type MockSettingsApplier_Expecter struct { | |||
| 1317 | + | mock *mock.Mock | |||
| 1318 | + | } | |||
| 1319 | + | ||||
| 1320 | + | func (_m *MockSettingsApplier) EXPECT() *MockSettingsApplier_Expecter { | |||
| 1321 | + | return &MockSettingsApplier_Expecter{mock: &_m.Mock} | |||
| 1322 | + | } | |||
| 1323 | + | ||||
| 1324 | + | // ApplyToAll provides a mock function for the type MockSettingsApplier | |||
| 1325 | + | func (_mock *MockSettingsApplier) ApplyToAll(ctx context.Context, webviews []port.WebView) { | |||
| 1326 | + | _mock.Called(ctx, webviews) | |||
| 1327 | + | return | |||
| 1328 | + | } | |||
| 1329 | + | ||||
| 1330 | + | // MockSettingsApplier_ApplyToAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyToAll' | |||
| 1331 | + | type MockSettingsApplier_ApplyToAll_Call struct { | |||
| 1332 | + | *mock.Call | |||
| 1333 | + | } | |||
| 1334 | + | ||||
| 1335 | + | // ApplyToAll is a helper method to define mock.On call | |||
| 1336 | + | // - ctx context.Context | |||
| 1337 | + | // - webviews []port.WebView | |||
| 1338 | + | func (_e *MockSettingsApplier_Expecter) ApplyToAll(ctx any, webviews any) *MockSettingsApplier_ApplyToAll_Call { | |||
| 1339 | + | return &MockSettingsApplier_ApplyToAll_Call{Call: _e.mock.On("ApplyToAll", ctx, webviews)} | |||
| 1340 | + | } | |||
| 1341 | + | ||||
| 1342 | + | func (_c *MockSettingsApplier_ApplyToAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockSettingsApplier_ApplyToAll_Call { | |||
| 1343 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1344 | + | var arg0 context.Context | |||
| 1345 | + | if args[0] != nil { | |||
| 1346 | + | arg0 = args[0].(context.Context) | |||
| 1347 | + | } | |||
| 1348 | + | var arg1 []port.WebView | |||
| 1349 | + | if args[1] != nil { | |||
| 1350 | + | arg1 = args[1].([]port.WebView) | |||
| 1351 | + | } | |||
| 1352 | + | run( | |||
| 1353 | + | arg0, | |||
| 1354 | + | arg1, | |||
| 1355 | + | ) | |||
| 1356 | + | }) | |||
| 1357 | + | return _c | |||
| 1358 | + | } | |||
| 1359 | + | ||||
| 1360 | + | func (_c *MockSettingsApplier_ApplyToAll_Call) Return() *MockSettingsApplier_ApplyToAll_Call { | |||
| 1361 | + | _c.Call.Return() | |||
| 1362 | + | return _c | |||
| 1363 | + | } | |||
| 1364 | + | ||||
| 1365 | + | func (_c *MockSettingsApplier_ApplyToAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockSettingsApplier_ApplyToAll_Call { | |||
| 1366 | + | _c.Run(run) | |||
| 1367 | + | return _c | |||
| 1368 | + | } | |||
| 1369 | + | ||||
| 1370 | + | // NewMockFilterApplier creates a new instance of MockFilterApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1371 | + | // The first argument is typically a *testing.T value. | |||
| 1372 | + | func NewMockFilterApplier(t interface { | |||
| 1373 | + | mock.TestingT | |||
| 1374 | + | Cleanup(func()) | |||
| 1375 | + | }) *MockFilterApplier { | |||
| 1376 | + | mock := &MockFilterApplier{} | |||
| 1377 | + | mock.Mock.Test(t) | |||
| 1378 | + | ||||
| 1379 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1380 | + | ||||
| 1381 | + | return mock | |||
| 1382 | + | } | |||
| 1383 | + | ||||
| 1384 | + | // MockFilterApplier is an autogenerated mock type for the FilterApplier type | |||
| 1385 | + | type MockFilterApplier struct { | |||
| 1386 | + | mock.Mock | |||
| 1387 | + | } | |||
| 1388 | + | ||||
| 1389 | + | type MockFilterApplier_Expecter struct { | |||
| 1390 | + | mock *mock.Mock | |||
| 1391 | + | } | |||
| 1392 | + | ||||
| 1393 | + | func (_m *MockFilterApplier) EXPECT() *MockFilterApplier_Expecter { | |||
| 1394 | + | return &MockFilterApplier_Expecter{mock: &_m.Mock} | |||
| 1395 | + | } | |||
| 1396 | + | ||||
| 1397 | + | // ApplyToAll provides a mock function for the type MockFilterApplier | |||
| 1398 | + | func (_mock *MockFilterApplier) ApplyToAll(ctx context.Context, webviews []port.WebView) { | |||
| 1399 | + | _mock.Called(ctx, webviews) | |||
| 1400 | + | return | |||
| 1401 | + | } | |||
| 1402 | + | ||||
| 1403 | + | // MockFilterApplier_ApplyToAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyToAll' | |||
| 1404 | + | type MockFilterApplier_ApplyToAll_Call struct { | |||
| 1405 | + | *mock.Call | |||
| 1406 | + | } | |||
| 1407 | + | ||||
| 1408 | + | // ApplyToAll is a helper method to define mock.On call | |||
| 1409 | + | // - ctx context.Context | |||
| 1410 | + | // - webviews []port.WebView | |||
| 1411 | + | func (_e *MockFilterApplier_Expecter) ApplyToAll(ctx any, webviews any) *MockFilterApplier_ApplyToAll_Call { | |||
| 1412 | + | return &MockFilterApplier_ApplyToAll_Call{Call: _e.mock.On("ApplyToAll", ctx, webviews)} | |||
| 1413 | + | } | |||
| 1414 | + | ||||
| 1415 | + | func (_c *MockFilterApplier_ApplyToAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockFilterApplier_ApplyToAll_Call { | |||
| 1416 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1417 | + | var arg0 context.Context | |||
| 1418 | + | if args[0] != nil { | |||
| 1419 | + | arg0 = args[0].(context.Context) | |||
| 1420 | + | } | |||
| 1421 | + | var arg1 []port.WebView | |||
| 1422 | + | if args[1] != nil { | |||
| 1423 | + | arg1 = args[1].([]port.WebView) | |||
| 1424 | + | } | |||
| 1425 | + | run( | |||
| 1426 | + | arg0, | |||
| 1427 | + | arg1, | |||
| 1428 | + | ) | |||
| 1429 | + | }) | |||
| 1430 | + | return _c | |||
| 1431 | + | } | |||
| 1432 | + | ||||
| 1433 | + | func (_c *MockFilterApplier_ApplyToAll_Call) Return() *MockFilterApplier_ApplyToAll_Call { | |||
| 1434 | + | _c.Call.Return() | |||
| 1435 | + | return _c | |||
| 1436 | + | } | |||
| 1437 | + | ||||
| 1438 | + | func (_c *MockFilterApplier_ApplyToAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockFilterApplier_ApplyToAll_Call { | |||
| 1439 | + | _c.Run(run) | |||
| 1440 | + | return _c | |||
| 1441 | + | } | |||
| 1442 | + | ||||
| 1443 | + | // NewMockFaviconDatabase creates a new instance of MockFaviconDatabase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1444 | + | // The first argument is typically a *testing.T value. | |||
| 1445 | + | func NewMockFaviconDatabase(t interface { | |||
| 1446 | + | mock.TestingT | |||
| 1447 | + | Cleanup(func()) | |||
| 1448 | + | }) *MockFaviconDatabase { | |||
| 1449 | + | mock := &MockFaviconDatabase{} | |||
| 1450 | + | mock.Mock.Test(t) | |||
| 1451 | + | ||||
| 1452 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1453 | + | ||||
| 1454 | + | return mock | |||
| 1455 | + | } | |||
| 1456 | + | ||||
| 1457 | + | // MockFaviconDatabase is an autogenerated mock type for the FaviconDatabase type | |||
| 1458 | + | type MockFaviconDatabase struct { | |||
| 1459 | + | mock.Mock | |||
| 1460 | + | } | |||
| 1461 | + | ||||
| 1462 | + | type MockFaviconDatabase_Expecter struct { | |||
| 1463 | + | mock *mock.Mock | |||
| 1464 | + | } | |||
| 1465 | + | ||||
| 1466 | + | func (_m *MockFaviconDatabase) EXPECT() *MockFaviconDatabase_Expecter { | |||
| 1467 | + | return &MockFaviconDatabase_Expecter{mock: &_m.Mock} | |||
| 1468 | + | } | |||
| 1469 | + | ||||
| 1470 | + | // GetFaviconAsync provides a mock function for the type MockFaviconDatabase | |||
| 1471 | + | func (_mock *MockFaviconDatabase) GetFaviconAsync(pageURL string, callback func(port.Texture)) { | |||
| 1472 | + | _mock.Called(pageURL, callback) | |||
| 1473 | + | return | |||
| 1474 | + | } | |||
| 1475 | + | ||||
| 1476 | + | // MockFaviconDatabase_GetFaviconAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFaviconAsync' | |||
| 1477 | + | type MockFaviconDatabase_GetFaviconAsync_Call struct { | |||
| 1478 | + | *mock.Call | |||
| 1479 | + | } | |||
| 1480 | + | ||||
| 1481 | + | // GetFaviconAsync is a helper method to define mock.On call | |||
| 1482 | + | // - pageURL string | |||
| 1483 | + | // - callback func(port.Texture) | |||
| 1484 | + | func (_e *MockFaviconDatabase_Expecter) GetFaviconAsync(pageURL any, callback any) *MockFaviconDatabase_GetFaviconAsync_Call { | |||
| 1485 | + | return &MockFaviconDatabase_GetFaviconAsync_Call{Call: _e.mock.On("GetFaviconAsync", pageURL, callback)} | |||
| 1486 | + | } | |||
| 1487 | + | ||||
| 1488 | + | func (_c *MockFaviconDatabase_GetFaviconAsync_Call) Run(run func(pageURL string, callback func(port.Texture))) *MockFaviconDatabase_GetFaviconAsync_Call { | |||
| 1489 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1490 | + | var arg0 string | |||
| 1491 | + | if args[0] != nil { | |||
| 1492 | + | arg0 = args[0].(string) | |||
| 1493 | + | } | |||
| 1494 | + | var arg1 func(port.Texture) | |||
| 1495 | + | if args[1] != nil { | |||
| 1496 | + | arg1 = args[1].(func(port.Texture)) | |||
| 1497 | + | } | |||
| 1498 | + | run( | |||
| 1499 | + | arg0, | |||
| 1500 | + | arg1, | |||
| 1501 | + | ) | |||
| 1502 | + | }) | |||
| 1503 | + | return _c | |||
| 1504 | + | } | |||
| 1505 | + | ||||
| 1506 | + | func (_c *MockFaviconDatabase_GetFaviconAsync_Call) Return() *MockFaviconDatabase_GetFaviconAsync_Call { | |||
| 1507 | + | _c.Call.Return() | |||
| 1508 | + | return _c | |||
| 1509 | + | } | |||
| 1510 | + | ||||
| 1511 | + | func (_c *MockFaviconDatabase_GetFaviconAsync_Call) RunAndReturn(run func(pageURL string, callback func(port.Texture))) *MockFaviconDatabase_GetFaviconAsync_Call { | |||
| 1512 | + | _c.Run(run) | |||
| 1513 | + | return _c | |||
| 1514 | + | } | |||
| 1515 | + | ||||
| 1516 | + | // NewMockScriptRefresher creates a new instance of MockScriptRefresher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1517 | + | // The first argument is typically a *testing.T value. | |||
| 1518 | + | func NewMockScriptRefresher(t interface { | |||
| 1519 | + | mock.TestingT | |||
| 1520 | + | Cleanup(func()) | |||
| 1521 | + | }) *MockScriptRefresher { | |||
| 1522 | + | mock := &MockScriptRefresher{} | |||
| 1523 | + | mock.Mock.Test(t) | |||
| 1524 | + | ||||
| 1525 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1526 | + | ||||
| 1527 | + | return mock | |||
| 1528 | + | } | |||
| 1529 | + | ||||
| 1530 | + | // MockScriptRefresher is an autogenerated mock type for the ScriptRefresher type | |||
| 1531 | + | type MockScriptRefresher struct { | |||
| 1532 | + | mock.Mock | |||
| 1533 | + | } | |||
| 1534 | + | ||||
| 1535 | + | type MockScriptRefresher_Expecter struct { | |||
| 1536 | + | mock *mock.Mock | |||
| 1537 | + | } | |||
| 1538 | + | ||||
| 1539 | + | func (_m *MockScriptRefresher) EXPECT() *MockScriptRefresher_Expecter { | |||
| 1540 | + | return &MockScriptRefresher_Expecter{mock: &_m.Mock} | |||
| 1541 | + | } | |||
| 1542 | + | ||||
| 1543 | + | // RefreshAll provides a mock function for the type MockScriptRefresher | |||
| 1544 | + | func (_mock *MockScriptRefresher) RefreshAll(ctx context.Context, webviews []port.WebView) { | |||
| 1545 | + | _mock.Called(ctx, webviews) | |||
| 1546 | + | return | |||
| 1547 | + | } | |||
| 1548 | + | ||||
| 1549 | + | // MockScriptRefresher_RefreshAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshAll' | |||
| 1550 | + | type MockScriptRefresher_RefreshAll_Call struct { | |||
| 1551 | + | *mock.Call | |||
| 1552 | + | } | |||
| 1553 | + | ||||
| 1554 | + | // RefreshAll is a helper method to define mock.On call | |||
| 1555 | + | // - ctx context.Context | |||
| 1556 | + | // - webviews []port.WebView | |||
| 1557 | + | func (_e *MockScriptRefresher_Expecter) RefreshAll(ctx any, webviews any) *MockScriptRefresher_RefreshAll_Call { | |||
| 1558 | + | return &MockScriptRefresher_RefreshAll_Call{Call: _e.mock.On("RefreshAll", ctx, webviews)} | |||
| 1559 | + | } | |||
| 1560 | + | ||||
| 1561 | + | func (_c *MockScriptRefresher_RefreshAll_Call) Run(run func(ctx context.Context, webviews []port.WebView)) *MockScriptRefresher_RefreshAll_Call { | |||
| 1562 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1563 | + | var arg0 context.Context | |||
| 1564 | + | if args[0] != nil { | |||
| 1565 | + | arg0 = args[0].(context.Context) | |||
| 1566 | + | } | |||
| 1567 | + | var arg1 []port.WebView | |||
| 1568 | + | if args[1] != nil { | |||
| 1569 | + | arg1 = args[1].([]port.WebView) | |||
| 1570 | + | } | |||
| 1571 | + | run( | |||
| 1572 | + | arg0, | |||
| 1573 | + | arg1, | |||
| 1574 | + | ) | |||
| 1575 | + | }) | |||
| 1576 | + | return _c | |||
| 1577 | + | } | |||
| 1578 | + | ||||
| 1579 | + | func (_c *MockScriptRefresher_RefreshAll_Call) Return() *MockScriptRefresher_RefreshAll_Call { | |||
| 1580 | + | _c.Call.Return() | |||
| 1581 | + | return _c | |||
| 1582 | + | } | |||
| 1583 | + | ||||
| 1584 | + | func (_c *MockScriptRefresher_RefreshAll_Call) RunAndReturn(run func(ctx context.Context, webviews []port.WebView)) *MockScriptRefresher_RefreshAll_Call { | |||
| 1585 | + | _c.Run(run) | |||
| 1586 | + | return _c | |||
| 1587 | + | } | |||
| 1588 | + | ||||
| 1589 | + | // NewMockNativeWidgetProvider creates a new instance of MockNativeWidgetProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1590 | + | // The first argument is typically a *testing.T value. | |||
| 1591 | + | func NewMockNativeWidgetProvider(t interface { | |||
| 1592 | + | mock.TestingT | |||
| 1593 | + | Cleanup(func()) | |||
| 1594 | + | }) *MockNativeWidgetProvider { | |||
| 1595 | + | mock := &MockNativeWidgetProvider{} | |||
| 1596 | + | mock.Mock.Test(t) | |||
| 1597 | + | ||||
| 1598 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1599 | + | ||||
| 1600 | + | return mock | |||
| 1601 | + | } | |||
| 1602 | + | ||||
| 1603 | + | // MockNativeWidgetProvider is an autogenerated mock type for the NativeWidgetProvider type | |||
| 1604 | + | type MockNativeWidgetProvider struct { | |||
| 1605 | + | mock.Mock | |||
| 1606 | + | } | |||
| 1607 | + | ||||
| 1608 | + | type MockNativeWidgetProvider_Expecter struct { | |||
| 1609 | + | mock *mock.Mock | |||
| 1610 | + | } | |||
| 1611 | + | ||||
| 1612 | + | func (_m *MockNativeWidgetProvider) EXPECT() *MockNativeWidgetProvider_Expecter { | |||
| 1613 | + | return &MockNativeWidgetProvider_Expecter{mock: &_m.Mock} | |||
| 1614 | + | } | |||
| 1615 | + | ||||
| 1616 | + | // NativeWidget provides a mock function for the type MockNativeWidgetProvider | |||
| 1617 | + | func (_mock *MockNativeWidgetProvider) NativeWidget() uintptr { | |||
| 1618 | + | ret := _mock.Called() | |||
| 1619 | + | ||||
| 1620 | + | if len(ret) == 0 { | |||
| 1621 | + | panic("no return value specified for NativeWidget") | |||
| 1622 | + | } | |||
| 1623 | + | ||||
| 1624 | + | var r0 uintptr | |||
| 1625 | + | if returnFunc, ok := ret.Get(0).(func() uintptr); ok { | |||
| 1626 | + | r0 = returnFunc() | |||
| 1627 | + | } else { | |||
| 1628 | + | r0 = ret.Get(0).(uintptr) | |||
| 1629 | + | } | |||
| 1630 | + | return r0 | |||
| 1631 | + | } | |||
| 1632 | + | ||||
| 1633 | + | // MockNativeWidgetProvider_NativeWidget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NativeWidget' | |||
| 1634 | + | type MockNativeWidgetProvider_NativeWidget_Call struct { | |||
| 1635 | + | *mock.Call | |||
| 1636 | + | } | |||
| 1637 | + | ||||
| 1638 | + | // NativeWidget is a helper method to define mock.On call | |||
| 1639 | + | func (_e *MockNativeWidgetProvider_Expecter) NativeWidget() *MockNativeWidgetProvider_NativeWidget_Call { | |||
| 1640 | + | return &MockNativeWidgetProvider_NativeWidget_Call{Call: _e.mock.On("NativeWidget")} | |||
| 1641 | + | } | |||
| 1642 | + | ||||
| 1643 | + | func (_c *MockNativeWidgetProvider_NativeWidget_Call) Run(run func()) *MockNativeWidgetProvider_NativeWidget_Call { | |||
| 1644 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1645 | + | run() | |||
| 1646 | + | }) | |||
| 1647 | + | return _c | |||
| 1648 | + | } | |||
| 1649 | + | ||||
| 1650 | + | func (_c *MockNativeWidgetProvider_NativeWidget_Call) Return(v uintptr) *MockNativeWidgetProvider_NativeWidget_Call { | |||
| 1651 | + | _c.Call.Return(v) | |||
| 1652 | + | return _c | |||
| 1653 | + | } | |||
| 1654 | + | ||||
| 1655 | + | func (_c *MockNativeWidgetProvider_NativeWidget_Call) RunAndReturn(run func() uintptr) *MockNativeWidgetProvider_NativeWidget_Call { | |||
| 1656 | + | _c.Call.Return(run) | |||
| 1657 | + | return _c | |||
| 1658 | + | } | |||
M internal/application/port/mocks/favicon_resolver.go +6 -6
| @@ -65,7 +65,7 @@ type MockFaviconResolver_EnsureSized_Call struct { | |||||
| 65 | // - ctx context.Context | 65 | // - ctx context.Context | ||
| 66 | // - key favicon.Key | 66 | // - key favicon.Key | ||
| 67 | // - size int | 67 | // - size int | ||
| 68 | - | func (_e *MockFaviconResolver_Expecter) EnsureSized(ctx interface{}, key interface{}, size interface{}) *MockFaviconResolver_EnsureSized_Call { | 68 | + | func (_e *MockFaviconResolver_Expecter) EnsureSized(ctx any, key any, size any) *MockFaviconResolver_EnsureSized_Call { |
| 69 | return &MockFaviconResolver_EnsureSized_Call{Call: _e.mock.On("EnsureSized", ctx, key, size)} | 69 | return &MockFaviconResolver_EnsureSized_Call{Call: _e.mock.On("EnsureSized", ctx, key, size)} | ||
| 70 | } | 70 | } | ||
| 71 | 71 | ||||
| @@ -127,7 +127,7 @@ type MockFaviconResolver_Invalidate_Call struct { | |||||
| 127 | // Invalidate is a helper method to define mock.On call | 127 | // Invalidate is a helper method to define mock.On call | ||
| 128 | // - ctx context.Context | 128 | // - ctx context.Context | ||
| 129 | // - key favicon.Key | 129 | // - key favicon.Key | ||
| 130 | - | func (_e *MockFaviconResolver_Expecter) Invalidate(ctx interface{}, key interface{}) *MockFaviconResolver_Invalidate_Call { | 130 | + | func (_e *MockFaviconResolver_Expecter) Invalidate(ctx any, key any) *MockFaviconResolver_Invalidate_Call { |
| 131 | return &MockFaviconResolver_Invalidate_Call{Call: _e.mock.On("Invalidate", ctx, key)} | 131 | return &MockFaviconResolver_Invalidate_Call{Call: _e.mock.On("Invalidate", ctx, key)} | ||
| 132 | } | 132 | } | ||
| 133 | 133 | ||||
| @@ -199,7 +199,7 @@ type MockFaviconResolver_Observe_Call struct { | |||||
| 199 | // - bytes []byte | 199 | // - bytes []byte | ||
| 200 | // - source favicon.Source | 200 | // - source favicon.Source | ||
| 201 | // - contentType string | 201 | // - contentType string | ||
| 202 | - | func (_e *MockFaviconResolver_Expecter) Observe(ctx interface{}, pageURL interface{}, iconURL interface{}, bytes interface{}, source interface{}, contentType interface{}) *MockFaviconResolver_Observe_Call { | 202 | + | func (_e *MockFaviconResolver_Expecter) Observe(ctx any, pageURL any, iconURL any, bytes any, source any, contentType any) *MockFaviconResolver_Observe_Call { |
| 203 | return &MockFaviconResolver_Observe_Call{Call: _e.mock.On("Observe", ctx, pageURL, iconURL, bytes, source, contentType)} | 203 | return &MockFaviconResolver_Observe_Call{Call: _e.mock.On("Observe", ctx, pageURL, iconURL, bytes, source, contentType)} | ||
| 204 | } | 204 | } | ||
| 205 | 205 | ||||
| @@ -277,7 +277,7 @@ type MockFaviconResolver_RefreshFromIconURLs_Call struct { | |||||
| 277 | // - ctx context.Context | 277 | // - ctx context.Context | ||
| 278 | // - pageURL string | 278 | // - pageURL string | ||
| 279 | // - iconURLs []string | 279 | // - iconURLs []string | ||
| 280 | - | func (_e *MockFaviconResolver_Expecter) RefreshFromIconURLs(ctx interface{}, pageURL interface{}, iconURLs interface{}) *MockFaviconResolver_RefreshFromIconURLs_Call { | 280 | + | func (_e *MockFaviconResolver_Expecter) RefreshFromIconURLs(ctx any, pageURL any, iconURLs any) *MockFaviconResolver_RefreshFromIconURLs_Call { |
| 281 | return &MockFaviconResolver_RefreshFromIconURLs_Call{Call: _e.mock.On("RefreshFromIconURLs", ctx, pageURL, iconURLs)} | 281 | return &MockFaviconResolver_RefreshFromIconURLs_Call{Call: _e.mock.On("RefreshFromIconURLs", ctx, pageURL, iconURLs)} | ||
| 282 | } | 282 | } | ||
| 283 | 283 | ||||
| @@ -352,7 +352,7 @@ type MockFaviconResolver_Resolve_Call struct { | |||||
| 352 | // - rawURLOrDomain string | 352 | // - rawURLOrDomain string | ||
| 353 | // - size int | 353 | // - size int | ||
| 354 | // - options port.FaviconResolveOptions | 354 | // - options port.FaviconResolveOptions | ||
| 355 | - | func (_e *MockFaviconResolver_Expecter) Resolve(ctx interface{}, rawURLOrDomain interface{}, size interface{}, options interface{}) *MockFaviconResolver_Resolve_Call { | 355 | + | func (_e *MockFaviconResolver_Expecter) Resolve(ctx any, rawURLOrDomain any, size any, options any) *MockFaviconResolver_Resolve_Call { |
| 356 | return &MockFaviconResolver_Resolve_Call{Call: _e.mock.On("Resolve", ctx, rawURLOrDomain, size, options)} | 356 | return &MockFaviconResolver_Resolve_Call{Call: _e.mock.On("Resolve", ctx, rawURLOrDomain, size, options)} | ||
| 357 | } | 357 | } | ||
| 358 | 358 | ||||
| @@ -431,7 +431,7 @@ type MockFaviconResolver_ResolveSystemviewIcon_Call struct { | |||||
| 431 | // - ctx context.Context | 431 | // - ctx context.Context | ||
| 432 | // - rawDomain string | 432 | // - rawDomain string | ||
| 433 | // - size int | 433 | // - size int | ||
| 434 | - | func (_e *MockFaviconResolver_Expecter) ResolveSystemviewIcon(ctx interface{}, rawDomain interface{}, size interface{}) *MockFaviconResolver_ResolveSystemviewIcon_Call { | 434 | + | func (_e *MockFaviconResolver_Expecter) ResolveSystemviewIcon(ctx any, rawDomain any, size any) *MockFaviconResolver_ResolveSystemviewIcon_Call { |
| 435 | return &MockFaviconResolver_ResolveSystemviewIcon_Call{Call: _e.mock.On("ResolveSystemviewIcon", ctx, rawDomain, size)} | 435 | return &MockFaviconResolver_ResolveSystemviewIcon_Call{Call: _e.mock.On("ResolveSystemviewIcon", ctx, rawDomain, size)} | ||
| 436 | } | 436 | } | ||
| 437 | 437 | ||||
A internal/application/port/mocks/favicon_service.go +576 -0
| @@ -0,0 +1,576 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | mock "github.com/stretchr/testify/mock" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // NewMockFaviconService creates a new instance of MockFaviconService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 14 | + | // The first argument is typically a *testing.T value. | |||
| 15 | + | func NewMockFaviconService(t interface { | |||
| 16 | + | mock.TestingT | |||
| 17 | + | Cleanup(func()) | |||
| 18 | + | }) *MockFaviconService { | |||
| 19 | + | mock := &MockFaviconService{} | |||
| 20 | + | mock.Mock.Test(t) | |||
| 21 | + | ||||
| 22 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 23 | + | ||||
| 24 | + | return mock | |||
| 25 | + | } | |||
| 26 | + | ||||
| 27 | + | // MockFaviconService is an autogenerated mock type for the FaviconService type | |||
| 28 | + | type MockFaviconService struct { | |||
| 29 | + | mock.Mock | |||
| 30 | + | } | |||
| 31 | + | ||||
| 32 | + | type MockFaviconService_Expecter struct { | |||
| 33 | + | mock *mock.Mock | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | func (_m *MockFaviconService) EXPECT() *MockFaviconService_Expecter { | |||
| 37 | + | return &MockFaviconService_Expecter{mock: &_m.Mock} | |||
| 38 | + | } | |||
| 39 | + | ||||
| 40 | + | // Close provides a mock function for the type MockFaviconService | |||
| 41 | + | func (_mock *MockFaviconService) Close() { | |||
| 42 | + | _mock.Called() | |||
| 43 | + | return | |||
| 44 | + | } | |||
| 45 | + | ||||
| 46 | + | // MockFaviconService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' | |||
| 47 | + | type MockFaviconService_Close_Call struct { | |||
| 48 | + | *mock.Call | |||
| 49 | + | } | |||
| 50 | + | ||||
| 51 | + | // Close is a helper method to define mock.On call | |||
| 52 | + | func (_e *MockFaviconService_Expecter) Close() *MockFaviconService_Close_Call { | |||
| 53 | + | return &MockFaviconService_Close_Call{Call: _e.mock.On("Close")} | |||
| 54 | + | } | |||
| 55 | + | ||||
| 56 | + | func (_c *MockFaviconService_Close_Call) Run(run func()) *MockFaviconService_Close_Call { | |||
| 57 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 58 | + | run() | |||
| 59 | + | }) | |||
| 60 | + | return _c | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | func (_c *MockFaviconService_Close_Call) Return() *MockFaviconService_Close_Call { | |||
| 64 | + | _c.Call.Return() | |||
| 65 | + | return _c | |||
| 66 | + | } | |||
| 67 | + | ||||
| 68 | + | func (_c *MockFaviconService_Close_Call) RunAndReturn(run func()) *MockFaviconService_Close_Call { | |||
| 69 | + | _c.Run(run) | |||
| 70 | + | return _c | |||
| 71 | + | } | |||
| 72 | + | ||||
| 73 | + | // DiskPathPNG provides a mock function for the type MockFaviconService | |||
| 74 | + | func (_mock *MockFaviconService) DiskPathPNG(domain string) string { | |||
| 75 | + | ret := _mock.Called(domain) | |||
| 76 | + | ||||
| 77 | + | if len(ret) == 0 { | |||
| 78 | + | panic("no return value specified for DiskPathPNG") | |||
| 79 | + | } | |||
| 80 | + | ||||
| 81 | + | var r0 string | |||
| 82 | + | if returnFunc, ok := ret.Get(0).(func(string) string); ok { | |||
| 83 | + | r0 = returnFunc(domain) | |||
| 84 | + | } else { | |||
| 85 | + | r0 = ret.Get(0).(string) | |||
| 86 | + | } | |||
| 87 | + | return r0 | |||
| 88 | + | } | |||
| 89 | + | ||||
| 90 | + | // MockFaviconService_DiskPathPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNG' | |||
| 91 | + | type MockFaviconService_DiskPathPNG_Call struct { | |||
| 92 | + | *mock.Call | |||
| 93 | + | } | |||
| 94 | + | ||||
| 95 | + | // DiskPathPNG is a helper method to define mock.On call | |||
| 96 | + | // - domain string | |||
| 97 | + | func (_e *MockFaviconService_Expecter) DiskPathPNG(domain any) *MockFaviconService_DiskPathPNG_Call { | |||
| 98 | + | return &MockFaviconService_DiskPathPNG_Call{Call: _e.mock.On("DiskPathPNG", domain)} | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | func (_c *MockFaviconService_DiskPathPNG_Call) Run(run func(domain string)) *MockFaviconService_DiskPathPNG_Call { | |||
| 102 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 103 | + | var arg0 string | |||
| 104 | + | if args[0] != nil { | |||
| 105 | + | arg0 = args[0].(string) | |||
| 106 | + | } | |||
| 107 | + | run( | |||
| 108 | + | arg0, | |||
| 109 | + | ) | |||
| 110 | + | }) | |||
| 111 | + | return _c | |||
| 112 | + | } | |||
| 113 | + | ||||
| 114 | + | func (_c *MockFaviconService_DiskPathPNG_Call) Return(s string) *MockFaviconService_DiskPathPNG_Call { | |||
| 115 | + | _c.Call.Return(s) | |||
| 116 | + | return _c | |||
| 117 | + | } | |||
| 118 | + | ||||
| 119 | + | func (_c *MockFaviconService_DiskPathPNG_Call) RunAndReturn(run func(domain string) string) *MockFaviconService_DiskPathPNG_Call { | |||
| 120 | + | _c.Call.Return(run) | |||
| 121 | + | return _c | |||
| 122 | + | } | |||
| 123 | + | ||||
| 124 | + | // DiskPathPNGSized provides a mock function for the type MockFaviconService | |||
| 125 | + | func (_mock *MockFaviconService) DiskPathPNGSized(domain string, size int) string { | |||
| 126 | + | ret := _mock.Called(domain, size) | |||
| 127 | + | ||||
| 128 | + | if len(ret) == 0 { | |||
| 129 | + | panic("no return value specified for DiskPathPNGSized") | |||
| 130 | + | } | |||
| 131 | + | ||||
| 132 | + | var r0 string | |||
| 133 | + | if returnFunc, ok := ret.Get(0).(func(string, int) string); ok { | |||
| 134 | + | r0 = returnFunc(domain, size) | |||
| 135 | + | } else { | |||
| 136 | + | r0 = ret.Get(0).(string) | |||
| 137 | + | } | |||
| 138 | + | return r0 | |||
| 139 | + | } | |||
| 140 | + | ||||
| 141 | + | // MockFaviconService_DiskPathPNGSized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiskPathPNGSized' | |||
| 142 | + | type MockFaviconService_DiskPathPNGSized_Call struct { | |||
| 143 | + | *mock.Call | |||
| 144 | + | } | |||
| 145 | + | ||||
| 146 | + | // DiskPathPNGSized is a helper method to define mock.On call | |||
| 147 | + | // - domain string | |||
| 148 | + | // - size int | |||
| 149 | + | func (_e *MockFaviconService_Expecter) DiskPathPNGSized(domain any, size any) *MockFaviconService_DiskPathPNGSized_Call { | |||
| 150 | + | return &MockFaviconService_DiskPathPNGSized_Call{Call: _e.mock.On("DiskPathPNGSized", domain, size)} | |||
| 151 | + | } | |||
| 152 | + | ||||
| 153 | + | func (_c *MockFaviconService_DiskPathPNGSized_Call) Run(run func(domain string, size int)) *MockFaviconService_DiskPathPNGSized_Call { | |||
| 154 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 155 | + | var arg0 string | |||
| 156 | + | if args[0] != nil { | |||
| 157 | + | arg0 = args[0].(string) | |||
| 158 | + | } | |||
| 159 | + | var arg1 int | |||
| 160 | + | if args[1] != nil { | |||
| 161 | + | arg1 = args[1].(int) | |||
| 162 | + | } | |||
| 163 | + | run( | |||
| 164 | + | arg0, | |||
| 165 | + | arg1, | |||
| 166 | + | ) | |||
| 167 | + | }) | |||
| 168 | + | return _c | |||
| 169 | + | } | |||
| 170 | + | ||||
| 171 | + | func (_c *MockFaviconService_DiskPathPNGSized_Call) Return(s string) *MockFaviconService_DiskPathPNGSized_Call { | |||
| 172 | + | _c.Call.Return(s) | |||
| 173 | + | return _c | |||
| 174 | + | } | |||
| 175 | + | ||||
| 176 | + | func (_c *MockFaviconService_DiskPathPNGSized_Call) RunAndReturn(run func(domain string, size int) string) *MockFaviconService_DiskPathPNGSized_Call { | |||
| 177 | + | _c.Call.Return(run) | |||
| 178 | + | return _c | |||
| 179 | + | } | |||
| 180 | + | ||||
| 181 | + | // EnsureCacheDir provides a mock function for the type MockFaviconService | |||
| 182 | + | func (_mock *MockFaviconService) EnsureCacheDir() error { | |||
| 183 | + | ret := _mock.Called() | |||
| 184 | + | ||||
| 185 | + | if len(ret) == 0 { | |||
| 186 | + | panic("no return value specified for EnsureCacheDir") | |||
| 187 | + | } | |||
| 188 | + | ||||
| 189 | + | var r0 error | |||
| 190 | + | if returnFunc, ok := ret.Get(0).(func() error); ok { | |||
| 191 | + | r0 = returnFunc() | |||
| 192 | + | } else { | |||
| 193 | + | r0 = ret.Error(0) | |||
| 194 | + | } | |||
| 195 | + | return r0 | |||
| 196 | + | } | |||
| 197 | + | ||||
| 198 | + | // MockFaviconService_EnsureCacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureCacheDir' | |||
| 199 | + | type MockFaviconService_EnsureCacheDir_Call struct { | |||
| 200 | + | *mock.Call | |||
| 201 | + | } | |||
| 202 | + | ||||
| 203 | + | // EnsureCacheDir is a helper method to define mock.On call | |||
| 204 | + | func (_e *MockFaviconService_Expecter) EnsureCacheDir() *MockFaviconService_EnsureCacheDir_Call { | |||
| 205 | + | return &MockFaviconService_EnsureCacheDir_Call{Call: _e.mock.On("EnsureCacheDir")} | |||
| 206 | + | } | |||
| 207 | + | ||||
| 208 | + | func (_c *MockFaviconService_EnsureCacheDir_Call) Run(run func()) *MockFaviconService_EnsureCacheDir_Call { | |||
| 209 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 210 | + | run() | |||
| 211 | + | }) | |||
| 212 | + | return _c | |||
| 213 | + | } | |||
| 214 | + | ||||
| 215 | + | func (_c *MockFaviconService_EnsureCacheDir_Call) Return(err error) *MockFaviconService_EnsureCacheDir_Call { | |||
| 216 | + | _c.Call.Return(err) | |||
| 217 | + | return _c | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | func (_c *MockFaviconService_EnsureCacheDir_Call) RunAndReturn(run func() error) *MockFaviconService_EnsureCacheDir_Call { | |||
| 221 | + | _c.Call.Return(run) | |||
| 222 | + | return _c | |||
| 223 | + | } | |||
| 224 | + | ||||
| 225 | + | // EnsureDiskCache provides a mock function for the type MockFaviconService | |||
| 226 | + | func (_mock *MockFaviconService) EnsureDiskCache(ctx context.Context, domain string) { | |||
| 227 | + | _mock.Called(ctx, domain) | |||
| 228 | + | return | |||
| 229 | + | } | |||
| 230 | + | ||||
| 231 | + | // MockFaviconService_EnsureDiskCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureDiskCache' | |||
| 232 | + | type MockFaviconService_EnsureDiskCache_Call struct { | |||
| 233 | + | *mock.Call | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | // EnsureDiskCache is a helper method to define mock.On call | |||
| 237 | + | // - ctx context.Context | |||
| 238 | + | // - domain string | |||
| 239 | + | func (_e *MockFaviconService_Expecter) EnsureDiskCache(ctx any, domain any) *MockFaviconService_EnsureDiskCache_Call { | |||
| 240 | + | return &MockFaviconService_EnsureDiskCache_Call{Call: _e.mock.On("EnsureDiskCache", ctx, domain)} | |||
| 241 | + | } | |||
| 242 | + | ||||
| 243 | + | func (_c *MockFaviconService_EnsureDiskCache_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call { | |||
| 244 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 245 | + | var arg0 context.Context | |||
| 246 | + | if args[0] != nil { | |||
| 247 | + | arg0 = args[0].(context.Context) | |||
| 248 | + | } | |||
| 249 | + | var arg1 string | |||
| 250 | + | if args[1] != nil { | |||
| 251 | + | arg1 = args[1].(string) | |||
| 252 | + | } | |||
| 253 | + | run( | |||
| 254 | + | arg0, | |||
| 255 | + | arg1, | |||
| 256 | + | ) | |||
| 257 | + | }) | |||
| 258 | + | return _c | |||
| 259 | + | } | |||
| 260 | + | ||||
| 261 | + | func (_c *MockFaviconService_EnsureDiskCache_Call) Return() *MockFaviconService_EnsureDiskCache_Call { | |||
| 262 | + | _c.Call.Return() | |||
| 263 | + | return _c | |||
| 264 | + | } | |||
| 265 | + | ||||
| 266 | + | func (_c *MockFaviconService_EnsureDiskCache_Call) RunAndReturn(run func(ctx context.Context, domain string)) *MockFaviconService_EnsureDiskCache_Call { | |||
| 267 | + | _c.Run(run) | |||
| 268 | + | return _c | |||
| 269 | + | } | |||
| 270 | + | ||||
| 271 | + | // EnsureSizedPNG provides a mock function for the type MockFaviconService | |||
| 272 | + | func (_mock *MockFaviconService) EnsureSizedPNG(ctx context.Context, domain string, size int) error { | |||
| 273 | + | ret := _mock.Called(ctx, domain, size) | |||
| 274 | + | ||||
| 275 | + | if len(ret) == 0 { | |||
| 276 | + | panic("no return value specified for EnsureSizedPNG") | |||
| 277 | + | } | |||
| 278 | + | ||||
| 279 | + | var r0 error | |||
| 280 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) error); ok { | |||
| 281 | + | r0 = returnFunc(ctx, domain, size) | |||
| 282 | + | } else { | |||
| 283 | + | r0 = ret.Error(0) | |||
| 284 | + | } | |||
| 285 | + | return r0 | |||
| 286 | + | } | |||
| 287 | + | ||||
| 288 | + | // MockFaviconService_EnsureSizedPNG_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureSizedPNG' | |||
| 289 | + | type MockFaviconService_EnsureSizedPNG_Call struct { | |||
| 290 | + | *mock.Call | |||
| 291 | + | } | |||
| 292 | + | ||||
| 293 | + | // EnsureSizedPNG is a helper method to define mock.On call | |||
| 294 | + | // - ctx context.Context | |||
| 295 | + | // - domain string | |||
| 296 | + | // - size int | |||
| 297 | + | func (_e *MockFaviconService_Expecter) EnsureSizedPNG(ctx any, domain any, size any) *MockFaviconService_EnsureSizedPNG_Call { | |||
| 298 | + | return &MockFaviconService_EnsureSizedPNG_Call{Call: _e.mock.On("EnsureSizedPNG", ctx, domain, size)} | |||
| 299 | + | } | |||
| 300 | + | ||||
| 301 | + | func (_c *MockFaviconService_EnsureSizedPNG_Call) Run(run func(ctx context.Context, domain string, size int)) *MockFaviconService_EnsureSizedPNG_Call { | |||
| 302 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 303 | + | var arg0 context.Context | |||
| 304 | + | if args[0] != nil { | |||
| 305 | + | arg0 = args[0].(context.Context) | |||
| 306 | + | } | |||
| 307 | + | var arg1 string | |||
| 308 | + | if args[1] != nil { | |||
| 309 | + | arg1 = args[1].(string) | |||
| 310 | + | } | |||
| 311 | + | var arg2 int | |||
| 312 | + | if args[2] != nil { | |||
| 313 | + | arg2 = args[2].(int) | |||
| 314 | + | } | |||
| 315 | + | run( | |||
| 316 | + | arg0, | |||
| 317 | + | arg1, | |||
| 318 | + | arg2, | |||
| 319 | + | ) | |||
| 320 | + | }) | |||
| 321 | + | return _c | |||
| 322 | + | } | |||
| 323 | + | ||||
| 324 | + | func (_c *MockFaviconService_EnsureSizedPNG_Call) Return(err error) *MockFaviconService_EnsureSizedPNG_Call { | |||
| 325 | + | _c.Call.Return(err) | |||
| 326 | + | return _c | |||
| 327 | + | } | |||
| 328 | + | ||||
| 329 | + | func (_c *MockFaviconService_EnsureSizedPNG_Call) RunAndReturn(run func(ctx context.Context, domain string, size int) error) *MockFaviconService_EnsureSizedPNG_Call { | |||
| 330 | + | _c.Call.Return(run) | |||
| 331 | + | return _c | |||
| 332 | + | } | |||
| 333 | + | ||||
| 334 | + | // Get provides a mock function for the type MockFaviconService | |||
| 335 | + | func (_mock *MockFaviconService) Get(ctx context.Context, domain string) ([]byte, error) { | |||
| 336 | + | ret := _mock.Called(ctx, domain) | |||
| 337 | + | ||||
| 338 | + | if len(ret) == 0 { | |||
| 339 | + | panic("no return value specified for Get") | |||
| 340 | + | } | |||
| 341 | + | ||||
| 342 | + | var r0 []byte | |||
| 343 | + | var r1 error | |||
| 344 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { | |||
| 345 | + | return returnFunc(ctx, domain) | |||
| 346 | + | } | |||
| 347 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok { | |||
| 348 | + | r0 = returnFunc(ctx, domain) | |||
| 349 | + | } else { | |||
| 350 | + | if ret.Get(0) != nil { | |||
| 351 | + | r0 = ret.Get(0).([]byte) | |||
| 352 | + | } | |||
| 353 | + | } | |||
| 354 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 355 | + | r1 = returnFunc(ctx, domain) | |||
| 356 | + | } else { | |||
| 357 | + | r1 = ret.Error(1) | |||
| 358 | + | } | |||
| 359 | + | return r0, r1 | |||
| 360 | + | } | |||
| 361 | + | ||||
| 362 | + | // MockFaviconService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' | |||
| 363 | + | type MockFaviconService_Get_Call struct { | |||
| 364 | + | *mock.Call | |||
| 365 | + | } | |||
| 366 | + | ||||
| 367 | + | // Get is a helper method to define mock.On call | |||
| 368 | + | // - ctx context.Context | |||
| 369 | + | // - domain string | |||
| 370 | + | func (_e *MockFaviconService_Expecter) Get(ctx any, domain any) *MockFaviconService_Get_Call { | |||
| 371 | + | return &MockFaviconService_Get_Call{Call: _e.mock.On("Get", ctx, domain)} | |||
| 372 | + | } | |||
| 373 | + | ||||
| 374 | + | func (_c *MockFaviconService_Get_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_Get_Call { | |||
| 375 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 376 | + | var arg0 context.Context | |||
| 377 | + | if args[0] != nil { | |||
| 378 | + | arg0 = args[0].(context.Context) | |||
| 379 | + | } | |||
| 380 | + | var arg1 string | |||
| 381 | + | if args[1] != nil { | |||
| 382 | + | arg1 = args[1].(string) | |||
| 383 | + | } | |||
| 384 | + | run( | |||
| 385 | + | arg0, | |||
| 386 | + | arg1, | |||
| 387 | + | ) | |||
| 388 | + | }) | |||
| 389 | + | return _c | |||
| 390 | + | } | |||
| 391 | + | ||||
| 392 | + | func (_c *MockFaviconService_Get_Call) Return(bytes []byte, err error) *MockFaviconService_Get_Call { | |||
| 393 | + | _c.Call.Return(bytes, err) | |||
| 394 | + | return _c | |||
| 395 | + | } | |||
| 396 | + | ||||
| 397 | + | func (_c *MockFaviconService_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, error)) *MockFaviconService_Get_Call { | |||
| 398 | + | _c.Call.Return(run) | |||
| 399 | + | return _c | |||
| 400 | + | } | |||
| 401 | + | ||||
| 402 | + | // GetCached provides a mock function for the type MockFaviconService | |||
| 403 | + | func (_mock *MockFaviconService) GetCached(ctx context.Context, domain string) ([]byte, bool) { | |||
| 404 | + | ret := _mock.Called(ctx, domain) | |||
| 405 | + | ||||
| 406 | + | if len(ret) == 0 { | |||
| 407 | + | panic("no return value specified for GetCached") | |||
| 408 | + | } | |||
| 409 | + | ||||
| 410 | + | var r0 []byte | |||
| 411 | + | var r1 bool | |||
| 412 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, bool)); ok { | |||
| 413 | + | return returnFunc(ctx, domain) | |||
| 414 | + | } | |||
| 415 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok { | |||
| 416 | + | r0 = returnFunc(ctx, domain) | |||
| 417 | + | } else { | |||
| 418 | + | if ret.Get(0) != nil { | |||
| 419 | + | r0 = ret.Get(0).([]byte) | |||
| 420 | + | } | |||
| 421 | + | } | |||
| 422 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok { | |||
| 423 | + | r1 = returnFunc(ctx, domain) | |||
| 424 | + | } else { | |||
| 425 | + | r1 = ret.Get(1).(bool) | |||
| 426 | + | } | |||
| 427 | + | return r0, r1 | |||
| 428 | + | } | |||
| 429 | + | ||||
| 430 | + | // MockFaviconService_GetCached_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCached' | |||
| 431 | + | type MockFaviconService_GetCached_Call struct { | |||
| 432 | + | *mock.Call | |||
| 433 | + | } | |||
| 434 | + | ||||
| 435 | + | // GetCached is a helper method to define mock.On call | |||
| 436 | + | // - ctx context.Context | |||
| 437 | + | // - domain string | |||
| 438 | + | func (_e *MockFaviconService_Expecter) GetCached(ctx any, domain any) *MockFaviconService_GetCached_Call { | |||
| 439 | + | return &MockFaviconService_GetCached_Call{Call: _e.mock.On("GetCached", ctx, domain)} | |||
| 440 | + | } | |||
| 441 | + | ||||
| 442 | + | func (_c *MockFaviconService_GetCached_Call) Run(run func(ctx context.Context, domain string)) *MockFaviconService_GetCached_Call { | |||
| 443 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 444 | + | var arg0 context.Context | |||
| 445 | + | if args[0] != nil { | |||
| 446 | + | arg0 = args[0].(context.Context) | |||
| 447 | + | } | |||
| 448 | + | var arg1 string | |||
| 449 | + | if args[1] != nil { | |||
| 450 | + | arg1 = args[1].(string) | |||
| 451 | + | } | |||
| 452 | + | run( | |||
| 453 | + | arg0, | |||
| 454 | + | arg1, | |||
| 455 | + | ) | |||
| 456 | + | }) | |||
| 457 | + | return _c | |||
| 458 | + | } | |||
| 459 | + | ||||
| 460 | + | func (_c *MockFaviconService_GetCached_Call) Return(bytes []byte, b bool) *MockFaviconService_GetCached_Call { | |||
| 461 | + | _c.Call.Return(bytes, b) | |||
| 462 | + | return _c | |||
| 463 | + | } | |||
| 464 | + | ||||
| 465 | + | func (_c *MockFaviconService_GetCached_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]byte, bool)) *MockFaviconService_GetCached_Call { | |||
| 466 | + | _c.Call.Return(run) | |||
| 467 | + | return _c | |||
| 468 | + | } | |||
| 469 | + | ||||
| 470 | + | // HasPNGOnDisk provides a mock function for the type MockFaviconService | |||
| 471 | + | func (_mock *MockFaviconService) HasPNGOnDisk(domain string) bool { | |||
| 472 | + | ret := _mock.Called(domain) | |||
| 473 | + | ||||
| 474 | + | if len(ret) == 0 { | |||
| 475 | + | panic("no return value specified for HasPNGOnDisk") | |||
| 476 | + | } | |||
| 477 | + | ||||
| 478 | + | var r0 bool | |||
| 479 | + | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |||
| 480 | + | r0 = returnFunc(domain) | |||
| 481 | + | } else { | |||
| 482 | + | r0 = ret.Get(0).(bool) | |||
| 483 | + | } | |||
| 484 | + | return r0 | |||
| 485 | + | } | |||
| 486 | + | ||||
| 487 | + | // MockFaviconService_HasPNGOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGOnDisk' | |||
| 488 | + | type MockFaviconService_HasPNGOnDisk_Call struct { | |||
| 489 | + | *mock.Call | |||
| 490 | + | } | |||
| 491 | + | ||||
| 492 | + | // HasPNGOnDisk is a helper method to define mock.On call | |||
| 493 | + | // - domain string | |||
| 494 | + | func (_e *MockFaviconService_Expecter) HasPNGOnDisk(domain any) *MockFaviconService_HasPNGOnDisk_Call { | |||
| 495 | + | return &MockFaviconService_HasPNGOnDisk_Call{Call: _e.mock.On("HasPNGOnDisk", domain)} | |||
| 496 | + | } | |||
| 497 | + | ||||
| 498 | + | func (_c *MockFaviconService_HasPNGOnDisk_Call) Run(run func(domain string)) *MockFaviconService_HasPNGOnDisk_Call { | |||
| 499 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 500 | + | var arg0 string | |||
| 501 | + | if args[0] != nil { | |||
| 502 | + | arg0 = args[0].(string) | |||
| 503 | + | } | |||
| 504 | + | run( | |||
| 505 | + | arg0, | |||
| 506 | + | ) | |||
| 507 | + | }) | |||
| 508 | + | return _c | |||
| 509 | + | } | |||
| 510 | + | ||||
| 511 | + | func (_c *MockFaviconService_HasPNGOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGOnDisk_Call { | |||
| 512 | + | _c.Call.Return(b) | |||
| 513 | + | return _c | |||
| 514 | + | } | |||
| 515 | + | ||||
| 516 | + | func (_c *MockFaviconService_HasPNGOnDisk_Call) RunAndReturn(run func(domain string) bool) *MockFaviconService_HasPNGOnDisk_Call { | |||
| 517 | + | _c.Call.Return(run) | |||
| 518 | + | return _c | |||
| 519 | + | } | |||
| 520 | + | ||||
| 521 | + | // HasPNGSizedOnDisk provides a mock function for the type MockFaviconService | |||
| 522 | + | func (_mock *MockFaviconService) HasPNGSizedOnDisk(domain string, size int) bool { | |||
| 523 | + | ret := _mock.Called(domain, size) | |||
| 524 | + | ||||
| 525 | + | if len(ret) == 0 { | |||
| 526 | + | panic("no return value specified for HasPNGSizedOnDisk") | |||
| 527 | + | } | |||
| 528 | + | ||||
| 529 | + | var r0 bool | |||
| 530 | + | if returnFunc, ok := ret.Get(0).(func(string, int) bool); ok { | |||
| 531 | + | r0 = returnFunc(domain, size) | |||
| 532 | + | } else { | |||
| 533 | + | r0 = ret.Get(0).(bool) | |||
| 534 | + | } | |||
| 535 | + | return r0 | |||
| 536 | + | } | |||
| 537 | + | ||||
| 538 | + | // MockFaviconService_HasPNGSizedOnDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPNGSizedOnDisk' | |||
| 539 | + | type MockFaviconService_HasPNGSizedOnDisk_Call struct { | |||
| 540 | + | *mock.Call | |||
| 541 | + | } | |||
| 542 | + | ||||
| 543 | + | // HasPNGSizedOnDisk is a helper method to define mock.On call | |||
| 544 | + | // - domain string | |||
| 545 | + | // - size int | |||
| 546 | + | func (_e *MockFaviconService_Expecter) HasPNGSizedOnDisk(domain any, size any) *MockFaviconService_HasPNGSizedOnDisk_Call { | |||
| 547 | + | return &MockFaviconService_HasPNGSizedOnDisk_Call{Call: _e.mock.On("HasPNGSizedOnDisk", domain, size)} | |||
| 548 | + | } | |||
| 549 | + | ||||
| 550 | + | func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Run(run func(domain string, size int)) *MockFaviconService_HasPNGSizedOnDisk_Call { | |||
| 551 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 552 | + | var arg0 string | |||
| 553 | + | if args[0] != nil { | |||
| 554 | + | arg0 = args[0].(string) | |||
| 555 | + | } | |||
| 556 | + | var arg1 int | |||
| 557 | + | if args[1] != nil { | |||
| 558 | + | arg1 = args[1].(int) | |||
| 559 | + | } | |||
| 560 | + | run( | |||
| 561 | + | arg0, | |||
| 562 | + | arg1, | |||
| 563 | + | ) | |||
| 564 | + | }) | |||
| 565 | + | return _c | |||
| 566 | + | } | |||
| 567 | + | ||||
| 568 | + | func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) Return(b bool) *MockFaviconService_HasPNGSizedOnDisk_Call { | |||
| 569 | + | _c.Call.Return(b) | |||
| 570 | + | return _c | |||
| 571 | + | } | |||
| 572 | + | ||||
| 573 | + | func (_c *MockFaviconService_HasPNGSizedOnDisk_Call) RunAndReturn(run func(domain string, size int) bool) *MockFaviconService_HasPNGSizedOnDisk_Call { | |||
| 574 | + | _c.Call.Return(run) | |||
| 575 | + | return _c | |||
| 576 | + | } | |||
A internal/application/port/mocks/filesystem.go +293 -0
| @@ -0,0 +1,293 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | mock "github.com/stretchr/testify/mock" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // NewMockFileSystem creates a new instance of MockFileSystem. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 14 | + | // The first argument is typically a *testing.T value. | |||
| 15 | + | func NewMockFileSystem(t interface { | |||
| 16 | + | mock.TestingT | |||
| 17 | + | Cleanup(func()) | |||
| 18 | + | }) *MockFileSystem { | |||
| 19 | + | mock := &MockFileSystem{} | |||
| 20 | + | mock.Mock.Test(t) | |||
| 21 | + | ||||
| 22 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 23 | + | ||||
| 24 | + | return mock | |||
| 25 | + | } | |||
| 26 | + | ||||
| 27 | + | // MockFileSystem is an autogenerated mock type for the FileSystem type | |||
| 28 | + | type MockFileSystem struct { | |||
| 29 | + | mock.Mock | |||
| 30 | + | } | |||
| 31 | + | ||||
| 32 | + | type MockFileSystem_Expecter struct { | |||
| 33 | + | mock *mock.Mock | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | func (_m *MockFileSystem) EXPECT() *MockFileSystem_Expecter { | |||
| 37 | + | return &MockFileSystem_Expecter{mock: &_m.Mock} | |||
| 38 | + | } | |||
| 39 | + | ||||
| 40 | + | // Exists provides a mock function for the type MockFileSystem | |||
| 41 | + | func (_mock *MockFileSystem) Exists(ctx context.Context, path string) (bool, error) { | |||
| 42 | + | ret := _mock.Called(ctx, path) | |||
| 43 | + | ||||
| 44 | + | if len(ret) == 0 { | |||
| 45 | + | panic("no return value specified for Exists") | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | var r0 bool | |||
| 49 | + | var r1 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { | |||
| 51 | + | return returnFunc(ctx, path) | |||
| 52 | + | } | |||
| 53 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { | |||
| 54 | + | r0 = returnFunc(ctx, path) | |||
| 55 | + | } else { | |||
| 56 | + | r0 = ret.Get(0).(bool) | |||
| 57 | + | } | |||
| 58 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 59 | + | r1 = returnFunc(ctx, path) | |||
| 60 | + | } else { | |||
| 61 | + | r1 = ret.Error(1) | |||
| 62 | + | } | |||
| 63 | + | return r0, r1 | |||
| 64 | + | } | |||
| 65 | + | ||||
| 66 | + | // MockFileSystem_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' | |||
| 67 | + | type MockFileSystem_Exists_Call struct { | |||
| 68 | + | *mock.Call | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | // Exists is a helper method to define mock.On call | |||
| 72 | + | // - ctx context.Context | |||
| 73 | + | // - path string | |||
| 74 | + | func (_e *MockFileSystem_Expecter) Exists(ctx any, path any) *MockFileSystem_Exists_Call { | |||
| 75 | + | return &MockFileSystem_Exists_Call{Call: _e.mock.On("Exists", ctx, path)} | |||
| 76 | + | } | |||
| 77 | + | ||||
| 78 | + | func (_c *MockFileSystem_Exists_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_Exists_Call { | |||
| 79 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 80 | + | var arg0 context.Context | |||
| 81 | + | if args[0] != nil { | |||
| 82 | + | arg0 = args[0].(context.Context) | |||
| 83 | + | } | |||
| 84 | + | var arg1 string | |||
| 85 | + | if args[1] != nil { | |||
| 86 | + | arg1 = args[1].(string) | |||
| 87 | + | } | |||
| 88 | + | run( | |||
| 89 | + | arg0, | |||
| 90 | + | arg1, | |||
| 91 | + | ) | |||
| 92 | + | }) | |||
| 93 | + | return _c | |||
| 94 | + | } | |||
| 95 | + | ||||
| 96 | + | func (_c *MockFileSystem_Exists_Call) Return(b bool, err error) *MockFileSystem_Exists_Call { | |||
| 97 | + | _c.Call.Return(b, err) | |||
| 98 | + | return _c | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | func (_c *MockFileSystem_Exists_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_Exists_Call { | |||
| 102 | + | _c.Call.Return(run) | |||
| 103 | + | return _c | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | // GetSize provides a mock function for the type MockFileSystem | |||
| 107 | + | func (_mock *MockFileSystem) GetSize(ctx context.Context, path string) (int64, error) { | |||
| 108 | + | ret := _mock.Called(ctx, path) | |||
| 109 | + | ||||
| 110 | + | if len(ret) == 0 { | |||
| 111 | + | panic("no return value specified for GetSize") | |||
| 112 | + | } | |||
| 113 | + | ||||
| 114 | + | var r0 int64 | |||
| 115 | + | var r1 error | |||
| 116 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok { | |||
| 117 | + | return returnFunc(ctx, path) | |||
| 118 | + | } | |||
| 119 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) int64); ok { | |||
| 120 | + | r0 = returnFunc(ctx, path) | |||
| 121 | + | } else { | |||
| 122 | + | r0 = ret.Get(0).(int64) | |||
| 123 | + | } | |||
| 124 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 125 | + | r1 = returnFunc(ctx, path) | |||
| 126 | + | } else { | |||
| 127 | + | r1 = ret.Error(1) | |||
| 128 | + | } | |||
| 129 | + | return r0, r1 | |||
| 130 | + | } | |||
| 131 | + | ||||
| 132 | + | // MockFileSystem_GetSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSize' | |||
| 133 | + | type MockFileSystem_GetSize_Call struct { | |||
| 134 | + | *mock.Call | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | // GetSize is a helper method to define mock.On call | |||
| 138 | + | // - ctx context.Context | |||
| 139 | + | // - path string | |||
| 140 | + | func (_e *MockFileSystem_Expecter) GetSize(ctx any, path any) *MockFileSystem_GetSize_Call { | |||
| 141 | + | return &MockFileSystem_GetSize_Call{Call: _e.mock.On("GetSize", ctx, path)} | |||
| 142 | + | } | |||
| 143 | + | ||||
| 144 | + | func (_c *MockFileSystem_GetSize_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_GetSize_Call { | |||
| 145 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 146 | + | var arg0 context.Context | |||
| 147 | + | if args[0] != nil { | |||
| 148 | + | arg0 = args[0].(context.Context) | |||
| 149 | + | } | |||
| 150 | + | var arg1 string | |||
| 151 | + | if args[1] != nil { | |||
| 152 | + | arg1 = args[1].(string) | |||
| 153 | + | } | |||
| 154 | + | run( | |||
| 155 | + | arg0, | |||
| 156 | + | arg1, | |||
| 157 | + | ) | |||
| 158 | + | }) | |||
| 159 | + | return _c | |||
| 160 | + | } | |||
| 161 | + | ||||
| 162 | + | func (_c *MockFileSystem_GetSize_Call) Return(n int64, err error) *MockFileSystem_GetSize_Call { | |||
| 163 | + | _c.Call.Return(n, err) | |||
| 164 | + | return _c | |||
| 165 | + | } | |||
| 166 | + | ||||
| 167 | + | func (_c *MockFileSystem_GetSize_Call) RunAndReturn(run func(ctx context.Context, path string) (int64, error)) *MockFileSystem_GetSize_Call { | |||
| 168 | + | _c.Call.Return(run) | |||
| 169 | + | return _c | |||
| 170 | + | } | |||
| 171 | + | ||||
| 172 | + | // IsDirectory provides a mock function for the type MockFileSystem | |||
| 173 | + | func (_mock *MockFileSystem) IsDirectory(ctx context.Context, path string) (bool, error) { | |||
| 174 | + | ret := _mock.Called(ctx, path) | |||
| 175 | + | ||||
| 176 | + | if len(ret) == 0 { | |||
| 177 | + | panic("no return value specified for IsDirectory") | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | var r0 bool | |||
| 181 | + | var r1 error | |||
| 182 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { | |||
| 183 | + | return returnFunc(ctx, path) | |||
| 184 | + | } | |||
| 185 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { | |||
| 186 | + | r0 = returnFunc(ctx, path) | |||
| 187 | + | } else { | |||
| 188 | + | r0 = ret.Get(0).(bool) | |||
| 189 | + | } | |||
| 190 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 191 | + | r1 = returnFunc(ctx, path) | |||
| 192 | + | } else { | |||
| 193 | + | r1 = ret.Error(1) | |||
| 194 | + | } | |||
| 195 | + | return r0, r1 | |||
| 196 | + | } | |||
| 197 | + | ||||
| 198 | + | // MockFileSystem_IsDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDirectory' | |||
| 199 | + | type MockFileSystem_IsDirectory_Call struct { | |||
| 200 | + | *mock.Call | |||
| 201 | + | } | |||
| 202 | + | ||||
| 203 | + | // IsDirectory is a helper method to define mock.On call | |||
| 204 | + | // - ctx context.Context | |||
| 205 | + | // - path string | |||
| 206 | + | func (_e *MockFileSystem_Expecter) IsDirectory(ctx any, path any) *MockFileSystem_IsDirectory_Call { | |||
| 207 | + | return &MockFileSystem_IsDirectory_Call{Call: _e.mock.On("IsDirectory", ctx, path)} | |||
| 208 | + | } | |||
| 209 | + | ||||
| 210 | + | func (_c *MockFileSystem_IsDirectory_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_IsDirectory_Call { | |||
| 211 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 212 | + | var arg0 context.Context | |||
| 213 | + | if args[0] != nil { | |||
| 214 | + | arg0 = args[0].(context.Context) | |||
| 215 | + | } | |||
| 216 | + | var arg1 string | |||
| 217 | + | if args[1] != nil { | |||
| 218 | + | arg1 = args[1].(string) | |||
| 219 | + | } | |||
| 220 | + | run( | |||
| 221 | + | arg0, | |||
| 222 | + | arg1, | |||
| 223 | + | ) | |||
| 224 | + | }) | |||
| 225 | + | return _c | |||
| 226 | + | } | |||
| 227 | + | ||||
| 228 | + | func (_c *MockFileSystem_IsDirectory_Call) Return(b bool, err error) *MockFileSystem_IsDirectory_Call { | |||
| 229 | + | _c.Call.Return(b, err) | |||
| 230 | + | return _c | |||
| 231 | + | } | |||
| 232 | + | ||||
| 233 | + | func (_c *MockFileSystem_IsDirectory_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_IsDirectory_Call { | |||
| 234 | + | _c.Call.Return(run) | |||
| 235 | + | return _c | |||
| 236 | + | } | |||
| 237 | + | ||||
| 238 | + | // RemoveAll provides a mock function for the type MockFileSystem | |||
| 239 | + | func (_mock *MockFileSystem) RemoveAll(ctx context.Context, path string) error { | |||
| 240 | + | ret := _mock.Called(ctx, path) | |||
| 241 | + | ||||
| 242 | + | if len(ret) == 0 { | |||
| 243 | + | panic("no return value specified for RemoveAll") | |||
| 244 | + | } | |||
| 245 | + | ||||
| 246 | + | var r0 error | |||
| 247 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 248 | + | r0 = returnFunc(ctx, path) | |||
| 249 | + | } else { | |||
| 250 | + | r0 = ret.Error(0) | |||
| 251 | + | } | |||
| 252 | + | return r0 | |||
| 253 | + | } | |||
| 254 | + | ||||
| 255 | + | // MockFileSystem_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll' | |||
| 256 | + | type MockFileSystem_RemoveAll_Call struct { | |||
| 257 | + | *mock.Call | |||
| 258 | + | } | |||
| 259 | + | ||||
| 260 | + | // RemoveAll is a helper method to define mock.On call | |||
| 261 | + | // - ctx context.Context | |||
| 262 | + | // - path string | |||
| 263 | + | func (_e *MockFileSystem_Expecter) RemoveAll(ctx any, path any) *MockFileSystem_RemoveAll_Call { | |||
| 264 | + | return &MockFileSystem_RemoveAll_Call{Call: _e.mock.On("RemoveAll", ctx, path)} | |||
| 265 | + | } | |||
| 266 | + | ||||
| 267 | + | func (_c *MockFileSystem_RemoveAll_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_RemoveAll_Call { | |||
| 268 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 269 | + | var arg0 context.Context | |||
| 270 | + | if args[0] != nil { | |||
| 271 | + | arg0 = args[0].(context.Context) | |||
| 272 | + | } | |||
| 273 | + | var arg1 string | |||
| 274 | + | if args[1] != nil { | |||
| 275 | + | arg1 = args[1].(string) | |||
| 276 | + | } | |||
| 277 | + | run( | |||
| 278 | + | arg0, | |||
| 279 | + | arg1, | |||
| 280 | + | ) | |||
| 281 | + | }) | |||
| 282 | + | return _c | |||
| 283 | + | } | |||
| 284 | + | ||||
| 285 | + | func (_c *MockFileSystem_RemoveAll_Call) Return(err error) *MockFileSystem_RemoveAll_Call { | |||
| 286 | + | _c.Call.Return(err) | |||
| 287 | + | return _c | |||
| 288 | + | } | |||
| 289 | + | ||||
| 290 | + | func (_c *MockFileSystem_RemoveAll_Call) RunAndReturn(run func(ctx context.Context, path string) error) *MockFileSystem_RemoveAll_Call { | |||
| 291 | + | _c.Call.Return(run) | |||
| 292 | + | return _c | |||
| 293 | + | } | |||
A internal/application/port/mocks/filter_manager.go +119 -0
| @@ -0,0 +1,119 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockFilterManager creates a new instance of MockFilterManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockFilterManager(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockFilterManager { | |||
| 20 | + | mock := &MockFilterManager{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockFilterManager is an autogenerated mock type for the FilterManager type | |||
| 29 | + | type MockFilterManager struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockFilterManager_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockFilterManager) EXPECT() *MockFilterManager_Expecter { | |||
| 38 | + | return &MockFilterManager_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // LoadAsync provides a mock function for the type MockFilterManager | |||
| 42 | + | func (_mock *MockFilterManager) LoadAsync(ctx context.Context) { | |||
| 43 | + | _mock.Called(ctx) | |||
| 44 | + | return | |||
| 45 | + | } | |||
| 46 | + | ||||
| 47 | + | // MockFilterManager_LoadAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadAsync' | |||
| 48 | + | type MockFilterManager_LoadAsync_Call struct { | |||
| 49 | + | *mock.Call | |||
| 50 | + | } | |||
| 51 | + | ||||
| 52 | + | // LoadAsync is a helper method to define mock.On call | |||
| 53 | + | // - ctx context.Context | |||
| 54 | + | func (_e *MockFilterManager_Expecter) LoadAsync(ctx any) *MockFilterManager_LoadAsync_Call { | |||
| 55 | + | return &MockFilterManager_LoadAsync_Call{Call: _e.mock.On("LoadAsync", ctx)} | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | func (_c *MockFilterManager_LoadAsync_Call) Run(run func(ctx context.Context)) *MockFilterManager_LoadAsync_Call { | |||
| 59 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 60 | + | var arg0 context.Context | |||
| 61 | + | if args[0] != nil { | |||
| 62 | + | arg0 = args[0].(context.Context) | |||
| 63 | + | } | |||
| 64 | + | run( | |||
| 65 | + | arg0, | |||
| 66 | + | ) | |||
| 67 | + | }) | |||
| 68 | + | return _c | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockFilterManager_LoadAsync_Call) Return() *MockFilterManager_LoadAsync_Call { | |||
| 72 | + | _c.Call.Return() | |||
| 73 | + | return _c | |||
| 74 | + | } | |||
| 75 | + | ||||
| 76 | + | func (_c *MockFilterManager_LoadAsync_Call) RunAndReturn(run func(ctx context.Context)) *MockFilterManager_LoadAsync_Call { | |||
| 77 | + | _c.Run(run) | |||
| 78 | + | return _c | |||
| 79 | + | } | |||
| 80 | + | ||||
| 81 | + | // SetStatusCallback provides a mock function for the type MockFilterManager | |||
| 82 | + | func (_mock *MockFilterManager) SetStatusCallback(fn func(port.FilterStatus)) { | |||
| 83 | + | _mock.Called(fn) | |||
| 84 | + | return | |||
| 85 | + | } | |||
| 86 | + | ||||
| 87 | + | // MockFilterManager_SetStatusCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStatusCallback' | |||
| 88 | + | type MockFilterManager_SetStatusCallback_Call struct { | |||
| 89 | + | *mock.Call | |||
| 90 | + | } | |||
| 91 | + | ||||
| 92 | + | // SetStatusCallback is a helper method to define mock.On call | |||
| 93 | + | // - fn func(port.FilterStatus) | |||
| 94 | + | func (_e *MockFilterManager_Expecter) SetStatusCallback(fn any) *MockFilterManager_SetStatusCallback_Call { | |||
| 95 | + | return &MockFilterManager_SetStatusCallback_Call{Call: _e.mock.On("SetStatusCallback", fn)} | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | func (_c *MockFilterManager_SetStatusCallback_Call) Run(run func(fn func(port.FilterStatus))) *MockFilterManager_SetStatusCallback_Call { | |||
| 99 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 100 | + | var arg0 func(port.FilterStatus) | |||
| 101 | + | if args[0] != nil { | |||
| 102 | + | arg0 = args[0].(func(port.FilterStatus)) | |||
| 103 | + | } | |||
| 104 | + | run( | |||
| 105 | + | arg0, | |||
| 106 | + | ) | |||
| 107 | + | }) | |||
| 108 | + | return _c | |||
| 109 | + | } | |||
| 110 | + | ||||
| 111 | + | func (_c *MockFilterManager_SetStatusCallback_Call) Return() *MockFilterManager_SetStatusCallback_Call { | |||
| 112 | + | _c.Call.Return() | |||
| 113 | + | return _c | |||
| 114 | + | } | |||
| 115 | + | ||||
| 116 | + | func (_c *MockFilterManager_SetStatusCallback_Call) RunAndReturn(run func(fn func(port.FilterStatus))) *MockFilterManager_SetStatusCallback_Call { | |||
| 117 | + | _c.Run(run) | |||
| 118 | + | return _c | |||
| 119 | + | } | |||
A internal/application/port/mocks/font_detector.go +215 -0
| @@ -0,0 +1,215 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockFontDetector creates a new instance of MockFontDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockFontDetector(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockFontDetector { | |||
| 20 | + | mock := &MockFontDetector{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockFontDetector is an autogenerated mock type for the FontDetector type | |||
| 29 | + | type MockFontDetector struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockFontDetector_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockFontDetector) EXPECT() *MockFontDetector_Expecter { | |||
| 38 | + | return &MockFontDetector_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // GetAvailableFonts provides a mock function for the type MockFontDetector | |||
| 42 | + | func (_mock *MockFontDetector) GetAvailableFonts(ctx context.Context) ([]string, error) { | |||
| 43 | + | ret := _mock.Called(ctx) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for GetAvailableFonts") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 []string | |||
| 50 | + | var r1 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { | |||
| 52 | + | return returnFunc(ctx) | |||
| 53 | + | } | |||
| 54 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { | |||
| 55 | + | r0 = returnFunc(ctx) | |||
| 56 | + | } else { | |||
| 57 | + | if ret.Get(0) != nil { | |||
| 58 | + | r0 = ret.Get(0).([]string) | |||
| 59 | + | } | |||
| 60 | + | } | |||
| 61 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 62 | + | r1 = returnFunc(ctx) | |||
| 63 | + | } else { | |||
| 64 | + | r1 = ret.Error(1) | |||
| 65 | + | } | |||
| 66 | + | return r0, r1 | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | // MockFontDetector_GetAvailableFonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAvailableFonts' | |||
| 70 | + | type MockFontDetector_GetAvailableFonts_Call struct { | |||
| 71 | + | *mock.Call | |||
| 72 | + | } | |||
| 73 | + | ||||
| 74 | + | // GetAvailableFonts is a helper method to define mock.On call | |||
| 75 | + | // - ctx context.Context | |||
| 76 | + | func (_e *MockFontDetector_Expecter) GetAvailableFonts(ctx any) *MockFontDetector_GetAvailableFonts_Call { | |||
| 77 | + | return &MockFontDetector_GetAvailableFonts_Call{Call: _e.mock.On("GetAvailableFonts", ctx)} | |||
| 78 | + | } | |||
| 79 | + | ||||
| 80 | + | func (_c *MockFontDetector_GetAvailableFonts_Call) Run(run func(ctx context.Context)) *MockFontDetector_GetAvailableFonts_Call { | |||
| 81 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 82 | + | var arg0 context.Context | |||
| 83 | + | if args[0] != nil { | |||
| 84 | + | arg0 = args[0].(context.Context) | |||
| 85 | + | } | |||
| 86 | + | run( | |||
| 87 | + | arg0, | |||
| 88 | + | ) | |||
| 89 | + | }) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockFontDetector_GetAvailableFonts_Call) Return(strings []string, err error) *MockFontDetector_GetAvailableFonts_Call { | |||
| 94 | + | _c.Call.Return(strings, err) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | func (_c *MockFontDetector_GetAvailableFonts_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockFontDetector_GetAvailableFonts_Call { | |||
| 99 | + | _c.Call.Return(run) | |||
| 100 | + | return _c | |||
| 101 | + | } | |||
| 102 | + | ||||
| 103 | + | // IsAvailable provides a mock function for the type MockFontDetector | |||
| 104 | + | func (_mock *MockFontDetector) IsAvailable(ctx context.Context) bool { | |||
| 105 | + | ret := _mock.Called(ctx) | |||
| 106 | + | ||||
| 107 | + | if len(ret) == 0 { | |||
| 108 | + | panic("no return value specified for IsAvailable") | |||
| 109 | + | } | |||
| 110 | + | ||||
| 111 | + | var r0 bool | |||
| 112 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok { | |||
| 113 | + | r0 = returnFunc(ctx) | |||
| 114 | + | } else { | |||
| 115 | + | r0 = ret.Get(0).(bool) | |||
| 116 | + | } | |||
| 117 | + | return r0 | |||
| 118 | + | } | |||
| 119 | + | ||||
| 120 | + | // MockFontDetector_IsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAvailable' | |||
| 121 | + | type MockFontDetector_IsAvailable_Call struct { | |||
| 122 | + | *mock.Call | |||
| 123 | + | } | |||
| 124 | + | ||||
| 125 | + | // IsAvailable is a helper method to define mock.On call | |||
| 126 | + | // - ctx context.Context | |||
| 127 | + | func (_e *MockFontDetector_Expecter) IsAvailable(ctx any) *MockFontDetector_IsAvailable_Call { | |||
| 128 | + | return &MockFontDetector_IsAvailable_Call{Call: _e.mock.On("IsAvailable", ctx)} | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | func (_c *MockFontDetector_IsAvailable_Call) Run(run func(ctx context.Context)) *MockFontDetector_IsAvailable_Call { | |||
| 132 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 133 | + | var arg0 context.Context | |||
| 134 | + | if args[0] != nil { | |||
| 135 | + | arg0 = args[0].(context.Context) | |||
| 136 | + | } | |||
| 137 | + | run( | |||
| 138 | + | arg0, | |||
| 139 | + | ) | |||
| 140 | + | }) | |||
| 141 | + | return _c | |||
| 142 | + | } | |||
| 143 | + | ||||
| 144 | + | func (_c *MockFontDetector_IsAvailable_Call) Return(b bool) *MockFontDetector_IsAvailable_Call { | |||
| 145 | + | _c.Call.Return(b) | |||
| 146 | + | return _c | |||
| 147 | + | } | |||
| 148 | + | ||||
| 149 | + | func (_c *MockFontDetector_IsAvailable_Call) RunAndReturn(run func(ctx context.Context) bool) *MockFontDetector_IsAvailable_Call { | |||
| 150 | + | _c.Call.Return(run) | |||
| 151 | + | return _c | |||
| 152 | + | } | |||
| 153 | + | ||||
| 154 | + | // SelectBestFont provides a mock function for the type MockFontDetector | |||
| 155 | + | func (_mock *MockFontDetector) SelectBestFont(ctx context.Context, category port.FontCategory, fallbackChain []string) string { | |||
| 156 | + | ret := _mock.Called(ctx, category, fallbackChain) | |||
| 157 | + | ||||
| 158 | + | if len(ret) == 0 { | |||
| 159 | + | panic("no return value specified for SelectBestFont") | |||
| 160 | + | } | |||
| 161 | + | ||||
| 162 | + | var r0 string | |||
| 163 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.FontCategory, []string) string); ok { | |||
| 164 | + | r0 = returnFunc(ctx, category, fallbackChain) | |||
| 165 | + | } else { | |||
| 166 | + | r0 = ret.Get(0).(string) | |||
| 167 | + | } | |||
| 168 | + | return r0 | |||
| 169 | + | } | |||
| 170 | + | ||||
| 171 | + | // MockFontDetector_SelectBestFont_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectBestFont' | |||
| 172 | + | type MockFontDetector_SelectBestFont_Call struct { | |||
| 173 | + | *mock.Call | |||
| 174 | + | } | |||
| 175 | + | ||||
| 176 | + | // SelectBestFont is a helper method to define mock.On call | |||
| 177 | + | // - ctx context.Context | |||
| 178 | + | // - category port.FontCategory | |||
| 179 | + | // - fallbackChain []string | |||
| 180 | + | func (_e *MockFontDetector_Expecter) SelectBestFont(ctx any, category any, fallbackChain any) *MockFontDetector_SelectBestFont_Call { | |||
| 181 | + | return &MockFontDetector_SelectBestFont_Call{Call: _e.mock.On("SelectBestFont", ctx, category, fallbackChain)} | |||
| 182 | + | } | |||
| 183 | + | ||||
| 184 | + | func (_c *MockFontDetector_SelectBestFont_Call) Run(run func(ctx context.Context, category port.FontCategory, fallbackChain []string)) *MockFontDetector_SelectBestFont_Call { | |||
| 185 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 186 | + | var arg0 context.Context | |||
| 187 | + | if args[0] != nil { | |||
| 188 | + | arg0 = args[0].(context.Context) | |||
| 189 | + | } | |||
| 190 | + | var arg1 port.FontCategory | |||
| 191 | + | if args[1] != nil { | |||
| 192 | + | arg1 = args[1].(port.FontCategory) | |||
| 193 | + | } | |||
| 194 | + | var arg2 []string | |||
| 195 | + | if args[2] != nil { | |||
| 196 | + | arg2 = args[2].([]string) | |||
| 197 | + | } | |||
| 198 | + | run( | |||
| 199 | + | arg0, | |||
| 200 | + | arg1, | |||
| 201 | + | arg2, | |||
| 202 | + | ) | |||
| 203 | + | }) | |||
| 204 | + | return _c | |||
| 205 | + | } | |||
| 206 | + | ||||
| 207 | + | func (_c *MockFontDetector_SelectBestFont_Call) Return(s string) *MockFontDetector_SelectBestFont_Call { | |||
| 208 | + | _c.Call.Return(s) | |||
| 209 | + | return _c | |||
| 210 | + | } | |||
| 211 | + | ||||
| 212 | + | func (_c *MockFontDetector_SelectBestFont_Call) RunAndReturn(run func(ctx context.Context, category port.FontCategory, fallbackChain []string) string) *MockFontDetector_SelectBestFont_Call { | |||
| 213 | + | _c.Call.Return(run) | |||
| 214 | + | return _c | |||
| 215 | + | } | |||
A internal/application/port/mocks/handler_deps.go +305 -0
| @@ -0,0 +1,305 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockAccentKeyHandler creates a new instance of MockAccentKeyHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockAccentKeyHandler(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockAccentKeyHandler { | |||
| 20 | + | mock := &MockAccentKeyHandler{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockAccentKeyHandler is an autogenerated mock type for the AccentKeyHandler type | |||
| 29 | + | type MockAccentKeyHandler struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockAccentKeyHandler_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockAccentKeyHandler) EXPECT() *MockAccentKeyHandler_Expecter { | |||
| 38 | + | return &MockAccentKeyHandler_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // OnKeyPressed provides a mock function for the type MockAccentKeyHandler | |||
| 42 | + | func (_mock *MockAccentKeyHandler) OnKeyPressed(ctx context.Context, char rune, shiftHeld bool) bool { | |||
| 43 | + | ret := _mock.Called(ctx, char, shiftHeld) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for OnKeyPressed") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 bool | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, rune, bool) bool); ok { | |||
| 51 | + | r0 = returnFunc(ctx, char, shiftHeld) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Get(0).(bool) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockAccentKeyHandler_OnKeyPressed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnKeyPressed' | |||
| 59 | + | type MockAccentKeyHandler_OnKeyPressed_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // OnKeyPressed is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - char rune | |||
| 66 | + | // - shiftHeld bool | |||
| 67 | + | func (_e *MockAccentKeyHandler_Expecter) OnKeyPressed(ctx any, char any, shiftHeld any) *MockAccentKeyHandler_OnKeyPressed_Call { | |||
| 68 | + | return &MockAccentKeyHandler_OnKeyPressed_Call{Call: _e.mock.On("OnKeyPressed", ctx, char, shiftHeld)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockAccentKeyHandler_OnKeyPressed_Call) Run(run func(ctx context.Context, char rune, shiftHeld bool)) *MockAccentKeyHandler_OnKeyPressed_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | var arg1 rune | |||
| 78 | + | if args[1] != nil { | |||
| 79 | + | arg1 = args[1].(rune) | |||
| 80 | + | } | |||
| 81 | + | var arg2 bool | |||
| 82 | + | if args[2] != nil { | |||
| 83 | + | arg2 = args[2].(bool) | |||
| 84 | + | } | |||
| 85 | + | run( | |||
| 86 | + | arg0, | |||
| 87 | + | arg1, | |||
| 88 | + | arg2, | |||
| 89 | + | ) | |||
| 90 | + | }) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | func (_c *MockAccentKeyHandler_OnKeyPressed_Call) Return(b bool) *MockAccentKeyHandler_OnKeyPressed_Call { | |||
| 95 | + | _c.Call.Return(b) | |||
| 96 | + | return _c | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | func (_c *MockAccentKeyHandler_OnKeyPressed_Call) RunAndReturn(run func(ctx context.Context, char rune, shiftHeld bool) bool) *MockAccentKeyHandler_OnKeyPressed_Call { | |||
| 100 | + | _c.Call.Return(run) | |||
| 101 | + | return _c | |||
| 102 | + | } | |||
| 103 | + | ||||
| 104 | + | // OnKeyReleased provides a mock function for the type MockAccentKeyHandler | |||
| 105 | + | func (_mock *MockAccentKeyHandler) OnKeyReleased(ctx context.Context, char rune) { | |||
| 106 | + | _mock.Called(ctx, char) | |||
| 107 | + | return | |||
| 108 | + | } | |||
| 109 | + | ||||
| 110 | + | // MockAccentKeyHandler_OnKeyReleased_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnKeyReleased' | |||
| 111 | + | type MockAccentKeyHandler_OnKeyReleased_Call struct { | |||
| 112 | + | *mock.Call | |||
| 113 | + | } | |||
| 114 | + | ||||
| 115 | + | // OnKeyReleased is a helper method to define mock.On call | |||
| 116 | + | // - ctx context.Context | |||
| 117 | + | // - char rune | |||
| 118 | + | func (_e *MockAccentKeyHandler_Expecter) OnKeyReleased(ctx any, char any) *MockAccentKeyHandler_OnKeyReleased_Call { | |||
| 119 | + | return &MockAccentKeyHandler_OnKeyReleased_Call{Call: _e.mock.On("OnKeyReleased", ctx, char)} | |||
| 120 | + | } | |||
| 121 | + | ||||
| 122 | + | func (_c *MockAccentKeyHandler_OnKeyReleased_Call) Run(run func(ctx context.Context, char rune)) *MockAccentKeyHandler_OnKeyReleased_Call { | |||
| 123 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 124 | + | var arg0 context.Context | |||
| 125 | + | if args[0] != nil { | |||
| 126 | + | arg0 = args[0].(context.Context) | |||
| 127 | + | } | |||
| 128 | + | var arg1 rune | |||
| 129 | + | if args[1] != nil { | |||
| 130 | + | arg1 = args[1].(rune) | |||
| 131 | + | } | |||
| 132 | + | run( | |||
| 133 | + | arg0, | |||
| 134 | + | arg1, | |||
| 135 | + | ) | |||
| 136 | + | }) | |||
| 137 | + | return _c | |||
| 138 | + | } | |||
| 139 | + | ||||
| 140 | + | func (_c *MockAccentKeyHandler_OnKeyReleased_Call) Return() *MockAccentKeyHandler_OnKeyReleased_Call { | |||
| 141 | + | _c.Call.Return() | |||
| 142 | + | return _c | |||
| 143 | + | } | |||
| 144 | + | ||||
| 145 | + | func (_c *MockAccentKeyHandler_OnKeyReleased_Call) RunAndReturn(run func(ctx context.Context, char rune)) *MockAccentKeyHandler_OnKeyReleased_Call { | |||
| 146 | + | _c.Run(run) | |||
| 147 | + | return _c | |||
| 148 | + | } | |||
| 149 | + | ||||
| 150 | + | // NewMockDownloadPreparer creates a new instance of MockDownloadPreparer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 151 | + | // The first argument is typically a *testing.T value. | |||
| 152 | + | func NewMockDownloadPreparer(t interface { | |||
| 153 | + | mock.TestingT | |||
| 154 | + | Cleanup(func()) | |||
| 155 | + | }) *MockDownloadPreparer { | |||
| 156 | + | mock := &MockDownloadPreparer{} | |||
| 157 | + | mock.Mock.Test(t) | |||
| 158 | + | ||||
| 159 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 160 | + | ||||
| 161 | + | return mock | |||
| 162 | + | } | |||
| 163 | + | ||||
| 164 | + | // MockDownloadPreparer is an autogenerated mock type for the DownloadPreparer type | |||
| 165 | + | type MockDownloadPreparer struct { | |||
| 166 | + | mock.Mock | |||
| 167 | + | } | |||
| 168 | + | ||||
| 169 | + | type MockDownloadPreparer_Expecter struct { | |||
| 170 | + | mock *mock.Mock | |||
| 171 | + | } | |||
| 172 | + | ||||
| 173 | + | func (_m *MockDownloadPreparer) EXPECT() *MockDownloadPreparer_Expecter { | |||
| 174 | + | return &MockDownloadPreparer_Expecter{mock: &_m.Mock} | |||
| 175 | + | } | |||
| 176 | + | ||||
| 177 | + | // Execute provides a mock function for the type MockDownloadPreparer | |||
| 178 | + | func (_mock *MockDownloadPreparer) Execute(ctx context.Context, input port.DownloadPrepareInput) *port.DownloadPrepareOutput { | |||
| 179 | + | ret := _mock.Called(ctx, input) | |||
| 180 | + | ||||
| 181 | + | if len(ret) == 0 { | |||
| 182 | + | panic("no return value specified for Execute") | |||
| 183 | + | } | |||
| 184 | + | ||||
| 185 | + | var r0 *port.DownloadPrepareOutput | |||
| 186 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.DownloadPrepareInput) *port.DownloadPrepareOutput); ok { | |||
| 187 | + | r0 = returnFunc(ctx, input) | |||
| 188 | + | } else { | |||
| 189 | + | if ret.Get(0) != nil { | |||
| 190 | + | r0 = ret.Get(0).(*port.DownloadPrepareOutput) | |||
| 191 | + | } | |||
| 192 | + | } | |||
| 193 | + | return r0 | |||
| 194 | + | } | |||
| 195 | + | ||||
| 196 | + | // MockDownloadPreparer_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' | |||
| 197 | + | type MockDownloadPreparer_Execute_Call struct { | |||
| 198 | + | *mock.Call | |||
| 199 | + | } | |||
| 200 | + | ||||
| 201 | + | // Execute is a helper method to define mock.On call | |||
| 202 | + | // - ctx context.Context | |||
| 203 | + | // - input port.DownloadPrepareInput | |||
| 204 | + | func (_e *MockDownloadPreparer_Expecter) Execute(ctx any, input any) *MockDownloadPreparer_Execute_Call { | |||
| 205 | + | return &MockDownloadPreparer_Execute_Call{Call: _e.mock.On("Execute", ctx, input)} | |||
| 206 | + | } | |||
| 207 | + | ||||
| 208 | + | func (_c *MockDownloadPreparer_Execute_Call) Run(run func(ctx context.Context, input port.DownloadPrepareInput)) *MockDownloadPreparer_Execute_Call { | |||
| 209 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 210 | + | var arg0 context.Context | |||
| 211 | + | if args[0] != nil { | |||
| 212 | + | arg0 = args[0].(context.Context) | |||
| 213 | + | } | |||
| 214 | + | var arg1 port.DownloadPrepareInput | |||
| 215 | + | if args[1] != nil { | |||
| 216 | + | arg1 = args[1].(port.DownloadPrepareInput) | |||
| 217 | + | } | |||
| 218 | + | run( | |||
| 219 | + | arg0, | |||
| 220 | + | arg1, | |||
| 221 | + | ) | |||
| 222 | + | }) | |||
| 223 | + | return _c | |||
| 224 | + | } | |||
| 225 | + | ||||
| 226 | + | func (_c *MockDownloadPreparer_Execute_Call) Return(downloadPrepareOutput *port.DownloadPrepareOutput) *MockDownloadPreparer_Execute_Call { | |||
| 227 | + | _c.Call.Return(downloadPrepareOutput) | |||
| 228 | + | return _c | |||
| 229 | + | } | |||
| 230 | + | ||||
| 231 | + | func (_c *MockDownloadPreparer_Execute_Call) RunAndReturn(run func(ctx context.Context, input port.DownloadPrepareInput) *port.DownloadPrepareOutput) *MockDownloadPreparer_Execute_Call { | |||
| 232 | + | _c.Call.Return(run) | |||
| 233 | + | return _c | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | // NewMockAutoCopyConfig creates a new instance of MockAutoCopyConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 237 | + | // The first argument is typically a *testing.T value. | |||
| 238 | + | func NewMockAutoCopyConfig(t interface { | |||
| 239 | + | mock.TestingT | |||
| 240 | + | Cleanup(func()) | |||
| 241 | + | }) *MockAutoCopyConfig { | |||
| 242 | + | mock := &MockAutoCopyConfig{} | |||
| 243 | + | mock.Mock.Test(t) | |||
| 244 | + | ||||
| 245 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 246 | + | ||||
| 247 | + | return mock | |||
| 248 | + | } | |||
| 249 | + | ||||
| 250 | + | // MockAutoCopyConfig is an autogenerated mock type for the AutoCopyConfig type | |||
| 251 | + | type MockAutoCopyConfig struct { | |||
| 252 | + | mock.Mock | |||
| 253 | + | } | |||
| 254 | + | ||||
| 255 | + | type MockAutoCopyConfig_Expecter struct { | |||
| 256 | + | mock *mock.Mock | |||
| 257 | + | } | |||
| 258 | + | ||||
| 259 | + | func (_m *MockAutoCopyConfig) EXPECT() *MockAutoCopyConfig_Expecter { | |||
| 260 | + | return &MockAutoCopyConfig_Expecter{mock: &_m.Mock} | |||
| 261 | + | } | |||
| 262 | + | ||||
| 263 | + | // IsAutoCopyEnabled provides a mock function for the type MockAutoCopyConfig | |||
| 264 | + | func (_mock *MockAutoCopyConfig) IsAutoCopyEnabled() bool { | |||
| 265 | + | ret := _mock.Called() | |||
| 266 | + | ||||
| 267 | + | if len(ret) == 0 { | |||
| 268 | + | panic("no return value specified for IsAutoCopyEnabled") | |||
| 269 | + | } | |||
| 270 | + | ||||
| 271 | + | var r0 bool | |||
| 272 | + | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |||
| 273 | + | r0 = returnFunc() | |||
| 274 | + | } else { | |||
| 275 | + | r0 = ret.Get(0).(bool) | |||
| 276 | + | } | |||
| 277 | + | return r0 | |||
| 278 | + | } | |||
| 279 | + | ||||
| 280 | + | // MockAutoCopyConfig_IsAutoCopyEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAutoCopyEnabled' | |||
| 281 | + | type MockAutoCopyConfig_IsAutoCopyEnabled_Call struct { | |||
| 282 | + | *mock.Call | |||
| 283 | + | } | |||
| 284 | + | ||||
| 285 | + | // IsAutoCopyEnabled is a helper method to define mock.On call | |||
| 286 | + | func (_e *MockAutoCopyConfig_Expecter) IsAutoCopyEnabled() *MockAutoCopyConfig_IsAutoCopyEnabled_Call { | |||
| 287 | + | return &MockAutoCopyConfig_IsAutoCopyEnabled_Call{Call: _e.mock.On("IsAutoCopyEnabled")} | |||
| 288 | + | } | |||
| 289 | + | ||||
| 290 | + | func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) Run(run func()) *MockAutoCopyConfig_IsAutoCopyEnabled_Call { | |||
| 291 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 292 | + | run() | |||
| 293 | + | }) | |||
| 294 | + | return _c | |||
| 295 | + | } | |||
| 296 | + | ||||
| 297 | + | func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) Return(b bool) *MockAutoCopyConfig_IsAutoCopyEnabled_Call { | |||
| 298 | + | _c.Call.Return(b) | |||
| 299 | + | return _c | |||
| 300 | + | } | |||
| 301 | + | ||||
| 302 | + | func (_c *MockAutoCopyConfig_IsAutoCopyEnabled_Call) RunAndReturn(run func() bool) *MockAutoCopyConfig_IsAutoCopyEnabled_Call { | |||
| 303 | + | _c.Call.Return(run) | |||
| 304 | + | return _c | |||
| 305 | + | } | |||
A internal/application/port/mocks/hardware.go +90 -0
| @@ -0,0 +1,90 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockHardwareSurveyor creates a new instance of MockHardwareSurveyor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockHardwareSurveyor(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockHardwareSurveyor { | |||
| 20 | + | mock := &MockHardwareSurveyor{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockHardwareSurveyor is an autogenerated mock type for the HardwareSurveyor type | |||
| 29 | + | type MockHardwareSurveyor struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockHardwareSurveyor_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockHardwareSurveyor) EXPECT() *MockHardwareSurveyor_Expecter { | |||
| 38 | + | return &MockHardwareSurveyor_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Survey provides a mock function for the type MockHardwareSurveyor | |||
| 42 | + | func (_mock *MockHardwareSurveyor) Survey(ctx context.Context) port.HardwareInfo { | |||
| 43 | + | ret := _mock.Called(ctx) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Survey") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 port.HardwareInfo | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) port.HardwareInfo); ok { | |||
| 51 | + | r0 = returnFunc(ctx) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Get(0).(port.HardwareInfo) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockHardwareSurveyor_Survey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Survey' | |||
| 59 | + | type MockHardwareSurveyor_Survey_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // Survey is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | func (_e *MockHardwareSurveyor_Expecter) Survey(ctx any) *MockHardwareSurveyor_Survey_Call { | |||
| 66 | + | return &MockHardwareSurveyor_Survey_Call{Call: _e.mock.On("Survey", ctx)} | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | func (_c *MockHardwareSurveyor_Survey_Call) Run(run func(ctx context.Context)) *MockHardwareSurveyor_Survey_Call { | |||
| 70 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 71 | + | var arg0 context.Context | |||
| 72 | + | if args[0] != nil { | |||
| 73 | + | arg0 = args[0].(context.Context) | |||
| 74 | + | } | |||
| 75 | + | run( | |||
| 76 | + | arg0, | |||
| 77 | + | ) | |||
| 78 | + | }) | |||
| 79 | + | return _c | |||
| 80 | + | } | |||
| 81 | + | ||||
| 82 | + | func (_c *MockHardwareSurveyor_Survey_Call) Return(hardwareInfo port.HardwareInfo) *MockHardwareSurveyor_Survey_Call { | |||
| 83 | + | _c.Call.Return(hardwareInfo) | |||
| 84 | + | return _c | |||
| 85 | + | } | |||
| 86 | + | ||||
| 87 | + | func (_c *MockHardwareSurveyor_Survey_Call) RunAndReturn(run func(ctx context.Context) port.HardwareInfo) *MockHardwareSurveyor_Survey_Call { | |||
| 88 | + | _c.Call.Return(run) | |||
| 89 | + | return _c | |||
| 90 | + | } | |||
A internal/application/port/mocks/history_sidebar.go +239 -0
| @@ -0,0 +1,239 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/dto" | |||
| 11 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockHistorySidebarHistory creates a new instance of MockHistorySidebarHistory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockHistorySidebarHistory(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockHistorySidebarHistory { | |||
| 21 | + | mock := &MockHistorySidebarHistory{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockHistorySidebarHistory is an autogenerated mock type for the HistorySidebarHistory type | |||
| 30 | + | type MockHistorySidebarHistory struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockHistorySidebarHistory_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockHistorySidebarHistory) EXPECT() *MockHistorySidebarHistory_Expecter { | |||
| 39 | + | return &MockHistorySidebarHistory_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // Delete provides a mock function for the type MockHistorySidebarHistory | |||
| 43 | + | func (_mock *MockHistorySidebarHistory) Delete(ctx context.Context, id int64) error { | |||
| 44 | + | ret := _mock.Called(ctx, id) | |||
| 45 | + | ||||
| 46 | + | if len(ret) == 0 { | |||
| 47 | + | panic("no return value specified for Delete") | |||
| 48 | + | } | |||
| 49 | + | ||||
| 50 | + | var r0 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { | |||
| 52 | + | r0 = returnFunc(ctx, id) | |||
| 53 | + | } else { | |||
| 54 | + | r0 = ret.Error(0) | |||
| 55 | + | } | |||
| 56 | + | return r0 | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | // MockHistorySidebarHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 60 | + | type MockHistorySidebarHistory_Delete_Call struct { | |||
| 61 | + | *mock.Call | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | // Delete is a helper method to define mock.On call | |||
| 65 | + | // - ctx context.Context | |||
| 66 | + | // - id int64 | |||
| 67 | + | func (_e *MockHistorySidebarHistory_Expecter) Delete(ctx any, id any) *MockHistorySidebarHistory_Delete_Call { | |||
| 68 | + | return &MockHistorySidebarHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockHistorySidebarHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistorySidebarHistory_Delete_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | var arg1 int64 | |||
| 78 | + | if args[1] != nil { | |||
| 79 | + | arg1 = args[1].(int64) | |||
| 80 | + | } | |||
| 81 | + | run( | |||
| 82 | + | arg0, | |||
| 83 | + | arg1, | |||
| 84 | + | ) | |||
| 85 | + | }) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockHistorySidebarHistory_Delete_Call) Return(err error) *MockHistorySidebarHistory_Delete_Call { | |||
| 90 | + | _c.Call.Return(err) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | func (_c *MockHistorySidebarHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistorySidebarHistory_Delete_Call { | |||
| 95 | + | _c.Call.Return(run) | |||
| 96 | + | return _c | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | // GetRecent provides a mock function for the type MockHistorySidebarHistory | |||
| 100 | + | func (_mock *MockHistorySidebarHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) { | |||
| 101 | + | ret := _mock.Called(ctx, limit, offset) | |||
| 102 | + | ||||
| 103 | + | if len(ret) == 0 { | |||
| 104 | + | panic("no return value specified for GetRecent") | |||
| 105 | + | } | |||
| 106 | + | ||||
| 107 | + | var r0 []*entity.HistoryEntry | |||
| 108 | + | var r1 error | |||
| 109 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok { | |||
| 110 | + | return returnFunc(ctx, limit, offset) | |||
| 111 | + | } | |||
| 112 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok { | |||
| 113 | + | r0 = returnFunc(ctx, limit, offset) | |||
| 114 | + | } else { | |||
| 115 | + | if ret.Get(0) != nil { | |||
| 116 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 117 | + | } | |||
| 118 | + | } | |||
| 119 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok { | |||
| 120 | + | r1 = returnFunc(ctx, limit, offset) | |||
| 121 | + | } else { | |||
| 122 | + | r1 = ret.Error(1) | |||
| 123 | + | } | |||
| 124 | + | return r0, r1 | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | // MockHistorySidebarHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent' | |||
| 128 | + | type MockHistorySidebarHistory_GetRecent_Call struct { | |||
| 129 | + | *mock.Call | |||
| 130 | + | } | |||
| 131 | + | ||||
| 132 | + | // GetRecent is a helper method to define mock.On call | |||
| 133 | + | // - ctx context.Context | |||
| 134 | + | // - limit int | |||
| 135 | + | // - offset int | |||
| 136 | + | func (_e *MockHistorySidebarHistory_Expecter) GetRecent(ctx any, limit any, offset any) *MockHistorySidebarHistory_GetRecent_Call { | |||
| 137 | + | return &MockHistorySidebarHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)} | |||
| 138 | + | } | |||
| 139 | + | ||||
| 140 | + | func (_c *MockHistorySidebarHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistorySidebarHistory_GetRecent_Call { | |||
| 141 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 142 | + | var arg0 context.Context | |||
| 143 | + | if args[0] != nil { | |||
| 144 | + | arg0 = args[0].(context.Context) | |||
| 145 | + | } | |||
| 146 | + | var arg1 int | |||
| 147 | + | if args[1] != nil { | |||
| 148 | + | arg1 = args[1].(int) | |||
| 149 | + | } | |||
| 150 | + | var arg2 int | |||
| 151 | + | if args[2] != nil { | |||
| 152 | + | arg2 = args[2].(int) | |||
| 153 | + | } | |||
| 154 | + | run( | |||
| 155 | + | arg0, | |||
| 156 | + | arg1, | |||
| 157 | + | arg2, | |||
| 158 | + | ) | |||
| 159 | + | }) | |||
| 160 | + | return _c | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | func (_c *MockHistorySidebarHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistorySidebarHistory_GetRecent_Call { | |||
| 164 | + | _c.Call.Return(historyEntrys, err) | |||
| 165 | + | return _c | |||
| 166 | + | } | |||
| 167 | + | ||||
| 168 | + | func (_c *MockHistorySidebarHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistorySidebarHistory_GetRecent_Call { | |||
| 169 | + | _c.Call.Return(run) | |||
| 170 | + | return _c | |||
| 171 | + | } | |||
| 172 | + | ||||
| 173 | + | // Search provides a mock function for the type MockHistorySidebarHistory | |||
| 174 | + | func (_mock *MockHistorySidebarHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) { | |||
| 175 | + | ret := _mock.Called(ctx, input) | |||
| 176 | + | ||||
| 177 | + | if len(ret) == 0 { | |||
| 178 | + | panic("no return value specified for Search") | |||
| 179 | + | } | |||
| 180 | + | ||||
| 181 | + | var r0 *dto.HistorySearchOutput | |||
| 182 | + | var r1 error | |||
| 183 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok { | |||
| 184 | + | return returnFunc(ctx, input) | |||
| 185 | + | } | |||
| 186 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok { | |||
| 187 | + | r0 = returnFunc(ctx, input) | |||
| 188 | + | } else { | |||
| 189 | + | if ret.Get(0) != nil { | |||
| 190 | + | r0 = ret.Get(0).(*dto.HistorySearchOutput) | |||
| 191 | + | } | |||
| 192 | + | } | |||
| 193 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok { | |||
| 194 | + | r1 = returnFunc(ctx, input) | |||
| 195 | + | } else { | |||
| 196 | + | r1 = ret.Error(1) | |||
| 197 | + | } | |||
| 198 | + | return r0, r1 | |||
| 199 | + | } | |||
| 200 | + | ||||
| 201 | + | // MockHistorySidebarHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' | |||
| 202 | + | type MockHistorySidebarHistory_Search_Call struct { | |||
| 203 | + | *mock.Call | |||
| 204 | + | } | |||
| 205 | + | ||||
| 206 | + | // Search is a helper method to define mock.On call | |||
| 207 | + | // - ctx context.Context | |||
| 208 | + | // - input dto.HistorySearchInput | |||
| 209 | + | func (_e *MockHistorySidebarHistory_Expecter) Search(ctx any, input any) *MockHistorySidebarHistory_Search_Call { | |||
| 210 | + | return &MockHistorySidebarHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)} | |||
| 211 | + | } | |||
| 212 | + | ||||
| 213 | + | func (_c *MockHistorySidebarHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHistorySidebarHistory_Search_Call { | |||
| 214 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 215 | + | var arg0 context.Context | |||
| 216 | + | if args[0] != nil { | |||
| 217 | + | arg0 = args[0].(context.Context) | |||
| 218 | + | } | |||
| 219 | + | var arg1 dto.HistorySearchInput | |||
| 220 | + | if args[1] != nil { | |||
| 221 | + | arg1 = args[1].(dto.HistorySearchInput) | |||
| 222 | + | } | |||
| 223 | + | run( | |||
| 224 | + | arg0, | |||
| 225 | + | arg1, | |||
| 226 | + | ) | |||
| 227 | + | }) | |||
| 228 | + | return _c | |||
| 229 | + | } | |||
| 230 | + | ||||
| 231 | + | func (_c *MockHistorySidebarHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHistorySidebarHistory_Search_Call { | |||
| 232 | + | _c.Call.Return(historySearchOutput, err) | |||
| 233 | + | return _c | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | func (_c *MockHistorySidebarHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHistorySidebarHistory_Search_Call { | |||
| 237 | + | _c.Call.Return(run) | |||
| 238 | + | return _c | |||
| 239 | + | } | |||
A internal/application/port/mocks/homepage.go +1940 -0
| @@ -0,0 +1,1940 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | "time" | |||
| 10 | + | ||||
| 11 | + | "github.com/bnema/dumber/internal/application/dto" | |||
| 12 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 13 | + | mock "github.com/stretchr/testify/mock" | |||
| 14 | + | ) | |||
| 15 | + | ||||
| 16 | + | // NewMockHomepageHistory creates a new instance of MockHomepageHistory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 17 | + | // The first argument is typically a *testing.T value. | |||
| 18 | + | func NewMockHomepageHistory(t interface { | |||
| 19 | + | mock.TestingT | |||
| 20 | + | Cleanup(func()) | |||
| 21 | + | }) *MockHomepageHistory { | |||
| 22 | + | mock := &MockHomepageHistory{} | |||
| 23 | + | mock.Mock.Test(t) | |||
| 24 | + | ||||
| 25 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 26 | + | ||||
| 27 | + | return mock | |||
| 28 | + | } | |||
| 29 | + | ||||
| 30 | + | // MockHomepageHistory is an autogenerated mock type for the HomepageHistory type | |||
| 31 | + | type MockHomepageHistory struct { | |||
| 32 | + | mock.Mock | |||
| 33 | + | } | |||
| 34 | + | ||||
| 35 | + | type MockHomepageHistory_Expecter struct { | |||
| 36 | + | mock *mock.Mock | |||
| 37 | + | } | |||
| 38 | + | ||||
| 39 | + | func (_m *MockHomepageHistory) EXPECT() *MockHomepageHistory_Expecter { | |||
| 40 | + | return &MockHomepageHistory_Expecter{mock: &_m.Mock} | |||
| 41 | + | } | |||
| 42 | + | ||||
| 43 | + | // ClearAll provides a mock function for the type MockHomepageHistory | |||
| 44 | + | func (_mock *MockHomepageHistory) ClearAll(ctx context.Context) error { | |||
| 45 | + | ret := _mock.Called(ctx) | |||
| 46 | + | ||||
| 47 | + | if len(ret) == 0 { | |||
| 48 | + | panic("no return value specified for ClearAll") | |||
| 49 | + | } | |||
| 50 | + | ||||
| 51 | + | var r0 error | |||
| 52 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 53 | + | r0 = returnFunc(ctx) | |||
| 54 | + | } else { | |||
| 55 | + | r0 = ret.Error(0) | |||
| 56 | + | } | |||
| 57 | + | return r0 | |||
| 58 | + | } | |||
| 59 | + | ||||
| 60 | + | // MockHomepageHistory_ClearAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearAll' | |||
| 61 | + | type MockHomepageHistory_ClearAll_Call struct { | |||
| 62 | + | *mock.Call | |||
| 63 | + | } | |||
| 64 | + | ||||
| 65 | + | // ClearAll is a helper method to define mock.On call | |||
| 66 | + | // - ctx context.Context | |||
| 67 | + | func (_e *MockHomepageHistory_Expecter) ClearAll(ctx any) *MockHomepageHistory_ClearAll_Call { | |||
| 68 | + | return &MockHomepageHistory_ClearAll_Call{Call: _e.mock.On("ClearAll", ctx)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockHomepageHistory_ClearAll_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_ClearAll_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | run( | |||
| 78 | + | arg0, | |||
| 79 | + | ) | |||
| 80 | + | }) | |||
| 81 | + | return _c | |||
| 82 | + | } | |||
| 83 | + | ||||
| 84 | + | func (_c *MockHomepageHistory_ClearAll_Call) Return(err error) *MockHomepageHistory_ClearAll_Call { | |||
| 85 | + | _c.Call.Return(err) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockHomepageHistory_ClearAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHomepageHistory_ClearAll_Call { | |||
| 90 | + | _c.Call.Return(run) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | // ClearOlderThan provides a mock function for the type MockHomepageHistory | |||
| 95 | + | func (_mock *MockHomepageHistory) ClearOlderThan(ctx context.Context, before time.Time) error { | |||
| 96 | + | ret := _mock.Called(ctx, before) | |||
| 97 | + | ||||
| 98 | + | if len(ret) == 0 { | |||
| 99 | + | panic("no return value specified for ClearOlderThan") | |||
| 100 | + | } | |||
| 101 | + | ||||
| 102 | + | var r0 error | |||
| 103 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { | |||
| 104 | + | r0 = returnFunc(ctx, before) | |||
| 105 | + | } else { | |||
| 106 | + | r0 = ret.Error(0) | |||
| 107 | + | } | |||
| 108 | + | return r0 | |||
| 109 | + | } | |||
| 110 | + | ||||
| 111 | + | // MockHomepageHistory_ClearOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearOlderThan' | |||
| 112 | + | type MockHomepageHistory_ClearOlderThan_Call struct { | |||
| 113 | + | *mock.Call | |||
| 114 | + | } | |||
| 115 | + | ||||
| 116 | + | // ClearOlderThan is a helper method to define mock.On call | |||
| 117 | + | // - ctx context.Context | |||
| 118 | + | // - before time.Time | |||
| 119 | + | func (_e *MockHomepageHistory_Expecter) ClearOlderThan(ctx any, before any) *MockHomepageHistory_ClearOlderThan_Call { | |||
| 120 | + | return &MockHomepageHistory_ClearOlderThan_Call{Call: _e.mock.On("ClearOlderThan", ctx, before)} | |||
| 121 | + | } | |||
| 122 | + | ||||
| 123 | + | func (_c *MockHomepageHistory_ClearOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHomepageHistory_ClearOlderThan_Call { | |||
| 124 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 125 | + | var arg0 context.Context | |||
| 126 | + | if args[0] != nil { | |||
| 127 | + | arg0 = args[0].(context.Context) | |||
| 128 | + | } | |||
| 129 | + | var arg1 time.Time | |||
| 130 | + | if args[1] != nil { | |||
| 131 | + | arg1 = args[1].(time.Time) | |||
| 132 | + | } | |||
| 133 | + | run( | |||
| 134 | + | arg0, | |||
| 135 | + | arg1, | |||
| 136 | + | ) | |||
| 137 | + | }) | |||
| 138 | + | return _c | |||
| 139 | + | } | |||
| 140 | + | ||||
| 141 | + | func (_c *MockHomepageHistory_ClearOlderThan_Call) Return(err error) *MockHomepageHistory_ClearOlderThan_Call { | |||
| 142 | + | _c.Call.Return(err) | |||
| 143 | + | return _c | |||
| 144 | + | } | |||
| 145 | + | ||||
| 146 | + | func (_c *MockHomepageHistory_ClearOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHomepageHistory_ClearOlderThan_Call { | |||
| 147 | + | _c.Call.Return(run) | |||
| 148 | + | return _c | |||
| 149 | + | } | |||
| 150 | + | ||||
| 151 | + | // ClearRange provides a mock function for the type MockHomepageHistory | |||
| 152 | + | func (_mock *MockHomepageHistory) ClearRange(ctx context.Context, rangeID string) error { | |||
| 153 | + | ret := _mock.Called(ctx, rangeID) | |||
| 154 | + | ||||
| 155 | + | if len(ret) == 0 { | |||
| 156 | + | panic("no return value specified for ClearRange") | |||
| 157 | + | } | |||
| 158 | + | ||||
| 159 | + | var r0 error | |||
| 160 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 161 | + | r0 = returnFunc(ctx, rangeID) | |||
| 162 | + | } else { | |||
| 163 | + | r0 = ret.Error(0) | |||
| 164 | + | } | |||
| 165 | + | return r0 | |||
| 166 | + | } | |||
| 167 | + | ||||
| 168 | + | // MockHomepageHistory_ClearRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearRange' | |||
| 169 | + | type MockHomepageHistory_ClearRange_Call struct { | |||
| 170 | + | *mock.Call | |||
| 171 | + | } | |||
| 172 | + | ||||
| 173 | + | // ClearRange is a helper method to define mock.On call | |||
| 174 | + | // - ctx context.Context | |||
| 175 | + | // - rangeID string | |||
| 176 | + | func (_e *MockHomepageHistory_Expecter) ClearRange(ctx any, rangeID any) *MockHomepageHistory_ClearRange_Call { | |||
| 177 | + | return &MockHomepageHistory_ClearRange_Call{Call: _e.mock.On("ClearRange", ctx, rangeID)} | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | func (_c *MockHomepageHistory_ClearRange_Call) Run(run func(ctx context.Context, rangeID string)) *MockHomepageHistory_ClearRange_Call { | |||
| 181 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 182 | + | var arg0 context.Context | |||
| 183 | + | if args[0] != nil { | |||
| 184 | + | arg0 = args[0].(context.Context) | |||
| 185 | + | } | |||
| 186 | + | var arg1 string | |||
| 187 | + | if args[1] != nil { | |||
| 188 | + | arg1 = args[1].(string) | |||
| 189 | + | } | |||
| 190 | + | run( | |||
| 191 | + | arg0, | |||
| 192 | + | arg1, | |||
| 193 | + | ) | |||
| 194 | + | }) | |||
| 195 | + | return _c | |||
| 196 | + | } | |||
| 197 | + | ||||
| 198 | + | func (_c *MockHomepageHistory_ClearRange_Call) Return(err error) *MockHomepageHistory_ClearRange_Call { | |||
| 199 | + | _c.Call.Return(err) | |||
| 200 | + | return _c | |||
| 201 | + | } | |||
| 202 | + | ||||
| 203 | + | func (_c *MockHomepageHistory_ClearRange_Call) RunAndReturn(run func(ctx context.Context, rangeID string) error) *MockHomepageHistory_ClearRange_Call { | |||
| 204 | + | _c.Call.Return(run) | |||
| 205 | + | return _c | |||
| 206 | + | } | |||
| 207 | + | ||||
| 208 | + | // Delete provides a mock function for the type MockHomepageHistory | |||
| 209 | + | func (_mock *MockHomepageHistory) Delete(ctx context.Context, id int64) error { | |||
| 210 | + | ret := _mock.Called(ctx, id) | |||
| 211 | + | ||||
| 212 | + | if len(ret) == 0 { | |||
| 213 | + | panic("no return value specified for Delete") | |||
| 214 | + | } | |||
| 215 | + | ||||
| 216 | + | var r0 error | |||
| 217 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { | |||
| 218 | + | r0 = returnFunc(ctx, id) | |||
| 219 | + | } else { | |||
| 220 | + | r0 = ret.Error(0) | |||
| 221 | + | } | |||
| 222 | + | return r0 | |||
| 223 | + | } | |||
| 224 | + | ||||
| 225 | + | // MockHomepageHistory_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 226 | + | type MockHomepageHistory_Delete_Call struct { | |||
| 227 | + | *mock.Call | |||
| 228 | + | } | |||
| 229 | + | ||||
| 230 | + | // Delete is a helper method to define mock.On call | |||
| 231 | + | // - ctx context.Context | |||
| 232 | + | // - id int64 | |||
| 233 | + | func (_e *MockHomepageHistory_Expecter) Delete(ctx any, id any) *MockHomepageHistory_Delete_Call { | |||
| 234 | + | return &MockHomepageHistory_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} | |||
| 235 | + | } | |||
| 236 | + | ||||
| 237 | + | func (_c *MockHomepageHistory_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHomepageHistory_Delete_Call { | |||
| 238 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 239 | + | var arg0 context.Context | |||
| 240 | + | if args[0] != nil { | |||
| 241 | + | arg0 = args[0].(context.Context) | |||
| 242 | + | } | |||
| 243 | + | var arg1 int64 | |||
| 244 | + | if args[1] != nil { | |||
| 245 | + | arg1 = args[1].(int64) | |||
| 246 | + | } | |||
| 247 | + | run( | |||
| 248 | + | arg0, | |||
| 249 | + | arg1, | |||
| 250 | + | ) | |||
| 251 | + | }) | |||
| 252 | + | return _c | |||
| 253 | + | } | |||
| 254 | + | ||||
| 255 | + | func (_c *MockHomepageHistory_Delete_Call) Return(err error) *MockHomepageHistory_Delete_Call { | |||
| 256 | + | _c.Call.Return(err) | |||
| 257 | + | return _c | |||
| 258 | + | } | |||
| 259 | + | ||||
| 260 | + | func (_c *MockHomepageHistory_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHomepageHistory_Delete_Call { | |||
| 261 | + | _c.Call.Return(run) | |||
| 262 | + | return _c | |||
| 263 | + | } | |||
| 264 | + | ||||
| 265 | + | // DeleteByDomain provides a mock function for the type MockHomepageHistory | |||
| 266 | + | func (_mock *MockHomepageHistory) DeleteByDomain(ctx context.Context, domain string) error { | |||
| 267 | + | ret := _mock.Called(ctx, domain) | |||
| 268 | + | ||||
| 269 | + | if len(ret) == 0 { | |||
| 270 | + | panic("no return value specified for DeleteByDomain") | |||
| 271 | + | } | |||
| 272 | + | ||||
| 273 | + | var r0 error | |||
| 274 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 275 | + | r0 = returnFunc(ctx, domain) | |||
| 276 | + | } else { | |||
| 277 | + | r0 = ret.Error(0) | |||
| 278 | + | } | |||
| 279 | + | return r0 | |||
| 280 | + | } | |||
| 281 | + | ||||
| 282 | + | // MockHomepageHistory_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain' | |||
| 283 | + | type MockHomepageHistory_DeleteByDomain_Call struct { | |||
| 284 | + | *mock.Call | |||
| 285 | + | } | |||
| 286 | + | ||||
| 287 | + | // DeleteByDomain is a helper method to define mock.On call | |||
| 288 | + | // - ctx context.Context | |||
| 289 | + | // - domain string | |||
| 290 | + | func (_e *MockHomepageHistory_Expecter) DeleteByDomain(ctx any, domain any) *MockHomepageHistory_DeleteByDomain_Call { | |||
| 291 | + | return &MockHomepageHistory_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)} | |||
| 292 | + | } | |||
| 293 | + | ||||
| 294 | + | func (_c *MockHomepageHistory_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHomepageHistory_DeleteByDomain_Call { | |||
| 295 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 296 | + | var arg0 context.Context | |||
| 297 | + | if args[0] != nil { | |||
| 298 | + | arg0 = args[0].(context.Context) | |||
| 299 | + | } | |||
| 300 | + | var arg1 string | |||
| 301 | + | if args[1] != nil { | |||
| 302 | + | arg1 = args[1].(string) | |||
| 303 | + | } | |||
| 304 | + | run( | |||
| 305 | + | arg0, | |||
| 306 | + | arg1, | |||
| 307 | + | ) | |||
| 308 | + | }) | |||
| 309 | + | return _c | |||
| 310 | + | } | |||
| 311 | + | ||||
| 312 | + | func (_c *MockHomepageHistory_DeleteByDomain_Call) Return(err error) *MockHomepageHistory_DeleteByDomain_Call { | |||
| 313 | + | _c.Call.Return(err) | |||
| 314 | + | return _c | |||
| 315 | + | } | |||
| 316 | + | ||||
| 317 | + | func (_c *MockHomepageHistory_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHomepageHistory_DeleteByDomain_Call { | |||
| 318 | + | _c.Call.Return(run) | |||
| 319 | + | return _c | |||
| 320 | + | } | |||
| 321 | + | ||||
| 322 | + | // GetAnalytics provides a mock function for the type MockHomepageHistory | |||
| 323 | + | func (_mock *MockHomepageHistory) GetAnalytics(ctx context.Context) (*entity.HistoryAnalytics, error) { | |||
| 324 | + | ret := _mock.Called(ctx) | |||
| 325 | + | ||||
| 326 | + | if len(ret) == 0 { | |||
| 327 | + | panic("no return value specified for GetAnalytics") | |||
| 328 | + | } | |||
| 329 | + | ||||
| 330 | + | var r0 *entity.HistoryAnalytics | |||
| 331 | + | var r1 error | |||
| 332 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryAnalytics, error)); ok { | |||
| 333 | + | return returnFunc(ctx) | |||
| 334 | + | } | |||
| 335 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryAnalytics); ok { | |||
| 336 | + | r0 = returnFunc(ctx) | |||
| 337 | + | } else { | |||
| 338 | + | if ret.Get(0) != nil { | |||
| 339 | + | r0 = ret.Get(0).(*entity.HistoryAnalytics) | |||
| 340 | + | } | |||
| 341 | + | } | |||
| 342 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 343 | + | r1 = returnFunc(ctx) | |||
| 344 | + | } else { | |||
| 345 | + | r1 = ret.Error(1) | |||
| 346 | + | } | |||
| 347 | + | return r0, r1 | |||
| 348 | + | } | |||
| 349 | + | ||||
| 350 | + | // MockHomepageHistory_GetAnalytics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnalytics' | |||
| 351 | + | type MockHomepageHistory_GetAnalytics_Call struct { | |||
| 352 | + | *mock.Call | |||
| 353 | + | } | |||
| 354 | + | ||||
| 355 | + | // GetAnalytics is a helper method to define mock.On call | |||
| 356 | + | // - ctx context.Context | |||
| 357 | + | func (_e *MockHomepageHistory_Expecter) GetAnalytics(ctx any) *MockHomepageHistory_GetAnalytics_Call { | |||
| 358 | + | return &MockHomepageHistory_GetAnalytics_Call{Call: _e.mock.On("GetAnalytics", ctx)} | |||
| 359 | + | } | |||
| 360 | + | ||||
| 361 | + | func (_c *MockHomepageHistory_GetAnalytics_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetAnalytics_Call { | |||
| 362 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 363 | + | var arg0 context.Context | |||
| 364 | + | if args[0] != nil { | |||
| 365 | + | arg0 = args[0].(context.Context) | |||
| 366 | + | } | |||
| 367 | + | run( | |||
| 368 | + | arg0, | |||
| 369 | + | ) | |||
| 370 | + | }) | |||
| 371 | + | return _c | |||
| 372 | + | } | |||
| 373 | + | ||||
| 374 | + | func (_c *MockHomepageHistory_GetAnalytics_Call) Return(historyAnalytics *entity.HistoryAnalytics, err error) *MockHomepageHistory_GetAnalytics_Call { | |||
| 375 | + | _c.Call.Return(historyAnalytics, err) | |||
| 376 | + | return _c | |||
| 377 | + | } | |||
| 378 | + | ||||
| 379 | + | func (_c *MockHomepageHistory_GetAnalytics_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryAnalytics, error)) *MockHomepageHistory_GetAnalytics_Call { | |||
| 380 | + | _c.Call.Return(run) | |||
| 381 | + | return _c | |||
| 382 | + | } | |||
| 383 | + | ||||
| 384 | + | // GetDomainStats provides a mock function for the type MockHomepageHistory | |||
| 385 | + | func (_mock *MockHomepageHistory) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) { | |||
| 386 | + | ret := _mock.Called(ctx, limit) | |||
| 387 | + | ||||
| 388 | + | if len(ret) == 0 { | |||
| 389 | + | panic("no return value specified for GetDomainStats") | |||
| 390 | + | } | |||
| 391 | + | ||||
| 392 | + | var r0 []*entity.DomainStat | |||
| 393 | + | var r1 error | |||
| 394 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok { | |||
| 395 | + | return returnFunc(ctx, limit) | |||
| 396 | + | } | |||
| 397 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok { | |||
| 398 | + | r0 = returnFunc(ctx, limit) | |||
| 399 | + | } else { | |||
| 400 | + | if ret.Get(0) != nil { | |||
| 401 | + | r0 = ret.Get(0).([]*entity.DomainStat) | |||
| 402 | + | } | |||
| 403 | + | } | |||
| 404 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 405 | + | r1 = returnFunc(ctx, limit) | |||
| 406 | + | } else { | |||
| 407 | + | r1 = ret.Error(1) | |||
| 408 | + | } | |||
| 409 | + | return r0, r1 | |||
| 410 | + | } | |||
| 411 | + | ||||
| 412 | + | // MockHomepageHistory_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats' | |||
| 413 | + | type MockHomepageHistory_GetDomainStats_Call struct { | |||
| 414 | + | *mock.Call | |||
| 415 | + | } | |||
| 416 | + | ||||
| 417 | + | // GetDomainStats is a helper method to define mock.On call | |||
| 418 | + | // - ctx context.Context | |||
| 419 | + | // - limit int | |||
| 420 | + | func (_e *MockHomepageHistory_Expecter) GetDomainStats(ctx any, limit any) *MockHomepageHistory_GetDomainStats_Call { | |||
| 421 | + | return &MockHomepageHistory_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)} | |||
| 422 | + | } | |||
| 423 | + | ||||
| 424 | + | func (_c *MockHomepageHistory_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHomepageHistory_GetDomainStats_Call { | |||
| 425 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 426 | + | var arg0 context.Context | |||
| 427 | + | if args[0] != nil { | |||
| 428 | + | arg0 = args[0].(context.Context) | |||
| 429 | + | } | |||
| 430 | + | var arg1 int | |||
| 431 | + | if args[1] != nil { | |||
| 432 | + | arg1 = args[1].(int) | |||
| 433 | + | } | |||
| 434 | + | run( | |||
| 435 | + | arg0, | |||
| 436 | + | arg1, | |||
| 437 | + | ) | |||
| 438 | + | }) | |||
| 439 | + | return _c | |||
| 440 | + | } | |||
| 441 | + | ||||
| 442 | + | func (_c *MockHomepageHistory_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHomepageHistory_GetDomainStats_Call { | |||
| 443 | + | _c.Call.Return(domainStats, err) | |||
| 444 | + | return _c | |||
| 445 | + | } | |||
| 446 | + | ||||
| 447 | + | func (_c *MockHomepageHistory_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHomepageHistory_GetDomainStats_Call { | |||
| 448 | + | _c.Call.Return(run) | |||
| 449 | + | return _c | |||
| 450 | + | } | |||
| 451 | + | ||||
| 452 | + | // GetRecent provides a mock function for the type MockHomepageHistory | |||
| 453 | + | func (_mock *MockHomepageHistory) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) { | |||
| 454 | + | ret := _mock.Called(ctx, limit, offset) | |||
| 455 | + | ||||
| 456 | + | if len(ret) == 0 { | |||
| 457 | + | panic("no return value specified for GetRecent") | |||
| 458 | + | } | |||
| 459 | + | ||||
| 460 | + | var r0 []*entity.HistoryEntry | |||
| 461 | + | var r1 error | |||
| 462 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok { | |||
| 463 | + | return returnFunc(ctx, limit, offset) | |||
| 464 | + | } | |||
| 465 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok { | |||
| 466 | + | r0 = returnFunc(ctx, limit, offset) | |||
| 467 | + | } else { | |||
| 468 | + | if ret.Get(0) != nil { | |||
| 469 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 470 | + | } | |||
| 471 | + | } | |||
| 472 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok { | |||
| 473 | + | r1 = returnFunc(ctx, limit, offset) | |||
| 474 | + | } else { | |||
| 475 | + | r1 = ret.Error(1) | |||
| 476 | + | } | |||
| 477 | + | return r0, r1 | |||
| 478 | + | } | |||
| 479 | + | ||||
| 480 | + | // MockHomepageHistory_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent' | |||
| 481 | + | type MockHomepageHistory_GetRecent_Call struct { | |||
| 482 | + | *mock.Call | |||
| 483 | + | } | |||
| 484 | + | ||||
| 485 | + | // GetRecent is a helper method to define mock.On call | |||
| 486 | + | // - ctx context.Context | |||
| 487 | + | // - limit int | |||
| 488 | + | // - offset int | |||
| 489 | + | func (_e *MockHomepageHistory_Expecter) GetRecent(ctx any, limit any, offset any) *MockHomepageHistory_GetRecent_Call { | |||
| 490 | + | return &MockHomepageHistory_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)} | |||
| 491 | + | } | |||
| 492 | + | ||||
| 493 | + | func (_c *MockHomepageHistory_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHomepageHistory_GetRecent_Call { | |||
| 494 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 495 | + | var arg0 context.Context | |||
| 496 | + | if args[0] != nil { | |||
| 497 | + | arg0 = args[0].(context.Context) | |||
| 498 | + | } | |||
| 499 | + | var arg1 int | |||
| 500 | + | if args[1] != nil { | |||
| 501 | + | arg1 = args[1].(int) | |||
| 502 | + | } | |||
| 503 | + | var arg2 int | |||
| 504 | + | if args[2] != nil { | |||
| 505 | + | arg2 = args[2].(int) | |||
| 506 | + | } | |||
| 507 | + | run( | |||
| 508 | + | arg0, | |||
| 509 | + | arg1, | |||
| 510 | + | arg2, | |||
| 511 | + | ) | |||
| 512 | + | }) | |||
| 513 | + | return _c | |||
| 514 | + | } | |||
| 515 | + | ||||
| 516 | + | func (_c *MockHomepageHistory_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecent_Call { | |||
| 517 | + | _c.Call.Return(historyEntrys, err) | |||
| 518 | + | return _c | |||
| 519 | + | } | |||
| 520 | + | ||||
| 521 | + | func (_c *MockHomepageHistory_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecent_Call { | |||
| 522 | + | _c.Call.Return(run) | |||
| 523 | + | return _c | |||
| 524 | + | } | |||
| 525 | + | ||||
| 526 | + | // GetRecentByDomain provides a mock function for the type MockHomepageHistory | |||
| 527 | + | func (_mock *MockHomepageHistory) GetRecentByDomain(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error) { | |||
| 528 | + | ret := _mock.Called(ctx, domain, limit, offset) | |||
| 529 | + | ||||
| 530 | + | if len(ret) == 0 { | |||
| 531 | + | panic("no return value specified for GetRecentByDomain") | |||
| 532 | + | } | |||
| 533 | + | ||||
| 534 | + | var r0 []*entity.HistoryEntry | |||
| 535 | + | var r1 error | |||
| 536 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) ([]*entity.HistoryEntry, error)); ok { | |||
| 537 | + | return returnFunc(ctx, domain, limit, offset) | |||
| 538 | + | } | |||
| 539 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) []*entity.HistoryEntry); ok { | |||
| 540 | + | r0 = returnFunc(ctx, domain, limit, offset) | |||
| 541 | + | } else { | |||
| 542 | + | if ret.Get(0) != nil { | |||
| 543 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 544 | + | } | |||
| 545 | + | } | |||
| 546 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int, int) error); ok { | |||
| 547 | + | r1 = returnFunc(ctx, domain, limit, offset) | |||
| 548 | + | } else { | |||
| 549 | + | r1 = ret.Error(1) | |||
| 550 | + | } | |||
| 551 | + | return r0, r1 | |||
| 552 | + | } | |||
| 553 | + | ||||
| 554 | + | // MockHomepageHistory_GetRecentByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentByDomain' | |||
| 555 | + | type MockHomepageHistory_GetRecentByDomain_Call struct { | |||
| 556 | + | *mock.Call | |||
| 557 | + | } | |||
| 558 | + | ||||
| 559 | + | // GetRecentByDomain is a helper method to define mock.On call | |||
| 560 | + | // - ctx context.Context | |||
| 561 | + | // - domain string | |||
| 562 | + | // - limit int | |||
| 563 | + | // - offset int | |||
| 564 | + | func (_e *MockHomepageHistory_Expecter) GetRecentByDomain(ctx any, domain any, limit any, offset any) *MockHomepageHistory_GetRecentByDomain_Call { | |||
| 565 | + | return &MockHomepageHistory_GetRecentByDomain_Call{Call: _e.mock.On("GetRecentByDomain", ctx, domain, limit, offset)} | |||
| 566 | + | } | |||
| 567 | + | ||||
| 568 | + | func (_c *MockHomepageHistory_GetRecentByDomain_Call) Run(run func(ctx context.Context, domain string, limit int, offset int)) *MockHomepageHistory_GetRecentByDomain_Call { | |||
| 569 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 570 | + | var arg0 context.Context | |||
| 571 | + | if args[0] != nil { | |||
| 572 | + | arg0 = args[0].(context.Context) | |||
| 573 | + | } | |||
| 574 | + | var arg1 string | |||
| 575 | + | if args[1] != nil { | |||
| 576 | + | arg1 = args[1].(string) | |||
| 577 | + | } | |||
| 578 | + | var arg2 int | |||
| 579 | + | if args[2] != nil { | |||
| 580 | + | arg2 = args[2].(int) | |||
| 581 | + | } | |||
| 582 | + | var arg3 int | |||
| 583 | + | if args[3] != nil { | |||
| 584 | + | arg3 = args[3].(int) | |||
| 585 | + | } | |||
| 586 | + | run( | |||
| 587 | + | arg0, | |||
| 588 | + | arg1, | |||
| 589 | + | arg2, | |||
| 590 | + | arg3, | |||
| 591 | + | ) | |||
| 592 | + | }) | |||
| 593 | + | return _c | |||
| 594 | + | } | |||
| 595 | + | ||||
| 596 | + | func (_c *MockHomepageHistory_GetRecentByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHomepageHistory_GetRecentByDomain_Call { | |||
| 597 | + | _c.Call.Return(historyEntrys, err) | |||
| 598 | + | return _c | |||
| 599 | + | } | |||
| 600 | + | ||||
| 601 | + | func (_c *MockHomepageHistory_GetRecentByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHomepageHistory_GetRecentByDomain_Call { | |||
| 602 | + | _c.Call.Return(run) | |||
| 603 | + | return _c | |||
| 604 | + | } | |||
| 605 | + | ||||
| 606 | + | // GetRecentWindow provides a mock function for the type MockHomepageHistory | |||
| 607 | + | func (_mock *MockHomepageHistory) GetRecentWindow(ctx context.Context, before time.Time, domain string) (*entity.HistoryWindow, error) { | |||
| 608 | + | ret := _mock.Called(ctx, before, domain) | |||
| 609 | + | ||||
| 610 | + | if len(ret) == 0 { | |||
| 611 | + | panic("no return value specified for GetRecentWindow") | |||
| 612 | + | } | |||
| 613 | + | ||||
| 614 | + | var r0 *entity.HistoryWindow | |||
| 615 | + | var r1 error | |||
| 616 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, string) (*entity.HistoryWindow, error)); ok { | |||
| 617 | + | return returnFunc(ctx, before, domain) | |||
| 618 | + | } | |||
| 619 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, string) *entity.HistoryWindow); ok { | |||
| 620 | + | r0 = returnFunc(ctx, before, domain) | |||
| 621 | + | } else { | |||
| 622 | + | if ret.Get(0) != nil { | |||
| 623 | + | r0 = ret.Get(0).(*entity.HistoryWindow) | |||
| 624 | + | } | |||
| 625 | + | } | |||
| 626 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time, string) error); ok { | |||
| 627 | + | r1 = returnFunc(ctx, before, domain) | |||
| 628 | + | } else { | |||
| 629 | + | r1 = ret.Error(1) | |||
| 630 | + | } | |||
| 631 | + | return r0, r1 | |||
| 632 | + | } | |||
| 633 | + | ||||
| 634 | + | // MockHomepageHistory_GetRecentWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindow' | |||
| 635 | + | type MockHomepageHistory_GetRecentWindow_Call struct { | |||
| 636 | + | *mock.Call | |||
| 637 | + | } | |||
| 638 | + | ||||
| 639 | + | // GetRecentWindow is a helper method to define mock.On call | |||
| 640 | + | // - ctx context.Context | |||
| 641 | + | // - before time.Time | |||
| 642 | + | // - domain string | |||
| 643 | + | func (_e *MockHomepageHistory_Expecter) GetRecentWindow(ctx any, before any, domain any) *MockHomepageHistory_GetRecentWindow_Call { | |||
| 644 | + | return &MockHomepageHistory_GetRecentWindow_Call{Call: _e.mock.On("GetRecentWindow", ctx, before, domain)} | |||
| 645 | + | } | |||
| 646 | + | ||||
| 647 | + | func (_c *MockHomepageHistory_GetRecentWindow_Call) Run(run func(ctx context.Context, before time.Time, domain string)) *MockHomepageHistory_GetRecentWindow_Call { | |||
| 648 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 649 | + | var arg0 context.Context | |||
| 650 | + | if args[0] != nil { | |||
| 651 | + | arg0 = args[0].(context.Context) | |||
| 652 | + | } | |||
| 653 | + | var arg1 time.Time | |||
| 654 | + | if args[1] != nil { | |||
| 655 | + | arg1 = args[1].(time.Time) | |||
| 656 | + | } | |||
| 657 | + | var arg2 string | |||
| 658 | + | if args[2] != nil { | |||
| 659 | + | arg2 = args[2].(string) | |||
| 660 | + | } | |||
| 661 | + | run( | |||
| 662 | + | arg0, | |||
| 663 | + | arg1, | |||
| 664 | + | arg2, | |||
| 665 | + | ) | |||
| 666 | + | }) | |||
| 667 | + | return _c | |||
| 668 | + | } | |||
| 669 | + | ||||
| 670 | + | func (_c *MockHomepageHistory_GetRecentWindow_Call) Return(historyWindow *entity.HistoryWindow, err error) *MockHomepageHistory_GetRecentWindow_Call { | |||
| 671 | + | _c.Call.Return(historyWindow, err) | |||
| 672 | + | return _c | |||
| 673 | + | } | |||
| 674 | + | ||||
| 675 | + | func (_c *MockHomepageHistory_GetRecentWindow_Call) RunAndReturn(run func(ctx context.Context, before time.Time, domain string) (*entity.HistoryWindow, error)) *MockHomepageHistory_GetRecentWindow_Call { | |||
| 676 | + | _c.Call.Return(run) | |||
| 677 | + | return _c | |||
| 678 | + | } | |||
| 679 | + | ||||
| 680 | + | // GetStats provides a mock function for the type MockHomepageHistory | |||
| 681 | + | func (_mock *MockHomepageHistory) GetStats(ctx context.Context) (*entity.HistoryStats, error) { | |||
| 682 | + | ret := _mock.Called(ctx) | |||
| 683 | + | ||||
| 684 | + | if len(ret) == 0 { | |||
| 685 | + | panic("no return value specified for GetStats") | |||
| 686 | + | } | |||
| 687 | + | ||||
| 688 | + | var r0 *entity.HistoryStats | |||
| 689 | + | var r1 error | |||
| 690 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok { | |||
| 691 | + | return returnFunc(ctx) | |||
| 692 | + | } | |||
| 693 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok { | |||
| 694 | + | r0 = returnFunc(ctx) | |||
| 695 | + | } else { | |||
| 696 | + | if ret.Get(0) != nil { | |||
| 697 | + | r0 = ret.Get(0).(*entity.HistoryStats) | |||
| 698 | + | } | |||
| 699 | + | } | |||
| 700 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 701 | + | r1 = returnFunc(ctx) | |||
| 702 | + | } else { | |||
| 703 | + | r1 = ret.Error(1) | |||
| 704 | + | } | |||
| 705 | + | return r0, r1 | |||
| 706 | + | } | |||
| 707 | + | ||||
| 708 | + | // MockHomepageHistory_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats' | |||
| 709 | + | type MockHomepageHistory_GetStats_Call struct { | |||
| 710 | + | *mock.Call | |||
| 711 | + | } | |||
| 712 | + | ||||
| 713 | + | // GetStats is a helper method to define mock.On call | |||
| 714 | + | // - ctx context.Context | |||
| 715 | + | func (_e *MockHomepageHistory_Expecter) GetStats(ctx any) *MockHomepageHistory_GetStats_Call { | |||
| 716 | + | return &MockHomepageHistory_GetStats_Call{Call: _e.mock.On("GetStats", ctx)} | |||
| 717 | + | } | |||
| 718 | + | ||||
| 719 | + | func (_c *MockHomepageHistory_GetStats_Call) Run(run func(ctx context.Context)) *MockHomepageHistory_GetStats_Call { | |||
| 720 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 721 | + | var arg0 context.Context | |||
| 722 | + | if args[0] != nil { | |||
| 723 | + | arg0 = args[0].(context.Context) | |||
| 724 | + | } | |||
| 725 | + | run( | |||
| 726 | + | arg0, | |||
| 727 | + | ) | |||
| 728 | + | }) | |||
| 729 | + | return _c | |||
| 730 | + | } | |||
| 731 | + | ||||
| 732 | + | func (_c *MockHomepageHistory_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHomepageHistory_GetStats_Call { | |||
| 733 | + | _c.Call.Return(historyStats, err) | |||
| 734 | + | return _c | |||
| 735 | + | } | |||
| 736 | + | ||||
| 737 | + | func (_c *MockHomepageHistory_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHomepageHistory_GetStats_Call { | |||
| 738 | + | _c.Call.Return(run) | |||
| 739 | + | return _c | |||
| 740 | + | } | |||
| 741 | + | ||||
| 742 | + | // Search provides a mock function for the type MockHomepageHistory | |||
| 743 | + | func (_mock *MockHomepageHistory) Search(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error) { | |||
| 744 | + | ret := _mock.Called(ctx, input) | |||
| 745 | + | ||||
| 746 | + | if len(ret) == 0 { | |||
| 747 | + | panic("no return value specified for Search") | |||
| 748 | + | } | |||
| 749 | + | ||||
| 750 | + | var r0 *dto.HistorySearchOutput | |||
| 751 | + | var r1 error | |||
| 752 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) (*dto.HistorySearchOutput, error)); ok { | |||
| 753 | + | return returnFunc(ctx, input) | |||
| 754 | + | } | |||
| 755 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.HistorySearchInput) *dto.HistorySearchOutput); ok { | |||
| 756 | + | r0 = returnFunc(ctx, input) | |||
| 757 | + | } else { | |||
| 758 | + | if ret.Get(0) != nil { | |||
| 759 | + | r0 = ret.Get(0).(*dto.HistorySearchOutput) | |||
| 760 | + | } | |||
| 761 | + | } | |||
| 762 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.HistorySearchInput) error); ok { | |||
| 763 | + | r1 = returnFunc(ctx, input) | |||
| 764 | + | } else { | |||
| 765 | + | r1 = ret.Error(1) | |||
| 766 | + | } | |||
| 767 | + | return r0, r1 | |||
| 768 | + | } | |||
| 769 | + | ||||
| 770 | + | // MockHomepageHistory_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' | |||
| 771 | + | type MockHomepageHistory_Search_Call struct { | |||
| 772 | + | *mock.Call | |||
| 773 | + | } | |||
| 774 | + | ||||
| 775 | + | // Search is a helper method to define mock.On call | |||
| 776 | + | // - ctx context.Context | |||
| 777 | + | // - input dto.HistorySearchInput | |||
| 778 | + | func (_e *MockHomepageHistory_Expecter) Search(ctx any, input any) *MockHomepageHistory_Search_Call { | |||
| 779 | + | return &MockHomepageHistory_Search_Call{Call: _e.mock.On("Search", ctx, input)} | |||
| 780 | + | } | |||
| 781 | + | ||||
| 782 | + | func (_c *MockHomepageHistory_Search_Call) Run(run func(ctx context.Context, input dto.HistorySearchInput)) *MockHomepageHistory_Search_Call { | |||
| 783 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 784 | + | var arg0 context.Context | |||
| 785 | + | if args[0] != nil { | |||
| 786 | + | arg0 = args[0].(context.Context) | |||
| 787 | + | } | |||
| 788 | + | var arg1 dto.HistorySearchInput | |||
| 789 | + | if args[1] != nil { | |||
| 790 | + | arg1 = args[1].(dto.HistorySearchInput) | |||
| 791 | + | } | |||
| 792 | + | run( | |||
| 793 | + | arg0, | |||
| 794 | + | arg1, | |||
| 795 | + | ) | |||
| 796 | + | }) | |||
| 797 | + | return _c | |||
| 798 | + | } | |||
| 799 | + | ||||
| 800 | + | func (_c *MockHomepageHistory_Search_Call) Return(historySearchOutput *dto.HistorySearchOutput, err error) *MockHomepageHistory_Search_Call { | |||
| 801 | + | _c.Call.Return(historySearchOutput, err) | |||
| 802 | + | return _c | |||
| 803 | + | } | |||
| 804 | + | ||||
| 805 | + | func (_c *MockHomepageHistory_Search_Call) RunAndReturn(run func(ctx context.Context, input dto.HistorySearchInput) (*dto.HistorySearchOutput, error)) *MockHomepageHistory_Search_Call { | |||
| 806 | + | _c.Call.Return(run) | |||
| 807 | + | return _c | |||
| 808 | + | } | |||
| 809 | + | ||||
| 810 | + | // NewMockHomepageFavorites creates a new instance of MockHomepageFavorites. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 811 | + | // The first argument is typically a *testing.T value. | |||
| 812 | + | func NewMockHomepageFavorites(t interface { | |||
| 813 | + | mock.TestingT | |||
| 814 | + | Cleanup(func()) | |||
| 815 | + | }) *MockHomepageFavorites { | |||
| 816 | + | mock := &MockHomepageFavorites{} | |||
| 817 | + | mock.Mock.Test(t) | |||
| 818 | + | ||||
| 819 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 820 | + | ||||
| 821 | + | return mock | |||
| 822 | + | } | |||
| 823 | + | ||||
| 824 | + | // MockHomepageFavorites is an autogenerated mock type for the HomepageFavorites type | |||
| 825 | + | type MockHomepageFavorites struct { | |||
| 826 | + | mock.Mock | |||
| 827 | + | } | |||
| 828 | + | ||||
| 829 | + | type MockHomepageFavorites_Expecter struct { | |||
| 830 | + | mock *mock.Mock | |||
| 831 | + | } | |||
| 832 | + | ||||
| 833 | + | func (_m *MockHomepageFavorites) EXPECT() *MockHomepageFavorites_Expecter { | |||
| 834 | + | return &MockHomepageFavorites_Expecter{mock: &_m.Mock} | |||
| 835 | + | } | |||
| 836 | + | ||||
| 837 | + | // AddFavorite provides a mock function for the type MockHomepageFavorites | |||
| 838 | + | func (_mock *MockHomepageFavorites) AddFavorite(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error) { | |||
| 839 | + | ret := _mock.Called(ctx, input) | |||
| 840 | + | ||||
| 841 | + | if len(ret) == 0 { | |||
| 842 | + | panic("no return value specified for AddFavorite") | |||
| 843 | + | } | |||
| 844 | + | ||||
| 845 | + | var r0 *entity.Favorite | |||
| 846 | + | var r1 error | |||
| 847 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) (*entity.Favorite, error)); ok { | |||
| 848 | + | return returnFunc(ctx, input) | |||
| 849 | + | } | |||
| 850 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteCreateInput) *entity.Favorite); ok { | |||
| 851 | + | r0 = returnFunc(ctx, input) | |||
| 852 | + | } else { | |||
| 853 | + | if ret.Get(0) != nil { | |||
| 854 | + | r0 = ret.Get(0).(*entity.Favorite) | |||
| 855 | + | } | |||
| 856 | + | } | |||
| 857 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteCreateInput) error); ok { | |||
| 858 | + | r1 = returnFunc(ctx, input) | |||
| 859 | + | } else { | |||
| 860 | + | r1 = ret.Error(1) | |||
| 861 | + | } | |||
| 862 | + | return r0, r1 | |||
| 863 | + | } | |||
| 864 | + | ||||
| 865 | + | // MockHomepageFavorites_AddFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddFavorite' | |||
| 866 | + | type MockHomepageFavorites_AddFavorite_Call struct { | |||
| 867 | + | *mock.Call | |||
| 868 | + | } | |||
| 869 | + | ||||
| 870 | + | // AddFavorite is a helper method to define mock.On call | |||
| 871 | + | // - ctx context.Context | |||
| 872 | + | // - input dto.FavoriteCreateInput | |||
| 873 | + | func (_e *MockHomepageFavorites_Expecter) AddFavorite(ctx any, input any) *MockHomepageFavorites_AddFavorite_Call { | |||
| 874 | + | return &MockHomepageFavorites_AddFavorite_Call{Call: _e.mock.On("AddFavorite", ctx, input)} | |||
| 875 | + | } | |||
| 876 | + | ||||
| 877 | + | func (_c *MockHomepageFavorites_AddFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteCreateInput)) *MockHomepageFavorites_AddFavorite_Call { | |||
| 878 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 879 | + | var arg0 context.Context | |||
| 880 | + | if args[0] != nil { | |||
| 881 | + | arg0 = args[0].(context.Context) | |||
| 882 | + | } | |||
| 883 | + | var arg1 dto.FavoriteCreateInput | |||
| 884 | + | if args[1] != nil { | |||
| 885 | + | arg1 = args[1].(dto.FavoriteCreateInput) | |||
| 886 | + | } | |||
| 887 | + | run( | |||
| 888 | + | arg0, | |||
| 889 | + | arg1, | |||
| 890 | + | ) | |||
| 891 | + | }) | |||
| 892 | + | return _c | |||
| 893 | + | } | |||
| 894 | + | ||||
| 895 | + | func (_c *MockHomepageFavorites_AddFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_AddFavorite_Call { | |||
| 896 | + | _c.Call.Return(favorite, err) | |||
| 897 | + | return _c | |||
| 898 | + | } | |||
| 899 | + | ||||
| 900 | + | func (_c *MockHomepageFavorites_AddFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteCreateInput) (*entity.Favorite, error)) *MockHomepageFavorites_AddFavorite_Call { | |||
| 901 | + | _c.Call.Return(run) | |||
| 902 | + | return _c | |||
| 903 | + | } | |||
| 904 | + | ||||
| 905 | + | // AddTag provides a mock function for the type MockHomepageFavorites | |||
| 906 | + | func (_mock *MockHomepageFavorites) AddTag(ctx context.Context, name string, color string) (*entity.Tag, error) { | |||
| 907 | + | ret := _mock.Called(ctx, name, color) | |||
| 908 | + | ||||
| 909 | + | if len(ret) == 0 { | |||
| 910 | + | panic("no return value specified for AddTag") | |||
| 911 | + | } | |||
| 912 | + | ||||
| 913 | + | var r0 *entity.Tag | |||
| 914 | + | var r1 error | |||
| 915 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*entity.Tag, error)); ok { | |||
| 916 | + | return returnFunc(ctx, name, color) | |||
| 917 | + | } | |||
| 918 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *entity.Tag); ok { | |||
| 919 | + | r0 = returnFunc(ctx, name, color) | |||
| 920 | + | } else { | |||
| 921 | + | if ret.Get(0) != nil { | |||
| 922 | + | r0 = ret.Get(0).(*entity.Tag) | |||
| 923 | + | } | |||
| 924 | + | } | |||
| 925 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { | |||
| 926 | + | r1 = returnFunc(ctx, name, color) | |||
| 927 | + | } else { | |||
| 928 | + | r1 = ret.Error(1) | |||
| 929 | + | } | |||
| 930 | + | return r0, r1 | |||
| 931 | + | } | |||
| 932 | + | ||||
| 933 | + | // MockHomepageFavorites_AddTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddTag' | |||
| 934 | + | type MockHomepageFavorites_AddTag_Call struct { | |||
| 935 | + | *mock.Call | |||
| 936 | + | } | |||
| 937 | + | ||||
| 938 | + | // AddTag is a helper method to define mock.On call | |||
| 939 | + | // - ctx context.Context | |||
| 940 | + | // - name string | |||
| 941 | + | // - color string | |||
| 942 | + | func (_e *MockHomepageFavorites_Expecter) AddTag(ctx any, name any, color any) *MockHomepageFavorites_AddTag_Call { | |||
| 943 | + | return &MockHomepageFavorites_AddTag_Call{Call: _e.mock.On("AddTag", ctx, name, color)} | |||
| 944 | + | } | |||
| 945 | + | ||||
| 946 | + | func (_c *MockHomepageFavorites_AddTag_Call) Run(run func(ctx context.Context, name string, color string)) *MockHomepageFavorites_AddTag_Call { | |||
| 947 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 948 | + | var arg0 context.Context | |||
| 949 | + | if args[0] != nil { | |||
| 950 | + | arg0 = args[0].(context.Context) | |||
| 951 | + | } | |||
| 952 | + | var arg1 string | |||
| 953 | + | if args[1] != nil { | |||
| 954 | + | arg1 = args[1].(string) | |||
| 955 | + | } | |||
| 956 | + | var arg2 string | |||
| 957 | + | if args[2] != nil { | |||
| 958 | + | arg2 = args[2].(string) | |||
| 959 | + | } | |||
| 960 | + | run( | |||
| 961 | + | arg0, | |||
| 962 | + | arg1, | |||
| 963 | + | arg2, | |||
| 964 | + | ) | |||
| 965 | + | }) | |||
| 966 | + | return _c | |||
| 967 | + | } | |||
| 968 | + | ||||
| 969 | + | func (_c *MockHomepageFavorites_AddTag_Call) Return(tag *entity.Tag, err error) *MockHomepageFavorites_AddTag_Call { | |||
| 970 | + | _c.Call.Return(tag, err) | |||
| 971 | + | return _c | |||
| 972 | + | } | |||
| 973 | + | ||||
| 974 | + | func (_c *MockHomepageFavorites_AddTag_Call) RunAndReturn(run func(ctx context.Context, name string, color string) (*entity.Tag, error)) *MockHomepageFavorites_AddTag_Call { | |||
| 975 | + | _c.Call.Return(run) | |||
| 976 | + | return _c | |||
| 977 | + | } | |||
| 978 | + | ||||
| 979 | + | // CreateFolder provides a mock function for the type MockHomepageFavorites | |||
| 980 | + | func (_mock *MockHomepageFavorites) CreateFolder(ctx context.Context, name string, icon string, parentID *entity.FolderID) (*entity.Folder, error) { | |||
| 981 | + | ret := _mock.Called(ctx, name, icon, parentID) | |||
| 982 | + | ||||
| 983 | + | if len(ret) == 0 { | |||
| 984 | + | panic("no return value specified for CreateFolder") | |||
| 985 | + | } | |||
| 986 | + | ||||
| 987 | + | var r0 *entity.Folder | |||
| 988 | + | var r1 error | |||
| 989 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, *entity.FolderID) (*entity.Folder, error)); ok { | |||
| 990 | + | return returnFunc(ctx, name, icon, parentID) | |||
| 991 | + | } | |||
| 992 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, *entity.FolderID) *entity.Folder); ok { | |||
| 993 | + | r0 = returnFunc(ctx, name, icon, parentID) | |||
| 994 | + | } else { | |||
| 995 | + | if ret.Get(0) != nil { | |||
| 996 | + | r0 = ret.Get(0).(*entity.Folder) | |||
| 997 | + | } | |||
| 998 | + | } | |||
| 999 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, *entity.FolderID) error); ok { | |||
| 1000 | + | r1 = returnFunc(ctx, name, icon, parentID) | |||
| 1001 | + | } else { | |||
| 1002 | + | r1 = ret.Error(1) | |||
| 1003 | + | } | |||
| 1004 | + | return r0, r1 | |||
| 1005 | + | } | |||
| 1006 | + | ||||
| 1007 | + | // MockHomepageFavorites_CreateFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateFolder' | |||
| 1008 | + | type MockHomepageFavorites_CreateFolder_Call struct { | |||
| 1009 | + | *mock.Call | |||
| 1010 | + | } | |||
| 1011 | + | ||||
| 1012 | + | // CreateFolder is a helper method to define mock.On call | |||
| 1013 | + | // - ctx context.Context | |||
| 1014 | + | // - name string | |||
| 1015 | + | // - icon string | |||
| 1016 | + | // - parentID *entity.FolderID | |||
| 1017 | + | func (_e *MockHomepageFavorites_Expecter) CreateFolder(ctx any, name any, icon any, parentID any) *MockHomepageFavorites_CreateFolder_Call { | |||
| 1018 | + | return &MockHomepageFavorites_CreateFolder_Call{Call: _e.mock.On("CreateFolder", ctx, name, icon, parentID)} | |||
| 1019 | + | } | |||
| 1020 | + | ||||
| 1021 | + | func (_c *MockHomepageFavorites_CreateFolder_Call) Run(run func(ctx context.Context, name string, icon string, parentID *entity.FolderID)) *MockHomepageFavorites_CreateFolder_Call { | |||
| 1022 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1023 | + | var arg0 context.Context | |||
| 1024 | + | if args[0] != nil { | |||
| 1025 | + | arg0 = args[0].(context.Context) | |||
| 1026 | + | } | |||
| 1027 | + | var arg1 string | |||
| 1028 | + | if args[1] != nil { | |||
| 1029 | + | arg1 = args[1].(string) | |||
| 1030 | + | } | |||
| 1031 | + | var arg2 string | |||
| 1032 | + | if args[2] != nil { | |||
| 1033 | + | arg2 = args[2].(string) | |||
| 1034 | + | } | |||
| 1035 | + | var arg3 *entity.FolderID | |||
| 1036 | + | if args[3] != nil { | |||
| 1037 | + | arg3 = args[3].(*entity.FolderID) | |||
| 1038 | + | } | |||
| 1039 | + | run( | |||
| 1040 | + | arg0, | |||
| 1041 | + | arg1, | |||
| 1042 | + | arg2, | |||
| 1043 | + | arg3, | |||
| 1044 | + | ) | |||
| 1045 | + | }) | |||
| 1046 | + | return _c | |||
| 1047 | + | } | |||
| 1048 | + | ||||
| 1049 | + | func (_c *MockHomepageFavorites_CreateFolder_Call) Return(folder *entity.Folder, err error) *MockHomepageFavorites_CreateFolder_Call { | |||
| 1050 | + | _c.Call.Return(folder, err) | |||
| 1051 | + | return _c | |||
| 1052 | + | } | |||
| 1053 | + | ||||
| 1054 | + | func (_c *MockHomepageFavorites_CreateFolder_Call) RunAndReturn(run func(ctx context.Context, name string, icon string, parentID *entity.FolderID) (*entity.Folder, error)) *MockHomepageFavorites_CreateFolder_Call { | |||
| 1055 | + | _c.Call.Return(run) | |||
| 1056 | + | return _c | |||
| 1057 | + | } | |||
| 1058 | + | ||||
| 1059 | + | // DeleteFavorite provides a mock function for the type MockHomepageFavorites | |||
| 1060 | + | func (_mock *MockHomepageFavorites) DeleteFavorite(ctx context.Context, id entity.FavoriteID) error { | |||
| 1061 | + | ret := _mock.Called(ctx, id) | |||
| 1062 | + | ||||
| 1063 | + | if len(ret) == 0 { | |||
| 1064 | + | panic("no return value specified for DeleteFavorite") | |||
| 1065 | + | } | |||
| 1066 | + | ||||
| 1067 | + | var r0 error | |||
| 1068 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok { | |||
| 1069 | + | r0 = returnFunc(ctx, id) | |||
| 1070 | + | } else { | |||
| 1071 | + | r0 = ret.Error(0) | |||
| 1072 | + | } | |||
| 1073 | + | return r0 | |||
| 1074 | + | } | |||
| 1075 | + | ||||
| 1076 | + | // MockHomepageFavorites_DeleteFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFavorite' | |||
| 1077 | + | type MockHomepageFavorites_DeleteFavorite_Call struct { | |||
| 1078 | + | *mock.Call | |||
| 1079 | + | } | |||
| 1080 | + | ||||
| 1081 | + | // DeleteFavorite is a helper method to define mock.On call | |||
| 1082 | + | // - ctx context.Context | |||
| 1083 | + | // - id entity.FavoriteID | |||
| 1084 | + | func (_e *MockHomepageFavorites_Expecter) DeleteFavorite(ctx any, id any) *MockHomepageFavorites_DeleteFavorite_Call { | |||
| 1085 | + | return &MockHomepageFavorites_DeleteFavorite_Call{Call: _e.mock.On("DeleteFavorite", ctx, id)} | |||
| 1086 | + | } | |||
| 1087 | + | ||||
| 1088 | + | func (_c *MockHomepageFavorites_DeleteFavorite_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockHomepageFavorites_DeleteFavorite_Call { | |||
| 1089 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1090 | + | var arg0 context.Context | |||
| 1091 | + | if args[0] != nil { | |||
| 1092 | + | arg0 = args[0].(context.Context) | |||
| 1093 | + | } | |||
| 1094 | + | var arg1 entity.FavoriteID | |||
| 1095 | + | if args[1] != nil { | |||
| 1096 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 1097 | + | } | |||
| 1098 | + | run( | |||
| 1099 | + | arg0, | |||
| 1100 | + | arg1, | |||
| 1101 | + | ) | |||
| 1102 | + | }) | |||
| 1103 | + | return _c | |||
| 1104 | + | } | |||
| 1105 | + | ||||
| 1106 | + | func (_c *MockHomepageFavorites_DeleteFavorite_Call) Return(err error) *MockHomepageFavorites_DeleteFavorite_Call { | |||
| 1107 | + | _c.Call.Return(err) | |||
| 1108 | + | return _c | |||
| 1109 | + | } | |||
| 1110 | + | ||||
| 1111 | + | func (_c *MockHomepageFavorites_DeleteFavorite_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockHomepageFavorites_DeleteFavorite_Call { | |||
| 1112 | + | _c.Call.Return(run) | |||
| 1113 | + | return _c | |||
| 1114 | + | } | |||
| 1115 | + | ||||
| 1116 | + | // DeleteFolder provides a mock function for the type MockHomepageFavorites | |||
| 1117 | + | func (_mock *MockHomepageFavorites) DeleteFolder(ctx context.Context, id entity.FolderID) error { | |||
| 1118 | + | ret := _mock.Called(ctx, id) | |||
| 1119 | + | ||||
| 1120 | + | if len(ret) == 0 { | |||
| 1121 | + | panic("no return value specified for DeleteFolder") | |||
| 1122 | + | } | |||
| 1123 | + | ||||
| 1124 | + | var r0 error | |||
| 1125 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok { | |||
| 1126 | + | r0 = returnFunc(ctx, id) | |||
| 1127 | + | } else { | |||
| 1128 | + | r0 = ret.Error(0) | |||
| 1129 | + | } | |||
| 1130 | + | return r0 | |||
| 1131 | + | } | |||
| 1132 | + | ||||
| 1133 | + | // MockHomepageFavorites_DeleteFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFolder' | |||
| 1134 | + | type MockHomepageFavorites_DeleteFolder_Call struct { | |||
| 1135 | + | *mock.Call | |||
| 1136 | + | } | |||
| 1137 | + | ||||
| 1138 | + | // DeleteFolder is a helper method to define mock.On call | |||
| 1139 | + | // - ctx context.Context | |||
| 1140 | + | // - id entity.FolderID | |||
| 1141 | + | func (_e *MockHomepageFavorites_Expecter) DeleteFolder(ctx any, id any) *MockHomepageFavorites_DeleteFolder_Call { | |||
| 1142 | + | return &MockHomepageFavorites_DeleteFolder_Call{Call: _e.mock.On("DeleteFolder", ctx, id)} | |||
| 1143 | + | } | |||
| 1144 | + | ||||
| 1145 | + | func (_c *MockHomepageFavorites_DeleteFolder_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockHomepageFavorites_DeleteFolder_Call { | |||
| 1146 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1147 | + | var arg0 context.Context | |||
| 1148 | + | if args[0] != nil { | |||
| 1149 | + | arg0 = args[0].(context.Context) | |||
| 1150 | + | } | |||
| 1151 | + | var arg1 entity.FolderID | |||
| 1152 | + | if args[1] != nil { | |||
| 1153 | + | arg1 = args[1].(entity.FolderID) | |||
| 1154 | + | } | |||
| 1155 | + | run( | |||
| 1156 | + | arg0, | |||
| 1157 | + | arg1, | |||
| 1158 | + | ) | |||
| 1159 | + | }) | |||
| 1160 | + | return _c | |||
| 1161 | + | } | |||
| 1162 | + | ||||
| 1163 | + | func (_c *MockHomepageFavorites_DeleteFolder_Call) Return(err error) *MockHomepageFavorites_DeleteFolder_Call { | |||
| 1164 | + | _c.Call.Return(err) | |||
| 1165 | + | return _c | |||
| 1166 | + | } | |||
| 1167 | + | ||||
| 1168 | + | func (_c *MockHomepageFavorites_DeleteFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockHomepageFavorites_DeleteFolder_Call { | |||
| 1169 | + | _c.Call.Return(run) | |||
| 1170 | + | return _c | |||
| 1171 | + | } | |||
| 1172 | + | ||||
| 1173 | + | // DeleteTag provides a mock function for the type MockHomepageFavorites | |||
| 1174 | + | func (_mock *MockHomepageFavorites) DeleteTag(ctx context.Context, id entity.TagID) error { | |||
| 1175 | + | ret := _mock.Called(ctx, id) | |||
| 1176 | + | ||||
| 1177 | + | if len(ret) == 0 { | |||
| 1178 | + | panic("no return value specified for DeleteTag") | |||
| 1179 | + | } | |||
| 1180 | + | ||||
| 1181 | + | var r0 error | |||
| 1182 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok { | |||
| 1183 | + | r0 = returnFunc(ctx, id) | |||
| 1184 | + | } else { | |||
| 1185 | + | r0 = ret.Error(0) | |||
| 1186 | + | } | |||
| 1187 | + | return r0 | |||
| 1188 | + | } | |||
| 1189 | + | ||||
| 1190 | + | // MockHomepageFavorites_DeleteTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTag' | |||
| 1191 | + | type MockHomepageFavorites_DeleteTag_Call struct { | |||
| 1192 | + | *mock.Call | |||
| 1193 | + | } | |||
| 1194 | + | ||||
| 1195 | + | // DeleteTag is a helper method to define mock.On call | |||
| 1196 | + | // - ctx context.Context | |||
| 1197 | + | // - id entity.TagID | |||
| 1198 | + | func (_e *MockHomepageFavorites_Expecter) DeleteTag(ctx any, id any) *MockHomepageFavorites_DeleteTag_Call { | |||
| 1199 | + | return &MockHomepageFavorites_DeleteTag_Call{Call: _e.mock.On("DeleteTag", ctx, id)} | |||
| 1200 | + | } | |||
| 1201 | + | ||||
| 1202 | + | func (_c *MockHomepageFavorites_DeleteTag_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockHomepageFavorites_DeleteTag_Call { | |||
| 1203 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1204 | + | var arg0 context.Context | |||
| 1205 | + | if args[0] != nil { | |||
| 1206 | + | arg0 = args[0].(context.Context) | |||
| 1207 | + | } | |||
| 1208 | + | var arg1 entity.TagID | |||
| 1209 | + | if args[1] != nil { | |||
| 1210 | + | arg1 = args[1].(entity.TagID) | |||
| 1211 | + | } | |||
| 1212 | + | run( | |||
| 1213 | + | arg0, | |||
| 1214 | + | arg1, | |||
| 1215 | + | ) | |||
| 1216 | + | }) | |||
| 1217 | + | return _c | |||
| 1218 | + | } | |||
| 1219 | + | ||||
| 1220 | + | func (_c *MockHomepageFavorites_DeleteTag_Call) Return(err error) *MockHomepageFavorites_DeleteTag_Call { | |||
| 1221 | + | _c.Call.Return(err) | |||
| 1222 | + | return _c | |||
| 1223 | + | } | |||
| 1224 | + | ||||
| 1225 | + | func (_c *MockHomepageFavorites_DeleteTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockHomepageFavorites_DeleteTag_Call { | |||
| 1226 | + | _c.Call.Return(run) | |||
| 1227 | + | return _c | |||
| 1228 | + | } | |||
| 1229 | + | ||||
| 1230 | + | // GetAll provides a mock function for the type MockHomepageFavorites | |||
| 1231 | + | func (_mock *MockHomepageFavorites) GetAll(ctx context.Context) ([]*entity.Favorite, error) { | |||
| 1232 | + | ret := _mock.Called(ctx) | |||
| 1233 | + | ||||
| 1234 | + | if len(ret) == 0 { | |||
| 1235 | + | panic("no return value specified for GetAll") | |||
| 1236 | + | } | |||
| 1237 | + | ||||
| 1238 | + | var r0 []*entity.Favorite | |||
| 1239 | + | var r1 error | |||
| 1240 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok { | |||
| 1241 | + | return returnFunc(ctx) | |||
| 1242 | + | } | |||
| 1243 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok { | |||
| 1244 | + | r0 = returnFunc(ctx) | |||
| 1245 | + | } else { | |||
| 1246 | + | if ret.Get(0) != nil { | |||
| 1247 | + | r0 = ret.Get(0).([]*entity.Favorite) | |||
| 1248 | + | } | |||
| 1249 | + | } | |||
| 1250 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1251 | + | r1 = returnFunc(ctx) | |||
| 1252 | + | } else { | |||
| 1253 | + | r1 = ret.Error(1) | |||
| 1254 | + | } | |||
| 1255 | + | return r0, r1 | |||
| 1256 | + | } | |||
| 1257 | + | ||||
| 1258 | + | // MockHomepageFavorites_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' | |||
| 1259 | + | type MockHomepageFavorites_GetAll_Call struct { | |||
| 1260 | + | *mock.Call | |||
| 1261 | + | } | |||
| 1262 | + | ||||
| 1263 | + | // GetAll is a helper method to define mock.On call | |||
| 1264 | + | // - ctx context.Context | |||
| 1265 | + | func (_e *MockHomepageFavorites_Expecter) GetAll(ctx any) *MockHomepageFavorites_GetAll_Call { | |||
| 1266 | + | return &MockHomepageFavorites_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} | |||
| 1267 | + | } | |||
| 1268 | + | ||||
| 1269 | + | func (_c *MockHomepageFavorites_GetAll_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAll_Call { | |||
| 1270 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1271 | + | var arg0 context.Context | |||
| 1272 | + | if args[0] != nil { | |||
| 1273 | + | arg0 = args[0].(context.Context) | |||
| 1274 | + | } | |||
| 1275 | + | run( | |||
| 1276 | + | arg0, | |||
| 1277 | + | ) | |||
| 1278 | + | }) | |||
| 1279 | + | return _c | |||
| 1280 | + | } | |||
| 1281 | + | ||||
| 1282 | + | func (_c *MockHomepageFavorites_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockHomepageFavorites_GetAll_Call { | |||
| 1283 | + | _c.Call.Return(favorites, err) | |||
| 1284 | + | return _c | |||
| 1285 | + | } | |||
| 1286 | + | ||||
| 1287 | + | func (_c *MockHomepageFavorites_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockHomepageFavorites_GetAll_Call { | |||
| 1288 | + | _c.Call.Return(run) | |||
| 1289 | + | return _c | |||
| 1290 | + | } | |||
| 1291 | + | ||||
| 1292 | + | // GetAllFolders provides a mock function for the type MockHomepageFavorites | |||
| 1293 | + | func (_mock *MockHomepageFavorites) GetAllFolders(ctx context.Context) ([]*entity.Folder, error) { | |||
| 1294 | + | ret := _mock.Called(ctx) | |||
| 1295 | + | ||||
| 1296 | + | if len(ret) == 0 { | |||
| 1297 | + | panic("no return value specified for GetAllFolders") | |||
| 1298 | + | } | |||
| 1299 | + | ||||
| 1300 | + | var r0 []*entity.Folder | |||
| 1301 | + | var r1 error | |||
| 1302 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok { | |||
| 1303 | + | return returnFunc(ctx) | |||
| 1304 | + | } | |||
| 1305 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok { | |||
| 1306 | + | r0 = returnFunc(ctx) | |||
| 1307 | + | } else { | |||
| 1308 | + | if ret.Get(0) != nil { | |||
| 1309 | + | r0 = ret.Get(0).([]*entity.Folder) | |||
| 1310 | + | } | |||
| 1311 | + | } | |||
| 1312 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1313 | + | r1 = returnFunc(ctx) | |||
| 1314 | + | } else { | |||
| 1315 | + | r1 = ret.Error(1) | |||
| 1316 | + | } | |||
| 1317 | + | return r0, r1 | |||
| 1318 | + | } | |||
| 1319 | + | ||||
| 1320 | + | // MockHomepageFavorites_GetAllFolders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllFolders' | |||
| 1321 | + | type MockHomepageFavorites_GetAllFolders_Call struct { | |||
| 1322 | + | *mock.Call | |||
| 1323 | + | } | |||
| 1324 | + | ||||
| 1325 | + | // GetAllFolders is a helper method to define mock.On call | |||
| 1326 | + | // - ctx context.Context | |||
| 1327 | + | func (_e *MockHomepageFavorites_Expecter) GetAllFolders(ctx any) *MockHomepageFavorites_GetAllFolders_Call { | |||
| 1328 | + | return &MockHomepageFavorites_GetAllFolders_Call{Call: _e.mock.On("GetAllFolders", ctx)} | |||
| 1329 | + | } | |||
| 1330 | + | ||||
| 1331 | + | func (_c *MockHomepageFavorites_GetAllFolders_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllFolders_Call { | |||
| 1332 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1333 | + | var arg0 context.Context | |||
| 1334 | + | if args[0] != nil { | |||
| 1335 | + | arg0 = args[0].(context.Context) | |||
| 1336 | + | } | |||
| 1337 | + | run( | |||
| 1338 | + | arg0, | |||
| 1339 | + | ) | |||
| 1340 | + | }) | |||
| 1341 | + | return _c | |||
| 1342 | + | } | |||
| 1343 | + | ||||
| 1344 | + | func (_c *MockHomepageFavorites_GetAllFolders_Call) Return(folders []*entity.Folder, err error) *MockHomepageFavorites_GetAllFolders_Call { | |||
| 1345 | + | _c.Call.Return(folders, err) | |||
| 1346 | + | return _c | |||
| 1347 | + | } | |||
| 1348 | + | ||||
| 1349 | + | func (_c *MockHomepageFavorites_GetAllFolders_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockHomepageFavorites_GetAllFolders_Call { | |||
| 1350 | + | _c.Call.Return(run) | |||
| 1351 | + | return _c | |||
| 1352 | + | } | |||
| 1353 | + | ||||
| 1354 | + | // GetAllTags provides a mock function for the type MockHomepageFavorites | |||
| 1355 | + | func (_mock *MockHomepageFavorites) GetAllTags(ctx context.Context) ([]*entity.Tag, error) { | |||
| 1356 | + | ret := _mock.Called(ctx) | |||
| 1357 | + | ||||
| 1358 | + | if len(ret) == 0 { | |||
| 1359 | + | panic("no return value specified for GetAllTags") | |||
| 1360 | + | } | |||
| 1361 | + | ||||
| 1362 | + | var r0 []*entity.Tag | |||
| 1363 | + | var r1 error | |||
| 1364 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok { | |||
| 1365 | + | return returnFunc(ctx) | |||
| 1366 | + | } | |||
| 1367 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok { | |||
| 1368 | + | r0 = returnFunc(ctx) | |||
| 1369 | + | } else { | |||
| 1370 | + | if ret.Get(0) != nil { | |||
| 1371 | + | r0 = ret.Get(0).([]*entity.Tag) | |||
| 1372 | + | } | |||
| 1373 | + | } | |||
| 1374 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1375 | + | r1 = returnFunc(ctx) | |||
| 1376 | + | } else { | |||
| 1377 | + | r1 = ret.Error(1) | |||
| 1378 | + | } | |||
| 1379 | + | return r0, r1 | |||
| 1380 | + | } | |||
| 1381 | + | ||||
| 1382 | + | // MockHomepageFavorites_GetAllTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllTags' | |||
| 1383 | + | type MockHomepageFavorites_GetAllTags_Call struct { | |||
| 1384 | + | *mock.Call | |||
| 1385 | + | } | |||
| 1386 | + | ||||
| 1387 | + | // GetAllTags is a helper method to define mock.On call | |||
| 1388 | + | // - ctx context.Context | |||
| 1389 | + | func (_e *MockHomepageFavorites_Expecter) GetAllTags(ctx any) *MockHomepageFavorites_GetAllTags_Call { | |||
| 1390 | + | return &MockHomepageFavorites_GetAllTags_Call{Call: _e.mock.On("GetAllTags", ctx)} | |||
| 1391 | + | } | |||
| 1392 | + | ||||
| 1393 | + | func (_c *MockHomepageFavorites_GetAllTags_Call) Run(run func(ctx context.Context)) *MockHomepageFavorites_GetAllTags_Call { | |||
| 1394 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1395 | + | var arg0 context.Context | |||
| 1396 | + | if args[0] != nil { | |||
| 1397 | + | arg0 = args[0].(context.Context) | |||
| 1398 | + | } | |||
| 1399 | + | run( | |||
| 1400 | + | arg0, | |||
| 1401 | + | ) | |||
| 1402 | + | }) | |||
| 1403 | + | return _c | |||
| 1404 | + | } | |||
| 1405 | + | ||||
| 1406 | + | func (_c *MockHomepageFavorites_GetAllTags_Call) Return(tags []*entity.Tag, err error) *MockHomepageFavorites_GetAllTags_Call { | |||
| 1407 | + | _c.Call.Return(tags, err) | |||
| 1408 | + | return _c | |||
| 1409 | + | } | |||
| 1410 | + | ||||
| 1411 | + | func (_c *MockHomepageFavorites_GetAllTags_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockHomepageFavorites_GetAllTags_Call { | |||
| 1412 | + | _c.Call.Return(run) | |||
| 1413 | + | return _c | |||
| 1414 | + | } | |||
| 1415 | + | ||||
| 1416 | + | // GetByShortcut provides a mock function for the type MockHomepageFavorites | |||
| 1417 | + | func (_mock *MockHomepageFavorites) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) { | |||
| 1418 | + | ret := _mock.Called(ctx, key) | |||
| 1419 | + | ||||
| 1420 | + | if len(ret) == 0 { | |||
| 1421 | + | panic("no return value specified for GetByShortcut") | |||
| 1422 | + | } | |||
| 1423 | + | ||||
| 1424 | + | var r0 *entity.Favorite | |||
| 1425 | + | var r1 error | |||
| 1426 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok { | |||
| 1427 | + | return returnFunc(ctx, key) | |||
| 1428 | + | } | |||
| 1429 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok { | |||
| 1430 | + | r0 = returnFunc(ctx, key) | |||
| 1431 | + | } else { | |||
| 1432 | + | if ret.Get(0) != nil { | |||
| 1433 | + | r0 = ret.Get(0).(*entity.Favorite) | |||
| 1434 | + | } | |||
| 1435 | + | } | |||
| 1436 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 1437 | + | r1 = returnFunc(ctx, key) | |||
| 1438 | + | } else { | |||
| 1439 | + | r1 = ret.Error(1) | |||
| 1440 | + | } | |||
| 1441 | + | return r0, r1 | |||
| 1442 | + | } | |||
| 1443 | + | ||||
| 1444 | + | // MockHomepageFavorites_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut' | |||
| 1445 | + | type MockHomepageFavorites_GetByShortcut_Call struct { | |||
| 1446 | + | *mock.Call | |||
| 1447 | + | } | |||
| 1448 | + | ||||
| 1449 | + | // GetByShortcut is a helper method to define mock.On call | |||
| 1450 | + | // - ctx context.Context | |||
| 1451 | + | // - key int | |||
| 1452 | + | func (_e *MockHomepageFavorites_Expecter) GetByShortcut(ctx any, key any) *MockHomepageFavorites_GetByShortcut_Call { | |||
| 1453 | + | return &MockHomepageFavorites_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)} | |||
| 1454 | + | } | |||
| 1455 | + | ||||
| 1456 | + | func (_c *MockHomepageFavorites_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockHomepageFavorites_GetByShortcut_Call { | |||
| 1457 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1458 | + | var arg0 context.Context | |||
| 1459 | + | if args[0] != nil { | |||
| 1460 | + | arg0 = args[0].(context.Context) | |||
| 1461 | + | } | |||
| 1462 | + | var arg1 int | |||
| 1463 | + | if args[1] != nil { | |||
| 1464 | + | arg1 = args[1].(int) | |||
| 1465 | + | } | |||
| 1466 | + | run( | |||
| 1467 | + | arg0, | |||
| 1468 | + | arg1, | |||
| 1469 | + | ) | |||
| 1470 | + | }) | |||
| 1471 | + | return _c | |||
| 1472 | + | } | |||
| 1473 | + | ||||
| 1474 | + | func (_c *MockHomepageFavorites_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_GetByShortcut_Call { | |||
| 1475 | + | _c.Call.Return(favorite, err) | |||
| 1476 | + | return _c | |||
| 1477 | + | } | |||
| 1478 | + | ||||
| 1479 | + | func (_c *MockHomepageFavorites_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockHomepageFavorites_GetByShortcut_Call { | |||
| 1480 | + | _c.Call.Return(run) | |||
| 1481 | + | return _c | |||
| 1482 | + | } | |||
| 1483 | + | ||||
| 1484 | + | // Move provides a mock function for the type MockHomepageFavorites | |||
| 1485 | + | func (_mock *MockHomepageFavorites) Move(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error { | |||
| 1486 | + | ret := _mock.Called(ctx, id, folderID) | |||
| 1487 | + | ||||
| 1488 | + | if len(ret) == 0 { | |||
| 1489 | + | panic("no return value specified for Move") | |||
| 1490 | + | } | |||
| 1491 | + | ||||
| 1492 | + | var r0 error | |||
| 1493 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok { | |||
| 1494 | + | r0 = returnFunc(ctx, id, folderID) | |||
| 1495 | + | } else { | |||
| 1496 | + | r0 = ret.Error(0) | |||
| 1497 | + | } | |||
| 1498 | + | return r0 | |||
| 1499 | + | } | |||
| 1500 | + | ||||
| 1501 | + | // MockHomepageFavorites_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move' | |||
| 1502 | + | type MockHomepageFavorites_Move_Call struct { | |||
| 1503 | + | *mock.Call | |||
| 1504 | + | } | |||
| 1505 | + | ||||
| 1506 | + | // Move is a helper method to define mock.On call | |||
| 1507 | + | // - ctx context.Context | |||
| 1508 | + | // - id entity.FavoriteID | |||
| 1509 | + | // - folderID *entity.FolderID | |||
| 1510 | + | func (_e *MockHomepageFavorites_Expecter) Move(ctx any, id any, folderID any) *MockHomepageFavorites_Move_Call { | |||
| 1511 | + | return &MockHomepageFavorites_Move_Call{Call: _e.mock.On("Move", ctx, id, folderID)} | |||
| 1512 | + | } | |||
| 1513 | + | ||||
| 1514 | + | func (_c *MockHomepageFavorites_Move_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockHomepageFavorites_Move_Call { | |||
| 1515 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1516 | + | var arg0 context.Context | |||
| 1517 | + | if args[0] != nil { | |||
| 1518 | + | arg0 = args[0].(context.Context) | |||
| 1519 | + | } | |||
| 1520 | + | var arg1 entity.FavoriteID | |||
| 1521 | + | if args[1] != nil { | |||
| 1522 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 1523 | + | } | |||
| 1524 | + | var arg2 *entity.FolderID | |||
| 1525 | + | if args[2] != nil { | |||
| 1526 | + | arg2 = args[2].(*entity.FolderID) | |||
| 1527 | + | } | |||
| 1528 | + | run( | |||
| 1529 | + | arg0, | |||
| 1530 | + | arg1, | |||
| 1531 | + | arg2, | |||
| 1532 | + | ) | |||
| 1533 | + | }) | |||
| 1534 | + | return _c | |||
| 1535 | + | } | |||
| 1536 | + | ||||
| 1537 | + | func (_c *MockHomepageFavorites_Move_Call) Return(err error) *MockHomepageFavorites_Move_Call { | |||
| 1538 | + | _c.Call.Return(err) | |||
| 1539 | + | return _c | |||
| 1540 | + | } | |||
| 1541 | + | ||||
| 1542 | + | func (_c *MockHomepageFavorites_Move_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockHomepageFavorites_Move_Call { | |||
| 1543 | + | _c.Call.Return(run) | |||
| 1544 | + | return _c | |||
| 1545 | + | } | |||
| 1546 | + | ||||
| 1547 | + | // SetShortcut provides a mock function for the type MockHomepageFavorites | |||
| 1548 | + | func (_mock *MockHomepageFavorites) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error { | |||
| 1549 | + | ret := _mock.Called(ctx, id, key) | |||
| 1550 | + | ||||
| 1551 | + | if len(ret) == 0 { | |||
| 1552 | + | panic("no return value specified for SetShortcut") | |||
| 1553 | + | } | |||
| 1554 | + | ||||
| 1555 | + | var r0 error | |||
| 1556 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok { | |||
| 1557 | + | r0 = returnFunc(ctx, id, key) | |||
| 1558 | + | } else { | |||
| 1559 | + | r0 = ret.Error(0) | |||
| 1560 | + | } | |||
| 1561 | + | return r0 | |||
| 1562 | + | } | |||
| 1563 | + | ||||
| 1564 | + | // MockHomepageFavorites_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut' | |||
| 1565 | + | type MockHomepageFavorites_SetShortcut_Call struct { | |||
| 1566 | + | *mock.Call | |||
| 1567 | + | } | |||
| 1568 | + | ||||
| 1569 | + | // SetShortcut is a helper method to define mock.On call | |||
| 1570 | + | // - ctx context.Context | |||
| 1571 | + | // - id entity.FavoriteID | |||
| 1572 | + | // - key *int | |||
| 1573 | + | func (_e *MockHomepageFavorites_Expecter) SetShortcut(ctx any, id any, key any) *MockHomepageFavorites_SetShortcut_Call { | |||
| 1574 | + | return &MockHomepageFavorites_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)} | |||
| 1575 | + | } | |||
| 1576 | + | ||||
| 1577 | + | func (_c *MockHomepageFavorites_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockHomepageFavorites_SetShortcut_Call { | |||
| 1578 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1579 | + | var arg0 context.Context | |||
| 1580 | + | if args[0] != nil { | |||
| 1581 | + | arg0 = args[0].(context.Context) | |||
| 1582 | + | } | |||
| 1583 | + | var arg1 entity.FavoriteID | |||
| 1584 | + | if args[1] != nil { | |||
| 1585 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 1586 | + | } | |||
| 1587 | + | var arg2 *int | |||
| 1588 | + | if args[2] != nil { | |||
| 1589 | + | arg2 = args[2].(*int) | |||
| 1590 | + | } | |||
| 1591 | + | run( | |||
| 1592 | + | arg0, | |||
| 1593 | + | arg1, | |||
| 1594 | + | arg2, | |||
| 1595 | + | ) | |||
| 1596 | + | }) | |||
| 1597 | + | return _c | |||
| 1598 | + | } | |||
| 1599 | + | ||||
| 1600 | + | func (_c *MockHomepageFavorites_SetShortcut_Call) Return(err error) *MockHomepageFavorites_SetShortcut_Call { | |||
| 1601 | + | _c.Call.Return(err) | |||
| 1602 | + | return _c | |||
| 1603 | + | } | |||
| 1604 | + | ||||
| 1605 | + | func (_c *MockHomepageFavorites_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockHomepageFavorites_SetShortcut_Call { | |||
| 1606 | + | _c.Call.Return(run) | |||
| 1607 | + | return _c | |||
| 1608 | + | } | |||
| 1609 | + | ||||
| 1610 | + | // TagFavorite provides a mock function for the type MockHomepageFavorites | |||
| 1611 | + | func (_mock *MockHomepageFavorites) TagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error { | |||
| 1612 | + | ret := _mock.Called(ctx, favID, tagID) | |||
| 1613 | + | ||||
| 1614 | + | if len(ret) == 0 { | |||
| 1615 | + | panic("no return value specified for TagFavorite") | |||
| 1616 | + | } | |||
| 1617 | + | ||||
| 1618 | + | var r0 error | |||
| 1619 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok { | |||
| 1620 | + | r0 = returnFunc(ctx, favID, tagID) | |||
| 1621 | + | } else { | |||
| 1622 | + | r0 = ret.Error(0) | |||
| 1623 | + | } | |||
| 1624 | + | return r0 | |||
| 1625 | + | } | |||
| 1626 | + | ||||
| 1627 | + | // MockHomepageFavorites_TagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TagFavorite' | |||
| 1628 | + | type MockHomepageFavorites_TagFavorite_Call struct { | |||
| 1629 | + | *mock.Call | |||
| 1630 | + | } | |||
| 1631 | + | ||||
| 1632 | + | // TagFavorite is a helper method to define mock.On call | |||
| 1633 | + | // - ctx context.Context | |||
| 1634 | + | // - favID entity.FavoriteID | |||
| 1635 | + | // - tagID entity.TagID | |||
| 1636 | + | func (_e *MockHomepageFavorites_Expecter) TagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_TagFavorite_Call { | |||
| 1637 | + | return &MockHomepageFavorites_TagFavorite_Call{Call: _e.mock.On("TagFavorite", ctx, favID, tagID)} | |||
| 1638 | + | } | |||
| 1639 | + | ||||
| 1640 | + | func (_c *MockHomepageFavorites_TagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_TagFavorite_Call { | |||
| 1641 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1642 | + | var arg0 context.Context | |||
| 1643 | + | if args[0] != nil { | |||
| 1644 | + | arg0 = args[0].(context.Context) | |||
| 1645 | + | } | |||
| 1646 | + | var arg1 entity.FavoriteID | |||
| 1647 | + | if args[1] != nil { | |||
| 1648 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 1649 | + | } | |||
| 1650 | + | var arg2 entity.TagID | |||
| 1651 | + | if args[2] != nil { | |||
| 1652 | + | arg2 = args[2].(entity.TagID) | |||
| 1653 | + | } | |||
| 1654 | + | run( | |||
| 1655 | + | arg0, | |||
| 1656 | + | arg1, | |||
| 1657 | + | arg2, | |||
| 1658 | + | ) | |||
| 1659 | + | }) | |||
| 1660 | + | return _c | |||
| 1661 | + | } | |||
| 1662 | + | ||||
| 1663 | + | func (_c *MockHomepageFavorites_TagFavorite_Call) Return(err error) *MockHomepageFavorites_TagFavorite_Call { | |||
| 1664 | + | _c.Call.Return(err) | |||
| 1665 | + | return _c | |||
| 1666 | + | } | |||
| 1667 | + | ||||
| 1668 | + | func (_c *MockHomepageFavorites_TagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_TagFavorite_Call { | |||
| 1669 | + | _c.Call.Return(run) | |||
| 1670 | + | return _c | |||
| 1671 | + | } | |||
| 1672 | + | ||||
| 1673 | + | // UntagFavorite provides a mock function for the type MockHomepageFavorites | |||
| 1674 | + | func (_mock *MockHomepageFavorites) UntagFavorite(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error { | |||
| 1675 | + | ret := _mock.Called(ctx, favID, tagID) | |||
| 1676 | + | ||||
| 1677 | + | if len(ret) == 0 { | |||
| 1678 | + | panic("no return value specified for UntagFavorite") | |||
| 1679 | + | } | |||
| 1680 | + | ||||
| 1681 | + | var r0 error | |||
| 1682 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, entity.TagID) error); ok { | |||
| 1683 | + | r0 = returnFunc(ctx, favID, tagID) | |||
| 1684 | + | } else { | |||
| 1685 | + | r0 = ret.Error(0) | |||
| 1686 | + | } | |||
| 1687 | + | return r0 | |||
| 1688 | + | } | |||
| 1689 | + | ||||
| 1690 | + | // MockHomepageFavorites_UntagFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UntagFavorite' | |||
| 1691 | + | type MockHomepageFavorites_UntagFavorite_Call struct { | |||
| 1692 | + | *mock.Call | |||
| 1693 | + | } | |||
| 1694 | + | ||||
| 1695 | + | // UntagFavorite is a helper method to define mock.On call | |||
| 1696 | + | // - ctx context.Context | |||
| 1697 | + | // - favID entity.FavoriteID | |||
| 1698 | + | // - tagID entity.TagID | |||
| 1699 | + | func (_e *MockHomepageFavorites_Expecter) UntagFavorite(ctx any, favID any, tagID any) *MockHomepageFavorites_UntagFavorite_Call { | |||
| 1700 | + | return &MockHomepageFavorites_UntagFavorite_Call{Call: _e.mock.On("UntagFavorite", ctx, favID, tagID)} | |||
| 1701 | + | } | |||
| 1702 | + | ||||
| 1703 | + | func (_c *MockHomepageFavorites_UntagFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID)) *MockHomepageFavorites_UntagFavorite_Call { | |||
| 1704 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1705 | + | var arg0 context.Context | |||
| 1706 | + | if args[0] != nil { | |||
| 1707 | + | arg0 = args[0].(context.Context) | |||
| 1708 | + | } | |||
| 1709 | + | var arg1 entity.FavoriteID | |||
| 1710 | + | if args[1] != nil { | |||
| 1711 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 1712 | + | } | |||
| 1713 | + | var arg2 entity.TagID | |||
| 1714 | + | if args[2] != nil { | |||
| 1715 | + | arg2 = args[2].(entity.TagID) | |||
| 1716 | + | } | |||
| 1717 | + | run( | |||
| 1718 | + | arg0, | |||
| 1719 | + | arg1, | |||
| 1720 | + | arg2, | |||
| 1721 | + | ) | |||
| 1722 | + | }) | |||
| 1723 | + | return _c | |||
| 1724 | + | } | |||
| 1725 | + | ||||
| 1726 | + | func (_c *MockHomepageFavorites_UntagFavorite_Call) Return(err error) *MockHomepageFavorites_UntagFavorite_Call { | |||
| 1727 | + | _c.Call.Return(err) | |||
| 1728 | + | return _c | |||
| 1729 | + | } | |||
| 1730 | + | ||||
| 1731 | + | func (_c *MockHomepageFavorites_UntagFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID, tagID entity.TagID) error) *MockHomepageFavorites_UntagFavorite_Call { | |||
| 1732 | + | _c.Call.Return(run) | |||
| 1733 | + | return _c | |||
| 1734 | + | } | |||
| 1735 | + | ||||
| 1736 | + | // UpdateFavorite provides a mock function for the type MockHomepageFavorites | |||
| 1737 | + | func (_mock *MockHomepageFavorites) UpdateFavorite(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error) { | |||
| 1738 | + | ret := _mock.Called(ctx, input) | |||
| 1739 | + | ||||
| 1740 | + | if len(ret) == 0 { | |||
| 1741 | + | panic("no return value specified for UpdateFavorite") | |||
| 1742 | + | } | |||
| 1743 | + | ||||
| 1744 | + | var r0 *entity.Favorite | |||
| 1745 | + | var r1 error | |||
| 1746 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) (*entity.Favorite, error)); ok { | |||
| 1747 | + | return returnFunc(ctx, input) | |||
| 1748 | + | } | |||
| 1749 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.FavoriteUpdateInput) *entity.Favorite); ok { | |||
| 1750 | + | r0 = returnFunc(ctx, input) | |||
| 1751 | + | } else { | |||
| 1752 | + | if ret.Get(0) != nil { | |||
| 1753 | + | r0 = ret.Get(0).(*entity.Favorite) | |||
| 1754 | + | } | |||
| 1755 | + | } | |||
| 1756 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, dto.FavoriteUpdateInput) error); ok { | |||
| 1757 | + | r1 = returnFunc(ctx, input) | |||
| 1758 | + | } else { | |||
| 1759 | + | r1 = ret.Error(1) | |||
| 1760 | + | } | |||
| 1761 | + | return r0, r1 | |||
| 1762 | + | } | |||
| 1763 | + | ||||
| 1764 | + | // MockHomepageFavorites_UpdateFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFavorite' | |||
| 1765 | + | type MockHomepageFavorites_UpdateFavorite_Call struct { | |||
| 1766 | + | *mock.Call | |||
| 1767 | + | } | |||
| 1768 | + | ||||
| 1769 | + | // UpdateFavorite is a helper method to define mock.On call | |||
| 1770 | + | // - ctx context.Context | |||
| 1771 | + | // - input dto.FavoriteUpdateInput | |||
| 1772 | + | func (_e *MockHomepageFavorites_Expecter) UpdateFavorite(ctx any, input any) *MockHomepageFavorites_UpdateFavorite_Call { | |||
| 1773 | + | return &MockHomepageFavorites_UpdateFavorite_Call{Call: _e.mock.On("UpdateFavorite", ctx, input)} | |||
| 1774 | + | } | |||
| 1775 | + | ||||
| 1776 | + | func (_c *MockHomepageFavorites_UpdateFavorite_Call) Run(run func(ctx context.Context, input dto.FavoriteUpdateInput)) *MockHomepageFavorites_UpdateFavorite_Call { | |||
| 1777 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1778 | + | var arg0 context.Context | |||
| 1779 | + | if args[0] != nil { | |||
| 1780 | + | arg0 = args[0].(context.Context) | |||
| 1781 | + | } | |||
| 1782 | + | var arg1 dto.FavoriteUpdateInput | |||
| 1783 | + | if args[1] != nil { | |||
| 1784 | + | arg1 = args[1].(dto.FavoriteUpdateInput) | |||
| 1785 | + | } | |||
| 1786 | + | run( | |||
| 1787 | + | arg0, | |||
| 1788 | + | arg1, | |||
| 1789 | + | ) | |||
| 1790 | + | }) | |||
| 1791 | + | return _c | |||
| 1792 | + | } | |||
| 1793 | + | ||||
| 1794 | + | func (_c *MockHomepageFavorites_UpdateFavorite_Call) Return(favorite *entity.Favorite, err error) *MockHomepageFavorites_UpdateFavorite_Call { | |||
| 1795 | + | _c.Call.Return(favorite, err) | |||
| 1796 | + | return _c | |||
| 1797 | + | } | |||
| 1798 | + | ||||
| 1799 | + | func (_c *MockHomepageFavorites_UpdateFavorite_Call) RunAndReturn(run func(ctx context.Context, input dto.FavoriteUpdateInput) (*entity.Favorite, error)) *MockHomepageFavorites_UpdateFavorite_Call { | |||
| 1800 | + | _c.Call.Return(run) | |||
| 1801 | + | return _c | |||
| 1802 | + | } | |||
| 1803 | + | ||||
| 1804 | + | // UpdateFolder provides a mock function for the type MockHomepageFavorites | |||
| 1805 | + | func (_mock *MockHomepageFavorites) UpdateFolder(ctx context.Context, id entity.FolderID, name string, icon string) error { | |||
| 1806 | + | ret := _mock.Called(ctx, id, name, icon) | |||
| 1807 | + | ||||
| 1808 | + | if len(ret) == 0 { | |||
| 1809 | + | panic("no return value specified for UpdateFolder") | |||
| 1810 | + | } | |||
| 1811 | + | ||||
| 1812 | + | var r0 error | |||
| 1813 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, string, string) error); ok { | |||
| 1814 | + | r0 = returnFunc(ctx, id, name, icon) | |||
| 1815 | + | } else { | |||
| 1816 | + | r0 = ret.Error(0) | |||
| 1817 | + | } | |||
| 1818 | + | return r0 | |||
| 1819 | + | } | |||
| 1820 | + | ||||
| 1821 | + | // MockHomepageFavorites_UpdateFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFolder' | |||
| 1822 | + | type MockHomepageFavorites_UpdateFolder_Call struct { | |||
| 1823 | + | *mock.Call | |||
| 1824 | + | } | |||
| 1825 | + | ||||
| 1826 | + | // UpdateFolder is a helper method to define mock.On call | |||
| 1827 | + | // - ctx context.Context | |||
| 1828 | + | // - id entity.FolderID | |||
| 1829 | + | // - name string | |||
| 1830 | + | // - icon string | |||
| 1831 | + | func (_e *MockHomepageFavorites_Expecter) UpdateFolder(ctx any, id any, name any, icon any) *MockHomepageFavorites_UpdateFolder_Call { | |||
| 1832 | + | return &MockHomepageFavorites_UpdateFolder_Call{Call: _e.mock.On("UpdateFolder", ctx, id, name, icon)} | |||
| 1833 | + | } | |||
| 1834 | + | ||||
| 1835 | + | func (_c *MockHomepageFavorites_UpdateFolder_Call) Run(run func(ctx context.Context, id entity.FolderID, name string, icon string)) *MockHomepageFavorites_UpdateFolder_Call { | |||
| 1836 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1837 | + | var arg0 context.Context | |||
| 1838 | + | if args[0] != nil { | |||
| 1839 | + | arg0 = args[0].(context.Context) | |||
| 1840 | + | } | |||
| 1841 | + | var arg1 entity.FolderID | |||
| 1842 | + | if args[1] != nil { | |||
| 1843 | + | arg1 = args[1].(entity.FolderID) | |||
| 1844 | + | } | |||
| 1845 | + | var arg2 string | |||
| 1846 | + | if args[2] != nil { | |||
| 1847 | + | arg2 = args[2].(string) | |||
| 1848 | + | } | |||
| 1849 | + | var arg3 string | |||
| 1850 | + | if args[3] != nil { | |||
| 1851 | + | arg3 = args[3].(string) | |||
| 1852 | + | } | |||
| 1853 | + | run( | |||
| 1854 | + | arg0, | |||
| 1855 | + | arg1, | |||
| 1856 | + | arg2, | |||
| 1857 | + | arg3, | |||
| 1858 | + | ) | |||
| 1859 | + | }) | |||
| 1860 | + | return _c | |||
| 1861 | + | } | |||
| 1862 | + | ||||
| 1863 | + | func (_c *MockHomepageFavorites_UpdateFolder_Call) Return(err error) *MockHomepageFavorites_UpdateFolder_Call { | |||
| 1864 | + | _c.Call.Return(err) | |||
| 1865 | + | return _c | |||
| 1866 | + | } | |||
| 1867 | + | ||||
| 1868 | + | func (_c *MockHomepageFavorites_UpdateFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, name string, icon string) error) *MockHomepageFavorites_UpdateFolder_Call { | |||
| 1869 | + | _c.Call.Return(run) | |||
| 1870 | + | return _c | |||
| 1871 | + | } | |||
| 1872 | + | ||||
| 1873 | + | // UpdateTag provides a mock function for the type MockHomepageFavorites | |||
| 1874 | + | func (_mock *MockHomepageFavorites) UpdateTag(ctx context.Context, id entity.TagID, name string, color string) error { | |||
| 1875 | + | ret := _mock.Called(ctx, id, name, color) | |||
| 1876 | + | ||||
| 1877 | + | if len(ret) == 0 { | |||
| 1878 | + | panic("no return value specified for UpdateTag") | |||
| 1879 | + | } | |||
| 1880 | + | ||||
| 1881 | + | var r0 error | |||
| 1882 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, string, string) error); ok { | |||
| 1883 | + | r0 = returnFunc(ctx, id, name, color) | |||
| 1884 | + | } else { | |||
| 1885 | + | r0 = ret.Error(0) | |||
| 1886 | + | } | |||
| 1887 | + | return r0 | |||
| 1888 | + | } | |||
| 1889 | + | ||||
| 1890 | + | // MockHomepageFavorites_UpdateTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTag' | |||
| 1891 | + | type MockHomepageFavorites_UpdateTag_Call struct { | |||
| 1892 | + | *mock.Call | |||
| 1893 | + | } | |||
| 1894 | + | ||||
| 1895 | + | // UpdateTag is a helper method to define mock.On call | |||
| 1896 | + | // - ctx context.Context | |||
| 1897 | + | // - id entity.TagID | |||
| 1898 | + | // - name string | |||
| 1899 | + | // - color string | |||
| 1900 | + | func (_e *MockHomepageFavorites_Expecter) UpdateTag(ctx any, id any, name any, color any) *MockHomepageFavorites_UpdateTag_Call { | |||
| 1901 | + | return &MockHomepageFavorites_UpdateTag_Call{Call: _e.mock.On("UpdateTag", ctx, id, name, color)} | |||
| 1902 | + | } | |||
| 1903 | + | ||||
| 1904 | + | func (_c *MockHomepageFavorites_UpdateTag_Call) Run(run func(ctx context.Context, id entity.TagID, name string, color string)) *MockHomepageFavorites_UpdateTag_Call { | |||
| 1905 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1906 | + | var arg0 context.Context | |||
| 1907 | + | if args[0] != nil { | |||
| 1908 | + | arg0 = args[0].(context.Context) | |||
| 1909 | + | } | |||
| 1910 | + | var arg1 entity.TagID | |||
| 1911 | + | if args[1] != nil { | |||
| 1912 | + | arg1 = args[1].(entity.TagID) | |||
| 1913 | + | } | |||
| 1914 | + | var arg2 string | |||
| 1915 | + | if args[2] != nil { | |||
| 1916 | + | arg2 = args[2].(string) | |||
| 1917 | + | } | |||
| 1918 | + | var arg3 string | |||
| 1919 | + | if args[3] != nil { | |||
| 1920 | + | arg3 = args[3].(string) | |||
| 1921 | + | } | |||
| 1922 | + | run( | |||
| 1923 | + | arg0, | |||
| 1924 | + | arg1, | |||
| 1925 | + | arg2, | |||
| 1926 | + | arg3, | |||
| 1927 | + | ) | |||
| 1928 | + | }) | |||
| 1929 | + | return _c | |||
| 1930 | + | } | |||
| 1931 | + | ||||
| 1932 | + | func (_c *MockHomepageFavorites_UpdateTag_Call) Return(err error) *MockHomepageFavorites_UpdateTag_Call { | |||
| 1933 | + | _c.Call.Return(err) | |||
| 1934 | + | return _c | |||
| 1935 | + | } | |||
| 1936 | + | ||||
| 1937 | + | func (_c *MockHomepageFavorites_UpdateTag_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID, name string, color string) error) *MockHomepageFavorites_UpdateTag_Call { | |||
| 1938 | + | _c.Call.Return(run) | |||
| 1939 | + | return _c | |||
| 1940 | + | } | |||
A internal/application/port/mocks/idle_inhibit.go +234 -0
| @@ -0,0 +1,234 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | mock "github.com/stretchr/testify/mock" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // NewMockIdleInhibitor creates a new instance of MockIdleInhibitor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 14 | + | // The first argument is typically a *testing.T value. | |||
| 15 | + | func NewMockIdleInhibitor(t interface { | |||
| 16 | + | mock.TestingT | |||
| 17 | + | Cleanup(func()) | |||
| 18 | + | }) *MockIdleInhibitor { | |||
| 19 | + | mock := &MockIdleInhibitor{} | |||
| 20 | + | mock.Mock.Test(t) | |||
| 21 | + | ||||
| 22 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 23 | + | ||||
| 24 | + | return mock | |||
| 25 | + | } | |||
| 26 | + | ||||
| 27 | + | // MockIdleInhibitor is an autogenerated mock type for the IdleInhibitor type | |||
| 28 | + | type MockIdleInhibitor struct { | |||
| 29 | + | mock.Mock | |||
| 30 | + | } | |||
| 31 | + | ||||
| 32 | + | type MockIdleInhibitor_Expecter struct { | |||
| 33 | + | mock *mock.Mock | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | func (_m *MockIdleInhibitor) EXPECT() *MockIdleInhibitor_Expecter { | |||
| 37 | + | return &MockIdleInhibitor_Expecter{mock: &_m.Mock} | |||
| 38 | + | } | |||
| 39 | + | ||||
| 40 | + | // Close provides a mock function for the type MockIdleInhibitor | |||
| 41 | + | func (_mock *MockIdleInhibitor) Close() error { | |||
| 42 | + | ret := _mock.Called() | |||
| 43 | + | ||||
| 44 | + | if len(ret) == 0 { | |||
| 45 | + | panic("no return value specified for Close") | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | var r0 error | |||
| 49 | + | if returnFunc, ok := ret.Get(0).(func() error); ok { | |||
| 50 | + | r0 = returnFunc() | |||
| 51 | + | } else { | |||
| 52 | + | r0 = ret.Error(0) | |||
| 53 | + | } | |||
| 54 | + | return r0 | |||
| 55 | + | } | |||
| 56 | + | ||||
| 57 | + | // MockIdleInhibitor_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' | |||
| 58 | + | type MockIdleInhibitor_Close_Call struct { | |||
| 59 | + | *mock.Call | |||
| 60 | + | } | |||
| 61 | + | ||||
| 62 | + | // Close is a helper method to define mock.On call | |||
| 63 | + | func (_e *MockIdleInhibitor_Expecter) Close() *MockIdleInhibitor_Close_Call { | |||
| 64 | + | return &MockIdleInhibitor_Close_Call{Call: _e.mock.On("Close")} | |||
| 65 | + | } | |||
| 66 | + | ||||
| 67 | + | func (_c *MockIdleInhibitor_Close_Call) Run(run func()) *MockIdleInhibitor_Close_Call { | |||
| 68 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 69 | + | run() | |||
| 70 | + | }) | |||
| 71 | + | return _c | |||
| 72 | + | } | |||
| 73 | + | ||||
| 74 | + | func (_c *MockIdleInhibitor_Close_Call) Return(err error) *MockIdleInhibitor_Close_Call { | |||
| 75 | + | _c.Call.Return(err) | |||
| 76 | + | return _c | |||
| 77 | + | } | |||
| 78 | + | ||||
| 79 | + | func (_c *MockIdleInhibitor_Close_Call) RunAndReturn(run func() error) *MockIdleInhibitor_Close_Call { | |||
| 80 | + | _c.Call.Return(run) | |||
| 81 | + | return _c | |||
| 82 | + | } | |||
| 83 | + | ||||
| 84 | + | // Inhibit provides a mock function for the type MockIdleInhibitor | |||
| 85 | + | func (_mock *MockIdleInhibitor) Inhibit(ctx context.Context, reason string) error { | |||
| 86 | + | ret := _mock.Called(ctx, reason) | |||
| 87 | + | ||||
| 88 | + | if len(ret) == 0 { | |||
| 89 | + | panic("no return value specified for Inhibit") | |||
| 90 | + | } | |||
| 91 | + | ||||
| 92 | + | var r0 error | |||
| 93 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 94 | + | r0 = returnFunc(ctx, reason) | |||
| 95 | + | } else { | |||
| 96 | + | r0 = ret.Error(0) | |||
| 97 | + | } | |||
| 98 | + | return r0 | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | // MockIdleInhibitor_Inhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Inhibit' | |||
| 102 | + | type MockIdleInhibitor_Inhibit_Call struct { | |||
| 103 | + | *mock.Call | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | // Inhibit is a helper method to define mock.On call | |||
| 107 | + | // - ctx context.Context | |||
| 108 | + | // - reason string | |||
| 109 | + | func (_e *MockIdleInhibitor_Expecter) Inhibit(ctx any, reason any) *MockIdleInhibitor_Inhibit_Call { | |||
| 110 | + | return &MockIdleInhibitor_Inhibit_Call{Call: _e.mock.On("Inhibit", ctx, reason)} | |||
| 111 | + | } | |||
| 112 | + | ||||
| 113 | + | func (_c *MockIdleInhibitor_Inhibit_Call) Run(run func(ctx context.Context, reason string)) *MockIdleInhibitor_Inhibit_Call { | |||
| 114 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 115 | + | var arg0 context.Context | |||
| 116 | + | if args[0] != nil { | |||
| 117 | + | arg0 = args[0].(context.Context) | |||
| 118 | + | } | |||
| 119 | + | var arg1 string | |||
| 120 | + | if args[1] != nil { | |||
| 121 | + | arg1 = args[1].(string) | |||
| 122 | + | } | |||
| 123 | + | run( | |||
| 124 | + | arg0, | |||
| 125 | + | arg1, | |||
| 126 | + | ) | |||
| 127 | + | }) | |||
| 128 | + | return _c | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | func (_c *MockIdleInhibitor_Inhibit_Call) Return(err error) *MockIdleInhibitor_Inhibit_Call { | |||
| 132 | + | _c.Call.Return(err) | |||
| 133 | + | return _c | |||
| 134 | + | } | |||
| 135 | + | ||||
| 136 | + | func (_c *MockIdleInhibitor_Inhibit_Call) RunAndReturn(run func(ctx context.Context, reason string) error) *MockIdleInhibitor_Inhibit_Call { | |||
| 137 | + | _c.Call.Return(run) | |||
| 138 | + | return _c | |||
| 139 | + | } | |||
| 140 | + | ||||
| 141 | + | // IsInhibited provides a mock function for the type MockIdleInhibitor | |||
| 142 | + | func (_mock *MockIdleInhibitor) IsInhibited() bool { | |||
| 143 | + | ret := _mock.Called() | |||
| 144 | + | ||||
| 145 | + | if len(ret) == 0 { | |||
| 146 | + | panic("no return value specified for IsInhibited") | |||
| 147 | + | } | |||
| 148 | + | ||||
| 149 | + | var r0 bool | |||
| 150 | + | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |||
| 151 | + | r0 = returnFunc() | |||
| 152 | + | } else { | |||
| 153 | + | r0 = ret.Get(0).(bool) | |||
| 154 | + | } | |||
| 155 | + | return r0 | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | // MockIdleInhibitor_IsInhibited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsInhibited' | |||
| 159 | + | type MockIdleInhibitor_IsInhibited_Call struct { | |||
| 160 | + | *mock.Call | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | // IsInhibited is a helper method to define mock.On call | |||
| 164 | + | func (_e *MockIdleInhibitor_Expecter) IsInhibited() *MockIdleInhibitor_IsInhibited_Call { | |||
| 165 | + | return &MockIdleInhibitor_IsInhibited_Call{Call: _e.mock.On("IsInhibited")} | |||
| 166 | + | } | |||
| 167 | + | ||||
| 168 | + | func (_c *MockIdleInhibitor_IsInhibited_Call) Run(run func()) *MockIdleInhibitor_IsInhibited_Call { | |||
| 169 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 170 | + | run() | |||
| 171 | + | }) | |||
| 172 | + | return _c | |||
| 173 | + | } | |||
| 174 | + | ||||
| 175 | + | func (_c *MockIdleInhibitor_IsInhibited_Call) Return(b bool) *MockIdleInhibitor_IsInhibited_Call { | |||
| 176 | + | _c.Call.Return(b) | |||
| 177 | + | return _c | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | func (_c *MockIdleInhibitor_IsInhibited_Call) RunAndReturn(run func() bool) *MockIdleInhibitor_IsInhibited_Call { | |||
| 181 | + | _c.Call.Return(run) | |||
| 182 | + | return _c | |||
| 183 | + | } | |||
| 184 | + | ||||
| 185 | + | // Uninhibit provides a mock function for the type MockIdleInhibitor | |||
| 186 | + | func (_mock *MockIdleInhibitor) Uninhibit(ctx context.Context) error { | |||
| 187 | + | ret := _mock.Called(ctx) | |||
| 188 | + | ||||
| 189 | + | if len(ret) == 0 { | |||
| 190 | + | panic("no return value specified for Uninhibit") | |||
| 191 | + | } | |||
| 192 | + | ||||
| 193 | + | var r0 error | |||
| 194 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 195 | + | r0 = returnFunc(ctx) | |||
| 196 | + | } else { | |||
| 197 | + | r0 = ret.Error(0) | |||
| 198 | + | } | |||
| 199 | + | return r0 | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | // MockIdleInhibitor_Uninhibit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninhibit' | |||
| 203 | + | type MockIdleInhibitor_Uninhibit_Call struct { | |||
| 204 | + | *mock.Call | |||
| 205 | + | } | |||
| 206 | + | ||||
| 207 | + | // Uninhibit is a helper method to define mock.On call | |||
| 208 | + | // - ctx context.Context | |||
| 209 | + | func (_e *MockIdleInhibitor_Expecter) Uninhibit(ctx any) *MockIdleInhibitor_Uninhibit_Call { | |||
| 210 | + | return &MockIdleInhibitor_Uninhibit_Call{Call: _e.mock.On("Uninhibit", ctx)} | |||
| 211 | + | } | |||
| 212 | + | ||||
| 213 | + | func (_c *MockIdleInhibitor_Uninhibit_Call) Run(run func(ctx context.Context)) *MockIdleInhibitor_Uninhibit_Call { | |||
| 214 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 215 | + | var arg0 context.Context | |||
| 216 | + | if args[0] != nil { | |||
| 217 | + | arg0 = args[0].(context.Context) | |||
| 218 | + | } | |||
| 219 | + | run( | |||
| 220 | + | arg0, | |||
| 221 | + | ) | |||
| 222 | + | }) | |||
| 223 | + | return _c | |||
| 224 | + | } | |||
| 225 | + | ||||
| 226 | + | func (_c *MockIdleInhibitor_Uninhibit_Call) Return(err error) *MockIdleInhibitor_Uninhibit_Call { | |||
| 227 | + | _c.Call.Return(err) | |||
| 228 | + | return _c | |||
| 229 | + | } | |||
| 230 | + | ||||
| 231 | + | func (_c *MockIdleInhibitor_Uninhibit_Call) RunAndReturn(run func(ctx context.Context) error) *MockIdleInhibitor_Uninhibit_Call { | |||
| 232 | + | _c.Call.Return(run) | |||
| 233 | + | return _c | |||
| 234 | + | } | |||
A internal/application/port/mocks/image_data.go +196 -0
| @@ -0,0 +1,196 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockImageDataResolver creates a new instance of MockImageDataResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockImageDataResolver(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockImageDataResolver { | |||
| 21 | + | mock := &MockImageDataResolver{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockImageDataResolver is an autogenerated mock type for the ImageDataResolver type | |||
| 30 | + | type MockImageDataResolver struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockImageDataResolver_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockImageDataResolver) EXPECT() *MockImageDataResolver_Expecter { | |||
| 39 | + | return &MockImageDataResolver_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // ResolveImageData provides a mock function for the type MockImageDataResolver | |||
| 43 | + | func (_mock *MockImageDataResolver) ResolveImageData(ctx context.Context, uri string) (entity.ImageData, error) { | |||
| 44 | + | ret := _mock.Called(ctx, uri) | |||
| 45 | + | ||||
| 46 | + | if len(ret) == 0 { | |||
| 47 | + | panic("no return value specified for ResolveImageData") | |||
| 48 | + | } | |||
| 49 | + | ||||
| 50 | + | var r0 entity.ImageData | |||
| 51 | + | var r1 error | |||
| 52 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (entity.ImageData, error)); ok { | |||
| 53 | + | return returnFunc(ctx, uri) | |||
| 54 | + | } | |||
| 55 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) entity.ImageData); ok { | |||
| 56 | + | r0 = returnFunc(ctx, uri) | |||
| 57 | + | } else { | |||
| 58 | + | r0 = ret.Get(0).(entity.ImageData) | |||
| 59 | + | } | |||
| 60 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 61 | + | r1 = returnFunc(ctx, uri) | |||
| 62 | + | } else { | |||
| 63 | + | r1 = ret.Error(1) | |||
| 64 | + | } | |||
| 65 | + | return r0, r1 | |||
| 66 | + | } | |||
| 67 | + | ||||
| 68 | + | // MockImageDataResolver_ResolveImageData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveImageData' | |||
| 69 | + | type MockImageDataResolver_ResolveImageData_Call struct { | |||
| 70 | + | *mock.Call | |||
| 71 | + | } | |||
| 72 | + | ||||
| 73 | + | // ResolveImageData is a helper method to define mock.On call | |||
| 74 | + | // - ctx context.Context | |||
| 75 | + | // - uri string | |||
| 76 | + | func (_e *MockImageDataResolver_Expecter) ResolveImageData(ctx any, uri any) *MockImageDataResolver_ResolveImageData_Call { | |||
| 77 | + | return &MockImageDataResolver_ResolveImageData_Call{Call: _e.mock.On("ResolveImageData", ctx, uri)} | |||
| 78 | + | } | |||
| 79 | + | ||||
| 80 | + | func (_c *MockImageDataResolver_ResolveImageData_Call) Run(run func(ctx context.Context, uri string)) *MockImageDataResolver_ResolveImageData_Call { | |||
| 81 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 82 | + | var arg0 context.Context | |||
| 83 | + | if args[0] != nil { | |||
| 84 | + | arg0 = args[0].(context.Context) | |||
| 85 | + | } | |||
| 86 | + | var arg1 string | |||
| 87 | + | if args[1] != nil { | |||
| 88 | + | arg1 = args[1].(string) | |||
| 89 | + | } | |||
| 90 | + | run( | |||
| 91 | + | arg0, | |||
| 92 | + | arg1, | |||
| 93 | + | ) | |||
| 94 | + | }) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | func (_c *MockImageDataResolver_ResolveImageData_Call) Return(imageData entity.ImageData, err error) *MockImageDataResolver_ResolveImageData_Call { | |||
| 99 | + | _c.Call.Return(imageData, err) | |||
| 100 | + | return _c | |||
| 101 | + | } | |||
| 102 | + | ||||
| 103 | + | func (_c *MockImageDataResolver_ResolveImageData_Call) RunAndReturn(run func(ctx context.Context, uri string) (entity.ImageData, error)) *MockImageDataResolver_ResolveImageData_Call { | |||
| 104 | + | _c.Call.Return(run) | |||
| 105 | + | return _c | |||
| 106 | + | } | |||
| 107 | + | ||||
| 108 | + | // NewMockResolvedImageSaver creates a new instance of MockResolvedImageSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 109 | + | // The first argument is typically a *testing.T value. | |||
| 110 | + | func NewMockResolvedImageSaver(t interface { | |||
| 111 | + | mock.TestingT | |||
| 112 | + | Cleanup(func()) | |||
| 113 | + | }) *MockResolvedImageSaver { | |||
| 114 | + | mock := &MockResolvedImageSaver{} | |||
| 115 | + | mock.Mock.Test(t) | |||
| 116 | + | ||||
| 117 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 118 | + | ||||
| 119 | + | return mock | |||
| 120 | + | } | |||
| 121 | + | ||||
| 122 | + | // MockResolvedImageSaver is an autogenerated mock type for the ResolvedImageSaver type | |||
| 123 | + | type MockResolvedImageSaver struct { | |||
| 124 | + | mock.Mock | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | type MockResolvedImageSaver_Expecter struct { | |||
| 128 | + | mock *mock.Mock | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | func (_m *MockResolvedImageSaver) EXPECT() *MockResolvedImageSaver_Expecter { | |||
| 132 | + | return &MockResolvedImageSaver_Expecter{mock: &_m.Mock} | |||
| 133 | + | } | |||
| 134 | + | ||||
| 135 | + | // SaveResolvedImage provides a mock function for the type MockResolvedImageSaver | |||
| 136 | + | func (_mock *MockResolvedImageSaver) SaveResolvedImage(ctx context.Context, image entity.ImageData, menuContext port.MenuContext) error { | |||
| 137 | + | ret := _mock.Called(ctx, image, menuContext) | |||
| 138 | + | ||||
| 139 | + | if len(ret) == 0 { | |||
| 140 | + | panic("no return value specified for SaveResolvedImage") | |||
| 141 | + | } | |||
| 142 | + | ||||
| 143 | + | var r0 error | |||
| 144 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.ImageData, port.MenuContext) error); ok { | |||
| 145 | + | r0 = returnFunc(ctx, image, menuContext) | |||
| 146 | + | } else { | |||
| 147 | + | r0 = ret.Error(0) | |||
| 148 | + | } | |||
| 149 | + | return r0 | |||
| 150 | + | } | |||
| 151 | + | ||||
| 152 | + | // MockResolvedImageSaver_SaveResolvedImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveResolvedImage' | |||
| 153 | + | type MockResolvedImageSaver_SaveResolvedImage_Call struct { | |||
| 154 | + | *mock.Call | |||
| 155 | + | } | |||
| 156 | + | ||||
| 157 | + | // SaveResolvedImage is a helper method to define mock.On call | |||
| 158 | + | // - ctx context.Context | |||
| 159 | + | // - image entity.ImageData | |||
| 160 | + | // - menuContext port.MenuContext | |||
| 161 | + | func (_e *MockResolvedImageSaver_Expecter) SaveResolvedImage(ctx any, image any, menuContext any) *MockResolvedImageSaver_SaveResolvedImage_Call { | |||
| 162 | + | return &MockResolvedImageSaver_SaveResolvedImage_Call{Call: _e.mock.On("SaveResolvedImage", ctx, image, menuContext)} | |||
| 163 | + | } | |||
| 164 | + | ||||
| 165 | + | func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) Run(run func(ctx context.Context, image entity.ImageData, menuContext port.MenuContext)) *MockResolvedImageSaver_SaveResolvedImage_Call { | |||
| 166 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 167 | + | var arg0 context.Context | |||
| 168 | + | if args[0] != nil { | |||
| 169 | + | arg0 = args[0].(context.Context) | |||
| 170 | + | } | |||
| 171 | + | var arg1 entity.ImageData | |||
| 172 | + | if args[1] != nil { | |||
| 173 | + | arg1 = args[1].(entity.ImageData) | |||
| 174 | + | } | |||
| 175 | + | var arg2 port.MenuContext | |||
| 176 | + | if args[2] != nil { | |||
| 177 | + | arg2 = args[2].(port.MenuContext) | |||
| 178 | + | } | |||
| 179 | + | run( | |||
| 180 | + | arg0, | |||
| 181 | + | arg1, | |||
| 182 | + | arg2, | |||
| 183 | + | ) | |||
| 184 | + | }) | |||
| 185 | + | return _c | |||
| 186 | + | } | |||
| 187 | + | ||||
| 188 | + | func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) Return(err error) *MockResolvedImageSaver_SaveResolvedImage_Call { | |||
| 189 | + | _c.Call.Return(err) | |||
| 190 | + | return _c | |||
| 191 | + | } | |||
| 192 | + | ||||
| 193 | + | func (_c *MockResolvedImageSaver_SaveResolvedImage_Call) RunAndReturn(run func(ctx context.Context, image entity.ImageData, menuContext port.MenuContext) error) *MockResolvedImageSaver_SaveResolvedImage_Call { | |||
| 194 | + | _c.Call.Return(run) | |||
| 195 | + | return _c | |||
| 196 | + | } | |||
A internal/application/port/mocks/keybindings.go +773 -0
| @@ -0,0 +1,773 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockKeybindingsProvider creates a new instance of MockKeybindingsProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockKeybindingsProvider(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockKeybindingsProvider { | |||
| 20 | + | mock := &MockKeybindingsProvider{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockKeybindingsProvider is an autogenerated mock type for the KeybindingsProvider type | |||
| 29 | + | type MockKeybindingsProvider struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockKeybindingsProvider_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockKeybindingsProvider) EXPECT() *MockKeybindingsProvider_Expecter { | |||
| 38 | + | return &MockKeybindingsProvider_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // CheckConflicts provides a mock function for the type MockKeybindingsProvider | |||
| 42 | + | func (_mock *MockKeybindingsProvider) CheckConflicts(ctx context.Context, mode string, action string, keys []string) ([]port.KeybindingConflict, error) { | |||
| 43 | + | ret := _mock.Called(ctx, mode, action, keys) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for CheckConflicts") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 []port.KeybindingConflict | |||
| 50 | + | var r1 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []string) ([]port.KeybindingConflict, error)); ok { | |||
| 52 | + | return returnFunc(ctx, mode, action, keys) | |||
| 53 | + | } | |||
| 54 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []string) []port.KeybindingConflict); ok { | |||
| 55 | + | r0 = returnFunc(ctx, mode, action, keys) | |||
| 56 | + | } else { | |||
| 57 | + | if ret.Get(0) != nil { | |||
| 58 | + | r0 = ret.Get(0).([]port.KeybindingConflict) | |||
| 59 | + | } | |||
| 60 | + | } | |||
| 61 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, []string) error); ok { | |||
| 62 | + | r1 = returnFunc(ctx, mode, action, keys) | |||
| 63 | + | } else { | |||
| 64 | + | r1 = ret.Error(1) | |||
| 65 | + | } | |||
| 66 | + | return r0, r1 | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | // MockKeybindingsProvider_CheckConflicts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckConflicts' | |||
| 70 | + | type MockKeybindingsProvider_CheckConflicts_Call struct { | |||
| 71 | + | *mock.Call | |||
| 72 | + | } | |||
| 73 | + | ||||
| 74 | + | // CheckConflicts is a helper method to define mock.On call | |||
| 75 | + | // - ctx context.Context | |||
| 76 | + | // - mode string | |||
| 77 | + | // - action string | |||
| 78 | + | // - keys []string | |||
| 79 | + | func (_e *MockKeybindingsProvider_Expecter) CheckConflicts(ctx any, mode any, action any, keys any) *MockKeybindingsProvider_CheckConflicts_Call { | |||
| 80 | + | return &MockKeybindingsProvider_CheckConflicts_Call{Call: _e.mock.On("CheckConflicts", ctx, mode, action, keys)} | |||
| 81 | + | } | |||
| 82 | + | ||||
| 83 | + | func (_c *MockKeybindingsProvider_CheckConflicts_Call) Run(run func(ctx context.Context, mode string, action string, keys []string)) *MockKeybindingsProvider_CheckConflicts_Call { | |||
| 84 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 85 | + | var arg0 context.Context | |||
| 86 | + | if args[0] != nil { | |||
| 87 | + | arg0 = args[0].(context.Context) | |||
| 88 | + | } | |||
| 89 | + | var arg1 string | |||
| 90 | + | if args[1] != nil { | |||
| 91 | + | arg1 = args[1].(string) | |||
| 92 | + | } | |||
| 93 | + | var arg2 string | |||
| 94 | + | if args[2] != nil { | |||
| 95 | + | arg2 = args[2].(string) | |||
| 96 | + | } | |||
| 97 | + | var arg3 []string | |||
| 98 | + | if args[3] != nil { | |||
| 99 | + | arg3 = args[3].([]string) | |||
| 100 | + | } | |||
| 101 | + | run( | |||
| 102 | + | arg0, | |||
| 103 | + | arg1, | |||
| 104 | + | arg2, | |||
| 105 | + | arg3, | |||
| 106 | + | ) | |||
| 107 | + | }) | |||
| 108 | + | return _c | |||
| 109 | + | } | |||
| 110 | + | ||||
| 111 | + | func (_c *MockKeybindingsProvider_CheckConflicts_Call) Return(keybindingConflicts []port.KeybindingConflict, err error) *MockKeybindingsProvider_CheckConflicts_Call { | |||
| 112 | + | _c.Call.Return(keybindingConflicts, err) | |||
| 113 | + | return _c | |||
| 114 | + | } | |||
| 115 | + | ||||
| 116 | + | func (_c *MockKeybindingsProvider_CheckConflicts_Call) RunAndReturn(run func(ctx context.Context, mode string, action string, keys []string) ([]port.KeybindingConflict, error)) *MockKeybindingsProvider_CheckConflicts_Call { | |||
| 117 | + | _c.Call.Return(run) | |||
| 118 | + | return _c | |||
| 119 | + | } | |||
| 120 | + | ||||
| 121 | + | // GetDefaultKeybindings provides a mock function for the type MockKeybindingsProvider | |||
| 122 | + | func (_mock *MockKeybindingsProvider) GetDefaultKeybindings(ctx context.Context) (port.KeybindingsConfig, error) { | |||
| 123 | + | ret := _mock.Called(ctx) | |||
| 124 | + | ||||
| 125 | + | if len(ret) == 0 { | |||
| 126 | + | panic("no return value specified for GetDefaultKeybindings") | |||
| 127 | + | } | |||
| 128 | + | ||||
| 129 | + | var r0 port.KeybindingsConfig | |||
| 130 | + | var r1 error | |||
| 131 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok { | |||
| 132 | + | return returnFunc(ctx) | |||
| 133 | + | } | |||
| 134 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok { | |||
| 135 | + | r0 = returnFunc(ctx) | |||
| 136 | + | } else { | |||
| 137 | + | r0 = ret.Get(0).(port.KeybindingsConfig) | |||
| 138 | + | } | |||
| 139 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 140 | + | r1 = returnFunc(ctx) | |||
| 141 | + | } else { | |||
| 142 | + | r1 = ret.Error(1) | |||
| 143 | + | } | |||
| 144 | + | return r0, r1 | |||
| 145 | + | } | |||
| 146 | + | ||||
| 147 | + | // MockKeybindingsProvider_GetDefaultKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultKeybindings' | |||
| 148 | + | type MockKeybindingsProvider_GetDefaultKeybindings_Call struct { | |||
| 149 | + | *mock.Call | |||
| 150 | + | } | |||
| 151 | + | ||||
| 152 | + | // GetDefaultKeybindings is a helper method to define mock.On call | |||
| 153 | + | // - ctx context.Context | |||
| 154 | + | func (_e *MockKeybindingsProvider_Expecter) GetDefaultKeybindings(ctx any) *MockKeybindingsProvider_GetDefaultKeybindings_Call { | |||
| 155 | + | return &MockKeybindingsProvider_GetDefaultKeybindings_Call{Call: _e.mock.On("GetDefaultKeybindings", ctx)} | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsProvider_GetDefaultKeybindings_Call { | |||
| 159 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 160 | + | var arg0 context.Context | |||
| 161 | + | if args[0] != nil { | |||
| 162 | + | arg0 = args[0].(context.Context) | |||
| 163 | + | } | |||
| 164 | + | run( | |||
| 165 | + | arg0, | |||
| 166 | + | ) | |||
| 167 | + | }) | |||
| 168 | + | return _c | |||
| 169 | + | } | |||
| 170 | + | ||||
| 171 | + | func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsProvider_GetDefaultKeybindings_Call { | |||
| 172 | + | _c.Call.Return(keybindingsConfig, err) | |||
| 173 | + | return _c | |||
| 174 | + | } | |||
| 175 | + | ||||
| 176 | + | func (_c *MockKeybindingsProvider_GetDefaultKeybindings_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsProvider_GetDefaultKeybindings_Call { | |||
| 177 | + | _c.Call.Return(run) | |||
| 178 | + | return _c | |||
| 179 | + | } | |||
| 180 | + | ||||
| 181 | + | // GetKeybindings provides a mock function for the type MockKeybindingsProvider | |||
| 182 | + | func (_mock *MockKeybindingsProvider) GetKeybindings(ctx context.Context) (port.KeybindingsConfig, error) { | |||
| 183 | + | ret := _mock.Called(ctx) | |||
| 184 | + | ||||
| 185 | + | if len(ret) == 0 { | |||
| 186 | + | panic("no return value specified for GetKeybindings") | |||
| 187 | + | } | |||
| 188 | + | ||||
| 189 | + | var r0 port.KeybindingsConfig | |||
| 190 | + | var r1 error | |||
| 191 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok { | |||
| 192 | + | return returnFunc(ctx) | |||
| 193 | + | } | |||
| 194 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok { | |||
| 195 | + | r0 = returnFunc(ctx) | |||
| 196 | + | } else { | |||
| 197 | + | r0 = ret.Get(0).(port.KeybindingsConfig) | |||
| 198 | + | } | |||
| 199 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 200 | + | r1 = returnFunc(ctx) | |||
| 201 | + | } else { | |||
| 202 | + | r1 = ret.Error(1) | |||
| 203 | + | } | |||
| 204 | + | return r0, r1 | |||
| 205 | + | } | |||
| 206 | + | ||||
| 207 | + | // MockKeybindingsProvider_GetKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeybindings' | |||
| 208 | + | type MockKeybindingsProvider_GetKeybindings_Call struct { | |||
| 209 | + | *mock.Call | |||
| 210 | + | } | |||
| 211 | + | ||||
| 212 | + | // GetKeybindings is a helper method to define mock.On call | |||
| 213 | + | // - ctx context.Context | |||
| 214 | + | func (_e *MockKeybindingsProvider_Expecter) GetKeybindings(ctx any) *MockKeybindingsProvider_GetKeybindings_Call { | |||
| 215 | + | return &MockKeybindingsProvider_GetKeybindings_Call{Call: _e.mock.On("GetKeybindings", ctx)} | |||
| 216 | + | } | |||
| 217 | + | ||||
| 218 | + | func (_c *MockKeybindingsProvider_GetKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsProvider_GetKeybindings_Call { | |||
| 219 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 220 | + | var arg0 context.Context | |||
| 221 | + | if args[0] != nil { | |||
| 222 | + | arg0 = args[0].(context.Context) | |||
| 223 | + | } | |||
| 224 | + | run( | |||
| 225 | + | arg0, | |||
| 226 | + | ) | |||
| 227 | + | }) | |||
| 228 | + | return _c | |||
| 229 | + | } | |||
| 230 | + | ||||
| 231 | + | func (_c *MockKeybindingsProvider_GetKeybindings_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsProvider_GetKeybindings_Call { | |||
| 232 | + | _c.Call.Return(keybindingsConfig, err) | |||
| 233 | + | return _c | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | func (_c *MockKeybindingsProvider_GetKeybindings_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsProvider_GetKeybindings_Call { | |||
| 237 | + | _c.Call.Return(run) | |||
| 238 | + | return _c | |||
| 239 | + | } | |||
| 240 | + | ||||
| 241 | + | // NewMockKeybindingsSaver creates a new instance of MockKeybindingsSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 242 | + | // The first argument is typically a *testing.T value. | |||
| 243 | + | func NewMockKeybindingsSaver(t interface { | |||
| 244 | + | mock.TestingT | |||
| 245 | + | Cleanup(func()) | |||
| 246 | + | }) *MockKeybindingsSaver { | |||
| 247 | + | mock := &MockKeybindingsSaver{} | |||
| 248 | + | mock.Mock.Test(t) | |||
| 249 | + | ||||
| 250 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 251 | + | ||||
| 252 | + | return mock | |||
| 253 | + | } | |||
| 254 | + | ||||
| 255 | + | // MockKeybindingsSaver is an autogenerated mock type for the KeybindingsSaver type | |||
| 256 | + | type MockKeybindingsSaver struct { | |||
| 257 | + | mock.Mock | |||
| 258 | + | } | |||
| 259 | + | ||||
| 260 | + | type MockKeybindingsSaver_Expecter struct { | |||
| 261 | + | mock *mock.Mock | |||
| 262 | + | } | |||
| 263 | + | ||||
| 264 | + | func (_m *MockKeybindingsSaver) EXPECT() *MockKeybindingsSaver_Expecter { | |||
| 265 | + | return &MockKeybindingsSaver_Expecter{mock: &_m.Mock} | |||
| 266 | + | } | |||
| 267 | + | ||||
| 268 | + | // ResetAllKeybindings provides a mock function for the type MockKeybindingsSaver | |||
| 269 | + | func (_mock *MockKeybindingsSaver) ResetAllKeybindings(ctx context.Context) error { | |||
| 270 | + | ret := _mock.Called(ctx) | |||
| 271 | + | ||||
| 272 | + | if len(ret) == 0 { | |||
| 273 | + | panic("no return value specified for ResetAllKeybindings") | |||
| 274 | + | } | |||
| 275 | + | ||||
| 276 | + | var r0 error | |||
| 277 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 278 | + | r0 = returnFunc(ctx) | |||
| 279 | + | } else { | |||
| 280 | + | r0 = ret.Error(0) | |||
| 281 | + | } | |||
| 282 | + | return r0 | |||
| 283 | + | } | |||
| 284 | + | ||||
| 285 | + | // MockKeybindingsSaver_ResetAllKeybindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetAllKeybindings' | |||
| 286 | + | type MockKeybindingsSaver_ResetAllKeybindings_Call struct { | |||
| 287 | + | *mock.Call | |||
| 288 | + | } | |||
| 289 | + | ||||
| 290 | + | // ResetAllKeybindings is a helper method to define mock.On call | |||
| 291 | + | // - ctx context.Context | |||
| 292 | + | func (_e *MockKeybindingsSaver_Expecter) ResetAllKeybindings(ctx any) *MockKeybindingsSaver_ResetAllKeybindings_Call { | |||
| 293 | + | return &MockKeybindingsSaver_ResetAllKeybindings_Call{Call: _e.mock.On("ResetAllKeybindings", ctx)} | |||
| 294 | + | } | |||
| 295 | + | ||||
| 296 | + | func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) Run(run func(ctx context.Context)) *MockKeybindingsSaver_ResetAllKeybindings_Call { | |||
| 297 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 298 | + | var arg0 context.Context | |||
| 299 | + | if args[0] != nil { | |||
| 300 | + | arg0 = args[0].(context.Context) | |||
| 301 | + | } | |||
| 302 | + | run( | |||
| 303 | + | arg0, | |||
| 304 | + | ) | |||
| 305 | + | }) | |||
| 306 | + | return _c | |||
| 307 | + | } | |||
| 308 | + | ||||
| 309 | + | func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) Return(err error) *MockKeybindingsSaver_ResetAllKeybindings_Call { | |||
| 310 | + | _c.Call.Return(err) | |||
| 311 | + | return _c | |||
| 312 | + | } | |||
| 313 | + | ||||
| 314 | + | func (_c *MockKeybindingsSaver_ResetAllKeybindings_Call) RunAndReturn(run func(ctx context.Context) error) *MockKeybindingsSaver_ResetAllKeybindings_Call { | |||
| 315 | + | _c.Call.Return(run) | |||
| 316 | + | return _c | |||
| 317 | + | } | |||
| 318 | + | ||||
| 319 | + | // ResetKeybinding provides a mock function for the type MockKeybindingsSaver | |||
| 320 | + | func (_mock *MockKeybindingsSaver) ResetKeybinding(ctx context.Context, req port.ResetKeybindingRequest) error { | |||
| 321 | + | ret := _mock.Called(ctx, req) | |||
| 322 | + | ||||
| 323 | + | if len(ret) == 0 { | |||
| 324 | + | panic("no return value specified for ResetKeybinding") | |||
| 325 | + | } | |||
| 326 | + | ||||
| 327 | + | var r0 error | |||
| 328 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.ResetKeybindingRequest) error); ok { | |||
| 329 | + | r0 = returnFunc(ctx, req) | |||
| 330 | + | } else { | |||
| 331 | + | r0 = ret.Error(0) | |||
| 332 | + | } | |||
| 333 | + | return r0 | |||
| 334 | + | } | |||
| 335 | + | ||||
| 336 | + | // MockKeybindingsSaver_ResetKeybinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetKeybinding' | |||
| 337 | + | type MockKeybindingsSaver_ResetKeybinding_Call struct { | |||
| 338 | + | *mock.Call | |||
| 339 | + | } | |||
| 340 | + | ||||
| 341 | + | // ResetKeybinding is a helper method to define mock.On call | |||
| 342 | + | // - ctx context.Context | |||
| 343 | + | // - req port.ResetKeybindingRequest | |||
| 344 | + | func (_e *MockKeybindingsSaver_Expecter) ResetKeybinding(ctx any, req any) *MockKeybindingsSaver_ResetKeybinding_Call { | |||
| 345 | + | return &MockKeybindingsSaver_ResetKeybinding_Call{Call: _e.mock.On("ResetKeybinding", ctx, req)} | |||
| 346 | + | } | |||
| 347 | + | ||||
| 348 | + | func (_c *MockKeybindingsSaver_ResetKeybinding_Call) Run(run func(ctx context.Context, req port.ResetKeybindingRequest)) *MockKeybindingsSaver_ResetKeybinding_Call { | |||
| 349 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 350 | + | var arg0 context.Context | |||
| 351 | + | if args[0] != nil { | |||
| 352 | + | arg0 = args[0].(context.Context) | |||
| 353 | + | } | |||
| 354 | + | var arg1 port.ResetKeybindingRequest | |||
| 355 | + | if args[1] != nil { | |||
| 356 | + | arg1 = args[1].(port.ResetKeybindingRequest) | |||
| 357 | + | } | |||
| 358 | + | run( | |||
| 359 | + | arg0, | |||
| 360 | + | arg1, | |||
| 361 | + | ) | |||
| 362 | + | }) | |||
| 363 | + | return _c | |||
| 364 | + | } | |||
| 365 | + | ||||
| 366 | + | func (_c *MockKeybindingsSaver_ResetKeybinding_Call) Return(err error) *MockKeybindingsSaver_ResetKeybinding_Call { | |||
| 367 | + | _c.Call.Return(err) | |||
| 368 | + | return _c | |||
| 369 | + | } | |||
| 370 | + | ||||
| 371 | + | func (_c *MockKeybindingsSaver_ResetKeybinding_Call) RunAndReturn(run func(ctx context.Context, req port.ResetKeybindingRequest) error) *MockKeybindingsSaver_ResetKeybinding_Call { | |||
| 372 | + | _c.Call.Return(run) | |||
| 373 | + | return _c | |||
| 374 | + | } | |||
| 375 | + | ||||
| 376 | + | // SetKeybinding provides a mock function for the type MockKeybindingsSaver | |||
| 377 | + | func (_mock *MockKeybindingsSaver) SetKeybinding(ctx context.Context, req port.SetKeybindingRequest) error { | |||
| 378 | + | ret := _mock.Called(ctx, req) | |||
| 379 | + | ||||
| 380 | + | if len(ret) == 0 { | |||
| 381 | + | panic("no return value specified for SetKeybinding") | |||
| 382 | + | } | |||
| 383 | + | ||||
| 384 | + | var r0 error | |||
| 385 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) error); ok { | |||
| 386 | + | r0 = returnFunc(ctx, req) | |||
| 387 | + | } else { | |||
| 388 | + | r0 = ret.Error(0) | |||
| 389 | + | } | |||
| 390 | + | return r0 | |||
| 391 | + | } | |||
| 392 | + | ||||
| 393 | + | // MockKeybindingsSaver_SetKeybinding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetKeybinding' | |||
| 394 | + | type MockKeybindingsSaver_SetKeybinding_Call struct { | |||
| 395 | + | *mock.Call | |||
| 396 | + | } | |||
| 397 | + | ||||
| 398 | + | // SetKeybinding is a helper method to define mock.On call | |||
| 399 | + | // - ctx context.Context | |||
| 400 | + | // - req port.SetKeybindingRequest | |||
| 401 | + | func (_e *MockKeybindingsSaver_Expecter) SetKeybinding(ctx any, req any) *MockKeybindingsSaver_SetKeybinding_Call { | |||
| 402 | + | return &MockKeybindingsSaver_SetKeybinding_Call{Call: _e.mock.On("SetKeybinding", ctx, req)} | |||
| 403 | + | } | |||
| 404 | + | ||||
| 405 | + | func (_c *MockKeybindingsSaver_SetKeybinding_Call) Run(run func(ctx context.Context, req port.SetKeybindingRequest)) *MockKeybindingsSaver_SetKeybinding_Call { | |||
| 406 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 407 | + | var arg0 context.Context | |||
| 408 | + | if args[0] != nil { | |||
| 409 | + | arg0 = args[0].(context.Context) | |||
| 410 | + | } | |||
| 411 | + | var arg1 port.SetKeybindingRequest | |||
| 412 | + | if args[1] != nil { | |||
| 413 | + | arg1 = args[1].(port.SetKeybindingRequest) | |||
| 414 | + | } | |||
| 415 | + | run( | |||
| 416 | + | arg0, | |||
| 417 | + | arg1, | |||
| 418 | + | ) | |||
| 419 | + | }) | |||
| 420 | + | return _c | |||
| 421 | + | } | |||
| 422 | + | ||||
| 423 | + | func (_c *MockKeybindingsSaver_SetKeybinding_Call) Return(err error) *MockKeybindingsSaver_SetKeybinding_Call { | |||
| 424 | + | _c.Call.Return(err) | |||
| 425 | + | return _c | |||
| 426 | + | } | |||
| 427 | + | ||||
| 428 | + | func (_c *MockKeybindingsSaver_SetKeybinding_Call) RunAndReturn(run func(ctx context.Context, req port.SetKeybindingRequest) error) *MockKeybindingsSaver_SetKeybinding_Call { | |||
| 429 | + | _c.Call.Return(run) | |||
| 430 | + | return _c | |||
| 431 | + | } | |||
| 432 | + | ||||
| 433 | + | // NewMockKeybindingsGetter creates a new instance of MockKeybindingsGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 434 | + | // The first argument is typically a *testing.T value. | |||
| 435 | + | func NewMockKeybindingsGetter(t interface { | |||
| 436 | + | mock.TestingT | |||
| 437 | + | Cleanup(func()) | |||
| 438 | + | }) *MockKeybindingsGetter { | |||
| 439 | + | mock := &MockKeybindingsGetter{} | |||
| 440 | + | mock.Mock.Test(t) | |||
| 441 | + | ||||
| 442 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 443 | + | ||||
| 444 | + | return mock | |||
| 445 | + | } | |||
| 446 | + | ||||
| 447 | + | // MockKeybindingsGetter is an autogenerated mock type for the KeybindingsGetter type | |||
| 448 | + | type MockKeybindingsGetter struct { | |||
| 449 | + | mock.Mock | |||
| 450 | + | } | |||
| 451 | + | ||||
| 452 | + | type MockKeybindingsGetter_Expecter struct { | |||
| 453 | + | mock *mock.Mock | |||
| 454 | + | } | |||
| 455 | + | ||||
| 456 | + | func (_m *MockKeybindingsGetter) EXPECT() *MockKeybindingsGetter_Expecter { | |||
| 457 | + | return &MockKeybindingsGetter_Expecter{mock: &_m.Mock} | |||
| 458 | + | } | |||
| 459 | + | ||||
| 460 | + | // Execute provides a mock function for the type MockKeybindingsGetter | |||
| 461 | + | func (_mock *MockKeybindingsGetter) Execute(ctx context.Context) (port.KeybindingsConfig, error) { | |||
| 462 | + | ret := _mock.Called(ctx) | |||
| 463 | + | ||||
| 464 | + | if len(ret) == 0 { | |||
| 465 | + | panic("no return value specified for Execute") | |||
| 466 | + | } | |||
| 467 | + | ||||
| 468 | + | var r0 port.KeybindingsConfig | |||
| 469 | + | var r1 error | |||
| 470 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (port.KeybindingsConfig, error)); ok { | |||
| 471 | + | return returnFunc(ctx) | |||
| 472 | + | } | |||
| 473 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) port.KeybindingsConfig); ok { | |||
| 474 | + | r0 = returnFunc(ctx) | |||
| 475 | + | } else { | |||
| 476 | + | r0 = ret.Get(0).(port.KeybindingsConfig) | |||
| 477 | + | } | |||
| 478 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 479 | + | r1 = returnFunc(ctx) | |||
| 480 | + | } else { | |||
| 481 | + | r1 = ret.Error(1) | |||
| 482 | + | } | |||
| 483 | + | return r0, r1 | |||
| 484 | + | } | |||
| 485 | + | ||||
| 486 | + | // MockKeybindingsGetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' | |||
| 487 | + | type MockKeybindingsGetter_Execute_Call struct { | |||
| 488 | + | *mock.Call | |||
| 489 | + | } | |||
| 490 | + | ||||
| 491 | + | // Execute is a helper method to define mock.On call | |||
| 492 | + | // - ctx context.Context | |||
| 493 | + | func (_e *MockKeybindingsGetter_Expecter) Execute(ctx any) *MockKeybindingsGetter_Execute_Call { | |||
| 494 | + | return &MockKeybindingsGetter_Execute_Call{Call: _e.mock.On("Execute", ctx)} | |||
| 495 | + | } | |||
| 496 | + | ||||
| 497 | + | func (_c *MockKeybindingsGetter_Execute_Call) Run(run func(ctx context.Context)) *MockKeybindingsGetter_Execute_Call { | |||
| 498 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 499 | + | var arg0 context.Context | |||
| 500 | + | if args[0] != nil { | |||
| 501 | + | arg0 = args[0].(context.Context) | |||
| 502 | + | } | |||
| 503 | + | run( | |||
| 504 | + | arg0, | |||
| 505 | + | ) | |||
| 506 | + | }) | |||
| 507 | + | return _c | |||
| 508 | + | } | |||
| 509 | + | ||||
| 510 | + | func (_c *MockKeybindingsGetter_Execute_Call) Return(keybindingsConfig port.KeybindingsConfig, err error) *MockKeybindingsGetter_Execute_Call { | |||
| 511 | + | _c.Call.Return(keybindingsConfig, err) | |||
| 512 | + | return _c | |||
| 513 | + | } | |||
| 514 | + | ||||
| 515 | + | func (_c *MockKeybindingsGetter_Execute_Call) RunAndReturn(run func(ctx context.Context) (port.KeybindingsConfig, error)) *MockKeybindingsGetter_Execute_Call { | |||
| 516 | + | _c.Call.Return(run) | |||
| 517 | + | return _c | |||
| 518 | + | } | |||
| 519 | + | ||||
| 520 | + | // NewMockKeybindingSetter creates a new instance of MockKeybindingSetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 521 | + | // The first argument is typically a *testing.T value. | |||
| 522 | + | func NewMockKeybindingSetter(t interface { | |||
| 523 | + | mock.TestingT | |||
| 524 | + | Cleanup(func()) | |||
| 525 | + | }) *MockKeybindingSetter { | |||
| 526 | + | mock := &MockKeybindingSetter{} | |||
| 527 | + | mock.Mock.Test(t) | |||
| 528 | + | ||||
| 529 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 530 | + | ||||
| 531 | + | return mock | |||
| 532 | + | } | |||
| 533 | + | ||||
| 534 | + | // MockKeybindingSetter is an autogenerated mock type for the KeybindingSetter type | |||
| 535 | + | type MockKeybindingSetter struct { | |||
| 536 | + | mock.Mock | |||
| 537 | + | } | |||
| 538 | + | ||||
| 539 | + | type MockKeybindingSetter_Expecter struct { | |||
| 540 | + | mock *mock.Mock | |||
| 541 | + | } | |||
| 542 | + | ||||
| 543 | + | func (_m *MockKeybindingSetter) EXPECT() *MockKeybindingSetter_Expecter { | |||
| 544 | + | return &MockKeybindingSetter_Expecter{mock: &_m.Mock} | |||
| 545 | + | } | |||
| 546 | + | ||||
| 547 | + | // Execute provides a mock function for the type MockKeybindingSetter | |||
| 548 | + | func (_mock *MockKeybindingSetter) Execute(ctx context.Context, req port.SetKeybindingRequest) (port.SetKeybindingResponse, error) { | |||
| 549 | + | ret := _mock.Called(ctx, req) | |||
| 550 | + | ||||
| 551 | + | if len(ret) == 0 { | |||
| 552 | + | panic("no return value specified for Execute") | |||
| 553 | + | } | |||
| 554 | + | ||||
| 555 | + | var r0 port.SetKeybindingResponse | |||
| 556 | + | var r1 error | |||
| 557 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) (port.SetKeybindingResponse, error)); ok { | |||
| 558 | + | return returnFunc(ctx, req) | |||
| 559 | + | } | |||
| 560 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.SetKeybindingRequest) port.SetKeybindingResponse); ok { | |||
| 561 | + | r0 = returnFunc(ctx, req) | |||
| 562 | + | } else { | |||
| 563 | + | r0 = ret.Get(0).(port.SetKeybindingResponse) | |||
| 564 | + | } | |||
| 565 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, port.SetKeybindingRequest) error); ok { | |||
| 566 | + | r1 = returnFunc(ctx, req) | |||
| 567 | + | } else { | |||
| 568 | + | r1 = ret.Error(1) | |||
| 569 | + | } | |||
| 570 | + | return r0, r1 | |||
| 571 | + | } | |||
| 572 | + | ||||
| 573 | + | // MockKeybindingSetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' | |||
| 574 | + | type MockKeybindingSetter_Execute_Call struct { | |||
| 575 | + | *mock.Call | |||
| 576 | + | } | |||
| 577 | + | ||||
| 578 | + | // Execute is a helper method to define mock.On call | |||
| 579 | + | // - ctx context.Context | |||
| 580 | + | // - req port.SetKeybindingRequest | |||
| 581 | + | func (_e *MockKeybindingSetter_Expecter) Execute(ctx any, req any) *MockKeybindingSetter_Execute_Call { | |||
| 582 | + | return &MockKeybindingSetter_Execute_Call{Call: _e.mock.On("Execute", ctx, req)} | |||
| 583 | + | } | |||
| 584 | + | ||||
| 585 | + | func (_c *MockKeybindingSetter_Execute_Call) Run(run func(ctx context.Context, req port.SetKeybindingRequest)) *MockKeybindingSetter_Execute_Call { | |||
| 586 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 587 | + | var arg0 context.Context | |||
| 588 | + | if args[0] != nil { | |||
| 589 | + | arg0 = args[0].(context.Context) | |||
| 590 | + | } | |||
| 591 | + | var arg1 port.SetKeybindingRequest | |||
| 592 | + | if args[1] != nil { | |||
| 593 | + | arg1 = args[1].(port.SetKeybindingRequest) | |||
| 594 | + | } | |||
| 595 | + | run( | |||
| 596 | + | arg0, | |||
| 597 | + | arg1, | |||
| 598 | + | ) | |||
| 599 | + | }) | |||
| 600 | + | return _c | |||
| 601 | + | } | |||
| 602 | + | ||||
| 603 | + | func (_c *MockKeybindingSetter_Execute_Call) Return(setKeybindingResponse port.SetKeybindingResponse, err error) *MockKeybindingSetter_Execute_Call { | |||
| 604 | + | _c.Call.Return(setKeybindingResponse, err) | |||
| 605 | + | return _c | |||
| 606 | + | } | |||
| 607 | + | ||||
| 608 | + | func (_c *MockKeybindingSetter_Execute_Call) RunAndReturn(run func(ctx context.Context, req port.SetKeybindingRequest) (port.SetKeybindingResponse, error)) *MockKeybindingSetter_Execute_Call { | |||
| 609 | + | _c.Call.Return(run) | |||
| 610 | + | return _c | |||
| 611 | + | } | |||
| 612 | + | ||||
| 613 | + | // NewMockKeybindingResetter creates a new instance of MockKeybindingResetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 614 | + | // The first argument is typically a *testing.T value. | |||
| 615 | + | func NewMockKeybindingResetter(t interface { | |||
| 616 | + | mock.TestingT | |||
| 617 | + | Cleanup(func()) | |||
| 618 | + | }) *MockKeybindingResetter { | |||
| 619 | + | mock := &MockKeybindingResetter{} | |||
| 620 | + | mock.Mock.Test(t) | |||
| 621 | + | ||||
| 622 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 623 | + | ||||
| 624 | + | return mock | |||
| 625 | + | } | |||
| 626 | + | ||||
| 627 | + | // MockKeybindingResetter is an autogenerated mock type for the KeybindingResetter type | |||
| 628 | + | type MockKeybindingResetter struct { | |||
| 629 | + | mock.Mock | |||
| 630 | + | } | |||
| 631 | + | ||||
| 632 | + | type MockKeybindingResetter_Expecter struct { | |||
| 633 | + | mock *mock.Mock | |||
| 634 | + | } | |||
| 635 | + | ||||
| 636 | + | func (_m *MockKeybindingResetter) EXPECT() *MockKeybindingResetter_Expecter { | |||
| 637 | + | return &MockKeybindingResetter_Expecter{mock: &_m.Mock} | |||
| 638 | + | } | |||
| 639 | + | ||||
| 640 | + | // Execute provides a mock function for the type MockKeybindingResetter | |||
| 641 | + | func (_mock *MockKeybindingResetter) Execute(ctx context.Context, req port.ResetKeybindingRequest) error { | |||
| 642 | + | ret := _mock.Called(ctx, req) | |||
| 643 | + | ||||
| 644 | + | if len(ret) == 0 { | |||
| 645 | + | panic("no return value specified for Execute") | |||
| 646 | + | } | |||
| 647 | + | ||||
| 648 | + | var r0 error | |||
| 649 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, port.ResetKeybindingRequest) error); ok { | |||
| 650 | + | r0 = returnFunc(ctx, req) | |||
| 651 | + | } else { | |||
| 652 | + | r0 = ret.Error(0) | |||
| 653 | + | } | |||
| 654 | + | return r0 | |||
| 655 | + | } | |||
| 656 | + | ||||
| 657 | + | // MockKeybindingResetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' | |||
| 658 | + | type MockKeybindingResetter_Execute_Call struct { | |||
| 659 | + | *mock.Call | |||
| 660 | + | } | |||
| 661 | + | ||||
| 662 | + | // Execute is a helper method to define mock.On call | |||
| 663 | + | // - ctx context.Context | |||
| 664 | + | // - req port.ResetKeybindingRequest | |||
| 665 | + | func (_e *MockKeybindingResetter_Expecter) Execute(ctx any, req any) *MockKeybindingResetter_Execute_Call { | |||
| 666 | + | return &MockKeybindingResetter_Execute_Call{Call: _e.mock.On("Execute", ctx, req)} | |||
| 667 | + | } | |||
| 668 | + | ||||
| 669 | + | func (_c *MockKeybindingResetter_Execute_Call) Run(run func(ctx context.Context, req port.ResetKeybindingRequest)) *MockKeybindingResetter_Execute_Call { | |||
| 670 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 671 | + | var arg0 context.Context | |||
| 672 | + | if args[0] != nil { | |||
| 673 | + | arg0 = args[0].(context.Context) | |||
| 674 | + | } | |||
| 675 | + | var arg1 port.ResetKeybindingRequest | |||
| 676 | + | if args[1] != nil { | |||
| 677 | + | arg1 = args[1].(port.ResetKeybindingRequest) | |||
| 678 | + | } | |||
| 679 | + | run( | |||
| 680 | + | arg0, | |||
| 681 | + | arg1, | |||
| 682 | + | ) | |||
| 683 | + | }) | |||
| 684 | + | return _c | |||
| 685 | + | } | |||
| 686 | + | ||||
| 687 | + | func (_c *MockKeybindingResetter_Execute_Call) Return(err error) *MockKeybindingResetter_Execute_Call { | |||
| 688 | + | _c.Call.Return(err) | |||
| 689 | + | return _c | |||
| 690 | + | } | |||
| 691 | + | ||||
| 692 | + | func (_c *MockKeybindingResetter_Execute_Call) RunAndReturn(run func(ctx context.Context, req port.ResetKeybindingRequest) error) *MockKeybindingResetter_Execute_Call { | |||
| 693 | + | _c.Call.Return(run) | |||
| 694 | + | return _c | |||
| 695 | + | } | |||
| 696 | + | ||||
| 697 | + | // NewMockAllKeybindingsResetter creates a new instance of MockAllKeybindingsResetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 698 | + | // The first argument is typically a *testing.T value. | |||
| 699 | + | func NewMockAllKeybindingsResetter(t interface { | |||
| 700 | + | mock.TestingT | |||
| 701 | + | Cleanup(func()) | |||
| 702 | + | }) *MockAllKeybindingsResetter { | |||
| 703 | + | mock := &MockAllKeybindingsResetter{} | |||
| 704 | + | mock.Mock.Test(t) | |||
| 705 | + | ||||
| 706 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 707 | + | ||||
| 708 | + | return mock | |||
| 709 | + | } | |||
| 710 | + | ||||
| 711 | + | // MockAllKeybindingsResetter is an autogenerated mock type for the AllKeybindingsResetter type | |||
| 712 | + | type MockAllKeybindingsResetter struct { | |||
| 713 | + | mock.Mock | |||
| 714 | + | } | |||
| 715 | + | ||||
| 716 | + | type MockAllKeybindingsResetter_Expecter struct { | |||
| 717 | + | mock *mock.Mock | |||
| 718 | + | } | |||
| 719 | + | ||||
| 720 | + | func (_m *MockAllKeybindingsResetter) EXPECT() *MockAllKeybindingsResetter_Expecter { | |||
| 721 | + | return &MockAllKeybindingsResetter_Expecter{mock: &_m.Mock} | |||
| 722 | + | } | |||
| 723 | + | ||||
| 724 | + | // Execute provides a mock function for the type MockAllKeybindingsResetter | |||
| 725 | + | func (_mock *MockAllKeybindingsResetter) Execute(ctx context.Context) error { | |||
| 726 | + | ret := _mock.Called(ctx) | |||
| 727 | + | ||||
| 728 | + | if len(ret) == 0 { | |||
| 729 | + | panic("no return value specified for Execute") | |||
| 730 | + | } | |||
| 731 | + | ||||
| 732 | + | var r0 error | |||
| 733 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 734 | + | r0 = returnFunc(ctx) | |||
| 735 | + | } else { | |||
| 736 | + | r0 = ret.Error(0) | |||
| 737 | + | } | |||
| 738 | + | return r0 | |||
| 739 | + | } | |||
| 740 | + | ||||
| 741 | + | // MockAllKeybindingsResetter_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' | |||
| 742 | + | type MockAllKeybindingsResetter_Execute_Call struct { | |||
| 743 | + | *mock.Call | |||
| 744 | + | } | |||
| 745 | + | ||||
| 746 | + | // Execute is a helper method to define mock.On call | |||
| 747 | + | // - ctx context.Context | |||
| 748 | + | func (_e *MockAllKeybindingsResetter_Expecter) Execute(ctx any) *MockAllKeybindingsResetter_Execute_Call { | |||
| 749 | + | return &MockAllKeybindingsResetter_Execute_Call{Call: _e.mock.On("Execute", ctx)} | |||
| 750 | + | } | |||
| 751 | + | ||||
| 752 | + | func (_c *MockAllKeybindingsResetter_Execute_Call) Run(run func(ctx context.Context)) *MockAllKeybindingsResetter_Execute_Call { | |||
| 753 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 754 | + | var arg0 context.Context | |||
| 755 | + | if args[0] != nil { | |||
| 756 | + | arg0 = args[0].(context.Context) | |||
| 757 | + | } | |||
| 758 | + | run( | |||
| 759 | + | arg0, | |||
| 760 | + | ) | |||
| 761 | + | }) | |||
| 762 | + | return _c | |||
| 763 | + | } | |||
| 764 | + | ||||
| 765 | + | func (_c *MockAllKeybindingsResetter_Execute_Call) Return(err error) *MockAllKeybindingsResetter_Execute_Call { | |||
| 766 | + | _c.Call.Return(err) | |||
| 767 | + | return _c | |||
| 768 | + | } | |||
| 769 | + | ||||
| 770 | + | func (_c *MockAllKeybindingsResetter_Execute_Call) RunAndReturn(run func(ctx context.Context) error) *MockAllKeybindingsResetter_Execute_Call { | |||
| 771 | + | _c.Call.Return(run) | |||
| 772 | + | return _c | |||
| 773 | + | } | |||
A internal/application/port/mocks/media.go +92 -0
| @@ -0,0 +1,92 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockMediaDiagnostics creates a new instance of MockMediaDiagnostics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockMediaDiagnostics(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockMediaDiagnostics { | |||
| 20 | + | mock := &MockMediaDiagnostics{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockMediaDiagnostics is an autogenerated mock type for the MediaDiagnostics type | |||
| 29 | + | type MockMediaDiagnostics struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockMediaDiagnostics_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockMediaDiagnostics) EXPECT() *MockMediaDiagnostics_Expecter { | |||
| 38 | + | return &MockMediaDiagnostics_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // RunDiagnostics provides a mock function for the type MockMediaDiagnostics | |||
| 42 | + | func (_mock *MockMediaDiagnostics) RunDiagnostics(ctx context.Context) *port.MediaDiagnosticsResult { | |||
| 43 | + | ret := _mock.Called(ctx) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for RunDiagnostics") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 *port.MediaDiagnosticsResult | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *port.MediaDiagnosticsResult); ok { | |||
| 51 | + | r0 = returnFunc(ctx) | |||
| 52 | + | } else { | |||
| 53 | + | if ret.Get(0) != nil { | |||
| 54 | + | r0 = ret.Get(0).(*port.MediaDiagnosticsResult) | |||
| 55 | + | } | |||
| 56 | + | } | |||
| 57 | + | return r0 | |||
| 58 | + | } | |||
| 59 | + | ||||
| 60 | + | // MockMediaDiagnostics_RunDiagnostics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunDiagnostics' | |||
| 61 | + | type MockMediaDiagnostics_RunDiagnostics_Call struct { | |||
| 62 | + | *mock.Call | |||
| 63 | + | } | |||
| 64 | + | ||||
| 65 | + | // RunDiagnostics is a helper method to define mock.On call | |||
| 66 | + | // - ctx context.Context | |||
| 67 | + | func (_e *MockMediaDiagnostics_Expecter) RunDiagnostics(ctx any) *MockMediaDiagnostics_RunDiagnostics_Call { | |||
| 68 | + | return &MockMediaDiagnostics_RunDiagnostics_Call{Call: _e.mock.On("RunDiagnostics", ctx)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockMediaDiagnostics_RunDiagnostics_Call) Run(run func(ctx context.Context)) *MockMediaDiagnostics_RunDiagnostics_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | run( | |||
| 78 | + | arg0, | |||
| 79 | + | ) | |||
| 80 | + | }) | |||
| 81 | + | return _c | |||
| 82 | + | } | |||
| 83 | + | ||||
| 84 | + | func (_c *MockMediaDiagnostics_RunDiagnostics_Call) Return(mediaDiagnosticsResult *port.MediaDiagnosticsResult) *MockMediaDiagnostics_RunDiagnostics_Call { | |||
| 85 | + | _c.Call.Return(mediaDiagnosticsResult) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockMediaDiagnostics_RunDiagnostics_Call) RunAndReturn(run func(ctx context.Context) *port.MediaDiagnosticsResult) *MockMediaDiagnostics_RunDiagnostics_Call { | |||
| 90 | + | _c.Call.Return(run) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
D internal/application/port/mocks/mocks.go +0 -16515 large diff (16515 lines changed): collapsed
A internal/application/port/mocks/notification.go +251 -0
| @@ -0,0 +1,251 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockNotification creates a new instance of MockNotification. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockNotification(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockNotification { | |||
| 20 | + | mock := &MockNotification{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockNotification is an autogenerated mock type for the Notification type | |||
| 29 | + | type MockNotification struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockNotification_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockNotification) EXPECT() *MockNotification_Expecter { | |||
| 38 | + | return &MockNotification_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Clear provides a mock function for the type MockNotification | |||
| 42 | + | func (_mock *MockNotification) Clear(ctx context.Context) { | |||
| 43 | + | _mock.Called(ctx) | |||
| 44 | + | return | |||
| 45 | + | } | |||
| 46 | + | ||||
| 47 | + | // MockNotification_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear' | |||
| 48 | + | type MockNotification_Clear_Call struct { | |||
| 49 | + | *mock.Call | |||
| 50 | + | } | |||
| 51 | + | ||||
| 52 | + | // Clear is a helper method to define mock.On call | |||
| 53 | + | // - ctx context.Context | |||
| 54 | + | func (_e *MockNotification_Expecter) Clear(ctx any) *MockNotification_Clear_Call { | |||
| 55 | + | return &MockNotification_Clear_Call{Call: _e.mock.On("Clear", ctx)} | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | func (_c *MockNotification_Clear_Call) Run(run func(ctx context.Context)) *MockNotification_Clear_Call { | |||
| 59 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 60 | + | var arg0 context.Context | |||
| 61 | + | if args[0] != nil { | |||
| 62 | + | arg0 = args[0].(context.Context) | |||
| 63 | + | } | |||
| 64 | + | run( | |||
| 65 | + | arg0, | |||
| 66 | + | ) | |||
| 67 | + | }) | |||
| 68 | + | return _c | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockNotification_Clear_Call) Return() *MockNotification_Clear_Call { | |||
| 72 | + | _c.Call.Return() | |||
| 73 | + | return _c | |||
| 74 | + | } | |||
| 75 | + | ||||
| 76 | + | func (_c *MockNotification_Clear_Call) RunAndReturn(run func(ctx context.Context)) *MockNotification_Clear_Call { | |||
| 77 | + | _c.Run(run) | |||
| 78 | + | return _c | |||
| 79 | + | } | |||
| 80 | + | ||||
| 81 | + | // Dismiss provides a mock function for the type MockNotification | |||
| 82 | + | func (_mock *MockNotification) Dismiss(ctx context.Context, id port.NotificationID) { | |||
| 83 | + | _mock.Called(ctx, id) | |||
| 84 | + | return | |||
| 85 | + | } | |||
| 86 | + | ||||
| 87 | + | // MockNotification_Dismiss_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dismiss' | |||
| 88 | + | type MockNotification_Dismiss_Call struct { | |||
| 89 | + | *mock.Call | |||
| 90 | + | } | |||
| 91 | + | ||||
| 92 | + | // Dismiss is a helper method to define mock.On call | |||
| 93 | + | // - ctx context.Context | |||
| 94 | + | // - id port.NotificationID | |||
| 95 | + | func (_e *MockNotification_Expecter) Dismiss(ctx any, id any) *MockNotification_Dismiss_Call { | |||
| 96 | + | return &MockNotification_Dismiss_Call{Call: _e.mock.On("Dismiss", ctx, id)} | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | func (_c *MockNotification_Dismiss_Call) Run(run func(ctx context.Context, id port.NotificationID)) *MockNotification_Dismiss_Call { | |||
| 100 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 101 | + | var arg0 context.Context | |||
| 102 | + | if args[0] != nil { | |||
| 103 | + | arg0 = args[0].(context.Context) | |||
| 104 | + | } | |||
| 105 | + | var arg1 port.NotificationID | |||
| 106 | + | if args[1] != nil { | |||
| 107 | + | arg1 = args[1].(port.NotificationID) | |||
| 108 | + | } | |||
| 109 | + | run( | |||
| 110 | + | arg0, | |||
| 111 | + | arg1, | |||
| 112 | + | ) | |||
| 113 | + | }) | |||
| 114 | + | return _c | |||
| 115 | + | } | |||
| 116 | + | ||||
| 117 | + | func (_c *MockNotification_Dismiss_Call) Return() *MockNotification_Dismiss_Call { | |||
| 118 | + | _c.Call.Return() | |||
| 119 | + | return _c | |||
| 120 | + | } | |||
| 121 | + | ||||
| 122 | + | func (_c *MockNotification_Dismiss_Call) RunAndReturn(run func(ctx context.Context, id port.NotificationID)) *MockNotification_Dismiss_Call { | |||
| 123 | + | _c.Run(run) | |||
| 124 | + | return _c | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | // Show provides a mock function for the type MockNotification | |||
| 128 | + | func (_mock *MockNotification) Show(ctx context.Context, message string, notifType port.NotificationType, durationMs int) port.NotificationID { | |||
| 129 | + | ret := _mock.Called(ctx, message, notifType, durationMs) | |||
| 130 | + | ||||
| 131 | + | if len(ret) == 0 { | |||
| 132 | + | panic("no return value specified for Show") | |||
| 133 | + | } | |||
| 134 | + | ||||
| 135 | + | var r0 port.NotificationID | |||
| 136 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, port.NotificationType, int) port.NotificationID); ok { | |||
| 137 | + | r0 = returnFunc(ctx, message, notifType, durationMs) | |||
| 138 | + | } else { | |||
| 139 | + | r0 = ret.Get(0).(port.NotificationID) | |||
| 140 | + | } | |||
| 141 | + | return r0 | |||
| 142 | + | } | |||
| 143 | + | ||||
| 144 | + | // MockNotification_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |||
| 145 | + | type MockNotification_Show_Call struct { | |||
| 146 | + | *mock.Call | |||
| 147 | + | } | |||
| 148 | + | ||||
| 149 | + | // Show is a helper method to define mock.On call | |||
| 150 | + | // - ctx context.Context | |||
| 151 | + | // - message string | |||
| 152 | + | // - notifType port.NotificationType | |||
| 153 | + | // - durationMs int | |||
| 154 | + | func (_e *MockNotification_Expecter) Show(ctx any, message any, notifType any, durationMs any) *MockNotification_Show_Call { | |||
| 155 | + | return &MockNotification_Show_Call{Call: _e.mock.On("Show", ctx, message, notifType, durationMs)} | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | func (_c *MockNotification_Show_Call) Run(run func(ctx context.Context, message string, notifType port.NotificationType, durationMs int)) *MockNotification_Show_Call { | |||
| 159 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 160 | + | var arg0 context.Context | |||
| 161 | + | if args[0] != nil { | |||
| 162 | + | arg0 = args[0].(context.Context) | |||
| 163 | + | } | |||
| 164 | + | var arg1 string | |||
| 165 | + | if args[1] != nil { | |||
| 166 | + | arg1 = args[1].(string) | |||
| 167 | + | } | |||
| 168 | + | var arg2 port.NotificationType | |||
| 169 | + | if args[2] != nil { | |||
| 170 | + | arg2 = args[2].(port.NotificationType) | |||
| 171 | + | } | |||
| 172 | + | var arg3 int | |||
| 173 | + | if args[3] != nil { | |||
| 174 | + | arg3 = args[3].(int) | |||
| 175 | + | } | |||
| 176 | + | run( | |||
| 177 | + | arg0, | |||
| 178 | + | arg1, | |||
| 179 | + | arg2, | |||
| 180 | + | arg3, | |||
| 181 | + | ) | |||
| 182 | + | }) | |||
| 183 | + | return _c | |||
| 184 | + | } | |||
| 185 | + | ||||
| 186 | + | func (_c *MockNotification_Show_Call) Return(notificationID port.NotificationID) *MockNotification_Show_Call { | |||
| 187 | + | _c.Call.Return(notificationID) | |||
| 188 | + | return _c | |||
| 189 | + | } | |||
| 190 | + | ||||
| 191 | + | func (_c *MockNotification_Show_Call) RunAndReturn(run func(ctx context.Context, message string, notifType port.NotificationType, durationMs int) port.NotificationID) *MockNotification_Show_Call { | |||
| 192 | + | _c.Call.Return(run) | |||
| 193 | + | return _c | |||
| 194 | + | } | |||
| 195 | + | ||||
| 196 | + | // ShowZoom provides a mock function for the type MockNotification | |||
| 197 | + | func (_mock *MockNotification) ShowZoom(ctx context.Context, zoomPercent int) port.NotificationID { | |||
| 198 | + | ret := _mock.Called(ctx, zoomPercent) | |||
| 199 | + | ||||
| 200 | + | if len(ret) == 0 { | |||
| 201 | + | panic("no return value specified for ShowZoom") | |||
| 202 | + | } | |||
| 203 | + | ||||
| 204 | + | var r0 port.NotificationID | |||
| 205 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) port.NotificationID); ok { | |||
| 206 | + | r0 = returnFunc(ctx, zoomPercent) | |||
| 207 | + | } else { | |||
| 208 | + | r0 = ret.Get(0).(port.NotificationID) | |||
| 209 | + | } | |||
| 210 | + | return r0 | |||
| 211 | + | } | |||
| 212 | + | ||||
| 213 | + | // MockNotification_ShowZoom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowZoom' | |||
| 214 | + | type MockNotification_ShowZoom_Call struct { | |||
| 215 | + | *mock.Call | |||
| 216 | + | } | |||
| 217 | + | ||||
| 218 | + | // ShowZoom is a helper method to define mock.On call | |||
| 219 | + | // - ctx context.Context | |||
| 220 | + | // - zoomPercent int | |||
| 221 | + | func (_e *MockNotification_Expecter) ShowZoom(ctx any, zoomPercent any) *MockNotification_ShowZoom_Call { | |||
| 222 | + | return &MockNotification_ShowZoom_Call{Call: _e.mock.On("ShowZoom", ctx, zoomPercent)} | |||
| 223 | + | } | |||
| 224 | + | ||||
| 225 | + | func (_c *MockNotification_ShowZoom_Call) Run(run func(ctx context.Context, zoomPercent int)) *MockNotification_ShowZoom_Call { | |||
| 226 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 227 | + | var arg0 context.Context | |||
| 228 | + | if args[0] != nil { | |||
| 229 | + | arg0 = args[0].(context.Context) | |||
| 230 | + | } | |||
| 231 | + | var arg1 int | |||
| 232 | + | if args[1] != nil { | |||
| 233 | + | arg1 = args[1].(int) | |||
| 234 | + | } | |||
| 235 | + | run( | |||
| 236 | + | arg0, | |||
| 237 | + | arg1, | |||
| 238 | + | ) | |||
| 239 | + | }) | |||
| 240 | + | return _c | |||
| 241 | + | } | |||
| 242 | + | ||||
| 243 | + | func (_c *MockNotification_ShowZoom_Call) Return(notificationID port.NotificationID) *MockNotification_ShowZoom_Call { | |||
| 244 | + | _c.Call.Return(notificationID) | |||
| 245 | + | return _c | |||
| 246 | + | } | |||
| 247 | + | ||||
| 248 | + | func (_c *MockNotification_ShowZoom_Call) RunAndReturn(run func(ctx context.Context, zoomPercent int) port.NotificationID) *MockNotification_ShowZoom_Call { | |||
| 249 | + | _c.Call.Return(run) | |||
| 250 | + | return _c | |||
| 251 | + | } | |||
A internal/application/port/mocks/omnibox_preferences.go +96 -0
| @@ -0,0 +1,96 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockOmniboxPreferencesSaver creates a new instance of MockOmniboxPreferencesSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockOmniboxPreferencesSaver(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockOmniboxPreferencesSaver { | |||
| 20 | + | mock := &MockOmniboxPreferencesSaver{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockOmniboxPreferencesSaver is an autogenerated mock type for the OmniboxPreferencesSaver type | |||
| 29 | + | type MockOmniboxPreferencesSaver struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockOmniboxPreferencesSaver_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockOmniboxPreferencesSaver) EXPECT() *MockOmniboxPreferencesSaver_Expecter { | |||
| 38 | + | return &MockOmniboxPreferencesSaver_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // SaveOmniboxInitialBehavior provides a mock function for the type MockOmniboxPreferencesSaver | |||
| 42 | + | func (_mock *MockOmniboxPreferencesSaver) SaveOmniboxInitialBehavior(ctx context.Context, behavior entity.OmniboxInitialBehavior) error { | |||
| 43 | + | ret := _mock.Called(ctx, behavior) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for SaveOmniboxInitialBehavior") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.OmniboxInitialBehavior) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, behavior) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveOmniboxInitialBehavior' | |||
| 59 | + | type MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // SaveOmniboxInitialBehavior is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - behavior entity.OmniboxInitialBehavior | |||
| 66 | + | func (_e *MockOmniboxPreferencesSaver_Expecter) SaveOmniboxInitialBehavior(ctx any, behavior any) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call { | |||
| 67 | + | return &MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call{Call: _e.mock.On("SaveOmniboxInitialBehavior", ctx, behavior)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) Run(run func(ctx context.Context, behavior entity.OmniboxInitialBehavior)) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 context.Context | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(context.Context) | |||
| 75 | + | } | |||
| 76 | + | var arg1 entity.OmniboxInitialBehavior | |||
| 77 | + | if args[1] != nil { | |||
| 78 | + | arg1 = args[1].(entity.OmniboxInitialBehavior) | |||
| 79 | + | } | |||
| 80 | + | run( | |||
| 81 | + | arg0, | |||
| 82 | + | arg1, | |||
| 83 | + | ) | |||
| 84 | + | }) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) Return(err error) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call { | |||
| 89 | + | _c.Call.Return(err) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call) RunAndReturn(run func(ctx context.Context, behavior entity.OmniboxInitialBehavior) error) *MockOmniboxPreferencesSaver_SaveOmniboxInitialBehavior_Call { | |||
| 94 | + | _c.Call.Return(run) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
A internal/application/port/mocks/permission.go +104 -0
| @@ -0,0 +1,104 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockPermissionDialogPresenter creates a new instance of MockPermissionDialogPresenter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockPermissionDialogPresenter(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockPermissionDialogPresenter { | |||
| 21 | + | mock := &MockPermissionDialogPresenter{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockPermissionDialogPresenter is an autogenerated mock type for the PermissionDialogPresenter type | |||
| 30 | + | type MockPermissionDialogPresenter struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockPermissionDialogPresenter_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockPermissionDialogPresenter) EXPECT() *MockPermissionDialogPresenter_Expecter { | |||
| 39 | + | return &MockPermissionDialogPresenter_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // ShowPermissionDialog provides a mock function for the type MockPermissionDialogPresenter | |||
| 43 | + | func (_mock *MockPermissionDialogPresenter) ShowPermissionDialog(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult)) { | |||
| 44 | + | _mock.Called(ctx, origin, permTypes, metadata, callback) | |||
| 45 | + | return | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | // MockPermissionDialogPresenter_ShowPermissionDialog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowPermissionDialog' | |||
| 49 | + | type MockPermissionDialogPresenter_ShowPermissionDialog_Call struct { | |||
| 50 | + | *mock.Call | |||
| 51 | + | } | |||
| 52 | + | ||||
| 53 | + | // ShowPermissionDialog is a helper method to define mock.On call | |||
| 54 | + | // - ctx context.Context | |||
| 55 | + | // - origin string | |||
| 56 | + | // - permTypes []entity.PermissionType | |||
| 57 | + | // - metadata entity.PermissionMetadata | |||
| 58 | + | // - callback func(result port.PermissionDialogResult) | |||
| 59 | + | func (_e *MockPermissionDialogPresenter_Expecter) ShowPermissionDialog(ctx any, origin any, permTypes any, metadata any, callback any) *MockPermissionDialogPresenter_ShowPermissionDialog_Call { | |||
| 60 | + | return &MockPermissionDialogPresenter_ShowPermissionDialog_Call{Call: _e.mock.On("ShowPermissionDialog", ctx, origin, permTypes, metadata, callback)} | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) Run(run func(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult))) *MockPermissionDialogPresenter_ShowPermissionDialog_Call { | |||
| 64 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 65 | + | var arg0 context.Context | |||
| 66 | + | if args[0] != nil { | |||
| 67 | + | arg0 = args[0].(context.Context) | |||
| 68 | + | } | |||
| 69 | + | var arg1 string | |||
| 70 | + | if args[1] != nil { | |||
| 71 | + | arg1 = args[1].(string) | |||
| 72 | + | } | |||
| 73 | + | var arg2 []entity.PermissionType | |||
| 74 | + | if args[2] != nil { | |||
| 75 | + | arg2 = args[2].([]entity.PermissionType) | |||
| 76 | + | } | |||
| 77 | + | var arg3 entity.PermissionMetadata | |||
| 78 | + | if args[3] != nil { | |||
| 79 | + | arg3 = args[3].(entity.PermissionMetadata) | |||
| 80 | + | } | |||
| 81 | + | var arg4 func(result port.PermissionDialogResult) | |||
| 82 | + | if args[4] != nil { | |||
| 83 | + | arg4 = args[4].(func(result port.PermissionDialogResult)) | |||
| 84 | + | } | |||
| 85 | + | run( | |||
| 86 | + | arg0, | |||
| 87 | + | arg1, | |||
| 88 | + | arg2, | |||
| 89 | + | arg3, | |||
| 90 | + | arg4, | |||
| 91 | + | ) | |||
| 92 | + | }) | |||
| 93 | + | return _c | |||
| 94 | + | } | |||
| 95 | + | ||||
| 96 | + | func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) Return() *MockPermissionDialogPresenter_ShowPermissionDialog_Call { | |||
| 97 | + | _c.Call.Return() | |||
| 98 | + | return _c | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | func (_c *MockPermissionDialogPresenter_ShowPermissionDialog_Call) RunAndReturn(run func(ctx context.Context, origin string, permTypes []entity.PermissionType, metadata entity.PermissionMetadata, callback func(result port.PermissionDialogResult))) *MockPermissionDialogPresenter_ShowPermissionDialog_Call { | |||
| 102 | + | _c.Run(run) | |||
| 103 | + | return _c | |||
| 104 | + | } | |||
A internal/application/port/mocks/permission_repository.go +301 -0
| @@ -0,0 +1,301 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockPermissionRepository creates a new instance of MockPermissionRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockPermissionRepository(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockPermissionRepository { | |||
| 20 | + | mock := &MockPermissionRepository{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockPermissionRepository is an autogenerated mock type for the PermissionRepository type | |||
| 29 | + | type MockPermissionRepository struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockPermissionRepository_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockPermissionRepository) EXPECT() *MockPermissionRepository_Expecter { | |||
| 38 | + | return &MockPermissionRepository_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Delete provides a mock function for the type MockPermissionRepository | |||
| 42 | + | func (_mock *MockPermissionRepository) Delete(ctx context.Context, origin string, permType entity.PermissionType) error { | |||
| 43 | + | ret := _mock.Called(ctx, origin, permType) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Delete") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, origin, permType) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockPermissionRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 59 | + | type MockPermissionRepository_Delete_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // Delete is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - origin string | |||
| 66 | + | // - permType entity.PermissionType | |||
| 67 | + | func (_e *MockPermissionRepository_Expecter) Delete(ctx any, origin any, permType any) *MockPermissionRepository_Delete_Call { | |||
| 68 | + | return &MockPermissionRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, origin, permType)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockPermissionRepository_Delete_Call) Run(run func(ctx context.Context, origin string, permType entity.PermissionType)) *MockPermissionRepository_Delete_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | var arg1 string | |||
| 78 | + | if args[1] != nil { | |||
| 79 | + | arg1 = args[1].(string) | |||
| 80 | + | } | |||
| 81 | + | var arg2 entity.PermissionType | |||
| 82 | + | if args[2] != nil { | |||
| 83 | + | arg2 = args[2].(entity.PermissionType) | |||
| 84 | + | } | |||
| 85 | + | run( | |||
| 86 | + | arg0, | |||
| 87 | + | arg1, | |||
| 88 | + | arg2, | |||
| 89 | + | ) | |||
| 90 | + | }) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | func (_c *MockPermissionRepository_Delete_Call) Return(err error) *MockPermissionRepository_Delete_Call { | |||
| 95 | + | _c.Call.Return(err) | |||
| 96 | + | return _c | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | func (_c *MockPermissionRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, origin string, permType entity.PermissionType) error) *MockPermissionRepository_Delete_Call { | |||
| 100 | + | _c.Call.Return(run) | |||
| 101 | + | return _c | |||
| 102 | + | } | |||
| 103 | + | ||||
| 104 | + | // Get provides a mock function for the type MockPermissionRepository | |||
| 105 | + | func (_mock *MockPermissionRepository) Get(ctx context.Context, origin string, permType entity.PermissionType) (*entity.PermissionRecord, error) { | |||
| 106 | + | ret := _mock.Called(ctx, origin, permType) | |||
| 107 | + | ||||
| 108 | + | if len(ret) == 0 { | |||
| 109 | + | panic("no return value specified for Get") | |||
| 110 | + | } | |||
| 111 | + | ||||
| 112 | + | var r0 *entity.PermissionRecord | |||
| 113 | + | var r1 error | |||
| 114 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) (*entity.PermissionRecord, error)); ok { | |||
| 115 | + | return returnFunc(ctx, origin, permType) | |||
| 116 | + | } | |||
| 117 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, entity.PermissionType) *entity.PermissionRecord); ok { | |||
| 118 | + | r0 = returnFunc(ctx, origin, permType) | |||
| 119 | + | } else { | |||
| 120 | + | if ret.Get(0) != nil { | |||
| 121 | + | r0 = ret.Get(0).(*entity.PermissionRecord) | |||
| 122 | + | } | |||
| 123 | + | } | |||
| 124 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, entity.PermissionType) error); ok { | |||
| 125 | + | r1 = returnFunc(ctx, origin, permType) | |||
| 126 | + | } else { | |||
| 127 | + | r1 = ret.Error(1) | |||
| 128 | + | } | |||
| 129 | + | return r0, r1 | |||
| 130 | + | } | |||
| 131 | + | ||||
| 132 | + | // MockPermissionRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' | |||
| 133 | + | type MockPermissionRepository_Get_Call struct { | |||
| 134 | + | *mock.Call | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | // Get is a helper method to define mock.On call | |||
| 138 | + | // - ctx context.Context | |||
| 139 | + | // - origin string | |||
| 140 | + | // - permType entity.PermissionType | |||
| 141 | + | func (_e *MockPermissionRepository_Expecter) Get(ctx any, origin any, permType any) *MockPermissionRepository_Get_Call { | |||
| 142 | + | return &MockPermissionRepository_Get_Call{Call: _e.mock.On("Get", ctx, origin, permType)} | |||
| 143 | + | } | |||
| 144 | + | ||||
| 145 | + | func (_c *MockPermissionRepository_Get_Call) Run(run func(ctx context.Context, origin string, permType entity.PermissionType)) *MockPermissionRepository_Get_Call { | |||
| 146 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 147 | + | var arg0 context.Context | |||
| 148 | + | if args[0] != nil { | |||
| 149 | + | arg0 = args[0].(context.Context) | |||
| 150 | + | } | |||
| 151 | + | var arg1 string | |||
| 152 | + | if args[1] != nil { | |||
| 153 | + | arg1 = args[1].(string) | |||
| 154 | + | } | |||
| 155 | + | var arg2 entity.PermissionType | |||
| 156 | + | if args[2] != nil { | |||
| 157 | + | arg2 = args[2].(entity.PermissionType) | |||
| 158 | + | } | |||
| 159 | + | run( | |||
| 160 | + | arg0, | |||
| 161 | + | arg1, | |||
| 162 | + | arg2, | |||
| 163 | + | ) | |||
| 164 | + | }) | |||
| 165 | + | return _c | |||
| 166 | + | } | |||
| 167 | + | ||||
| 168 | + | func (_c *MockPermissionRepository_Get_Call) Return(permissionRecord *entity.PermissionRecord, err error) *MockPermissionRepository_Get_Call { | |||
| 169 | + | _c.Call.Return(permissionRecord, err) | |||
| 170 | + | return _c | |||
| 171 | + | } | |||
| 172 | + | ||||
| 173 | + | func (_c *MockPermissionRepository_Get_Call) RunAndReturn(run func(ctx context.Context, origin string, permType entity.PermissionType) (*entity.PermissionRecord, error)) *MockPermissionRepository_Get_Call { | |||
| 174 | + | _c.Call.Return(run) | |||
| 175 | + | return _c | |||
| 176 | + | } | |||
| 177 | + | ||||
| 178 | + | // GetAll provides a mock function for the type MockPermissionRepository | |||
| 179 | + | func (_mock *MockPermissionRepository) GetAll(ctx context.Context, origin string) ([]*entity.PermissionRecord, error) { | |||
| 180 | + | ret := _mock.Called(ctx, origin) | |||
| 181 | + | ||||
| 182 | + | if len(ret) == 0 { | |||
| 183 | + | panic("no return value specified for GetAll") | |||
| 184 | + | } | |||
| 185 | + | ||||
| 186 | + | var r0 []*entity.PermissionRecord | |||
| 187 | + | var r1 error | |||
| 188 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.PermissionRecord, error)); ok { | |||
| 189 | + | return returnFunc(ctx, origin) | |||
| 190 | + | } | |||
| 191 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.PermissionRecord); ok { | |||
| 192 | + | r0 = returnFunc(ctx, origin) | |||
| 193 | + | } else { | |||
| 194 | + | if ret.Get(0) != nil { | |||
| 195 | + | r0 = ret.Get(0).([]*entity.PermissionRecord) | |||
| 196 | + | } | |||
| 197 | + | } | |||
| 198 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 199 | + | r1 = returnFunc(ctx, origin) | |||
| 200 | + | } else { | |||
| 201 | + | r1 = ret.Error(1) | |||
| 202 | + | } | |||
| 203 | + | return r0, r1 | |||
| 204 | + | } | |||
| 205 | + | ||||
| 206 | + | // MockPermissionRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' | |||
| 207 | + | type MockPermissionRepository_GetAll_Call struct { | |||
| 208 | + | *mock.Call | |||
| 209 | + | } | |||
| 210 | + | ||||
| 211 | + | // GetAll is a helper method to define mock.On call | |||
| 212 | + | // - ctx context.Context | |||
| 213 | + | // - origin string | |||
| 214 | + | func (_e *MockPermissionRepository_Expecter) GetAll(ctx any, origin any) *MockPermissionRepository_GetAll_Call { | |||
| 215 | + | return &MockPermissionRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx, origin)} | |||
| 216 | + | } | |||
| 217 | + | ||||
| 218 | + | func (_c *MockPermissionRepository_GetAll_Call) Run(run func(ctx context.Context, origin string)) *MockPermissionRepository_GetAll_Call { | |||
| 219 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 220 | + | var arg0 context.Context | |||
| 221 | + | if args[0] != nil { | |||
| 222 | + | arg0 = args[0].(context.Context) | |||
| 223 | + | } | |||
| 224 | + | var arg1 string | |||
| 225 | + | if args[1] != nil { | |||
| 226 | + | arg1 = args[1].(string) | |||
| 227 | + | } | |||
| 228 | + | run( | |||
| 229 | + | arg0, | |||
| 230 | + | arg1, | |||
| 231 | + | ) | |||
| 232 | + | }) | |||
| 233 | + | return _c | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | func (_c *MockPermissionRepository_GetAll_Call) Return(permissionRecords []*entity.PermissionRecord, err error) *MockPermissionRepository_GetAll_Call { | |||
| 237 | + | _c.Call.Return(permissionRecords, err) | |||
| 238 | + | return _c | |||
| 239 | + | } | |||
| 240 | + | ||||
| 241 | + | func (_c *MockPermissionRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context, origin string) ([]*entity.PermissionRecord, error)) *MockPermissionRepository_GetAll_Call { | |||
| 242 | + | _c.Call.Return(run) | |||
| 243 | + | return _c | |||
| 244 | + | } | |||
| 245 | + | ||||
| 246 | + | // Set provides a mock function for the type MockPermissionRepository | |||
| 247 | + | func (_mock *MockPermissionRepository) Set(ctx context.Context, record *entity.PermissionRecord) error { | |||
| 248 | + | ret := _mock.Called(ctx, record) | |||
| 249 | + | ||||
| 250 | + | if len(ret) == 0 { | |||
| 251 | + | panic("no return value specified for Set") | |||
| 252 | + | } | |||
| 253 | + | ||||
| 254 | + | var r0 error | |||
| 255 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.PermissionRecord) error); ok { | |||
| 256 | + | r0 = returnFunc(ctx, record) | |||
| 257 | + | } else { | |||
| 258 | + | r0 = ret.Error(0) | |||
| 259 | + | } | |||
| 260 | + | return r0 | |||
| 261 | + | } | |||
| 262 | + | ||||
| 263 | + | // MockPermissionRepository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' | |||
| 264 | + | type MockPermissionRepository_Set_Call struct { | |||
| 265 | + | *mock.Call | |||
| 266 | + | } | |||
| 267 | + | ||||
| 268 | + | // Set is a helper method to define mock.On call | |||
| 269 | + | // - ctx context.Context | |||
| 270 | + | // - record *entity.PermissionRecord | |||
| 271 | + | func (_e *MockPermissionRepository_Expecter) Set(ctx any, record any) *MockPermissionRepository_Set_Call { | |||
| 272 | + | return &MockPermissionRepository_Set_Call{Call: _e.mock.On("Set", ctx, record)} | |||
| 273 | + | } | |||
| 274 | + | ||||
| 275 | + | func (_c *MockPermissionRepository_Set_Call) Run(run func(ctx context.Context, record *entity.PermissionRecord)) *MockPermissionRepository_Set_Call { | |||
| 276 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 277 | + | var arg0 context.Context | |||
| 278 | + | if args[0] != nil { | |||
| 279 | + | arg0 = args[0].(context.Context) | |||
| 280 | + | } | |||
| 281 | + | var arg1 *entity.PermissionRecord | |||
| 282 | + | if args[1] != nil { | |||
| 283 | + | arg1 = args[1].(*entity.PermissionRecord) | |||
| 284 | + | } | |||
| 285 | + | run( | |||
| 286 | + | arg0, | |||
| 287 | + | arg1, | |||
| 288 | + | ) | |||
| 289 | + | }) | |||
| 290 | + | return _c | |||
| 291 | + | } | |||
| 292 | + | ||||
| 293 | + | func (_c *MockPermissionRepository_Set_Call) Return(err error) *MockPermissionRepository_Set_Call { | |||
| 294 | + | _c.Call.Return(err) | |||
| 295 | + | return _c | |||
| 296 | + | } | |||
| 297 | + | ||||
| 298 | + | func (_c *MockPermissionRepository_Set_Call) RunAndReturn(run func(ctx context.Context, record *entity.PermissionRecord) error) *MockPermissionRepository_Set_Call { | |||
| 299 | + | _c.Call.Return(run) | |||
| 300 | + | return _c | |||
| 301 | + | } | |||
A internal/application/port/mocks/rendering_env.go +136 -0
| @@ -0,0 +1,136 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockRenderingEnvManager creates a new instance of MockRenderingEnvManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockRenderingEnvManager(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockRenderingEnvManager { | |||
| 20 | + | mock := &MockRenderingEnvManager{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockRenderingEnvManager is an autogenerated mock type for the RenderingEnvManager type | |||
| 29 | + | type MockRenderingEnvManager struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockRenderingEnvManager_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockRenderingEnvManager) EXPECT() *MockRenderingEnvManager_Expecter { | |||
| 38 | + | return &MockRenderingEnvManager_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // DetectGPUVendor provides a mock function for the type MockRenderingEnvManager | |||
| 42 | + | func (_mock *MockRenderingEnvManager) DetectGPUVendor(ctx context.Context) port.GPUVendor { | |||
| 43 | + | ret := _mock.Called(ctx) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for DetectGPUVendor") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 port.GPUVendor | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) port.GPUVendor); ok { | |||
| 51 | + | r0 = returnFunc(ctx) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Get(0).(port.GPUVendor) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockRenderingEnvManager_DetectGPUVendor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectGPUVendor' | |||
| 59 | + | type MockRenderingEnvManager_DetectGPUVendor_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // DetectGPUVendor is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | func (_e *MockRenderingEnvManager_Expecter) DetectGPUVendor(ctx any) *MockRenderingEnvManager_DetectGPUVendor_Call { | |||
| 66 | + | return &MockRenderingEnvManager_DetectGPUVendor_Call{Call: _e.mock.On("DetectGPUVendor", ctx)} | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) Run(run func(ctx context.Context)) *MockRenderingEnvManager_DetectGPUVendor_Call { | |||
| 70 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 71 | + | var arg0 context.Context | |||
| 72 | + | if args[0] != nil { | |||
| 73 | + | arg0 = args[0].(context.Context) | |||
| 74 | + | } | |||
| 75 | + | run( | |||
| 76 | + | arg0, | |||
| 77 | + | ) | |||
| 78 | + | }) | |||
| 79 | + | return _c | |||
| 80 | + | } | |||
| 81 | + | ||||
| 82 | + | func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) Return(gPUVendor port.GPUVendor) *MockRenderingEnvManager_DetectGPUVendor_Call { | |||
| 83 | + | _c.Call.Return(gPUVendor) | |||
| 84 | + | return _c | |||
| 85 | + | } | |||
| 86 | + | ||||
| 87 | + | func (_c *MockRenderingEnvManager_DetectGPUVendor_Call) RunAndReturn(run func(ctx context.Context) port.GPUVendor) *MockRenderingEnvManager_DetectGPUVendor_Call { | |||
| 88 | + | _c.Call.Return(run) | |||
| 89 | + | return _c | |||
| 90 | + | } | |||
| 91 | + | ||||
| 92 | + | // GetAppliedVars provides a mock function for the type MockRenderingEnvManager | |||
| 93 | + | func (_mock *MockRenderingEnvManager) GetAppliedVars() map[string]string { | |||
| 94 | + | ret := _mock.Called() | |||
| 95 | + | ||||
| 96 | + | if len(ret) == 0 { | |||
| 97 | + | panic("no return value specified for GetAppliedVars") | |||
| 98 | + | } | |||
| 99 | + | ||||
| 100 | + | var r0 map[string]string | |||
| 101 | + | if returnFunc, ok := ret.Get(0).(func() map[string]string); ok { | |||
| 102 | + | r0 = returnFunc() | |||
| 103 | + | } else { | |||
| 104 | + | if ret.Get(0) != nil { | |||
| 105 | + | r0 = ret.Get(0).(map[string]string) | |||
| 106 | + | } | |||
| 107 | + | } | |||
| 108 | + | return r0 | |||
| 109 | + | } | |||
| 110 | + | ||||
| 111 | + | // MockRenderingEnvManager_GetAppliedVars_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppliedVars' | |||
| 112 | + | type MockRenderingEnvManager_GetAppliedVars_Call struct { | |||
| 113 | + | *mock.Call | |||
| 114 | + | } | |||
| 115 | + | ||||
| 116 | + | // GetAppliedVars is a helper method to define mock.On call | |||
| 117 | + | func (_e *MockRenderingEnvManager_Expecter) GetAppliedVars() *MockRenderingEnvManager_GetAppliedVars_Call { | |||
| 118 | + | return &MockRenderingEnvManager_GetAppliedVars_Call{Call: _e.mock.On("GetAppliedVars")} | |||
| 119 | + | } | |||
| 120 | + | ||||
| 121 | + | func (_c *MockRenderingEnvManager_GetAppliedVars_Call) Run(run func()) *MockRenderingEnvManager_GetAppliedVars_Call { | |||
| 122 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 123 | + | run() | |||
| 124 | + | }) | |||
| 125 | + | return _c | |||
| 126 | + | } | |||
| 127 | + | ||||
| 128 | + | func (_c *MockRenderingEnvManager_GetAppliedVars_Call) Return(stringToString map[string]string) *MockRenderingEnvManager_GetAppliedVars_Call { | |||
| 129 | + | _c.Call.Return(stringToString) | |||
| 130 | + | return _c | |||
| 131 | + | } | |||
| 132 | + | ||||
| 133 | + | func (_c *MockRenderingEnvManager_GetAppliedVars_Call) RunAndReturn(run func() map[string]string) *MockRenderingEnvManager_GetAppliedVars_Call { | |||
| 134 | + | _c.Call.Return(run) | |||
| 135 | + | return _c | |||
| 136 | + | } | |||
A internal/application/port/mocks/runtime.go +110 -0
| @@ -0,0 +1,110 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | mock "github.com/stretchr/testify/mock" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // NewMockRuntimeVersionProbe creates a new instance of MockRuntimeVersionProbe. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 14 | + | // The first argument is typically a *testing.T value. | |||
| 15 | + | func NewMockRuntimeVersionProbe(t interface { | |||
| 16 | + | mock.TestingT | |||
| 17 | + | Cleanup(func()) | |||
| 18 | + | }) *MockRuntimeVersionProbe { | |||
| 19 | + | mock := &MockRuntimeVersionProbe{} | |||
| 20 | + | mock.Mock.Test(t) | |||
| 21 | + | ||||
| 22 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 23 | + | ||||
| 24 | + | return mock | |||
| 25 | + | } | |||
| 26 | + | ||||
| 27 | + | // MockRuntimeVersionProbe is an autogenerated mock type for the RuntimeVersionProbe type | |||
| 28 | + | type MockRuntimeVersionProbe struct { | |||
| 29 | + | mock.Mock | |||
| 30 | + | } | |||
| 31 | + | ||||
| 32 | + | type MockRuntimeVersionProbe_Expecter struct { | |||
| 33 | + | mock *mock.Mock | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | func (_m *MockRuntimeVersionProbe) EXPECT() *MockRuntimeVersionProbe_Expecter { | |||
| 37 | + | return &MockRuntimeVersionProbe_Expecter{mock: &_m.Mock} | |||
| 38 | + | } | |||
| 39 | + | ||||
| 40 | + | // PkgConfigModVersion provides a mock function for the type MockRuntimeVersionProbe | |||
| 41 | + | func (_mock *MockRuntimeVersionProbe) PkgConfigModVersion(ctx context.Context, pkgName string, prefix string) (string, error) { | |||
| 42 | + | ret := _mock.Called(ctx, pkgName, prefix) | |||
| 43 | + | ||||
| 44 | + | if len(ret) == 0 { | |||
| 45 | + | panic("no return value specified for PkgConfigModVersion") | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | var r0 string | |||
| 49 | + | var r1 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { | |||
| 51 | + | return returnFunc(ctx, pkgName, prefix) | |||
| 52 | + | } | |||
| 53 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok { | |||
| 54 | + | r0 = returnFunc(ctx, pkgName, prefix) | |||
| 55 | + | } else { | |||
| 56 | + | r0 = ret.Get(0).(string) | |||
| 57 | + | } | |||
| 58 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { | |||
| 59 | + | r1 = returnFunc(ctx, pkgName, prefix) | |||
| 60 | + | } else { | |||
| 61 | + | r1 = ret.Error(1) | |||
| 62 | + | } | |||
| 63 | + | return r0, r1 | |||
| 64 | + | } | |||
| 65 | + | ||||
| 66 | + | // MockRuntimeVersionProbe_PkgConfigModVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PkgConfigModVersion' | |||
| 67 | + | type MockRuntimeVersionProbe_PkgConfigModVersion_Call struct { | |||
| 68 | + | *mock.Call | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | // PkgConfigModVersion is a helper method to define mock.On call | |||
| 72 | + | // - ctx context.Context | |||
| 73 | + | // - pkgName string | |||
| 74 | + | // - prefix string | |||
| 75 | + | func (_e *MockRuntimeVersionProbe_Expecter) PkgConfigModVersion(ctx any, pkgName any, prefix any) *MockRuntimeVersionProbe_PkgConfigModVersion_Call { | |||
| 76 | + | return &MockRuntimeVersionProbe_PkgConfigModVersion_Call{Call: _e.mock.On("PkgConfigModVersion", ctx, pkgName, prefix)} | |||
| 77 | + | } | |||
| 78 | + | ||||
| 79 | + | func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) Run(run func(ctx context.Context, pkgName string, prefix string)) *MockRuntimeVersionProbe_PkgConfigModVersion_Call { | |||
| 80 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 81 | + | var arg0 context.Context | |||
| 82 | + | if args[0] != nil { | |||
| 83 | + | arg0 = args[0].(context.Context) | |||
| 84 | + | } | |||
| 85 | + | var arg1 string | |||
| 86 | + | if args[1] != nil { | |||
| 87 | + | arg1 = args[1].(string) | |||
| 88 | + | } | |||
| 89 | + | var arg2 string | |||
| 90 | + | if args[2] != nil { | |||
| 91 | + | arg2 = args[2].(string) | |||
| 92 | + | } | |||
| 93 | + | run( | |||
| 94 | + | arg0, | |||
| 95 | + | arg1, | |||
| 96 | + | arg2, | |||
| 97 | + | ) | |||
| 98 | + | }) | |||
| 99 | + | return _c | |||
| 100 | + | } | |||
| 101 | + | ||||
| 102 | + | func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) Return(s string, err error) *MockRuntimeVersionProbe_PkgConfigModVersion_Call { | |||
| 103 | + | _c.Call.Return(s, err) | |||
| 104 | + | return _c | |||
| 105 | + | } | |||
| 106 | + | ||||
| 107 | + | func (_c *MockRuntimeVersionProbe_PkgConfigModVersion_Call) RunAndReturn(run func(ctx context.Context, pkgName string, prefix string) (string, error)) *MockRuntimeVersionProbe_PkgConfigModVersion_Call { | |||
| 108 | + | _c.Call.Return(run) | |||
| 109 | + | return _c | |||
| 110 | + | } | |||
R internal/application/port/mocks/runtime_config_provider.go → internal/application/port/mocks/runtime_config.go +0 -0 renamed, 100% similar
renamed, 100% similar
A internal/application/port/mocks/session_logger.go +121 -0
| @@ -0,0 +1,121 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 12 | + | "github.com/rs/zerolog" | |||
| 13 | + | mock "github.com/stretchr/testify/mock" | |||
| 14 | + | ) | |||
| 15 | + | ||||
| 16 | + | // NewMockSessionLogger creates a new instance of MockSessionLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 17 | + | // The first argument is typically a *testing.T value. | |||
| 18 | + | func NewMockSessionLogger(t interface { | |||
| 19 | + | mock.TestingT | |||
| 20 | + | Cleanup(func()) | |||
| 21 | + | }) *MockSessionLogger { | |||
| 22 | + | mock := &MockSessionLogger{} | |||
| 23 | + | mock.Mock.Test(t) | |||
| 24 | + | ||||
| 25 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 26 | + | ||||
| 27 | + | return mock | |||
| 28 | + | } | |||
| 29 | + | ||||
| 30 | + | // MockSessionLogger is an autogenerated mock type for the SessionLogger type | |||
| 31 | + | type MockSessionLogger struct { | |||
| 32 | + | mock.Mock | |||
| 33 | + | } | |||
| 34 | + | ||||
| 35 | + | type MockSessionLogger_Expecter struct { | |||
| 36 | + | mock *mock.Mock | |||
| 37 | + | } | |||
| 38 | + | ||||
| 39 | + | func (_m *MockSessionLogger) EXPECT() *MockSessionLogger_Expecter { | |||
| 40 | + | return &MockSessionLogger_Expecter{mock: &_m.Mock} | |||
| 41 | + | } | |||
| 42 | + | ||||
| 43 | + | // CreateLogger provides a mock function for the type MockSessionLogger | |||
| 44 | + | func (_mock *MockSessionLogger) CreateLogger(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error) { | |||
| 45 | + | ret := _mock.Called(ctx, sessionID, cfg) | |||
| 46 | + | ||||
| 47 | + | if len(ret) == 0 { | |||
| 48 | + | panic("no return value specified for CreateLogger") | |||
| 49 | + | } | |||
| 50 | + | ||||
| 51 | + | var r0 zerolog.Logger | |||
| 52 | + | var r1 func() | |||
| 53 | + | var r2 error | |||
| 54 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) (zerolog.Logger, func(), error)); ok { | |||
| 55 | + | return returnFunc(ctx, sessionID, cfg) | |||
| 56 | + | } | |||
| 57 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, port.SessionLogConfig) zerolog.Logger); ok { | |||
| 58 | + | r0 = returnFunc(ctx, sessionID, cfg) | |||
| 59 | + | } else { | |||
| 60 | + | r0 = ret.Get(0).(zerolog.Logger) | |||
| 61 | + | } | |||
| 62 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID, port.SessionLogConfig) func()); ok { | |||
| 63 | + | r1 = returnFunc(ctx, sessionID, cfg) | |||
| 64 | + | } else { | |||
| 65 | + | if ret.Get(1) != nil { | |||
| 66 | + | r1 = ret.Get(1).(func()) | |||
| 67 | + | } | |||
| 68 | + | } | |||
| 69 | + | if returnFunc, ok := ret.Get(2).(func(context.Context, entity.SessionID, port.SessionLogConfig) error); ok { | |||
| 70 | + | r2 = returnFunc(ctx, sessionID, cfg) | |||
| 71 | + | } else { | |||
| 72 | + | r2 = ret.Error(2) | |||
| 73 | + | } | |||
| 74 | + | return r0, r1, r2 | |||
| 75 | + | } | |||
| 76 | + | ||||
| 77 | + | // MockSessionLogger_CreateLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLogger' | |||
| 78 | + | type MockSessionLogger_CreateLogger_Call struct { | |||
| 79 | + | *mock.Call | |||
| 80 | + | } | |||
| 81 | + | ||||
| 82 | + | // CreateLogger is a helper method to define mock.On call | |||
| 83 | + | // - ctx context.Context | |||
| 84 | + | // - sessionID entity.SessionID | |||
| 85 | + | // - cfg port.SessionLogConfig | |||
| 86 | + | func (_e *MockSessionLogger_Expecter) CreateLogger(ctx any, sessionID any, cfg any) *MockSessionLogger_CreateLogger_Call { | |||
| 87 | + | return &MockSessionLogger_CreateLogger_Call{Call: _e.mock.On("CreateLogger", ctx, sessionID, cfg)} | |||
| 88 | + | } | |||
| 89 | + | ||||
| 90 | + | func (_c *MockSessionLogger_CreateLogger_Call) Run(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig)) *MockSessionLogger_CreateLogger_Call { | |||
| 91 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 92 | + | var arg0 context.Context | |||
| 93 | + | if args[0] != nil { | |||
| 94 | + | arg0 = args[0].(context.Context) | |||
| 95 | + | } | |||
| 96 | + | var arg1 entity.SessionID | |||
| 97 | + | if args[1] != nil { | |||
| 98 | + | arg1 = args[1].(entity.SessionID) | |||
| 99 | + | } | |||
| 100 | + | var arg2 port.SessionLogConfig | |||
| 101 | + | if args[2] != nil { | |||
| 102 | + | arg2 = args[2].(port.SessionLogConfig) | |||
| 103 | + | } | |||
| 104 | + | run( | |||
| 105 | + | arg0, | |||
| 106 | + | arg1, | |||
| 107 | + | arg2, | |||
| 108 | + | ) | |||
| 109 | + | }) | |||
| 110 | + | return _c | |||
| 111 | + | } | |||
| 112 | + | ||||
| 113 | + | func (_c *MockSessionLogger_CreateLogger_Call) Return(logger zerolog.Logger, fn func(), err error) *MockSessionLogger_CreateLogger_Call { | |||
| 114 | + | _c.Call.Return(logger, fn, err) | |||
| 115 | + | return _c | |||
| 116 | + | } | |||
| 117 | + | ||||
| 118 | + | func (_c *MockSessionLogger_CreateLogger_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID, cfg port.SessionLogConfig) (zerolog.Logger, func(), error)) *MockSessionLogger_CreateLogger_Call { | |||
| 119 | + | _c.Call.Return(run) | |||
| 120 | + | return _c | |||
| 121 | + | } | |||
A internal/application/port/mocks/session_process.go +104 -0
| @@ -0,0 +1,104 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | mock "github.com/stretchr/testify/mock" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // NewMockSessionProcessProbe creates a new instance of MockSessionProcessProbe. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 14 | + | // The first argument is typically a *testing.T value. | |||
| 15 | + | func NewMockSessionProcessProbe(t interface { | |||
| 16 | + | mock.TestingT | |||
| 17 | + | Cleanup(func()) | |||
| 18 | + | }) *MockSessionProcessProbe { | |||
| 19 | + | mock := &MockSessionProcessProbe{} | |||
| 20 | + | mock.Mock.Test(t) | |||
| 21 | + | ||||
| 22 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 23 | + | ||||
| 24 | + | return mock | |||
| 25 | + | } | |||
| 26 | + | ||||
| 27 | + | // MockSessionProcessProbe is an autogenerated mock type for the SessionProcessProbe type | |||
| 28 | + | type MockSessionProcessProbe struct { | |||
| 29 | + | mock.Mock | |||
| 30 | + | } | |||
| 31 | + | ||||
| 32 | + | type MockSessionProcessProbe_Expecter struct { | |||
| 33 | + | mock *mock.Mock | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | func (_m *MockSessionProcessProbe) EXPECT() *MockSessionProcessProbe_Expecter { | |||
| 37 | + | return &MockSessionProcessProbe_Expecter{mock: &_m.Mock} | |||
| 38 | + | } | |||
| 39 | + | ||||
| 40 | + | // IsProcessAlive provides a mock function for the type MockSessionProcessProbe | |||
| 41 | + | func (_mock *MockSessionProcessProbe) IsProcessAlive(ctx context.Context, pid int) (bool, error) { | |||
| 42 | + | ret := _mock.Called(ctx, pid) | |||
| 43 | + | ||||
| 44 | + | if len(ret) == 0 { | |||
| 45 | + | panic("no return value specified for IsProcessAlive") | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | var r0 bool | |||
| 49 | + | var r1 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) (bool, error)); ok { | |||
| 51 | + | return returnFunc(ctx, pid) | |||
| 52 | + | } | |||
| 53 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) bool); ok { | |||
| 54 | + | r0 = returnFunc(ctx, pid) | |||
| 55 | + | } else { | |||
| 56 | + | r0 = ret.Get(0).(bool) | |||
| 57 | + | } | |||
| 58 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 59 | + | r1 = returnFunc(ctx, pid) | |||
| 60 | + | } else { | |||
| 61 | + | r1 = ret.Error(1) | |||
| 62 | + | } | |||
| 63 | + | return r0, r1 | |||
| 64 | + | } | |||
| 65 | + | ||||
| 66 | + | // MockSessionProcessProbe_IsProcessAlive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsProcessAlive' | |||
| 67 | + | type MockSessionProcessProbe_IsProcessAlive_Call struct { | |||
| 68 | + | *mock.Call | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | // IsProcessAlive is a helper method to define mock.On call | |||
| 72 | + | // - ctx context.Context | |||
| 73 | + | // - pid int | |||
| 74 | + | func (_e *MockSessionProcessProbe_Expecter) IsProcessAlive(ctx any, pid any) *MockSessionProcessProbe_IsProcessAlive_Call { | |||
| 75 | + | return &MockSessionProcessProbe_IsProcessAlive_Call{Call: _e.mock.On("IsProcessAlive", ctx, pid)} | |||
| 76 | + | } | |||
| 77 | + | ||||
| 78 | + | func (_c *MockSessionProcessProbe_IsProcessAlive_Call) Run(run func(ctx context.Context, pid int)) *MockSessionProcessProbe_IsProcessAlive_Call { | |||
| 79 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 80 | + | var arg0 context.Context | |||
| 81 | + | if args[0] != nil { | |||
| 82 | + | arg0 = args[0].(context.Context) | |||
| 83 | + | } | |||
| 84 | + | var arg1 int | |||
| 85 | + | if args[1] != nil { | |||
| 86 | + | arg1 = args[1].(int) | |||
| 87 | + | } | |||
| 88 | + | run( | |||
| 89 | + | arg0, | |||
| 90 | + | arg1, | |||
| 91 | + | ) | |||
| 92 | + | }) | |||
| 93 | + | return _c | |||
| 94 | + | } | |||
| 95 | + | ||||
| 96 | + | func (_c *MockSessionProcessProbe_IsProcessAlive_Call) Return(b bool, err error) *MockSessionProcessProbe_IsProcessAlive_Call { | |||
| 97 | + | _c.Call.Return(b, err) | |||
| 98 | + | return _c | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | func (_c *MockSessionProcessProbe_IsProcessAlive_Call) RunAndReturn(run func(ctx context.Context, pid int) (bool, error)) *MockSessionProcessProbe_IsProcessAlive_Call { | |||
| 102 | + | _c.Call.Return(run) | |||
| 103 | + | return _c | |||
| 104 | + | } | |||
A internal/application/port/mocks/session_state.go +541 -0
| @@ -0,0 +1,541 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockWindowStateProvider creates a new instance of MockWindowStateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockWindowStateProvider(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockWindowStateProvider { | |||
| 20 | + | mock := &MockWindowStateProvider{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockWindowStateProvider is an autogenerated mock type for the WindowStateProvider type | |||
| 29 | + | type MockWindowStateProvider struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockWindowStateProvider_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockWindowStateProvider) EXPECT() *MockWindowStateProvider_Expecter { | |||
| 38 | + | return &MockWindowStateProvider_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // GetActiveWindowIndex provides a mock function for the type MockWindowStateProvider | |||
| 42 | + | func (_mock *MockWindowStateProvider) GetActiveWindowIndex() int { | |||
| 43 | + | ret := _mock.Called() | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for GetActiveWindowIndex") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 int | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func() int); ok { | |||
| 51 | + | r0 = returnFunc() | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Get(0).(int) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockWindowStateProvider_GetActiveWindowIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActiveWindowIndex' | |||
| 59 | + | type MockWindowStateProvider_GetActiveWindowIndex_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // GetActiveWindowIndex is a helper method to define mock.On call | |||
| 64 | + | func (_e *MockWindowStateProvider_Expecter) GetActiveWindowIndex() *MockWindowStateProvider_GetActiveWindowIndex_Call { | |||
| 65 | + | return &MockWindowStateProvider_GetActiveWindowIndex_Call{Call: _e.mock.On("GetActiveWindowIndex")} | |||
| 66 | + | } | |||
| 67 | + | ||||
| 68 | + | func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) Run(run func()) *MockWindowStateProvider_GetActiveWindowIndex_Call { | |||
| 69 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 70 | + | run() | |||
| 71 | + | }) | |||
| 72 | + | return _c | |||
| 73 | + | } | |||
| 74 | + | ||||
| 75 | + | func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) Return(n int) *MockWindowStateProvider_GetActiveWindowIndex_Call { | |||
| 76 | + | _c.Call.Return(n) | |||
| 77 | + | return _c | |||
| 78 | + | } | |||
| 79 | + | ||||
| 80 | + | func (_c *MockWindowStateProvider_GetActiveWindowIndex_Call) RunAndReturn(run func() int) *MockWindowStateProvider_GetActiveWindowIndex_Call { | |||
| 81 | + | _c.Call.Return(run) | |||
| 82 | + | return _c | |||
| 83 | + | } | |||
| 84 | + | ||||
| 85 | + | // GetSessionID provides a mock function for the type MockWindowStateProvider | |||
| 86 | + | func (_mock *MockWindowStateProvider) GetSessionID() entity.SessionID { | |||
| 87 | + | ret := _mock.Called() | |||
| 88 | + | ||||
| 89 | + | if len(ret) == 0 { | |||
| 90 | + | panic("no return value specified for GetSessionID") | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | var r0 entity.SessionID | |||
| 94 | + | if returnFunc, ok := ret.Get(0).(func() entity.SessionID); ok { | |||
| 95 | + | r0 = returnFunc() | |||
| 96 | + | } else { | |||
| 97 | + | r0 = ret.Get(0).(entity.SessionID) | |||
| 98 | + | } | |||
| 99 | + | return r0 | |||
| 100 | + | } | |||
| 101 | + | ||||
| 102 | + | // MockWindowStateProvider_GetSessionID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessionID' | |||
| 103 | + | type MockWindowStateProvider_GetSessionID_Call struct { | |||
| 104 | + | *mock.Call | |||
| 105 | + | } | |||
| 106 | + | ||||
| 107 | + | // GetSessionID is a helper method to define mock.On call | |||
| 108 | + | func (_e *MockWindowStateProvider_Expecter) GetSessionID() *MockWindowStateProvider_GetSessionID_Call { | |||
| 109 | + | return &MockWindowStateProvider_GetSessionID_Call{Call: _e.mock.On("GetSessionID")} | |||
| 110 | + | } | |||
| 111 | + | ||||
| 112 | + | func (_c *MockWindowStateProvider_GetSessionID_Call) Run(run func()) *MockWindowStateProvider_GetSessionID_Call { | |||
| 113 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 114 | + | run() | |||
| 115 | + | }) | |||
| 116 | + | return _c | |||
| 117 | + | } | |||
| 118 | + | ||||
| 119 | + | func (_c *MockWindowStateProvider_GetSessionID_Call) Return(sessionID entity.SessionID) *MockWindowStateProvider_GetSessionID_Call { | |||
| 120 | + | _c.Call.Return(sessionID) | |||
| 121 | + | return _c | |||
| 122 | + | } | |||
| 123 | + | ||||
| 124 | + | func (_c *MockWindowStateProvider_GetSessionID_Call) RunAndReturn(run func() entity.SessionID) *MockWindowStateProvider_GetSessionID_Call { | |||
| 125 | + | _c.Call.Return(run) | |||
| 126 | + | return _c | |||
| 127 | + | } | |||
| 128 | + | ||||
| 129 | + | // GetWindowSnapshotState provides a mock function for the type MockWindowStateProvider | |||
| 130 | + | func (_mock *MockWindowStateProvider) GetWindowSnapshotState() ([]entity.WindowTabListState, int) { | |||
| 131 | + | ret := _mock.Called() | |||
| 132 | + | ||||
| 133 | + | if len(ret) == 0 { | |||
| 134 | + | panic("no return value specified for GetWindowSnapshotState") | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | var r0 []entity.WindowTabListState | |||
| 138 | + | var r1 int | |||
| 139 | + | if returnFunc, ok := ret.Get(0).(func() ([]entity.WindowTabListState, int)); ok { | |||
| 140 | + | return returnFunc() | |||
| 141 | + | } | |||
| 142 | + | if returnFunc, ok := ret.Get(0).(func() []entity.WindowTabListState); ok { | |||
| 143 | + | r0 = returnFunc() | |||
| 144 | + | } else { | |||
| 145 | + | if ret.Get(0) != nil { | |||
| 146 | + | r0 = ret.Get(0).([]entity.WindowTabListState) | |||
| 147 | + | } | |||
| 148 | + | } | |||
| 149 | + | if returnFunc, ok := ret.Get(1).(func() int); ok { | |||
| 150 | + | r1 = returnFunc() | |||
| 151 | + | } else { | |||
| 152 | + | r1 = ret.Get(1).(int) | |||
| 153 | + | } | |||
| 154 | + | return r0, r1 | |||
| 155 | + | } | |||
| 156 | + | ||||
| 157 | + | // MockWindowStateProvider_GetWindowSnapshotState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWindowSnapshotState' | |||
| 158 | + | type MockWindowStateProvider_GetWindowSnapshotState_Call struct { | |||
| 159 | + | *mock.Call | |||
| 160 | + | } | |||
| 161 | + | ||||
| 162 | + | // GetWindowSnapshotState is a helper method to define mock.On call | |||
| 163 | + | func (_e *MockWindowStateProvider_Expecter) GetWindowSnapshotState() *MockWindowStateProvider_GetWindowSnapshotState_Call { | |||
| 164 | + | return &MockWindowStateProvider_GetWindowSnapshotState_Call{Call: _e.mock.On("GetWindowSnapshotState")} | |||
| 165 | + | } | |||
| 166 | + | ||||
| 167 | + | func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) Run(run func()) *MockWindowStateProvider_GetWindowSnapshotState_Call { | |||
| 168 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 169 | + | run() | |||
| 170 | + | }) | |||
| 171 | + | return _c | |||
| 172 | + | } | |||
| 173 | + | ||||
| 174 | + | func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) Return(windowTabListStates []entity.WindowTabListState, n int) *MockWindowStateProvider_GetWindowSnapshotState_Call { | |||
| 175 | + | _c.Call.Return(windowTabListStates, n) | |||
| 176 | + | return _c | |||
| 177 | + | } | |||
| 178 | + | ||||
| 179 | + | func (_c *MockWindowStateProvider_GetWindowSnapshotState_Call) RunAndReturn(run func() ([]entity.WindowTabListState, int)) *MockWindowStateProvider_GetWindowSnapshotState_Call { | |||
| 180 | + | _c.Call.Return(run) | |||
| 181 | + | return _c | |||
| 182 | + | } | |||
| 183 | + | ||||
| 184 | + | // GetWindowTabLists provides a mock function for the type MockWindowStateProvider | |||
| 185 | + | func (_mock *MockWindowStateProvider) GetWindowTabLists() []entity.WindowTabListState { | |||
| 186 | + | ret := _mock.Called() | |||
| 187 | + | ||||
| 188 | + | if len(ret) == 0 { | |||
| 189 | + | panic("no return value specified for GetWindowTabLists") | |||
| 190 | + | } | |||
| 191 | + | ||||
| 192 | + | var r0 []entity.WindowTabListState | |||
| 193 | + | if returnFunc, ok := ret.Get(0).(func() []entity.WindowTabListState); ok { | |||
| 194 | + | r0 = returnFunc() | |||
| 195 | + | } else { | |||
| 196 | + | if ret.Get(0) != nil { | |||
| 197 | + | r0 = ret.Get(0).([]entity.WindowTabListState) | |||
| 198 | + | } | |||
| 199 | + | } | |||
| 200 | + | return r0 | |||
| 201 | + | } | |||
| 202 | + | ||||
| 203 | + | // MockWindowStateProvider_GetWindowTabLists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWindowTabLists' | |||
| 204 | + | type MockWindowStateProvider_GetWindowTabLists_Call struct { | |||
| 205 | + | *mock.Call | |||
| 206 | + | } | |||
| 207 | + | ||||
| 208 | + | // GetWindowTabLists is a helper method to define mock.On call | |||
| 209 | + | func (_e *MockWindowStateProvider_Expecter) GetWindowTabLists() *MockWindowStateProvider_GetWindowTabLists_Call { | |||
| 210 | + | return &MockWindowStateProvider_GetWindowTabLists_Call{Call: _e.mock.On("GetWindowTabLists")} | |||
| 211 | + | } | |||
| 212 | + | ||||
| 213 | + | func (_c *MockWindowStateProvider_GetWindowTabLists_Call) Run(run func()) *MockWindowStateProvider_GetWindowTabLists_Call { | |||
| 214 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 215 | + | run() | |||
| 216 | + | }) | |||
| 217 | + | return _c | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | func (_c *MockWindowStateProvider_GetWindowTabLists_Call) Return(windowTabListStates []entity.WindowTabListState) *MockWindowStateProvider_GetWindowTabLists_Call { | |||
| 221 | + | _c.Call.Return(windowTabListStates) | |||
| 222 | + | return _c | |||
| 223 | + | } | |||
| 224 | + | ||||
| 225 | + | func (_c *MockWindowStateProvider_GetWindowTabLists_Call) RunAndReturn(run func() []entity.WindowTabListState) *MockWindowStateProvider_GetWindowTabLists_Call { | |||
| 226 | + | _c.Call.Return(run) | |||
| 227 | + | return _c | |||
| 228 | + | } | |||
| 229 | + | ||||
| 230 | + | // NewMockSessionSpawner creates a new instance of MockSessionSpawner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 231 | + | // The first argument is typically a *testing.T value. | |||
| 232 | + | func NewMockSessionSpawner(t interface { | |||
| 233 | + | mock.TestingT | |||
| 234 | + | Cleanup(func()) | |||
| 235 | + | }) *MockSessionSpawner { | |||
| 236 | + | mock := &MockSessionSpawner{} | |||
| 237 | + | mock.Mock.Test(t) | |||
| 238 | + | ||||
| 239 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 240 | + | ||||
| 241 | + | return mock | |||
| 242 | + | } | |||
| 243 | + | ||||
| 244 | + | // MockSessionSpawner is an autogenerated mock type for the SessionSpawner type | |||
| 245 | + | type MockSessionSpawner struct { | |||
| 246 | + | mock.Mock | |||
| 247 | + | } | |||
| 248 | + | ||||
| 249 | + | type MockSessionSpawner_Expecter struct { | |||
| 250 | + | mock *mock.Mock | |||
| 251 | + | } | |||
| 252 | + | ||||
| 253 | + | func (_m *MockSessionSpawner) EXPECT() *MockSessionSpawner_Expecter { | |||
| 254 | + | return &MockSessionSpawner_Expecter{mock: &_m.Mock} | |||
| 255 | + | } | |||
| 256 | + | ||||
| 257 | + | // SpawnWithSession provides a mock function for the type MockSessionSpawner | |||
| 258 | + | func (_mock *MockSessionSpawner) SpawnWithSession(sessionID entity.SessionID) error { | |||
| 259 | + | ret := _mock.Called(sessionID) | |||
| 260 | + | ||||
| 261 | + | if len(ret) == 0 { | |||
| 262 | + | panic("no return value specified for SpawnWithSession") | |||
| 263 | + | } | |||
| 264 | + | ||||
| 265 | + | var r0 error | |||
| 266 | + | if returnFunc, ok := ret.Get(0).(func(entity.SessionID) error); ok { | |||
| 267 | + | r0 = returnFunc(sessionID) | |||
| 268 | + | } else { | |||
| 269 | + | r0 = ret.Error(0) | |||
| 270 | + | } | |||
| 271 | + | return r0 | |||
| 272 | + | } | |||
| 273 | + | ||||
| 274 | + | // MockSessionSpawner_SpawnWithSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SpawnWithSession' | |||
| 275 | + | type MockSessionSpawner_SpawnWithSession_Call struct { | |||
| 276 | + | *mock.Call | |||
| 277 | + | } | |||
| 278 | + | ||||
| 279 | + | // SpawnWithSession is a helper method to define mock.On call | |||
| 280 | + | // - sessionID entity.SessionID | |||
| 281 | + | func (_e *MockSessionSpawner_Expecter) SpawnWithSession(sessionID any) *MockSessionSpawner_SpawnWithSession_Call { | |||
| 282 | + | return &MockSessionSpawner_SpawnWithSession_Call{Call: _e.mock.On("SpawnWithSession", sessionID)} | |||
| 283 | + | } | |||
| 284 | + | ||||
| 285 | + | func (_c *MockSessionSpawner_SpawnWithSession_Call) Run(run func(sessionID entity.SessionID)) *MockSessionSpawner_SpawnWithSession_Call { | |||
| 286 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 287 | + | var arg0 entity.SessionID | |||
| 288 | + | if args[0] != nil { | |||
| 289 | + | arg0 = args[0].(entity.SessionID) | |||
| 290 | + | } | |||
| 291 | + | run( | |||
| 292 | + | arg0, | |||
| 293 | + | ) | |||
| 294 | + | }) | |||
| 295 | + | return _c | |||
| 296 | + | } | |||
| 297 | + | ||||
| 298 | + | func (_c *MockSessionSpawner_SpawnWithSession_Call) Return(err error) *MockSessionSpawner_SpawnWithSession_Call { | |||
| 299 | + | _c.Call.Return(err) | |||
| 300 | + | return _c | |||
| 301 | + | } | |||
| 302 | + | ||||
| 303 | + | func (_c *MockSessionSpawner_SpawnWithSession_Call) RunAndReturn(run func(sessionID entity.SessionID) error) *MockSessionSpawner_SpawnWithSession_Call { | |||
| 304 | + | _c.Call.Return(run) | |||
| 305 | + | return _c | |||
| 306 | + | } | |||
| 307 | + | ||||
| 308 | + | // NewMockSnapshotService creates a new instance of MockSnapshotService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 309 | + | // The first argument is typically a *testing.T value. | |||
| 310 | + | func NewMockSnapshotService(t interface { | |||
| 311 | + | mock.TestingT | |||
| 312 | + | Cleanup(func()) | |||
| 313 | + | }) *MockSnapshotService { | |||
| 314 | + | mock := &MockSnapshotService{} | |||
| 315 | + | mock.Mock.Test(t) | |||
| 316 | + | ||||
| 317 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 318 | + | ||||
| 319 | + | return mock | |||
| 320 | + | } | |||
| 321 | + | ||||
| 322 | + | // MockSnapshotService is an autogenerated mock type for the SnapshotService type | |||
| 323 | + | type MockSnapshotService struct { | |||
| 324 | + | mock.Mock | |||
| 325 | + | } | |||
| 326 | + | ||||
| 327 | + | type MockSnapshotService_Expecter struct { | |||
| 328 | + | mock *mock.Mock | |||
| 329 | + | } | |||
| 330 | + | ||||
| 331 | + | func (_m *MockSnapshotService) EXPECT() *MockSnapshotService_Expecter { | |||
| 332 | + | return &MockSnapshotService_Expecter{mock: &_m.Mock} | |||
| 333 | + | } | |||
| 334 | + | ||||
| 335 | + | // MarkDirty provides a mock function for the type MockSnapshotService | |||
| 336 | + | func (_mock *MockSnapshotService) MarkDirty() { | |||
| 337 | + | _mock.Called() | |||
| 338 | + | return | |||
| 339 | + | } | |||
| 340 | + | ||||
| 341 | + | // MockSnapshotService_MarkDirty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkDirty' | |||
| 342 | + | type MockSnapshotService_MarkDirty_Call struct { | |||
| 343 | + | *mock.Call | |||
| 344 | + | } | |||
| 345 | + | ||||
| 346 | + | // MarkDirty is a helper method to define mock.On call | |||
| 347 | + | func (_e *MockSnapshotService_Expecter) MarkDirty() *MockSnapshotService_MarkDirty_Call { | |||
| 348 | + | return &MockSnapshotService_MarkDirty_Call{Call: _e.mock.On("MarkDirty")} | |||
| 349 | + | } | |||
| 350 | + | ||||
| 351 | + | func (_c *MockSnapshotService_MarkDirty_Call) Run(run func()) *MockSnapshotService_MarkDirty_Call { | |||
| 352 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 353 | + | run() | |||
| 354 | + | }) | |||
| 355 | + | return _c | |||
| 356 | + | } | |||
| 357 | + | ||||
| 358 | + | func (_c *MockSnapshotService_MarkDirty_Call) Return() *MockSnapshotService_MarkDirty_Call { | |||
| 359 | + | _c.Call.Return() | |||
| 360 | + | return _c | |||
| 361 | + | } | |||
| 362 | + | ||||
| 363 | + | func (_c *MockSnapshotService_MarkDirty_Call) RunAndReturn(run func()) *MockSnapshotService_MarkDirty_Call { | |||
| 364 | + | _c.Run(run) | |||
| 365 | + | return _c | |||
| 366 | + | } | |||
| 367 | + | ||||
| 368 | + | // SaveNow provides a mock function for the type MockSnapshotService | |||
| 369 | + | func (_mock *MockSnapshotService) SaveNow(ctx context.Context) error { | |||
| 370 | + | ret := _mock.Called(ctx) | |||
| 371 | + | ||||
| 372 | + | if len(ret) == 0 { | |||
| 373 | + | panic("no return value specified for SaveNow") | |||
| 374 | + | } | |||
| 375 | + | ||||
| 376 | + | var r0 error | |||
| 377 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 378 | + | r0 = returnFunc(ctx) | |||
| 379 | + | } else { | |||
| 380 | + | r0 = ret.Error(0) | |||
| 381 | + | } | |||
| 382 | + | return r0 | |||
| 383 | + | } | |||
| 384 | + | ||||
| 385 | + | // MockSnapshotService_SaveNow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveNow' | |||
| 386 | + | type MockSnapshotService_SaveNow_Call struct { | |||
| 387 | + | *mock.Call | |||
| 388 | + | } | |||
| 389 | + | ||||
| 390 | + | // SaveNow is a helper method to define mock.On call | |||
| 391 | + | // - ctx context.Context | |||
| 392 | + | func (_e *MockSnapshotService_Expecter) SaveNow(ctx any) *MockSnapshotService_SaveNow_Call { | |||
| 393 | + | return &MockSnapshotService_SaveNow_Call{Call: _e.mock.On("SaveNow", ctx)} | |||
| 394 | + | } | |||
| 395 | + | ||||
| 396 | + | func (_c *MockSnapshotService_SaveNow_Call) Run(run func(ctx context.Context)) *MockSnapshotService_SaveNow_Call { | |||
| 397 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 398 | + | var arg0 context.Context | |||
| 399 | + | if args[0] != nil { | |||
| 400 | + | arg0 = args[0].(context.Context) | |||
| 401 | + | } | |||
| 402 | + | run( | |||
| 403 | + | arg0, | |||
| 404 | + | ) | |||
| 405 | + | }) | |||
| 406 | + | return _c | |||
| 407 | + | } | |||
| 408 | + | ||||
| 409 | + | func (_c *MockSnapshotService_SaveNow_Call) Return(err error) *MockSnapshotService_SaveNow_Call { | |||
| 410 | + | _c.Call.Return(err) | |||
| 411 | + | return _c | |||
| 412 | + | } | |||
| 413 | + | ||||
| 414 | + | func (_c *MockSnapshotService_SaveNow_Call) RunAndReturn(run func(ctx context.Context) error) *MockSnapshotService_SaveNow_Call { | |||
| 415 | + | _c.Call.Return(run) | |||
| 416 | + | return _c | |||
| 417 | + | } | |||
| 418 | + | ||||
| 419 | + | // SetReady provides a mock function for the type MockSnapshotService | |||
| 420 | + | func (_mock *MockSnapshotService) SetReady() { | |||
| 421 | + | _mock.Called() | |||
| 422 | + | return | |||
| 423 | + | } | |||
| 424 | + | ||||
| 425 | + | // MockSnapshotService_SetReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReady' | |||
| 426 | + | type MockSnapshotService_SetReady_Call struct { | |||
| 427 | + | *mock.Call | |||
| 428 | + | } | |||
| 429 | + | ||||
| 430 | + | // SetReady is a helper method to define mock.On call | |||
| 431 | + | func (_e *MockSnapshotService_Expecter) SetReady() *MockSnapshotService_SetReady_Call { | |||
| 432 | + | return &MockSnapshotService_SetReady_Call{Call: _e.mock.On("SetReady")} | |||
| 433 | + | } | |||
| 434 | + | ||||
| 435 | + | func (_c *MockSnapshotService_SetReady_Call) Run(run func()) *MockSnapshotService_SetReady_Call { | |||
| 436 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 437 | + | run() | |||
| 438 | + | }) | |||
| 439 | + | return _c | |||
| 440 | + | } | |||
| 441 | + | ||||
| 442 | + | func (_c *MockSnapshotService_SetReady_Call) Return() *MockSnapshotService_SetReady_Call { | |||
| 443 | + | _c.Call.Return() | |||
| 444 | + | return _c | |||
| 445 | + | } | |||
| 446 | + | ||||
| 447 | + | func (_c *MockSnapshotService_SetReady_Call) RunAndReturn(run func()) *MockSnapshotService_SetReady_Call { | |||
| 448 | + | _c.Run(run) | |||
| 449 | + | return _c | |||
| 450 | + | } | |||
| 451 | + | ||||
| 452 | + | // Start provides a mock function for the type MockSnapshotService | |||
| 453 | + | func (_mock *MockSnapshotService) Start(ctx context.Context) { | |||
| 454 | + | _mock.Called(ctx) | |||
| 455 | + | return | |||
| 456 | + | } | |||
| 457 | + | ||||
| 458 | + | // MockSnapshotService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' | |||
| 459 | + | type MockSnapshotService_Start_Call struct { | |||
| 460 | + | *mock.Call | |||
| 461 | + | } | |||
| 462 | + | ||||
| 463 | + | // Start is a helper method to define mock.On call | |||
| 464 | + | // - ctx context.Context | |||
| 465 | + | func (_e *MockSnapshotService_Expecter) Start(ctx any) *MockSnapshotService_Start_Call { | |||
| 466 | + | return &MockSnapshotService_Start_Call{Call: _e.mock.On("Start", ctx)} | |||
| 467 | + | } | |||
| 468 | + | ||||
| 469 | + | func (_c *MockSnapshotService_Start_Call) Run(run func(ctx context.Context)) *MockSnapshotService_Start_Call { | |||
| 470 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 471 | + | var arg0 context.Context | |||
| 472 | + | if args[0] != nil { | |||
| 473 | + | arg0 = args[0].(context.Context) | |||
| 474 | + | } | |||
| 475 | + | run( | |||
| 476 | + | arg0, | |||
| 477 | + | ) | |||
| 478 | + | }) | |||
| 479 | + | return _c | |||
| 480 | + | } | |||
| 481 | + | ||||
| 482 | + | func (_c *MockSnapshotService_Start_Call) Return() *MockSnapshotService_Start_Call { | |||
| 483 | + | _c.Call.Return() | |||
| 484 | + | return _c | |||
| 485 | + | } | |||
| 486 | + | ||||
| 487 | + | func (_c *MockSnapshotService_Start_Call) RunAndReturn(run func(ctx context.Context)) *MockSnapshotService_Start_Call { | |||
| 488 | + | _c.Run(run) | |||
| 489 | + | return _c | |||
| 490 | + | } | |||
| 491 | + | ||||
| 492 | + | // Stop provides a mock function for the type MockSnapshotService | |||
| 493 | + | func (_mock *MockSnapshotService) Stop(ctx context.Context) error { | |||
| 494 | + | ret := _mock.Called(ctx) | |||
| 495 | + | ||||
| 496 | + | if len(ret) == 0 { | |||
| 497 | + | panic("no return value specified for Stop") | |||
| 498 | + | } | |||
| 499 | + | ||||
| 500 | + | var r0 error | |||
| 501 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 502 | + | r0 = returnFunc(ctx) | |||
| 503 | + | } else { | |||
| 504 | + | r0 = ret.Error(0) | |||
| 505 | + | } | |||
| 506 | + | return r0 | |||
| 507 | + | } | |||
| 508 | + | ||||
| 509 | + | // MockSnapshotService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' | |||
| 510 | + | type MockSnapshotService_Stop_Call struct { | |||
| 511 | + | *mock.Call | |||
| 512 | + | } | |||
| 513 | + | ||||
| 514 | + | // Stop is a helper method to define mock.On call | |||
| 515 | + | // - ctx context.Context | |||
| 516 | + | func (_e *MockSnapshotService_Expecter) Stop(ctx any) *MockSnapshotService_Stop_Call { | |||
| 517 | + | return &MockSnapshotService_Stop_Call{Call: _e.mock.On("Stop", ctx)} | |||
| 518 | + | } | |||
| 519 | + | ||||
| 520 | + | func (_c *MockSnapshotService_Stop_Call) Run(run func(ctx context.Context)) *MockSnapshotService_Stop_Call { | |||
| 521 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 522 | + | var arg0 context.Context | |||
| 523 | + | if args[0] != nil { | |||
| 524 | + | arg0 = args[0].(context.Context) | |||
| 525 | + | } | |||
| 526 | + | run( | |||
| 527 | + | arg0, | |||
| 528 | + | ) | |||
| 529 | + | }) | |||
| 530 | + | return _c | |||
| 531 | + | } | |||
| 532 | + | ||||
| 533 | + | func (_c *MockSnapshotService_Stop_Call) Return(err error) *MockSnapshotService_Stop_Call { | |||
| 534 | + | _c.Call.Return(err) | |||
| 535 | + | return _c | |||
| 536 | + | } | |||
| 537 | + | ||||
| 538 | + | func (_c *MockSnapshotService_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockSnapshotService_Stop_Call { | |||
| 539 | + | _c.Call.Return(run) | |||
| 540 | + | return _c | |||
| 541 | + | } | |||
A internal/application/port/mocks/text_input.go +518 -0
| @@ -0,0 +1,518 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockTextInputTarget creates a new instance of MockTextInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockTextInputTarget(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockTextInputTarget { | |||
| 20 | + | mock := &MockTextInputTarget{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockTextInputTarget is an autogenerated mock type for the TextInputTarget type | |||
| 29 | + | type MockTextInputTarget struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockTextInputTarget_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockTextInputTarget) EXPECT() *MockTextInputTarget_Expecter { | |||
| 38 | + | return &MockTextInputTarget_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // DeleteBeforeCursor provides a mock function for the type MockTextInputTarget | |||
| 42 | + | func (_mock *MockTextInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error { | |||
| 43 | + | ret := _mock.Called(ctx, n) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for DeleteBeforeCursor") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, n) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockTextInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor' | |||
| 59 | + | type MockTextInputTarget_DeleteBeforeCursor_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // DeleteBeforeCursor is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - n int | |||
| 66 | + | func (_e *MockTextInputTarget_Expecter) DeleteBeforeCursor(ctx any, n any) *MockTextInputTarget_DeleteBeforeCursor_Call { | |||
| 67 | + | return &MockTextInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockTextInputTarget_DeleteBeforeCursor_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 context.Context | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(context.Context) | |||
| 75 | + | } | |||
| 76 | + | var arg1 int | |||
| 77 | + | if args[1] != nil { | |||
| 78 | + | arg1 = args[1].(int) | |||
| 79 | + | } | |||
| 80 | + | run( | |||
| 81 | + | arg0, | |||
| 82 | + | arg1, | |||
| 83 | + | ) | |||
| 84 | + | }) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockTextInputTarget_DeleteBeforeCursor_Call { | |||
| 89 | + | _c.Call.Return(err) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockTextInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockTextInputTarget_DeleteBeforeCursor_Call { | |||
| 94 | + | _c.Call.Return(run) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | // InsertText provides a mock function for the type MockTextInputTarget | |||
| 99 | + | func (_mock *MockTextInputTarget) InsertText(ctx context.Context, text string) error { | |||
| 100 | + | ret := _mock.Called(ctx, text) | |||
| 101 | + | ||||
| 102 | + | if len(ret) == 0 { | |||
| 103 | + | panic("no return value specified for InsertText") | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | var r0 error | |||
| 107 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 108 | + | r0 = returnFunc(ctx, text) | |||
| 109 | + | } else { | |||
| 110 | + | r0 = ret.Error(0) | |||
| 111 | + | } | |||
| 112 | + | return r0 | |||
| 113 | + | } | |||
| 114 | + | ||||
| 115 | + | // MockTextInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText' | |||
| 116 | + | type MockTextInputTarget_InsertText_Call struct { | |||
| 117 | + | *mock.Call | |||
| 118 | + | } | |||
| 119 | + | ||||
| 120 | + | // InsertText is a helper method to define mock.On call | |||
| 121 | + | // - ctx context.Context | |||
| 122 | + | // - text string | |||
| 123 | + | func (_e *MockTextInputTarget_Expecter) InsertText(ctx any, text any) *MockTextInputTarget_InsertText_Call { | |||
| 124 | + | return &MockTextInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)} | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | func (_c *MockTextInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockTextInputTarget_InsertText_Call { | |||
| 128 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 129 | + | var arg0 context.Context | |||
| 130 | + | if args[0] != nil { | |||
| 131 | + | arg0 = args[0].(context.Context) | |||
| 132 | + | } | |||
| 133 | + | var arg1 string | |||
| 134 | + | if args[1] != nil { | |||
| 135 | + | arg1 = args[1].(string) | |||
| 136 | + | } | |||
| 137 | + | run( | |||
| 138 | + | arg0, | |||
| 139 | + | arg1, | |||
| 140 | + | ) | |||
| 141 | + | }) | |||
| 142 | + | return _c | |||
| 143 | + | } | |||
| 144 | + | ||||
| 145 | + | func (_c *MockTextInputTarget_InsertText_Call) Return(err error) *MockTextInputTarget_InsertText_Call { | |||
| 146 | + | _c.Call.Return(err) | |||
| 147 | + | return _c | |||
| 148 | + | } | |||
| 149 | + | ||||
| 150 | + | func (_c *MockTextInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockTextInputTarget_InsertText_Call { | |||
| 151 | + | _c.Call.Return(run) | |||
| 152 | + | return _c | |||
| 153 | + | } | |||
| 154 | + | ||||
| 155 | + | // NewMockFocusable creates a new instance of MockFocusable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 156 | + | // The first argument is typically a *testing.T value. | |||
| 157 | + | func NewMockFocusable(t interface { | |||
| 158 | + | mock.TestingT | |||
| 159 | + | Cleanup(func()) | |||
| 160 | + | }) *MockFocusable { | |||
| 161 | + | mock := &MockFocusable{} | |||
| 162 | + | mock.Mock.Test(t) | |||
| 163 | + | ||||
| 164 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 165 | + | ||||
| 166 | + | return mock | |||
| 167 | + | } | |||
| 168 | + | ||||
| 169 | + | // MockFocusable is an autogenerated mock type for the Focusable type | |||
| 170 | + | type MockFocusable struct { | |||
| 171 | + | mock.Mock | |||
| 172 | + | } | |||
| 173 | + | ||||
| 174 | + | type MockFocusable_Expecter struct { | |||
| 175 | + | mock *mock.Mock | |||
| 176 | + | } | |||
| 177 | + | ||||
| 178 | + | func (_m *MockFocusable) EXPECT() *MockFocusable_Expecter { | |||
| 179 | + | return &MockFocusable_Expecter{mock: &_m.Mock} | |||
| 180 | + | } | |||
| 181 | + | ||||
| 182 | + | // Focus provides a mock function for the type MockFocusable | |||
| 183 | + | func (_mock *MockFocusable) Focus(ctx context.Context) { | |||
| 184 | + | _mock.Called(ctx) | |||
| 185 | + | return | |||
| 186 | + | } | |||
| 187 | + | ||||
| 188 | + | // MockFocusable_Focus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Focus' | |||
| 189 | + | type MockFocusable_Focus_Call struct { | |||
| 190 | + | *mock.Call | |||
| 191 | + | } | |||
| 192 | + | ||||
| 193 | + | // Focus is a helper method to define mock.On call | |||
| 194 | + | // - ctx context.Context | |||
| 195 | + | func (_e *MockFocusable_Expecter) Focus(ctx any) *MockFocusable_Focus_Call { | |||
| 196 | + | return &MockFocusable_Focus_Call{Call: _e.mock.On("Focus", ctx)} | |||
| 197 | + | } | |||
| 198 | + | ||||
| 199 | + | func (_c *MockFocusable_Focus_Call) Run(run func(ctx context.Context)) *MockFocusable_Focus_Call { | |||
| 200 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 201 | + | var arg0 context.Context | |||
| 202 | + | if args[0] != nil { | |||
| 203 | + | arg0 = args[0].(context.Context) | |||
| 204 | + | } | |||
| 205 | + | run( | |||
| 206 | + | arg0, | |||
| 207 | + | ) | |||
| 208 | + | }) | |||
| 209 | + | return _c | |||
| 210 | + | } | |||
| 211 | + | ||||
| 212 | + | func (_c *MockFocusable_Focus_Call) Return() *MockFocusable_Focus_Call { | |||
| 213 | + | _c.Call.Return() | |||
| 214 | + | return _c | |||
| 215 | + | } | |||
| 216 | + | ||||
| 217 | + | func (_c *MockFocusable_Focus_Call) RunAndReturn(run func(ctx context.Context)) *MockFocusable_Focus_Call { | |||
| 218 | + | _c.Run(run) | |||
| 219 | + | return _c | |||
| 220 | + | } | |||
| 221 | + | ||||
| 222 | + | // NewMockEntryInputTarget creates a new instance of MockEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 223 | + | // The first argument is typically a *testing.T value. | |||
| 224 | + | func NewMockEntryInputTarget(t interface { | |||
| 225 | + | mock.TestingT | |||
| 226 | + | Cleanup(func()) | |||
| 227 | + | }) *MockEntryInputTarget { | |||
| 228 | + | mock := &MockEntryInputTarget{} | |||
| 229 | + | mock.Mock.Test(t) | |||
| 230 | + | ||||
| 231 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 232 | + | ||||
| 233 | + | return mock | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | // MockEntryInputTarget is an autogenerated mock type for the EntryInputTarget type | |||
| 237 | + | type MockEntryInputTarget struct { | |||
| 238 | + | mock.Mock | |||
| 239 | + | } | |||
| 240 | + | ||||
| 241 | + | type MockEntryInputTarget_Expecter struct { | |||
| 242 | + | mock *mock.Mock | |||
| 243 | + | } | |||
| 244 | + | ||||
| 245 | + | func (_m *MockEntryInputTarget) EXPECT() *MockEntryInputTarget_Expecter { | |||
| 246 | + | return &MockEntryInputTarget_Expecter{mock: &_m.Mock} | |||
| 247 | + | } | |||
| 248 | + | ||||
| 249 | + | // DeleteBeforeCursor provides a mock function for the type MockEntryInputTarget | |||
| 250 | + | func (_mock *MockEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error { | |||
| 251 | + | ret := _mock.Called(ctx, n) | |||
| 252 | + | ||||
| 253 | + | if len(ret) == 0 { | |||
| 254 | + | panic("no return value specified for DeleteBeforeCursor") | |||
| 255 | + | } | |||
| 256 | + | ||||
| 257 | + | var r0 error | |||
| 258 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok { | |||
| 259 | + | r0 = returnFunc(ctx, n) | |||
| 260 | + | } else { | |||
| 261 | + | r0 = ret.Error(0) | |||
| 262 | + | } | |||
| 263 | + | return r0 | |||
| 264 | + | } | |||
| 265 | + | ||||
| 266 | + | // MockEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor' | |||
| 267 | + | type MockEntryInputTarget_DeleteBeforeCursor_Call struct { | |||
| 268 | + | *mock.Call | |||
| 269 | + | } | |||
| 270 | + | ||||
| 271 | + | // DeleteBeforeCursor is a helper method to define mock.On call | |||
| 272 | + | // - ctx context.Context | |||
| 273 | + | // - n int | |||
| 274 | + | func (_e *MockEntryInputTarget_Expecter) DeleteBeforeCursor(ctx any, n any) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |||
| 275 | + | return &MockEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)} | |||
| 276 | + | } | |||
| 277 | + | ||||
| 278 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |||
| 279 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 280 | + | var arg0 context.Context | |||
| 281 | + | if args[0] != nil { | |||
| 282 | + | arg0 = args[0].(context.Context) | |||
| 283 | + | } | |||
| 284 | + | var arg1 int | |||
| 285 | + | if args[1] != nil { | |||
| 286 | + | arg1 = args[1].(int) | |||
| 287 | + | } | |||
| 288 | + | run( | |||
| 289 | + | arg0, | |||
| 290 | + | arg1, | |||
| 291 | + | ) | |||
| 292 | + | }) | |||
| 293 | + | return _c | |||
| 294 | + | } | |||
| 295 | + | ||||
| 296 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |||
| 297 | + | _c.Call.Return(err) | |||
| 298 | + | return _c | |||
| 299 | + | } | |||
| 300 | + | ||||
| 301 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |||
| 302 | + | _c.Call.Return(run) | |||
| 303 | + | return _c | |||
| 304 | + | } | |||
| 305 | + | ||||
| 306 | + | // InsertText provides a mock function for the type MockEntryInputTarget | |||
| 307 | + | func (_mock *MockEntryInputTarget) InsertText(ctx context.Context, text string) error { | |||
| 308 | + | ret := _mock.Called(ctx, text) | |||
| 309 | + | ||||
| 310 | + | if len(ret) == 0 { | |||
| 311 | + | panic("no return value specified for InsertText") | |||
| 312 | + | } | |||
| 313 | + | ||||
| 314 | + | var r0 error | |||
| 315 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 316 | + | r0 = returnFunc(ctx, text) | |||
| 317 | + | } else { | |||
| 318 | + | r0 = ret.Error(0) | |||
| 319 | + | } | |||
| 320 | + | return r0 | |||
| 321 | + | } | |||
| 322 | + | ||||
| 323 | + | // MockEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText' | |||
| 324 | + | type MockEntryInputTarget_InsertText_Call struct { | |||
| 325 | + | *mock.Call | |||
| 326 | + | } | |||
| 327 | + | ||||
| 328 | + | // InsertText is a helper method to define mock.On call | |||
| 329 | + | // - ctx context.Context | |||
| 330 | + | // - text string | |||
| 331 | + | func (_e *MockEntryInputTarget_Expecter) InsertText(ctx any, text any) *MockEntryInputTarget_InsertText_Call { | |||
| 332 | + | return &MockEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)} | |||
| 333 | + | } | |||
| 334 | + | ||||
| 335 | + | func (_c *MockEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockEntryInputTarget_InsertText_Call { | |||
| 336 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 337 | + | var arg0 context.Context | |||
| 338 | + | if args[0] != nil { | |||
| 339 | + | arg0 = args[0].(context.Context) | |||
| 340 | + | } | |||
| 341 | + | var arg1 string | |||
| 342 | + | if args[1] != nil { | |||
| 343 | + | arg1 = args[1].(string) | |||
| 344 | + | } | |||
| 345 | + | run( | |||
| 346 | + | arg0, | |||
| 347 | + | arg1, | |||
| 348 | + | ) | |||
| 349 | + | }) | |||
| 350 | + | return _c | |||
| 351 | + | } | |||
| 352 | + | ||||
| 353 | + | func (_c *MockEntryInputTarget_InsertText_Call) Return(err error) *MockEntryInputTarget_InsertText_Call { | |||
| 354 | + | _c.Call.Return(err) | |||
| 355 | + | return _c | |||
| 356 | + | } | |||
| 357 | + | ||||
| 358 | + | func (_c *MockEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockEntryInputTarget_InsertText_Call { | |||
| 359 | + | _c.Call.Return(run) | |||
| 360 | + | return _c | |||
| 361 | + | } | |||
| 362 | + | ||||
| 363 | + | // IsGTKEntryTarget provides a mock function for the type MockEntryInputTarget | |||
| 364 | + | func (_mock *MockEntryInputTarget) IsGTKEntryTarget() bool { | |||
| 365 | + | ret := _mock.Called() | |||
| 366 | + | ||||
| 367 | + | if len(ret) == 0 { | |||
| 368 | + | panic("no return value specified for IsGTKEntryTarget") | |||
| 369 | + | } | |||
| 370 | + | ||||
| 371 | + | var r0 bool | |||
| 372 | + | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |||
| 373 | + | r0 = returnFunc() | |||
| 374 | + | } else { | |||
| 375 | + | r0 = ret.Get(0).(bool) | |||
| 376 | + | } | |||
| 377 | + | return r0 | |||
| 378 | + | } | |||
| 379 | + | ||||
| 380 | + | // MockEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget' | |||
| 381 | + | type MockEntryInputTarget_IsGTKEntryTarget_Call struct { | |||
| 382 | + | *mock.Call | |||
| 383 | + | } | |||
| 384 | + | ||||
| 385 | + | // IsGTKEntryTarget is a helper method to define mock.On call | |||
| 386 | + | func (_e *MockEntryInputTarget_Expecter) IsGTKEntryTarget() *MockEntryInputTarget_IsGTKEntryTarget_Call { | |||
| 387 | + | return &MockEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")} | |||
| 388 | + | } | |||
| 389 | + | ||||
| 390 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockEntryInputTarget_IsGTKEntryTarget_Call { | |||
| 391 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 392 | + | run() | |||
| 393 | + | }) | |||
| 394 | + | return _c | |||
| 395 | + | } | |||
| 396 | + | ||||
| 397 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockEntryInputTarget_IsGTKEntryTarget_Call { | |||
| 398 | + | _c.Call.Return(b) | |||
| 399 | + | return _c | |||
| 400 | + | } | |||
| 401 | + | ||||
| 402 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockEntryInputTarget_IsGTKEntryTarget_Call { | |||
| 403 | + | _c.Call.Return(run) | |||
| 404 | + | return _c | |||
| 405 | + | } | |||
| 406 | + | ||||
| 407 | + | // NewMockFocusedInputProvider creates a new instance of MockFocusedInputProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 408 | + | // The first argument is typically a *testing.T value. | |||
| 409 | + | func NewMockFocusedInputProvider(t interface { | |||
| 410 | + | mock.TestingT | |||
| 411 | + | Cleanup(func()) | |||
| 412 | + | }) *MockFocusedInputProvider { | |||
| 413 | + | mock := &MockFocusedInputProvider{} | |||
| 414 | + | mock.Mock.Test(t) | |||
| 415 | + | ||||
| 416 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 417 | + | ||||
| 418 | + | return mock | |||
| 419 | + | } | |||
| 420 | + | ||||
| 421 | + | // MockFocusedInputProvider is an autogenerated mock type for the FocusedInputProvider type | |||
| 422 | + | type MockFocusedInputProvider struct { | |||
| 423 | + | mock.Mock | |||
| 424 | + | } | |||
| 425 | + | ||||
| 426 | + | type MockFocusedInputProvider_Expecter struct { | |||
| 427 | + | mock *mock.Mock | |||
| 428 | + | } | |||
| 429 | + | ||||
| 430 | + | func (_m *MockFocusedInputProvider) EXPECT() *MockFocusedInputProvider_Expecter { | |||
| 431 | + | return &MockFocusedInputProvider_Expecter{mock: &_m.Mock} | |||
| 432 | + | } | |||
| 433 | + | ||||
| 434 | + | // GetFocusedInput provides a mock function for the type MockFocusedInputProvider | |||
| 435 | + | func (_mock *MockFocusedInputProvider) GetFocusedInput() port.TextInputTarget { | |||
| 436 | + | ret := _mock.Called() | |||
| 437 | + | ||||
| 438 | + | if len(ret) == 0 { | |||
| 439 | + | panic("no return value specified for GetFocusedInput") | |||
| 440 | + | } | |||
| 441 | + | ||||
| 442 | + | var r0 port.TextInputTarget | |||
| 443 | + | if returnFunc, ok := ret.Get(0).(func() port.TextInputTarget); ok { | |||
| 444 | + | r0 = returnFunc() | |||
| 445 | + | } else { | |||
| 446 | + | if ret.Get(0) != nil { | |||
| 447 | + | r0 = ret.Get(0).(port.TextInputTarget) | |||
| 448 | + | } | |||
| 449 | + | } | |||
| 450 | + | return r0 | |||
| 451 | + | } | |||
| 452 | + | ||||
| 453 | + | // MockFocusedInputProvider_GetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFocusedInput' | |||
| 454 | + | type MockFocusedInputProvider_GetFocusedInput_Call struct { | |||
| 455 | + | *mock.Call | |||
| 456 | + | } | |||
| 457 | + | ||||
| 458 | + | // GetFocusedInput is a helper method to define mock.On call | |||
| 459 | + | func (_e *MockFocusedInputProvider_Expecter) GetFocusedInput() *MockFocusedInputProvider_GetFocusedInput_Call { | |||
| 460 | + | return &MockFocusedInputProvider_GetFocusedInput_Call{Call: _e.mock.On("GetFocusedInput")} | |||
| 461 | + | } | |||
| 462 | + | ||||
| 463 | + | func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Run(run func()) *MockFocusedInputProvider_GetFocusedInput_Call { | |||
| 464 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 465 | + | run() | |||
| 466 | + | }) | |||
| 467 | + | return _c | |||
| 468 | + | } | |||
| 469 | + | ||||
| 470 | + | func (_c *MockFocusedInputProvider_GetFocusedInput_Call) Return(textInputTarget port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call { | |||
| 471 | + | _c.Call.Return(textInputTarget) | |||
| 472 | + | return _c | |||
| 473 | + | } | |||
| 474 | + | ||||
| 475 | + | func (_c *MockFocusedInputProvider_GetFocusedInput_Call) RunAndReturn(run func() port.TextInputTarget) *MockFocusedInputProvider_GetFocusedInput_Call { | |||
| 476 | + | _c.Call.Return(run) | |||
| 477 | + | return _c | |||
| 478 | + | } | |||
| 479 | + | ||||
| 480 | + | // SetFocusedInput provides a mock function for the type MockFocusedInputProvider | |||
| 481 | + | func (_mock *MockFocusedInputProvider) SetFocusedInput(target port.TextInputTarget) { | |||
| 482 | + | _mock.Called(target) | |||
| 483 | + | return | |||
| 484 | + | } | |||
| 485 | + | ||||
| 486 | + | // MockFocusedInputProvider_SetFocusedInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusedInput' | |||
| 487 | + | type MockFocusedInputProvider_SetFocusedInput_Call struct { | |||
| 488 | + | *mock.Call | |||
| 489 | + | } | |||
| 490 | + | ||||
| 491 | + | // SetFocusedInput is a helper method to define mock.On call | |||
| 492 | + | // - target port.TextInputTarget | |||
| 493 | + | func (_e *MockFocusedInputProvider_Expecter) SetFocusedInput(target any) *MockFocusedInputProvider_SetFocusedInput_Call { | |||
| 494 | + | return &MockFocusedInputProvider_SetFocusedInput_Call{Call: _e.mock.On("SetFocusedInput", target)} | |||
| 495 | + | } | |||
| 496 | + | ||||
| 497 | + | func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Run(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call { | |||
| 498 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 499 | + | var arg0 port.TextInputTarget | |||
| 500 | + | if args[0] != nil { | |||
| 501 | + | arg0 = args[0].(port.TextInputTarget) | |||
| 502 | + | } | |||
| 503 | + | run( | |||
| 504 | + | arg0, | |||
| 505 | + | ) | |||
| 506 | + | }) | |||
| 507 | + | return _c | |||
| 508 | + | } | |||
| 509 | + | ||||
| 510 | + | func (_c *MockFocusedInputProvider_SetFocusedInput_Call) Return() *MockFocusedInputProvider_SetFocusedInput_Call { | |||
| 511 | + | _c.Call.Return() | |||
| 512 | + | return _c | |||
| 513 | + | } | |||
| 514 | + | ||||
| 515 | + | func (_c *MockFocusedInputProvider_SetFocusedInput_Call) RunAndReturn(run func(target port.TextInputTarget)) *MockFocusedInputProvider_SetFocusedInput_Call { | |||
| 516 | + | _c.Run(run) | |||
| 517 | + | return _c | |||
| 518 | + | } | |||
A internal/application/port/mocks/updater.go +680 -0
| @@ -0,0 +1,680 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/port" | |||
| 11 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockUpdateChecker creates a new instance of MockUpdateChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockUpdateChecker(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockUpdateChecker { | |||
| 21 | + | mock := &MockUpdateChecker{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockUpdateChecker is an autogenerated mock type for the UpdateChecker type | |||
| 30 | + | type MockUpdateChecker struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockUpdateChecker_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockUpdateChecker) EXPECT() *MockUpdateChecker_Expecter { | |||
| 39 | + | return &MockUpdateChecker_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // CheckForUpdate provides a mock function for the type MockUpdateChecker | |||
| 43 | + | func (_mock *MockUpdateChecker) CheckForUpdate(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error) { | |||
| 44 | + | ret := _mock.Called(ctx, currentVersion) | |||
| 45 | + | ||||
| 46 | + | if len(ret) == 0 { | |||
| 47 | + | panic("no return value specified for CheckForUpdate") | |||
| 48 | + | } | |||
| 49 | + | ||||
| 50 | + | var r0 *entity.UpdateInfo | |||
| 51 | + | var r1 error | |||
| 52 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.UpdateInfo, error)); ok { | |||
| 53 | + | return returnFunc(ctx, currentVersion) | |||
| 54 | + | } | |||
| 55 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.UpdateInfo); ok { | |||
| 56 | + | r0 = returnFunc(ctx, currentVersion) | |||
| 57 | + | } else { | |||
| 58 | + | if ret.Get(0) != nil { | |||
| 59 | + | r0 = ret.Get(0).(*entity.UpdateInfo) | |||
| 60 | + | } | |||
| 61 | + | } | |||
| 62 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 63 | + | r1 = returnFunc(ctx, currentVersion) | |||
| 64 | + | } else { | |||
| 65 | + | r1 = ret.Error(1) | |||
| 66 | + | } | |||
| 67 | + | return r0, r1 | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | // MockUpdateChecker_CheckForUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckForUpdate' | |||
| 71 | + | type MockUpdateChecker_CheckForUpdate_Call struct { | |||
| 72 | + | *mock.Call | |||
| 73 | + | } | |||
| 74 | + | ||||
| 75 | + | // CheckForUpdate is a helper method to define mock.On call | |||
| 76 | + | // - ctx context.Context | |||
| 77 | + | // - currentVersion string | |||
| 78 | + | func (_e *MockUpdateChecker_Expecter) CheckForUpdate(ctx any, currentVersion any) *MockUpdateChecker_CheckForUpdate_Call { | |||
| 79 | + | return &MockUpdateChecker_CheckForUpdate_Call{Call: _e.mock.On("CheckForUpdate", ctx, currentVersion)} | |||
| 80 | + | } | |||
| 81 | + | ||||
| 82 | + | func (_c *MockUpdateChecker_CheckForUpdate_Call) Run(run func(ctx context.Context, currentVersion string)) *MockUpdateChecker_CheckForUpdate_Call { | |||
| 83 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 84 | + | var arg0 context.Context | |||
| 85 | + | if args[0] != nil { | |||
| 86 | + | arg0 = args[0].(context.Context) | |||
| 87 | + | } | |||
| 88 | + | var arg1 string | |||
| 89 | + | if args[1] != nil { | |||
| 90 | + | arg1 = args[1].(string) | |||
| 91 | + | } | |||
| 92 | + | run( | |||
| 93 | + | arg0, | |||
| 94 | + | arg1, | |||
| 95 | + | ) | |||
| 96 | + | }) | |||
| 97 | + | return _c | |||
| 98 | + | } | |||
| 99 | + | ||||
| 100 | + | func (_c *MockUpdateChecker_CheckForUpdate_Call) Return(updateInfo *entity.UpdateInfo, err error) *MockUpdateChecker_CheckForUpdate_Call { | |||
| 101 | + | _c.Call.Return(updateInfo, err) | |||
| 102 | + | return _c | |||
| 103 | + | } | |||
| 104 | + | ||||
| 105 | + | func (_c *MockUpdateChecker_CheckForUpdate_Call) RunAndReturn(run func(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error)) *MockUpdateChecker_CheckForUpdate_Call { | |||
| 106 | + | _c.Call.Return(run) | |||
| 107 | + | return _c | |||
| 108 | + | } | |||
| 109 | + | ||||
| 110 | + | // NewMockUpdateDownloader creates a new instance of MockUpdateDownloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 111 | + | // The first argument is typically a *testing.T value. | |||
| 112 | + | func NewMockUpdateDownloader(t interface { | |||
| 113 | + | mock.TestingT | |||
| 114 | + | Cleanup(func()) | |||
| 115 | + | }) *MockUpdateDownloader { | |||
| 116 | + | mock := &MockUpdateDownloader{} | |||
| 117 | + | mock.Mock.Test(t) | |||
| 118 | + | ||||
| 119 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 120 | + | ||||
| 121 | + | return mock | |||
| 122 | + | } | |||
| 123 | + | ||||
| 124 | + | // MockUpdateDownloader is an autogenerated mock type for the UpdateDownloader type | |||
| 125 | + | type MockUpdateDownloader struct { | |||
| 126 | + | mock.Mock | |||
| 127 | + | } | |||
| 128 | + | ||||
| 129 | + | type MockUpdateDownloader_Expecter struct { | |||
| 130 | + | mock *mock.Mock | |||
| 131 | + | } | |||
| 132 | + | ||||
| 133 | + | func (_m *MockUpdateDownloader) EXPECT() *MockUpdateDownloader_Expecter { | |||
| 134 | + | return &MockUpdateDownloader_Expecter{mock: &_m.Mock} | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | // Download provides a mock function for the type MockUpdateDownloader | |||
| 138 | + | func (_mock *MockUpdateDownloader) Download(ctx context.Context, downloadURL string, destDir string) (string, error) { | |||
| 139 | + | ret := _mock.Called(ctx, downloadURL, destDir) | |||
| 140 | + | ||||
| 141 | + | if len(ret) == 0 { | |||
| 142 | + | panic("no return value specified for Download") | |||
| 143 | + | } | |||
| 144 | + | ||||
| 145 | + | var r0 string | |||
| 146 | + | var r1 error | |||
| 147 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { | |||
| 148 | + | return returnFunc(ctx, downloadURL, destDir) | |||
| 149 | + | } | |||
| 150 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok { | |||
| 151 | + | r0 = returnFunc(ctx, downloadURL, destDir) | |||
| 152 | + | } else { | |||
| 153 | + | r0 = ret.Get(0).(string) | |||
| 154 | + | } | |||
| 155 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { | |||
| 156 | + | r1 = returnFunc(ctx, downloadURL, destDir) | |||
| 157 | + | } else { | |||
| 158 | + | r1 = ret.Error(1) | |||
| 159 | + | } | |||
| 160 | + | return r0, r1 | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | // MockUpdateDownloader_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' | |||
| 164 | + | type MockUpdateDownloader_Download_Call struct { | |||
| 165 | + | *mock.Call | |||
| 166 | + | } | |||
| 167 | + | ||||
| 168 | + | // Download is a helper method to define mock.On call | |||
| 169 | + | // - ctx context.Context | |||
| 170 | + | // - downloadURL string | |||
| 171 | + | // - destDir string | |||
| 172 | + | func (_e *MockUpdateDownloader_Expecter) Download(ctx any, downloadURL any, destDir any) *MockUpdateDownloader_Download_Call { | |||
| 173 | + | return &MockUpdateDownloader_Download_Call{Call: _e.mock.On("Download", ctx, downloadURL, destDir)} | |||
| 174 | + | } | |||
| 175 | + | ||||
| 176 | + | func (_c *MockUpdateDownloader_Download_Call) Run(run func(ctx context.Context, downloadURL string, destDir string)) *MockUpdateDownloader_Download_Call { | |||
| 177 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 178 | + | var arg0 context.Context | |||
| 179 | + | if args[0] != nil { | |||
| 180 | + | arg0 = args[0].(context.Context) | |||
| 181 | + | } | |||
| 182 | + | var arg1 string | |||
| 183 | + | if args[1] != nil { | |||
| 184 | + | arg1 = args[1].(string) | |||
| 185 | + | } | |||
| 186 | + | var arg2 string | |||
| 187 | + | if args[2] != nil { | |||
| 188 | + | arg2 = args[2].(string) | |||
| 189 | + | } | |||
| 190 | + | run( | |||
| 191 | + | arg0, | |||
| 192 | + | arg1, | |||
| 193 | + | arg2, | |||
| 194 | + | ) | |||
| 195 | + | }) | |||
| 196 | + | return _c | |||
| 197 | + | } | |||
| 198 | + | ||||
| 199 | + | func (_c *MockUpdateDownloader_Download_Call) Return(archivePath string, err error) *MockUpdateDownloader_Download_Call { | |||
| 200 | + | _c.Call.Return(archivePath, err) | |||
| 201 | + | return _c | |||
| 202 | + | } | |||
| 203 | + | ||||
| 204 | + | func (_c *MockUpdateDownloader_Download_Call) RunAndReturn(run func(ctx context.Context, downloadURL string, destDir string) (string, error)) *MockUpdateDownloader_Download_Call { | |||
| 205 | + | _c.Call.Return(run) | |||
| 206 | + | return _c | |||
| 207 | + | } | |||
| 208 | + | ||||
| 209 | + | // Extract provides a mock function for the type MockUpdateDownloader | |||
| 210 | + | func (_mock *MockUpdateDownloader) Extract(ctx context.Context, archivePath string, destDir string) (string, error) { | |||
| 211 | + | ret := _mock.Called(ctx, archivePath, destDir) | |||
| 212 | + | ||||
| 213 | + | if len(ret) == 0 { | |||
| 214 | + | panic("no return value specified for Extract") | |||
| 215 | + | } | |||
| 216 | + | ||||
| 217 | + | var r0 string | |||
| 218 | + | var r1 error | |||
| 219 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { | |||
| 220 | + | return returnFunc(ctx, archivePath, destDir) | |||
| 221 | + | } | |||
| 222 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok { | |||
| 223 | + | r0 = returnFunc(ctx, archivePath, destDir) | |||
| 224 | + | } else { | |||
| 225 | + | r0 = ret.Get(0).(string) | |||
| 226 | + | } | |||
| 227 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { | |||
| 228 | + | r1 = returnFunc(ctx, archivePath, destDir) | |||
| 229 | + | } else { | |||
| 230 | + | r1 = ret.Error(1) | |||
| 231 | + | } | |||
| 232 | + | return r0, r1 | |||
| 233 | + | } | |||
| 234 | + | ||||
| 235 | + | // MockUpdateDownloader_Extract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extract' | |||
| 236 | + | type MockUpdateDownloader_Extract_Call struct { | |||
| 237 | + | *mock.Call | |||
| 238 | + | } | |||
| 239 | + | ||||
| 240 | + | // Extract is a helper method to define mock.On call | |||
| 241 | + | // - ctx context.Context | |||
| 242 | + | // - archivePath string | |||
| 243 | + | // - destDir string | |||
| 244 | + | func (_e *MockUpdateDownloader_Expecter) Extract(ctx any, archivePath any, destDir any) *MockUpdateDownloader_Extract_Call { | |||
| 245 | + | return &MockUpdateDownloader_Extract_Call{Call: _e.mock.On("Extract", ctx, archivePath, destDir)} | |||
| 246 | + | } | |||
| 247 | + | ||||
| 248 | + | func (_c *MockUpdateDownloader_Extract_Call) Run(run func(ctx context.Context, archivePath string, destDir string)) *MockUpdateDownloader_Extract_Call { | |||
| 249 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 250 | + | var arg0 context.Context | |||
| 251 | + | if args[0] != nil { | |||
| 252 | + | arg0 = args[0].(context.Context) | |||
| 253 | + | } | |||
| 254 | + | var arg1 string | |||
| 255 | + | if args[1] != nil { | |||
| 256 | + | arg1 = args[1].(string) | |||
| 257 | + | } | |||
| 258 | + | var arg2 string | |||
| 259 | + | if args[2] != nil { | |||
| 260 | + | arg2 = args[2].(string) | |||
| 261 | + | } | |||
| 262 | + | run( | |||
| 263 | + | arg0, | |||
| 264 | + | arg1, | |||
| 265 | + | arg2, | |||
| 266 | + | ) | |||
| 267 | + | }) | |||
| 268 | + | return _c | |||
| 269 | + | } | |||
| 270 | + | ||||
| 271 | + | func (_c *MockUpdateDownloader_Extract_Call) Return(binaryPath string, err error) *MockUpdateDownloader_Extract_Call { | |||
| 272 | + | _c.Call.Return(binaryPath, err) | |||
| 273 | + | return _c | |||
| 274 | + | } | |||
| 275 | + | ||||
| 276 | + | func (_c *MockUpdateDownloader_Extract_Call) RunAndReturn(run func(ctx context.Context, archivePath string, destDir string) (string, error)) *MockUpdateDownloader_Extract_Call { | |||
| 277 | + | _c.Call.Return(run) | |||
| 278 | + | return _c | |||
| 279 | + | } | |||
| 280 | + | ||||
| 281 | + | // NewMockUpdateApplier creates a new instance of MockUpdateApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 282 | + | // The first argument is typically a *testing.T value. | |||
| 283 | + | func NewMockUpdateApplier(t interface { | |||
| 284 | + | mock.TestingT | |||
| 285 | + | Cleanup(func()) | |||
| 286 | + | }) *MockUpdateApplier { | |||
| 287 | + | mock := &MockUpdateApplier{} | |||
| 288 | + | mock.Mock.Test(t) | |||
| 289 | + | ||||
| 290 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 291 | + | ||||
| 292 | + | return mock | |||
| 293 | + | } | |||
| 294 | + | ||||
| 295 | + | // MockUpdateApplier is an autogenerated mock type for the UpdateApplier type | |||
| 296 | + | type MockUpdateApplier struct { | |||
| 297 | + | mock.Mock | |||
| 298 | + | } | |||
| 299 | + | ||||
| 300 | + | type MockUpdateApplier_Expecter struct { | |||
| 301 | + | mock *mock.Mock | |||
| 302 | + | } | |||
| 303 | + | ||||
| 304 | + | func (_m *MockUpdateApplier) EXPECT() *MockUpdateApplier_Expecter { | |||
| 305 | + | return &MockUpdateApplier_Expecter{mock: &_m.Mock} | |||
| 306 | + | } | |||
| 307 | + | ||||
| 308 | + | // ApplyOnExit provides a mock function for the type MockUpdateApplier | |||
| 309 | + | func (_mock *MockUpdateApplier) ApplyOnExit(ctx context.Context) (string, error) { | |||
| 310 | + | ret := _mock.Called(ctx) | |||
| 311 | + | ||||
| 312 | + | if len(ret) == 0 { | |||
| 313 | + | panic("no return value specified for ApplyOnExit") | |||
| 314 | + | } | |||
| 315 | + | ||||
| 316 | + | var r0 string | |||
| 317 | + | var r1 error | |||
| 318 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok { | |||
| 319 | + | return returnFunc(ctx) | |||
| 320 | + | } | |||
| 321 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok { | |||
| 322 | + | r0 = returnFunc(ctx) | |||
| 323 | + | } else { | |||
| 324 | + | r0 = ret.Get(0).(string) | |||
| 325 | + | } | |||
| 326 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 327 | + | r1 = returnFunc(ctx) | |||
| 328 | + | } else { | |||
| 329 | + | r1 = ret.Error(1) | |||
| 330 | + | } | |||
| 331 | + | return r0, r1 | |||
| 332 | + | } | |||
| 333 | + | ||||
| 334 | + | // MockUpdateApplier_ApplyOnExit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyOnExit' | |||
| 335 | + | type MockUpdateApplier_ApplyOnExit_Call struct { | |||
| 336 | + | *mock.Call | |||
| 337 | + | } | |||
| 338 | + | ||||
| 339 | + | // ApplyOnExit is a helper method to define mock.On call | |||
| 340 | + | // - ctx context.Context | |||
| 341 | + | func (_e *MockUpdateApplier_Expecter) ApplyOnExit(ctx any) *MockUpdateApplier_ApplyOnExit_Call { | |||
| 342 | + | return &MockUpdateApplier_ApplyOnExit_Call{Call: _e.mock.On("ApplyOnExit", ctx)} | |||
| 343 | + | } | |||
| 344 | + | ||||
| 345 | + | func (_c *MockUpdateApplier_ApplyOnExit_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ApplyOnExit_Call { | |||
| 346 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 347 | + | var arg0 context.Context | |||
| 348 | + | if args[0] != nil { | |||
| 349 | + | arg0 = args[0].(context.Context) | |||
| 350 | + | } | |||
| 351 | + | run( | |||
| 352 | + | arg0, | |||
| 353 | + | ) | |||
| 354 | + | }) | |||
| 355 | + | return _c | |||
| 356 | + | } | |||
| 357 | + | ||||
| 358 | + | func (_c *MockUpdateApplier_ApplyOnExit_Call) Return(backupPath string, err error) *MockUpdateApplier_ApplyOnExit_Call { | |||
| 359 | + | _c.Call.Return(backupPath, err) | |||
| 360 | + | return _c | |||
| 361 | + | } | |||
| 362 | + | ||||
| 363 | + | func (_c *MockUpdateApplier_ApplyOnExit_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockUpdateApplier_ApplyOnExit_Call { | |||
| 364 | + | _c.Call.Return(run) | |||
| 365 | + | return _c | |||
| 366 | + | } | |||
| 367 | + | ||||
| 368 | + | // CanSelfUpdate provides a mock function for the type MockUpdateApplier | |||
| 369 | + | func (_mock *MockUpdateApplier) CanSelfUpdate(ctx context.Context) bool { | |||
| 370 | + | ret := _mock.Called(ctx) | |||
| 371 | + | ||||
| 372 | + | if len(ret) == 0 { | |||
| 373 | + | panic("no return value specified for CanSelfUpdate") | |||
| 374 | + | } | |||
| 375 | + | ||||
| 376 | + | var r0 bool | |||
| 377 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok { | |||
| 378 | + | r0 = returnFunc(ctx) | |||
| 379 | + | } else { | |||
| 380 | + | r0 = ret.Get(0).(bool) | |||
| 381 | + | } | |||
| 382 | + | return r0 | |||
| 383 | + | } | |||
| 384 | + | ||||
| 385 | + | // MockUpdateApplier_CanSelfUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanSelfUpdate' | |||
| 386 | + | type MockUpdateApplier_CanSelfUpdate_Call struct { | |||
| 387 | + | *mock.Call | |||
| 388 | + | } | |||
| 389 | + | ||||
| 390 | + | // CanSelfUpdate is a helper method to define mock.On call | |||
| 391 | + | // - ctx context.Context | |||
| 392 | + | func (_e *MockUpdateApplier_Expecter) CanSelfUpdate(ctx any) *MockUpdateApplier_CanSelfUpdate_Call { | |||
| 393 | + | return &MockUpdateApplier_CanSelfUpdate_Call{Call: _e.mock.On("CanSelfUpdate", ctx)} | |||
| 394 | + | } | |||
| 395 | + | ||||
| 396 | + | func (_c *MockUpdateApplier_CanSelfUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_CanSelfUpdate_Call { | |||
| 397 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 398 | + | var arg0 context.Context | |||
| 399 | + | if args[0] != nil { | |||
| 400 | + | arg0 = args[0].(context.Context) | |||
| 401 | + | } | |||
| 402 | + | run( | |||
| 403 | + | arg0, | |||
| 404 | + | ) | |||
| 405 | + | }) | |||
| 406 | + | return _c | |||
| 407 | + | } | |||
| 408 | + | ||||
| 409 | + | func (_c *MockUpdateApplier_CanSelfUpdate_Call) Return(b bool) *MockUpdateApplier_CanSelfUpdate_Call { | |||
| 410 | + | _c.Call.Return(b) | |||
| 411 | + | return _c | |||
| 412 | + | } | |||
| 413 | + | ||||
| 414 | + | func (_c *MockUpdateApplier_CanSelfUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_CanSelfUpdate_Call { | |||
| 415 | + | _c.Call.Return(run) | |||
| 416 | + | return _c | |||
| 417 | + | } | |||
| 418 | + | ||||
| 419 | + | // ClearStagedUpdate provides a mock function for the type MockUpdateApplier | |||
| 420 | + | func (_mock *MockUpdateApplier) ClearStagedUpdate(ctx context.Context) error { | |||
| 421 | + | ret := _mock.Called(ctx) | |||
| 422 | + | ||||
| 423 | + | if len(ret) == 0 { | |||
| 424 | + | panic("no return value specified for ClearStagedUpdate") | |||
| 425 | + | } | |||
| 426 | + | ||||
| 427 | + | var r0 error | |||
| 428 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 429 | + | r0 = returnFunc(ctx) | |||
| 430 | + | } else { | |||
| 431 | + | r0 = ret.Error(0) | |||
| 432 | + | } | |||
| 433 | + | return r0 | |||
| 434 | + | } | |||
| 435 | + | ||||
| 436 | + | // MockUpdateApplier_ClearStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearStagedUpdate' | |||
| 437 | + | type MockUpdateApplier_ClearStagedUpdate_Call struct { | |||
| 438 | + | *mock.Call | |||
| 439 | + | } | |||
| 440 | + | ||||
| 441 | + | // ClearStagedUpdate is a helper method to define mock.On call | |||
| 442 | + | // - ctx context.Context | |||
| 443 | + | func (_e *MockUpdateApplier_Expecter) ClearStagedUpdate(ctx any) *MockUpdateApplier_ClearStagedUpdate_Call { | |||
| 444 | + | return &MockUpdateApplier_ClearStagedUpdate_Call{Call: _e.mock.On("ClearStagedUpdate", ctx)} | |||
| 445 | + | } | |||
| 446 | + | ||||
| 447 | + | func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ClearStagedUpdate_Call { | |||
| 448 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 449 | + | var arg0 context.Context | |||
| 450 | + | if args[0] != nil { | |||
| 451 | + | arg0 = args[0].(context.Context) | |||
| 452 | + | } | |||
| 453 | + | run( | |||
| 454 | + | arg0, | |||
| 455 | + | ) | |||
| 456 | + | }) | |||
| 457 | + | return _c | |||
| 458 | + | } | |||
| 459 | + | ||||
| 460 | + | func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Return(err error) *MockUpdateApplier_ClearStagedUpdate_Call { | |||
| 461 | + | _c.Call.Return(err) | |||
| 462 | + | return _c | |||
| 463 | + | } | |||
| 464 | + | ||||
| 465 | + | func (_c *MockUpdateApplier_ClearStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) error) *MockUpdateApplier_ClearStagedUpdate_Call { | |||
| 466 | + | _c.Call.Return(run) | |||
| 467 | + | return _c | |||
| 468 | + | } | |||
| 469 | + | ||||
| 470 | + | // GetBinaryPath provides a mock function for the type MockUpdateApplier | |||
| 471 | + | func (_mock *MockUpdateApplier) GetBinaryPath() (string, error) { | |||
| 472 | + | ret := _mock.Called() | |||
| 473 | + | ||||
| 474 | + | if len(ret) == 0 { | |||
| 475 | + | panic("no return value specified for GetBinaryPath") | |||
| 476 | + | } | |||
| 477 | + | ||||
| 478 | + | var r0 string | |||
| 479 | + | var r1 error | |||
| 480 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 481 | + | return returnFunc() | |||
| 482 | + | } | |||
| 483 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 484 | + | r0 = returnFunc() | |||
| 485 | + | } else { | |||
| 486 | + | r0 = ret.Get(0).(string) | |||
| 487 | + | } | |||
| 488 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 489 | + | r1 = returnFunc() | |||
| 490 | + | } else { | |||
| 491 | + | r1 = ret.Error(1) | |||
| 492 | + | } | |||
| 493 | + | return r0, r1 | |||
| 494 | + | } | |||
| 495 | + | ||||
| 496 | + | // MockUpdateApplier_GetBinaryPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBinaryPath' | |||
| 497 | + | type MockUpdateApplier_GetBinaryPath_Call struct { | |||
| 498 | + | *mock.Call | |||
| 499 | + | } | |||
| 500 | + | ||||
| 501 | + | // GetBinaryPath is a helper method to define mock.On call | |||
| 502 | + | func (_e *MockUpdateApplier_Expecter) GetBinaryPath() *MockUpdateApplier_GetBinaryPath_Call { | |||
| 503 | + | return &MockUpdateApplier_GetBinaryPath_Call{Call: _e.mock.On("GetBinaryPath")} | |||
| 504 | + | } | |||
| 505 | + | ||||
| 506 | + | func (_c *MockUpdateApplier_GetBinaryPath_Call) Run(run func()) *MockUpdateApplier_GetBinaryPath_Call { | |||
| 507 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 508 | + | run() | |||
| 509 | + | }) | |||
| 510 | + | return _c | |||
| 511 | + | } | |||
| 512 | + | ||||
| 513 | + | func (_c *MockUpdateApplier_GetBinaryPath_Call) Return(s string, err error) *MockUpdateApplier_GetBinaryPath_Call { | |||
| 514 | + | _c.Call.Return(s, err) | |||
| 515 | + | return _c | |||
| 516 | + | } | |||
| 517 | + | ||||
| 518 | + | func (_c *MockUpdateApplier_GetBinaryPath_Call) RunAndReturn(run func() (string, error)) *MockUpdateApplier_GetBinaryPath_Call { | |||
| 519 | + | _c.Call.Return(run) | |||
| 520 | + | return _c | |||
| 521 | + | } | |||
| 522 | + | ||||
| 523 | + | // HasStagedUpdate provides a mock function for the type MockUpdateApplier | |||
| 524 | + | func (_mock *MockUpdateApplier) HasStagedUpdate(ctx context.Context) bool { | |||
| 525 | + | ret := _mock.Called(ctx) | |||
| 526 | + | ||||
| 527 | + | if len(ret) == 0 { | |||
| 528 | + | panic("no return value specified for HasStagedUpdate") | |||
| 529 | + | } | |||
| 530 | + | ||||
| 531 | + | var r0 bool | |||
| 532 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok { | |||
| 533 | + | r0 = returnFunc(ctx) | |||
| 534 | + | } else { | |||
| 535 | + | r0 = ret.Get(0).(bool) | |||
| 536 | + | } | |||
| 537 | + | return r0 | |||
| 538 | + | } | |||
| 539 | + | ||||
| 540 | + | // MockUpdateApplier_HasStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasStagedUpdate' | |||
| 541 | + | type MockUpdateApplier_HasStagedUpdate_Call struct { | |||
| 542 | + | *mock.Call | |||
| 543 | + | } | |||
| 544 | + | ||||
| 545 | + | // HasStagedUpdate is a helper method to define mock.On call | |||
| 546 | + | // - ctx context.Context | |||
| 547 | + | func (_e *MockUpdateApplier_Expecter) HasStagedUpdate(ctx any) *MockUpdateApplier_HasStagedUpdate_Call { | |||
| 548 | + | return &MockUpdateApplier_HasStagedUpdate_Call{Call: _e.mock.On("HasStagedUpdate", ctx)} | |||
| 549 | + | } | |||
| 550 | + | ||||
| 551 | + | func (_c *MockUpdateApplier_HasStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_HasStagedUpdate_Call { | |||
| 552 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 553 | + | var arg0 context.Context | |||
| 554 | + | if args[0] != nil { | |||
| 555 | + | arg0 = args[0].(context.Context) | |||
| 556 | + | } | |||
| 557 | + | run( | |||
| 558 | + | arg0, | |||
| 559 | + | ) | |||
| 560 | + | }) | |||
| 561 | + | return _c | |||
| 562 | + | } | |||
| 563 | + | ||||
| 564 | + | func (_c *MockUpdateApplier_HasStagedUpdate_Call) Return(b bool) *MockUpdateApplier_HasStagedUpdate_Call { | |||
| 565 | + | _c.Call.Return(b) | |||
| 566 | + | return _c | |||
| 567 | + | } | |||
| 568 | + | ||||
| 569 | + | func (_c *MockUpdateApplier_HasStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_HasStagedUpdate_Call { | |||
| 570 | + | _c.Call.Return(run) | |||
| 571 | + | return _c | |||
| 572 | + | } | |||
| 573 | + | ||||
| 574 | + | // SelfUpdateBlockedReason provides a mock function for the type MockUpdateApplier | |||
| 575 | + | func (_mock *MockUpdateApplier) SelfUpdateBlockedReason(ctx context.Context) port.SelfUpdateBlockedReason { | |||
| 576 | + | ret := _mock.Called(ctx) | |||
| 577 | + | ||||
| 578 | + | if len(ret) == 0 { | |||
| 579 | + | panic("no return value specified for SelfUpdateBlockedReason") | |||
| 580 | + | } | |||
| 581 | + | ||||
| 582 | + | var r0 port.SelfUpdateBlockedReason | |||
| 583 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) port.SelfUpdateBlockedReason); ok { | |||
| 584 | + | r0 = returnFunc(ctx) | |||
| 585 | + | } else { | |||
| 586 | + | r0 = ret.Get(0).(port.SelfUpdateBlockedReason) | |||
| 587 | + | } | |||
| 588 | + | return r0 | |||
| 589 | + | } | |||
| 590 | + | ||||
| 591 | + | // MockUpdateApplier_SelfUpdateBlockedReason_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelfUpdateBlockedReason' | |||
| 592 | + | type MockUpdateApplier_SelfUpdateBlockedReason_Call struct { | |||
| 593 | + | *mock.Call | |||
| 594 | + | } | |||
| 595 | + | ||||
| 596 | + | // SelfUpdateBlockedReason is a helper method to define mock.On call | |||
| 597 | + | // - ctx context.Context | |||
| 598 | + | func (_e *MockUpdateApplier_Expecter) SelfUpdateBlockedReason(ctx any) *MockUpdateApplier_SelfUpdateBlockedReason_Call { | |||
| 599 | + | return &MockUpdateApplier_SelfUpdateBlockedReason_Call{Call: _e.mock.On("SelfUpdateBlockedReason", ctx)} | |||
| 600 | + | } | |||
| 601 | + | ||||
| 602 | + | func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_SelfUpdateBlockedReason_Call { | |||
| 603 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 604 | + | var arg0 context.Context | |||
| 605 | + | if args[0] != nil { | |||
| 606 | + | arg0 = args[0].(context.Context) | |||
| 607 | + | } | |||
| 608 | + | run( | |||
| 609 | + | arg0, | |||
| 610 | + | ) | |||
| 611 | + | }) | |||
| 612 | + | return _c | |||
| 613 | + | } | |||
| 614 | + | ||||
| 615 | + | func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Return(selfUpdateBlockedReason port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call { | |||
| 616 | + | _c.Call.Return(selfUpdateBlockedReason) | |||
| 617 | + | return _c | |||
| 618 | + | } | |||
| 619 | + | ||||
| 620 | + | func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) RunAndReturn(run func(ctx context.Context) port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call { | |||
| 621 | + | _c.Call.Return(run) | |||
| 622 | + | return _c | |||
| 623 | + | } | |||
| 624 | + | ||||
| 625 | + | // StageUpdate provides a mock function for the type MockUpdateApplier | |||
| 626 | + | func (_mock *MockUpdateApplier) StageUpdate(ctx context.Context, newBinaryPath string) error { | |||
| 627 | + | ret := _mock.Called(ctx, newBinaryPath) | |||
| 628 | + | ||||
| 629 | + | if len(ret) == 0 { | |||
| 630 | + | panic("no return value specified for StageUpdate") | |||
| 631 | + | } | |||
| 632 | + | ||||
| 633 | + | var r0 error | |||
| 634 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 635 | + | r0 = returnFunc(ctx, newBinaryPath) | |||
| 636 | + | } else { | |||
| 637 | + | r0 = ret.Error(0) | |||
| 638 | + | } | |||
| 639 | + | return r0 | |||
| 640 | + | } | |||
| 641 | + | ||||
| 642 | + | // MockUpdateApplier_StageUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StageUpdate' | |||
| 643 | + | type MockUpdateApplier_StageUpdate_Call struct { | |||
| 644 | + | *mock.Call | |||
| 645 | + | } | |||
| 646 | + | ||||
| 647 | + | // StageUpdate is a helper method to define mock.On call | |||
| 648 | + | // - ctx context.Context | |||
| 649 | + | // - newBinaryPath string | |||
| 650 | + | func (_e *MockUpdateApplier_Expecter) StageUpdate(ctx any, newBinaryPath any) *MockUpdateApplier_StageUpdate_Call { | |||
| 651 | + | return &MockUpdateApplier_StageUpdate_Call{Call: _e.mock.On("StageUpdate", ctx, newBinaryPath)} | |||
| 652 | + | } | |||
| 653 | + | ||||
| 654 | + | func (_c *MockUpdateApplier_StageUpdate_Call) Run(run func(ctx context.Context, newBinaryPath string)) *MockUpdateApplier_StageUpdate_Call { | |||
| 655 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 656 | + | var arg0 context.Context | |||
| 657 | + | if args[0] != nil { | |||
| 658 | + | arg0 = args[0].(context.Context) | |||
| 659 | + | } | |||
| 660 | + | var arg1 string | |||
| 661 | + | if args[1] != nil { | |||
| 662 | + | arg1 = args[1].(string) | |||
| 663 | + | } | |||
| 664 | + | run( | |||
| 665 | + | arg0, | |||
| 666 | + | arg1, | |||
| 667 | + | ) | |||
| 668 | + | }) | |||
| 669 | + | return _c | |||
| 670 | + | } | |||
| 671 | + | ||||
| 672 | + | func (_c *MockUpdateApplier_StageUpdate_Call) Return(err error) *MockUpdateApplier_StageUpdate_Call { | |||
| 673 | + | _c.Call.Return(err) | |||
| 674 | + | return _c | |||
| 675 | + | } | |||
| 676 | + | ||||
| 677 | + | func (_c *MockUpdateApplier_StageUpdate_Call) RunAndReturn(run func(ctx context.Context, newBinaryPath string) error) *MockUpdateApplier_StageUpdate_Call { | |||
| 678 | + | _c.Call.Return(run) | |||
| 679 | + | return _c | |||
| 680 | + | } | |||
A internal/application/port/mocks/webui_config.go +243 -0
| @@ -0,0 +1,243 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/application/dto" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockSystemviewConfigReader creates a new instance of MockSystemviewConfigReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockSystemviewConfigReader(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockSystemviewConfigReader { | |||
| 20 | + | mock := &MockSystemviewConfigReader{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockSystemviewConfigReader is an autogenerated mock type for the SystemviewConfigReader type | |||
| 29 | + | type MockSystemviewConfigReader struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockSystemviewConfigReader_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockSystemviewConfigReader) EXPECT() *MockSystemviewConfigReader_Expecter { | |||
| 38 | + | return &MockSystemviewConfigReader_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Current provides a mock function for the type MockSystemviewConfigReader | |||
| 42 | + | func (_mock *MockSystemviewConfigReader) Current(ctx context.Context) (dto.SystemviewConfigPayload, error) { | |||
| 43 | + | ret := _mock.Called(ctx) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Current") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 dto.SystemviewConfigPayload | |||
| 50 | + | var r1 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (dto.SystemviewConfigPayload, error)); ok { | |||
| 52 | + | return returnFunc(ctx) | |||
| 53 | + | } | |||
| 54 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) dto.SystemviewConfigPayload); ok { | |||
| 55 | + | r0 = returnFunc(ctx) | |||
| 56 | + | } else { | |||
| 57 | + | r0 = ret.Get(0).(dto.SystemviewConfigPayload) | |||
| 58 | + | } | |||
| 59 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 60 | + | r1 = returnFunc(ctx) | |||
| 61 | + | } else { | |||
| 62 | + | r1 = ret.Error(1) | |||
| 63 | + | } | |||
| 64 | + | return r0, r1 | |||
| 65 | + | } | |||
| 66 | + | ||||
| 67 | + | // MockSystemviewConfigReader_Current_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Current' | |||
| 68 | + | type MockSystemviewConfigReader_Current_Call struct { | |||
| 69 | + | *mock.Call | |||
| 70 | + | } | |||
| 71 | + | ||||
| 72 | + | // Current is a helper method to define mock.On call | |||
| 73 | + | // - ctx context.Context | |||
| 74 | + | func (_e *MockSystemviewConfigReader_Expecter) Current(ctx any) *MockSystemviewConfigReader_Current_Call { | |||
| 75 | + | return &MockSystemviewConfigReader_Current_Call{Call: _e.mock.On("Current", ctx)} | |||
| 76 | + | } | |||
| 77 | + | ||||
| 78 | + | func (_c *MockSystemviewConfigReader_Current_Call) Run(run func(ctx context.Context)) *MockSystemviewConfigReader_Current_Call { | |||
| 79 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 80 | + | var arg0 context.Context | |||
| 81 | + | if args[0] != nil { | |||
| 82 | + | arg0 = args[0].(context.Context) | |||
| 83 | + | } | |||
| 84 | + | run( | |||
| 85 | + | arg0, | |||
| 86 | + | ) | |||
| 87 | + | }) | |||
| 88 | + | return _c | |||
| 89 | + | } | |||
| 90 | + | ||||
| 91 | + | func (_c *MockSystemviewConfigReader_Current_Call) Return(systemviewConfigPayload dto.SystemviewConfigPayload, err error) *MockSystemviewConfigReader_Current_Call { | |||
| 92 | + | _c.Call.Return(systemviewConfigPayload, err) | |||
| 93 | + | return _c | |||
| 94 | + | } | |||
| 95 | + | ||||
| 96 | + | func (_c *MockSystemviewConfigReader_Current_Call) RunAndReturn(run func(ctx context.Context) (dto.SystemviewConfigPayload, error)) *MockSystemviewConfigReader_Current_Call { | |||
| 97 | + | _c.Call.Return(run) | |||
| 98 | + | return _c | |||
| 99 | + | } | |||
| 100 | + | ||||
| 101 | + | // Default provides a mock function for the type MockSystemviewConfigReader | |||
| 102 | + | func (_mock *MockSystemviewConfigReader) Default(ctx context.Context) (dto.SystemviewConfigPayload, error) { | |||
| 103 | + | ret := _mock.Called(ctx) | |||
| 104 | + | ||||
| 105 | + | if len(ret) == 0 { | |||
| 106 | + | panic("no return value specified for Default") | |||
| 107 | + | } | |||
| 108 | + | ||||
| 109 | + | var r0 dto.SystemviewConfigPayload | |||
| 110 | + | var r1 error | |||
| 111 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (dto.SystemviewConfigPayload, error)); ok { | |||
| 112 | + | return returnFunc(ctx) | |||
| 113 | + | } | |||
| 114 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) dto.SystemviewConfigPayload); ok { | |||
| 115 | + | r0 = returnFunc(ctx) | |||
| 116 | + | } else { | |||
| 117 | + | r0 = ret.Get(0).(dto.SystemviewConfigPayload) | |||
| 118 | + | } | |||
| 119 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 120 | + | r1 = returnFunc(ctx) | |||
| 121 | + | } else { | |||
| 122 | + | r1 = ret.Error(1) | |||
| 123 | + | } | |||
| 124 | + | return r0, r1 | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | // MockSystemviewConfigReader_Default_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Default' | |||
| 128 | + | type MockSystemviewConfigReader_Default_Call struct { | |||
| 129 | + | *mock.Call | |||
| 130 | + | } | |||
| 131 | + | ||||
| 132 | + | // Default is a helper method to define mock.On call | |||
| 133 | + | // - ctx context.Context | |||
| 134 | + | func (_e *MockSystemviewConfigReader_Expecter) Default(ctx any) *MockSystemviewConfigReader_Default_Call { | |||
| 135 | + | return &MockSystemviewConfigReader_Default_Call{Call: _e.mock.On("Default", ctx)} | |||
| 136 | + | } | |||
| 137 | + | ||||
| 138 | + | func (_c *MockSystemviewConfigReader_Default_Call) Run(run func(ctx context.Context)) *MockSystemviewConfigReader_Default_Call { | |||
| 139 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 140 | + | var arg0 context.Context | |||
| 141 | + | if args[0] != nil { | |||
| 142 | + | arg0 = args[0].(context.Context) | |||
| 143 | + | } | |||
| 144 | + | run( | |||
| 145 | + | arg0, | |||
| 146 | + | ) | |||
| 147 | + | }) | |||
| 148 | + | return _c | |||
| 149 | + | } | |||
| 150 | + | ||||
| 151 | + | func (_c *MockSystemviewConfigReader_Default_Call) Return(systemviewConfigPayload dto.SystemviewConfigPayload, err error) *MockSystemviewConfigReader_Default_Call { | |||
| 152 | + | _c.Call.Return(systemviewConfigPayload, err) | |||
| 153 | + | return _c | |||
| 154 | + | } | |||
| 155 | + | ||||
| 156 | + | func (_c *MockSystemviewConfigReader_Default_Call) RunAndReturn(run func(ctx context.Context) (dto.SystemviewConfigPayload, error)) *MockSystemviewConfigReader_Default_Call { | |||
| 157 | + | _c.Call.Return(run) | |||
| 158 | + | return _c | |||
| 159 | + | } | |||
| 160 | + | ||||
| 161 | + | // NewMockWebUIConfigSaver creates a new instance of MockWebUIConfigSaver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 162 | + | // The first argument is typically a *testing.T value. | |||
| 163 | + | func NewMockWebUIConfigSaver(t interface { | |||
| 164 | + | mock.TestingT | |||
| 165 | + | Cleanup(func()) | |||
| 166 | + | }) *MockWebUIConfigSaver { | |||
| 167 | + | mock := &MockWebUIConfigSaver{} | |||
| 168 | + | mock.Mock.Test(t) | |||
| 169 | + | ||||
| 170 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 171 | + | ||||
| 172 | + | return mock | |||
| 173 | + | } | |||
| 174 | + | ||||
| 175 | + | // MockWebUIConfigSaver is an autogenerated mock type for the WebUIConfigSaver type | |||
| 176 | + | type MockWebUIConfigSaver struct { | |||
| 177 | + | mock.Mock | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | type MockWebUIConfigSaver_Expecter struct { | |||
| 181 | + | mock *mock.Mock | |||
| 182 | + | } | |||
| 183 | + | ||||
| 184 | + | func (_m *MockWebUIConfigSaver) EXPECT() *MockWebUIConfigSaver_Expecter { | |||
| 185 | + | return &MockWebUIConfigSaver_Expecter{mock: &_m.Mock} | |||
| 186 | + | } | |||
| 187 | + | ||||
| 188 | + | // SaveWebUIConfig provides a mock function for the type MockWebUIConfigSaver | |||
| 189 | + | func (_mock *MockWebUIConfigSaver) SaveWebUIConfig(ctx context.Context, cfg dto.WebUIConfig) error { | |||
| 190 | + | ret := _mock.Called(ctx, cfg) | |||
| 191 | + | ||||
| 192 | + | if len(ret) == 0 { | |||
| 193 | + | panic("no return value specified for SaveWebUIConfig") | |||
| 194 | + | } | |||
| 195 | + | ||||
| 196 | + | var r0 error | |||
| 197 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, dto.WebUIConfig) error); ok { | |||
| 198 | + | r0 = returnFunc(ctx, cfg) | |||
| 199 | + | } else { | |||
| 200 | + | r0 = ret.Error(0) | |||
| 201 | + | } | |||
| 202 | + | return r0 | |||
| 203 | + | } | |||
| 204 | + | ||||
| 205 | + | // MockWebUIConfigSaver_SaveWebUIConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveWebUIConfig' | |||
| 206 | + | type MockWebUIConfigSaver_SaveWebUIConfig_Call struct { | |||
| 207 | + | *mock.Call | |||
| 208 | + | } | |||
| 209 | + | ||||
| 210 | + | // SaveWebUIConfig is a helper method to define mock.On call | |||
| 211 | + | // - ctx context.Context | |||
| 212 | + | // - cfg dto.WebUIConfig | |||
| 213 | + | func (_e *MockWebUIConfigSaver_Expecter) SaveWebUIConfig(ctx any, cfg any) *MockWebUIConfigSaver_SaveWebUIConfig_Call { | |||
| 214 | + | return &MockWebUIConfigSaver_SaveWebUIConfig_Call{Call: _e.mock.On("SaveWebUIConfig", ctx, cfg)} | |||
| 215 | + | } | |||
| 216 | + | ||||
| 217 | + | func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) Run(run func(ctx context.Context, cfg dto.WebUIConfig)) *MockWebUIConfigSaver_SaveWebUIConfig_Call { | |||
| 218 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 219 | + | var arg0 context.Context | |||
| 220 | + | if args[0] != nil { | |||
| 221 | + | arg0 = args[0].(context.Context) | |||
| 222 | + | } | |||
| 223 | + | var arg1 dto.WebUIConfig | |||
| 224 | + | if args[1] != nil { | |||
| 225 | + | arg1 = args[1].(dto.WebUIConfig) | |||
| 226 | + | } | |||
| 227 | + | run( | |||
| 228 | + | arg0, | |||
| 229 | + | arg1, | |||
| 230 | + | ) | |||
| 231 | + | }) | |||
| 232 | + | return _c | |||
| 233 | + | } | |||
| 234 | + | ||||
| 235 | + | func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) Return(err error) *MockWebUIConfigSaver_SaveWebUIConfig_Call { | |||
| 236 | + | _c.Call.Return(err) | |||
| 237 | + | return _c | |||
| 238 | + | } | |||
| 239 | + | ||||
| 240 | + | func (_c *MockWebUIConfigSaver_SaveWebUIConfig_Call) RunAndReturn(run func(ctx context.Context, cfg dto.WebUIConfig) error) *MockWebUIConfigSaver_SaveWebUIConfig_Call { | |||
| 241 | + | _c.Call.Return(run) | |||
| 242 | + | return _c | |||
| 243 | + | } | |||
A internal/application/port/mocks/webview.go +3042 -0 large diff (3042 lines changed): collapsed
A internal/application/port/mocks/xdg.go +566 -0
| @@ -0,0 +1,566 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | mock "github.com/stretchr/testify/mock" | |||
| 9 | + | ) | |||
| 10 | + | ||||
| 11 | + | // NewMockXDGPaths creates a new instance of MockXDGPaths. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 12 | + | // The first argument is typically a *testing.T value. | |||
| 13 | + | func NewMockXDGPaths(t interface { | |||
| 14 | + | mock.TestingT | |||
| 15 | + | Cleanup(func()) | |||
| 16 | + | }) *MockXDGPaths { | |||
| 17 | + | mock := &MockXDGPaths{} | |||
| 18 | + | mock.Mock.Test(t) | |||
| 19 | + | ||||
| 20 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 21 | + | ||||
| 22 | + | return mock | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | // MockXDGPaths is an autogenerated mock type for the XDGPaths type | |||
| 26 | + | type MockXDGPaths struct { | |||
| 27 | + | mock.Mock | |||
| 28 | + | } | |||
| 29 | + | ||||
| 30 | + | type MockXDGPaths_Expecter struct { | |||
| 31 | + | mock *mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | func (_m *MockXDGPaths) EXPECT() *MockXDGPaths_Expecter { | |||
| 35 | + | return &MockXDGPaths_Expecter{mock: &_m.Mock} | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | // CacheDir provides a mock function for the type MockXDGPaths | |||
| 39 | + | func (_mock *MockXDGPaths) CacheDir() (string, error) { | |||
| 40 | + | ret := _mock.Called() | |||
| 41 | + | ||||
| 42 | + | if len(ret) == 0 { | |||
| 43 | + | panic("no return value specified for CacheDir") | |||
| 44 | + | } | |||
| 45 | + | ||||
| 46 | + | var r0 string | |||
| 47 | + | var r1 error | |||
| 48 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 49 | + | return returnFunc() | |||
| 50 | + | } | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 52 | + | r0 = returnFunc() | |||
| 53 | + | } else { | |||
| 54 | + | r0 = ret.Get(0).(string) | |||
| 55 | + | } | |||
| 56 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 57 | + | r1 = returnFunc() | |||
| 58 | + | } else { | |||
| 59 | + | r1 = ret.Error(1) | |||
| 60 | + | } | |||
| 61 | + | return r0, r1 | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | // MockXDGPaths_CacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CacheDir' | |||
| 65 | + | type MockXDGPaths_CacheDir_Call struct { | |||
| 66 | + | *mock.Call | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | // CacheDir is a helper method to define mock.On call | |||
| 70 | + | func (_e *MockXDGPaths_Expecter) CacheDir() *MockXDGPaths_CacheDir_Call { | |||
| 71 | + | return &MockXDGPaths_CacheDir_Call{Call: _e.mock.On("CacheDir")} | |||
| 72 | + | } | |||
| 73 | + | ||||
| 74 | + | func (_c *MockXDGPaths_CacheDir_Call) Run(run func()) *MockXDGPaths_CacheDir_Call { | |||
| 75 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 76 | + | run() | |||
| 77 | + | }) | |||
| 78 | + | return _c | |||
| 79 | + | } | |||
| 80 | + | ||||
| 81 | + | func (_c *MockXDGPaths_CacheDir_Call) Return(s string, err error) *MockXDGPaths_CacheDir_Call { | |||
| 82 | + | _c.Call.Return(s, err) | |||
| 83 | + | return _c | |||
| 84 | + | } | |||
| 85 | + | ||||
| 86 | + | func (_c *MockXDGPaths_CacheDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_CacheDir_Call { | |||
| 87 | + | _c.Call.Return(run) | |||
| 88 | + | return _c | |||
| 89 | + | } | |||
| 90 | + | ||||
| 91 | + | // ConfigDir provides a mock function for the type MockXDGPaths | |||
| 92 | + | func (_mock *MockXDGPaths) ConfigDir() (string, error) { | |||
| 93 | + | ret := _mock.Called() | |||
| 94 | + | ||||
| 95 | + | if len(ret) == 0 { | |||
| 96 | + | panic("no return value specified for ConfigDir") | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | var r0 string | |||
| 100 | + | var r1 error | |||
| 101 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 102 | + | return returnFunc() | |||
| 103 | + | } | |||
| 104 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 105 | + | r0 = returnFunc() | |||
| 106 | + | } else { | |||
| 107 | + | r0 = ret.Get(0).(string) | |||
| 108 | + | } | |||
| 109 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 110 | + | r1 = returnFunc() | |||
| 111 | + | } else { | |||
| 112 | + | r1 = ret.Error(1) | |||
| 113 | + | } | |||
| 114 | + | return r0, r1 | |||
| 115 | + | } | |||
| 116 | + | ||||
| 117 | + | // MockXDGPaths_ConfigDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigDir' | |||
| 118 | + | type MockXDGPaths_ConfigDir_Call struct { | |||
| 119 | + | *mock.Call | |||
| 120 | + | } | |||
| 121 | + | ||||
| 122 | + | // ConfigDir is a helper method to define mock.On call | |||
| 123 | + | func (_e *MockXDGPaths_Expecter) ConfigDir() *MockXDGPaths_ConfigDir_Call { | |||
| 124 | + | return &MockXDGPaths_ConfigDir_Call{Call: _e.mock.On("ConfigDir")} | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | func (_c *MockXDGPaths_ConfigDir_Call) Run(run func()) *MockXDGPaths_ConfigDir_Call { | |||
| 128 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 129 | + | run() | |||
| 130 | + | }) | |||
| 131 | + | return _c | |||
| 132 | + | } | |||
| 133 | + | ||||
| 134 | + | func (_c *MockXDGPaths_ConfigDir_Call) Return(s string, err error) *MockXDGPaths_ConfigDir_Call { | |||
| 135 | + | _c.Call.Return(s, err) | |||
| 136 | + | return _c | |||
| 137 | + | } | |||
| 138 | + | ||||
| 139 | + | func (_c *MockXDGPaths_ConfigDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_ConfigDir_Call { | |||
| 140 | + | _c.Call.Return(run) | |||
| 141 | + | return _c | |||
| 142 | + | } | |||
| 143 | + | ||||
| 144 | + | // DataDir provides a mock function for the type MockXDGPaths | |||
| 145 | + | func (_mock *MockXDGPaths) DataDir() (string, error) { | |||
| 146 | + | ret := _mock.Called() | |||
| 147 | + | ||||
| 148 | + | if len(ret) == 0 { | |||
| 149 | + | panic("no return value specified for DataDir") | |||
| 150 | + | } | |||
| 151 | + | ||||
| 152 | + | var r0 string | |||
| 153 | + | var r1 error | |||
| 154 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 155 | + | return returnFunc() | |||
| 156 | + | } | |||
| 157 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 158 | + | r0 = returnFunc() | |||
| 159 | + | } else { | |||
| 160 | + | r0 = ret.Get(0).(string) | |||
| 161 | + | } | |||
| 162 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 163 | + | r1 = returnFunc() | |||
| 164 | + | } else { | |||
| 165 | + | r1 = ret.Error(1) | |||
| 166 | + | } | |||
| 167 | + | return r0, r1 | |||
| 168 | + | } | |||
| 169 | + | ||||
| 170 | + | // MockXDGPaths_DataDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DataDir' | |||
| 171 | + | type MockXDGPaths_DataDir_Call struct { | |||
| 172 | + | *mock.Call | |||
| 173 | + | } | |||
| 174 | + | ||||
| 175 | + | // DataDir is a helper method to define mock.On call | |||
| 176 | + | func (_e *MockXDGPaths_Expecter) DataDir() *MockXDGPaths_DataDir_Call { | |||
| 177 | + | return &MockXDGPaths_DataDir_Call{Call: _e.mock.On("DataDir")} | |||
| 178 | + | } | |||
| 179 | + | ||||
| 180 | + | func (_c *MockXDGPaths_DataDir_Call) Run(run func()) *MockXDGPaths_DataDir_Call { | |||
| 181 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 182 | + | run() | |||
| 183 | + | }) | |||
| 184 | + | return _c | |||
| 185 | + | } | |||
| 186 | + | ||||
| 187 | + | func (_c *MockXDGPaths_DataDir_Call) Return(s string, err error) *MockXDGPaths_DataDir_Call { | |||
| 188 | + | _c.Call.Return(s, err) | |||
| 189 | + | return _c | |||
| 190 | + | } | |||
| 191 | + | ||||
| 192 | + | func (_c *MockXDGPaths_DataDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_DataDir_Call { | |||
| 193 | + | _c.Call.Return(run) | |||
| 194 | + | return _c | |||
| 195 | + | } | |||
| 196 | + | ||||
| 197 | + | // DownloadDir provides a mock function for the type MockXDGPaths | |||
| 198 | + | func (_mock *MockXDGPaths) DownloadDir() (string, error) { | |||
| 199 | + | ret := _mock.Called() | |||
| 200 | + | ||||
| 201 | + | if len(ret) == 0 { | |||
| 202 | + | panic("no return value specified for DownloadDir") | |||
| 203 | + | } | |||
| 204 | + | ||||
| 205 | + | var r0 string | |||
| 206 | + | var r1 error | |||
| 207 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 208 | + | return returnFunc() | |||
| 209 | + | } | |||
| 210 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 211 | + | r0 = returnFunc() | |||
| 212 | + | } else { | |||
| 213 | + | r0 = ret.Get(0).(string) | |||
| 214 | + | } | |||
| 215 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 216 | + | r1 = returnFunc() | |||
| 217 | + | } else { | |||
| 218 | + | r1 = ret.Error(1) | |||
| 219 | + | } | |||
| 220 | + | return r0, r1 | |||
| 221 | + | } | |||
| 222 | + | ||||
| 223 | + | // MockXDGPaths_DownloadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DownloadDir' | |||
| 224 | + | type MockXDGPaths_DownloadDir_Call struct { | |||
| 225 | + | *mock.Call | |||
| 226 | + | } | |||
| 227 | + | ||||
| 228 | + | // DownloadDir is a helper method to define mock.On call | |||
| 229 | + | func (_e *MockXDGPaths_Expecter) DownloadDir() *MockXDGPaths_DownloadDir_Call { | |||
| 230 | + | return &MockXDGPaths_DownloadDir_Call{Call: _e.mock.On("DownloadDir")} | |||
| 231 | + | } | |||
| 232 | + | ||||
| 233 | + | func (_c *MockXDGPaths_DownloadDir_Call) Run(run func()) *MockXDGPaths_DownloadDir_Call { | |||
| 234 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 235 | + | run() | |||
| 236 | + | }) | |||
| 237 | + | return _c | |||
| 238 | + | } | |||
| 239 | + | ||||
| 240 | + | func (_c *MockXDGPaths_DownloadDir_Call) Return(s string, err error) *MockXDGPaths_DownloadDir_Call { | |||
| 241 | + | _c.Call.Return(s, err) | |||
| 242 | + | return _c | |||
| 243 | + | } | |||
| 244 | + | ||||
| 245 | + | func (_c *MockXDGPaths_DownloadDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_DownloadDir_Call { | |||
| 246 | + | _c.Call.Return(run) | |||
| 247 | + | return _c | |||
| 248 | + | } | |||
| 249 | + | ||||
| 250 | + | // FilterCacheDir provides a mock function for the type MockXDGPaths | |||
| 251 | + | func (_mock *MockXDGPaths) FilterCacheDir() (string, error) { | |||
| 252 | + | ret := _mock.Called() | |||
| 253 | + | ||||
| 254 | + | if len(ret) == 0 { | |||
| 255 | + | panic("no return value specified for FilterCacheDir") | |||
| 256 | + | } | |||
| 257 | + | ||||
| 258 | + | var r0 string | |||
| 259 | + | var r1 error | |||
| 260 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 261 | + | return returnFunc() | |||
| 262 | + | } | |||
| 263 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 264 | + | r0 = returnFunc() | |||
| 265 | + | } else { | |||
| 266 | + | r0 = ret.Get(0).(string) | |||
| 267 | + | } | |||
| 268 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 269 | + | r1 = returnFunc() | |||
| 270 | + | } else { | |||
| 271 | + | r1 = ret.Error(1) | |||
| 272 | + | } | |||
| 273 | + | return r0, r1 | |||
| 274 | + | } | |||
| 275 | + | ||||
| 276 | + | // MockXDGPaths_FilterCacheDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterCacheDir' | |||
| 277 | + | type MockXDGPaths_FilterCacheDir_Call struct { | |||
| 278 | + | *mock.Call | |||
| 279 | + | } | |||
| 280 | + | ||||
| 281 | + | // FilterCacheDir is a helper method to define mock.On call | |||
| 282 | + | func (_e *MockXDGPaths_Expecter) FilterCacheDir() *MockXDGPaths_FilterCacheDir_Call { | |||
| 283 | + | return &MockXDGPaths_FilterCacheDir_Call{Call: _e.mock.On("FilterCacheDir")} | |||
| 284 | + | } | |||
| 285 | + | ||||
| 286 | + | func (_c *MockXDGPaths_FilterCacheDir_Call) Run(run func()) *MockXDGPaths_FilterCacheDir_Call { | |||
| 287 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 288 | + | run() | |||
| 289 | + | }) | |||
| 290 | + | return _c | |||
| 291 | + | } | |||
| 292 | + | ||||
| 293 | + | func (_c *MockXDGPaths_FilterCacheDir_Call) Return(s string, err error) *MockXDGPaths_FilterCacheDir_Call { | |||
| 294 | + | _c.Call.Return(s, err) | |||
| 295 | + | return _c | |||
| 296 | + | } | |||
| 297 | + | ||||
| 298 | + | func (_c *MockXDGPaths_FilterCacheDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterCacheDir_Call { | |||
| 299 | + | _c.Call.Return(run) | |||
| 300 | + | return _c | |||
| 301 | + | } | |||
| 302 | + | ||||
| 303 | + | // FilterJSONDir provides a mock function for the type MockXDGPaths | |||
| 304 | + | func (_mock *MockXDGPaths) FilterJSONDir() (string, error) { | |||
| 305 | + | ret := _mock.Called() | |||
| 306 | + | ||||
| 307 | + | if len(ret) == 0 { | |||
| 308 | + | panic("no return value specified for FilterJSONDir") | |||
| 309 | + | } | |||
| 310 | + | ||||
| 311 | + | var r0 string | |||
| 312 | + | var r1 error | |||
| 313 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 314 | + | return returnFunc() | |||
| 315 | + | } | |||
| 316 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 317 | + | r0 = returnFunc() | |||
| 318 | + | } else { | |||
| 319 | + | r0 = ret.Get(0).(string) | |||
| 320 | + | } | |||
| 321 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 322 | + | r1 = returnFunc() | |||
| 323 | + | } else { | |||
| 324 | + | r1 = ret.Error(1) | |||
| 325 | + | } | |||
| 326 | + | return r0, r1 | |||
| 327 | + | } | |||
| 328 | + | ||||
| 329 | + | // MockXDGPaths_FilterJSONDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterJSONDir' | |||
| 330 | + | type MockXDGPaths_FilterJSONDir_Call struct { | |||
| 331 | + | *mock.Call | |||
| 332 | + | } | |||
| 333 | + | ||||
| 334 | + | // FilterJSONDir is a helper method to define mock.On call | |||
| 335 | + | func (_e *MockXDGPaths_Expecter) FilterJSONDir() *MockXDGPaths_FilterJSONDir_Call { | |||
| 336 | + | return &MockXDGPaths_FilterJSONDir_Call{Call: _e.mock.On("FilterJSONDir")} | |||
| 337 | + | } | |||
| 338 | + | ||||
| 339 | + | func (_c *MockXDGPaths_FilterJSONDir_Call) Run(run func()) *MockXDGPaths_FilterJSONDir_Call { | |||
| 340 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 341 | + | run() | |||
| 342 | + | }) | |||
| 343 | + | return _c | |||
| 344 | + | } | |||
| 345 | + | ||||
| 346 | + | func (_c *MockXDGPaths_FilterJSONDir_Call) Return(s string, err error) *MockXDGPaths_FilterJSONDir_Call { | |||
| 347 | + | _c.Call.Return(s, err) | |||
| 348 | + | return _c | |||
| 349 | + | } | |||
| 350 | + | ||||
| 351 | + | func (_c *MockXDGPaths_FilterJSONDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterJSONDir_Call { | |||
| 352 | + | _c.Call.Return(run) | |||
| 353 | + | return _c | |||
| 354 | + | } | |||
| 355 | + | ||||
| 356 | + | // FilterStoreDir provides a mock function for the type MockXDGPaths | |||
| 357 | + | func (_mock *MockXDGPaths) FilterStoreDir() (string, error) { | |||
| 358 | + | ret := _mock.Called() | |||
| 359 | + | ||||
| 360 | + | if len(ret) == 0 { | |||
| 361 | + | panic("no return value specified for FilterStoreDir") | |||
| 362 | + | } | |||
| 363 | + | ||||
| 364 | + | var r0 string | |||
| 365 | + | var r1 error | |||
| 366 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 367 | + | return returnFunc() | |||
| 368 | + | } | |||
| 369 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 370 | + | r0 = returnFunc() | |||
| 371 | + | } else { | |||
| 372 | + | r0 = ret.Get(0).(string) | |||
| 373 | + | } | |||
| 374 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 375 | + | r1 = returnFunc() | |||
| 376 | + | } else { | |||
| 377 | + | r1 = ret.Error(1) | |||
| 378 | + | } | |||
| 379 | + | return r0, r1 | |||
| 380 | + | } | |||
| 381 | + | ||||
| 382 | + | // MockXDGPaths_FilterStoreDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterStoreDir' | |||
| 383 | + | type MockXDGPaths_FilterStoreDir_Call struct { | |||
| 384 | + | *mock.Call | |||
| 385 | + | } | |||
| 386 | + | ||||
| 387 | + | // FilterStoreDir is a helper method to define mock.On call | |||
| 388 | + | func (_e *MockXDGPaths_Expecter) FilterStoreDir() *MockXDGPaths_FilterStoreDir_Call { | |||
| 389 | + | return &MockXDGPaths_FilterStoreDir_Call{Call: _e.mock.On("FilterStoreDir")} | |||
| 390 | + | } | |||
| 391 | + | ||||
| 392 | + | func (_c *MockXDGPaths_FilterStoreDir_Call) Run(run func()) *MockXDGPaths_FilterStoreDir_Call { | |||
| 393 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 394 | + | run() | |||
| 395 | + | }) | |||
| 396 | + | return _c | |||
| 397 | + | } | |||
| 398 | + | ||||
| 399 | + | func (_c *MockXDGPaths_FilterStoreDir_Call) Return(s string, err error) *MockXDGPaths_FilterStoreDir_Call { | |||
| 400 | + | _c.Call.Return(s, err) | |||
| 401 | + | return _c | |||
| 402 | + | } | |||
| 403 | + | ||||
| 404 | + | func (_c *MockXDGPaths_FilterStoreDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_FilterStoreDir_Call { | |||
| 405 | + | _c.Call.Return(run) | |||
| 406 | + | return _c | |||
| 407 | + | } | |||
| 408 | + | ||||
| 409 | + | // ManDir provides a mock function for the type MockXDGPaths | |||
| 410 | + | func (_mock *MockXDGPaths) ManDir() (string, error) { | |||
| 411 | + | ret := _mock.Called() | |||
| 412 | + | ||||
| 413 | + | if len(ret) == 0 { | |||
| 414 | + | panic("no return value specified for ManDir") | |||
| 415 | + | } | |||
| 416 | + | ||||
| 417 | + | var r0 string | |||
| 418 | + | var r1 error | |||
| 419 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 420 | + | return returnFunc() | |||
| 421 | + | } | |||
| 422 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 423 | + | r0 = returnFunc() | |||
| 424 | + | } else { | |||
| 425 | + | r0 = ret.Get(0).(string) | |||
| 426 | + | } | |||
| 427 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 428 | + | r1 = returnFunc() | |||
| 429 | + | } else { | |||
| 430 | + | r1 = ret.Error(1) | |||
| 431 | + | } | |||
| 432 | + | return r0, r1 | |||
| 433 | + | } | |||
| 434 | + | ||||
| 435 | + | // MockXDGPaths_ManDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ManDir' | |||
| 436 | + | type MockXDGPaths_ManDir_Call struct { | |||
| 437 | + | *mock.Call | |||
| 438 | + | } | |||
| 439 | + | ||||
| 440 | + | // ManDir is a helper method to define mock.On call | |||
| 441 | + | func (_e *MockXDGPaths_Expecter) ManDir() *MockXDGPaths_ManDir_Call { | |||
| 442 | + | return &MockXDGPaths_ManDir_Call{Call: _e.mock.On("ManDir")} | |||
| 443 | + | } | |||
| 444 | + | ||||
| 445 | + | func (_c *MockXDGPaths_ManDir_Call) Run(run func()) *MockXDGPaths_ManDir_Call { | |||
| 446 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 447 | + | run() | |||
| 448 | + | }) | |||
| 449 | + | return _c | |||
| 450 | + | } | |||
| 451 | + | ||||
| 452 | + | func (_c *MockXDGPaths_ManDir_Call) Return(s string, err error) *MockXDGPaths_ManDir_Call { | |||
| 453 | + | _c.Call.Return(s, err) | |||
| 454 | + | return _c | |||
| 455 | + | } | |||
| 456 | + | ||||
| 457 | + | func (_c *MockXDGPaths_ManDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_ManDir_Call { | |||
| 458 | + | _c.Call.Return(run) | |||
| 459 | + | return _c | |||
| 460 | + | } | |||
| 461 | + | ||||
| 462 | + | // RuntimeDir provides a mock function for the type MockXDGPaths | |||
| 463 | + | func (_mock *MockXDGPaths) RuntimeDir() (string, error) { | |||
| 464 | + | ret := _mock.Called() | |||
| 465 | + | ||||
| 466 | + | if len(ret) == 0 { | |||
| 467 | + | panic("no return value specified for RuntimeDir") | |||
| 468 | + | } | |||
| 469 | + | ||||
| 470 | + | var r0 string | |||
| 471 | + | var r1 error | |||
| 472 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 473 | + | return returnFunc() | |||
| 474 | + | } | |||
| 475 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 476 | + | r0 = returnFunc() | |||
| 477 | + | } else { | |||
| 478 | + | r0 = ret.Get(0).(string) | |||
| 479 | + | } | |||
| 480 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 481 | + | r1 = returnFunc() | |||
| 482 | + | } else { | |||
| 483 | + | r1 = ret.Error(1) | |||
| 484 | + | } | |||
| 485 | + | return r0, r1 | |||
| 486 | + | } | |||
| 487 | + | ||||
| 488 | + | // MockXDGPaths_RuntimeDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RuntimeDir' | |||
| 489 | + | type MockXDGPaths_RuntimeDir_Call struct { | |||
| 490 | + | *mock.Call | |||
| 491 | + | } | |||
| 492 | + | ||||
| 493 | + | // RuntimeDir is a helper method to define mock.On call | |||
| 494 | + | func (_e *MockXDGPaths_Expecter) RuntimeDir() *MockXDGPaths_RuntimeDir_Call { | |||
| 495 | + | return &MockXDGPaths_RuntimeDir_Call{Call: _e.mock.On("RuntimeDir")} | |||
| 496 | + | } | |||
| 497 | + | ||||
| 498 | + | func (_c *MockXDGPaths_RuntimeDir_Call) Run(run func()) *MockXDGPaths_RuntimeDir_Call { | |||
| 499 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 500 | + | run() | |||
| 501 | + | }) | |||
| 502 | + | return _c | |||
| 503 | + | } | |||
| 504 | + | ||||
| 505 | + | func (_c *MockXDGPaths_RuntimeDir_Call) Return(s string, err error) *MockXDGPaths_RuntimeDir_Call { | |||
| 506 | + | _c.Call.Return(s, err) | |||
| 507 | + | return _c | |||
| 508 | + | } | |||
| 509 | + | ||||
| 510 | + | func (_c *MockXDGPaths_RuntimeDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_RuntimeDir_Call { | |||
| 511 | + | _c.Call.Return(run) | |||
| 512 | + | return _c | |||
| 513 | + | } | |||
| 514 | + | ||||
| 515 | + | // StateDir provides a mock function for the type MockXDGPaths | |||
| 516 | + | func (_mock *MockXDGPaths) StateDir() (string, error) { | |||
| 517 | + | ret := _mock.Called() | |||
| 518 | + | ||||
| 519 | + | if len(ret) == 0 { | |||
| 520 | + | panic("no return value specified for StateDir") | |||
| 521 | + | } | |||
| 522 | + | ||||
| 523 | + | var r0 string | |||
| 524 | + | var r1 error | |||
| 525 | + | if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { | |||
| 526 | + | return returnFunc() | |||
| 527 | + | } | |||
| 528 | + | if returnFunc, ok := ret.Get(0).(func() string); ok { | |||
| 529 | + | r0 = returnFunc() | |||
| 530 | + | } else { | |||
| 531 | + | r0 = ret.Get(0).(string) | |||
| 532 | + | } | |||
| 533 | + | if returnFunc, ok := ret.Get(1).(func() error); ok { | |||
| 534 | + | r1 = returnFunc() | |||
| 535 | + | } else { | |||
| 536 | + | r1 = ret.Error(1) | |||
| 537 | + | } | |||
| 538 | + | return r0, r1 | |||
| 539 | + | } | |||
| 540 | + | ||||
| 541 | + | // MockXDGPaths_StateDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateDir' | |||
| 542 | + | type MockXDGPaths_StateDir_Call struct { | |||
| 543 | + | *mock.Call | |||
| 544 | + | } | |||
| 545 | + | ||||
| 546 | + | // StateDir is a helper method to define mock.On call | |||
| 547 | + | func (_e *MockXDGPaths_Expecter) StateDir() *MockXDGPaths_StateDir_Call { | |||
| 548 | + | return &MockXDGPaths_StateDir_Call{Call: _e.mock.On("StateDir")} | |||
| 549 | + | } | |||
| 550 | + | ||||
| 551 | + | func (_c *MockXDGPaths_StateDir_Call) Run(run func()) *MockXDGPaths_StateDir_Call { | |||
| 552 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 553 | + | run() | |||
| 554 | + | }) | |||
| 555 | + | return _c | |||
| 556 | + | } | |||
| 557 | + | ||||
| 558 | + | func (_c *MockXDGPaths_StateDir_Call) Return(s string, err error) *MockXDGPaths_StateDir_Call { | |||
| 559 | + | _c.Call.Return(s, err) | |||
| 560 | + | return _c | |||
| 561 | + | } | |||
| 562 | + | ||||
| 563 | + | func (_c *MockXDGPaths_StateDir_Call) RunAndReturn(run func() (string, error)) *MockXDGPaths_StateDir_Call { | |||
| 564 | + | _c.Call.Return(run) | |||
| 565 | + | return _c | |||
| 566 | + | } | |||
A internal/domain/repository/mocks/favorite.go +1611 -0
| @@ -0,0 +1,1611 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockFavoriteRepository creates a new instance of MockFavoriteRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockFavoriteRepository(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockFavoriteRepository { | |||
| 20 | + | mock := &MockFavoriteRepository{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockFavoriteRepository is an autogenerated mock type for the FavoriteRepository type | |||
| 29 | + | type MockFavoriteRepository struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockFavoriteRepository_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockFavoriteRepository) EXPECT() *MockFavoriteRepository_Expecter { | |||
| 38 | + | return &MockFavoriteRepository_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Delete provides a mock function for the type MockFavoriteRepository | |||
| 42 | + | func (_mock *MockFavoriteRepository) Delete(ctx context.Context, id entity.FavoriteID) error { | |||
| 43 | + | ret := _mock.Called(ctx, id) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Delete") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, id) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockFavoriteRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 59 | + | type MockFavoriteRepository_Delete_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // Delete is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - id entity.FavoriteID | |||
| 66 | + | func (_e *MockFavoriteRepository_Expecter) Delete(ctx any, id any) *MockFavoriteRepository_Delete_Call { | |||
| 67 | + | return &MockFavoriteRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockFavoriteRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_Delete_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 context.Context | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(context.Context) | |||
| 75 | + | } | |||
| 76 | + | var arg1 entity.FavoriteID | |||
| 77 | + | if args[1] != nil { | |||
| 78 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 79 | + | } | |||
| 80 | + | run( | |||
| 81 | + | arg0, | |||
| 82 | + | arg1, | |||
| 83 | + | ) | |||
| 84 | + | }) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockFavoriteRepository_Delete_Call) Return(err error) *MockFavoriteRepository_Delete_Call { | |||
| 89 | + | _c.Call.Return(err) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call { | |||
| 94 | + | _c.Call.Return(run) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | // FindByID provides a mock function for the type MockFavoriteRepository | |||
| 99 | + | func (_mock *MockFavoriteRepository) FindByID(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error) { | |||
| 100 | + | ret := _mock.Called(ctx, id) | |||
| 101 | + | ||||
| 102 | + | if len(ret) == 0 { | |||
| 103 | + | panic("no return value specified for FindByID") | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | var r0 *entity.Favorite | |||
| 107 | + | var r1 error | |||
| 108 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok { | |||
| 109 | + | return returnFunc(ctx, id) | |||
| 110 | + | } | |||
| 111 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok { | |||
| 112 | + | r0 = returnFunc(ctx, id) | |||
| 113 | + | } else { | |||
| 114 | + | if ret.Get(0) != nil { | |||
| 115 | + | r0 = ret.Get(0).(*entity.Favorite) | |||
| 116 | + | } | |||
| 117 | + | } | |||
| 118 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { | |||
| 119 | + | r1 = returnFunc(ctx, id) | |||
| 120 | + | } else { | |||
| 121 | + | r1 = ret.Error(1) | |||
| 122 | + | } | |||
| 123 | + | return r0, r1 | |||
| 124 | + | } | |||
| 125 | + | ||||
| 126 | + | // MockFavoriteRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID' | |||
| 127 | + | type MockFavoriteRepository_FindByID_Call struct { | |||
| 128 | + | *mock.Call | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | // FindByID is a helper method to define mock.On call | |||
| 132 | + | // - ctx context.Context | |||
| 133 | + | // - id entity.FavoriteID | |||
| 134 | + | func (_e *MockFavoriteRepository_Expecter) FindByID(ctx any, id any) *MockFavoriteRepository_FindByID_Call { | |||
| 135 | + | return &MockFavoriteRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)} | |||
| 136 | + | } | |||
| 137 | + | ||||
| 138 | + | func (_c *MockFavoriteRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_FindByID_Call { | |||
| 139 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 140 | + | var arg0 context.Context | |||
| 141 | + | if args[0] != nil { | |||
| 142 | + | arg0 = args[0].(context.Context) | |||
| 143 | + | } | |||
| 144 | + | var arg1 entity.FavoriteID | |||
| 145 | + | if args[1] != nil { | |||
| 146 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 147 | + | } | |||
| 148 | + | run( | |||
| 149 | + | arg0, | |||
| 150 | + | arg1, | |||
| 151 | + | ) | |||
| 152 | + | }) | |||
| 153 | + | return _c | |||
| 154 | + | } | |||
| 155 | + | ||||
| 156 | + | func (_c *MockFavoriteRepository_FindByID_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByID_Call { | |||
| 157 | + | _c.Call.Return(favorite, err) | |||
| 158 | + | return _c | |||
| 159 | + | } | |||
| 160 | + | ||||
| 161 | + | func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call { | |||
| 162 | + | _c.Call.Return(run) | |||
| 163 | + | return _c | |||
| 164 | + | } | |||
| 165 | + | ||||
| 166 | + | // FindByURL provides a mock function for the type MockFavoriteRepository | |||
| 167 | + | func (_mock *MockFavoriteRepository) FindByURL(ctx context.Context, url string) (*entity.Favorite, error) { | |||
| 168 | + | ret := _mock.Called(ctx, url) | |||
| 169 | + | ||||
| 170 | + | if len(ret) == 0 { | |||
| 171 | + | panic("no return value specified for FindByURL") | |||
| 172 | + | } | |||
| 173 | + | ||||
| 174 | + | var r0 *entity.Favorite | |||
| 175 | + | var r1 error | |||
| 176 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok { | |||
| 177 | + | return returnFunc(ctx, url) | |||
| 178 | + | } | |||
| 179 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok { | |||
| 180 | + | r0 = returnFunc(ctx, url) | |||
| 181 | + | } else { | |||
| 182 | + | if ret.Get(0) != nil { | |||
| 183 | + | r0 = ret.Get(0).(*entity.Favorite) | |||
| 184 | + | } | |||
| 185 | + | } | |||
| 186 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 187 | + | r1 = returnFunc(ctx, url) | |||
| 188 | + | } else { | |||
| 189 | + | r1 = ret.Error(1) | |||
| 190 | + | } | |||
| 191 | + | return r0, r1 | |||
| 192 | + | } | |||
| 193 | + | ||||
| 194 | + | // MockFavoriteRepository_FindByURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByURL' | |||
| 195 | + | type MockFavoriteRepository_FindByURL_Call struct { | |||
| 196 | + | *mock.Call | |||
| 197 | + | } | |||
| 198 | + | ||||
| 199 | + | // FindByURL is a helper method to define mock.On call | |||
| 200 | + | // - ctx context.Context | |||
| 201 | + | // - url string | |||
| 202 | + | func (_e *MockFavoriteRepository_Expecter) FindByURL(ctx any, url any) *MockFavoriteRepository_FindByURL_Call { | |||
| 203 | + | return &MockFavoriteRepository_FindByURL_Call{Call: _e.mock.On("FindByURL", ctx, url)} | |||
| 204 | + | } | |||
| 205 | + | ||||
| 206 | + | func (_c *MockFavoriteRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockFavoriteRepository_FindByURL_Call { | |||
| 207 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 208 | + | var arg0 context.Context | |||
| 209 | + | if args[0] != nil { | |||
| 210 | + | arg0 = args[0].(context.Context) | |||
| 211 | + | } | |||
| 212 | + | var arg1 string | |||
| 213 | + | if args[1] != nil { | |||
| 214 | + | arg1 = args[1].(string) | |||
| 215 | + | } | |||
| 216 | + | run( | |||
| 217 | + | arg0, | |||
| 218 | + | arg1, | |||
| 219 | + | ) | |||
| 220 | + | }) | |||
| 221 | + | return _c | |||
| 222 | + | } | |||
| 223 | + | ||||
| 224 | + | func (_c *MockFavoriteRepository_FindByURL_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByURL_Call { | |||
| 225 | + | _c.Call.Return(favorite, err) | |||
| 226 | + | return _c | |||
| 227 | + | } | |||
| 228 | + | ||||
| 229 | + | func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call { | |||
| 230 | + | _c.Call.Return(run) | |||
| 231 | + | return _c | |||
| 232 | + | } | |||
| 233 | + | ||||
| 234 | + | // GetAll provides a mock function for the type MockFavoriteRepository | |||
| 235 | + | func (_mock *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favorite, error) { | |||
| 236 | + | ret := _mock.Called(ctx) | |||
| 237 | + | ||||
| 238 | + | if len(ret) == 0 { | |||
| 239 | + | panic("no return value specified for GetAll") | |||
| 240 | + | } | |||
| 241 | + | ||||
| 242 | + | var r0 []*entity.Favorite | |||
| 243 | + | var r1 error | |||
| 244 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok { | |||
| 245 | + | return returnFunc(ctx) | |||
| 246 | + | } | |||
| 247 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok { | |||
| 248 | + | r0 = returnFunc(ctx) | |||
| 249 | + | } else { | |||
| 250 | + | if ret.Get(0) != nil { | |||
| 251 | + | r0 = ret.Get(0).([]*entity.Favorite) | |||
| 252 | + | } | |||
| 253 | + | } | |||
| 254 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 255 | + | r1 = returnFunc(ctx) | |||
| 256 | + | } else { | |||
| 257 | + | r1 = ret.Error(1) | |||
| 258 | + | } | |||
| 259 | + | return r0, r1 | |||
| 260 | + | } | |||
| 261 | + | ||||
| 262 | + | // MockFavoriteRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' | |||
| 263 | + | type MockFavoriteRepository_GetAll_Call struct { | |||
| 264 | + | *mock.Call | |||
| 265 | + | } | |||
| 266 | + | ||||
| 267 | + | // GetAll is a helper method to define mock.On call | |||
| 268 | + | // - ctx context.Context | |||
| 269 | + | func (_e *MockFavoriteRepository_Expecter) GetAll(ctx any) *MockFavoriteRepository_GetAll_Call { | |||
| 270 | + | return &MockFavoriteRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} | |||
| 271 | + | } | |||
| 272 | + | ||||
| 273 | + | func (_c *MockFavoriteRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFavoriteRepository_GetAll_Call { | |||
| 274 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 275 | + | var arg0 context.Context | |||
| 276 | + | if args[0] != nil { | |||
| 277 | + | arg0 = args[0].(context.Context) | |||
| 278 | + | } | |||
| 279 | + | run( | |||
| 280 | + | arg0, | |||
| 281 | + | ) | |||
| 282 | + | }) | |||
| 283 | + | return _c | |||
| 284 | + | } | |||
| 285 | + | ||||
| 286 | + | func (_c *MockFavoriteRepository_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetAll_Call { | |||
| 287 | + | _c.Call.Return(favorites, err) | |||
| 288 | + | return _c | |||
| 289 | + | } | |||
| 290 | + | ||||
| 291 | + | func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call { | |||
| 292 | + | _c.Call.Return(run) | |||
| 293 | + | return _c | |||
| 294 | + | } | |||
| 295 | + | ||||
| 296 | + | // GetByFolder provides a mock function for the type MockFavoriteRepository | |||
| 297 | + | func (_mock *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error) { | |||
| 298 | + | ret := _mock.Called(ctx, folderID) | |||
| 299 | + | ||||
| 300 | + | if len(ret) == 0 { | |||
| 301 | + | panic("no return value specified for GetByFolder") | |||
| 302 | + | } | |||
| 303 | + | ||||
| 304 | + | var r0 []*entity.Favorite | |||
| 305 | + | var r1 error | |||
| 306 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)); ok { | |||
| 307 | + | return returnFunc(ctx, folderID) | |||
| 308 | + | } | |||
| 309 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Favorite); ok { | |||
| 310 | + | r0 = returnFunc(ctx, folderID) | |||
| 311 | + | } else { | |||
| 312 | + | if ret.Get(0) != nil { | |||
| 313 | + | r0 = ret.Get(0).([]*entity.Favorite) | |||
| 314 | + | } | |||
| 315 | + | } | |||
| 316 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok { | |||
| 317 | + | r1 = returnFunc(ctx, folderID) | |||
| 318 | + | } else { | |||
| 319 | + | r1 = ret.Error(1) | |||
| 320 | + | } | |||
| 321 | + | return r0, r1 | |||
| 322 | + | } | |||
| 323 | + | ||||
| 324 | + | // MockFavoriteRepository_GetByFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFolder' | |||
| 325 | + | type MockFavoriteRepository_GetByFolder_Call struct { | |||
| 326 | + | *mock.Call | |||
| 327 | + | } | |||
| 328 | + | ||||
| 329 | + | // GetByFolder is a helper method to define mock.On call | |||
| 330 | + | // - ctx context.Context | |||
| 331 | + | // - folderID *entity.FolderID | |||
| 332 | + | func (_e *MockFavoriteRepository_Expecter) GetByFolder(ctx any, folderID any) *MockFavoriteRepository_GetByFolder_Call { | |||
| 333 | + | return &MockFavoriteRepository_GetByFolder_Call{Call: _e.mock.On("GetByFolder", ctx, folderID)} | |||
| 334 | + | } | |||
| 335 | + | ||||
| 336 | + | func (_c *MockFavoriteRepository_GetByFolder_Call) Run(run func(ctx context.Context, folderID *entity.FolderID)) *MockFavoriteRepository_GetByFolder_Call { | |||
| 337 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 338 | + | var arg0 context.Context | |||
| 339 | + | if args[0] != nil { | |||
| 340 | + | arg0 = args[0].(context.Context) | |||
| 341 | + | } | |||
| 342 | + | var arg1 *entity.FolderID | |||
| 343 | + | if args[1] != nil { | |||
| 344 | + | arg1 = args[1].(*entity.FolderID) | |||
| 345 | + | } | |||
| 346 | + | run( | |||
| 347 | + | arg0, | |||
| 348 | + | arg1, | |||
| 349 | + | ) | |||
| 350 | + | }) | |||
| 351 | + | return _c | |||
| 352 | + | } | |||
| 353 | + | ||||
| 354 | + | func (_c *MockFavoriteRepository_GetByFolder_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetByFolder_Call { | |||
| 355 | + | _c.Call.Return(favorites, err) | |||
| 356 | + | return _c | |||
| 357 | + | } | |||
| 358 | + | ||||
| 359 | + | func (_c *MockFavoriteRepository_GetByFolder_Call) RunAndReturn(run func(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByFolder_Call { | |||
| 360 | + | _c.Call.Return(run) | |||
| 361 | + | return _c | |||
| 362 | + | } | |||
| 363 | + | ||||
| 364 | + | // GetByShortcut provides a mock function for the type MockFavoriteRepository | |||
| 365 | + | func (_mock *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) { | |||
| 366 | + | ret := _mock.Called(ctx, key) | |||
| 367 | + | ||||
| 368 | + | if len(ret) == 0 { | |||
| 369 | + | panic("no return value specified for GetByShortcut") | |||
| 370 | + | } | |||
| 371 | + | ||||
| 372 | + | var r0 *entity.Favorite | |||
| 373 | + | var r1 error | |||
| 374 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok { | |||
| 375 | + | return returnFunc(ctx, key) | |||
| 376 | + | } | |||
| 377 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok { | |||
| 378 | + | r0 = returnFunc(ctx, key) | |||
| 379 | + | } else { | |||
| 380 | + | if ret.Get(0) != nil { | |||
| 381 | + | r0 = ret.Get(0).(*entity.Favorite) | |||
| 382 | + | } | |||
| 383 | + | } | |||
| 384 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 385 | + | r1 = returnFunc(ctx, key) | |||
| 386 | + | } else { | |||
| 387 | + | r1 = ret.Error(1) | |||
| 388 | + | } | |||
| 389 | + | return r0, r1 | |||
| 390 | + | } | |||
| 391 | + | ||||
| 392 | + | // MockFavoriteRepository_GetByShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByShortcut' | |||
| 393 | + | type MockFavoriteRepository_GetByShortcut_Call struct { | |||
| 394 | + | *mock.Call | |||
| 395 | + | } | |||
| 396 | + | ||||
| 397 | + | // GetByShortcut is a helper method to define mock.On call | |||
| 398 | + | // - ctx context.Context | |||
| 399 | + | // - key int | |||
| 400 | + | func (_e *MockFavoriteRepository_Expecter) GetByShortcut(ctx any, key any) *MockFavoriteRepository_GetByShortcut_Call { | |||
| 401 | + | return &MockFavoriteRepository_GetByShortcut_Call{Call: _e.mock.On("GetByShortcut", ctx, key)} | |||
| 402 | + | } | |||
| 403 | + | ||||
| 404 | + | func (_c *MockFavoriteRepository_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockFavoriteRepository_GetByShortcut_Call { | |||
| 405 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 406 | + | var arg0 context.Context | |||
| 407 | + | if args[0] != nil { | |||
| 408 | + | arg0 = args[0].(context.Context) | |||
| 409 | + | } | |||
| 410 | + | var arg1 int | |||
| 411 | + | if args[1] != nil { | |||
| 412 | + | arg1 = args[1].(int) | |||
| 413 | + | } | |||
| 414 | + | run( | |||
| 415 | + | arg0, | |||
| 416 | + | arg1, | |||
| 417 | + | ) | |||
| 418 | + | }) | |||
| 419 | + | return _c | |||
| 420 | + | } | |||
| 421 | + | ||||
| 422 | + | func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_GetByShortcut_Call { | |||
| 423 | + | _c.Call.Return(favorite, err) | |||
| 424 | + | return _c | |||
| 425 | + | } | |||
| 426 | + | ||||
| 427 | + | func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call { | |||
| 428 | + | _c.Call.Return(run) | |||
| 429 | + | return _c | |||
| 430 | + | } | |||
| 431 | + | ||||
| 432 | + | // Save provides a mock function for the type MockFavoriteRepository | |||
| 433 | + | func (_mock *MockFavoriteRepository) Save(ctx context.Context, fav *entity.Favorite) error { | |||
| 434 | + | ret := _mock.Called(ctx, fav) | |||
| 435 | + | ||||
| 436 | + | if len(ret) == 0 { | |||
| 437 | + | panic("no return value specified for Save") | |||
| 438 | + | } | |||
| 439 | + | ||||
| 440 | + | var r0 error | |||
| 441 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok { | |||
| 442 | + | r0 = returnFunc(ctx, fav) | |||
| 443 | + | } else { | |||
| 444 | + | r0 = ret.Error(0) | |||
| 445 | + | } | |||
| 446 | + | return r0 | |||
| 447 | + | } | |||
| 448 | + | ||||
| 449 | + | // MockFavoriteRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' | |||
| 450 | + | type MockFavoriteRepository_Save_Call struct { | |||
| 451 | + | *mock.Call | |||
| 452 | + | } | |||
| 453 | + | ||||
| 454 | + | // Save is a helper method to define mock.On call | |||
| 455 | + | // - ctx context.Context | |||
| 456 | + | // - fav *entity.Favorite | |||
| 457 | + | func (_e *MockFavoriteRepository_Expecter) Save(ctx any, fav any) *MockFavoriteRepository_Save_Call { | |||
| 458 | + | return &MockFavoriteRepository_Save_Call{Call: _e.mock.On("Save", ctx, fav)} | |||
| 459 | + | } | |||
| 460 | + | ||||
| 461 | + | func (_c *MockFavoriteRepository_Save_Call) Run(run func(ctx context.Context, fav *entity.Favorite)) *MockFavoriteRepository_Save_Call { | |||
| 462 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 463 | + | var arg0 context.Context | |||
| 464 | + | if args[0] != nil { | |||
| 465 | + | arg0 = args[0].(context.Context) | |||
| 466 | + | } | |||
| 467 | + | var arg1 *entity.Favorite | |||
| 468 | + | if args[1] != nil { | |||
| 469 | + | arg1 = args[1].(*entity.Favorite) | |||
| 470 | + | } | |||
| 471 | + | run( | |||
| 472 | + | arg0, | |||
| 473 | + | arg1, | |||
| 474 | + | ) | |||
| 475 | + | }) | |||
| 476 | + | return _c | |||
| 477 | + | } | |||
| 478 | + | ||||
| 479 | + | func (_c *MockFavoriteRepository_Save_Call) Return(err error) *MockFavoriteRepository_Save_Call { | |||
| 480 | + | _c.Call.Return(err) | |||
| 481 | + | return _c | |||
| 482 | + | } | |||
| 483 | + | ||||
| 484 | + | func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(ctx context.Context, fav *entity.Favorite) error) *MockFavoriteRepository_Save_Call { | |||
| 485 | + | _c.Call.Return(run) | |||
| 486 | + | return _c | |||
| 487 | + | } | |||
| 488 | + | ||||
| 489 | + | // SetFolder provides a mock function for the type MockFavoriteRepository | |||
| 490 | + | func (_mock *MockFavoriteRepository) SetFolder(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error { | |||
| 491 | + | ret := _mock.Called(ctx, id, folderID) | |||
| 492 | + | ||||
| 493 | + | if len(ret) == 0 { | |||
| 494 | + | panic("no return value specified for SetFolder") | |||
| 495 | + | } | |||
| 496 | + | ||||
| 497 | + | var r0 error | |||
| 498 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok { | |||
| 499 | + | r0 = returnFunc(ctx, id, folderID) | |||
| 500 | + | } else { | |||
| 501 | + | r0 = ret.Error(0) | |||
| 502 | + | } | |||
| 503 | + | return r0 | |||
| 504 | + | } | |||
| 505 | + | ||||
| 506 | + | // MockFavoriteRepository_SetFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFolder' | |||
| 507 | + | type MockFavoriteRepository_SetFolder_Call struct { | |||
| 508 | + | *mock.Call | |||
| 509 | + | } | |||
| 510 | + | ||||
| 511 | + | // SetFolder is a helper method to define mock.On call | |||
| 512 | + | // - ctx context.Context | |||
| 513 | + | // - id entity.FavoriteID | |||
| 514 | + | // - folderID *entity.FolderID | |||
| 515 | + | func (_e *MockFavoriteRepository_Expecter) SetFolder(ctx any, id any, folderID any) *MockFavoriteRepository_SetFolder_Call { | |||
| 516 | + | return &MockFavoriteRepository_SetFolder_Call{Call: _e.mock.On("SetFolder", ctx, id, folderID)} | |||
| 517 | + | } | |||
| 518 | + | ||||
| 519 | + | func (_c *MockFavoriteRepository_SetFolder_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockFavoriteRepository_SetFolder_Call { | |||
| 520 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 521 | + | var arg0 context.Context | |||
| 522 | + | if args[0] != nil { | |||
| 523 | + | arg0 = args[0].(context.Context) | |||
| 524 | + | } | |||
| 525 | + | var arg1 entity.FavoriteID | |||
| 526 | + | if args[1] != nil { | |||
| 527 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 528 | + | } | |||
| 529 | + | var arg2 *entity.FolderID | |||
| 530 | + | if args[2] != nil { | |||
| 531 | + | arg2 = args[2].(*entity.FolderID) | |||
| 532 | + | } | |||
| 533 | + | run( | |||
| 534 | + | arg0, | |||
| 535 | + | arg1, | |||
| 536 | + | arg2, | |||
| 537 | + | ) | |||
| 538 | + | }) | |||
| 539 | + | return _c | |||
| 540 | + | } | |||
| 541 | + | ||||
| 542 | + | func (_c *MockFavoriteRepository_SetFolder_Call) Return(err error) *MockFavoriteRepository_SetFolder_Call { | |||
| 543 | + | _c.Call.Return(err) | |||
| 544 | + | return _c | |||
| 545 | + | } | |||
| 546 | + | ||||
| 547 | + | func (_c *MockFavoriteRepository_SetFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockFavoriteRepository_SetFolder_Call { | |||
| 548 | + | _c.Call.Return(run) | |||
| 549 | + | return _c | |||
| 550 | + | } | |||
| 551 | + | ||||
| 552 | + | // SetShortcut provides a mock function for the type MockFavoriteRepository | |||
| 553 | + | func (_mock *MockFavoriteRepository) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error { | |||
| 554 | + | ret := _mock.Called(ctx, id, key) | |||
| 555 | + | ||||
| 556 | + | if len(ret) == 0 { | |||
| 557 | + | panic("no return value specified for SetShortcut") | |||
| 558 | + | } | |||
| 559 | + | ||||
| 560 | + | var r0 error | |||
| 561 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok { | |||
| 562 | + | r0 = returnFunc(ctx, id, key) | |||
| 563 | + | } else { | |||
| 564 | + | r0 = ret.Error(0) | |||
| 565 | + | } | |||
| 566 | + | return r0 | |||
| 567 | + | } | |||
| 568 | + | ||||
| 569 | + | // MockFavoriteRepository_SetShortcut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShortcut' | |||
| 570 | + | type MockFavoriteRepository_SetShortcut_Call struct { | |||
| 571 | + | *mock.Call | |||
| 572 | + | } | |||
| 573 | + | ||||
| 574 | + | // SetShortcut is a helper method to define mock.On call | |||
| 575 | + | // - ctx context.Context | |||
| 576 | + | // - id entity.FavoriteID | |||
| 577 | + | // - key *int | |||
| 578 | + | func (_e *MockFavoriteRepository_Expecter) SetShortcut(ctx any, id any, key any) *MockFavoriteRepository_SetShortcut_Call { | |||
| 579 | + | return &MockFavoriteRepository_SetShortcut_Call{Call: _e.mock.On("SetShortcut", ctx, id, key)} | |||
| 580 | + | } | |||
| 581 | + | ||||
| 582 | + | func (_c *MockFavoriteRepository_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockFavoriteRepository_SetShortcut_Call { | |||
| 583 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 584 | + | var arg0 context.Context | |||
| 585 | + | if args[0] != nil { | |||
| 586 | + | arg0 = args[0].(context.Context) | |||
| 587 | + | } | |||
| 588 | + | var arg1 entity.FavoriteID | |||
| 589 | + | if args[1] != nil { | |||
| 590 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 591 | + | } | |||
| 592 | + | var arg2 *int | |||
| 593 | + | if args[2] != nil { | |||
| 594 | + | arg2 = args[2].(*int) | |||
| 595 | + | } | |||
| 596 | + | run( | |||
| 597 | + | arg0, | |||
| 598 | + | arg1, | |||
| 599 | + | arg2, | |||
| 600 | + | ) | |||
| 601 | + | }) | |||
| 602 | + | return _c | |||
| 603 | + | } | |||
| 604 | + | ||||
| 605 | + | func (_c *MockFavoriteRepository_SetShortcut_Call) Return(err error) *MockFavoriteRepository_SetShortcut_Call { | |||
| 606 | + | _c.Call.Return(err) | |||
| 607 | + | return _c | |||
| 608 | + | } | |||
| 609 | + | ||||
| 610 | + | func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockFavoriteRepository_SetShortcut_Call { | |||
| 611 | + | _c.Call.Return(run) | |||
| 612 | + | return _c | |||
| 613 | + | } | |||
| 614 | + | ||||
| 615 | + | // UpdatePosition provides a mock function for the type MockFavoriteRepository | |||
| 616 | + | func (_mock *MockFavoriteRepository) UpdatePosition(ctx context.Context, id entity.FavoriteID, position int) error { | |||
| 617 | + | ret := _mock.Called(ctx, id, position) | |||
| 618 | + | ||||
| 619 | + | if len(ret) == 0 { | |||
| 620 | + | panic("no return value specified for UpdatePosition") | |||
| 621 | + | } | |||
| 622 | + | ||||
| 623 | + | var r0 error | |||
| 624 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok { | |||
| 625 | + | r0 = returnFunc(ctx, id, position) | |||
| 626 | + | } else { | |||
| 627 | + | r0 = ret.Error(0) | |||
| 628 | + | } | |||
| 629 | + | return r0 | |||
| 630 | + | } | |||
| 631 | + | ||||
| 632 | + | // MockFavoriteRepository_UpdatePosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePosition' | |||
| 633 | + | type MockFavoriteRepository_UpdatePosition_Call struct { | |||
| 634 | + | *mock.Call | |||
| 635 | + | } | |||
| 636 | + | ||||
| 637 | + | // UpdatePosition is a helper method to define mock.On call | |||
| 638 | + | // - ctx context.Context | |||
| 639 | + | // - id entity.FavoriteID | |||
| 640 | + | // - position int | |||
| 641 | + | func (_e *MockFavoriteRepository_Expecter) UpdatePosition(ctx any, id any, position any) *MockFavoriteRepository_UpdatePosition_Call { | |||
| 642 | + | return &MockFavoriteRepository_UpdatePosition_Call{Call: _e.mock.On("UpdatePosition", ctx, id, position)} | |||
| 643 | + | } | |||
| 644 | + | ||||
| 645 | + | func (_c *MockFavoriteRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FavoriteID, position int)) *MockFavoriteRepository_UpdatePosition_Call { | |||
| 646 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 647 | + | var arg0 context.Context | |||
| 648 | + | if args[0] != nil { | |||
| 649 | + | arg0 = args[0].(context.Context) | |||
| 650 | + | } | |||
| 651 | + | var arg1 entity.FavoriteID | |||
| 652 | + | if args[1] != nil { | |||
| 653 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 654 | + | } | |||
| 655 | + | var arg2 int | |||
| 656 | + | if args[2] != nil { | |||
| 657 | + | arg2 = args[2].(int) | |||
| 658 | + | } | |||
| 659 | + | run( | |||
| 660 | + | arg0, | |||
| 661 | + | arg1, | |||
| 662 | + | arg2, | |||
| 663 | + | ) | |||
| 664 | + | }) | |||
| 665 | + | return _c | |||
| 666 | + | } | |||
| 667 | + | ||||
| 668 | + | func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(err error) *MockFavoriteRepository_UpdatePosition_Call { | |||
| 669 | + | _c.Call.Return(err) | |||
| 670 | + | return _c | |||
| 671 | + | } | |||
| 672 | + | ||||
| 673 | + | func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, position int) error) *MockFavoriteRepository_UpdatePosition_Call { | |||
| 674 | + | _c.Call.Return(run) | |||
| 675 | + | return _c | |||
| 676 | + | } | |||
| 677 | + | ||||
| 678 | + | // NewMockFolderRepository creates a new instance of MockFolderRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 679 | + | // The first argument is typically a *testing.T value. | |||
| 680 | + | func NewMockFolderRepository(t interface { | |||
| 681 | + | mock.TestingT | |||
| 682 | + | Cleanup(func()) | |||
| 683 | + | }) *MockFolderRepository { | |||
| 684 | + | mock := &MockFolderRepository{} | |||
| 685 | + | mock.Mock.Test(t) | |||
| 686 | + | ||||
| 687 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 688 | + | ||||
| 689 | + | return mock | |||
| 690 | + | } | |||
| 691 | + | ||||
| 692 | + | // MockFolderRepository is an autogenerated mock type for the FolderRepository type | |||
| 693 | + | type MockFolderRepository struct { | |||
| 694 | + | mock.Mock | |||
| 695 | + | } | |||
| 696 | + | ||||
| 697 | + | type MockFolderRepository_Expecter struct { | |||
| 698 | + | mock *mock.Mock | |||
| 699 | + | } | |||
| 700 | + | ||||
| 701 | + | func (_m *MockFolderRepository) EXPECT() *MockFolderRepository_Expecter { | |||
| 702 | + | return &MockFolderRepository_Expecter{mock: &_m.Mock} | |||
| 703 | + | } | |||
| 704 | + | ||||
| 705 | + | // Delete provides a mock function for the type MockFolderRepository | |||
| 706 | + | func (_mock *MockFolderRepository) Delete(ctx context.Context, id entity.FolderID) error { | |||
| 707 | + | ret := _mock.Called(ctx, id) | |||
| 708 | + | ||||
| 709 | + | if len(ret) == 0 { | |||
| 710 | + | panic("no return value specified for Delete") | |||
| 711 | + | } | |||
| 712 | + | ||||
| 713 | + | var r0 error | |||
| 714 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok { | |||
| 715 | + | r0 = returnFunc(ctx, id) | |||
| 716 | + | } else { | |||
| 717 | + | r0 = ret.Error(0) | |||
| 718 | + | } | |||
| 719 | + | return r0 | |||
| 720 | + | } | |||
| 721 | + | ||||
| 722 | + | // MockFolderRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 723 | + | type MockFolderRepository_Delete_Call struct { | |||
| 724 | + | *mock.Call | |||
| 725 | + | } | |||
| 726 | + | ||||
| 727 | + | // Delete is a helper method to define mock.On call | |||
| 728 | + | // - ctx context.Context | |||
| 729 | + | // - id entity.FolderID | |||
| 730 | + | func (_e *MockFolderRepository_Expecter) Delete(ctx any, id any) *MockFolderRepository_Delete_Call { | |||
| 731 | + | return &MockFolderRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} | |||
| 732 | + | } | |||
| 733 | + | ||||
| 734 | + | func (_c *MockFolderRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_Delete_Call { | |||
| 735 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 736 | + | var arg0 context.Context | |||
| 737 | + | if args[0] != nil { | |||
| 738 | + | arg0 = args[0].(context.Context) | |||
| 739 | + | } | |||
| 740 | + | var arg1 entity.FolderID | |||
| 741 | + | if args[1] != nil { | |||
| 742 | + | arg1 = args[1].(entity.FolderID) | |||
| 743 | + | } | |||
| 744 | + | run( | |||
| 745 | + | arg0, | |||
| 746 | + | arg1, | |||
| 747 | + | ) | |||
| 748 | + | }) | |||
| 749 | + | return _c | |||
| 750 | + | } | |||
| 751 | + | ||||
| 752 | + | func (_c *MockFolderRepository_Delete_Call) Return(err error) *MockFolderRepository_Delete_Call { | |||
| 753 | + | _c.Call.Return(err) | |||
| 754 | + | return _c | |||
| 755 | + | } | |||
| 756 | + | ||||
| 757 | + | func (_c *MockFolderRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockFolderRepository_Delete_Call { | |||
| 758 | + | _c.Call.Return(run) | |||
| 759 | + | return _c | |||
| 760 | + | } | |||
| 761 | + | ||||
| 762 | + | // FindByID provides a mock function for the type MockFolderRepository | |||
| 763 | + | func (_mock *MockFolderRepository) FindByID(ctx context.Context, id entity.FolderID) (*entity.Folder, error) { | |||
| 764 | + | ret := _mock.Called(ctx, id) | |||
| 765 | + | ||||
| 766 | + | if len(ret) == 0 { | |||
| 767 | + | panic("no return value specified for FindByID") | |||
| 768 | + | } | |||
| 769 | + | ||||
| 770 | + | var r0 *entity.Folder | |||
| 771 | + | var r1 error | |||
| 772 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) (*entity.Folder, error)); ok { | |||
| 773 | + | return returnFunc(ctx, id) | |||
| 774 | + | } | |||
| 775 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) *entity.Folder); ok { | |||
| 776 | + | r0 = returnFunc(ctx, id) | |||
| 777 | + | } else { | |||
| 778 | + | if ret.Get(0) != nil { | |||
| 779 | + | r0 = ret.Get(0).(*entity.Folder) | |||
| 780 | + | } | |||
| 781 | + | } | |||
| 782 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FolderID) error); ok { | |||
| 783 | + | r1 = returnFunc(ctx, id) | |||
| 784 | + | } else { | |||
| 785 | + | r1 = ret.Error(1) | |||
| 786 | + | } | |||
| 787 | + | return r0, r1 | |||
| 788 | + | } | |||
| 789 | + | ||||
| 790 | + | // MockFolderRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID' | |||
| 791 | + | type MockFolderRepository_FindByID_Call struct { | |||
| 792 | + | *mock.Call | |||
| 793 | + | } | |||
| 794 | + | ||||
| 795 | + | // FindByID is a helper method to define mock.On call | |||
| 796 | + | // - ctx context.Context | |||
| 797 | + | // - id entity.FolderID | |||
| 798 | + | func (_e *MockFolderRepository_Expecter) FindByID(ctx any, id any) *MockFolderRepository_FindByID_Call { | |||
| 799 | + | return &MockFolderRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)} | |||
| 800 | + | } | |||
| 801 | + | ||||
| 802 | + | func (_c *MockFolderRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_FindByID_Call { | |||
| 803 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 804 | + | var arg0 context.Context | |||
| 805 | + | if args[0] != nil { | |||
| 806 | + | arg0 = args[0].(context.Context) | |||
| 807 | + | } | |||
| 808 | + | var arg1 entity.FolderID | |||
| 809 | + | if args[1] != nil { | |||
| 810 | + | arg1 = args[1].(entity.FolderID) | |||
| 811 | + | } | |||
| 812 | + | run( | |||
| 813 | + | arg0, | |||
| 814 | + | arg1, | |||
| 815 | + | ) | |||
| 816 | + | }) | |||
| 817 | + | return _c | |||
| 818 | + | } | |||
| 819 | + | ||||
| 820 | + | func (_c *MockFolderRepository_FindByID_Call) Return(folder *entity.Folder, err error) *MockFolderRepository_FindByID_Call { | |||
| 821 | + | _c.Call.Return(folder, err) | |||
| 822 | + | return _c | |||
| 823 | + | } | |||
| 824 | + | ||||
| 825 | + | func (_c *MockFolderRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) (*entity.Folder, error)) *MockFolderRepository_FindByID_Call { | |||
| 826 | + | _c.Call.Return(run) | |||
| 827 | + | return _c | |||
| 828 | + | } | |||
| 829 | + | ||||
| 830 | + | // GetAll provides a mock function for the type MockFolderRepository | |||
| 831 | + | func (_mock *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder, error) { | |||
| 832 | + | ret := _mock.Called(ctx) | |||
| 833 | + | ||||
| 834 | + | if len(ret) == 0 { | |||
| 835 | + | panic("no return value specified for GetAll") | |||
| 836 | + | } | |||
| 837 | + | ||||
| 838 | + | var r0 []*entity.Folder | |||
| 839 | + | var r1 error | |||
| 840 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok { | |||
| 841 | + | return returnFunc(ctx) | |||
| 842 | + | } | |||
| 843 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok { | |||
| 844 | + | r0 = returnFunc(ctx) | |||
| 845 | + | } else { | |||
| 846 | + | if ret.Get(0) != nil { | |||
| 847 | + | r0 = ret.Get(0).([]*entity.Folder) | |||
| 848 | + | } | |||
| 849 | + | } | |||
| 850 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 851 | + | r1 = returnFunc(ctx) | |||
| 852 | + | } else { | |||
| 853 | + | r1 = ret.Error(1) | |||
| 854 | + | } | |||
| 855 | + | return r0, r1 | |||
| 856 | + | } | |||
| 857 | + | ||||
| 858 | + | // MockFolderRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' | |||
| 859 | + | type MockFolderRepository_GetAll_Call struct { | |||
| 860 | + | *mock.Call | |||
| 861 | + | } | |||
| 862 | + | ||||
| 863 | + | // GetAll is a helper method to define mock.On call | |||
| 864 | + | // - ctx context.Context | |||
| 865 | + | func (_e *MockFolderRepository_Expecter) GetAll(ctx any) *MockFolderRepository_GetAll_Call { | |||
| 866 | + | return &MockFolderRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} | |||
| 867 | + | } | |||
| 868 | + | ||||
| 869 | + | func (_c *MockFolderRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFolderRepository_GetAll_Call { | |||
| 870 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 871 | + | var arg0 context.Context | |||
| 872 | + | if args[0] != nil { | |||
| 873 | + | arg0 = args[0].(context.Context) | |||
| 874 | + | } | |||
| 875 | + | run( | |||
| 876 | + | arg0, | |||
| 877 | + | ) | |||
| 878 | + | }) | |||
| 879 | + | return _c | |||
| 880 | + | } | |||
| 881 | + | ||||
| 882 | + | func (_c *MockFolderRepository_GetAll_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetAll_Call { | |||
| 883 | + | _c.Call.Return(folders, err) | |||
| 884 | + | return _c | |||
| 885 | + | } | |||
| 886 | + | ||||
| 887 | + | func (_c *MockFolderRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockFolderRepository_GetAll_Call { | |||
| 888 | + | _c.Call.Return(run) | |||
| 889 | + | return _c | |||
| 890 | + | } | |||
| 891 | + | ||||
| 892 | + | // GetChildren provides a mock function for the type MockFolderRepository | |||
| 893 | + | func (_mock *MockFolderRepository) GetChildren(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error) { | |||
| 894 | + | ret := _mock.Called(ctx, parentID) | |||
| 895 | + | ||||
| 896 | + | if len(ret) == 0 { | |||
| 897 | + | panic("no return value specified for GetChildren") | |||
| 898 | + | } | |||
| 899 | + | ||||
| 900 | + | var r0 []*entity.Folder | |||
| 901 | + | var r1 error | |||
| 902 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Folder, error)); ok { | |||
| 903 | + | return returnFunc(ctx, parentID) | |||
| 904 | + | } | |||
| 905 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Folder); ok { | |||
| 906 | + | r0 = returnFunc(ctx, parentID) | |||
| 907 | + | } else { | |||
| 908 | + | if ret.Get(0) != nil { | |||
| 909 | + | r0 = ret.Get(0).([]*entity.Folder) | |||
| 910 | + | } | |||
| 911 | + | } | |||
| 912 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok { | |||
| 913 | + | r1 = returnFunc(ctx, parentID) | |||
| 914 | + | } else { | |||
| 915 | + | r1 = ret.Error(1) | |||
| 916 | + | } | |||
| 917 | + | return r0, r1 | |||
| 918 | + | } | |||
| 919 | + | ||||
| 920 | + | // MockFolderRepository_GetChildren_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChildren' | |||
| 921 | + | type MockFolderRepository_GetChildren_Call struct { | |||
| 922 | + | *mock.Call | |||
| 923 | + | } | |||
| 924 | + | ||||
| 925 | + | // GetChildren is a helper method to define mock.On call | |||
| 926 | + | // - ctx context.Context | |||
| 927 | + | // - parentID *entity.FolderID | |||
| 928 | + | func (_e *MockFolderRepository_Expecter) GetChildren(ctx any, parentID any) *MockFolderRepository_GetChildren_Call { | |||
| 929 | + | return &MockFolderRepository_GetChildren_Call{Call: _e.mock.On("GetChildren", ctx, parentID)} | |||
| 930 | + | } | |||
| 931 | + | ||||
| 932 | + | func (_c *MockFolderRepository_GetChildren_Call) Run(run func(ctx context.Context, parentID *entity.FolderID)) *MockFolderRepository_GetChildren_Call { | |||
| 933 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 934 | + | var arg0 context.Context | |||
| 935 | + | if args[0] != nil { | |||
| 936 | + | arg0 = args[0].(context.Context) | |||
| 937 | + | } | |||
| 938 | + | var arg1 *entity.FolderID | |||
| 939 | + | if args[1] != nil { | |||
| 940 | + | arg1 = args[1].(*entity.FolderID) | |||
| 941 | + | } | |||
| 942 | + | run( | |||
| 943 | + | arg0, | |||
| 944 | + | arg1, | |||
| 945 | + | ) | |||
| 946 | + | }) | |||
| 947 | + | return _c | |||
| 948 | + | } | |||
| 949 | + | ||||
| 950 | + | func (_c *MockFolderRepository_GetChildren_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetChildren_Call { | |||
| 951 | + | _c.Call.Return(folders, err) | |||
| 952 | + | return _c | |||
| 953 | + | } | |||
| 954 | + | ||||
| 955 | + | func (_c *MockFolderRepository_GetChildren_Call) RunAndReturn(run func(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error)) *MockFolderRepository_GetChildren_Call { | |||
| 956 | + | _c.Call.Return(run) | |||
| 957 | + | return _c | |||
| 958 | + | } | |||
| 959 | + | ||||
| 960 | + | // Save provides a mock function for the type MockFolderRepository | |||
| 961 | + | func (_mock *MockFolderRepository) Save(ctx context.Context, folder *entity.Folder) error { | |||
| 962 | + | ret := _mock.Called(ctx, folder) | |||
| 963 | + | ||||
| 964 | + | if len(ret) == 0 { | |||
| 965 | + | panic("no return value specified for Save") | |||
| 966 | + | } | |||
| 967 | + | ||||
| 968 | + | var r0 error | |||
| 969 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Folder) error); ok { | |||
| 970 | + | r0 = returnFunc(ctx, folder) | |||
| 971 | + | } else { | |||
| 972 | + | r0 = ret.Error(0) | |||
| 973 | + | } | |||
| 974 | + | return r0 | |||
| 975 | + | } | |||
| 976 | + | ||||
| 977 | + | // MockFolderRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' | |||
| 978 | + | type MockFolderRepository_Save_Call struct { | |||
| 979 | + | *mock.Call | |||
| 980 | + | } | |||
| 981 | + | ||||
| 982 | + | // Save is a helper method to define mock.On call | |||
| 983 | + | // - ctx context.Context | |||
| 984 | + | // - folder *entity.Folder | |||
| 985 | + | func (_e *MockFolderRepository_Expecter) Save(ctx any, folder any) *MockFolderRepository_Save_Call { | |||
| 986 | + | return &MockFolderRepository_Save_Call{Call: _e.mock.On("Save", ctx, folder)} | |||
| 987 | + | } | |||
| 988 | + | ||||
| 989 | + | func (_c *MockFolderRepository_Save_Call) Run(run func(ctx context.Context, folder *entity.Folder)) *MockFolderRepository_Save_Call { | |||
| 990 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 991 | + | var arg0 context.Context | |||
| 992 | + | if args[0] != nil { | |||
| 993 | + | arg0 = args[0].(context.Context) | |||
| 994 | + | } | |||
| 995 | + | var arg1 *entity.Folder | |||
| 996 | + | if args[1] != nil { | |||
| 997 | + | arg1 = args[1].(*entity.Folder) | |||
| 998 | + | } | |||
| 999 | + | run( | |||
| 1000 | + | arg0, | |||
| 1001 | + | arg1, | |||
| 1002 | + | ) | |||
| 1003 | + | }) | |||
| 1004 | + | return _c | |||
| 1005 | + | } | |||
| 1006 | + | ||||
| 1007 | + | func (_c *MockFolderRepository_Save_Call) Return(err error) *MockFolderRepository_Save_Call { | |||
| 1008 | + | _c.Call.Return(err) | |||
| 1009 | + | return _c | |||
| 1010 | + | } | |||
| 1011 | + | ||||
| 1012 | + | func (_c *MockFolderRepository_Save_Call) RunAndReturn(run func(ctx context.Context, folder *entity.Folder) error) *MockFolderRepository_Save_Call { | |||
| 1013 | + | _c.Call.Return(run) | |||
| 1014 | + | return _c | |||
| 1015 | + | } | |||
| 1016 | + | ||||
| 1017 | + | // UpdatePosition provides a mock function for the type MockFolderRepository | |||
| 1018 | + | func (_mock *MockFolderRepository) UpdatePosition(ctx context.Context, id entity.FolderID, position int) error { | |||
| 1019 | + | ret := _mock.Called(ctx, id, position) | |||
| 1020 | + | ||||
| 1021 | + | if len(ret) == 0 { | |||
| 1022 | + | panic("no return value specified for UpdatePosition") | |||
| 1023 | + | } | |||
| 1024 | + | ||||
| 1025 | + | var r0 error | |||
| 1026 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, int) error); ok { | |||
| 1027 | + | r0 = returnFunc(ctx, id, position) | |||
| 1028 | + | } else { | |||
| 1029 | + | r0 = ret.Error(0) | |||
| 1030 | + | } | |||
| 1031 | + | return r0 | |||
| 1032 | + | } | |||
| 1033 | + | ||||
| 1034 | + | // MockFolderRepository_UpdatePosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePosition' | |||
| 1035 | + | type MockFolderRepository_UpdatePosition_Call struct { | |||
| 1036 | + | *mock.Call | |||
| 1037 | + | } | |||
| 1038 | + | ||||
| 1039 | + | // UpdatePosition is a helper method to define mock.On call | |||
| 1040 | + | // - ctx context.Context | |||
| 1041 | + | // - id entity.FolderID | |||
| 1042 | + | // - position int | |||
| 1043 | + | func (_e *MockFolderRepository_Expecter) UpdatePosition(ctx any, id any, position any) *MockFolderRepository_UpdatePosition_Call { | |||
| 1044 | + | return &MockFolderRepository_UpdatePosition_Call{Call: _e.mock.On("UpdatePosition", ctx, id, position)} | |||
| 1045 | + | } | |||
| 1046 | + | ||||
| 1047 | + | func (_c *MockFolderRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FolderID, position int)) *MockFolderRepository_UpdatePosition_Call { | |||
| 1048 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1049 | + | var arg0 context.Context | |||
| 1050 | + | if args[0] != nil { | |||
| 1051 | + | arg0 = args[0].(context.Context) | |||
| 1052 | + | } | |||
| 1053 | + | var arg1 entity.FolderID | |||
| 1054 | + | if args[1] != nil { | |||
| 1055 | + | arg1 = args[1].(entity.FolderID) | |||
| 1056 | + | } | |||
| 1057 | + | var arg2 int | |||
| 1058 | + | if args[2] != nil { | |||
| 1059 | + | arg2 = args[2].(int) | |||
| 1060 | + | } | |||
| 1061 | + | run( | |||
| 1062 | + | arg0, | |||
| 1063 | + | arg1, | |||
| 1064 | + | arg2, | |||
| 1065 | + | ) | |||
| 1066 | + | }) | |||
| 1067 | + | return _c | |||
| 1068 | + | } | |||
| 1069 | + | ||||
| 1070 | + | func (_c *MockFolderRepository_UpdatePosition_Call) Return(err error) *MockFolderRepository_UpdatePosition_Call { | |||
| 1071 | + | _c.Call.Return(err) | |||
| 1072 | + | return _c | |||
| 1073 | + | } | |||
| 1074 | + | ||||
| 1075 | + | func (_c *MockFolderRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, position int) error) *MockFolderRepository_UpdatePosition_Call { | |||
| 1076 | + | _c.Call.Return(run) | |||
| 1077 | + | return _c | |||
| 1078 | + | } | |||
| 1079 | + | ||||
| 1080 | + | // NewMockTagRepository creates a new instance of MockTagRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 1081 | + | // The first argument is typically a *testing.T value. | |||
| 1082 | + | func NewMockTagRepository(t interface { | |||
| 1083 | + | mock.TestingT | |||
| 1084 | + | Cleanup(func()) | |||
| 1085 | + | }) *MockTagRepository { | |||
| 1086 | + | mock := &MockTagRepository{} | |||
| 1087 | + | mock.Mock.Test(t) | |||
| 1088 | + | ||||
| 1089 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 1090 | + | ||||
| 1091 | + | return mock | |||
| 1092 | + | } | |||
| 1093 | + | ||||
| 1094 | + | // MockTagRepository is an autogenerated mock type for the TagRepository type | |||
| 1095 | + | type MockTagRepository struct { | |||
| 1096 | + | mock.Mock | |||
| 1097 | + | } | |||
| 1098 | + | ||||
| 1099 | + | type MockTagRepository_Expecter struct { | |||
| 1100 | + | mock *mock.Mock | |||
| 1101 | + | } | |||
| 1102 | + | ||||
| 1103 | + | func (_m *MockTagRepository) EXPECT() *MockTagRepository_Expecter { | |||
| 1104 | + | return &MockTagRepository_Expecter{mock: &_m.Mock} | |||
| 1105 | + | } | |||
| 1106 | + | ||||
| 1107 | + | // AssignToFavorite provides a mock function for the type MockTagRepository | |||
| 1108 | + | func (_mock *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { | |||
| 1109 | + | ret := _mock.Called(ctx, tagID, favID) | |||
| 1110 | + | ||||
| 1111 | + | if len(ret) == 0 { | |||
| 1112 | + | panic("no return value specified for AssignToFavorite") | |||
| 1113 | + | } | |||
| 1114 | + | ||||
| 1115 | + | var r0 error | |||
| 1116 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { | |||
| 1117 | + | r0 = returnFunc(ctx, tagID, favID) | |||
| 1118 | + | } else { | |||
| 1119 | + | r0 = ret.Error(0) | |||
| 1120 | + | } | |||
| 1121 | + | return r0 | |||
| 1122 | + | } | |||
| 1123 | + | ||||
| 1124 | + | // MockTagRepository_AssignToFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssignToFavorite' | |||
| 1125 | + | type MockTagRepository_AssignToFavorite_Call struct { | |||
| 1126 | + | *mock.Call | |||
| 1127 | + | } | |||
| 1128 | + | ||||
| 1129 | + | // AssignToFavorite is a helper method to define mock.On call | |||
| 1130 | + | // - ctx context.Context | |||
| 1131 | + | // - tagID entity.TagID | |||
| 1132 | + | // - favID entity.FavoriteID | |||
| 1133 | + | func (_e *MockTagRepository_Expecter) AssignToFavorite(ctx any, tagID any, favID any) *MockTagRepository_AssignToFavorite_Call { | |||
| 1134 | + | return &MockTagRepository_AssignToFavorite_Call{Call: _e.mock.On("AssignToFavorite", ctx, tagID, favID)} | |||
| 1135 | + | } | |||
| 1136 | + | ||||
| 1137 | + | func (_c *MockTagRepository_AssignToFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_AssignToFavorite_Call { | |||
| 1138 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1139 | + | var arg0 context.Context | |||
| 1140 | + | if args[0] != nil { | |||
| 1141 | + | arg0 = args[0].(context.Context) | |||
| 1142 | + | } | |||
| 1143 | + | var arg1 entity.TagID | |||
| 1144 | + | if args[1] != nil { | |||
| 1145 | + | arg1 = args[1].(entity.TagID) | |||
| 1146 | + | } | |||
| 1147 | + | var arg2 entity.FavoriteID | |||
| 1148 | + | if args[2] != nil { | |||
| 1149 | + | arg2 = args[2].(entity.FavoriteID) | |||
| 1150 | + | } | |||
| 1151 | + | run( | |||
| 1152 | + | arg0, | |||
| 1153 | + | arg1, | |||
| 1154 | + | arg2, | |||
| 1155 | + | ) | |||
| 1156 | + | }) | |||
| 1157 | + | return _c | |||
| 1158 | + | } | |||
| 1159 | + | ||||
| 1160 | + | func (_c *MockTagRepository_AssignToFavorite_Call) Return(err error) *MockTagRepository_AssignToFavorite_Call { | |||
| 1161 | + | _c.Call.Return(err) | |||
| 1162 | + | return _c | |||
| 1163 | + | } | |||
| 1164 | + | ||||
| 1165 | + | func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call { | |||
| 1166 | + | _c.Call.Return(run) | |||
| 1167 | + | return _c | |||
| 1168 | + | } | |||
| 1169 | + | ||||
| 1170 | + | // Delete provides a mock function for the type MockTagRepository | |||
| 1171 | + | func (_mock *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error { | |||
| 1172 | + | ret := _mock.Called(ctx, id) | |||
| 1173 | + | ||||
| 1174 | + | if len(ret) == 0 { | |||
| 1175 | + | panic("no return value specified for Delete") | |||
| 1176 | + | } | |||
| 1177 | + | ||||
| 1178 | + | var r0 error | |||
| 1179 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok { | |||
| 1180 | + | r0 = returnFunc(ctx, id) | |||
| 1181 | + | } else { | |||
| 1182 | + | r0 = ret.Error(0) | |||
| 1183 | + | } | |||
| 1184 | + | return r0 | |||
| 1185 | + | } | |||
| 1186 | + | ||||
| 1187 | + | // MockTagRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 1188 | + | type MockTagRepository_Delete_Call struct { | |||
| 1189 | + | *mock.Call | |||
| 1190 | + | } | |||
| 1191 | + | ||||
| 1192 | + | // Delete is a helper method to define mock.On call | |||
| 1193 | + | // - ctx context.Context | |||
| 1194 | + | // - id entity.TagID | |||
| 1195 | + | func (_e *MockTagRepository_Expecter) Delete(ctx any, id any) *MockTagRepository_Delete_Call { | |||
| 1196 | + | return &MockTagRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} | |||
| 1197 | + | } | |||
| 1198 | + | ||||
| 1199 | + | func (_c *MockTagRepository_Delete_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_Delete_Call { | |||
| 1200 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1201 | + | var arg0 context.Context | |||
| 1202 | + | if args[0] != nil { | |||
| 1203 | + | arg0 = args[0].(context.Context) | |||
| 1204 | + | } | |||
| 1205 | + | var arg1 entity.TagID | |||
| 1206 | + | if args[1] != nil { | |||
| 1207 | + | arg1 = args[1].(entity.TagID) | |||
| 1208 | + | } | |||
| 1209 | + | run( | |||
| 1210 | + | arg0, | |||
| 1211 | + | arg1, | |||
| 1212 | + | ) | |||
| 1213 | + | }) | |||
| 1214 | + | return _c | |||
| 1215 | + | } | |||
| 1216 | + | ||||
| 1217 | + | func (_c *MockTagRepository_Delete_Call) Return(err error) *MockTagRepository_Delete_Call { | |||
| 1218 | + | _c.Call.Return(err) | |||
| 1219 | + | return _c | |||
| 1220 | + | } | |||
| 1221 | + | ||||
| 1222 | + | func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockTagRepository_Delete_Call { | |||
| 1223 | + | _c.Call.Return(run) | |||
| 1224 | + | return _c | |||
| 1225 | + | } | |||
| 1226 | + | ||||
| 1227 | + | // FindByID provides a mock function for the type MockTagRepository | |||
| 1228 | + | func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) { | |||
| 1229 | + | ret := _mock.Called(ctx, id) | |||
| 1230 | + | ||||
| 1231 | + | if len(ret) == 0 { | |||
| 1232 | + | panic("no return value specified for FindByID") | |||
| 1233 | + | } | |||
| 1234 | + | ||||
| 1235 | + | var r0 *entity.Tag | |||
| 1236 | + | var r1 error | |||
| 1237 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok { | |||
| 1238 | + | return returnFunc(ctx, id) | |||
| 1239 | + | } | |||
| 1240 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok { | |||
| 1241 | + | r0 = returnFunc(ctx, id) | |||
| 1242 | + | } else { | |||
| 1243 | + | if ret.Get(0) != nil { | |||
| 1244 | + | r0 = ret.Get(0).(*entity.Tag) | |||
| 1245 | + | } | |||
| 1246 | + | } | |||
| 1247 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok { | |||
| 1248 | + | r1 = returnFunc(ctx, id) | |||
| 1249 | + | } else { | |||
| 1250 | + | r1 = ret.Error(1) | |||
| 1251 | + | } | |||
| 1252 | + | return r0, r1 | |||
| 1253 | + | } | |||
| 1254 | + | ||||
| 1255 | + | // MockTagRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID' | |||
| 1256 | + | type MockTagRepository_FindByID_Call struct { | |||
| 1257 | + | *mock.Call | |||
| 1258 | + | } | |||
| 1259 | + | ||||
| 1260 | + | // FindByID is a helper method to define mock.On call | |||
| 1261 | + | // - ctx context.Context | |||
| 1262 | + | // - id entity.TagID | |||
| 1263 | + | func (_e *MockTagRepository_Expecter) FindByID(ctx any, id any) *MockTagRepository_FindByID_Call { | |||
| 1264 | + | return &MockTagRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)} | |||
| 1265 | + | } | |||
| 1266 | + | ||||
| 1267 | + | func (_c *MockTagRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_FindByID_Call { | |||
| 1268 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1269 | + | var arg0 context.Context | |||
| 1270 | + | if args[0] != nil { | |||
| 1271 | + | arg0 = args[0].(context.Context) | |||
| 1272 | + | } | |||
| 1273 | + | var arg1 entity.TagID | |||
| 1274 | + | if args[1] != nil { | |||
| 1275 | + | arg1 = args[1].(entity.TagID) | |||
| 1276 | + | } | |||
| 1277 | + | run( | |||
| 1278 | + | arg0, | |||
| 1279 | + | arg1, | |||
| 1280 | + | ) | |||
| 1281 | + | }) | |||
| 1282 | + | return _c | |||
| 1283 | + | } | |||
| 1284 | + | ||||
| 1285 | + | func (_c *MockTagRepository_FindByID_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByID_Call { | |||
| 1286 | + | _c.Call.Return(tag, err) | |||
| 1287 | + | return _c | |||
| 1288 | + | } | |||
| 1289 | + | ||||
| 1290 | + | func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call { | |||
| 1291 | + | _c.Call.Return(run) | |||
| 1292 | + | return _c | |||
| 1293 | + | } | |||
| 1294 | + | ||||
| 1295 | + | // FindByName provides a mock function for the type MockTagRepository | |||
| 1296 | + | func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) { | |||
| 1297 | + | ret := _mock.Called(ctx, name) | |||
| 1298 | + | ||||
| 1299 | + | if len(ret) == 0 { | |||
| 1300 | + | panic("no return value specified for FindByName") | |||
| 1301 | + | } | |||
| 1302 | + | ||||
| 1303 | + | var r0 *entity.Tag | |||
| 1304 | + | var r1 error | |||
| 1305 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok { | |||
| 1306 | + | return returnFunc(ctx, name) | |||
| 1307 | + | } | |||
| 1308 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok { | |||
| 1309 | + | r0 = returnFunc(ctx, name) | |||
| 1310 | + | } else { | |||
| 1311 | + | if ret.Get(0) != nil { | |||
| 1312 | + | r0 = ret.Get(0).(*entity.Tag) | |||
| 1313 | + | } | |||
| 1314 | + | } | |||
| 1315 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 1316 | + | r1 = returnFunc(ctx, name) | |||
| 1317 | + | } else { | |||
| 1318 | + | r1 = ret.Error(1) | |||
| 1319 | + | } | |||
| 1320 | + | return r0, r1 | |||
| 1321 | + | } | |||
| 1322 | + | ||||
| 1323 | + | // MockTagRepository_FindByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByName' | |||
| 1324 | + | type MockTagRepository_FindByName_Call struct { | |||
| 1325 | + | *mock.Call | |||
| 1326 | + | } | |||
| 1327 | + | ||||
| 1328 | + | // FindByName is a helper method to define mock.On call | |||
| 1329 | + | // - ctx context.Context | |||
| 1330 | + | // - name string | |||
| 1331 | + | func (_e *MockTagRepository_Expecter) FindByName(ctx any, name any) *MockTagRepository_FindByName_Call { | |||
| 1332 | + | return &MockTagRepository_FindByName_Call{Call: _e.mock.On("FindByName", ctx, name)} | |||
| 1333 | + | } | |||
| 1334 | + | ||||
| 1335 | + | func (_c *MockTagRepository_FindByName_Call) Run(run func(ctx context.Context, name string)) *MockTagRepository_FindByName_Call { | |||
| 1336 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1337 | + | var arg0 context.Context | |||
| 1338 | + | if args[0] != nil { | |||
| 1339 | + | arg0 = args[0].(context.Context) | |||
| 1340 | + | } | |||
| 1341 | + | var arg1 string | |||
| 1342 | + | if args[1] != nil { | |||
| 1343 | + | arg1 = args[1].(string) | |||
| 1344 | + | } | |||
| 1345 | + | run( | |||
| 1346 | + | arg0, | |||
| 1347 | + | arg1, | |||
| 1348 | + | ) | |||
| 1349 | + | }) | |||
| 1350 | + | return _c | |||
| 1351 | + | } | |||
| 1352 | + | ||||
| 1353 | + | func (_c *MockTagRepository_FindByName_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByName_Call { | |||
| 1354 | + | _c.Call.Return(tag, err) | |||
| 1355 | + | return _c | |||
| 1356 | + | } | |||
| 1357 | + | ||||
| 1358 | + | func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(ctx context.Context, name string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call { | |||
| 1359 | + | _c.Call.Return(run) | |||
| 1360 | + | return _c | |||
| 1361 | + | } | |||
| 1362 | + | ||||
| 1363 | + | // GetAll provides a mock function for the type MockTagRepository | |||
| 1364 | + | func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) { | |||
| 1365 | + | ret := _mock.Called(ctx) | |||
| 1366 | + | ||||
| 1367 | + | if len(ret) == 0 { | |||
| 1368 | + | panic("no return value specified for GetAll") | |||
| 1369 | + | } | |||
| 1370 | + | ||||
| 1371 | + | var r0 []*entity.Tag | |||
| 1372 | + | var r1 error | |||
| 1373 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok { | |||
| 1374 | + | return returnFunc(ctx) | |||
| 1375 | + | } | |||
| 1376 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok { | |||
| 1377 | + | r0 = returnFunc(ctx) | |||
| 1378 | + | } else { | |||
| 1379 | + | if ret.Get(0) != nil { | |||
| 1380 | + | r0 = ret.Get(0).([]*entity.Tag) | |||
| 1381 | + | } | |||
| 1382 | + | } | |||
| 1383 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1384 | + | r1 = returnFunc(ctx) | |||
| 1385 | + | } else { | |||
| 1386 | + | r1 = ret.Error(1) | |||
| 1387 | + | } | |||
| 1388 | + | return r0, r1 | |||
| 1389 | + | } | |||
| 1390 | + | ||||
| 1391 | + | // MockTagRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' | |||
| 1392 | + | type MockTagRepository_GetAll_Call struct { | |||
| 1393 | + | *mock.Call | |||
| 1394 | + | } | |||
| 1395 | + | ||||
| 1396 | + | // GetAll is a helper method to define mock.On call | |||
| 1397 | + | // - ctx context.Context | |||
| 1398 | + | func (_e *MockTagRepository_Expecter) GetAll(ctx any) *MockTagRepository_GetAll_Call { | |||
| 1399 | + | return &MockTagRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} | |||
| 1400 | + | } | |||
| 1401 | + | ||||
| 1402 | + | func (_c *MockTagRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockTagRepository_GetAll_Call { | |||
| 1403 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1404 | + | var arg0 context.Context | |||
| 1405 | + | if args[0] != nil { | |||
| 1406 | + | arg0 = args[0].(context.Context) | |||
| 1407 | + | } | |||
| 1408 | + | run( | |||
| 1409 | + | arg0, | |||
| 1410 | + | ) | |||
| 1411 | + | }) | |||
| 1412 | + | return _c | |||
| 1413 | + | } | |||
| 1414 | + | ||||
| 1415 | + | func (_c *MockTagRepository_GetAll_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetAll_Call { | |||
| 1416 | + | _c.Call.Return(tags, err) | |||
| 1417 | + | return _c | |||
| 1418 | + | } | |||
| 1419 | + | ||||
| 1420 | + | func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call { | |||
| 1421 | + | _c.Call.Return(run) | |||
| 1422 | + | return _c | |||
| 1423 | + | } | |||
| 1424 | + | ||||
| 1425 | + | // GetForFavorite provides a mock function for the type MockTagRepository | |||
| 1426 | + | func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) { | |||
| 1427 | + | ret := _mock.Called(ctx, favID) | |||
| 1428 | + | ||||
| 1429 | + | if len(ret) == 0 { | |||
| 1430 | + | panic("no return value specified for GetForFavorite") | |||
| 1431 | + | } | |||
| 1432 | + | ||||
| 1433 | + | var r0 []*entity.Tag | |||
| 1434 | + | var r1 error | |||
| 1435 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok { | |||
| 1436 | + | return returnFunc(ctx, favID) | |||
| 1437 | + | } | |||
| 1438 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok { | |||
| 1439 | + | r0 = returnFunc(ctx, favID) | |||
| 1440 | + | } else { | |||
| 1441 | + | if ret.Get(0) != nil { | |||
| 1442 | + | r0 = ret.Get(0).([]*entity.Tag) | |||
| 1443 | + | } | |||
| 1444 | + | } | |||
| 1445 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { | |||
| 1446 | + | r1 = returnFunc(ctx, favID) | |||
| 1447 | + | } else { | |||
| 1448 | + | r1 = ret.Error(1) | |||
| 1449 | + | } | |||
| 1450 | + | return r0, r1 | |||
| 1451 | + | } | |||
| 1452 | + | ||||
| 1453 | + | // MockTagRepository_GetForFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForFavorite' | |||
| 1454 | + | type MockTagRepository_GetForFavorite_Call struct { | |||
| 1455 | + | *mock.Call | |||
| 1456 | + | } | |||
| 1457 | + | ||||
| 1458 | + | // GetForFavorite is a helper method to define mock.On call | |||
| 1459 | + | // - ctx context.Context | |||
| 1460 | + | // - favID entity.FavoriteID | |||
| 1461 | + | func (_e *MockTagRepository_Expecter) GetForFavorite(ctx any, favID any) *MockTagRepository_GetForFavorite_Call { | |||
| 1462 | + | return &MockTagRepository_GetForFavorite_Call{Call: _e.mock.On("GetForFavorite", ctx, favID)} | |||
| 1463 | + | } | |||
| 1464 | + | ||||
| 1465 | + | func (_c *MockTagRepository_GetForFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID)) *MockTagRepository_GetForFavorite_Call { | |||
| 1466 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1467 | + | var arg0 context.Context | |||
| 1468 | + | if args[0] != nil { | |||
| 1469 | + | arg0 = args[0].(context.Context) | |||
| 1470 | + | } | |||
| 1471 | + | var arg1 entity.FavoriteID | |||
| 1472 | + | if args[1] != nil { | |||
| 1473 | + | arg1 = args[1].(entity.FavoriteID) | |||
| 1474 | + | } | |||
| 1475 | + | run( | |||
| 1476 | + | arg0, | |||
| 1477 | + | arg1, | |||
| 1478 | + | ) | |||
| 1479 | + | }) | |||
| 1480 | + | return _c | |||
| 1481 | + | } | |||
| 1482 | + | ||||
| 1483 | + | func (_c *MockTagRepository_GetForFavorite_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetForFavorite_Call { | |||
| 1484 | + | _c.Call.Return(tags, err) | |||
| 1485 | + | return _c | |||
| 1486 | + | } | |||
| 1487 | + | ||||
| 1488 | + | func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call { | |||
| 1489 | + | _c.Call.Return(run) | |||
| 1490 | + | return _c | |||
| 1491 | + | } | |||
| 1492 | + | ||||
| 1493 | + | // RemoveFromFavorite provides a mock function for the type MockTagRepository | |||
| 1494 | + | func (_mock *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { | |||
| 1495 | + | ret := _mock.Called(ctx, tagID, favID) | |||
| 1496 | + | ||||
| 1497 | + | if len(ret) == 0 { | |||
| 1498 | + | panic("no return value specified for RemoveFromFavorite") | |||
| 1499 | + | } | |||
| 1500 | + | ||||
| 1501 | + | var r0 error | |||
| 1502 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { | |||
| 1503 | + | r0 = returnFunc(ctx, tagID, favID) | |||
| 1504 | + | } else { | |||
| 1505 | + | r0 = ret.Error(0) | |||
| 1506 | + | } | |||
| 1507 | + | return r0 | |||
| 1508 | + | } | |||
| 1509 | + | ||||
| 1510 | + | // MockTagRepository_RemoveFromFavorite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveFromFavorite' | |||
| 1511 | + | type MockTagRepository_RemoveFromFavorite_Call struct { | |||
| 1512 | + | *mock.Call | |||
| 1513 | + | } | |||
| 1514 | + | ||||
| 1515 | + | // RemoveFromFavorite is a helper method to define mock.On call | |||
| 1516 | + | // - ctx context.Context | |||
| 1517 | + | // - tagID entity.TagID | |||
| 1518 | + | // - favID entity.FavoriteID | |||
| 1519 | + | func (_e *MockTagRepository_Expecter) RemoveFromFavorite(ctx any, tagID any, favID any) *MockTagRepository_RemoveFromFavorite_Call { | |||
| 1520 | + | return &MockTagRepository_RemoveFromFavorite_Call{Call: _e.mock.On("RemoveFromFavorite", ctx, tagID, favID)} | |||
| 1521 | + | } | |||
| 1522 | + | ||||
| 1523 | + | func (_c *MockTagRepository_RemoveFromFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_RemoveFromFavorite_Call { | |||
| 1524 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1525 | + | var arg0 context.Context | |||
| 1526 | + | if args[0] != nil { | |||
| 1527 | + | arg0 = args[0].(context.Context) | |||
| 1528 | + | } | |||
| 1529 | + | var arg1 entity.TagID | |||
| 1530 | + | if args[1] != nil { | |||
| 1531 | + | arg1 = args[1].(entity.TagID) | |||
| 1532 | + | } | |||
| 1533 | + | var arg2 entity.FavoriteID | |||
| 1534 | + | if args[2] != nil { | |||
| 1535 | + | arg2 = args[2].(entity.FavoriteID) | |||
| 1536 | + | } | |||
| 1537 | + | run( | |||
| 1538 | + | arg0, | |||
| 1539 | + | arg1, | |||
| 1540 | + | arg2, | |||
| 1541 | + | ) | |||
| 1542 | + | }) | |||
| 1543 | + | return _c | |||
| 1544 | + | } | |||
| 1545 | + | ||||
| 1546 | + | func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(err error) *MockTagRepository_RemoveFromFavorite_Call { | |||
| 1547 | + | _c.Call.Return(err) | |||
| 1548 | + | return _c | |||
| 1549 | + | } | |||
| 1550 | + | ||||
| 1551 | + | func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call { | |||
| 1552 | + | _c.Call.Return(run) | |||
| 1553 | + | return _c | |||
| 1554 | + | } | |||
| 1555 | + | ||||
| 1556 | + | // Save provides a mock function for the type MockTagRepository | |||
| 1557 | + | func (_mock *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error { | |||
| 1558 | + | ret := _mock.Called(ctx, tag) | |||
| 1559 | + | ||||
| 1560 | + | if len(ret) == 0 { | |||
| 1561 | + | panic("no return value specified for Save") | |||
| 1562 | + | } | |||
| 1563 | + | ||||
| 1564 | + | var r0 error | |||
| 1565 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok { | |||
| 1566 | + | r0 = returnFunc(ctx, tag) | |||
| 1567 | + | } else { | |||
| 1568 | + | r0 = ret.Error(0) | |||
| 1569 | + | } | |||
| 1570 | + | return r0 | |||
| 1571 | + | } | |||
| 1572 | + | ||||
| 1573 | + | // MockTagRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' | |||
| 1574 | + | type MockTagRepository_Save_Call struct { | |||
| 1575 | + | *mock.Call | |||
| 1576 | + | } | |||
| 1577 | + | ||||
| 1578 | + | // Save is a helper method to define mock.On call | |||
| 1579 | + | // - ctx context.Context | |||
| 1580 | + | // - tag *entity.Tag | |||
| 1581 | + | func (_e *MockTagRepository_Expecter) Save(ctx any, tag any) *MockTagRepository_Save_Call { | |||
| 1582 | + | return &MockTagRepository_Save_Call{Call: _e.mock.On("Save", ctx, tag)} | |||
| 1583 | + | } | |||
| 1584 | + | ||||
| 1585 | + | func (_c *MockTagRepository_Save_Call) Run(run func(ctx context.Context, tag *entity.Tag)) *MockTagRepository_Save_Call { | |||
| 1586 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1587 | + | var arg0 context.Context | |||
| 1588 | + | if args[0] != nil { | |||
| 1589 | + | arg0 = args[0].(context.Context) | |||
| 1590 | + | } | |||
| 1591 | + | var arg1 *entity.Tag | |||
| 1592 | + | if args[1] != nil { | |||
| 1593 | + | arg1 = args[1].(*entity.Tag) | |||
| 1594 | + | } | |||
| 1595 | + | run( | |||
| 1596 | + | arg0, | |||
| 1597 | + | arg1, | |||
| 1598 | + | ) | |||
| 1599 | + | }) | |||
| 1600 | + | return _c | |||
| 1601 | + | } | |||
| 1602 | + | ||||
| 1603 | + | func (_c *MockTagRepository_Save_Call) Return(err error) *MockTagRepository_Save_Call { | |||
| 1604 | + | _c.Call.Return(err) | |||
| 1605 | + | return _c | |||
| 1606 | + | } | |||
| 1607 | + | ||||
| 1608 | + | func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(ctx context.Context, tag *entity.Tag) error) *MockTagRepository_Save_Call { | |||
| 1609 | + | _c.Call.Return(run) | |||
| 1610 | + | return _c | |||
| 1611 | + | } | |||
A internal/domain/repository/mocks/filter.go +280 -0
| @@ -0,0 +1,280 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | mock "github.com/stretchr/testify/mock" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // NewMockContentWhitelistRepository creates a new instance of MockContentWhitelistRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 14 | + | // The first argument is typically a *testing.T value. | |||
| 15 | + | func NewMockContentWhitelistRepository(t interface { | |||
| 16 | + | mock.TestingT | |||
| 17 | + | Cleanup(func()) | |||
| 18 | + | }) *MockContentWhitelistRepository { | |||
| 19 | + | mock := &MockContentWhitelistRepository{} | |||
| 20 | + | mock.Mock.Test(t) | |||
| 21 | + | ||||
| 22 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 23 | + | ||||
| 24 | + | return mock | |||
| 25 | + | } | |||
| 26 | + | ||||
| 27 | + | // MockContentWhitelistRepository is an autogenerated mock type for the ContentWhitelistRepository type | |||
| 28 | + | type MockContentWhitelistRepository struct { | |||
| 29 | + | mock.Mock | |||
| 30 | + | } | |||
| 31 | + | ||||
| 32 | + | type MockContentWhitelistRepository_Expecter struct { | |||
| 33 | + | mock *mock.Mock | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | func (_m *MockContentWhitelistRepository) EXPECT() *MockContentWhitelistRepository_Expecter { | |||
| 37 | + | return &MockContentWhitelistRepository_Expecter{mock: &_m.Mock} | |||
| 38 | + | } | |||
| 39 | + | ||||
| 40 | + | // Add provides a mock function for the type MockContentWhitelistRepository | |||
| 41 | + | func (_mock *MockContentWhitelistRepository) Add(ctx context.Context, domain string) error { | |||
| 42 | + | ret := _mock.Called(ctx, domain) | |||
| 43 | + | ||||
| 44 | + | if len(ret) == 0 { | |||
| 45 | + | panic("no return value specified for Add") | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | var r0 error | |||
| 49 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 50 | + | r0 = returnFunc(ctx, domain) | |||
| 51 | + | } else { | |||
| 52 | + | r0 = ret.Error(0) | |||
| 53 | + | } | |||
| 54 | + | return r0 | |||
| 55 | + | } | |||
| 56 | + | ||||
| 57 | + | // MockContentWhitelistRepository_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' | |||
| 58 | + | type MockContentWhitelistRepository_Add_Call struct { | |||
| 59 | + | *mock.Call | |||
| 60 | + | } | |||
| 61 | + | ||||
| 62 | + | // Add is a helper method to define mock.On call | |||
| 63 | + | // - ctx context.Context | |||
| 64 | + | // - domain string | |||
| 65 | + | func (_e *MockContentWhitelistRepository_Expecter) Add(ctx any, domain any) *MockContentWhitelistRepository_Add_Call { | |||
| 66 | + | return &MockContentWhitelistRepository_Add_Call{Call: _e.mock.On("Add", ctx, domain)} | |||
| 67 | + | } | |||
| 68 | + | ||||
| 69 | + | func (_c *MockContentWhitelistRepository_Add_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Add_Call { | |||
| 70 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 71 | + | var arg0 context.Context | |||
| 72 | + | if args[0] != nil { | |||
| 73 | + | arg0 = args[0].(context.Context) | |||
| 74 | + | } | |||
| 75 | + | var arg1 string | |||
| 76 | + | if args[1] != nil { | |||
| 77 | + | arg1 = args[1].(string) | |||
| 78 | + | } | |||
| 79 | + | run( | |||
| 80 | + | arg0, | |||
| 81 | + | arg1, | |||
| 82 | + | ) | |||
| 83 | + | }) | |||
| 84 | + | return _c | |||
| 85 | + | } | |||
| 86 | + | ||||
| 87 | + | func (_c *MockContentWhitelistRepository_Add_Call) Return(err error) *MockContentWhitelistRepository_Add_Call { | |||
| 88 | + | _c.Call.Return(err) | |||
| 89 | + | return _c | |||
| 90 | + | } | |||
| 91 | + | ||||
| 92 | + | func (_c *MockContentWhitelistRepository_Add_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Add_Call { | |||
| 93 | + | _c.Call.Return(run) | |||
| 94 | + | return _c | |||
| 95 | + | } | |||
| 96 | + | ||||
| 97 | + | // Contains provides a mock function for the type MockContentWhitelistRepository | |||
| 98 | + | func (_mock *MockContentWhitelistRepository) Contains(ctx context.Context, domain string) (bool, error) { | |||
| 99 | + | ret := _mock.Called(ctx, domain) | |||
| 100 | + | ||||
| 101 | + | if len(ret) == 0 { | |||
| 102 | + | panic("no return value specified for Contains") | |||
| 103 | + | } | |||
| 104 | + | ||||
| 105 | + | var r0 bool | |||
| 106 | + | var r1 error | |||
| 107 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { | |||
| 108 | + | return returnFunc(ctx, domain) | |||
| 109 | + | } | |||
| 110 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { | |||
| 111 | + | r0 = returnFunc(ctx, domain) | |||
| 112 | + | } else { | |||
| 113 | + | r0 = ret.Get(0).(bool) | |||
| 114 | + | } | |||
| 115 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 116 | + | r1 = returnFunc(ctx, domain) | |||
| 117 | + | } else { | |||
| 118 | + | r1 = ret.Error(1) | |||
| 119 | + | } | |||
| 120 | + | return r0, r1 | |||
| 121 | + | } | |||
| 122 | + | ||||
| 123 | + | // MockContentWhitelistRepository_Contains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Contains' | |||
| 124 | + | type MockContentWhitelistRepository_Contains_Call struct { | |||
| 125 | + | *mock.Call | |||
| 126 | + | } | |||
| 127 | + | ||||
| 128 | + | // Contains is a helper method to define mock.On call | |||
| 129 | + | // - ctx context.Context | |||
| 130 | + | // - domain string | |||
| 131 | + | func (_e *MockContentWhitelistRepository_Expecter) Contains(ctx any, domain any) *MockContentWhitelistRepository_Contains_Call { | |||
| 132 | + | return &MockContentWhitelistRepository_Contains_Call{Call: _e.mock.On("Contains", ctx, domain)} | |||
| 133 | + | } | |||
| 134 | + | ||||
| 135 | + | func (_c *MockContentWhitelistRepository_Contains_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Contains_Call { | |||
| 136 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 137 | + | var arg0 context.Context | |||
| 138 | + | if args[0] != nil { | |||
| 139 | + | arg0 = args[0].(context.Context) | |||
| 140 | + | } | |||
| 141 | + | var arg1 string | |||
| 142 | + | if args[1] != nil { | |||
| 143 | + | arg1 = args[1].(string) | |||
| 144 | + | } | |||
| 145 | + | run( | |||
| 146 | + | arg0, | |||
| 147 | + | arg1, | |||
| 148 | + | ) | |||
| 149 | + | }) | |||
| 150 | + | return _c | |||
| 151 | + | } | |||
| 152 | + | ||||
| 153 | + | func (_c *MockContentWhitelistRepository_Contains_Call) Return(b bool, err error) *MockContentWhitelistRepository_Contains_Call { | |||
| 154 | + | _c.Call.Return(b, err) | |||
| 155 | + | return _c | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | func (_c *MockContentWhitelistRepository_Contains_Call) RunAndReturn(run func(ctx context.Context, domain string) (bool, error)) *MockContentWhitelistRepository_Contains_Call { | |||
| 159 | + | _c.Call.Return(run) | |||
| 160 | + | return _c | |||
| 161 | + | } | |||
| 162 | + | ||||
| 163 | + | // GetAll provides a mock function for the type MockContentWhitelistRepository | |||
| 164 | + | func (_mock *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]string, error) { | |||
| 165 | + | ret := _mock.Called(ctx) | |||
| 166 | + | ||||
| 167 | + | if len(ret) == 0 { | |||
| 168 | + | panic("no return value specified for GetAll") | |||
| 169 | + | } | |||
| 170 | + | ||||
| 171 | + | var r0 []string | |||
| 172 | + | var r1 error | |||
| 173 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { | |||
| 174 | + | return returnFunc(ctx) | |||
| 175 | + | } | |||
| 176 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { | |||
| 177 | + | r0 = returnFunc(ctx) | |||
| 178 | + | } else { | |||
| 179 | + | if ret.Get(0) != nil { | |||
| 180 | + | r0 = ret.Get(0).([]string) | |||
| 181 | + | } | |||
| 182 | + | } | |||
| 183 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 184 | + | r1 = returnFunc(ctx) | |||
| 185 | + | } else { | |||
| 186 | + | r1 = ret.Error(1) | |||
| 187 | + | } | |||
| 188 | + | return r0, r1 | |||
| 189 | + | } | |||
| 190 | + | ||||
| 191 | + | // MockContentWhitelistRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' | |||
| 192 | + | type MockContentWhitelistRepository_GetAll_Call struct { | |||
| 193 | + | *mock.Call | |||
| 194 | + | } | |||
| 195 | + | ||||
| 196 | + | // GetAll is a helper method to define mock.On call | |||
| 197 | + | // - ctx context.Context | |||
| 198 | + | func (_e *MockContentWhitelistRepository_Expecter) GetAll(ctx any) *MockContentWhitelistRepository_GetAll_Call { | |||
| 199 | + | return &MockContentWhitelistRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | func (_c *MockContentWhitelistRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockContentWhitelistRepository_GetAll_Call { | |||
| 203 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 204 | + | var arg0 context.Context | |||
| 205 | + | if args[0] != nil { | |||
| 206 | + | arg0 = args[0].(context.Context) | |||
| 207 | + | } | |||
| 208 | + | run( | |||
| 209 | + | arg0, | |||
| 210 | + | ) | |||
| 211 | + | }) | |||
| 212 | + | return _c | |||
| 213 | + | } | |||
| 214 | + | ||||
| 215 | + | func (_c *MockContentWhitelistRepository_GetAll_Call) Return(strings []string, err error) *MockContentWhitelistRepository_GetAll_Call { | |||
| 216 | + | _c.Call.Return(strings, err) | |||
| 217 | + | return _c | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | func (_c *MockContentWhitelistRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockContentWhitelistRepository_GetAll_Call { | |||
| 221 | + | _c.Call.Return(run) | |||
| 222 | + | return _c | |||
| 223 | + | } | |||
| 224 | + | ||||
| 225 | + | // Remove provides a mock function for the type MockContentWhitelistRepository | |||
| 226 | + | func (_mock *MockContentWhitelistRepository) Remove(ctx context.Context, domain string) error { | |||
| 227 | + | ret := _mock.Called(ctx, domain) | |||
| 228 | + | ||||
| 229 | + | if len(ret) == 0 { | |||
| 230 | + | panic("no return value specified for Remove") | |||
| 231 | + | } | |||
| 232 | + | ||||
| 233 | + | var r0 error | |||
| 234 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 235 | + | r0 = returnFunc(ctx, domain) | |||
| 236 | + | } else { | |||
| 237 | + | r0 = ret.Error(0) | |||
| 238 | + | } | |||
| 239 | + | return r0 | |||
| 240 | + | } | |||
| 241 | + | ||||
| 242 | + | // MockContentWhitelistRepository_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' | |||
| 243 | + | type MockContentWhitelistRepository_Remove_Call struct { | |||
| 244 | + | *mock.Call | |||
| 245 | + | } | |||
| 246 | + | ||||
| 247 | + | // Remove is a helper method to define mock.On call | |||
| 248 | + | // - ctx context.Context | |||
| 249 | + | // - domain string | |||
| 250 | + | func (_e *MockContentWhitelistRepository_Expecter) Remove(ctx any, domain any) *MockContentWhitelistRepository_Remove_Call { | |||
| 251 | + | return &MockContentWhitelistRepository_Remove_Call{Call: _e.mock.On("Remove", ctx, domain)} | |||
| 252 | + | } | |||
| 253 | + | ||||
| 254 | + | func (_c *MockContentWhitelistRepository_Remove_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Remove_Call { | |||
| 255 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 256 | + | var arg0 context.Context | |||
| 257 | + | if args[0] != nil { | |||
| 258 | + | arg0 = args[0].(context.Context) | |||
| 259 | + | } | |||
| 260 | + | var arg1 string | |||
| 261 | + | if args[1] != nil { | |||
| 262 | + | arg1 = args[1].(string) | |||
| 263 | + | } | |||
| 264 | + | run( | |||
| 265 | + | arg0, | |||
| 266 | + | arg1, | |||
| 267 | + | ) | |||
| 268 | + | }) | |||
| 269 | + | return _c | |||
| 270 | + | } | |||
| 271 | + | ||||
| 272 | + | func (_c *MockContentWhitelistRepository_Remove_Call) Return(err error) *MockContentWhitelistRepository_Remove_Call { | |||
| 273 | + | _c.Call.Return(err) | |||
| 274 | + | return _c | |||
| 275 | + | } | |||
| 276 | + | ||||
| 277 | + | func (_c *MockContentWhitelistRepository_Remove_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Remove_Call { | |||
| 278 | + | _c.Call.Return(run) | |||
| 279 | + | return _c | |||
| 280 | + | } | |||
A internal/domain/repository/mocks/history.go +1541 -0
| @@ -0,0 +1,1541 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | "time" | |||
| 10 | + | ||||
| 11 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockHistoryRepository creates a new instance of MockHistoryRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockHistoryRepository(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockHistoryRepository { | |||
| 21 | + | mock := &MockHistoryRepository{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockHistoryRepository is an autogenerated mock type for the HistoryRepository type | |||
| 30 | + | type MockHistoryRepository struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockHistoryRepository_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockHistoryRepository) EXPECT() *MockHistoryRepository_Expecter { | |||
| 39 | + | return &MockHistoryRepository_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // Delete provides a mock function for the type MockHistoryRepository | |||
| 43 | + | func (_mock *MockHistoryRepository) Delete(ctx context.Context, id int64) error { | |||
| 44 | + | ret := _mock.Called(ctx, id) | |||
| 45 | + | ||||
| 46 | + | if len(ret) == 0 { | |||
| 47 | + | panic("no return value specified for Delete") | |||
| 48 | + | } | |||
| 49 | + | ||||
| 50 | + | var r0 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { | |||
| 52 | + | r0 = returnFunc(ctx, id) | |||
| 53 | + | } else { | |||
| 54 | + | r0 = ret.Error(0) | |||
| 55 | + | } | |||
| 56 | + | return r0 | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | // MockHistoryRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 60 | + | type MockHistoryRepository_Delete_Call struct { | |||
| 61 | + | *mock.Call | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | // Delete is a helper method to define mock.On call | |||
| 65 | + | // - ctx context.Context | |||
| 66 | + | // - id int64 | |||
| 67 | + | func (_e *MockHistoryRepository_Expecter) Delete(ctx any, id any) *MockHistoryRepository_Delete_Call { | |||
| 68 | + | return &MockHistoryRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockHistoryRepository_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistoryRepository_Delete_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | var arg1 int64 | |||
| 78 | + | if args[1] != nil { | |||
| 79 | + | arg1 = args[1].(int64) | |||
| 80 | + | } | |||
| 81 | + | run( | |||
| 82 | + | arg0, | |||
| 83 | + | arg1, | |||
| 84 | + | ) | |||
| 85 | + | }) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockHistoryRepository_Delete_Call) Return(err error) *MockHistoryRepository_Delete_Call { | |||
| 90 | + | _c.Call.Return(err) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | func (_c *MockHistoryRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistoryRepository_Delete_Call { | |||
| 95 | + | _c.Call.Return(run) | |||
| 96 | + | return _c | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | // DeleteAll provides a mock function for the type MockHistoryRepository | |||
| 100 | + | func (_mock *MockHistoryRepository) DeleteAll(ctx context.Context) error { | |||
| 101 | + | ret := _mock.Called(ctx) | |||
| 102 | + | ||||
| 103 | + | if len(ret) == 0 { | |||
| 104 | + | panic("no return value specified for DeleteAll") | |||
| 105 | + | } | |||
| 106 | + | ||||
| 107 | + | var r0 error | |||
| 108 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |||
| 109 | + | r0 = returnFunc(ctx) | |||
| 110 | + | } else { | |||
| 111 | + | r0 = ret.Error(0) | |||
| 112 | + | } | |||
| 113 | + | return r0 | |||
| 114 | + | } | |||
| 115 | + | ||||
| 116 | + | // MockHistoryRepository_DeleteAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAll' | |||
| 117 | + | type MockHistoryRepository_DeleteAll_Call struct { | |||
| 118 | + | *mock.Call | |||
| 119 | + | } | |||
| 120 | + | ||||
| 121 | + | // DeleteAll is a helper method to define mock.On call | |||
| 122 | + | // - ctx context.Context | |||
| 123 | + | func (_e *MockHistoryRepository_Expecter) DeleteAll(ctx any) *MockHistoryRepository_DeleteAll_Call { | |||
| 124 | + | return &MockHistoryRepository_DeleteAll_Call{Call: _e.mock.On("DeleteAll", ctx)} | |||
| 125 | + | } | |||
| 126 | + | ||||
| 127 | + | func (_c *MockHistoryRepository_DeleteAll_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_DeleteAll_Call { | |||
| 128 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 129 | + | var arg0 context.Context | |||
| 130 | + | if args[0] != nil { | |||
| 131 | + | arg0 = args[0].(context.Context) | |||
| 132 | + | } | |||
| 133 | + | run( | |||
| 134 | + | arg0, | |||
| 135 | + | ) | |||
| 136 | + | }) | |||
| 137 | + | return _c | |||
| 138 | + | } | |||
| 139 | + | ||||
| 140 | + | func (_c *MockHistoryRepository_DeleteAll_Call) Return(err error) *MockHistoryRepository_DeleteAll_Call { | |||
| 141 | + | _c.Call.Return(err) | |||
| 142 | + | return _c | |||
| 143 | + | } | |||
| 144 | + | ||||
| 145 | + | func (_c *MockHistoryRepository_DeleteAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHistoryRepository_DeleteAll_Call { | |||
| 146 | + | _c.Call.Return(run) | |||
| 147 | + | return _c | |||
| 148 | + | } | |||
| 149 | + | ||||
| 150 | + | // DeleteByDomain provides a mock function for the type MockHistoryRepository | |||
| 151 | + | func (_mock *MockHistoryRepository) DeleteByDomain(ctx context.Context, domain string) error { | |||
| 152 | + | ret := _mock.Called(ctx, domain) | |||
| 153 | + | ||||
| 154 | + | if len(ret) == 0 { | |||
| 155 | + | panic("no return value specified for DeleteByDomain") | |||
| 156 | + | } | |||
| 157 | + | ||||
| 158 | + | var r0 error | |||
| 159 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 160 | + | r0 = returnFunc(ctx, domain) | |||
| 161 | + | } else { | |||
| 162 | + | r0 = ret.Error(0) | |||
| 163 | + | } | |||
| 164 | + | return r0 | |||
| 165 | + | } | |||
| 166 | + | ||||
| 167 | + | // MockHistoryRepository_DeleteByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDomain' | |||
| 168 | + | type MockHistoryRepository_DeleteByDomain_Call struct { | |||
| 169 | + | *mock.Call | |||
| 170 | + | } | |||
| 171 | + | ||||
| 172 | + | // DeleteByDomain is a helper method to define mock.On call | |||
| 173 | + | // - ctx context.Context | |||
| 174 | + | // - domain string | |||
| 175 | + | func (_e *MockHistoryRepository_Expecter) DeleteByDomain(ctx any, domain any) *MockHistoryRepository_DeleteByDomain_Call { | |||
| 176 | + | return &MockHistoryRepository_DeleteByDomain_Call{Call: _e.mock.On("DeleteByDomain", ctx, domain)} | |||
| 177 | + | } | |||
| 178 | + | ||||
| 179 | + | func (_c *MockHistoryRepository_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHistoryRepository_DeleteByDomain_Call { | |||
| 180 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 181 | + | var arg0 context.Context | |||
| 182 | + | if args[0] != nil { | |||
| 183 | + | arg0 = args[0].(context.Context) | |||
| 184 | + | } | |||
| 185 | + | var arg1 string | |||
| 186 | + | if args[1] != nil { | |||
| 187 | + | arg1 = args[1].(string) | |||
| 188 | + | } | |||
| 189 | + | run( | |||
| 190 | + | arg0, | |||
| 191 | + | arg1, | |||
| 192 | + | ) | |||
| 193 | + | }) | |||
| 194 | + | return _c | |||
| 195 | + | } | |||
| 196 | + | ||||
| 197 | + | func (_c *MockHistoryRepository_DeleteByDomain_Call) Return(err error) *MockHistoryRepository_DeleteByDomain_Call { | |||
| 198 | + | _c.Call.Return(err) | |||
| 199 | + | return _c | |||
| 200 | + | } | |||
| 201 | + | ||||
| 202 | + | func (_c *MockHistoryRepository_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHistoryRepository_DeleteByDomain_Call { | |||
| 203 | + | _c.Call.Return(run) | |||
| 204 | + | return _c | |||
| 205 | + | } | |||
| 206 | + | ||||
| 207 | + | // DeleteOlderThan provides a mock function for the type MockHistoryRepository | |||
| 208 | + | func (_mock *MockHistoryRepository) DeleteOlderThan(ctx context.Context, before time.Time) error { | |||
| 209 | + | ret := _mock.Called(ctx, before) | |||
| 210 | + | ||||
| 211 | + | if len(ret) == 0 { | |||
| 212 | + | panic("no return value specified for DeleteOlderThan") | |||
| 213 | + | } | |||
| 214 | + | ||||
| 215 | + | var r0 error | |||
| 216 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { | |||
| 217 | + | r0 = returnFunc(ctx, before) | |||
| 218 | + | } else { | |||
| 219 | + | r0 = ret.Error(0) | |||
| 220 | + | } | |||
| 221 | + | return r0 | |||
| 222 | + | } | |||
| 223 | + | ||||
| 224 | + | // MockHistoryRepository_DeleteOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOlderThan' | |||
| 225 | + | type MockHistoryRepository_DeleteOlderThan_Call struct { | |||
| 226 | + | *mock.Call | |||
| 227 | + | } | |||
| 228 | + | ||||
| 229 | + | // DeleteOlderThan is a helper method to define mock.On call | |||
| 230 | + | // - ctx context.Context | |||
| 231 | + | // - before time.Time | |||
| 232 | + | func (_e *MockHistoryRepository_Expecter) DeleteOlderThan(ctx any, before any) *MockHistoryRepository_DeleteOlderThan_Call { | |||
| 233 | + | return &MockHistoryRepository_DeleteOlderThan_Call{Call: _e.mock.On("DeleteOlderThan", ctx, before)} | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | func (_c *MockHistoryRepository_DeleteOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHistoryRepository_DeleteOlderThan_Call { | |||
| 237 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 238 | + | var arg0 context.Context | |||
| 239 | + | if args[0] != nil { | |||
| 240 | + | arg0 = args[0].(context.Context) | |||
| 241 | + | } | |||
| 242 | + | var arg1 time.Time | |||
| 243 | + | if args[1] != nil { | |||
| 244 | + | arg1 = args[1].(time.Time) | |||
| 245 | + | } | |||
| 246 | + | run( | |||
| 247 | + | arg0, | |||
| 248 | + | arg1, | |||
| 249 | + | ) | |||
| 250 | + | }) | |||
| 251 | + | return _c | |||
| 252 | + | } | |||
| 253 | + | ||||
| 254 | + | func (_c *MockHistoryRepository_DeleteOlderThan_Call) Return(err error) *MockHistoryRepository_DeleteOlderThan_Call { | |||
| 255 | + | _c.Call.Return(err) | |||
| 256 | + | return _c | |||
| 257 | + | } | |||
| 258 | + | ||||
| 259 | + | func (_c *MockHistoryRepository_DeleteOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHistoryRepository_DeleteOlderThan_Call { | |||
| 260 | + | _c.Call.Return(run) | |||
| 261 | + | return _c | |||
| 262 | + | } | |||
| 263 | + | ||||
| 264 | + | // DeleteSince provides a mock function for the type MockHistoryRepository | |||
| 265 | + | func (_mock *MockHistoryRepository) DeleteSince(ctx context.Context, since time.Time) error { | |||
| 266 | + | ret := _mock.Called(ctx, since) | |||
| 267 | + | ||||
| 268 | + | if len(ret) == 0 { | |||
| 269 | + | panic("no return value specified for DeleteSince") | |||
| 270 | + | } | |||
| 271 | + | ||||
| 272 | + | var r0 error | |||
| 273 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { | |||
| 274 | + | r0 = returnFunc(ctx, since) | |||
| 275 | + | } else { | |||
| 276 | + | r0 = ret.Error(0) | |||
| 277 | + | } | |||
| 278 | + | return r0 | |||
| 279 | + | } | |||
| 280 | + | ||||
| 281 | + | // MockHistoryRepository_DeleteSince_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSince' | |||
| 282 | + | type MockHistoryRepository_DeleteSince_Call struct { | |||
| 283 | + | *mock.Call | |||
| 284 | + | } | |||
| 285 | + | ||||
| 286 | + | // DeleteSince is a helper method to define mock.On call | |||
| 287 | + | // - ctx context.Context | |||
| 288 | + | // - since time.Time | |||
| 289 | + | func (_e *MockHistoryRepository_Expecter) DeleteSince(ctx any, since any) *MockHistoryRepository_DeleteSince_Call { | |||
| 290 | + | return &MockHistoryRepository_DeleteSince_Call{Call: _e.mock.On("DeleteSince", ctx, since)} | |||
| 291 | + | } | |||
| 292 | + | ||||
| 293 | + | func (_c *MockHistoryRepository_DeleteSince_Call) Run(run func(ctx context.Context, since time.Time)) *MockHistoryRepository_DeleteSince_Call { | |||
| 294 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 295 | + | var arg0 context.Context | |||
| 296 | + | if args[0] != nil { | |||
| 297 | + | arg0 = args[0].(context.Context) | |||
| 298 | + | } | |||
| 299 | + | var arg1 time.Time | |||
| 300 | + | if args[1] != nil { | |||
| 301 | + | arg1 = args[1].(time.Time) | |||
| 302 | + | } | |||
| 303 | + | run( | |||
| 304 | + | arg0, | |||
| 305 | + | arg1, | |||
| 306 | + | ) | |||
| 307 | + | }) | |||
| 308 | + | return _c | |||
| 309 | + | } | |||
| 310 | + | ||||
| 311 | + | func (_c *MockHistoryRepository_DeleteSince_Call) Return(err error) *MockHistoryRepository_DeleteSince_Call { | |||
| 312 | + | _c.Call.Return(err) | |||
| 313 | + | return _c | |||
| 314 | + | } | |||
| 315 | + | ||||
| 316 | + | func (_c *MockHistoryRepository_DeleteSince_Call) RunAndReturn(run func(ctx context.Context, since time.Time) error) *MockHistoryRepository_DeleteSince_Call { | |||
| 317 | + | _c.Call.Return(run) | |||
| 318 | + | return _c | |||
| 319 | + | } | |||
| 320 | + | ||||
| 321 | + | // FindByURL provides a mock function for the type MockHistoryRepository | |||
| 322 | + | func (_mock *MockHistoryRepository) FindByURL(ctx context.Context, url string) (*entity.HistoryEntry, error) { | |||
| 323 | + | ret := _mock.Called(ctx, url) | |||
| 324 | + | ||||
| 325 | + | if len(ret) == 0 { | |||
| 326 | + | panic("no return value specified for FindByURL") | |||
| 327 | + | } | |||
| 328 | + | ||||
| 329 | + | var r0 *entity.HistoryEntry | |||
| 330 | + | var r1 error | |||
| 331 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.HistoryEntry, error)); ok { | |||
| 332 | + | return returnFunc(ctx, url) | |||
| 333 | + | } | |||
| 334 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.HistoryEntry); ok { | |||
| 335 | + | r0 = returnFunc(ctx, url) | |||
| 336 | + | } else { | |||
| 337 | + | if ret.Get(0) != nil { | |||
| 338 | + | r0 = ret.Get(0).(*entity.HistoryEntry) | |||
| 339 | + | } | |||
| 340 | + | } | |||
| 341 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 342 | + | r1 = returnFunc(ctx, url) | |||
| 343 | + | } else { | |||
| 344 | + | r1 = ret.Error(1) | |||
| 345 | + | } | |||
| 346 | + | return r0, r1 | |||
| 347 | + | } | |||
| 348 | + | ||||
| 349 | + | // MockHistoryRepository_FindByURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByURL' | |||
| 350 | + | type MockHistoryRepository_FindByURL_Call struct { | |||
| 351 | + | *mock.Call | |||
| 352 | + | } | |||
| 353 | + | ||||
| 354 | + | // FindByURL is a helper method to define mock.On call | |||
| 355 | + | // - ctx context.Context | |||
| 356 | + | // - url string | |||
| 357 | + | func (_e *MockHistoryRepository_Expecter) FindByURL(ctx any, url any) *MockHistoryRepository_FindByURL_Call { | |||
| 358 | + | return &MockHistoryRepository_FindByURL_Call{Call: _e.mock.On("FindByURL", ctx, url)} | |||
| 359 | + | } | |||
| 360 | + | ||||
| 361 | + | func (_c *MockHistoryRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_FindByURL_Call { | |||
| 362 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 363 | + | var arg0 context.Context | |||
| 364 | + | if args[0] != nil { | |||
| 365 | + | arg0 = args[0].(context.Context) | |||
| 366 | + | } | |||
| 367 | + | var arg1 string | |||
| 368 | + | if args[1] != nil { | |||
| 369 | + | arg1 = args[1].(string) | |||
| 370 | + | } | |||
| 371 | + | run( | |||
| 372 | + | arg0, | |||
| 373 | + | arg1, | |||
| 374 | + | ) | |||
| 375 | + | }) | |||
| 376 | + | return _c | |||
| 377 | + | } | |||
| 378 | + | ||||
| 379 | + | func (_c *MockHistoryRepository_FindByURL_Call) Return(historyEntry *entity.HistoryEntry, err error) *MockHistoryRepository_FindByURL_Call { | |||
| 380 | + | _c.Call.Return(historyEntry, err) | |||
| 381 | + | return _c | |||
| 382 | + | } | |||
| 383 | + | ||||
| 384 | + | func (_c *MockHistoryRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.HistoryEntry, error)) *MockHistoryRepository_FindByURL_Call { | |||
| 385 | + | _c.Call.Return(run) | |||
| 386 | + | return _c | |||
| 387 | + | } | |||
| 388 | + | ||||
| 389 | + | // GetAllMostVisited provides a mock function for the type MockHistoryRepository | |||
| 390 | + | func (_mock *MockHistoryRepository) GetAllMostVisited(ctx context.Context) ([]*entity.HistoryEntry, error) { | |||
| 391 | + | ret := _mock.Called(ctx) | |||
| 392 | + | ||||
| 393 | + | if len(ret) == 0 { | |||
| 394 | + | panic("no return value specified for GetAllMostVisited") | |||
| 395 | + | } | |||
| 396 | + | ||||
| 397 | + | var r0 []*entity.HistoryEntry | |||
| 398 | + | var r1 error | |||
| 399 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HistoryEntry, error)); ok { | |||
| 400 | + | return returnFunc(ctx) | |||
| 401 | + | } | |||
| 402 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HistoryEntry); ok { | |||
| 403 | + | r0 = returnFunc(ctx) | |||
| 404 | + | } else { | |||
| 405 | + | if ret.Get(0) != nil { | |||
| 406 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 407 | + | } | |||
| 408 | + | } | |||
| 409 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 410 | + | r1 = returnFunc(ctx) | |||
| 411 | + | } else { | |||
| 412 | + | r1 = ret.Error(1) | |||
| 413 | + | } | |||
| 414 | + | return r0, r1 | |||
| 415 | + | } | |||
| 416 | + | ||||
| 417 | + | // MockHistoryRepository_GetAllMostVisited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllMostVisited' | |||
| 418 | + | type MockHistoryRepository_GetAllMostVisited_Call struct { | |||
| 419 | + | *mock.Call | |||
| 420 | + | } | |||
| 421 | + | ||||
| 422 | + | // GetAllMostVisited is a helper method to define mock.On call | |||
| 423 | + | // - ctx context.Context | |||
| 424 | + | func (_e *MockHistoryRepository_Expecter) GetAllMostVisited(ctx any) *MockHistoryRepository_GetAllMostVisited_Call { | |||
| 425 | + | return &MockHistoryRepository_GetAllMostVisited_Call{Call: _e.mock.On("GetAllMostVisited", ctx)} | |||
| 426 | + | } | |||
| 427 | + | ||||
| 428 | + | func (_c *MockHistoryRepository_GetAllMostVisited_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetAllMostVisited_Call { | |||
| 429 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 430 | + | var arg0 context.Context | |||
| 431 | + | if args[0] != nil { | |||
| 432 | + | arg0 = args[0].(context.Context) | |||
| 433 | + | } | |||
| 434 | + | run( | |||
| 435 | + | arg0, | |||
| 436 | + | ) | |||
| 437 | + | }) | |||
| 438 | + | return _c | |||
| 439 | + | } | |||
| 440 | + | ||||
| 441 | + | func (_c *MockHistoryRepository_GetAllMostVisited_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetAllMostVisited_Call { | |||
| 442 | + | _c.Call.Return(historyEntrys, err) | |||
| 443 | + | return _c | |||
| 444 | + | } | |||
| 445 | + | ||||
| 446 | + | func (_c *MockHistoryRepository_GetAllMostVisited_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetAllMostVisited_Call { | |||
| 447 | + | _c.Call.Return(run) | |||
| 448 | + | return _c | |||
| 449 | + | } | |||
| 450 | + | ||||
| 451 | + | // GetAllRecentHistory provides a mock function for the type MockHistoryRepository | |||
| 452 | + | func (_mock *MockHistoryRepository) GetAllRecentHistory(ctx context.Context) ([]*entity.HistoryEntry, error) { | |||
| 453 | + | ret := _mock.Called(ctx) | |||
| 454 | + | ||||
| 455 | + | if len(ret) == 0 { | |||
| 456 | + | panic("no return value specified for GetAllRecentHistory") | |||
| 457 | + | } | |||
| 458 | + | ||||
| 459 | + | var r0 []*entity.HistoryEntry | |||
| 460 | + | var r1 error | |||
| 461 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HistoryEntry, error)); ok { | |||
| 462 | + | return returnFunc(ctx) | |||
| 463 | + | } | |||
| 464 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HistoryEntry); ok { | |||
| 465 | + | r0 = returnFunc(ctx) | |||
| 466 | + | } else { | |||
| 467 | + | if ret.Get(0) != nil { | |||
| 468 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 469 | + | } | |||
| 470 | + | } | |||
| 471 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 472 | + | r1 = returnFunc(ctx) | |||
| 473 | + | } else { | |||
| 474 | + | r1 = ret.Error(1) | |||
| 475 | + | } | |||
| 476 | + | return r0, r1 | |||
| 477 | + | } | |||
| 478 | + | ||||
| 479 | + | // MockHistoryRepository_GetAllRecentHistory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllRecentHistory' | |||
| 480 | + | type MockHistoryRepository_GetAllRecentHistory_Call struct { | |||
| 481 | + | *mock.Call | |||
| 482 | + | } | |||
| 483 | + | ||||
| 484 | + | // GetAllRecentHistory is a helper method to define mock.On call | |||
| 485 | + | // - ctx context.Context | |||
| 486 | + | func (_e *MockHistoryRepository_Expecter) GetAllRecentHistory(ctx any) *MockHistoryRepository_GetAllRecentHistory_Call { | |||
| 487 | + | return &MockHistoryRepository_GetAllRecentHistory_Call{Call: _e.mock.On("GetAllRecentHistory", ctx)} | |||
| 488 | + | } | |||
| 489 | + | ||||
| 490 | + | func (_c *MockHistoryRepository_GetAllRecentHistory_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetAllRecentHistory_Call { | |||
| 491 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 492 | + | var arg0 context.Context | |||
| 493 | + | if args[0] != nil { | |||
| 494 | + | arg0 = args[0].(context.Context) | |||
| 495 | + | } | |||
| 496 | + | run( | |||
| 497 | + | arg0, | |||
| 498 | + | ) | |||
| 499 | + | }) | |||
| 500 | + | return _c | |||
| 501 | + | } | |||
| 502 | + | ||||
| 503 | + | func (_c *MockHistoryRepository_GetAllRecentHistory_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetAllRecentHistory_Call { | |||
| 504 | + | _c.Call.Return(historyEntrys, err) | |||
| 505 | + | return _c | |||
| 506 | + | } | |||
| 507 | + | ||||
| 508 | + | func (_c *MockHistoryRepository_GetAllRecentHistory_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetAllRecentHistory_Call { | |||
| 509 | + | _c.Call.Return(run) | |||
| 510 | + | return _c | |||
| 511 | + | } | |||
| 512 | + | ||||
| 513 | + | // GetDailyVisitCount provides a mock function for the type MockHistoryRepository | |||
| 514 | + | func (_mock *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error) { | |||
| 515 | + | ret := _mock.Called(ctx, daysAgo) | |||
| 516 | + | ||||
| 517 | + | if len(ret) == 0 { | |||
| 518 | + | panic("no return value specified for GetDailyVisitCount") | |||
| 519 | + | } | |||
| 520 | + | ||||
| 521 | + | var r0 []*entity.DailyVisitCount | |||
| 522 | + | var r1 error | |||
| 523 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.DailyVisitCount, error)); ok { | |||
| 524 | + | return returnFunc(ctx, daysAgo) | |||
| 525 | + | } | |||
| 526 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.DailyVisitCount); ok { | |||
| 527 | + | r0 = returnFunc(ctx, daysAgo) | |||
| 528 | + | } else { | |||
| 529 | + | if ret.Get(0) != nil { | |||
| 530 | + | r0 = ret.Get(0).([]*entity.DailyVisitCount) | |||
| 531 | + | } | |||
| 532 | + | } | |||
| 533 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 534 | + | r1 = returnFunc(ctx, daysAgo) | |||
| 535 | + | } else { | |||
| 536 | + | r1 = ret.Error(1) | |||
| 537 | + | } | |||
| 538 | + | return r0, r1 | |||
| 539 | + | } | |||
| 540 | + | ||||
| 541 | + | // MockHistoryRepository_GetDailyVisitCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDailyVisitCount' | |||
| 542 | + | type MockHistoryRepository_GetDailyVisitCount_Call struct { | |||
| 543 | + | *mock.Call | |||
| 544 | + | } | |||
| 545 | + | ||||
| 546 | + | // GetDailyVisitCount is a helper method to define mock.On call | |||
| 547 | + | // - ctx context.Context | |||
| 548 | + | // - daysAgo string | |||
| 549 | + | func (_e *MockHistoryRepository_Expecter) GetDailyVisitCount(ctx any, daysAgo any) *MockHistoryRepository_GetDailyVisitCount_Call { | |||
| 550 | + | return &MockHistoryRepository_GetDailyVisitCount_Call{Call: _e.mock.On("GetDailyVisitCount", ctx, daysAgo)} | |||
| 551 | + | } | |||
| 552 | + | ||||
| 553 | + | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Run(run func(ctx context.Context, daysAgo string)) *MockHistoryRepository_GetDailyVisitCount_Call { | |||
| 554 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 555 | + | var arg0 context.Context | |||
| 556 | + | if args[0] != nil { | |||
| 557 | + | arg0 = args[0].(context.Context) | |||
| 558 | + | } | |||
| 559 | + | var arg1 string | |||
| 560 | + | if args[1] != nil { | |||
| 561 | + | arg1 = args[1].(string) | |||
| 562 | + | } | |||
| 563 | + | run( | |||
| 564 | + | arg0, | |||
| 565 | + | arg1, | |||
| 566 | + | ) | |||
| 567 | + | }) | |||
| 568 | + | return _c | |||
| 569 | + | } | |||
| 570 | + | ||||
| 571 | + | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Return(dailyVisitCounts []*entity.DailyVisitCount, err error) *MockHistoryRepository_GetDailyVisitCount_Call { | |||
| 572 | + | _c.Call.Return(dailyVisitCounts, err) | |||
| 573 | + | return _c | |||
| 574 | + | } | |||
| 575 | + | ||||
| 576 | + | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) RunAndReturn(run func(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error)) *MockHistoryRepository_GetDailyVisitCount_Call { | |||
| 577 | + | _c.Call.Return(run) | |||
| 578 | + | return _c | |||
| 579 | + | } | |||
| 580 | + | ||||
| 581 | + | // GetDomainStats provides a mock function for the type MockHistoryRepository | |||
| 582 | + | func (_mock *MockHistoryRepository) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) { | |||
| 583 | + | ret := _mock.Called(ctx, limit) | |||
| 584 | + | ||||
| 585 | + | if len(ret) == 0 { | |||
| 586 | + | panic("no return value specified for GetDomainStats") | |||
| 587 | + | } | |||
| 588 | + | ||||
| 589 | + | var r0 []*entity.DomainStat | |||
| 590 | + | var r1 error | |||
| 591 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok { | |||
| 592 | + | return returnFunc(ctx, limit) | |||
| 593 | + | } | |||
| 594 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok { | |||
| 595 | + | r0 = returnFunc(ctx, limit) | |||
| 596 | + | } else { | |||
| 597 | + | if ret.Get(0) != nil { | |||
| 598 | + | r0 = ret.Get(0).([]*entity.DomainStat) | |||
| 599 | + | } | |||
| 600 | + | } | |||
| 601 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 602 | + | r1 = returnFunc(ctx, limit) | |||
| 603 | + | } else { | |||
| 604 | + | r1 = ret.Error(1) | |||
| 605 | + | } | |||
| 606 | + | return r0, r1 | |||
| 607 | + | } | |||
| 608 | + | ||||
| 609 | + | // MockHistoryRepository_GetDomainStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDomainStats' | |||
| 610 | + | type MockHistoryRepository_GetDomainStats_Call struct { | |||
| 611 | + | *mock.Call | |||
| 612 | + | } | |||
| 613 | + | ||||
| 614 | + | // GetDomainStats is a helper method to define mock.On call | |||
| 615 | + | // - ctx context.Context | |||
| 616 | + | // - limit int | |||
| 617 | + | func (_e *MockHistoryRepository_Expecter) GetDomainStats(ctx any, limit any) *MockHistoryRepository_GetDomainStats_Call { | |||
| 618 | + | return &MockHistoryRepository_GetDomainStats_Call{Call: _e.mock.On("GetDomainStats", ctx, limit)} | |||
| 619 | + | } | |||
| 620 | + | ||||
| 621 | + | func (_c *MockHistoryRepository_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHistoryRepository_GetDomainStats_Call { | |||
| 622 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 623 | + | var arg0 context.Context | |||
| 624 | + | if args[0] != nil { | |||
| 625 | + | arg0 = args[0].(context.Context) | |||
| 626 | + | } | |||
| 627 | + | var arg1 int | |||
| 628 | + | if args[1] != nil { | |||
| 629 | + | arg1 = args[1].(int) | |||
| 630 | + | } | |||
| 631 | + | run( | |||
| 632 | + | arg0, | |||
| 633 | + | arg1, | |||
| 634 | + | ) | |||
| 635 | + | }) | |||
| 636 | + | return _c | |||
| 637 | + | } | |||
| 638 | + | ||||
| 639 | + | func (_c *MockHistoryRepository_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHistoryRepository_GetDomainStats_Call { | |||
| 640 | + | _c.Call.Return(domainStats, err) | |||
| 641 | + | return _c | |||
| 642 | + | } | |||
| 643 | + | ||||
| 644 | + | func (_c *MockHistoryRepository_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHistoryRepository_GetDomainStats_Call { | |||
| 645 | + | _c.Call.Return(run) | |||
| 646 | + | return _c | |||
| 647 | + | } | |||
| 648 | + | ||||
| 649 | + | // GetHourlyDistribution provides a mock function for the type MockHistoryRepository | |||
| 650 | + | func (_mock *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ([]*entity.HourlyDistribution, error) { | |||
| 651 | + | ret := _mock.Called(ctx) | |||
| 652 | + | ||||
| 653 | + | if len(ret) == 0 { | |||
| 654 | + | panic("no return value specified for GetHourlyDistribution") | |||
| 655 | + | } | |||
| 656 | + | ||||
| 657 | + | var r0 []*entity.HourlyDistribution | |||
| 658 | + | var r1 error | |||
| 659 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HourlyDistribution, error)); ok { | |||
| 660 | + | return returnFunc(ctx) | |||
| 661 | + | } | |||
| 662 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HourlyDistribution); ok { | |||
| 663 | + | r0 = returnFunc(ctx) | |||
| 664 | + | } else { | |||
| 665 | + | if ret.Get(0) != nil { | |||
| 666 | + | r0 = ret.Get(0).([]*entity.HourlyDistribution) | |||
| 667 | + | } | |||
| 668 | + | } | |||
| 669 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 670 | + | r1 = returnFunc(ctx) | |||
| 671 | + | } else { | |||
| 672 | + | r1 = ret.Error(1) | |||
| 673 | + | } | |||
| 674 | + | return r0, r1 | |||
| 675 | + | } | |||
| 676 | + | ||||
| 677 | + | // MockHistoryRepository_GetHourlyDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHourlyDistribution' | |||
| 678 | + | type MockHistoryRepository_GetHourlyDistribution_Call struct { | |||
| 679 | + | *mock.Call | |||
| 680 | + | } | |||
| 681 | + | ||||
| 682 | + | // GetHourlyDistribution is a helper method to define mock.On call | |||
| 683 | + | // - ctx context.Context | |||
| 684 | + | func (_e *MockHistoryRepository_Expecter) GetHourlyDistribution(ctx any) *MockHistoryRepository_GetHourlyDistribution_Call { | |||
| 685 | + | return &MockHistoryRepository_GetHourlyDistribution_Call{Call: _e.mock.On("GetHourlyDistribution", ctx)} | |||
| 686 | + | } | |||
| 687 | + | ||||
| 688 | + | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetHourlyDistribution_Call { | |||
| 689 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 690 | + | var arg0 context.Context | |||
| 691 | + | if args[0] != nil { | |||
| 692 | + | arg0 = args[0].(context.Context) | |||
| 693 | + | } | |||
| 694 | + | run( | |||
| 695 | + | arg0, | |||
| 696 | + | ) | |||
| 697 | + | }) | |||
| 698 | + | return _c | |||
| 699 | + | } | |||
| 700 | + | ||||
| 701 | + | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Return(hourlyDistributions []*entity.HourlyDistribution, err error) *MockHistoryRepository_GetHourlyDistribution_Call { | |||
| 702 | + | _c.Call.Return(hourlyDistributions, err) | |||
| 703 | + | return _c | |||
| 704 | + | } | |||
| 705 | + | ||||
| 706 | + | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HourlyDistribution, error)) *MockHistoryRepository_GetHourlyDistribution_Call { | |||
| 707 | + | _c.Call.Return(run) | |||
| 708 | + | return _c | |||
| 709 | + | } | |||
| 710 | + | ||||
| 711 | + | // GetMostVisited provides a mock function for the type MockHistoryRepository | |||
| 712 | + | func (_mock *MockHistoryRepository) GetMostVisited(ctx context.Context, days int) ([]*entity.HistoryEntry, error) { | |||
| 713 | + | ret := _mock.Called(ctx, days) | |||
| 714 | + | ||||
| 715 | + | if len(ret) == 0 { | |||
| 716 | + | panic("no return value specified for GetMostVisited") | |||
| 717 | + | } | |||
| 718 | + | ||||
| 719 | + | var r0 []*entity.HistoryEntry | |||
| 720 | + | var r1 error | |||
| 721 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.HistoryEntry, error)); ok { | |||
| 722 | + | return returnFunc(ctx, days) | |||
| 723 | + | } | |||
| 724 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.HistoryEntry); ok { | |||
| 725 | + | r0 = returnFunc(ctx, days) | |||
| 726 | + | } else { | |||
| 727 | + | if ret.Get(0) != nil { | |||
| 728 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 729 | + | } | |||
| 730 | + | } | |||
| 731 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 732 | + | r1 = returnFunc(ctx, days) | |||
| 733 | + | } else { | |||
| 734 | + | r1 = ret.Error(1) | |||
| 735 | + | } | |||
| 736 | + | return r0, r1 | |||
| 737 | + | } | |||
| 738 | + | ||||
| 739 | + | // MockHistoryRepository_GetMostVisited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMostVisited' | |||
| 740 | + | type MockHistoryRepository_GetMostVisited_Call struct { | |||
| 741 | + | *mock.Call | |||
| 742 | + | } | |||
| 743 | + | ||||
| 744 | + | // GetMostVisited is a helper method to define mock.On call | |||
| 745 | + | // - ctx context.Context | |||
| 746 | + | // - days int | |||
| 747 | + | func (_e *MockHistoryRepository_Expecter) GetMostVisited(ctx any, days any) *MockHistoryRepository_GetMostVisited_Call { | |||
| 748 | + | return &MockHistoryRepository_GetMostVisited_Call{Call: _e.mock.On("GetMostVisited", ctx, days)} | |||
| 749 | + | } | |||
| 750 | + | ||||
| 751 | + | func (_c *MockHistoryRepository_GetMostVisited_Call) Run(run func(ctx context.Context, days int)) *MockHistoryRepository_GetMostVisited_Call { | |||
| 752 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 753 | + | var arg0 context.Context | |||
| 754 | + | if args[0] != nil { | |||
| 755 | + | arg0 = args[0].(context.Context) | |||
| 756 | + | } | |||
| 757 | + | var arg1 int | |||
| 758 | + | if args[1] != nil { | |||
| 759 | + | arg1 = args[1].(int) | |||
| 760 | + | } | |||
| 761 | + | run( | |||
| 762 | + | arg0, | |||
| 763 | + | arg1, | |||
| 764 | + | ) | |||
| 765 | + | }) | |||
| 766 | + | return _c | |||
| 767 | + | } | |||
| 768 | + | ||||
| 769 | + | func (_c *MockHistoryRepository_GetMostVisited_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetMostVisited_Call { | |||
| 770 | + | _c.Call.Return(historyEntrys, err) | |||
| 771 | + | return _c | |||
| 772 | + | } | |||
| 773 | + | ||||
| 774 | + | func (_c *MockHistoryRepository_GetMostVisited_Call) RunAndReturn(run func(ctx context.Context, days int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetMostVisited_Call { | |||
| 775 | + | _c.Call.Return(run) | |||
| 776 | + | return _c | |||
| 777 | + | } | |||
| 778 | + | ||||
| 779 | + | // GetRecent provides a mock function for the type MockHistoryRepository | |||
| 780 | + | func (_mock *MockHistoryRepository) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) { | |||
| 781 | + | ret := _mock.Called(ctx, limit, offset) | |||
| 782 | + | ||||
| 783 | + | if len(ret) == 0 { | |||
| 784 | + | panic("no return value specified for GetRecent") | |||
| 785 | + | } | |||
| 786 | + | ||||
| 787 | + | var r0 []*entity.HistoryEntry | |||
| 788 | + | var r1 error | |||
| 789 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok { | |||
| 790 | + | return returnFunc(ctx, limit, offset) | |||
| 791 | + | } | |||
| 792 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok { | |||
| 793 | + | r0 = returnFunc(ctx, limit, offset) | |||
| 794 | + | } else { | |||
| 795 | + | if ret.Get(0) != nil { | |||
| 796 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 797 | + | } | |||
| 798 | + | } | |||
| 799 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok { | |||
| 800 | + | r1 = returnFunc(ctx, limit, offset) | |||
| 801 | + | } else { | |||
| 802 | + | r1 = ret.Error(1) | |||
| 803 | + | } | |||
| 804 | + | return r0, r1 | |||
| 805 | + | } | |||
| 806 | + | ||||
| 807 | + | // MockHistoryRepository_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent' | |||
| 808 | + | type MockHistoryRepository_GetRecent_Call struct { | |||
| 809 | + | *mock.Call | |||
| 810 | + | } | |||
| 811 | + | ||||
| 812 | + | // GetRecent is a helper method to define mock.On call | |||
| 813 | + | // - ctx context.Context | |||
| 814 | + | // - limit int | |||
| 815 | + | // - offset int | |||
| 816 | + | func (_e *MockHistoryRepository_Expecter) GetRecent(ctx any, limit any, offset any) *MockHistoryRepository_GetRecent_Call { | |||
| 817 | + | return &MockHistoryRepository_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit, offset)} | |||
| 818 | + | } | |||
| 819 | + | ||||
| 820 | + | func (_c *MockHistoryRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistoryRepository_GetRecent_Call { | |||
| 821 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 822 | + | var arg0 context.Context | |||
| 823 | + | if args[0] != nil { | |||
| 824 | + | arg0 = args[0].(context.Context) | |||
| 825 | + | } | |||
| 826 | + | var arg1 int | |||
| 827 | + | if args[1] != nil { | |||
| 828 | + | arg1 = args[1].(int) | |||
| 829 | + | } | |||
| 830 | + | var arg2 int | |||
| 831 | + | if args[2] != nil { | |||
| 832 | + | arg2 = args[2].(int) | |||
| 833 | + | } | |||
| 834 | + | run( | |||
| 835 | + | arg0, | |||
| 836 | + | arg1, | |||
| 837 | + | arg2, | |||
| 838 | + | ) | |||
| 839 | + | }) | |||
| 840 | + | return _c | |||
| 841 | + | } | |||
| 842 | + | ||||
| 843 | + | func (_c *MockHistoryRepository_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecent_Call { | |||
| 844 | + | _c.Call.Return(historyEntrys, err) | |||
| 845 | + | return _c | |||
| 846 | + | } | |||
| 847 | + | ||||
| 848 | + | func (_c *MockHistoryRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecent_Call { | |||
| 849 | + | _c.Call.Return(run) | |||
| 850 | + | return _c | |||
| 851 | + | } | |||
| 852 | + | ||||
| 853 | + | // GetRecentByDomain provides a mock function for the type MockHistoryRepository | |||
| 854 | + | func (_mock *MockHistoryRepository) GetRecentByDomain(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error) { | |||
| 855 | + | ret := _mock.Called(ctx, domain, limit, offset) | |||
| 856 | + | ||||
| 857 | + | if len(ret) == 0 { | |||
| 858 | + | panic("no return value specified for GetRecentByDomain") | |||
| 859 | + | } | |||
| 860 | + | ||||
| 861 | + | var r0 []*entity.HistoryEntry | |||
| 862 | + | var r1 error | |||
| 863 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) ([]*entity.HistoryEntry, error)); ok { | |||
| 864 | + | return returnFunc(ctx, domain, limit, offset) | |||
| 865 | + | } | |||
| 866 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int, int) []*entity.HistoryEntry); ok { | |||
| 867 | + | r0 = returnFunc(ctx, domain, limit, offset) | |||
| 868 | + | } else { | |||
| 869 | + | if ret.Get(0) != nil { | |||
| 870 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 871 | + | } | |||
| 872 | + | } | |||
| 873 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int, int) error); ok { | |||
| 874 | + | r1 = returnFunc(ctx, domain, limit, offset) | |||
| 875 | + | } else { | |||
| 876 | + | r1 = ret.Error(1) | |||
| 877 | + | } | |||
| 878 | + | return r0, r1 | |||
| 879 | + | } | |||
| 880 | + | ||||
| 881 | + | // MockHistoryRepository_GetRecentByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentByDomain' | |||
| 882 | + | type MockHistoryRepository_GetRecentByDomain_Call struct { | |||
| 883 | + | *mock.Call | |||
| 884 | + | } | |||
| 885 | + | ||||
| 886 | + | // GetRecentByDomain is a helper method to define mock.On call | |||
| 887 | + | // - ctx context.Context | |||
| 888 | + | // - domain string | |||
| 889 | + | // - limit int | |||
| 890 | + | // - offset int | |||
| 891 | + | func (_e *MockHistoryRepository_Expecter) GetRecentByDomain(ctx any, domain any, limit any, offset any) *MockHistoryRepository_GetRecentByDomain_Call { | |||
| 892 | + | return &MockHistoryRepository_GetRecentByDomain_Call{Call: _e.mock.On("GetRecentByDomain", ctx, domain, limit, offset)} | |||
| 893 | + | } | |||
| 894 | + | ||||
| 895 | + | func (_c *MockHistoryRepository_GetRecentByDomain_Call) Run(run func(ctx context.Context, domain string, limit int, offset int)) *MockHistoryRepository_GetRecentByDomain_Call { | |||
| 896 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 897 | + | var arg0 context.Context | |||
| 898 | + | if args[0] != nil { | |||
| 899 | + | arg0 = args[0].(context.Context) | |||
| 900 | + | } | |||
| 901 | + | var arg1 string | |||
| 902 | + | if args[1] != nil { | |||
| 903 | + | arg1 = args[1].(string) | |||
| 904 | + | } | |||
| 905 | + | var arg2 int | |||
| 906 | + | if args[2] != nil { | |||
| 907 | + | arg2 = args[2].(int) | |||
| 908 | + | } | |||
| 909 | + | var arg3 int | |||
| 910 | + | if args[3] != nil { | |||
| 911 | + | arg3 = args[3].(int) | |||
| 912 | + | } | |||
| 913 | + | run( | |||
| 914 | + | arg0, | |||
| 915 | + | arg1, | |||
| 916 | + | arg2, | |||
| 917 | + | arg3, | |||
| 918 | + | ) | |||
| 919 | + | }) | |||
| 920 | + | return _c | |||
| 921 | + | } | |||
| 922 | + | ||||
| 923 | + | func (_c *MockHistoryRepository_GetRecentByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentByDomain_Call { | |||
| 924 | + | _c.Call.Return(historyEntrys, err) | |||
| 925 | + | return _c | |||
| 926 | + | } | |||
| 927 | + | ||||
| 928 | + | func (_c *MockHistoryRepository_GetRecentByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentByDomain_Call { | |||
| 929 | + | _c.Call.Return(run) | |||
| 930 | + | return _c | |||
| 931 | + | } | |||
| 932 | + | ||||
| 933 | + | // GetRecentSince provides a mock function for the type MockHistoryRepository | |||
| 934 | + | func (_mock *MockHistoryRepository) GetRecentSince(ctx context.Context, days int) ([]*entity.HistoryEntry, error) { | |||
| 935 | + | ret := _mock.Called(ctx, days) | |||
| 936 | + | ||||
| 937 | + | if len(ret) == 0 { | |||
| 938 | + | panic("no return value specified for GetRecentSince") | |||
| 939 | + | } | |||
| 940 | + | ||||
| 941 | + | var r0 []*entity.HistoryEntry | |||
| 942 | + | var r1 error | |||
| 943 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.HistoryEntry, error)); ok { | |||
| 944 | + | return returnFunc(ctx, days) | |||
| 945 | + | } | |||
| 946 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.HistoryEntry); ok { | |||
| 947 | + | r0 = returnFunc(ctx, days) | |||
| 948 | + | } else { | |||
| 949 | + | if ret.Get(0) != nil { | |||
| 950 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 951 | + | } | |||
| 952 | + | } | |||
| 953 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 954 | + | r1 = returnFunc(ctx, days) | |||
| 955 | + | } else { | |||
| 956 | + | r1 = ret.Error(1) | |||
| 957 | + | } | |||
| 958 | + | return r0, r1 | |||
| 959 | + | } | |||
| 960 | + | ||||
| 961 | + | // MockHistoryRepository_GetRecentSince_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentSince' | |||
| 962 | + | type MockHistoryRepository_GetRecentSince_Call struct { | |||
| 963 | + | *mock.Call | |||
| 964 | + | } | |||
| 965 | + | ||||
| 966 | + | // GetRecentSince is a helper method to define mock.On call | |||
| 967 | + | // - ctx context.Context | |||
| 968 | + | // - days int | |||
| 969 | + | func (_e *MockHistoryRepository_Expecter) GetRecentSince(ctx any, days any) *MockHistoryRepository_GetRecentSince_Call { | |||
| 970 | + | return &MockHistoryRepository_GetRecentSince_Call{Call: _e.mock.On("GetRecentSince", ctx, days)} | |||
| 971 | + | } | |||
| 972 | + | ||||
| 973 | + | func (_c *MockHistoryRepository_GetRecentSince_Call) Run(run func(ctx context.Context, days int)) *MockHistoryRepository_GetRecentSince_Call { | |||
| 974 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 975 | + | var arg0 context.Context | |||
| 976 | + | if args[0] != nil { | |||
| 977 | + | arg0 = args[0].(context.Context) | |||
| 978 | + | } | |||
| 979 | + | var arg1 int | |||
| 980 | + | if args[1] != nil { | |||
| 981 | + | arg1 = args[1].(int) | |||
| 982 | + | } | |||
| 983 | + | run( | |||
| 984 | + | arg0, | |||
| 985 | + | arg1, | |||
| 986 | + | ) | |||
| 987 | + | }) | |||
| 988 | + | return _c | |||
| 989 | + | } | |||
| 990 | + | ||||
| 991 | + | func (_c *MockHistoryRepository_GetRecentSince_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentSince_Call { | |||
| 992 | + | _c.Call.Return(historyEntrys, err) | |||
| 993 | + | return _c | |||
| 994 | + | } | |||
| 995 | + | ||||
| 996 | + | func (_c *MockHistoryRepository_GetRecentSince_Call) RunAndReturn(run func(ctx context.Context, days int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentSince_Call { | |||
| 997 | + | _c.Call.Return(run) | |||
| 998 | + | return _c | |||
| 999 | + | } | |||
| 1000 | + | ||||
| 1001 | + | // GetRecentWindow provides a mock function for the type MockHistoryRepository | |||
| 1002 | + | func (_mock *MockHistoryRepository) GetRecentWindow(ctx context.Context, before time.Time, after time.Time) ([]*entity.HistoryEntry, error) { | |||
| 1003 | + | ret := _mock.Called(ctx, before, after) | |||
| 1004 | + | ||||
| 1005 | + | if len(ret) == 0 { | |||
| 1006 | + | panic("no return value specified for GetRecentWindow") | |||
| 1007 | + | } | |||
| 1008 | + | ||||
| 1009 | + | var r0 []*entity.HistoryEntry | |||
| 1010 | + | var r1 error | |||
| 1011 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, time.Time) ([]*entity.HistoryEntry, error)); ok { | |||
| 1012 | + | return returnFunc(ctx, before, after) | |||
| 1013 | + | } | |||
| 1014 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time, time.Time) []*entity.HistoryEntry); ok { | |||
| 1015 | + | r0 = returnFunc(ctx, before, after) | |||
| 1016 | + | } else { | |||
| 1017 | + | if ret.Get(0) != nil { | |||
| 1018 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 1019 | + | } | |||
| 1020 | + | } | |||
| 1021 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time, time.Time) error); ok { | |||
| 1022 | + | r1 = returnFunc(ctx, before, after) | |||
| 1023 | + | } else { | |||
| 1024 | + | r1 = ret.Error(1) | |||
| 1025 | + | } | |||
| 1026 | + | return r0, r1 | |||
| 1027 | + | } | |||
| 1028 | + | ||||
| 1029 | + | // MockHistoryRepository_GetRecentWindow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindow' | |||
| 1030 | + | type MockHistoryRepository_GetRecentWindow_Call struct { | |||
| 1031 | + | *mock.Call | |||
| 1032 | + | } | |||
| 1033 | + | ||||
| 1034 | + | // GetRecentWindow is a helper method to define mock.On call | |||
| 1035 | + | // - ctx context.Context | |||
| 1036 | + | // - before time.Time | |||
| 1037 | + | // - after time.Time | |||
| 1038 | + | func (_e *MockHistoryRepository_Expecter) GetRecentWindow(ctx any, before any, after any) *MockHistoryRepository_GetRecentWindow_Call { | |||
| 1039 | + | return &MockHistoryRepository_GetRecentWindow_Call{Call: _e.mock.On("GetRecentWindow", ctx, before, after)} | |||
| 1040 | + | } | |||
| 1041 | + | ||||
| 1042 | + | func (_c *MockHistoryRepository_GetRecentWindow_Call) Run(run func(ctx context.Context, before time.Time, after time.Time)) *MockHistoryRepository_GetRecentWindow_Call { | |||
| 1043 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1044 | + | var arg0 context.Context | |||
| 1045 | + | if args[0] != nil { | |||
| 1046 | + | arg0 = args[0].(context.Context) | |||
| 1047 | + | } | |||
| 1048 | + | var arg1 time.Time | |||
| 1049 | + | if args[1] != nil { | |||
| 1050 | + | arg1 = args[1].(time.Time) | |||
| 1051 | + | } | |||
| 1052 | + | var arg2 time.Time | |||
| 1053 | + | if args[2] != nil { | |||
| 1054 | + | arg2 = args[2].(time.Time) | |||
| 1055 | + | } | |||
| 1056 | + | run( | |||
| 1057 | + | arg0, | |||
| 1058 | + | arg1, | |||
| 1059 | + | arg2, | |||
| 1060 | + | ) | |||
| 1061 | + | }) | |||
| 1062 | + | return _c | |||
| 1063 | + | } | |||
| 1064 | + | ||||
| 1065 | + | func (_c *MockHistoryRepository_GetRecentWindow_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentWindow_Call { | |||
| 1066 | + | _c.Call.Return(historyEntrys, err) | |||
| 1067 | + | return _c | |||
| 1068 | + | } | |||
| 1069 | + | ||||
| 1070 | + | func (_c *MockHistoryRepository_GetRecentWindow_Call) RunAndReturn(run func(ctx context.Context, before time.Time, after time.Time) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentWindow_Call { | |||
| 1071 | + | _c.Call.Return(run) | |||
| 1072 | + | return _c | |||
| 1073 | + | } | |||
| 1074 | + | ||||
| 1075 | + | // GetRecentWindowByDomain provides a mock function for the type MockHistoryRepository | |||
| 1076 | + | func (_mock *MockHistoryRepository) GetRecentWindowByDomain(ctx context.Context, domain string, before time.Time, after time.Time) ([]*entity.HistoryEntry, error) { | |||
| 1077 | + | ret := _mock.Called(ctx, domain, before, after) | |||
| 1078 | + | ||||
| 1079 | + | if len(ret) == 0 { | |||
| 1080 | + | panic("no return value specified for GetRecentWindowByDomain") | |||
| 1081 | + | } | |||
| 1082 | + | ||||
| 1083 | + | var r0 []*entity.HistoryEntry | |||
| 1084 | + | var r1 error | |||
| 1085 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time, time.Time) ([]*entity.HistoryEntry, error)); ok { | |||
| 1086 | + | return returnFunc(ctx, domain, before, after) | |||
| 1087 | + | } | |||
| 1088 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time, time.Time) []*entity.HistoryEntry); ok { | |||
| 1089 | + | r0 = returnFunc(ctx, domain, before, after) | |||
| 1090 | + | } else { | |||
| 1091 | + | if ret.Get(0) != nil { | |||
| 1092 | + | r0 = ret.Get(0).([]*entity.HistoryEntry) | |||
| 1093 | + | } | |||
| 1094 | + | } | |||
| 1095 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, time.Time, time.Time) error); ok { | |||
| 1096 | + | r1 = returnFunc(ctx, domain, before, after) | |||
| 1097 | + | } else { | |||
| 1098 | + | r1 = ret.Error(1) | |||
| 1099 | + | } | |||
| 1100 | + | return r0, r1 | |||
| 1101 | + | } | |||
| 1102 | + | ||||
| 1103 | + | // MockHistoryRepository_GetRecentWindowByDomain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecentWindowByDomain' | |||
| 1104 | + | type MockHistoryRepository_GetRecentWindowByDomain_Call struct { | |||
| 1105 | + | *mock.Call | |||
| 1106 | + | } | |||
| 1107 | + | ||||
| 1108 | + | // GetRecentWindowByDomain is a helper method to define mock.On call | |||
| 1109 | + | // - ctx context.Context | |||
| 1110 | + | // - domain string | |||
| 1111 | + | // - before time.Time | |||
| 1112 | + | // - after time.Time | |||
| 1113 | + | func (_e *MockHistoryRepository_Expecter) GetRecentWindowByDomain(ctx any, domain any, before any, after any) *MockHistoryRepository_GetRecentWindowByDomain_Call { | |||
| 1114 | + | return &MockHistoryRepository_GetRecentWindowByDomain_Call{Call: _e.mock.On("GetRecentWindowByDomain", ctx, domain, before, after)} | |||
| 1115 | + | } | |||
| 1116 | + | ||||
| 1117 | + | func (_c *MockHistoryRepository_GetRecentWindowByDomain_Call) Run(run func(ctx context.Context, domain string, before time.Time, after time.Time)) *MockHistoryRepository_GetRecentWindowByDomain_Call { | |||
| 1118 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1119 | + | var arg0 context.Context | |||
| 1120 | + | if args[0] != nil { | |||
| 1121 | + | arg0 = args[0].(context.Context) | |||
| 1122 | + | } | |||
| 1123 | + | var arg1 string | |||
| 1124 | + | if args[1] != nil { | |||
| 1125 | + | arg1 = args[1].(string) | |||
| 1126 | + | } | |||
| 1127 | + | var arg2 time.Time | |||
| 1128 | + | if args[2] != nil { | |||
| 1129 | + | arg2 = args[2].(time.Time) | |||
| 1130 | + | } | |||
| 1131 | + | var arg3 time.Time | |||
| 1132 | + | if args[3] != nil { | |||
| 1133 | + | arg3 = args[3].(time.Time) | |||
| 1134 | + | } | |||
| 1135 | + | run( | |||
| 1136 | + | arg0, | |||
| 1137 | + | arg1, | |||
| 1138 | + | arg2, | |||
| 1139 | + | arg3, | |||
| 1140 | + | ) | |||
| 1141 | + | }) | |||
| 1142 | + | return _c | |||
| 1143 | + | } | |||
| 1144 | + | ||||
| 1145 | + | func (_c *MockHistoryRepository_GetRecentWindowByDomain_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecentWindowByDomain_Call { | |||
| 1146 | + | _c.Call.Return(historyEntrys, err) | |||
| 1147 | + | return _c | |||
| 1148 | + | } | |||
| 1149 | + | ||||
| 1150 | + | func (_c *MockHistoryRepository_GetRecentWindowByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string, before time.Time, after time.Time) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecentWindowByDomain_Call { | |||
| 1151 | + | _c.Call.Return(run) | |||
| 1152 | + | return _c | |||
| 1153 | + | } | |||
| 1154 | + | ||||
| 1155 | + | // GetStats provides a mock function for the type MockHistoryRepository | |||
| 1156 | + | func (_mock *MockHistoryRepository) GetStats(ctx context.Context) (*entity.HistoryStats, error) { | |||
| 1157 | + | ret := _mock.Called(ctx) | |||
| 1158 | + | ||||
| 1159 | + | if len(ret) == 0 { | |||
| 1160 | + | panic("no return value specified for GetStats") | |||
| 1161 | + | } | |||
| 1162 | + | ||||
| 1163 | + | var r0 *entity.HistoryStats | |||
| 1164 | + | var r1 error | |||
| 1165 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok { | |||
| 1166 | + | return returnFunc(ctx) | |||
| 1167 | + | } | |||
| 1168 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok { | |||
| 1169 | + | r0 = returnFunc(ctx) | |||
| 1170 | + | } else { | |||
| 1171 | + | if ret.Get(0) != nil { | |||
| 1172 | + | r0 = ret.Get(0).(*entity.HistoryStats) | |||
| 1173 | + | } | |||
| 1174 | + | } | |||
| 1175 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 1176 | + | r1 = returnFunc(ctx) | |||
| 1177 | + | } else { | |||
| 1178 | + | r1 = ret.Error(1) | |||
| 1179 | + | } | |||
| 1180 | + | return r0, r1 | |||
| 1181 | + | } | |||
| 1182 | + | ||||
| 1183 | + | // MockHistoryRepository_GetStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStats' | |||
| 1184 | + | type MockHistoryRepository_GetStats_Call struct { | |||
| 1185 | + | *mock.Call | |||
| 1186 | + | } | |||
| 1187 | + | ||||
| 1188 | + | // GetStats is a helper method to define mock.On call | |||
| 1189 | + | // - ctx context.Context | |||
| 1190 | + | func (_e *MockHistoryRepository_Expecter) GetStats(ctx any) *MockHistoryRepository_GetStats_Call { | |||
| 1191 | + | return &MockHistoryRepository_GetStats_Call{Call: _e.mock.On("GetStats", ctx)} | |||
| 1192 | + | } | |||
| 1193 | + | ||||
| 1194 | + | func (_c *MockHistoryRepository_GetStats_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetStats_Call { | |||
| 1195 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1196 | + | var arg0 context.Context | |||
| 1197 | + | if args[0] != nil { | |||
| 1198 | + | arg0 = args[0].(context.Context) | |||
| 1199 | + | } | |||
| 1200 | + | run( | |||
| 1201 | + | arg0, | |||
| 1202 | + | ) | |||
| 1203 | + | }) | |||
| 1204 | + | return _c | |||
| 1205 | + | } | |||
| 1206 | + | ||||
| 1207 | + | func (_c *MockHistoryRepository_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHistoryRepository_GetStats_Call { | |||
| 1208 | + | _c.Call.Return(historyStats, err) | |||
| 1209 | + | return _c | |||
| 1210 | + | } | |||
| 1211 | + | ||||
| 1212 | + | func (_c *MockHistoryRepository_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHistoryRepository_GetStats_Call { | |||
| 1213 | + | _c.Call.Return(run) | |||
| 1214 | + | return _c | |||
| 1215 | + | } | |||
| 1216 | + | ||||
| 1217 | + | // HasEntriesBefore provides a mock function for the type MockHistoryRepository | |||
| 1218 | + | func (_mock *MockHistoryRepository) HasEntriesBefore(ctx context.Context, before time.Time) (bool, error) { | |||
| 1219 | + | ret := _mock.Called(ctx, before) | |||
| 1220 | + | ||||
| 1221 | + | if len(ret) == 0 { | |||
| 1222 | + | panic("no return value specified for HasEntriesBefore") | |||
| 1223 | + | } | |||
| 1224 | + | ||||
| 1225 | + | var r0 bool | |||
| 1226 | + | var r1 error | |||
| 1227 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) (bool, error)); ok { | |||
| 1228 | + | return returnFunc(ctx, before) | |||
| 1229 | + | } | |||
| 1230 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) bool); ok { | |||
| 1231 | + | r0 = returnFunc(ctx, before) | |||
| 1232 | + | } else { | |||
| 1233 | + | r0 = ret.Get(0).(bool) | |||
| 1234 | + | } | |||
| 1235 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { | |||
| 1236 | + | r1 = returnFunc(ctx, before) | |||
| 1237 | + | } else { | |||
| 1238 | + | r1 = ret.Error(1) | |||
| 1239 | + | } | |||
| 1240 | + | return r0, r1 | |||
| 1241 | + | } | |||
| 1242 | + | ||||
| 1243 | + | // MockHistoryRepository_HasEntriesBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasEntriesBefore' | |||
| 1244 | + | type MockHistoryRepository_HasEntriesBefore_Call struct { | |||
| 1245 | + | *mock.Call | |||
| 1246 | + | } | |||
| 1247 | + | ||||
| 1248 | + | // HasEntriesBefore is a helper method to define mock.On call | |||
| 1249 | + | // - ctx context.Context | |||
| 1250 | + | // - before time.Time | |||
| 1251 | + | func (_e *MockHistoryRepository_Expecter) HasEntriesBefore(ctx any, before any) *MockHistoryRepository_HasEntriesBefore_Call { | |||
| 1252 | + | return &MockHistoryRepository_HasEntriesBefore_Call{Call: _e.mock.On("HasEntriesBefore", ctx, before)} | |||
| 1253 | + | } | |||
| 1254 | + | ||||
| 1255 | + | func (_c *MockHistoryRepository_HasEntriesBefore_Call) Run(run func(ctx context.Context, before time.Time)) *MockHistoryRepository_HasEntriesBefore_Call { | |||
| 1256 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1257 | + | var arg0 context.Context | |||
| 1258 | + | if args[0] != nil { | |||
| 1259 | + | arg0 = args[0].(context.Context) | |||
| 1260 | + | } | |||
| 1261 | + | var arg1 time.Time | |||
| 1262 | + | if args[1] != nil { | |||
| 1263 | + | arg1 = args[1].(time.Time) | |||
| 1264 | + | } | |||
| 1265 | + | run( | |||
| 1266 | + | arg0, | |||
| 1267 | + | arg1, | |||
| 1268 | + | ) | |||
| 1269 | + | }) | |||
| 1270 | + | return _c | |||
| 1271 | + | } | |||
| 1272 | + | ||||
| 1273 | + | func (_c *MockHistoryRepository_HasEntriesBefore_Call) Return(b bool, err error) *MockHistoryRepository_HasEntriesBefore_Call { | |||
| 1274 | + | _c.Call.Return(b, err) | |||
| 1275 | + | return _c | |||
| 1276 | + | } | |||
| 1277 | + | ||||
| 1278 | + | func (_c *MockHistoryRepository_HasEntriesBefore_Call) RunAndReturn(run func(ctx context.Context, before time.Time) (bool, error)) *MockHistoryRepository_HasEntriesBefore_Call { | |||
| 1279 | + | _c.Call.Return(run) | |||
| 1280 | + | return _c | |||
| 1281 | + | } | |||
| 1282 | + | ||||
| 1283 | + | // HasEntriesByDomainBefore provides a mock function for the type MockHistoryRepository | |||
| 1284 | + | func (_mock *MockHistoryRepository) HasEntriesByDomainBefore(ctx context.Context, domain string, before time.Time) (bool, error) { | |||
| 1285 | + | ret := _mock.Called(ctx, domain, before) | |||
| 1286 | + | ||||
| 1287 | + | if len(ret) == 0 { | |||
| 1288 | + | panic("no return value specified for HasEntriesByDomainBefore") | |||
| 1289 | + | } | |||
| 1290 | + | ||||
| 1291 | + | var r0 bool | |||
| 1292 | + | var r1 error | |||
| 1293 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time) (bool, error)); ok { | |||
| 1294 | + | return returnFunc(ctx, domain, before) | |||
| 1295 | + | } | |||
| 1296 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time) bool); ok { | |||
| 1297 | + | r0 = returnFunc(ctx, domain, before) | |||
| 1298 | + | } else { | |||
| 1299 | + | r0 = ret.Get(0).(bool) | |||
| 1300 | + | } | |||
| 1301 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, time.Time) error); ok { | |||
| 1302 | + | r1 = returnFunc(ctx, domain, before) | |||
| 1303 | + | } else { | |||
| 1304 | + | r1 = ret.Error(1) | |||
| 1305 | + | } | |||
| 1306 | + | return r0, r1 | |||
| 1307 | + | } | |||
| 1308 | + | ||||
| 1309 | + | // MockHistoryRepository_HasEntriesByDomainBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasEntriesByDomainBefore' | |||
| 1310 | + | type MockHistoryRepository_HasEntriesByDomainBefore_Call struct { | |||
| 1311 | + | *mock.Call | |||
| 1312 | + | } | |||
| 1313 | + | ||||
| 1314 | + | // HasEntriesByDomainBefore is a helper method to define mock.On call | |||
| 1315 | + | // - ctx context.Context | |||
| 1316 | + | // - domain string | |||
| 1317 | + | // - before time.Time | |||
| 1318 | + | func (_e *MockHistoryRepository_Expecter) HasEntriesByDomainBefore(ctx any, domain any, before any) *MockHistoryRepository_HasEntriesByDomainBefore_Call { | |||
| 1319 | + | return &MockHistoryRepository_HasEntriesByDomainBefore_Call{Call: _e.mock.On("HasEntriesByDomainBefore", ctx, domain, before)} | |||
| 1320 | + | } | |||
| 1321 | + | ||||
| 1322 | + | func (_c *MockHistoryRepository_HasEntriesByDomainBefore_Call) Run(run func(ctx context.Context, domain string, before time.Time)) *MockHistoryRepository_HasEntriesByDomainBefore_Call { | |||
| 1323 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1324 | + | var arg0 context.Context | |||
| 1325 | + | if args[0] != nil { | |||
| 1326 | + | arg0 = args[0].(context.Context) | |||
| 1327 | + | } | |||
| 1328 | + | var arg1 string | |||
| 1329 | + | if args[1] != nil { | |||
| 1330 | + | arg1 = args[1].(string) | |||
| 1331 | + | } | |||
| 1332 | + | var arg2 time.Time | |||
| 1333 | + | if args[2] != nil { | |||
| 1334 | + | arg2 = args[2].(time.Time) | |||
| 1335 | + | } | |||
| 1336 | + | run( | |||
| 1337 | + | arg0, | |||
| 1338 | + | arg1, | |||
| 1339 | + | arg2, | |||
| 1340 | + | ) | |||
| 1341 | + | }) | |||
| 1342 | + | return _c | |||
| 1343 | + | } | |||
| 1344 | + | ||||
| 1345 | + | func (_c *MockHistoryRepository_HasEntriesByDomainBefore_Call) Return(b bool, err error) *MockHistoryRepository_HasEntriesByDomainBefore_Call { | |||
| 1346 | + | _c.Call.Return(b, err) | |||
| 1347 | + | return _c | |||
| 1348 | + | } | |||
| 1349 | + | ||||
| 1350 | + | func (_c *MockHistoryRepository_HasEntriesByDomainBefore_Call) RunAndReturn(run func(ctx context.Context, domain string, before time.Time) (bool, error)) *MockHistoryRepository_HasEntriesByDomainBefore_Call { | |||
| 1351 | + | _c.Call.Return(run) | |||
| 1352 | + | return _c | |||
| 1353 | + | } | |||
| 1354 | + | ||||
| 1355 | + | // IncrementVisitCount provides a mock function for the type MockHistoryRepository | |||
| 1356 | + | func (_mock *MockHistoryRepository) IncrementVisitCount(ctx context.Context, url string) error { | |||
| 1357 | + | ret := _mock.Called(ctx, url) | |||
| 1358 | + | ||||
| 1359 | + | if len(ret) == 0 { | |||
| 1360 | + | panic("no return value specified for IncrementVisitCount") | |||
| 1361 | + | } | |||
| 1362 | + | ||||
| 1363 | + | var r0 error | |||
| 1364 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 1365 | + | r0 = returnFunc(ctx, url) | |||
| 1366 | + | } else { | |||
| 1367 | + | r0 = ret.Error(0) | |||
| 1368 | + | } | |||
| 1369 | + | return r0 | |||
| 1370 | + | } | |||
| 1371 | + | ||||
| 1372 | + | // MockHistoryRepository_IncrementVisitCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementVisitCount' | |||
| 1373 | + | type MockHistoryRepository_IncrementVisitCount_Call struct { | |||
| 1374 | + | *mock.Call | |||
| 1375 | + | } | |||
| 1376 | + | ||||
| 1377 | + | // IncrementVisitCount is a helper method to define mock.On call | |||
| 1378 | + | // - ctx context.Context | |||
| 1379 | + | // - url string | |||
| 1380 | + | func (_e *MockHistoryRepository_Expecter) IncrementVisitCount(ctx any, url any) *MockHistoryRepository_IncrementVisitCount_Call { | |||
| 1381 | + | return &MockHistoryRepository_IncrementVisitCount_Call{Call: _e.mock.On("IncrementVisitCount", ctx, url)} | |||
| 1382 | + | } | |||
| 1383 | + | ||||
| 1384 | + | func (_c *MockHistoryRepository_IncrementVisitCount_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_IncrementVisitCount_Call { | |||
| 1385 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1386 | + | var arg0 context.Context | |||
| 1387 | + | if args[0] != nil { | |||
| 1388 | + | arg0 = args[0].(context.Context) | |||
| 1389 | + | } | |||
| 1390 | + | var arg1 string | |||
| 1391 | + | if args[1] != nil { | |||
| 1392 | + | arg1 = args[1].(string) | |||
| 1393 | + | } | |||
| 1394 | + | run( | |||
| 1395 | + | arg0, | |||
| 1396 | + | arg1, | |||
| 1397 | + | ) | |||
| 1398 | + | }) | |||
| 1399 | + | return _c | |||
| 1400 | + | } | |||
| 1401 | + | ||||
| 1402 | + | func (_c *MockHistoryRepository_IncrementVisitCount_Call) Return(err error) *MockHistoryRepository_IncrementVisitCount_Call { | |||
| 1403 | + | _c.Call.Return(err) | |||
| 1404 | + | return _c | |||
| 1405 | + | } | |||
| 1406 | + | ||||
| 1407 | + | func (_c *MockHistoryRepository_IncrementVisitCount_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockHistoryRepository_IncrementVisitCount_Call { | |||
| 1408 | + | _c.Call.Return(run) | |||
| 1409 | + | return _c | |||
| 1410 | + | } | |||
| 1411 | + | ||||
| 1412 | + | // Save provides a mock function for the type MockHistoryRepository | |||
| 1413 | + | func (_mock *MockHistoryRepository) Save(ctx context.Context, entry *entity.HistoryEntry) error { | |||
| 1414 | + | ret := _mock.Called(ctx, entry) | |||
| 1415 | + | ||||
| 1416 | + | if len(ret) == 0 { | |||
| 1417 | + | panic("no return value specified for Save") | |||
| 1418 | + | } | |||
| 1419 | + | ||||
| 1420 | + | var r0 error | |||
| 1421 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.HistoryEntry) error); ok { | |||
| 1422 | + | r0 = returnFunc(ctx, entry) | |||
| 1423 | + | } else { | |||
| 1424 | + | r0 = ret.Error(0) | |||
| 1425 | + | } | |||
| 1426 | + | return r0 | |||
| 1427 | + | } | |||
| 1428 | + | ||||
| 1429 | + | // MockHistoryRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' | |||
| 1430 | + | type MockHistoryRepository_Save_Call struct { | |||
| 1431 | + | *mock.Call | |||
| 1432 | + | } | |||
| 1433 | + | ||||
| 1434 | + | // Save is a helper method to define mock.On call | |||
| 1435 | + | // - ctx context.Context | |||
| 1436 | + | // - entry *entity.HistoryEntry | |||
| 1437 | + | func (_e *MockHistoryRepository_Expecter) Save(ctx any, entry any) *MockHistoryRepository_Save_Call { | |||
| 1438 | + | return &MockHistoryRepository_Save_Call{Call: _e.mock.On("Save", ctx, entry)} | |||
| 1439 | + | } | |||
| 1440 | + | ||||
| 1441 | + | func (_c *MockHistoryRepository_Save_Call) Run(run func(ctx context.Context, entry *entity.HistoryEntry)) *MockHistoryRepository_Save_Call { | |||
| 1442 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1443 | + | var arg0 context.Context | |||
| 1444 | + | if args[0] != nil { | |||
| 1445 | + | arg0 = args[0].(context.Context) | |||
| 1446 | + | } | |||
| 1447 | + | var arg1 *entity.HistoryEntry | |||
| 1448 | + | if args[1] != nil { | |||
| 1449 | + | arg1 = args[1].(*entity.HistoryEntry) | |||
| 1450 | + | } | |||
| 1451 | + | run( | |||
| 1452 | + | arg0, | |||
| 1453 | + | arg1, | |||
| 1454 | + | ) | |||
| 1455 | + | }) | |||
| 1456 | + | return _c | |||
| 1457 | + | } | |||
| 1458 | + | ||||
| 1459 | + | func (_c *MockHistoryRepository_Save_Call) Return(err error) *MockHistoryRepository_Save_Call { | |||
| 1460 | + | _c.Call.Return(err) | |||
| 1461 | + | return _c | |||
| 1462 | + | } | |||
| 1463 | + | ||||
| 1464 | + | func (_c *MockHistoryRepository_Save_Call) RunAndReturn(run func(ctx context.Context, entry *entity.HistoryEntry) error) *MockHistoryRepository_Save_Call { | |||
| 1465 | + | _c.Call.Return(run) | |||
| 1466 | + | return _c | |||
| 1467 | + | } | |||
| 1468 | + | ||||
| 1469 | + | // Search provides a mock function for the type MockHistoryRepository | |||
| 1470 | + | func (_mock *MockHistoryRepository) Search(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error) { | |||
| 1471 | + | ret := _mock.Called(ctx, query, limit) | |||
| 1472 | + | ||||
| 1473 | + | if len(ret) == 0 { | |||
| 1474 | + | panic("no return value specified for Search") | |||
| 1475 | + | } | |||
| 1476 | + | ||||
| 1477 | + | var r0 []entity.HistoryMatch | |||
| 1478 | + | var r1 error | |||
| 1479 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]entity.HistoryMatch, error)); ok { | |||
| 1480 | + | return returnFunc(ctx, query, limit) | |||
| 1481 | + | } | |||
| 1482 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []entity.HistoryMatch); ok { | |||
| 1483 | + | r0 = returnFunc(ctx, query, limit) | |||
| 1484 | + | } else { | |||
| 1485 | + | if ret.Get(0) != nil { | |||
| 1486 | + | r0 = ret.Get(0).([]entity.HistoryMatch) | |||
| 1487 | + | } | |||
| 1488 | + | } | |||
| 1489 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok { | |||
| 1490 | + | r1 = returnFunc(ctx, query, limit) | |||
| 1491 | + | } else { | |||
| 1492 | + | r1 = ret.Error(1) | |||
| 1493 | + | } | |||
| 1494 | + | return r0, r1 | |||
| 1495 | + | } | |||
| 1496 | + | ||||
| 1497 | + | // MockHistoryRepository_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' | |||
| 1498 | + | type MockHistoryRepository_Search_Call struct { | |||
| 1499 | + | *mock.Call | |||
| 1500 | + | } | |||
| 1501 | + | ||||
| 1502 | + | // Search is a helper method to define mock.On call | |||
| 1503 | + | // - ctx context.Context | |||
| 1504 | + | // - query string | |||
| 1505 | + | // - limit int | |||
| 1506 | + | func (_e *MockHistoryRepository_Expecter) Search(ctx any, query any, limit any) *MockHistoryRepository_Search_Call { | |||
| 1507 | + | return &MockHistoryRepository_Search_Call{Call: _e.mock.On("Search", ctx, query, limit)} | |||
| 1508 | + | } | |||
| 1509 | + | ||||
| 1510 | + | func (_c *MockHistoryRepository_Search_Call) Run(run func(ctx context.Context, query string, limit int)) *MockHistoryRepository_Search_Call { | |||
| 1511 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 1512 | + | var arg0 context.Context | |||
| 1513 | + | if args[0] != nil { | |||
| 1514 | + | arg0 = args[0].(context.Context) | |||
| 1515 | + | } | |||
| 1516 | + | var arg1 string | |||
| 1517 | + | if args[1] != nil { | |||
| 1518 | + | arg1 = args[1].(string) | |||
| 1519 | + | } | |||
| 1520 | + | var arg2 int | |||
| 1521 | + | if args[2] != nil { | |||
| 1522 | + | arg2 = args[2].(int) | |||
| 1523 | + | } | |||
| 1524 | + | run( | |||
| 1525 | + | arg0, | |||
| 1526 | + | arg1, | |||
| 1527 | + | arg2, | |||
| 1528 | + | ) | |||
| 1529 | + | }) | |||
| 1530 | + | return _c | |||
| 1531 | + | } | |||
| 1532 | + | ||||
| 1533 | + | func (_c *MockHistoryRepository_Search_Call) Return(historyMatchs []entity.HistoryMatch, err error) *MockHistoryRepository_Search_Call { | |||
| 1534 | + | _c.Call.Return(historyMatchs, err) | |||
| 1535 | + | return _c | |||
| 1536 | + | } | |||
| 1537 | + | ||||
| 1538 | + | func (_c *MockHistoryRepository_Search_Call) RunAndReturn(run func(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error)) *MockHistoryRepository_Search_Call { | |||
| 1539 | + | _c.Call.Return(run) | |||
| 1540 | + | return _c | |||
| 1541 | + | } | |||
D internal/domain/repository/mocks/mocks.go +0 -4545 large diff (4545 lines changed): collapsed
A internal/domain/repository/mocks/session.go +547 -0
| @@ -0,0 +1,547 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | "time" | |||
| 10 | + | ||||
| 11 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 12 | + | mock "github.com/stretchr/testify/mock" | |||
| 13 | + | ) | |||
| 14 | + | ||||
| 15 | + | // NewMockSessionRepository creates a new instance of MockSessionRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 16 | + | // The first argument is typically a *testing.T value. | |||
| 17 | + | func NewMockSessionRepository(t interface { | |||
| 18 | + | mock.TestingT | |||
| 19 | + | Cleanup(func()) | |||
| 20 | + | }) *MockSessionRepository { | |||
| 21 | + | mock := &MockSessionRepository{} | |||
| 22 | + | mock.Mock.Test(t) | |||
| 23 | + | ||||
| 24 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 25 | + | ||||
| 26 | + | return mock | |||
| 27 | + | } | |||
| 28 | + | ||||
| 29 | + | // MockSessionRepository is an autogenerated mock type for the SessionRepository type | |||
| 30 | + | type MockSessionRepository struct { | |||
| 31 | + | mock.Mock | |||
| 32 | + | } | |||
| 33 | + | ||||
| 34 | + | type MockSessionRepository_Expecter struct { | |||
| 35 | + | mock *mock.Mock | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | func (_m *MockSessionRepository) EXPECT() *MockSessionRepository_Expecter { | |||
| 39 | + | return &MockSessionRepository_Expecter{mock: &_m.Mock} | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | // Delete provides a mock function for the type MockSessionRepository | |||
| 43 | + | func (_mock *MockSessionRepository) Delete(ctx context.Context, id entity.SessionID) error { | |||
| 44 | + | ret := _mock.Called(ctx, id) | |||
| 45 | + | ||||
| 46 | + | if len(ret) == 0 { | |||
| 47 | + | panic("no return value specified for Delete") | |||
| 48 | + | } | |||
| 49 | + | ||||
| 50 | + | var r0 error | |||
| 51 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) error); ok { | |||
| 52 | + | r0 = returnFunc(ctx, id) | |||
| 53 | + | } else { | |||
| 54 | + | r0 = ret.Error(0) | |||
| 55 | + | } | |||
| 56 | + | return r0 | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | // MockSessionRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 60 | + | type MockSessionRepository_Delete_Call struct { | |||
| 61 | + | *mock.Call | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | // Delete is a helper method to define mock.On call | |||
| 65 | + | // - ctx context.Context | |||
| 66 | + | // - id entity.SessionID | |||
| 67 | + | func (_e *MockSessionRepository_Expecter) Delete(ctx any, id any) *MockSessionRepository_Delete_Call { | |||
| 68 | + | return &MockSessionRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} | |||
| 69 | + | } | |||
| 70 | + | ||||
| 71 | + | func (_c *MockSessionRepository_Delete_Call) Run(run func(ctx context.Context, id entity.SessionID)) *MockSessionRepository_Delete_Call { | |||
| 72 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | + | var arg0 context.Context | |||
| 74 | + | if args[0] != nil { | |||
| 75 | + | arg0 = args[0].(context.Context) | |||
| 76 | + | } | |||
| 77 | + | var arg1 entity.SessionID | |||
| 78 | + | if args[1] != nil { | |||
| 79 | + | arg1 = args[1].(entity.SessionID) | |||
| 80 | + | } | |||
| 81 | + | run( | |||
| 82 | + | arg0, | |||
| 83 | + | arg1, | |||
| 84 | + | ) | |||
| 85 | + | }) | |||
| 86 | + | return _c | |||
| 87 | + | } | |||
| 88 | + | ||||
| 89 | + | func (_c *MockSessionRepository_Delete_Call) Return(err error) *MockSessionRepository_Delete_Call { | |||
| 90 | + | _c.Call.Return(err) | |||
| 91 | + | return _c | |||
| 92 | + | } | |||
| 93 | + | ||||
| 94 | + | func (_c *MockSessionRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID) error) *MockSessionRepository_Delete_Call { | |||
| 95 | + | _c.Call.Return(run) | |||
| 96 | + | return _c | |||
| 97 | + | } | |||
| 98 | + | ||||
| 99 | + | // DeleteExitedBefore provides a mock function for the type MockSessionRepository | |||
| 100 | + | func (_mock *MockSessionRepository) DeleteExitedBefore(ctx context.Context, cutoff time.Time) (int64, error) { | |||
| 101 | + | ret := _mock.Called(ctx, cutoff) | |||
| 102 | + | ||||
| 103 | + | if len(ret) == 0 { | |||
| 104 | + | panic("no return value specified for DeleteExitedBefore") | |||
| 105 | + | } | |||
| 106 | + | ||||
| 107 | + | var r0 int64 | |||
| 108 | + | var r1 error | |||
| 109 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok { | |||
| 110 | + | return returnFunc(ctx, cutoff) | |||
| 111 | + | } | |||
| 112 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok { | |||
| 113 | + | r0 = returnFunc(ctx, cutoff) | |||
| 114 | + | } else { | |||
| 115 | + | r0 = ret.Get(0).(int64) | |||
| 116 | + | } | |||
| 117 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { | |||
| 118 | + | r1 = returnFunc(ctx, cutoff) | |||
| 119 | + | } else { | |||
| 120 | + | r1 = ret.Error(1) | |||
| 121 | + | } | |||
| 122 | + | return r0, r1 | |||
| 123 | + | } | |||
| 124 | + | ||||
| 125 | + | // MockSessionRepository_DeleteExitedBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExitedBefore' | |||
| 126 | + | type MockSessionRepository_DeleteExitedBefore_Call struct { | |||
| 127 | + | *mock.Call | |||
| 128 | + | } | |||
| 129 | + | ||||
| 130 | + | // DeleteExitedBefore is a helper method to define mock.On call | |||
| 131 | + | // - ctx context.Context | |||
| 132 | + | // - cutoff time.Time | |||
| 133 | + | func (_e *MockSessionRepository_Expecter) DeleteExitedBefore(ctx any, cutoff any) *MockSessionRepository_DeleteExitedBefore_Call { | |||
| 134 | + | return &MockSessionRepository_DeleteExitedBefore_Call{Call: _e.mock.On("DeleteExitedBefore", ctx, cutoff)} | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | func (_c *MockSessionRepository_DeleteExitedBefore_Call) Run(run func(ctx context.Context, cutoff time.Time)) *MockSessionRepository_DeleteExitedBefore_Call { | |||
| 138 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 139 | + | var arg0 context.Context | |||
| 140 | + | if args[0] != nil { | |||
| 141 | + | arg0 = args[0].(context.Context) | |||
| 142 | + | } | |||
| 143 | + | var arg1 time.Time | |||
| 144 | + | if args[1] != nil { | |||
| 145 | + | arg1 = args[1].(time.Time) | |||
| 146 | + | } | |||
| 147 | + | run( | |||
| 148 | + | arg0, | |||
| 149 | + | arg1, | |||
| 150 | + | ) | |||
| 151 | + | }) | |||
| 152 | + | return _c | |||
| 153 | + | } | |||
| 154 | + | ||||
| 155 | + | func (_c *MockSessionRepository_DeleteExitedBefore_Call) Return(n int64, err error) *MockSessionRepository_DeleteExitedBefore_Call { | |||
| 156 | + | _c.Call.Return(n, err) | |||
| 157 | + | return _c | |||
| 158 | + | } | |||
| 159 | + | ||||
| 160 | + | func (_c *MockSessionRepository_DeleteExitedBefore_Call) RunAndReturn(run func(ctx context.Context, cutoff time.Time) (int64, error)) *MockSessionRepository_DeleteExitedBefore_Call { | |||
| 161 | + | _c.Call.Return(run) | |||
| 162 | + | return _c | |||
| 163 | + | } | |||
| 164 | + | ||||
| 165 | + | // DeleteOldestExited provides a mock function for the type MockSessionRepository | |||
| 166 | + | func (_mock *MockSessionRepository) DeleteOldestExited(ctx context.Context, keepCount int) (int64, error) { | |||
| 167 | + | ret := _mock.Called(ctx, keepCount) | |||
| 168 | + | ||||
| 169 | + | if len(ret) == 0 { | |||
| 170 | + | panic("no return value specified for DeleteOldestExited") | |||
| 171 | + | } | |||
| 172 | + | ||||
| 173 | + | var r0 int64 | |||
| 174 | + | var r1 error | |||
| 175 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) (int64, error)); ok { | |||
| 176 | + | return returnFunc(ctx, keepCount) | |||
| 177 | + | } | |||
| 178 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) int64); ok { | |||
| 179 | + | r0 = returnFunc(ctx, keepCount) | |||
| 180 | + | } else { | |||
| 181 | + | r0 = ret.Get(0).(int64) | |||
| 182 | + | } | |||
| 183 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 184 | + | r1 = returnFunc(ctx, keepCount) | |||
| 185 | + | } else { | |||
| 186 | + | r1 = ret.Error(1) | |||
| 187 | + | } | |||
| 188 | + | return r0, r1 | |||
| 189 | + | } | |||
| 190 | + | ||||
| 191 | + | // MockSessionRepository_DeleteOldestExited_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOldestExited' | |||
| 192 | + | type MockSessionRepository_DeleteOldestExited_Call struct { | |||
| 193 | + | *mock.Call | |||
| 194 | + | } | |||
| 195 | + | ||||
| 196 | + | // DeleteOldestExited is a helper method to define mock.On call | |||
| 197 | + | // - ctx context.Context | |||
| 198 | + | // - keepCount int | |||
| 199 | + | func (_e *MockSessionRepository_Expecter) DeleteOldestExited(ctx any, keepCount any) *MockSessionRepository_DeleteOldestExited_Call { | |||
| 200 | + | return &MockSessionRepository_DeleteOldestExited_Call{Call: _e.mock.On("DeleteOldestExited", ctx, keepCount)} | |||
| 201 | + | } | |||
| 202 | + | ||||
| 203 | + | func (_c *MockSessionRepository_DeleteOldestExited_Call) Run(run func(ctx context.Context, keepCount int)) *MockSessionRepository_DeleteOldestExited_Call { | |||
| 204 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 205 | + | var arg0 context.Context | |||
| 206 | + | if args[0] != nil { | |||
| 207 | + | arg0 = args[0].(context.Context) | |||
| 208 | + | } | |||
| 209 | + | var arg1 int | |||
| 210 | + | if args[1] != nil { | |||
| 211 | + | arg1 = args[1].(int) | |||
| 212 | + | } | |||
| 213 | + | run( | |||
| 214 | + | arg0, | |||
| 215 | + | arg1, | |||
| 216 | + | ) | |||
| 217 | + | }) | |||
| 218 | + | return _c | |||
| 219 | + | } | |||
| 220 | + | ||||
| 221 | + | func (_c *MockSessionRepository_DeleteOldestExited_Call) Return(n int64, err error) *MockSessionRepository_DeleteOldestExited_Call { | |||
| 222 | + | _c.Call.Return(n, err) | |||
| 223 | + | return _c | |||
| 224 | + | } | |||
| 225 | + | ||||
| 226 | + | func (_c *MockSessionRepository_DeleteOldestExited_Call) RunAndReturn(run func(ctx context.Context, keepCount int) (int64, error)) *MockSessionRepository_DeleteOldestExited_Call { | |||
| 227 | + | _c.Call.Return(run) | |||
| 228 | + | return _c | |||
| 229 | + | } | |||
| 230 | + | ||||
| 231 | + | // FindByID provides a mock function for the type MockSessionRepository | |||
| 232 | + | func (_mock *MockSessionRepository) FindByID(ctx context.Context, id entity.SessionID) (*entity.Session, error) { | |||
| 233 | + | ret := _mock.Called(ctx, id) | |||
| 234 | + | ||||
| 235 | + | if len(ret) == 0 { | |||
| 236 | + | panic("no return value specified for FindByID") | |||
| 237 | + | } | |||
| 238 | + | ||||
| 239 | + | var r0 *entity.Session | |||
| 240 | + | var r1 error | |||
| 241 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) (*entity.Session, error)); ok { | |||
| 242 | + | return returnFunc(ctx, id) | |||
| 243 | + | } | |||
| 244 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) *entity.Session); ok { | |||
| 245 | + | r0 = returnFunc(ctx, id) | |||
| 246 | + | } else { | |||
| 247 | + | if ret.Get(0) != nil { | |||
| 248 | + | r0 = ret.Get(0).(*entity.Session) | |||
| 249 | + | } | |||
| 250 | + | } | |||
| 251 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID) error); ok { | |||
| 252 | + | r1 = returnFunc(ctx, id) | |||
| 253 | + | } else { | |||
| 254 | + | r1 = ret.Error(1) | |||
| 255 | + | } | |||
| 256 | + | return r0, r1 | |||
| 257 | + | } | |||
| 258 | + | ||||
| 259 | + | // MockSessionRepository_FindByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByID' | |||
| 260 | + | type MockSessionRepository_FindByID_Call struct { | |||
| 261 | + | *mock.Call | |||
| 262 | + | } | |||
| 263 | + | ||||
| 264 | + | // FindByID is a helper method to define mock.On call | |||
| 265 | + | // - ctx context.Context | |||
| 266 | + | // - id entity.SessionID | |||
| 267 | + | func (_e *MockSessionRepository_Expecter) FindByID(ctx any, id any) *MockSessionRepository_FindByID_Call { | |||
| 268 | + | return &MockSessionRepository_FindByID_Call{Call: _e.mock.On("FindByID", ctx, id)} | |||
| 269 | + | } | |||
| 270 | + | ||||
| 271 | + | func (_c *MockSessionRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.SessionID)) *MockSessionRepository_FindByID_Call { | |||
| 272 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 273 | + | var arg0 context.Context | |||
| 274 | + | if args[0] != nil { | |||
| 275 | + | arg0 = args[0].(context.Context) | |||
| 276 | + | } | |||
| 277 | + | var arg1 entity.SessionID | |||
| 278 | + | if args[1] != nil { | |||
| 279 | + | arg1 = args[1].(entity.SessionID) | |||
| 280 | + | } | |||
| 281 | + | run( | |||
| 282 | + | arg0, | |||
| 283 | + | arg1, | |||
| 284 | + | ) | |||
| 285 | + | }) | |||
| 286 | + | return _c | |||
| 287 | + | } | |||
| 288 | + | ||||
| 289 | + | func (_c *MockSessionRepository_FindByID_Call) Return(session *entity.Session, err error) *MockSessionRepository_FindByID_Call { | |||
| 290 | + | _c.Call.Return(session, err) | |||
| 291 | + | return _c | |||
| 292 | + | } | |||
| 293 | + | ||||
| 294 | + | func (_c *MockSessionRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID) (*entity.Session, error)) *MockSessionRepository_FindByID_Call { | |||
| 295 | + | _c.Call.Return(run) | |||
| 296 | + | return _c | |||
| 297 | + | } | |||
| 298 | + | ||||
| 299 | + | // GetActive provides a mock function for the type MockSessionRepository | |||
| 300 | + | func (_mock *MockSessionRepository) GetActive(ctx context.Context) (*entity.Session, error) { | |||
| 301 | + | ret := _mock.Called(ctx) | |||
| 302 | + | ||||
| 303 | + | if len(ret) == 0 { | |||
| 304 | + | panic("no return value specified for GetActive") | |||
| 305 | + | } | |||
| 306 | + | ||||
| 307 | + | var r0 *entity.Session | |||
| 308 | + | var r1 error | |||
| 309 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.Session, error)); ok { | |||
| 310 | + | return returnFunc(ctx) | |||
| 311 | + | } | |||
| 312 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.Session); ok { | |||
| 313 | + | r0 = returnFunc(ctx) | |||
| 314 | + | } else { | |||
| 315 | + | if ret.Get(0) != nil { | |||
| 316 | + | r0 = ret.Get(0).(*entity.Session) | |||
| 317 | + | } | |||
| 318 | + | } | |||
| 319 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 320 | + | r1 = returnFunc(ctx) | |||
| 321 | + | } else { | |||
| 322 | + | r1 = ret.Error(1) | |||
| 323 | + | } | |||
| 324 | + | return r0, r1 | |||
| 325 | + | } | |||
| 326 | + | ||||
| 327 | + | // MockSessionRepository_GetActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActive' | |||
| 328 | + | type MockSessionRepository_GetActive_Call struct { | |||
| 329 | + | *mock.Call | |||
| 330 | + | } | |||
| 331 | + | ||||
| 332 | + | // GetActive is a helper method to define mock.On call | |||
| 333 | + | // - ctx context.Context | |||
| 334 | + | func (_e *MockSessionRepository_Expecter) GetActive(ctx any) *MockSessionRepository_GetActive_Call { | |||
| 335 | + | return &MockSessionRepository_GetActive_Call{Call: _e.mock.On("GetActive", ctx)} | |||
| 336 | + | } | |||
| 337 | + | ||||
| 338 | + | func (_c *MockSessionRepository_GetActive_Call) Run(run func(ctx context.Context)) *MockSessionRepository_GetActive_Call { | |||
| 339 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 340 | + | var arg0 context.Context | |||
| 341 | + | if args[0] != nil { | |||
| 342 | + | arg0 = args[0].(context.Context) | |||
| 343 | + | } | |||
| 344 | + | run( | |||
| 345 | + | arg0, | |||
| 346 | + | ) | |||
| 347 | + | }) | |||
| 348 | + | return _c | |||
| 349 | + | } | |||
| 350 | + | ||||
| 351 | + | func (_c *MockSessionRepository_GetActive_Call) Return(session *entity.Session, err error) *MockSessionRepository_GetActive_Call { | |||
| 352 | + | _c.Call.Return(session, err) | |||
| 353 | + | return _c | |||
| 354 | + | } | |||
| 355 | + | ||||
| 356 | + | func (_c *MockSessionRepository_GetActive_Call) RunAndReturn(run func(ctx context.Context) (*entity.Session, error)) *MockSessionRepository_GetActive_Call { | |||
| 357 | + | _c.Call.Return(run) | |||
| 358 | + | return _c | |||
| 359 | + | } | |||
| 360 | + | ||||
| 361 | + | // GetRecent provides a mock function for the type MockSessionRepository | |||
| 362 | + | func (_mock *MockSessionRepository) GetRecent(ctx context.Context, limit int) ([]*entity.Session, error) { | |||
| 363 | + | ret := _mock.Called(ctx, limit) | |||
| 364 | + | ||||
| 365 | + | if len(ret) == 0 { | |||
| 366 | + | panic("no return value specified for GetRecent") | |||
| 367 | + | } | |||
| 368 | + | ||||
| 369 | + | var r0 []*entity.Session | |||
| 370 | + | var r1 error | |||
| 371 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.Session, error)); ok { | |||
| 372 | + | return returnFunc(ctx, limit) | |||
| 373 | + | } | |||
| 374 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.Session); ok { | |||
| 375 | + | r0 = returnFunc(ctx, limit) | |||
| 376 | + | } else { | |||
| 377 | + | if ret.Get(0) != nil { | |||
| 378 | + | r0 = ret.Get(0).([]*entity.Session) | |||
| 379 | + | } | |||
| 380 | + | } | |||
| 381 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |||
| 382 | + | r1 = returnFunc(ctx, limit) | |||
| 383 | + | } else { | |||
| 384 | + | r1 = ret.Error(1) | |||
| 385 | + | } | |||
| 386 | + | return r0, r1 | |||
| 387 | + | } | |||
| 388 | + | ||||
| 389 | + | // MockSessionRepository_GetRecent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecent' | |||
| 390 | + | type MockSessionRepository_GetRecent_Call struct { | |||
| 391 | + | *mock.Call | |||
| 392 | + | } | |||
| 393 | + | ||||
| 394 | + | // GetRecent is a helper method to define mock.On call | |||
| 395 | + | // - ctx context.Context | |||
| 396 | + | // - limit int | |||
| 397 | + | func (_e *MockSessionRepository_Expecter) GetRecent(ctx any, limit any) *MockSessionRepository_GetRecent_Call { | |||
| 398 | + | return &MockSessionRepository_GetRecent_Call{Call: _e.mock.On("GetRecent", ctx, limit)} | |||
| 399 | + | } | |||
| 400 | + | ||||
| 401 | + | func (_c *MockSessionRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int)) *MockSessionRepository_GetRecent_Call { | |||
| 402 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 403 | + | var arg0 context.Context | |||
| 404 | + | if args[0] != nil { | |||
| 405 | + | arg0 = args[0].(context.Context) | |||
| 406 | + | } | |||
| 407 | + | var arg1 int | |||
| 408 | + | if args[1] != nil { | |||
| 409 | + | arg1 = args[1].(int) | |||
| 410 | + | } | |||
| 411 | + | run( | |||
| 412 | + | arg0, | |||
| 413 | + | arg1, | |||
| 414 | + | ) | |||
| 415 | + | }) | |||
| 416 | + | return _c | |||
| 417 | + | } | |||
| 418 | + | ||||
| 419 | + | func (_c *MockSessionRepository_GetRecent_Call) Return(sessions []*entity.Session, err error) *MockSessionRepository_GetRecent_Call { | |||
| 420 | + | _c.Call.Return(sessions, err) | |||
| 421 | + | return _c | |||
| 422 | + | } | |||
| 423 | + | ||||
| 424 | + | func (_c *MockSessionRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.Session, error)) *MockSessionRepository_GetRecent_Call { | |||
| 425 | + | _c.Call.Return(run) | |||
| 426 | + | return _c | |||
| 427 | + | } | |||
| 428 | + | ||||
| 429 | + | // MarkEnded provides a mock function for the type MockSessionRepository | |||
| 430 | + | func (_mock *MockSessionRepository) MarkEnded(ctx context.Context, id entity.SessionID, endedAt time.Time) error { | |||
| 431 | + | ret := _mock.Called(ctx, id, endedAt) | |||
| 432 | + | ||||
| 433 | + | if len(ret) == 0 { | |||
| 434 | + | panic("no return value specified for MarkEnded") | |||
| 435 | + | } | |||
| 436 | + | ||||
| 437 | + | var r0 error | |||
| 438 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID, time.Time) error); ok { | |||
| 439 | + | r0 = returnFunc(ctx, id, endedAt) | |||
| 440 | + | } else { | |||
| 441 | + | r0 = ret.Error(0) | |||
| 442 | + | } | |||
| 443 | + | return r0 | |||
| 444 | + | } | |||
| 445 | + | ||||
| 446 | + | // MockSessionRepository_MarkEnded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkEnded' | |||
| 447 | + | type MockSessionRepository_MarkEnded_Call struct { | |||
| 448 | + | *mock.Call | |||
| 449 | + | } | |||
| 450 | + | ||||
| 451 | + | // MarkEnded is a helper method to define mock.On call | |||
| 452 | + | // - ctx context.Context | |||
| 453 | + | // - id entity.SessionID | |||
| 454 | + | // - endedAt time.Time | |||
| 455 | + | func (_e *MockSessionRepository_Expecter) MarkEnded(ctx any, id any, endedAt any) *MockSessionRepository_MarkEnded_Call { | |||
| 456 | + | return &MockSessionRepository_MarkEnded_Call{Call: _e.mock.On("MarkEnded", ctx, id, endedAt)} | |||
| 457 | + | } | |||
| 458 | + | ||||
| 459 | + | func (_c *MockSessionRepository_MarkEnded_Call) Run(run func(ctx context.Context, id entity.SessionID, endedAt time.Time)) *MockSessionRepository_MarkEnded_Call { | |||
| 460 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 461 | + | var arg0 context.Context | |||
| 462 | + | if args[0] != nil { | |||
| 463 | + | arg0 = args[0].(context.Context) | |||
| 464 | + | } | |||
| 465 | + | var arg1 entity.SessionID | |||
| 466 | + | if args[1] != nil { | |||
| 467 | + | arg1 = args[1].(entity.SessionID) | |||
| 468 | + | } | |||
| 469 | + | var arg2 time.Time | |||
| 470 | + | if args[2] != nil { | |||
| 471 | + | arg2 = args[2].(time.Time) | |||
| 472 | + | } | |||
| 473 | + | run( | |||
| 474 | + | arg0, | |||
| 475 | + | arg1, | |||
| 476 | + | arg2, | |||
| 477 | + | ) | |||
| 478 | + | }) | |||
| 479 | + | return _c | |||
| 480 | + | } | |||
| 481 | + | ||||
| 482 | + | func (_c *MockSessionRepository_MarkEnded_Call) Return(err error) *MockSessionRepository_MarkEnded_Call { | |||
| 483 | + | _c.Call.Return(err) | |||
| 484 | + | return _c | |||
| 485 | + | } | |||
| 486 | + | ||||
| 487 | + | func (_c *MockSessionRepository_MarkEnded_Call) RunAndReturn(run func(ctx context.Context, id entity.SessionID, endedAt time.Time) error) *MockSessionRepository_MarkEnded_Call { | |||
| 488 | + | _c.Call.Return(run) | |||
| 489 | + | return _c | |||
| 490 | + | } | |||
| 491 | + | ||||
| 492 | + | // Save provides a mock function for the type MockSessionRepository | |||
| 493 | + | func (_mock *MockSessionRepository) Save(ctx context.Context, session *entity.Session) error { | |||
| 494 | + | ret := _mock.Called(ctx, session) | |||
| 495 | + | ||||
| 496 | + | if len(ret) == 0 { | |||
| 497 | + | panic("no return value specified for Save") | |||
| 498 | + | } | |||
| 499 | + | ||||
| 500 | + | var r0 error | |||
| 501 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Session) error); ok { | |||
| 502 | + | r0 = returnFunc(ctx, session) | |||
| 503 | + | } else { | |||
| 504 | + | r0 = ret.Error(0) | |||
| 505 | + | } | |||
| 506 | + | return r0 | |||
| 507 | + | } | |||
| 508 | + | ||||
| 509 | + | // MockSessionRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' | |||
| 510 | + | type MockSessionRepository_Save_Call struct { | |||
| 511 | + | *mock.Call | |||
| 512 | + | } | |||
| 513 | + | ||||
| 514 | + | // Save is a helper method to define mock.On call | |||
| 515 | + | // - ctx context.Context | |||
| 516 | + | // - session *entity.Session | |||
| 517 | + | func (_e *MockSessionRepository_Expecter) Save(ctx any, session any) *MockSessionRepository_Save_Call { | |||
| 518 | + | return &MockSessionRepository_Save_Call{Call: _e.mock.On("Save", ctx, session)} | |||
| 519 | + | } | |||
| 520 | + | ||||
| 521 | + | func (_c *MockSessionRepository_Save_Call) Run(run func(ctx context.Context, session *entity.Session)) *MockSessionRepository_Save_Call { | |||
| 522 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 523 | + | var arg0 context.Context | |||
| 524 | + | if args[0] != nil { | |||
| 525 | + | arg0 = args[0].(context.Context) | |||
| 526 | + | } | |||
| 527 | + | var arg1 *entity.Session | |||
| 528 | + | if args[1] != nil { | |||
| 529 | + | arg1 = args[1].(*entity.Session) | |||
| 530 | + | } | |||
| 531 | + | run( | |||
| 532 | + | arg0, | |||
| 533 | + | arg1, | |||
| 534 | + | ) | |||
| 535 | + | }) | |||
| 536 | + | return _c | |||
| 537 | + | } | |||
| 538 | + | ||||
| 539 | + | func (_c *MockSessionRepository_Save_Call) Return(err error) *MockSessionRepository_Save_Call { | |||
| 540 | + | _c.Call.Return(err) | |||
| 541 | + | return _c | |||
| 542 | + | } | |||
| 543 | + | ||||
| 544 | + | func (_c *MockSessionRepository_Save_Call) RunAndReturn(run func(ctx context.Context, session *entity.Session) error) *MockSessionRepository_Save_Call { | |||
| 545 | + | _c.Call.Return(run) | |||
| 546 | + | return _c | |||
| 547 | + | } | |||
A internal/domain/repository/mocks/session_state.go +343 -0
| @@ -0,0 +1,343 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockSessionStateRepository creates a new instance of MockSessionStateRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockSessionStateRepository(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockSessionStateRepository { | |||
| 20 | + | mock := &MockSessionStateRepository{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockSessionStateRepository is an autogenerated mock type for the SessionStateRepository type | |||
| 29 | + | type MockSessionStateRepository struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockSessionStateRepository_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockSessionStateRepository) EXPECT() *MockSessionStateRepository_Expecter { | |||
| 38 | + | return &MockSessionStateRepository_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // DeleteSnapshot provides a mock function for the type MockSessionStateRepository | |||
| 42 | + | func (_mock *MockSessionStateRepository) DeleteSnapshot(ctx context.Context, sessionID entity.SessionID) error { | |||
| 43 | + | ret := _mock.Called(ctx, sessionID) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for DeleteSnapshot") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, sessionID) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockSessionStateRepository_DeleteSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSnapshot' | |||
| 59 | + | type MockSessionStateRepository_DeleteSnapshot_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // DeleteSnapshot is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - sessionID entity.SessionID | |||
| 66 | + | func (_e *MockSessionStateRepository_Expecter) DeleteSnapshot(ctx any, sessionID any) *MockSessionStateRepository_DeleteSnapshot_Call { | |||
| 67 | + | return &MockSessionStateRepository_DeleteSnapshot_Call{Call: _e.mock.On("DeleteSnapshot", ctx, sessionID)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockSessionStateRepository_DeleteSnapshot_Call) Run(run func(ctx context.Context, sessionID entity.SessionID)) *MockSessionStateRepository_DeleteSnapshot_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 context.Context | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(context.Context) | |||
| 75 | + | } | |||
| 76 | + | var arg1 entity.SessionID | |||
| 77 | + | if args[1] != nil { | |||
| 78 | + | arg1 = args[1].(entity.SessionID) | |||
| 79 | + | } | |||
| 80 | + | run( | |||
| 81 | + | arg0, | |||
| 82 | + | arg1, | |||
| 83 | + | ) | |||
| 84 | + | }) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockSessionStateRepository_DeleteSnapshot_Call) Return(err error) *MockSessionStateRepository_DeleteSnapshot_Call { | |||
| 89 | + | _c.Call.Return(err) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockSessionStateRepository_DeleteSnapshot_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID) error) *MockSessionStateRepository_DeleteSnapshot_Call { | |||
| 94 | + | _c.Call.Return(run) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | // GetAllSnapshots provides a mock function for the type MockSessionStateRepository | |||
| 99 | + | func (_mock *MockSessionStateRepository) GetAllSnapshots(ctx context.Context) ([]*entity.SessionState, error) { | |||
| 100 | + | ret := _mock.Called(ctx) | |||
| 101 | + | ||||
| 102 | + | if len(ret) == 0 { | |||
| 103 | + | panic("no return value specified for GetAllSnapshots") | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | var r0 []*entity.SessionState | |||
| 107 | + | var r1 error | |||
| 108 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.SessionState, error)); ok { | |||
| 109 | + | return returnFunc(ctx) | |||
| 110 | + | } | |||
| 111 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.SessionState); ok { | |||
| 112 | + | r0 = returnFunc(ctx) | |||
| 113 | + | } else { | |||
| 114 | + | if ret.Get(0) != nil { | |||
| 115 | + | r0 = ret.Get(0).([]*entity.SessionState) | |||
| 116 | + | } | |||
| 117 | + | } | |||
| 118 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 119 | + | r1 = returnFunc(ctx) | |||
| 120 | + | } else { | |||
| 121 | + | r1 = ret.Error(1) | |||
| 122 | + | } | |||
| 123 | + | return r0, r1 | |||
| 124 | + | } | |||
| 125 | + | ||||
| 126 | + | // MockSessionStateRepository_GetAllSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllSnapshots' | |||
| 127 | + | type MockSessionStateRepository_GetAllSnapshots_Call struct { | |||
| 128 | + | *mock.Call | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | // GetAllSnapshots is a helper method to define mock.On call | |||
| 132 | + | // - ctx context.Context | |||
| 133 | + | func (_e *MockSessionStateRepository_Expecter) GetAllSnapshots(ctx any) *MockSessionStateRepository_GetAllSnapshots_Call { | |||
| 134 | + | return &MockSessionStateRepository_GetAllSnapshots_Call{Call: _e.mock.On("GetAllSnapshots", ctx)} | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | func (_c *MockSessionStateRepository_GetAllSnapshots_Call) Run(run func(ctx context.Context)) *MockSessionStateRepository_GetAllSnapshots_Call { | |||
| 138 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 139 | + | var arg0 context.Context | |||
| 140 | + | if args[0] != nil { | |||
| 141 | + | arg0 = args[0].(context.Context) | |||
| 142 | + | } | |||
| 143 | + | run( | |||
| 144 | + | arg0, | |||
| 145 | + | ) | |||
| 146 | + | }) | |||
| 147 | + | return _c | |||
| 148 | + | } | |||
| 149 | + | ||||
| 150 | + | func (_c *MockSessionStateRepository_GetAllSnapshots_Call) Return(sessionStates []*entity.SessionState, err error) *MockSessionStateRepository_GetAllSnapshots_Call { | |||
| 151 | + | _c.Call.Return(sessionStates, err) | |||
| 152 | + | return _c | |||
| 153 | + | } | |||
| 154 | + | ||||
| 155 | + | func (_c *MockSessionStateRepository_GetAllSnapshots_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.SessionState, error)) *MockSessionStateRepository_GetAllSnapshots_Call { | |||
| 156 | + | _c.Call.Return(run) | |||
| 157 | + | return _c | |||
| 158 | + | } | |||
| 159 | + | ||||
| 160 | + | // GetSnapshot provides a mock function for the type MockSessionStateRepository | |||
| 161 | + | func (_mock *MockSessionStateRepository) GetSnapshot(ctx context.Context, sessionID entity.SessionID) (*entity.SessionState, error) { | |||
| 162 | + | ret := _mock.Called(ctx, sessionID) | |||
| 163 | + | ||||
| 164 | + | if len(ret) == 0 { | |||
| 165 | + | panic("no return value specified for GetSnapshot") | |||
| 166 | + | } | |||
| 167 | + | ||||
| 168 | + | var r0 *entity.SessionState | |||
| 169 | + | var r1 error | |||
| 170 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) (*entity.SessionState, error)); ok { | |||
| 171 | + | return returnFunc(ctx, sessionID) | |||
| 172 | + | } | |||
| 173 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.SessionID) *entity.SessionState); ok { | |||
| 174 | + | r0 = returnFunc(ctx, sessionID) | |||
| 175 | + | } else { | |||
| 176 | + | if ret.Get(0) != nil { | |||
| 177 | + | r0 = ret.Get(0).(*entity.SessionState) | |||
| 178 | + | } | |||
| 179 | + | } | |||
| 180 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.SessionID) error); ok { | |||
| 181 | + | r1 = returnFunc(ctx, sessionID) | |||
| 182 | + | } else { | |||
| 183 | + | r1 = ret.Error(1) | |||
| 184 | + | } | |||
| 185 | + | return r0, r1 | |||
| 186 | + | } | |||
| 187 | + | ||||
| 188 | + | // MockSessionStateRepository_GetSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshot' | |||
| 189 | + | type MockSessionStateRepository_GetSnapshot_Call struct { | |||
| 190 | + | *mock.Call | |||
| 191 | + | } | |||
| 192 | + | ||||
| 193 | + | // GetSnapshot is a helper method to define mock.On call | |||
| 194 | + | // - ctx context.Context | |||
| 195 | + | // - sessionID entity.SessionID | |||
| 196 | + | func (_e *MockSessionStateRepository_Expecter) GetSnapshot(ctx any, sessionID any) *MockSessionStateRepository_GetSnapshot_Call { | |||
| 197 | + | return &MockSessionStateRepository_GetSnapshot_Call{Call: _e.mock.On("GetSnapshot", ctx, sessionID)} | |||
| 198 | + | } | |||
| 199 | + | ||||
| 200 | + | func (_c *MockSessionStateRepository_GetSnapshot_Call) Run(run func(ctx context.Context, sessionID entity.SessionID)) *MockSessionStateRepository_GetSnapshot_Call { | |||
| 201 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 202 | + | var arg0 context.Context | |||
| 203 | + | if args[0] != nil { | |||
| 204 | + | arg0 = args[0].(context.Context) | |||
| 205 | + | } | |||
| 206 | + | var arg1 entity.SessionID | |||
| 207 | + | if args[1] != nil { | |||
| 208 | + | arg1 = args[1].(entity.SessionID) | |||
| 209 | + | } | |||
| 210 | + | run( | |||
| 211 | + | arg0, | |||
| 212 | + | arg1, | |||
| 213 | + | ) | |||
| 214 | + | }) | |||
| 215 | + | return _c | |||
| 216 | + | } | |||
| 217 | + | ||||
| 218 | + | func (_c *MockSessionStateRepository_GetSnapshot_Call) Return(sessionState *entity.SessionState, err error) *MockSessionStateRepository_GetSnapshot_Call { | |||
| 219 | + | _c.Call.Return(sessionState, err) | |||
| 220 | + | return _c | |||
| 221 | + | } | |||
| 222 | + | ||||
| 223 | + | func (_c *MockSessionStateRepository_GetSnapshot_Call) RunAndReturn(run func(ctx context.Context, sessionID entity.SessionID) (*entity.SessionState, error)) *MockSessionStateRepository_GetSnapshot_Call { | |||
| 224 | + | _c.Call.Return(run) | |||
| 225 | + | return _c | |||
| 226 | + | } | |||
| 227 | + | ||||
| 228 | + | // GetTotalSnapshotsSize provides a mock function for the type MockSessionStateRepository | |||
| 229 | + | func (_mock *MockSessionStateRepository) GetTotalSnapshotsSize(ctx context.Context) (int64, error) { | |||
| 230 | + | ret := _mock.Called(ctx) | |||
| 231 | + | ||||
| 232 | + | if len(ret) == 0 { | |||
| 233 | + | panic("no return value specified for GetTotalSnapshotsSize") | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | var r0 int64 | |||
| 237 | + | var r1 error | |||
| 238 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) (int64, error)); ok { | |||
| 239 | + | return returnFunc(ctx) | |||
| 240 | + | } | |||
| 241 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) int64); ok { | |||
| 242 | + | r0 = returnFunc(ctx) | |||
| 243 | + | } else { | |||
| 244 | + | r0 = ret.Get(0).(int64) | |||
| 245 | + | } | |||
| 246 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 247 | + | r1 = returnFunc(ctx) | |||
| 248 | + | } else { | |||
| 249 | + | r1 = ret.Error(1) | |||
| 250 | + | } | |||
| 251 | + | return r0, r1 | |||
| 252 | + | } | |||
| 253 | + | ||||
| 254 | + | // MockSessionStateRepository_GetTotalSnapshotsSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalSnapshotsSize' | |||
| 255 | + | type MockSessionStateRepository_GetTotalSnapshotsSize_Call struct { | |||
| 256 | + | *mock.Call | |||
| 257 | + | } | |||
| 258 | + | ||||
| 259 | + | // GetTotalSnapshotsSize is a helper method to define mock.On call | |||
| 260 | + | // - ctx context.Context | |||
| 261 | + | func (_e *MockSessionStateRepository_Expecter) GetTotalSnapshotsSize(ctx any) *MockSessionStateRepository_GetTotalSnapshotsSize_Call { | |||
| 262 | + | return &MockSessionStateRepository_GetTotalSnapshotsSize_Call{Call: _e.mock.On("GetTotalSnapshotsSize", ctx)} | |||
| 263 | + | } | |||
| 264 | + | ||||
| 265 | + | func (_c *MockSessionStateRepository_GetTotalSnapshotsSize_Call) Run(run func(ctx context.Context)) *MockSessionStateRepository_GetTotalSnapshotsSize_Call { | |||
| 266 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 267 | + | var arg0 context.Context | |||
| 268 | + | if args[0] != nil { | |||
| 269 | + | arg0 = args[0].(context.Context) | |||
| 270 | + | } | |||
| 271 | + | run( | |||
| 272 | + | arg0, | |||
| 273 | + | ) | |||
| 274 | + | }) | |||
| 275 | + | return _c | |||
| 276 | + | } | |||
| 277 | + | ||||
| 278 | + | func (_c *MockSessionStateRepository_GetTotalSnapshotsSize_Call) Return(n int64, err error) *MockSessionStateRepository_GetTotalSnapshotsSize_Call { | |||
| 279 | + | _c.Call.Return(n, err) | |||
| 280 | + | return _c | |||
| 281 | + | } | |||
| 282 | + | ||||
| 283 | + | func (_c *MockSessionStateRepository_GetTotalSnapshotsSize_Call) RunAndReturn(run func(ctx context.Context) (int64, error)) *MockSessionStateRepository_GetTotalSnapshotsSize_Call { | |||
| 284 | + | _c.Call.Return(run) | |||
| 285 | + | return _c | |||
| 286 | + | } | |||
| 287 | + | ||||
| 288 | + | // SaveSnapshot provides a mock function for the type MockSessionStateRepository | |||
| 289 | + | func (_mock *MockSessionStateRepository) SaveSnapshot(ctx context.Context, state *entity.SessionState) error { | |||
| 290 | + | ret := _mock.Called(ctx, state) | |||
| 291 | + | ||||
| 292 | + | if len(ret) == 0 { | |||
| 293 | + | panic("no return value specified for SaveSnapshot") | |||
| 294 | + | } | |||
| 295 | + | ||||
| 296 | + | var r0 error | |||
| 297 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.SessionState) error); ok { | |||
| 298 | + | r0 = returnFunc(ctx, state) | |||
| 299 | + | } else { | |||
| 300 | + | r0 = ret.Error(0) | |||
| 301 | + | } | |||
| 302 | + | return r0 | |||
| 303 | + | } | |||
| 304 | + | ||||
| 305 | + | // MockSessionStateRepository_SaveSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveSnapshot' | |||
| 306 | + | type MockSessionStateRepository_SaveSnapshot_Call struct { | |||
| 307 | + | *mock.Call | |||
| 308 | + | } | |||
| 309 | + | ||||
| 310 | + | // SaveSnapshot is a helper method to define mock.On call | |||
| 311 | + | // - ctx context.Context | |||
| 312 | + | // - state *entity.SessionState | |||
| 313 | + | func (_e *MockSessionStateRepository_Expecter) SaveSnapshot(ctx any, state any) *MockSessionStateRepository_SaveSnapshot_Call { | |||
| 314 | + | return &MockSessionStateRepository_SaveSnapshot_Call{Call: _e.mock.On("SaveSnapshot", ctx, state)} | |||
| 315 | + | } | |||
| 316 | + | ||||
| 317 | + | func (_c *MockSessionStateRepository_SaveSnapshot_Call) Run(run func(ctx context.Context, state *entity.SessionState)) *MockSessionStateRepository_SaveSnapshot_Call { | |||
| 318 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 319 | + | var arg0 context.Context | |||
| 320 | + | if args[0] != nil { | |||
| 321 | + | arg0 = args[0].(context.Context) | |||
| 322 | + | } | |||
| 323 | + | var arg1 *entity.SessionState | |||
| 324 | + | if args[1] != nil { | |||
| 325 | + | arg1 = args[1].(*entity.SessionState) | |||
| 326 | + | } | |||
| 327 | + | run( | |||
| 328 | + | arg0, | |||
| 329 | + | arg1, | |||
| 330 | + | ) | |||
| 331 | + | }) | |||
| 332 | + | return _c | |||
| 333 | + | } | |||
| 334 | + | ||||
| 335 | + | func (_c *MockSessionStateRepository_SaveSnapshot_Call) Return(err error) *MockSessionStateRepository_SaveSnapshot_Call { | |||
| 336 | + | _c.Call.Return(err) | |||
| 337 | + | return _c | |||
| 338 | + | } | |||
| 339 | + | ||||
| 340 | + | func (_c *MockSessionStateRepository_SaveSnapshot_Call) RunAndReturn(run func(ctx context.Context, state *entity.SessionState) error) *MockSessionStateRepository_SaveSnapshot_Call { | |||
| 341 | + | _c.Call.Return(run) | |||
| 342 | + | return _c | |||
| 343 | + | } | |||
A internal/domain/repository/mocks/zoom.go +283 -0
| @@ -0,0 +1,283 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "context" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 11 | + | mock "github.com/stretchr/testify/mock" | |||
| 12 | + | ) | |||
| 13 | + | ||||
| 14 | + | // NewMockZoomRepository creates a new instance of MockZoomRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | + | // The first argument is typically a *testing.T value. | |||
| 16 | + | func NewMockZoomRepository(t interface { | |||
| 17 | + | mock.TestingT | |||
| 18 | + | Cleanup(func()) | |||
| 19 | + | }) *MockZoomRepository { | |||
| 20 | + | mock := &MockZoomRepository{} | |||
| 21 | + | mock.Mock.Test(t) | |||
| 22 | + | ||||
| 23 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | + | ||||
| 25 | + | return mock | |||
| 26 | + | } | |||
| 27 | + | ||||
| 28 | + | // MockZoomRepository is an autogenerated mock type for the ZoomRepository type | |||
| 29 | + | type MockZoomRepository struct { | |||
| 30 | + | mock.Mock | |||
| 31 | + | } | |||
| 32 | + | ||||
| 33 | + | type MockZoomRepository_Expecter struct { | |||
| 34 | + | mock *mock.Mock | |||
| 35 | + | } | |||
| 36 | + | ||||
| 37 | + | func (_m *MockZoomRepository) EXPECT() *MockZoomRepository_Expecter { | |||
| 38 | + | return &MockZoomRepository_Expecter{mock: &_m.Mock} | |||
| 39 | + | } | |||
| 40 | + | ||||
| 41 | + | // Delete provides a mock function for the type MockZoomRepository | |||
| 42 | + | func (_mock *MockZoomRepository) Delete(ctx context.Context, domain string) error { | |||
| 43 | + | ret := _mock.Called(ctx, domain) | |||
| 44 | + | ||||
| 45 | + | if len(ret) == 0 { | |||
| 46 | + | panic("no return value specified for Delete") | |||
| 47 | + | } | |||
| 48 | + | ||||
| 49 | + | var r0 error | |||
| 50 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |||
| 51 | + | r0 = returnFunc(ctx, domain) | |||
| 52 | + | } else { | |||
| 53 | + | r0 = ret.Error(0) | |||
| 54 | + | } | |||
| 55 | + | return r0 | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | // MockZoomRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' | |||
| 59 | + | type MockZoomRepository_Delete_Call struct { | |||
| 60 | + | *mock.Call | |||
| 61 | + | } | |||
| 62 | + | ||||
| 63 | + | // Delete is a helper method to define mock.On call | |||
| 64 | + | // - ctx context.Context | |||
| 65 | + | // - domain string | |||
| 66 | + | func (_e *MockZoomRepository_Expecter) Delete(ctx any, domain any) *MockZoomRepository_Delete_Call { | |||
| 67 | + | return &MockZoomRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, domain)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockZoomRepository_Delete_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Delete_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 context.Context | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(context.Context) | |||
| 75 | + | } | |||
| 76 | + | var arg1 string | |||
| 77 | + | if args[1] != nil { | |||
| 78 | + | arg1 = args[1].(string) | |||
| 79 | + | } | |||
| 80 | + | run( | |||
| 81 | + | arg0, | |||
| 82 | + | arg1, | |||
| 83 | + | ) | |||
| 84 | + | }) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockZoomRepository_Delete_Call) Return(err error) *MockZoomRepository_Delete_Call { | |||
| 89 | + | _c.Call.Return(err) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
| 92 | + | ||||
| 93 | + | func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockZoomRepository_Delete_Call { | |||
| 94 | + | _c.Call.Return(run) | |||
| 95 | + | return _c | |||
| 96 | + | } | |||
| 97 | + | ||||
| 98 | + | // Get provides a mock function for the type MockZoomRepository | |||
| 99 | + | func (_mock *MockZoomRepository) Get(ctx context.Context, domain string) (*entity.ZoomLevel, error) { | |||
| 100 | + | ret := _mock.Called(ctx, domain) | |||
| 101 | + | ||||
| 102 | + | if len(ret) == 0 { | |||
| 103 | + | panic("no return value specified for Get") | |||
| 104 | + | } | |||
| 105 | + | ||||
| 106 | + | var r0 *entity.ZoomLevel | |||
| 107 | + | var r1 error | |||
| 108 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok { | |||
| 109 | + | return returnFunc(ctx, domain) | |||
| 110 | + | } | |||
| 111 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok { | |||
| 112 | + | r0 = returnFunc(ctx, domain) | |||
| 113 | + | } else { | |||
| 114 | + | if ret.Get(0) != nil { | |||
| 115 | + | r0 = ret.Get(0).(*entity.ZoomLevel) | |||
| 116 | + | } | |||
| 117 | + | } | |||
| 118 | + | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 119 | + | r1 = returnFunc(ctx, domain) | |||
| 120 | + | } else { | |||
| 121 | + | r1 = ret.Error(1) | |||
| 122 | + | } | |||
| 123 | + | return r0, r1 | |||
| 124 | + | } | |||
| 125 | + | ||||
| 126 | + | // MockZoomRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' | |||
| 127 | + | type MockZoomRepository_Get_Call struct { | |||
| 128 | + | *mock.Call | |||
| 129 | + | } | |||
| 130 | + | ||||
| 131 | + | // Get is a helper method to define mock.On call | |||
| 132 | + | // - ctx context.Context | |||
| 133 | + | // - domain string | |||
| 134 | + | func (_e *MockZoomRepository_Expecter) Get(ctx any, domain any) *MockZoomRepository_Get_Call { | |||
| 135 | + | return &MockZoomRepository_Get_Call{Call: _e.mock.On("Get", ctx, domain)} | |||
| 136 | + | } | |||
| 137 | + | ||||
| 138 | + | func (_c *MockZoomRepository_Get_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Get_Call { | |||
| 139 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 140 | + | var arg0 context.Context | |||
| 141 | + | if args[0] != nil { | |||
| 142 | + | arg0 = args[0].(context.Context) | |||
| 143 | + | } | |||
| 144 | + | var arg1 string | |||
| 145 | + | if args[1] != nil { | |||
| 146 | + | arg1 = args[1].(string) | |||
| 147 | + | } | |||
| 148 | + | run( | |||
| 149 | + | arg0, | |||
| 150 | + | arg1, | |||
| 151 | + | ) | |||
| 152 | + | }) | |||
| 153 | + | return _c | |||
| 154 | + | } | |||
| 155 | + | ||||
| 156 | + | func (_c *MockZoomRepository_Get_Call) Return(zoomLevel *entity.ZoomLevel, err error) *MockZoomRepository_Get_Call { | |||
| 157 | + | _c.Call.Return(zoomLevel, err) | |||
| 158 | + | return _c | |||
| 159 | + | } | |||
| 160 | + | ||||
| 161 | + | func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call { | |||
| 162 | + | _c.Call.Return(run) | |||
| 163 | + | return _c | |||
| 164 | + | } | |||
| 165 | + | ||||
| 166 | + | // GetAll provides a mock function for the type MockZoomRepository | |||
| 167 | + | func (_mock *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLevel, error) { | |||
| 168 | + | ret := _mock.Called(ctx) | |||
| 169 | + | ||||
| 170 | + | if len(ret) == 0 { | |||
| 171 | + | panic("no return value specified for GetAll") | |||
| 172 | + | } | |||
| 173 | + | ||||
| 174 | + | var r0 []*entity.ZoomLevel | |||
| 175 | + | var r1 error | |||
| 176 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok { | |||
| 177 | + | return returnFunc(ctx) | |||
| 178 | + | } | |||
| 179 | + | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok { | |||
| 180 | + | r0 = returnFunc(ctx) | |||
| 181 | + | } else { | |||
| 182 | + | if ret.Get(0) != nil { | |||
| 183 | + | r0 = ret.Get(0).([]*entity.ZoomLevel) | |||
| 184 | + | } | |||
| 185 | + | } | |||
| 186 | + | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |||
| 187 | + | r1 = returnFunc(ctx) | |||
| 188 | + | } else { | |||
| 189 | + | r1 = ret.Error(1) | |||
| 190 | + | } | |||
| 191 | + | return r0, r1 | |||
| 192 | + | } | |||
| 193 | + | ||||
| 194 | + | // MockZoomRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' | |||
| 195 | + | type MockZoomRepository_GetAll_Call struct { | |||
| 196 | + | *mock.Call | |||
| 197 | + | } | |||
| 198 | + | ||||
| 199 | + | // GetAll is a helper method to define mock.On call | |||
| 200 | + | // - ctx context.Context | |||
| 201 | + | func (_e *MockZoomRepository_Expecter) GetAll(ctx any) *MockZoomRepository_GetAll_Call { | |||
| 202 | + | return &MockZoomRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} | |||
| 203 | + | } | |||
| 204 | + | ||||
| 205 | + | func (_c *MockZoomRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockZoomRepository_GetAll_Call { | |||
| 206 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 207 | + | var arg0 context.Context | |||
| 208 | + | if args[0] != nil { | |||
| 209 | + | arg0 = args[0].(context.Context) | |||
| 210 | + | } | |||
| 211 | + | run( | |||
| 212 | + | arg0, | |||
| 213 | + | ) | |||
| 214 | + | }) | |||
| 215 | + | return _c | |||
| 216 | + | } | |||
| 217 | + | ||||
| 218 | + | func (_c *MockZoomRepository_GetAll_Call) Return(zoomLevels []*entity.ZoomLevel, err error) *MockZoomRepository_GetAll_Call { | |||
| 219 | + | _c.Call.Return(zoomLevels, err) | |||
| 220 | + | return _c | |||
| 221 | + | } | |||
| 222 | + | ||||
| 223 | + | func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call { | |||
| 224 | + | _c.Call.Return(run) | |||
| 225 | + | return _c | |||
| 226 | + | } | |||
| 227 | + | ||||
| 228 | + | // Set provides a mock function for the type MockZoomRepository | |||
| 229 | + | func (_mock *MockZoomRepository) Set(ctx context.Context, level *entity.ZoomLevel) error { | |||
| 230 | + | ret := _mock.Called(ctx, level) | |||
| 231 | + | ||||
| 232 | + | if len(ret) == 0 { | |||
| 233 | + | panic("no return value specified for Set") | |||
| 234 | + | } | |||
| 235 | + | ||||
| 236 | + | var r0 error | |||
| 237 | + | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok { | |||
| 238 | + | r0 = returnFunc(ctx, level) | |||
| 239 | + | } else { | |||
| 240 | + | r0 = ret.Error(0) | |||
| 241 | + | } | |||
| 242 | + | return r0 | |||
| 243 | + | } | |||
| 244 | + | ||||
| 245 | + | // MockZoomRepository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' | |||
| 246 | + | type MockZoomRepository_Set_Call struct { | |||
| 247 | + | *mock.Call | |||
| 248 | + | } | |||
| 249 | + | ||||
| 250 | + | // Set is a helper method to define mock.On call | |||
| 251 | + | // - ctx context.Context | |||
| 252 | + | // - level *entity.ZoomLevel | |||
| 253 | + | func (_e *MockZoomRepository_Expecter) Set(ctx any, level any) *MockZoomRepository_Set_Call { | |||
| 254 | + | return &MockZoomRepository_Set_Call{Call: _e.mock.On("Set", ctx, level)} | |||
| 255 | + | } | |||
| 256 | + | ||||
| 257 | + | func (_c *MockZoomRepository_Set_Call) Run(run func(ctx context.Context, level *entity.ZoomLevel)) *MockZoomRepository_Set_Call { | |||
| 258 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 259 | + | var arg0 context.Context | |||
| 260 | + | if args[0] != nil { | |||
| 261 | + | arg0 = args[0].(context.Context) | |||
| 262 | + | } | |||
| 263 | + | var arg1 *entity.ZoomLevel | |||
| 264 | + | if args[1] != nil { | |||
| 265 | + | arg1 = args[1].(*entity.ZoomLevel) | |||
| 266 | + | } | |||
| 267 | + | run( | |||
| 268 | + | arg0, | |||
| 269 | + | arg1, | |||
| 270 | + | ) | |||
| 271 | + | }) | |||
| 272 | + | return _c | |||
| 273 | + | } | |||
| 274 | + | ||||
| 275 | + | func (_c *MockZoomRepository_Set_Call) Return(err error) *MockZoomRepository_Set_Call { | |||
| 276 | + | _c.Call.Return(err) | |||
| 277 | + | return _c | |||
| 278 | + | } | |||
| 279 | + | ||||
| 280 | + | func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(ctx context.Context, level *entity.ZoomLevel) error) *MockZoomRepository_Set_Call { | |||
| 281 | + | _c.Call.Return(run) | |||
| 282 | + | return _c | |||
| 283 | + | } | |||
R internal/infrastructure/filtering/mocks/mocks.go → internal/infrastructure/filtering/mocks/interfaces.go +9 -9 renamed, 95% similar
| @@ -77,7 +77,7 @@ type MockFilterStore_Compile_Call struct { | |||||
| 77 | // - ctx context.Context | 77 | // - ctx context.Context | ||
| 78 | // - identifier string | 78 | // - identifier string | ||
| 79 | // - jsonPath string | 79 | // - jsonPath string | ||
| 80 | - | func (_e *MockFilterStore_Expecter) Compile(ctx interface{}, identifier interface{}, jsonPath interface{}) *MockFilterStore_Compile_Call { | 80 | + | func (_e *MockFilterStore_Expecter) Compile(ctx any, identifier any, jsonPath any) *MockFilterStore_Compile_Call { |
| 81 | return &MockFilterStore_Compile_Call{Call: _e.mock.On("Compile", ctx, identifier, jsonPath)} | 81 | return &MockFilterStore_Compile_Call{Call: _e.mock.On("Compile", ctx, identifier, jsonPath)} | ||
| 82 | } | 82 | } | ||
| 83 | 83 | ||||
| @@ -149,7 +149,7 @@ type MockFilterStore_FetchIdentifiers_Call struct { | |||||
| 149 | 149 | ||||
| 150 | // FetchIdentifiers is a helper method to define mock.On call | 150 | // FetchIdentifiers is a helper method to define mock.On call | ||
| 151 | // - ctx context.Context | 151 | // - ctx context.Context | ||
| 152 | - | func (_e *MockFilterStore_Expecter) FetchIdentifiers(ctx interface{}) *MockFilterStore_FetchIdentifiers_Call { | 152 | + | func (_e *MockFilterStore_Expecter) FetchIdentifiers(ctx any) *MockFilterStore_FetchIdentifiers_Call { |
| 153 | return &MockFilterStore_FetchIdentifiers_Call{Call: _e.mock.On("FetchIdentifiers", ctx)} | 153 | return &MockFilterStore_FetchIdentifiers_Call{Call: _e.mock.On("FetchIdentifiers", ctx)} | ||
| 154 | } | 154 | } | ||
| 155 | 155 | ||||
| @@ -201,7 +201,7 @@ type MockFilterStore_HasCompiledFilter_Call struct { | |||||
| 201 | // HasCompiledFilter is a helper method to define mock.On call | 201 | // HasCompiledFilter is a helper method to define mock.On call | ||
| 202 | // - ctx context.Context | 202 | // - ctx context.Context | ||
| 203 | // - identifier string | 203 | // - identifier string | ||
| 204 | - | func (_e *MockFilterStore_Expecter) HasCompiledFilter(ctx interface{}, identifier interface{}) *MockFilterStore_HasCompiledFilter_Call { | 204 | + | func (_e *MockFilterStore_Expecter) HasCompiledFilter(ctx any, identifier any) *MockFilterStore_HasCompiledFilter_Call { |
| 205 | return &MockFilterStore_HasCompiledFilter_Call{Call: _e.mock.On("HasCompiledFilter", ctx, identifier)} | 205 | return &MockFilterStore_HasCompiledFilter_Call{Call: _e.mock.On("HasCompiledFilter", ctx, identifier)} | ||
| 206 | } | 206 | } | ||
| 207 | 207 | ||||
| @@ -269,7 +269,7 @@ type MockFilterStore_Load_Call struct { | |||||
| 269 | // Load is a helper method to define mock.On call | 269 | // Load is a helper method to define mock.On call | ||
| 270 | // - ctx context.Context | 270 | // - ctx context.Context | ||
| 271 | // - identifier string | 271 | // - identifier string | ||
| 272 | - | func (_e *MockFilterStore_Expecter) Load(ctx interface{}, identifier interface{}) *MockFilterStore_Load_Call { | 272 | + | func (_e *MockFilterStore_Expecter) Load(ctx any, identifier any) *MockFilterStore_Load_Call { |
| 273 | return &MockFilterStore_Load_Call{Call: _e.mock.On("Load", ctx, identifier)} | 273 | return &MockFilterStore_Load_Call{Call: _e.mock.On("Load", ctx, identifier)} | ||
| 274 | } | 274 | } | ||
| 275 | 275 | ||||
| @@ -370,7 +370,7 @@ type MockFilterStore_Remove_Call struct { | |||||
| 370 | // Remove is a helper method to define mock.On call | 370 | // Remove is a helper method to define mock.On call | ||
| 371 | // - ctx context.Context | 371 | // - ctx context.Context | ||
| 372 | // - identifier string | 372 | // - identifier string | ||
| 373 | - | func (_e *MockFilterStore_Expecter) Remove(ctx interface{}, identifier interface{}) *MockFilterStore_Remove_Call { | 373 | + | func (_e *MockFilterStore_Expecter) Remove(ctx any, identifier any) *MockFilterStore_Remove_Call { |
| 374 | return &MockFilterStore_Remove_Call{Call: _e.mock.On("Remove", ctx, identifier)} | 374 | return &MockFilterStore_Remove_Call{Call: _e.mock.On("Remove", ctx, identifier)} | ||
| 375 | } | 375 | } | ||
| 376 | 376 | ||||
| @@ -509,7 +509,7 @@ type MockFilterDownloader_DownloadFilters_Call struct { | |||||
| 509 | // DownloadFilters is a helper method to define mock.On call | 509 | // DownloadFilters is a helper method to define mock.On call | ||
| 510 | // - ctx context.Context | 510 | // - ctx context.Context | ||
| 511 | // - onProgress func(filtering.DownloadProgress) | 511 | // - onProgress func(filtering.DownloadProgress) | ||
| 512 | - | func (_e *MockFilterDownloader_Expecter) DownloadFilters(ctx interface{}, onProgress interface{}) *MockFilterDownloader_DownloadFilters_Call { | 512 | + | func (_e *MockFilterDownloader_Expecter) DownloadFilters(ctx any, onProgress any) *MockFilterDownloader_DownloadFilters_Call { |
| 513 | return &MockFilterDownloader_DownloadFilters_Call{Call: _e.mock.On("DownloadFilters", ctx, onProgress)} | 513 | return &MockFilterDownloader_DownloadFilters_Call{Call: _e.mock.On("DownloadFilters", ctx, onProgress)} | ||
| 514 | } | 514 | } | ||
| 515 | 515 | ||||
| @@ -576,7 +576,7 @@ type MockFilterDownloader_FetchManifest_Call struct { | |||||
| 576 | 576 | ||||
| 577 | // FetchManifest is a helper method to define mock.On call | 577 | // FetchManifest is a helper method to define mock.On call | ||
| 578 | // - ctx context.Context | 578 | // - ctx context.Context | ||
| 579 | - | func (_e *MockFilterDownloader_Expecter) FetchManifest(ctx interface{}) *MockFilterDownloader_FetchManifest_Call { | 579 | + | func (_e *MockFilterDownloader_Expecter) FetchManifest(ctx any) *MockFilterDownloader_FetchManifest_Call { |
| 580 | return &MockFilterDownloader_FetchManifest_Call{Call: _e.mock.On("FetchManifest", ctx)} | 580 | return &MockFilterDownloader_FetchManifest_Call{Call: _e.mock.On("FetchManifest", ctx)} | ||
| 581 | } | 581 | } | ||
| 582 | 582 | ||||
| @@ -772,7 +772,7 @@ type MockFilterDownloader_IsCacheStale_Call struct { | |||||
| 772 | 772 | ||||
| 773 | // IsCacheStale is a helper method to define mock.On call | 773 | // IsCacheStale is a helper method to define mock.On call | ||
| 774 | // - maxAge time.Duration | 774 | // - maxAge time.Duration | ||
| 775 | - | func (_e *MockFilterDownloader_Expecter) IsCacheStale(maxAge interface{}) *MockFilterDownloader_IsCacheStale_Call { | 775 | + | func (_e *MockFilterDownloader_Expecter) IsCacheStale(maxAge any) *MockFilterDownloader_IsCacheStale_Call { |
| 776 | return &MockFilterDownloader_IsCacheStale_Call{Call: _e.mock.On("IsCacheStale", maxAge)} | 776 | return &MockFilterDownloader_IsCacheStale_Call{Call: _e.mock.On("IsCacheStale", maxAge)} | ||
| 777 | } | 777 | } | ||
| 778 | 778 | ||||
| @@ -832,7 +832,7 @@ type MockFilterDownloader_NeedsUpdate_Call struct { | |||||
| 832 | 832 | ||||
| 833 | // NeedsUpdate is a helper method to define mock.On call | 833 | // NeedsUpdate is a helper method to define mock.On call | ||
| 834 | // - ctx context.Context | 834 | // - ctx context.Context | ||
| 835 | - | func (_e *MockFilterDownloader_Expecter) NeedsUpdate(ctx interface{}) *MockFilterDownloader_NeedsUpdate_Call { | 835 | + | func (_e *MockFilterDownloader_Expecter) NeedsUpdate(ctx any) *MockFilterDownloader_NeedsUpdate_Call { |
| 836 | return &MockFilterDownloader_NeedsUpdate_Call{Call: _e.mock.On("NeedsUpdate", ctx)} | 836 | return &MockFilterDownloader_NeedsUpdate_Call{Call: _e.mock.On("NeedsUpdate", ctx)} | ||
| 837 | } | 837 | } | ||
| 838 | 838 | ||||
A internal/ui/layout/mocks/tree.go +91 -0
| @@ -0,0 +1,91 @@ | |||||
| 1 | + | // Code generated by mockery; DO NOT EDIT. | |||
| 2 | + | // github.com/vektra/mockery | |||
| 3 | + | // template: testify | |||
| 4 | + | ||||
| 5 | + | package mocks | |||
| 6 | + | ||||
| 7 | + | import ( | |||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 9 | + | "github.com/bnema/dumber/internal/ui/layout" | |||
| 10 | + | mock "github.com/stretchr/testify/mock" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // NewMockPaneViewFactory creates a new instance of MockPaneViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 14 | + | // The first argument is typically a *testing.T value. | |||
| 15 | + | func NewMockPaneViewFactory(t interface { | |||
| 16 | + | mock.TestingT | |||
| 17 | + | Cleanup(func()) | |||
| 18 | + | }) *MockPaneViewFactory { | |||
| 19 | + | mock := &MockPaneViewFactory{} | |||
| 20 | + | mock.Mock.Test(t) | |||
| 21 | + | ||||
| 22 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 23 | + | ||||
| 24 | + | return mock | |||
| 25 | + | } | |||
| 26 | + | ||||
| 27 | + | // MockPaneViewFactory is an autogenerated mock type for the PaneViewFactory type | |||
| 28 | + | type MockPaneViewFactory struct { | |||
| 29 | + | mock.Mock | |||
| 30 | + | } | |||
| 31 | + | ||||
| 32 | + | type MockPaneViewFactory_Expecter struct { | |||
| 33 | + | mock *mock.Mock | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | func (_m *MockPaneViewFactory) EXPECT() *MockPaneViewFactory_Expecter { | |||
| 37 | + | return &MockPaneViewFactory_Expecter{mock: &_m.Mock} | |||
| 38 | + | } | |||
| 39 | + | ||||
| 40 | + | // CreatePaneView provides a mock function for the type MockPaneViewFactory | |||
| 41 | + | func (_mock *MockPaneViewFactory) CreatePaneView(node *entity.PaneNode) layout.Widget { | |||
| 42 | + | ret := _mock.Called(node) | |||
| 43 | + | ||||
| 44 | + | if len(ret) == 0 { | |||
| 45 | + | panic("no return value specified for CreatePaneView") | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | var r0 layout.Widget | |||
| 49 | + | if returnFunc, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok { | |||
| 50 | + | r0 = returnFunc(node) | |||
| 51 | + | } else { | |||
| 52 | + | if ret.Get(0) != nil { | |||
| 53 | + | r0 = ret.Get(0).(layout.Widget) | |||
| 54 | + | } | |||
| 55 | + | } | |||
| 56 | + | return r0 | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | // MockPaneViewFactory_CreatePaneView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePaneView' | |||
| 60 | + | type MockPaneViewFactory_CreatePaneView_Call struct { | |||
| 61 | + | *mock.Call | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | // CreatePaneView is a helper method to define mock.On call | |||
| 65 | + | // - node *entity.PaneNode | |||
| 66 | + | func (_e *MockPaneViewFactory_Expecter) CreatePaneView(node any) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 67 | + | return &MockPaneViewFactory_CreatePaneView_Call{Call: _e.mock.On("CreatePaneView", node)} | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (_c *MockPaneViewFactory_CreatePaneView_Call) Run(run func(node *entity.PaneNode)) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 71 | + | _c.Call.Run(func(args mock.Arguments) { | |||
| 72 | + | var arg0 *entity.PaneNode | |||
| 73 | + | if args[0] != nil { | |||
| 74 | + | arg0 = args[0].(*entity.PaneNode) | |||
| 75 | + | } | |||
| 76 | + | run( | |||
| 77 | + | arg0, | |||
| 78 | + | ) | |||
| 79 | + | }) | |||
| 80 | + | return _c | |||
| 81 | + | } | |||
| 82 | + | ||||
| 83 | + | func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(widget layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 84 | + | _c.Call.Return(widget) | |||
| 85 | + | return _c | |||
| 86 | + | } | |||
| 87 | + | ||||
| 88 | + | func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(node *entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 89 | + | _c.Call.Return(run) | |||
| 90 | + | return _c | |||
| 91 | + | } | |||
R internal/ui/layout/mocks/mocks.go → internal/ui/layout/mocks/widgets.go +190 -271 renamed, 94% similar
| @@ -5,92 +5,11 @@ | |||||
| 5 | package mocks | 5 | package mocks | ||
| 6 | 6 | ||||
| 7 | import ( | 7 | import ( | ||
| 8 | - | "github.com/bnema/dumber/internal/domain/entity" | |||
| 9 | "github.com/bnema/dumber/internal/ui/layout" | 8 | "github.com/bnema/dumber/internal/ui/layout" | ||
| 10 | "github.com/bnema/puregotk/v4/gtk" | 9 | "github.com/bnema/puregotk/v4/gtk" | ||
| 11 | mock "github.com/stretchr/testify/mock" | 10 | mock "github.com/stretchr/testify/mock" | ||
| 12 | ) | 11 | ) | ||
| 13 | 12 | ||||
| 14 | - | // NewMockPaneViewFactory creates a new instance of MockPaneViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |||
| 15 | - | // The first argument is typically a *testing.T value. | |||
| 16 | - | func NewMockPaneViewFactory(t interface { | |||
| 17 | - | mock.TestingT | |||
| 18 | - | Cleanup(func()) | |||
| 19 | - | }) *MockPaneViewFactory { | |||
| 20 | - | mock := &MockPaneViewFactory{} | |||
| 21 | - | mock.Mock.Test(t) | |||
| 22 | - | ||||
| 23 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |||
| 24 | - | ||||
| 25 | - | return mock | |||
| 26 | - | } | |||
| 27 | - | ||||
| 28 | - | // MockPaneViewFactory is an autogenerated mock type for the PaneViewFactory type | |||
| 29 | - | type MockPaneViewFactory struct { | |||
| 30 | - | mock.Mock | |||
| 31 | - | } | |||
| 32 | - | ||||
| 33 | - | type MockPaneViewFactory_Expecter struct { | |||
| 34 | - | mock *mock.Mock | |||
| 35 | - | } | |||
| 36 | - | ||||
| 37 | - | func (_m *MockPaneViewFactory) EXPECT() *MockPaneViewFactory_Expecter { | |||
| 38 | - | return &MockPaneViewFactory_Expecter{mock: &_m.Mock} | |||
| 39 | - | } | |||
| 40 | - | ||||
| 41 | - | // CreatePaneView provides a mock function for the type MockPaneViewFactory | |||
| 42 | - | func (_mock *MockPaneViewFactory) CreatePaneView(node *entity.PaneNode) layout.Widget { | |||
| 43 | - | ret := _mock.Called(node) | |||
| 44 | - | ||||
| 45 | - | if len(ret) == 0 { | |||
| 46 | - | panic("no return value specified for CreatePaneView") | |||
| 47 | - | } | |||
| 48 | - | ||||
| 49 | - | var r0 layout.Widget | |||
| 50 | - | if returnFunc, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok { | |||
| 51 | - | r0 = returnFunc(node) | |||
| 52 | - | } else { | |||
| 53 | - | if ret.Get(0) != nil { | |||
| 54 | - | r0 = ret.Get(0).(layout.Widget) | |||
| 55 | - | } | |||
| 56 | - | } | |||
| 57 | - | return r0 | |||
| 58 | - | } | |||
| 59 | - | ||||
| 60 | - | // MockPaneViewFactory_CreatePaneView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePaneView' | |||
| 61 | - | type MockPaneViewFactory_CreatePaneView_Call struct { | |||
| 62 | - | *mock.Call | |||
| 63 | - | } | |||
| 64 | - | ||||
| 65 | - | // CreatePaneView is a helper method to define mock.On call | |||
| 66 | - | // - node *entity.PaneNode | |||
| 67 | - | func (_e *MockPaneViewFactory_Expecter) CreatePaneView(node interface{}) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 68 | - | return &MockPaneViewFactory_CreatePaneView_Call{Call: _e.mock.On("CreatePaneView", node)} | |||
| 69 | - | } | |||
| 70 | - | ||||
| 71 | - | func (_c *MockPaneViewFactory_CreatePaneView_Call) Run(run func(node *entity.PaneNode)) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 72 | - | _c.Call.Run(func(args mock.Arguments) { | |||
| 73 | - | var arg0 *entity.PaneNode | |||
| 74 | - | if args[0] != nil { | |||
| 75 | - | arg0 = args[0].(*entity.PaneNode) | |||
| 76 | - | } | |||
| 77 | - | run( | |||
| 78 | - | arg0, | |||
| 79 | - | ) | |||
| 80 | - | }) | |||
| 81 | - | return _c | |||
| 82 | - | } | |||
| 83 | - | ||||
| 84 | - | func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(widget layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 85 | - | _c.Call.Return(widget) | |||
| 86 | - | return _c | |||
| 87 | - | } | |||
| 88 | - | ||||
| 89 | - | func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(node *entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |||
| 90 | - | _c.Call.Return(run) | |||
| 91 | - | return _c | |||
| 92 | - | } | |||
| 93 | - | ||||
| 94 | // 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. | 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. | ||
| 95 | // The first argument is typically a *testing.T value. | 14 | // The first argument is typically a *testing.T value. | ||
| 96 | func NewMockWidget(t interface { | 15 | func NewMockWidget(t interface { | ||
| @@ -131,7 +50,7 @@ type MockWidget_AddController_Call struct { | |||||
| 131 | 50 | ||||
| 132 | // AddController is a helper method to define mock.On call | 51 | // AddController is a helper method to define mock.On call | ||
| 133 | // - controller *gtk.EventController | 52 | // - controller *gtk.EventController | ||
| 134 | - | func (_e *MockWidget_Expecter) AddController(controller interface{}) *MockWidget_AddController_Call { | 53 | + | func (_e *MockWidget_Expecter) AddController(controller any) *MockWidget_AddController_Call { |
| 135 | return &MockWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 54 | return &MockWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 136 | } | 55 | } | ||
| 137 | 56 | ||||
| @@ -171,7 +90,7 @@ type MockWidget_AddCssClass_Call struct { | |||||
| 171 | 90 | ||||
| 172 | // AddCssClass is a helper method to define mock.On call | 91 | // AddCssClass is a helper method to define mock.On call | ||
| 173 | // - cssClass string | 92 | // - cssClass string | ||
| 174 | - | func (_e *MockWidget_Expecter) AddCssClass(cssClass interface{}) *MockWidget_AddCssClass_Call { | 93 | + | func (_e *MockWidget_Expecter) AddCssClass(cssClass any) *MockWidget_AddCssClass_Call { |
| 175 | return &MockWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 94 | return &MockWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 176 | } | 95 | } | ||
| 177 | 96 | ||||
| @@ -237,7 +156,7 @@ type MockWidget_ComputePoint_Call struct { | |||||
| 237 | 156 | ||||
| 238 | // ComputePoint is a helper method to define mock.On call | 157 | // ComputePoint is a helper method to define mock.On call | ||
| 239 | // - target layout.Widget | 158 | // - target layout.Widget | ||
| 240 | - | func (_e *MockWidget_Expecter) ComputePoint(target interface{}) *MockWidget_ComputePoint_Call { | 159 | + | func (_e *MockWidget_Expecter) ComputePoint(target any) *MockWidget_ComputePoint_Call { |
| 241 | return &MockWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 160 | return &MockWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 242 | } | 161 | } | ||
| 243 | 162 | ||||
| @@ -600,7 +519,7 @@ type MockWidget_HasCssClass_Call struct { | |||||
| 600 | 519 | ||||
| 601 | // HasCssClass is a helper method to define mock.On call | 520 | // HasCssClass is a helper method to define mock.On call | ||
| 602 | // - cssClass string | 521 | // - cssClass string | ||
| 603 | - | func (_e *MockWidget_Expecter) HasCssClass(cssClass interface{}) *MockWidget_HasCssClass_Call { | 522 | + | func (_e *MockWidget_Expecter) HasCssClass(cssClass any) *MockWidget_HasCssClass_Call { |
| 604 | return &MockWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 523 | return &MockWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 605 | } | 524 | } | ||
| 606 | 525 | ||||
| @@ -761,7 +680,7 @@ type MockWidget_RemoveCssClass_Call struct { | |||||
| 761 | 680 | ||||
| 762 | // RemoveCssClass is a helper method to define mock.On call | 681 | // RemoveCssClass is a helper method to define mock.On call | ||
| 763 | // - cssClass string | 682 | // - cssClass string | ||
| 764 | - | func (_e *MockWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockWidget_RemoveCssClass_Call { | 683 | + | func (_e *MockWidget_Expecter) RemoveCssClass(cssClass any) *MockWidget_RemoveCssClass_Call { |
| 765 | return &MockWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 684 | return &MockWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 766 | } | 685 | } | ||
| 767 | 686 | ||||
| @@ -801,7 +720,7 @@ type MockWidget_SetCanFocus_Call struct { | |||||
| 801 | 720 | ||||
| 802 | // SetCanFocus is a helper method to define mock.On call | 721 | // SetCanFocus is a helper method to define mock.On call | ||
| 803 | // - canFocus bool | 722 | // - canFocus bool | ||
| 804 | - | func (_e *MockWidget_Expecter) SetCanFocus(canFocus interface{}) *MockWidget_SetCanFocus_Call { | 723 | + | func (_e *MockWidget_Expecter) SetCanFocus(canFocus any) *MockWidget_SetCanFocus_Call { |
| 805 | return &MockWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 724 | return &MockWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 806 | } | 725 | } | ||
| 807 | 726 | ||||
| @@ -841,7 +760,7 @@ type MockWidget_SetCanTarget_Call struct { | |||||
| 841 | 760 | ||||
| 842 | // SetCanTarget is a helper method to define mock.On call | 761 | // SetCanTarget is a helper method to define mock.On call | ||
| 843 | // - canTarget bool | 762 | // - canTarget bool | ||
| 844 | - | func (_e *MockWidget_Expecter) SetCanTarget(canTarget interface{}) *MockWidget_SetCanTarget_Call { | 763 | + | func (_e *MockWidget_Expecter) SetCanTarget(canTarget any) *MockWidget_SetCanTarget_Call { |
| 845 | return &MockWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 764 | return &MockWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 846 | } | 765 | } | ||
| 847 | 766 | ||||
| @@ -881,7 +800,7 @@ type MockWidget_SetFocusOnClick_Call struct { | |||||
| 881 | 800 | ||||
| 882 | // SetFocusOnClick is a helper method to define mock.On call | 801 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 883 | // - focusOnClick bool | 802 | // - focusOnClick bool | ||
| 884 | - | func (_e *MockWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockWidget_SetFocusOnClick_Call { | 803 | + | func (_e *MockWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockWidget_SetFocusOnClick_Call { |
| 885 | return &MockWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 804 | return &MockWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 886 | } | 805 | } | ||
| 887 | 806 | ||||
| @@ -921,7 +840,7 @@ type MockWidget_SetFocusable_Call struct { | |||||
| 921 | 840 | ||||
| 922 | // SetFocusable is a helper method to define mock.On call | 841 | // SetFocusable is a helper method to define mock.On call | ||
| 923 | // - focusable bool | 842 | // - focusable bool | ||
| 924 | - | func (_e *MockWidget_Expecter) SetFocusable(focusable interface{}) *MockWidget_SetFocusable_Call { | 843 | + | func (_e *MockWidget_Expecter) SetFocusable(focusable any) *MockWidget_SetFocusable_Call { |
| 925 | return &MockWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 844 | return &MockWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 926 | } | 845 | } | ||
| 927 | 846 | ||||
| @@ -961,7 +880,7 @@ type MockWidget_SetHalign_Call struct { | |||||
| 961 | 880 | ||||
| 962 | // SetHalign is a helper method to define mock.On call | 881 | // SetHalign is a helper method to define mock.On call | ||
| 963 | // - align gtk.Align | 882 | // - align gtk.Align | ||
| 964 | - | func (_e *MockWidget_Expecter) SetHalign(align interface{}) *MockWidget_SetHalign_Call { | 883 | + | func (_e *MockWidget_Expecter) SetHalign(align any) *MockWidget_SetHalign_Call { |
| 965 | return &MockWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 884 | return &MockWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 966 | } | 885 | } | ||
| 967 | 886 | ||||
| @@ -1001,7 +920,7 @@ type MockWidget_SetHexpand_Call struct { | |||||
| 1001 | 920 | ||||
| 1002 | // SetHexpand is a helper method to define mock.On call | 921 | // SetHexpand is a helper method to define mock.On call | ||
| 1003 | // - expand bool | 922 | // - expand bool | ||
| 1004 | - | func (_e *MockWidget_Expecter) SetHexpand(expand interface{}) *MockWidget_SetHexpand_Call { | 923 | + | func (_e *MockWidget_Expecter) SetHexpand(expand any) *MockWidget_SetHexpand_Call { |
| 1005 | return &MockWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 924 | return &MockWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 1006 | } | 925 | } | ||
| 1007 | 926 | ||||
| @@ -1041,7 +960,7 @@ type MockWidget_SetOpacity_Call struct { | |||||
| 1041 | 960 | ||||
| 1042 | // SetOpacity is a helper method to define mock.On call | 961 | // SetOpacity is a helper method to define mock.On call | ||
| 1043 | // - opacity float64 | 962 | // - opacity float64 | ||
| 1044 | - | func (_e *MockWidget_Expecter) SetOpacity(opacity interface{}) *MockWidget_SetOpacity_Call { | 963 | + | func (_e *MockWidget_Expecter) SetOpacity(opacity any) *MockWidget_SetOpacity_Call { |
| 1045 | return &MockWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 964 | return &MockWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 1046 | } | 965 | } | ||
| 1047 | 966 | ||||
| @@ -1082,7 +1001,7 @@ type MockWidget_SetSizeRequest_Call struct { | |||||
| 1082 | // SetSizeRequest is a helper method to define mock.On call | 1001 | // SetSizeRequest is a helper method to define mock.On call | ||
| 1083 | // - width int | 1002 | // - width int | ||
| 1084 | // - height int | 1003 | // - height int | ||
| 1085 | - | func (_e *MockWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockWidget_SetSizeRequest_Call { | 1004 | + | func (_e *MockWidget_Expecter) SetSizeRequest(width any, height any) *MockWidget_SetSizeRequest_Call { |
| 1086 | return &MockWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 1005 | return &MockWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 1087 | } | 1006 | } | ||
| 1088 | 1007 | ||||
| @@ -1127,7 +1046,7 @@ type MockWidget_SetValign_Call struct { | |||||
| 1127 | 1046 | ||||
| 1128 | // SetValign is a helper method to define mock.On call | 1047 | // SetValign is a helper method to define mock.On call | ||
| 1129 | // - align gtk.Align | 1048 | // - align gtk.Align | ||
| 1130 | - | func (_e *MockWidget_Expecter) SetValign(align interface{}) *MockWidget_SetValign_Call { | 1049 | + | func (_e *MockWidget_Expecter) SetValign(align any) *MockWidget_SetValign_Call { |
| 1131 | return &MockWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 1050 | return &MockWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 1132 | } | 1051 | } | ||
| 1133 | 1052 | ||||
| @@ -1167,7 +1086,7 @@ type MockWidget_SetVexpand_Call struct { | |||||
| 1167 | 1086 | ||||
| 1168 | // SetVexpand is a helper method to define mock.On call | 1087 | // SetVexpand is a helper method to define mock.On call | ||
| 1169 | // - expand bool | 1088 | // - expand bool | ||
| 1170 | - | func (_e *MockWidget_Expecter) SetVexpand(expand interface{}) *MockWidget_SetVexpand_Call { | 1089 | + | func (_e *MockWidget_Expecter) SetVexpand(expand any) *MockWidget_SetVexpand_Call { |
| 1171 | return &MockWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 1090 | return &MockWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 1172 | } | 1091 | } | ||
| 1173 | 1092 | ||||
| @@ -1207,7 +1126,7 @@ type MockWidget_SetVisible_Call struct { | |||||
| 1207 | 1126 | ||||
| 1208 | // SetVisible is a helper method to define mock.On call | 1127 | // SetVisible is a helper method to define mock.On call | ||
| 1209 | // - visible bool | 1128 | // - visible bool | ||
| 1210 | - | func (_e *MockWidget_Expecter) SetVisible(visible interface{}) *MockWidget_SetVisible_Call { | 1129 | + | func (_e *MockWidget_Expecter) SetVisible(visible any) *MockWidget_SetVisible_Call { |
| 1211 | return &MockWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 1130 | return &MockWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 1212 | } | 1131 | } | ||
| 1213 | 1132 | ||||
| @@ -1340,7 +1259,7 @@ type MockPanedWidget_AddController_Call struct { | |||||
| 1340 | 1259 | ||||
| 1341 | // AddController is a helper method to define mock.On call | 1260 | // AddController is a helper method to define mock.On call | ||
| 1342 | // - controller *gtk.EventController | 1261 | // - controller *gtk.EventController | ||
| 1343 | - | func (_e *MockPanedWidget_Expecter) AddController(controller interface{}) *MockPanedWidget_AddController_Call { | 1262 | + | func (_e *MockPanedWidget_Expecter) AddController(controller any) *MockPanedWidget_AddController_Call { |
| 1344 | return &MockPanedWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 1263 | return &MockPanedWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 1345 | } | 1264 | } | ||
| 1346 | 1265 | ||||
| @@ -1380,7 +1299,7 @@ type MockPanedWidget_AddCssClass_Call struct { | |||||
| 1380 | 1299 | ||||
| 1381 | // AddCssClass is a helper method to define mock.On call | 1300 | // AddCssClass is a helper method to define mock.On call | ||
| 1382 | // - cssClass string | 1301 | // - cssClass string | ||
| 1383 | - | func (_e *MockPanedWidget_Expecter) AddCssClass(cssClass interface{}) *MockPanedWidget_AddCssClass_Call { | 1302 | + | func (_e *MockPanedWidget_Expecter) AddCssClass(cssClass any) *MockPanedWidget_AddCssClass_Call { |
| 1384 | return &MockPanedWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 1303 | return &MockPanedWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 1385 | } | 1304 | } | ||
| 1386 | 1305 | ||||
| @@ -1431,7 +1350,7 @@ type MockPanedWidget_AddTickCallback_Call struct { | |||||
| 1431 | 1350 | ||||
| 1432 | // AddTickCallback is a helper method to define mock.On call | 1351 | // AddTickCallback is a helper method to define mock.On call | ||
| 1433 | // - callback func() bool | 1352 | // - callback func() bool | ||
| 1434 | - | func (_e *MockPanedWidget_Expecter) AddTickCallback(callback interface{}) *MockPanedWidget_AddTickCallback_Call { | 1353 | + | func (_e *MockPanedWidget_Expecter) AddTickCallback(callback any) *MockPanedWidget_AddTickCallback_Call { |
| 1435 | return &MockPanedWidget_AddTickCallback_Call{Call: _e.mock.On("AddTickCallback", callback)} | 1354 | return &MockPanedWidget_AddTickCallback_Call{Call: _e.mock.On("AddTickCallback", callback)} | ||
| 1436 | } | 1355 | } | ||
| 1437 | 1356 | ||||
| @@ -1497,7 +1416,7 @@ type MockPanedWidget_ComputePoint_Call struct { | |||||
| 1497 | 1416 | ||||
| 1498 | // ComputePoint is a helper method to define mock.On call | 1417 | // ComputePoint is a helper method to define mock.On call | ||
| 1499 | // - target layout.Widget | 1418 | // - target layout.Widget | ||
| 1500 | - | func (_e *MockPanedWidget_Expecter) ComputePoint(target interface{}) *MockPanedWidget_ComputePoint_Call { | 1419 | + | func (_e *MockPanedWidget_Expecter) ComputePoint(target any) *MockPanedWidget_ComputePoint_Call { |
| 1501 | return &MockPanedWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 1420 | return &MockPanedWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 1502 | } | 1421 | } | ||
| 1503 | 1422 | ||||
| @@ -1548,7 +1467,7 @@ type MockPanedWidget_ConnectMap_Call struct { | |||||
| 1548 | 1467 | ||||
| 1549 | // ConnectMap is a helper method to define mock.On call | 1468 | // ConnectMap is a helper method to define mock.On call | ||
| 1550 | // - callback func() | 1469 | // - callback func() | ||
| 1551 | - | func (_e *MockPanedWidget_Expecter) ConnectMap(callback interface{}) *MockPanedWidget_ConnectMap_Call { | 1470 | + | func (_e *MockPanedWidget_Expecter) ConnectMap(callback any) *MockPanedWidget_ConnectMap_Call { |
| 1552 | return &MockPanedWidget_ConnectMap_Call{Call: _e.mock.On("ConnectMap", callback)} | 1471 | return &MockPanedWidget_ConnectMap_Call{Call: _e.mock.On("ConnectMap", callback)} | ||
| 1553 | } | 1472 | } | ||
| 1554 | 1473 | ||||
| @@ -1599,7 +1518,7 @@ type MockPanedWidget_ConnectNotifyPosition_Call struct { | |||||
| 1599 | 1518 | ||||
| 1600 | // ConnectNotifyPosition is a helper method to define mock.On call | 1519 | // ConnectNotifyPosition is a helper method to define mock.On call | ||
| 1601 | // - callback func() | 1520 | // - callback func() | ||
| 1602 | - | func (_e *MockPanedWidget_Expecter) ConnectNotifyPosition(callback interface{}) *MockPanedWidget_ConnectNotifyPosition_Call { | 1521 | + | func (_e *MockPanedWidget_Expecter) ConnectNotifyPosition(callback any) *MockPanedWidget_ConnectNotifyPosition_Call { |
| 1603 | return &MockPanedWidget_ConnectNotifyPosition_Call{Call: _e.mock.On("ConnectNotifyPosition", callback)} | 1522 | return &MockPanedWidget_ConnectNotifyPosition_Call{Call: _e.mock.On("ConnectNotifyPosition", callback)} | ||
| 1604 | } | 1523 | } | ||
| 1605 | 1524 | ||||
| @@ -2318,7 +2237,7 @@ type MockPanedWidget_HasCssClass_Call struct { | |||||
| 2318 | 2237 | ||||
| 2319 | // HasCssClass is a helper method to define mock.On call | 2238 | // HasCssClass is a helper method to define mock.On call | ||
| 2320 | // - cssClass string | 2239 | // - cssClass string | ||
| 2321 | - | func (_e *MockPanedWidget_Expecter) HasCssClass(cssClass interface{}) *MockPanedWidget_HasCssClass_Call { | 2240 | + | func (_e *MockPanedWidget_Expecter) HasCssClass(cssClass any) *MockPanedWidget_HasCssClass_Call { |
| 2322 | return &MockPanedWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 2241 | return &MockPanedWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 2323 | } | 2242 | } | ||
| 2324 | 2243 | ||||
| @@ -2479,7 +2398,7 @@ type MockPanedWidget_RemoveCssClass_Call struct { | |||||
| 2479 | 2398 | ||||
| 2480 | // RemoveCssClass is a helper method to define mock.On call | 2399 | // RemoveCssClass is a helper method to define mock.On call | ||
| 2481 | // - cssClass string | 2400 | // - cssClass string | ||
| 2482 | - | func (_e *MockPanedWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockPanedWidget_RemoveCssClass_Call { | 2401 | + | func (_e *MockPanedWidget_Expecter) RemoveCssClass(cssClass any) *MockPanedWidget_RemoveCssClass_Call { |
| 2483 | return &MockPanedWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 2402 | return &MockPanedWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 2484 | } | 2403 | } | ||
| 2485 | 2404 | ||||
| @@ -2519,7 +2438,7 @@ type MockPanedWidget_SetCanFocus_Call struct { | |||||
| 2519 | 2438 | ||||
| 2520 | // SetCanFocus is a helper method to define mock.On call | 2439 | // SetCanFocus is a helper method to define mock.On call | ||
| 2521 | // - canFocus bool | 2440 | // - canFocus bool | ||
| 2522 | - | func (_e *MockPanedWidget_Expecter) SetCanFocus(canFocus interface{}) *MockPanedWidget_SetCanFocus_Call { | 2441 | + | func (_e *MockPanedWidget_Expecter) SetCanFocus(canFocus any) *MockPanedWidget_SetCanFocus_Call { |
| 2523 | return &MockPanedWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 2442 | return &MockPanedWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 2524 | } | 2443 | } | ||
| 2525 | 2444 | ||||
| @@ -2559,7 +2478,7 @@ type MockPanedWidget_SetCanTarget_Call struct { | |||||
| 2559 | 2478 | ||||
| 2560 | // SetCanTarget is a helper method to define mock.On call | 2479 | // SetCanTarget is a helper method to define mock.On call | ||
| 2561 | // - canTarget bool | 2480 | // - canTarget bool | ||
| 2562 | - | func (_e *MockPanedWidget_Expecter) SetCanTarget(canTarget interface{}) *MockPanedWidget_SetCanTarget_Call { | 2481 | + | func (_e *MockPanedWidget_Expecter) SetCanTarget(canTarget any) *MockPanedWidget_SetCanTarget_Call { |
| 2563 | return &MockPanedWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 2482 | return &MockPanedWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 2564 | } | 2483 | } | ||
| 2565 | 2484 | ||||
| @@ -2599,7 +2518,7 @@ type MockPanedWidget_SetEndChild_Call struct { | |||||
| 2599 | 2518 | ||||
| 2600 | // SetEndChild is a helper method to define mock.On call | 2519 | // SetEndChild is a helper method to define mock.On call | ||
| 2601 | // - child layout.Widget | 2520 | // - child layout.Widget | ||
| 2602 | - | func (_e *MockPanedWidget_Expecter) SetEndChild(child interface{}) *MockPanedWidget_SetEndChild_Call { | 2521 | + | func (_e *MockPanedWidget_Expecter) SetEndChild(child any) *MockPanedWidget_SetEndChild_Call { |
| 2603 | return &MockPanedWidget_SetEndChild_Call{Call: _e.mock.On("SetEndChild", child)} | 2522 | return &MockPanedWidget_SetEndChild_Call{Call: _e.mock.On("SetEndChild", child)} | ||
| 2604 | } | 2523 | } | ||
| 2605 | 2524 | ||||
| @@ -2639,7 +2558,7 @@ type MockPanedWidget_SetFocusOnClick_Call struct { | |||||
| 2639 | 2558 | ||||
| 2640 | // SetFocusOnClick is a helper method to define mock.On call | 2559 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 2641 | // - focusOnClick bool | 2560 | // - focusOnClick bool | ||
| 2642 | - | func (_e *MockPanedWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockPanedWidget_SetFocusOnClick_Call { | 2561 | + | func (_e *MockPanedWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockPanedWidget_SetFocusOnClick_Call { |
| 2643 | return &MockPanedWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 2562 | return &MockPanedWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 2644 | } | 2563 | } | ||
| 2645 | 2564 | ||||
| @@ -2679,7 +2598,7 @@ type MockPanedWidget_SetFocusable_Call struct { | |||||
| 2679 | 2598 | ||||
| 2680 | // SetFocusable is a helper method to define mock.On call | 2599 | // SetFocusable is a helper method to define mock.On call | ||
| 2681 | // - focusable bool | 2600 | // - focusable bool | ||
| 2682 | - | func (_e *MockPanedWidget_Expecter) SetFocusable(focusable interface{}) *MockPanedWidget_SetFocusable_Call { | 2601 | + | func (_e *MockPanedWidget_Expecter) SetFocusable(focusable any) *MockPanedWidget_SetFocusable_Call { |
| 2683 | return &MockPanedWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 2602 | return &MockPanedWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 2684 | } | 2603 | } | ||
| 2685 | 2604 | ||||
| @@ -2719,7 +2638,7 @@ type MockPanedWidget_SetHalign_Call struct { | |||||
| 2719 | 2638 | ||||
| 2720 | // SetHalign is a helper method to define mock.On call | 2639 | // SetHalign is a helper method to define mock.On call | ||
| 2721 | // - align gtk.Align | 2640 | // - align gtk.Align | ||
| 2722 | - | func (_e *MockPanedWidget_Expecter) SetHalign(align interface{}) *MockPanedWidget_SetHalign_Call { | 2641 | + | func (_e *MockPanedWidget_Expecter) SetHalign(align any) *MockPanedWidget_SetHalign_Call { |
| 2723 | return &MockPanedWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 2642 | return &MockPanedWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 2724 | } | 2643 | } | ||
| 2725 | 2644 | ||||
| @@ -2759,7 +2678,7 @@ type MockPanedWidget_SetHexpand_Call struct { | |||||
| 2759 | 2678 | ||||
| 2760 | // SetHexpand is a helper method to define mock.On call | 2679 | // SetHexpand is a helper method to define mock.On call | ||
| 2761 | // - expand bool | 2680 | // - expand bool | ||
| 2762 | - | func (_e *MockPanedWidget_Expecter) SetHexpand(expand interface{}) *MockPanedWidget_SetHexpand_Call { | 2681 | + | func (_e *MockPanedWidget_Expecter) SetHexpand(expand any) *MockPanedWidget_SetHexpand_Call { |
| 2763 | return &MockPanedWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 2682 | return &MockPanedWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 2764 | } | 2683 | } | ||
| 2765 | 2684 | ||||
| @@ -2799,7 +2718,7 @@ type MockPanedWidget_SetOpacity_Call struct { | |||||
| 2799 | 2718 | ||||
| 2800 | // SetOpacity is a helper method to define mock.On call | 2719 | // SetOpacity is a helper method to define mock.On call | ||
| 2801 | // - opacity float64 | 2720 | // - opacity float64 | ||
| 2802 | - | func (_e *MockPanedWidget_Expecter) SetOpacity(opacity interface{}) *MockPanedWidget_SetOpacity_Call { | 2721 | + | func (_e *MockPanedWidget_Expecter) SetOpacity(opacity any) *MockPanedWidget_SetOpacity_Call { |
| 2803 | return &MockPanedWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 2722 | return &MockPanedWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 2804 | } | 2723 | } | ||
| 2805 | 2724 | ||||
| @@ -2839,7 +2758,7 @@ type MockPanedWidget_SetPosition_Call struct { | |||||
| 2839 | 2758 | ||||
| 2840 | // SetPosition is a helper method to define mock.On call | 2759 | // SetPosition is a helper method to define mock.On call | ||
| 2841 | // - position int | 2760 | // - position int | ||
| 2842 | - | func (_e *MockPanedWidget_Expecter) SetPosition(position interface{}) *MockPanedWidget_SetPosition_Call { | 2761 | + | func (_e *MockPanedWidget_Expecter) SetPosition(position any) *MockPanedWidget_SetPosition_Call { |
| 2843 | return &MockPanedWidget_SetPosition_Call{Call: _e.mock.On("SetPosition", position)} | 2762 | return &MockPanedWidget_SetPosition_Call{Call: _e.mock.On("SetPosition", position)} | ||
| 2844 | } | 2763 | } | ||
| 2845 | 2764 | ||||
| @@ -2879,7 +2798,7 @@ type MockPanedWidget_SetResizeEndChild_Call struct { | |||||
| 2879 | 2798 | ||||
| 2880 | // SetResizeEndChild is a helper method to define mock.On call | 2799 | // SetResizeEndChild is a helper method to define mock.On call | ||
| 2881 | // - resize bool | 2800 | // - resize bool | ||
| 2882 | - | func (_e *MockPanedWidget_Expecter) SetResizeEndChild(resize interface{}) *MockPanedWidget_SetResizeEndChild_Call { | 2801 | + | func (_e *MockPanedWidget_Expecter) SetResizeEndChild(resize any) *MockPanedWidget_SetResizeEndChild_Call { |
| 2883 | return &MockPanedWidget_SetResizeEndChild_Call{Call: _e.mock.On("SetResizeEndChild", resize)} | 2802 | return &MockPanedWidget_SetResizeEndChild_Call{Call: _e.mock.On("SetResizeEndChild", resize)} | ||
| 2884 | } | 2803 | } | ||
| 2885 | 2804 | ||||
| @@ -2919,7 +2838,7 @@ type MockPanedWidget_SetResizeStartChild_Call struct { | |||||
| 2919 | 2838 | ||||
| 2920 | // SetResizeStartChild is a helper method to define mock.On call | 2839 | // SetResizeStartChild is a helper method to define mock.On call | ||
| 2921 | // - resize bool | 2840 | // - resize bool | ||
| 2922 | - | func (_e *MockPanedWidget_Expecter) SetResizeStartChild(resize interface{}) *MockPanedWidget_SetResizeStartChild_Call { | 2841 | + | func (_e *MockPanedWidget_Expecter) SetResizeStartChild(resize any) *MockPanedWidget_SetResizeStartChild_Call { |
| 2923 | return &MockPanedWidget_SetResizeStartChild_Call{Call: _e.mock.On("SetResizeStartChild", resize)} | 2842 | return &MockPanedWidget_SetResizeStartChild_Call{Call: _e.mock.On("SetResizeStartChild", resize)} | ||
| 2924 | } | 2843 | } | ||
| 2925 | 2844 | ||||
| @@ -2959,7 +2878,7 @@ type MockPanedWidget_SetShrinkEndChild_Call struct { | |||||
| 2959 | 2878 | ||||
| 2960 | // SetShrinkEndChild is a helper method to define mock.On call | 2879 | // SetShrinkEndChild is a helper method to define mock.On call | ||
| 2961 | // - shrink bool | 2880 | // - shrink bool | ||
| 2962 | - | func (_e *MockPanedWidget_Expecter) SetShrinkEndChild(shrink interface{}) *MockPanedWidget_SetShrinkEndChild_Call { | 2881 | + | func (_e *MockPanedWidget_Expecter) SetShrinkEndChild(shrink any) *MockPanedWidget_SetShrinkEndChild_Call { |
| 2963 | return &MockPanedWidget_SetShrinkEndChild_Call{Call: _e.mock.On("SetShrinkEndChild", shrink)} | 2882 | return &MockPanedWidget_SetShrinkEndChild_Call{Call: _e.mock.On("SetShrinkEndChild", shrink)} | ||
| 2964 | } | 2883 | } | ||
| 2965 | 2884 | ||||
| @@ -2999,7 +2918,7 @@ type MockPanedWidget_SetShrinkStartChild_Call struct { | |||||
| 2999 | 2918 | ||||
| 3000 | // SetShrinkStartChild is a helper method to define mock.On call | 2919 | // SetShrinkStartChild is a helper method to define mock.On call | ||
| 3001 | // - shrink bool | 2920 | // - shrink bool | ||
| 3002 | - | func (_e *MockPanedWidget_Expecter) SetShrinkStartChild(shrink interface{}) *MockPanedWidget_SetShrinkStartChild_Call { | 2921 | + | func (_e *MockPanedWidget_Expecter) SetShrinkStartChild(shrink any) *MockPanedWidget_SetShrinkStartChild_Call { |
| 3003 | return &MockPanedWidget_SetShrinkStartChild_Call{Call: _e.mock.On("SetShrinkStartChild", shrink)} | 2922 | return &MockPanedWidget_SetShrinkStartChild_Call{Call: _e.mock.On("SetShrinkStartChild", shrink)} | ||
| 3004 | } | 2923 | } | ||
| 3005 | 2924 | ||||
| @@ -3040,7 +2959,7 @@ type MockPanedWidget_SetSizeRequest_Call struct { | |||||
| 3040 | // SetSizeRequest is a helper method to define mock.On call | 2959 | // SetSizeRequest is a helper method to define mock.On call | ||
| 3041 | // - width int | 2960 | // - width int | ||
| 3042 | // - height int | 2961 | // - height int | ||
| 3043 | - | func (_e *MockPanedWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockPanedWidget_SetSizeRequest_Call { | 2962 | + | func (_e *MockPanedWidget_Expecter) SetSizeRequest(width any, height any) *MockPanedWidget_SetSizeRequest_Call { |
| 3044 | return &MockPanedWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 2963 | return &MockPanedWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 3045 | } | 2964 | } | ||
| 3046 | 2965 | ||||
| @@ -3085,7 +3004,7 @@ type MockPanedWidget_SetStartChild_Call struct { | |||||
| 3085 | 3004 | ||||
| 3086 | // SetStartChild is a helper method to define mock.On call | 3005 | // SetStartChild is a helper method to define mock.On call | ||
| 3087 | // - child layout.Widget | 3006 | // - child layout.Widget | ||
| 3088 | - | func (_e *MockPanedWidget_Expecter) SetStartChild(child interface{}) *MockPanedWidget_SetStartChild_Call { | 3007 | + | func (_e *MockPanedWidget_Expecter) SetStartChild(child any) *MockPanedWidget_SetStartChild_Call { |
| 3089 | return &MockPanedWidget_SetStartChild_Call{Call: _e.mock.On("SetStartChild", child)} | 3008 | return &MockPanedWidget_SetStartChild_Call{Call: _e.mock.On("SetStartChild", child)} | ||
| 3090 | } | 3009 | } | ||
| 3091 | 3010 | ||||
| @@ -3125,7 +3044,7 @@ type MockPanedWidget_SetValign_Call struct { | |||||
| 3125 | 3044 | ||||
| 3126 | // SetValign is a helper method to define mock.On call | 3045 | // SetValign is a helper method to define mock.On call | ||
| 3127 | // - align gtk.Align | 3046 | // - align gtk.Align | ||
| 3128 | - | func (_e *MockPanedWidget_Expecter) SetValign(align interface{}) *MockPanedWidget_SetValign_Call { | 3047 | + | func (_e *MockPanedWidget_Expecter) SetValign(align any) *MockPanedWidget_SetValign_Call { |
| 3129 | return &MockPanedWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 3048 | return &MockPanedWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 3130 | } | 3049 | } | ||
| 3131 | 3050 | ||||
| @@ -3165,7 +3084,7 @@ type MockPanedWidget_SetVexpand_Call struct { | |||||
| 3165 | 3084 | ||||
| 3166 | // SetVexpand is a helper method to define mock.On call | 3085 | // SetVexpand is a helper method to define mock.On call | ||
| 3167 | // - expand bool | 3086 | // - expand bool | ||
| 3168 | - | func (_e *MockPanedWidget_Expecter) SetVexpand(expand interface{}) *MockPanedWidget_SetVexpand_Call { | 3087 | + | func (_e *MockPanedWidget_Expecter) SetVexpand(expand any) *MockPanedWidget_SetVexpand_Call { |
| 3169 | return &MockPanedWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 3088 | return &MockPanedWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 3170 | } | 3089 | } | ||
| 3171 | 3090 | ||||
| @@ -3205,7 +3124,7 @@ type MockPanedWidget_SetVisible_Call struct { | |||||
| 3205 | 3124 | ||||
| 3206 | // SetVisible is a helper method to define mock.On call | 3125 | // SetVisible is a helper method to define mock.On call | ||
| 3207 | // - visible bool | 3126 | // - visible bool | ||
| 3208 | - | func (_e *MockPanedWidget_Expecter) SetVisible(visible interface{}) *MockPanedWidget_SetVisible_Call { | 3127 | + | func (_e *MockPanedWidget_Expecter) SetVisible(visible any) *MockPanedWidget_SetVisible_Call { |
| 3209 | return &MockPanedWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 3128 | return &MockPanedWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 3210 | } | 3129 | } | ||
| 3211 | 3130 | ||||
| @@ -3245,7 +3164,7 @@ type MockPanedWidget_SetWideHandle_Call struct { | |||||
| 3245 | 3164 | ||||
| 3246 | // SetWideHandle is a helper method to define mock.On call | 3165 | // SetWideHandle is a helper method to define mock.On call | ||
| 3247 | // - wide bool | 3166 | // - wide bool | ||
| 3248 | - | func (_e *MockPanedWidget_Expecter) SetWideHandle(wide interface{}) *MockPanedWidget_SetWideHandle_Call { | 3167 | + | func (_e *MockPanedWidget_Expecter) SetWideHandle(wide any) *MockPanedWidget_SetWideHandle_Call { |
| 3249 | return &MockPanedWidget_SetWideHandle_Call{Call: _e.mock.On("SetWideHandle", wide)} | 3168 | return &MockPanedWidget_SetWideHandle_Call{Call: _e.mock.On("SetWideHandle", wide)} | ||
| 3250 | } | 3169 | } | ||
| 3251 | 3170 | ||||
| @@ -3378,7 +3297,7 @@ type MockBoxWidget_AddController_Call struct { | |||||
| 3378 | 3297 | ||||
| 3379 | // AddController is a helper method to define mock.On call | 3298 | // AddController is a helper method to define mock.On call | ||
| 3380 | // - controller *gtk.EventController | 3299 | // - controller *gtk.EventController | ||
| 3381 | - | func (_e *MockBoxWidget_Expecter) AddController(controller interface{}) *MockBoxWidget_AddController_Call { | 3300 | + | func (_e *MockBoxWidget_Expecter) AddController(controller any) *MockBoxWidget_AddController_Call { |
| 3382 | return &MockBoxWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 3301 | return &MockBoxWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 3383 | } | 3302 | } | ||
| 3384 | 3303 | ||||
| @@ -3418,7 +3337,7 @@ type MockBoxWidget_AddCssClass_Call struct { | |||||
| 3418 | 3337 | ||||
| 3419 | // AddCssClass is a helper method to define mock.On call | 3338 | // AddCssClass is a helper method to define mock.On call | ||
| 3420 | // - cssClass string | 3339 | // - cssClass string | ||
| 3421 | - | func (_e *MockBoxWidget_Expecter) AddCssClass(cssClass interface{}) *MockBoxWidget_AddCssClass_Call { | 3340 | + | func (_e *MockBoxWidget_Expecter) AddCssClass(cssClass any) *MockBoxWidget_AddCssClass_Call { |
| 3422 | return &MockBoxWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 3341 | return &MockBoxWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 3423 | } | 3342 | } | ||
| 3424 | 3343 | ||||
| @@ -3458,7 +3377,7 @@ type MockBoxWidget_Append_Call struct { | |||||
| 3458 | 3377 | ||||
| 3459 | // Append is a helper method to define mock.On call | 3378 | // Append is a helper method to define mock.On call | ||
| 3460 | // - child layout.Widget | 3379 | // - child layout.Widget | ||
| 3461 | - | func (_e *MockBoxWidget_Expecter) Append(child interface{}) *MockBoxWidget_Append_Call { | 3380 | + | func (_e *MockBoxWidget_Expecter) Append(child any) *MockBoxWidget_Append_Call { |
| 3462 | return &MockBoxWidget_Append_Call{Call: _e.mock.On("Append", child)} | 3381 | return &MockBoxWidget_Append_Call{Call: _e.mock.On("Append", child)} | ||
| 3463 | } | 3382 | } | ||
| 3464 | 3383 | ||||
| @@ -3524,7 +3443,7 @@ type MockBoxWidget_ComputePoint_Call struct { | |||||
| 3524 | 3443 | ||||
| 3525 | // ComputePoint is a helper method to define mock.On call | 3444 | // ComputePoint is a helper method to define mock.On call | ||
| 3526 | // - target layout.Widget | 3445 | // - target layout.Widget | ||
| 3527 | - | func (_e *MockBoxWidget_Expecter) ComputePoint(target interface{}) *MockBoxWidget_ComputePoint_Call { | 3446 | + | func (_e *MockBoxWidget_Expecter) ComputePoint(target any) *MockBoxWidget_ComputePoint_Call { |
| 3528 | return &MockBoxWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 3447 | return &MockBoxWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 3529 | } | 3448 | } | ||
| 3530 | 3449 | ||||
| @@ -4019,7 +3938,7 @@ type MockBoxWidget_HasCssClass_Call struct { | |||||
| 4019 | 3938 | ||||
| 4020 | // HasCssClass is a helper method to define mock.On call | 3939 | // HasCssClass is a helper method to define mock.On call | ||
| 4021 | // - cssClass string | 3940 | // - cssClass string | ||
| 4022 | - | func (_e *MockBoxWidget_Expecter) HasCssClass(cssClass interface{}) *MockBoxWidget_HasCssClass_Call { | 3941 | + | func (_e *MockBoxWidget_Expecter) HasCssClass(cssClass any) *MockBoxWidget_HasCssClass_Call { |
| 4023 | return &MockBoxWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 3942 | return &MockBoxWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 4024 | } | 3943 | } | ||
| 4025 | 3944 | ||||
| @@ -4137,7 +4056,7 @@ type MockBoxWidget_InsertChildAfter_Call struct { | |||||
| 4137 | // InsertChildAfter is a helper method to define mock.On call | 4056 | // InsertChildAfter is a helper method to define mock.On call | ||
| 4138 | // - child layout.Widget | 4057 | // - child layout.Widget | ||
| 4139 | // - sibling layout.Widget | 4058 | // - sibling layout.Widget | ||
| 4140 | - | func (_e *MockBoxWidget_Expecter) InsertChildAfter(child interface{}, sibling interface{}) *MockBoxWidget_InsertChildAfter_Call { | 4059 | + | func (_e *MockBoxWidget_Expecter) InsertChildAfter(child any, sibling any) *MockBoxWidget_InsertChildAfter_Call { |
| 4141 | return &MockBoxWidget_InsertChildAfter_Call{Call: _e.mock.On("InsertChildAfter", child, sibling)} | 4060 | return &MockBoxWidget_InsertChildAfter_Call{Call: _e.mock.On("InsertChildAfter", child, sibling)} | ||
| 4142 | } | 4061 | } | ||
| 4143 | 4062 | ||||
| @@ -4226,7 +4145,7 @@ type MockBoxWidget_Prepend_Call struct { | |||||
| 4226 | 4145 | ||||
| 4227 | // Prepend is a helper method to define mock.On call | 4146 | // Prepend is a helper method to define mock.On call | ||
| 4228 | // - child layout.Widget | 4147 | // - child layout.Widget | ||
| 4229 | - | func (_e *MockBoxWidget_Expecter) Prepend(child interface{}) *MockBoxWidget_Prepend_Call { | 4148 | + | func (_e *MockBoxWidget_Expecter) Prepend(child any) *MockBoxWidget_Prepend_Call { |
| 4230 | return &MockBoxWidget_Prepend_Call{Call: _e.mock.On("Prepend", child)} | 4149 | return &MockBoxWidget_Prepend_Call{Call: _e.mock.On("Prepend", child)} | ||
| 4231 | } | 4150 | } | ||
| 4232 | 4151 | ||||
| @@ -4266,7 +4185,7 @@ type MockBoxWidget_Remove_Call struct { | |||||
| 4266 | 4185 | ||||
| 4267 | // Remove is a helper method to define mock.On call | 4186 | // Remove is a helper method to define mock.On call | ||
| 4268 | // - child layout.Widget | 4187 | // - child layout.Widget | ||
| 4269 | - | func (_e *MockBoxWidget_Expecter) Remove(child interface{}) *MockBoxWidget_Remove_Call { | 4188 | + | func (_e *MockBoxWidget_Expecter) Remove(child any) *MockBoxWidget_Remove_Call { |
| 4270 | return &MockBoxWidget_Remove_Call{Call: _e.mock.On("Remove", child)} | 4189 | return &MockBoxWidget_Remove_Call{Call: _e.mock.On("Remove", child)} | ||
| 4271 | } | 4190 | } | ||
| 4272 | 4191 | ||||
| @@ -4306,7 +4225,7 @@ type MockBoxWidget_RemoveCssClass_Call struct { | |||||
| 4306 | 4225 | ||||
| 4307 | // RemoveCssClass is a helper method to define mock.On call | 4226 | // RemoveCssClass is a helper method to define mock.On call | ||
| 4308 | // - cssClass string | 4227 | // - cssClass string | ||
| 4309 | - | func (_e *MockBoxWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockBoxWidget_RemoveCssClass_Call { | 4228 | + | func (_e *MockBoxWidget_Expecter) RemoveCssClass(cssClass any) *MockBoxWidget_RemoveCssClass_Call { |
| 4310 | return &MockBoxWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 4229 | return &MockBoxWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 4311 | } | 4230 | } | ||
| 4312 | 4231 | ||||
| @@ -4347,7 +4266,7 @@ type MockBoxWidget_ReorderChildAfter_Call struct { | |||||
| 4347 | // ReorderChildAfter is a helper method to define mock.On call | 4266 | // ReorderChildAfter is a helper method to define mock.On call | ||
| 4348 | // - child layout.Widget | 4267 | // - child layout.Widget | ||
| 4349 | // - sibling layout.Widget | 4268 | // - sibling layout.Widget | ||
| 4350 | - | func (_e *MockBoxWidget_Expecter) ReorderChildAfter(child interface{}, sibling interface{}) *MockBoxWidget_ReorderChildAfter_Call { | 4269 | + | func (_e *MockBoxWidget_Expecter) ReorderChildAfter(child any, sibling any) *MockBoxWidget_ReorderChildAfter_Call { |
| 4351 | return &MockBoxWidget_ReorderChildAfter_Call{Call: _e.mock.On("ReorderChildAfter", child, sibling)} | 4270 | return &MockBoxWidget_ReorderChildAfter_Call{Call: _e.mock.On("ReorderChildAfter", child, sibling)} | ||
| 4352 | } | 4271 | } | ||
| 4353 | 4272 | ||||
| @@ -4392,7 +4311,7 @@ type MockBoxWidget_SetCanFocus_Call struct { | |||||
| 4392 | 4311 | ||||
| 4393 | // SetCanFocus is a helper method to define mock.On call | 4312 | // SetCanFocus is a helper method to define mock.On call | ||
| 4394 | // - canFocus bool | 4313 | // - canFocus bool | ||
| 4395 | - | func (_e *MockBoxWidget_Expecter) SetCanFocus(canFocus interface{}) *MockBoxWidget_SetCanFocus_Call { | 4314 | + | func (_e *MockBoxWidget_Expecter) SetCanFocus(canFocus any) *MockBoxWidget_SetCanFocus_Call { |
| 4396 | return &MockBoxWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 4315 | return &MockBoxWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 4397 | } | 4316 | } | ||
| 4398 | 4317 | ||||
| @@ -4432,7 +4351,7 @@ type MockBoxWidget_SetCanTarget_Call struct { | |||||
| 4432 | 4351 | ||||
| 4433 | // SetCanTarget is a helper method to define mock.On call | 4352 | // SetCanTarget is a helper method to define mock.On call | ||
| 4434 | // - canTarget bool | 4353 | // - canTarget bool | ||
| 4435 | - | func (_e *MockBoxWidget_Expecter) SetCanTarget(canTarget interface{}) *MockBoxWidget_SetCanTarget_Call { | 4354 | + | func (_e *MockBoxWidget_Expecter) SetCanTarget(canTarget any) *MockBoxWidget_SetCanTarget_Call { |
| 4436 | return &MockBoxWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 4355 | return &MockBoxWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 4437 | } | 4356 | } | ||
| 4438 | 4357 | ||||
| @@ -4472,7 +4391,7 @@ type MockBoxWidget_SetFocusOnClick_Call struct { | |||||
| 4472 | 4391 | ||||
| 4473 | // SetFocusOnClick is a helper method to define mock.On call | 4392 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 4474 | // - focusOnClick bool | 4393 | // - focusOnClick bool | ||
| 4475 | - | func (_e *MockBoxWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockBoxWidget_SetFocusOnClick_Call { | 4394 | + | func (_e *MockBoxWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockBoxWidget_SetFocusOnClick_Call { |
| 4476 | return &MockBoxWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 4395 | return &MockBoxWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 4477 | } | 4396 | } | ||
| 4478 | 4397 | ||||
| @@ -4512,7 +4431,7 @@ type MockBoxWidget_SetFocusable_Call struct { | |||||
| 4512 | 4431 | ||||
| 4513 | // SetFocusable is a helper method to define mock.On call | 4432 | // SetFocusable is a helper method to define mock.On call | ||
| 4514 | // - focusable bool | 4433 | // - focusable bool | ||
| 4515 | - | func (_e *MockBoxWidget_Expecter) SetFocusable(focusable interface{}) *MockBoxWidget_SetFocusable_Call { | 4434 | + | func (_e *MockBoxWidget_Expecter) SetFocusable(focusable any) *MockBoxWidget_SetFocusable_Call { |
| 4516 | return &MockBoxWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 4435 | return &MockBoxWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 4517 | } | 4436 | } | ||
| 4518 | 4437 | ||||
| @@ -4552,7 +4471,7 @@ type MockBoxWidget_SetHalign_Call struct { | |||||
| 4552 | 4471 | ||||
| 4553 | // SetHalign is a helper method to define mock.On call | 4472 | // SetHalign is a helper method to define mock.On call | ||
| 4554 | // - align gtk.Align | 4473 | // - align gtk.Align | ||
| 4555 | - | func (_e *MockBoxWidget_Expecter) SetHalign(align interface{}) *MockBoxWidget_SetHalign_Call { | 4474 | + | func (_e *MockBoxWidget_Expecter) SetHalign(align any) *MockBoxWidget_SetHalign_Call { |
| 4556 | return &MockBoxWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 4475 | return &MockBoxWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 4557 | } | 4476 | } | ||
| 4558 | 4477 | ||||
| @@ -4592,7 +4511,7 @@ type MockBoxWidget_SetHexpand_Call struct { | |||||
| 4592 | 4511 | ||||
| 4593 | // SetHexpand is a helper method to define mock.On call | 4512 | // SetHexpand is a helper method to define mock.On call | ||
| 4594 | // - expand bool | 4513 | // - expand bool | ||
| 4595 | - | func (_e *MockBoxWidget_Expecter) SetHexpand(expand interface{}) *MockBoxWidget_SetHexpand_Call { | 4514 | + | func (_e *MockBoxWidget_Expecter) SetHexpand(expand any) *MockBoxWidget_SetHexpand_Call { |
| 4596 | return &MockBoxWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 4515 | return &MockBoxWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 4597 | } | 4516 | } | ||
| 4598 | 4517 | ||||
| @@ -4632,7 +4551,7 @@ type MockBoxWidget_SetHomogeneous_Call struct { | |||||
| 4632 | 4551 | ||||
| 4633 | // SetHomogeneous is a helper method to define mock.On call | 4552 | // SetHomogeneous is a helper method to define mock.On call | ||
| 4634 | // - homogeneous bool | 4553 | // - homogeneous bool | ||
| 4635 | - | func (_e *MockBoxWidget_Expecter) SetHomogeneous(homogeneous interface{}) *MockBoxWidget_SetHomogeneous_Call { | 4554 | + | func (_e *MockBoxWidget_Expecter) SetHomogeneous(homogeneous any) *MockBoxWidget_SetHomogeneous_Call { |
| 4636 | return &MockBoxWidget_SetHomogeneous_Call{Call: _e.mock.On("SetHomogeneous", homogeneous)} | 4555 | return &MockBoxWidget_SetHomogeneous_Call{Call: _e.mock.On("SetHomogeneous", homogeneous)} | ||
| 4637 | } | 4556 | } | ||
| 4638 | 4557 | ||||
| @@ -4672,7 +4591,7 @@ type MockBoxWidget_SetOpacity_Call struct { | |||||
| 4672 | 4591 | ||||
| 4673 | // SetOpacity is a helper method to define mock.On call | 4592 | // SetOpacity is a helper method to define mock.On call | ||
| 4674 | // - opacity float64 | 4593 | // - opacity float64 | ||
| 4675 | - | func (_e *MockBoxWidget_Expecter) SetOpacity(opacity interface{}) *MockBoxWidget_SetOpacity_Call { | 4594 | + | func (_e *MockBoxWidget_Expecter) SetOpacity(opacity any) *MockBoxWidget_SetOpacity_Call { |
| 4676 | return &MockBoxWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 4595 | return &MockBoxWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 4677 | } | 4596 | } | ||
| 4678 | 4597 | ||||
| @@ -4712,7 +4631,7 @@ type MockBoxWidget_SetOrientation_Call struct { | |||||
| 4712 | 4631 | ||||
| 4713 | // SetOrientation is a helper method to define mock.On call | 4632 | // SetOrientation is a helper method to define mock.On call | ||
| 4714 | // - orientation layout.Orientation | 4633 | // - orientation layout.Orientation | ||
| 4715 | - | func (_e *MockBoxWidget_Expecter) SetOrientation(orientation interface{}) *MockBoxWidget_SetOrientation_Call { | 4634 | + | func (_e *MockBoxWidget_Expecter) SetOrientation(orientation any) *MockBoxWidget_SetOrientation_Call { |
| 4716 | return &MockBoxWidget_SetOrientation_Call{Call: _e.mock.On("SetOrientation", orientation)} | 4635 | return &MockBoxWidget_SetOrientation_Call{Call: _e.mock.On("SetOrientation", orientation)} | ||
| 4717 | } | 4636 | } | ||
| 4718 | 4637 | ||||
| @@ -4753,7 +4672,7 @@ type MockBoxWidget_SetSizeRequest_Call struct { | |||||
| 4753 | // SetSizeRequest is a helper method to define mock.On call | 4672 | // SetSizeRequest is a helper method to define mock.On call | ||
| 4754 | // - width int | 4673 | // - width int | ||
| 4755 | // - height int | 4674 | // - height int | ||
| 4756 | - | func (_e *MockBoxWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockBoxWidget_SetSizeRequest_Call { | 4675 | + | func (_e *MockBoxWidget_Expecter) SetSizeRequest(width any, height any) *MockBoxWidget_SetSizeRequest_Call { |
| 4757 | return &MockBoxWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 4676 | return &MockBoxWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 4758 | } | 4677 | } | ||
| 4759 | 4678 | ||||
| @@ -4798,7 +4717,7 @@ type MockBoxWidget_SetSpacing_Call struct { | |||||
| 4798 | 4717 | ||||
| 4799 | // SetSpacing is a helper method to define mock.On call | 4718 | // SetSpacing is a helper method to define mock.On call | ||
| 4800 | // - spacing int | 4719 | // - spacing int | ||
| 4801 | - | func (_e *MockBoxWidget_Expecter) SetSpacing(spacing interface{}) *MockBoxWidget_SetSpacing_Call { | 4720 | + | func (_e *MockBoxWidget_Expecter) SetSpacing(spacing any) *MockBoxWidget_SetSpacing_Call { |
| 4802 | return &MockBoxWidget_SetSpacing_Call{Call: _e.mock.On("SetSpacing", spacing)} | 4721 | return &MockBoxWidget_SetSpacing_Call{Call: _e.mock.On("SetSpacing", spacing)} | ||
| 4803 | } | 4722 | } | ||
| 4804 | 4723 | ||||
| @@ -4838,7 +4757,7 @@ type MockBoxWidget_SetValign_Call struct { | |||||
| 4838 | 4757 | ||||
| 4839 | // SetValign is a helper method to define mock.On call | 4758 | // SetValign is a helper method to define mock.On call | ||
| 4840 | // - align gtk.Align | 4759 | // - align gtk.Align | ||
| 4841 | - | func (_e *MockBoxWidget_Expecter) SetValign(align interface{}) *MockBoxWidget_SetValign_Call { | 4760 | + | func (_e *MockBoxWidget_Expecter) SetValign(align any) *MockBoxWidget_SetValign_Call { |
| 4842 | return &MockBoxWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 4761 | return &MockBoxWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 4843 | } | 4762 | } | ||
| 4844 | 4763 | ||||
| @@ -4878,7 +4797,7 @@ type MockBoxWidget_SetVexpand_Call struct { | |||||
| 4878 | 4797 | ||||
| 4879 | // SetVexpand is a helper method to define mock.On call | 4798 | // SetVexpand is a helper method to define mock.On call | ||
| 4880 | // - expand bool | 4799 | // - expand bool | ||
| 4881 | - | func (_e *MockBoxWidget_Expecter) SetVexpand(expand interface{}) *MockBoxWidget_SetVexpand_Call { | 4800 | + | func (_e *MockBoxWidget_Expecter) SetVexpand(expand any) *MockBoxWidget_SetVexpand_Call { |
| 4882 | return &MockBoxWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 4801 | return &MockBoxWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 4883 | } | 4802 | } | ||
| 4884 | 4803 | ||||
| @@ -4918,7 +4837,7 @@ type MockBoxWidget_SetVisible_Call struct { | |||||
| 4918 | 4837 | ||||
| 4919 | // SetVisible is a helper method to define mock.On call | 4838 | // SetVisible is a helper method to define mock.On call | ||
| 4920 | // - visible bool | 4839 | // - visible bool | ||
| 4921 | - | func (_e *MockBoxWidget_Expecter) SetVisible(visible interface{}) *MockBoxWidget_SetVisible_Call { | 4840 | + | func (_e *MockBoxWidget_Expecter) SetVisible(visible any) *MockBoxWidget_SetVisible_Call { |
| 4922 | return &MockBoxWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 4841 | return &MockBoxWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 4923 | } | 4842 | } | ||
| 4924 | 4843 | ||||
| @@ -5051,7 +4970,7 @@ type MockOverlayWidget_AddController_Call struct { | |||||
| 5051 | 4970 | ||||
| 5052 | // AddController is a helper method to define mock.On call | 4971 | // AddController is a helper method to define mock.On call | ||
| 5053 | // - controller *gtk.EventController | 4972 | // - controller *gtk.EventController | ||
| 5054 | - | func (_e *MockOverlayWidget_Expecter) AddController(controller interface{}) *MockOverlayWidget_AddController_Call { | 4973 | + | func (_e *MockOverlayWidget_Expecter) AddController(controller any) *MockOverlayWidget_AddController_Call { |
| 5055 | return &MockOverlayWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 4974 | return &MockOverlayWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 5056 | } | 4975 | } | ||
| 5057 | 4976 | ||||
| @@ -5091,7 +5010,7 @@ type MockOverlayWidget_AddCssClass_Call struct { | |||||
| 5091 | 5010 | ||||
| 5092 | // AddCssClass is a helper method to define mock.On call | 5011 | // AddCssClass is a helper method to define mock.On call | ||
| 5093 | // - cssClass string | 5012 | // - cssClass string | ||
| 5094 | - | func (_e *MockOverlayWidget_Expecter) AddCssClass(cssClass interface{}) *MockOverlayWidget_AddCssClass_Call { | 5013 | + | func (_e *MockOverlayWidget_Expecter) AddCssClass(cssClass any) *MockOverlayWidget_AddCssClass_Call { |
| 5095 | return &MockOverlayWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 5014 | return &MockOverlayWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 5096 | } | 5015 | } | ||
| 5097 | 5016 | ||||
| @@ -5131,7 +5050,7 @@ type MockOverlayWidget_AddOverlay_Call struct { | |||||
| 5131 | 5050 | ||||
| 5132 | // AddOverlay is a helper method to define mock.On call | 5051 | // AddOverlay is a helper method to define mock.On call | ||
| 5133 | // - overlay layout.Widget | 5052 | // - overlay layout.Widget | ||
| 5134 | - | func (_e *MockOverlayWidget_Expecter) AddOverlay(overlay interface{}) *MockOverlayWidget_AddOverlay_Call { | 5053 | + | func (_e *MockOverlayWidget_Expecter) AddOverlay(overlay any) *MockOverlayWidget_AddOverlay_Call { |
| 5135 | return &MockOverlayWidget_AddOverlay_Call{Call: _e.mock.On("AddOverlay", overlay)} | 5054 | return &MockOverlayWidget_AddOverlay_Call{Call: _e.mock.On("AddOverlay", overlay)} | ||
| 5136 | } | 5055 | } | ||
| 5137 | 5056 | ||||
| @@ -5197,7 +5116,7 @@ type MockOverlayWidget_ComputePoint_Call struct { | |||||
| 5197 | 5116 | ||||
| 5198 | // ComputePoint is a helper method to define mock.On call | 5117 | // ComputePoint is a helper method to define mock.On call | ||
| 5199 | // - target layout.Widget | 5118 | // - target layout.Widget | ||
| 5200 | - | func (_e *MockOverlayWidget_Expecter) ComputePoint(target interface{}) *MockOverlayWidget_ComputePoint_Call { | 5119 | + | func (_e *MockOverlayWidget_Expecter) ComputePoint(target any) *MockOverlayWidget_ComputePoint_Call { |
| 5201 | return &MockOverlayWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 5120 | return &MockOverlayWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 5202 | } | 5121 | } | ||
| 5203 | 5122 | ||||
| @@ -5382,7 +5301,7 @@ type MockOverlayWidget_GetClipOverlay_Call struct { | |||||
| 5382 | 5301 | ||||
| 5383 | // GetClipOverlay is a helper method to define mock.On call | 5302 | // GetClipOverlay is a helper method to define mock.On call | ||
| 5384 | // - overlay layout.Widget | 5303 | // - overlay layout.Widget | ||
| 5385 | - | func (_e *MockOverlayWidget_Expecter) GetClipOverlay(overlay interface{}) *MockOverlayWidget_GetClipOverlay_Call { | 5304 | + | func (_e *MockOverlayWidget_Expecter) GetClipOverlay(overlay any) *MockOverlayWidget_GetClipOverlay_Call { |
| 5386 | return &MockOverlayWidget_GetClipOverlay_Call{Call: _e.mock.On("GetClipOverlay", overlay)} | 5305 | return &MockOverlayWidget_GetClipOverlay_Call{Call: _e.mock.On("GetClipOverlay", overlay)} | ||
| 5387 | } | 5306 | } | ||
| 5388 | 5307 | ||||
| @@ -5477,7 +5396,7 @@ type MockOverlayWidget_GetMeasureOverlay_Call struct { | |||||
| 5477 | 5396 | ||||
| 5478 | // GetMeasureOverlay is a helper method to define mock.On call | 5397 | // GetMeasureOverlay is a helper method to define mock.On call | ||
| 5479 | // - overlay layout.Widget | 5398 | // - overlay layout.Widget | ||
| 5480 | - | func (_e *MockOverlayWidget_Expecter) GetMeasureOverlay(overlay interface{}) *MockOverlayWidget_GetMeasureOverlay_Call { | 5399 | + | func (_e *MockOverlayWidget_Expecter) GetMeasureOverlay(overlay any) *MockOverlayWidget_GetMeasureOverlay_Call { |
| 5481 | return &MockOverlayWidget_GetMeasureOverlay_Call{Call: _e.mock.On("GetMeasureOverlay", overlay)} | 5400 | return &MockOverlayWidget_GetMeasureOverlay_Call{Call: _e.mock.On("GetMeasureOverlay", overlay)} | ||
| 5482 | } | 5401 | } | ||
| 5483 | 5402 | ||||
| @@ -5708,7 +5627,7 @@ type MockOverlayWidget_HasCssClass_Call struct { | |||||
| 5708 | 5627 | ||||
| 5709 | // HasCssClass is a helper method to define mock.On call | 5628 | // HasCssClass is a helper method to define mock.On call | ||
| 5710 | // - cssClass string | 5629 | // - cssClass string | ||
| 5711 | - | func (_e *MockOverlayWidget_Expecter) HasCssClass(cssClass interface{}) *MockOverlayWidget_HasCssClass_Call { | 5630 | + | func (_e *MockOverlayWidget_Expecter) HasCssClass(cssClass any) *MockOverlayWidget_HasCssClass_Call { |
| 5712 | return &MockOverlayWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 5631 | return &MockOverlayWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 5713 | } | 5632 | } | ||
| 5714 | 5633 | ||||
| @@ -5869,7 +5788,7 @@ type MockOverlayWidget_RemoveCssClass_Call struct { | |||||
| 5869 | 5788 | ||||
| 5870 | // RemoveCssClass is a helper method to define mock.On call | 5789 | // RemoveCssClass is a helper method to define mock.On call | ||
| 5871 | // - cssClass string | 5790 | // - cssClass string | ||
| 5872 | - | func (_e *MockOverlayWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockOverlayWidget_RemoveCssClass_Call { | 5791 | + | func (_e *MockOverlayWidget_Expecter) RemoveCssClass(cssClass any) *MockOverlayWidget_RemoveCssClass_Call { |
| 5873 | return &MockOverlayWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 5792 | return &MockOverlayWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 5874 | } | 5793 | } | ||
| 5875 | 5794 | ||||
| @@ -5909,7 +5828,7 @@ type MockOverlayWidget_RemoveOverlay_Call struct { | |||||
| 5909 | 5828 | ||||
| 5910 | // RemoveOverlay is a helper method to define mock.On call | 5829 | // RemoveOverlay is a helper method to define mock.On call | ||
| 5911 | // - overlay layout.Widget | 5830 | // - overlay layout.Widget | ||
| 5912 | - | func (_e *MockOverlayWidget_Expecter) RemoveOverlay(overlay interface{}) *MockOverlayWidget_RemoveOverlay_Call { | 5831 | + | func (_e *MockOverlayWidget_Expecter) RemoveOverlay(overlay any) *MockOverlayWidget_RemoveOverlay_Call { |
| 5913 | return &MockOverlayWidget_RemoveOverlay_Call{Call: _e.mock.On("RemoveOverlay", overlay)} | 5832 | return &MockOverlayWidget_RemoveOverlay_Call{Call: _e.mock.On("RemoveOverlay", overlay)} | ||
| 5914 | } | 5833 | } | ||
| 5915 | 5834 | ||||
| @@ -5949,7 +5868,7 @@ type MockOverlayWidget_SetCanFocus_Call struct { | |||||
| 5949 | 5868 | ||||
| 5950 | // SetCanFocus is a helper method to define mock.On call | 5869 | // SetCanFocus is a helper method to define mock.On call | ||
| 5951 | // - canFocus bool | 5870 | // - canFocus bool | ||
| 5952 | - | func (_e *MockOverlayWidget_Expecter) SetCanFocus(canFocus interface{}) *MockOverlayWidget_SetCanFocus_Call { | 5871 | + | func (_e *MockOverlayWidget_Expecter) SetCanFocus(canFocus any) *MockOverlayWidget_SetCanFocus_Call { |
| 5953 | return &MockOverlayWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 5872 | return &MockOverlayWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 5954 | } | 5873 | } | ||
| 5955 | 5874 | ||||
| @@ -5989,7 +5908,7 @@ type MockOverlayWidget_SetCanTarget_Call struct { | |||||
| 5989 | 5908 | ||||
| 5990 | // SetCanTarget is a helper method to define mock.On call | 5909 | // SetCanTarget is a helper method to define mock.On call | ||
| 5991 | // - canTarget bool | 5910 | // - canTarget bool | ||
| 5992 | - | func (_e *MockOverlayWidget_Expecter) SetCanTarget(canTarget interface{}) *MockOverlayWidget_SetCanTarget_Call { | 5911 | + | func (_e *MockOverlayWidget_Expecter) SetCanTarget(canTarget any) *MockOverlayWidget_SetCanTarget_Call { |
| 5993 | return &MockOverlayWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 5912 | return &MockOverlayWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 5994 | } | 5913 | } | ||
| 5995 | 5914 | ||||
| @@ -6029,7 +5948,7 @@ type MockOverlayWidget_SetChild_Call struct { | |||||
| 6029 | 5948 | ||||
| 6030 | // SetChild is a helper method to define mock.On call | 5949 | // SetChild is a helper method to define mock.On call | ||
| 6031 | // - child layout.Widget | 5950 | // - child layout.Widget | ||
| 6032 | - | func (_e *MockOverlayWidget_Expecter) SetChild(child interface{}) *MockOverlayWidget_SetChild_Call { | 5951 | + | func (_e *MockOverlayWidget_Expecter) SetChild(child any) *MockOverlayWidget_SetChild_Call { |
| 6033 | return &MockOverlayWidget_SetChild_Call{Call: _e.mock.On("SetChild", child)} | 5952 | return &MockOverlayWidget_SetChild_Call{Call: _e.mock.On("SetChild", child)} | ||
| 6034 | } | 5953 | } | ||
| 6035 | 5954 | ||||
| @@ -6070,7 +5989,7 @@ type MockOverlayWidget_SetClipOverlay_Call struct { | |||||
| 6070 | // SetClipOverlay is a helper method to define mock.On call | 5989 | // SetClipOverlay is a helper method to define mock.On call | ||
| 6071 | // - overlay layout.Widget | 5990 | // - overlay layout.Widget | ||
| 6072 | // - clip bool | 5991 | // - clip bool | ||
| 6073 | - | func (_e *MockOverlayWidget_Expecter) SetClipOverlay(overlay interface{}, clip interface{}) *MockOverlayWidget_SetClipOverlay_Call { | 5992 | + | func (_e *MockOverlayWidget_Expecter) SetClipOverlay(overlay any, clip any) *MockOverlayWidget_SetClipOverlay_Call { |
| 6074 | return &MockOverlayWidget_SetClipOverlay_Call{Call: _e.mock.On("SetClipOverlay", overlay, clip)} | 5993 | return &MockOverlayWidget_SetClipOverlay_Call{Call: _e.mock.On("SetClipOverlay", overlay, clip)} | ||
| 6075 | } | 5994 | } | ||
| 6076 | 5995 | ||||
| @@ -6115,7 +6034,7 @@ type MockOverlayWidget_SetFocusOnClick_Call struct { | |||||
| 6115 | 6034 | ||||
| 6116 | // SetFocusOnClick is a helper method to define mock.On call | 6035 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 6117 | // - focusOnClick bool | 6036 | // - focusOnClick bool | ||
| 6118 | - | func (_e *MockOverlayWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockOverlayWidget_SetFocusOnClick_Call { | 6037 | + | func (_e *MockOverlayWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockOverlayWidget_SetFocusOnClick_Call { |
| 6119 | return &MockOverlayWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 6038 | return &MockOverlayWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 6120 | } | 6039 | } | ||
| 6121 | 6040 | ||||
| @@ -6155,7 +6074,7 @@ type MockOverlayWidget_SetFocusable_Call struct { | |||||
| 6155 | 6074 | ||||
| 6156 | // SetFocusable is a helper method to define mock.On call | 6075 | // SetFocusable is a helper method to define mock.On call | ||
| 6157 | // - focusable bool | 6076 | // - focusable bool | ||
| 6158 | - | func (_e *MockOverlayWidget_Expecter) SetFocusable(focusable interface{}) *MockOverlayWidget_SetFocusable_Call { | 6077 | + | func (_e *MockOverlayWidget_Expecter) SetFocusable(focusable any) *MockOverlayWidget_SetFocusable_Call { |
| 6159 | return &MockOverlayWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 6078 | return &MockOverlayWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 6160 | } | 6079 | } | ||
| 6161 | 6080 | ||||
| @@ -6195,7 +6114,7 @@ type MockOverlayWidget_SetHalign_Call struct { | |||||
| 6195 | 6114 | ||||
| 6196 | // SetHalign is a helper method to define mock.On call | 6115 | // SetHalign is a helper method to define mock.On call | ||
| 6197 | // - align gtk.Align | 6116 | // - align gtk.Align | ||
| 6198 | - | func (_e *MockOverlayWidget_Expecter) SetHalign(align interface{}) *MockOverlayWidget_SetHalign_Call { | 6117 | + | func (_e *MockOverlayWidget_Expecter) SetHalign(align any) *MockOverlayWidget_SetHalign_Call { |
| 6199 | return &MockOverlayWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 6118 | return &MockOverlayWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 6200 | } | 6119 | } | ||
| 6201 | 6120 | ||||
| @@ -6235,7 +6154,7 @@ type MockOverlayWidget_SetHexpand_Call struct { | |||||
| 6235 | 6154 | ||||
| 6236 | // SetHexpand is a helper method to define mock.On call | 6155 | // SetHexpand is a helper method to define mock.On call | ||
| 6237 | // - expand bool | 6156 | // - expand bool | ||
| 6238 | - | func (_e *MockOverlayWidget_Expecter) SetHexpand(expand interface{}) *MockOverlayWidget_SetHexpand_Call { | 6157 | + | func (_e *MockOverlayWidget_Expecter) SetHexpand(expand any) *MockOverlayWidget_SetHexpand_Call { |
| 6239 | return &MockOverlayWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 6158 | return &MockOverlayWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 6240 | } | 6159 | } | ||
| 6241 | 6160 | ||||
| @@ -6276,7 +6195,7 @@ type MockOverlayWidget_SetMeasureOverlay_Call struct { | |||||
| 6276 | // SetMeasureOverlay is a helper method to define mock.On call | 6195 | // SetMeasureOverlay is a helper method to define mock.On call | ||
| 6277 | // - overlay layout.Widget | 6196 | // - overlay layout.Widget | ||
| 6278 | // - measure bool | 6197 | // - measure bool | ||
| 6279 | - | func (_e *MockOverlayWidget_Expecter) SetMeasureOverlay(overlay interface{}, measure interface{}) *MockOverlayWidget_SetMeasureOverlay_Call { | 6198 | + | func (_e *MockOverlayWidget_Expecter) SetMeasureOverlay(overlay any, measure any) *MockOverlayWidget_SetMeasureOverlay_Call { |
| 6280 | return &MockOverlayWidget_SetMeasureOverlay_Call{Call: _e.mock.On("SetMeasureOverlay", overlay, measure)} | 6199 | return &MockOverlayWidget_SetMeasureOverlay_Call{Call: _e.mock.On("SetMeasureOverlay", overlay, measure)} | ||
| 6281 | } | 6200 | } | ||
| 6282 | 6201 | ||||
| @@ -6321,7 +6240,7 @@ type MockOverlayWidget_SetOpacity_Call struct { | |||||
| 6321 | 6240 | ||||
| 6322 | // SetOpacity is a helper method to define mock.On call | 6241 | // SetOpacity is a helper method to define mock.On call | ||
| 6323 | // - opacity float64 | 6242 | // - opacity float64 | ||
| 6324 | - | func (_e *MockOverlayWidget_Expecter) SetOpacity(opacity interface{}) *MockOverlayWidget_SetOpacity_Call { | 6243 | + | func (_e *MockOverlayWidget_Expecter) SetOpacity(opacity any) *MockOverlayWidget_SetOpacity_Call { |
| 6325 | return &MockOverlayWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 6244 | return &MockOverlayWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 6326 | } | 6245 | } | ||
| 6327 | 6246 | ||||
| @@ -6362,7 +6281,7 @@ type MockOverlayWidget_SetSizeRequest_Call struct { | |||||
| 6362 | // SetSizeRequest is a helper method to define mock.On call | 6281 | // SetSizeRequest is a helper method to define mock.On call | ||
| 6363 | // - width int | 6282 | // - width int | ||
| 6364 | // - height int | 6283 | // - height int | ||
| 6365 | - | func (_e *MockOverlayWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockOverlayWidget_SetSizeRequest_Call { | 6284 | + | func (_e *MockOverlayWidget_Expecter) SetSizeRequest(width any, height any) *MockOverlayWidget_SetSizeRequest_Call { |
| 6366 | return &MockOverlayWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 6285 | return &MockOverlayWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 6367 | } | 6286 | } | ||
| 6368 | 6287 | ||||
| @@ -6407,7 +6326,7 @@ type MockOverlayWidget_SetValign_Call struct { | |||||
| 6407 | 6326 | ||||
| 6408 | // SetValign is a helper method to define mock.On call | 6327 | // SetValign is a helper method to define mock.On call | ||
| 6409 | // - align gtk.Align | 6328 | // - align gtk.Align | ||
| 6410 | - | func (_e *MockOverlayWidget_Expecter) SetValign(align interface{}) *MockOverlayWidget_SetValign_Call { | 6329 | + | func (_e *MockOverlayWidget_Expecter) SetValign(align any) *MockOverlayWidget_SetValign_Call { |
| 6411 | return &MockOverlayWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 6330 | return &MockOverlayWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 6412 | } | 6331 | } | ||
| 6413 | 6332 | ||||
| @@ -6447,7 +6366,7 @@ type MockOverlayWidget_SetVexpand_Call struct { | |||||
| 6447 | 6366 | ||||
| 6448 | // SetVexpand is a helper method to define mock.On call | 6367 | // SetVexpand is a helper method to define mock.On call | ||
| 6449 | // - expand bool | 6368 | // - expand bool | ||
| 6450 | - | func (_e *MockOverlayWidget_Expecter) SetVexpand(expand interface{}) *MockOverlayWidget_SetVexpand_Call { | 6369 | + | func (_e *MockOverlayWidget_Expecter) SetVexpand(expand any) *MockOverlayWidget_SetVexpand_Call { |
| 6451 | return &MockOverlayWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 6370 | return &MockOverlayWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 6452 | } | 6371 | } | ||
| 6453 | 6372 | ||||
| @@ -6487,7 +6406,7 @@ type MockOverlayWidget_SetVisible_Call struct { | |||||
| 6487 | 6406 | ||||
| 6488 | // SetVisible is a helper method to define mock.On call | 6407 | // SetVisible is a helper method to define mock.On call | ||
| 6489 | // - visible bool | 6408 | // - visible bool | ||
| 6490 | - | func (_e *MockOverlayWidget_Expecter) SetVisible(visible interface{}) *MockOverlayWidget_SetVisible_Call { | 6409 | + | func (_e *MockOverlayWidget_Expecter) SetVisible(visible any) *MockOverlayWidget_SetVisible_Call { |
| 6491 | return &MockOverlayWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 6410 | return &MockOverlayWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 6492 | } | 6411 | } | ||
| 6493 | 6412 | ||||
| @@ -6620,7 +6539,7 @@ type MockLabelWidget_AddController_Call struct { | |||||
| 6620 | 6539 | ||||
| 6621 | // AddController is a helper method to define mock.On call | 6540 | // AddController is a helper method to define mock.On call | ||
| 6622 | // - controller *gtk.EventController | 6541 | // - controller *gtk.EventController | ||
| 6623 | - | func (_e *MockLabelWidget_Expecter) AddController(controller interface{}) *MockLabelWidget_AddController_Call { | 6542 | + | func (_e *MockLabelWidget_Expecter) AddController(controller any) *MockLabelWidget_AddController_Call { |
| 6624 | return &MockLabelWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 6543 | return &MockLabelWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 6625 | } | 6544 | } | ||
| 6626 | 6545 | ||||
| @@ -6660,7 +6579,7 @@ type MockLabelWidget_AddCssClass_Call struct { | |||||
| 6660 | 6579 | ||||
| 6661 | // AddCssClass is a helper method to define mock.On call | 6580 | // AddCssClass is a helper method to define mock.On call | ||
| 6662 | // - cssClass string | 6581 | // - cssClass string | ||
| 6663 | - | func (_e *MockLabelWidget_Expecter) AddCssClass(cssClass interface{}) *MockLabelWidget_AddCssClass_Call { | 6582 | + | func (_e *MockLabelWidget_Expecter) AddCssClass(cssClass any) *MockLabelWidget_AddCssClass_Call { |
| 6664 | return &MockLabelWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 6583 | return &MockLabelWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 6665 | } | 6584 | } | ||
| 6666 | 6585 | ||||
| @@ -6726,7 +6645,7 @@ type MockLabelWidget_ComputePoint_Call struct { | |||||
| 6726 | 6645 | ||||
| 6727 | // ComputePoint is a helper method to define mock.On call | 6646 | // ComputePoint is a helper method to define mock.On call | ||
| 6728 | // - target layout.Widget | 6647 | // - target layout.Widget | ||
| 6729 | - | func (_e *MockLabelWidget_Expecter) ComputePoint(target interface{}) *MockLabelWidget_ComputePoint_Call { | 6648 | + | func (_e *MockLabelWidget_Expecter) ComputePoint(target any) *MockLabelWidget_ComputePoint_Call { |
| 6730 | return &MockLabelWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 6649 | return &MockLabelWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 6731 | } | 6650 | } | ||
| 6732 | 6651 | ||||
| @@ -7133,7 +7052,7 @@ type MockLabelWidget_HasCssClass_Call struct { | |||||
| 7133 | 7052 | ||||
| 7134 | // HasCssClass is a helper method to define mock.On call | 7053 | // HasCssClass is a helper method to define mock.On call | ||
| 7135 | // - cssClass string | 7054 | // - cssClass string | ||
| 7136 | - | func (_e *MockLabelWidget_Expecter) HasCssClass(cssClass interface{}) *MockLabelWidget_HasCssClass_Call { | 7055 | + | func (_e *MockLabelWidget_Expecter) HasCssClass(cssClass any) *MockLabelWidget_HasCssClass_Call { |
| 7137 | return &MockLabelWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 7056 | return &MockLabelWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 7138 | } | 7057 | } | ||
| 7139 | 7058 | ||||
| @@ -7294,7 +7213,7 @@ type MockLabelWidget_RemoveCssClass_Call struct { | |||||
| 7294 | 7213 | ||||
| 7295 | // RemoveCssClass is a helper method to define mock.On call | 7214 | // RemoveCssClass is a helper method to define mock.On call | ||
| 7296 | // - cssClass string | 7215 | // - cssClass string | ||
| 7297 | - | func (_e *MockLabelWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockLabelWidget_RemoveCssClass_Call { | 7216 | + | func (_e *MockLabelWidget_Expecter) RemoveCssClass(cssClass any) *MockLabelWidget_RemoveCssClass_Call { |
| 7298 | return &MockLabelWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 7217 | return &MockLabelWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 7299 | } | 7218 | } | ||
| 7300 | 7219 | ||||
| @@ -7334,7 +7253,7 @@ type MockLabelWidget_SetCanFocus_Call struct { | |||||
| 7334 | 7253 | ||||
| 7335 | // SetCanFocus is a helper method to define mock.On call | 7254 | // SetCanFocus is a helper method to define mock.On call | ||
| 7336 | // - canFocus bool | 7255 | // - canFocus bool | ||
| 7337 | - | func (_e *MockLabelWidget_Expecter) SetCanFocus(canFocus interface{}) *MockLabelWidget_SetCanFocus_Call { | 7256 | + | func (_e *MockLabelWidget_Expecter) SetCanFocus(canFocus any) *MockLabelWidget_SetCanFocus_Call { |
| 7338 | return &MockLabelWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 7257 | return &MockLabelWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 7339 | } | 7258 | } | ||
| 7340 | 7259 | ||||
| @@ -7374,7 +7293,7 @@ type MockLabelWidget_SetCanTarget_Call struct { | |||||
| 7374 | 7293 | ||||
| 7375 | // SetCanTarget is a helper method to define mock.On call | 7294 | // SetCanTarget is a helper method to define mock.On call | ||
| 7376 | // - canTarget bool | 7295 | // - canTarget bool | ||
| 7377 | - | func (_e *MockLabelWidget_Expecter) SetCanTarget(canTarget interface{}) *MockLabelWidget_SetCanTarget_Call { | 7296 | + | func (_e *MockLabelWidget_Expecter) SetCanTarget(canTarget any) *MockLabelWidget_SetCanTarget_Call { |
| 7378 | return &MockLabelWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 7297 | return &MockLabelWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 7379 | } | 7298 | } | ||
| 7380 | 7299 | ||||
| @@ -7414,7 +7333,7 @@ type MockLabelWidget_SetEllipsize_Call struct { | |||||
| 7414 | 7333 | ||||
| 7415 | // SetEllipsize is a helper method to define mock.On call | 7334 | // SetEllipsize is a helper method to define mock.On call | ||
| 7416 | // - mode layout.EllipsizeMode | 7335 | // - mode layout.EllipsizeMode | ||
| 7417 | - | func (_e *MockLabelWidget_Expecter) SetEllipsize(mode interface{}) *MockLabelWidget_SetEllipsize_Call { | 7336 | + | func (_e *MockLabelWidget_Expecter) SetEllipsize(mode any) *MockLabelWidget_SetEllipsize_Call { |
| 7418 | return &MockLabelWidget_SetEllipsize_Call{Call: _e.mock.On("SetEllipsize", mode)} | 7337 | return &MockLabelWidget_SetEllipsize_Call{Call: _e.mock.On("SetEllipsize", mode)} | ||
| 7419 | } | 7338 | } | ||
| 7420 | 7339 | ||||
| @@ -7454,7 +7373,7 @@ type MockLabelWidget_SetFocusOnClick_Call struct { | |||||
| 7454 | 7373 | ||||
| 7455 | // SetFocusOnClick is a helper method to define mock.On call | 7374 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 7456 | // - focusOnClick bool | 7375 | // - focusOnClick bool | ||
| 7457 | - | func (_e *MockLabelWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockLabelWidget_SetFocusOnClick_Call { | 7376 | + | func (_e *MockLabelWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockLabelWidget_SetFocusOnClick_Call { |
| 7458 | return &MockLabelWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 7377 | return &MockLabelWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 7459 | } | 7378 | } | ||
| 7460 | 7379 | ||||
| @@ -7494,7 +7413,7 @@ type MockLabelWidget_SetFocusable_Call struct { | |||||
| 7494 | 7413 | ||||
| 7495 | // SetFocusable is a helper method to define mock.On call | 7414 | // SetFocusable is a helper method to define mock.On call | ||
| 7496 | // - focusable bool | 7415 | // - focusable bool | ||
| 7497 | - | func (_e *MockLabelWidget_Expecter) SetFocusable(focusable interface{}) *MockLabelWidget_SetFocusable_Call { | 7416 | + | func (_e *MockLabelWidget_Expecter) SetFocusable(focusable any) *MockLabelWidget_SetFocusable_Call { |
| 7498 | return &MockLabelWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 7417 | return &MockLabelWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 7499 | } | 7418 | } | ||
| 7500 | 7419 | ||||
| @@ -7534,7 +7453,7 @@ type MockLabelWidget_SetHalign_Call struct { | |||||
| 7534 | 7453 | ||||
| 7535 | // SetHalign is a helper method to define mock.On call | 7454 | // SetHalign is a helper method to define mock.On call | ||
| 7536 | // - align gtk.Align | 7455 | // - align gtk.Align | ||
| 7537 | - | func (_e *MockLabelWidget_Expecter) SetHalign(align interface{}) *MockLabelWidget_SetHalign_Call { | 7456 | + | func (_e *MockLabelWidget_Expecter) SetHalign(align any) *MockLabelWidget_SetHalign_Call { |
| 7538 | return &MockLabelWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 7457 | return &MockLabelWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 7539 | } | 7458 | } | ||
| 7540 | 7459 | ||||
| @@ -7574,7 +7493,7 @@ type MockLabelWidget_SetHexpand_Call struct { | |||||
| 7574 | 7493 | ||||
| 7575 | // SetHexpand is a helper method to define mock.On call | 7494 | // SetHexpand is a helper method to define mock.On call | ||
| 7576 | // - expand bool | 7495 | // - expand bool | ||
| 7577 | - | func (_e *MockLabelWidget_Expecter) SetHexpand(expand interface{}) *MockLabelWidget_SetHexpand_Call { | 7496 | + | func (_e *MockLabelWidget_Expecter) SetHexpand(expand any) *MockLabelWidget_SetHexpand_Call { |
| 7578 | return &MockLabelWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 7497 | return &MockLabelWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 7579 | } | 7498 | } | ||
| 7580 | 7499 | ||||
| @@ -7614,7 +7533,7 @@ type MockLabelWidget_SetMarkup_Call struct { | |||||
| 7614 | 7533 | ||||
| 7615 | // SetMarkup is a helper method to define mock.On call | 7534 | // SetMarkup is a helper method to define mock.On call | ||
| 7616 | // - markup string | 7535 | // - markup string | ||
| 7617 | - | func (_e *MockLabelWidget_Expecter) SetMarkup(markup interface{}) *MockLabelWidget_SetMarkup_Call { | 7536 | + | func (_e *MockLabelWidget_Expecter) SetMarkup(markup any) *MockLabelWidget_SetMarkup_Call { |
| 7618 | return &MockLabelWidget_SetMarkup_Call{Call: _e.mock.On("SetMarkup", markup)} | 7537 | return &MockLabelWidget_SetMarkup_Call{Call: _e.mock.On("SetMarkup", markup)} | ||
| 7619 | } | 7538 | } | ||
| 7620 | 7539 | ||||
| @@ -7654,7 +7573,7 @@ type MockLabelWidget_SetMaxWidthChars_Call struct { | |||||
| 7654 | 7573 | ||||
| 7655 | // SetMaxWidthChars is a helper method to define mock.On call | 7574 | // SetMaxWidthChars is a helper method to define mock.On call | ||
| 7656 | // - nChars int | 7575 | // - nChars int | ||
| 7657 | - | func (_e *MockLabelWidget_Expecter) SetMaxWidthChars(nChars interface{}) *MockLabelWidget_SetMaxWidthChars_Call { | 7576 | + | func (_e *MockLabelWidget_Expecter) SetMaxWidthChars(nChars any) *MockLabelWidget_SetMaxWidthChars_Call { |
| 7658 | return &MockLabelWidget_SetMaxWidthChars_Call{Call: _e.mock.On("SetMaxWidthChars", nChars)} | 7577 | return &MockLabelWidget_SetMaxWidthChars_Call{Call: _e.mock.On("SetMaxWidthChars", nChars)} | ||
| 7659 | } | 7578 | } | ||
| 7660 | 7579 | ||||
| @@ -7694,7 +7613,7 @@ type MockLabelWidget_SetOpacity_Call struct { | |||||
| 7694 | 7613 | ||||
| 7695 | // SetOpacity is a helper method to define mock.On call | 7614 | // SetOpacity is a helper method to define mock.On call | ||
| 7696 | // - opacity float64 | 7615 | // - opacity float64 | ||
| 7697 | - | func (_e *MockLabelWidget_Expecter) SetOpacity(opacity interface{}) *MockLabelWidget_SetOpacity_Call { | 7616 | + | func (_e *MockLabelWidget_Expecter) SetOpacity(opacity any) *MockLabelWidget_SetOpacity_Call { |
| 7698 | return &MockLabelWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 7617 | return &MockLabelWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 7699 | } | 7618 | } | ||
| 7700 | 7619 | ||||
| @@ -7735,7 +7654,7 @@ type MockLabelWidget_SetSizeRequest_Call struct { | |||||
| 7735 | // SetSizeRequest is a helper method to define mock.On call | 7654 | // SetSizeRequest is a helper method to define mock.On call | ||
| 7736 | // - width int | 7655 | // - width int | ||
| 7737 | // - height int | 7656 | // - height int | ||
| 7738 | - | func (_e *MockLabelWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockLabelWidget_SetSizeRequest_Call { | 7657 | + | func (_e *MockLabelWidget_Expecter) SetSizeRequest(width any, height any) *MockLabelWidget_SetSizeRequest_Call { |
| 7739 | return &MockLabelWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 7658 | return &MockLabelWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 7740 | } | 7659 | } | ||
| 7741 | 7660 | ||||
| @@ -7780,7 +7699,7 @@ type MockLabelWidget_SetText_Call struct { | |||||
| 7780 | 7699 | ||||
| 7781 | // SetText is a helper method to define mock.On call | 7700 | // SetText is a helper method to define mock.On call | ||
| 7782 | // - text string | 7701 | // - text string | ||
| 7783 | - | func (_e *MockLabelWidget_Expecter) SetText(text interface{}) *MockLabelWidget_SetText_Call { | 7702 | + | func (_e *MockLabelWidget_Expecter) SetText(text any) *MockLabelWidget_SetText_Call { |
| 7784 | return &MockLabelWidget_SetText_Call{Call: _e.mock.On("SetText", text)} | 7703 | return &MockLabelWidget_SetText_Call{Call: _e.mock.On("SetText", text)} | ||
| 7785 | } | 7704 | } | ||
| 7786 | 7705 | ||||
| @@ -7820,7 +7739,7 @@ type MockLabelWidget_SetValign_Call struct { | |||||
| 7820 | 7739 | ||||
| 7821 | // SetValign is a helper method to define mock.On call | 7740 | // SetValign is a helper method to define mock.On call | ||
| 7822 | // - align gtk.Align | 7741 | // - align gtk.Align | ||
| 7823 | - | func (_e *MockLabelWidget_Expecter) SetValign(align interface{}) *MockLabelWidget_SetValign_Call { | 7742 | + | func (_e *MockLabelWidget_Expecter) SetValign(align any) *MockLabelWidget_SetValign_Call { |
| 7824 | return &MockLabelWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 7743 | return &MockLabelWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 7825 | } | 7744 | } | ||
| 7826 | 7745 | ||||
| @@ -7860,7 +7779,7 @@ type MockLabelWidget_SetVexpand_Call struct { | |||||
| 7860 | 7779 | ||||
| 7861 | // SetVexpand is a helper method to define mock.On call | 7780 | // SetVexpand is a helper method to define mock.On call | ||
| 7862 | // - expand bool | 7781 | // - expand bool | ||
| 7863 | - | func (_e *MockLabelWidget_Expecter) SetVexpand(expand interface{}) *MockLabelWidget_SetVexpand_Call { | 7782 | + | func (_e *MockLabelWidget_Expecter) SetVexpand(expand any) *MockLabelWidget_SetVexpand_Call { |
| 7864 | return &MockLabelWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 7783 | return &MockLabelWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 7865 | } | 7784 | } | ||
| 7866 | 7785 | ||||
| @@ -7900,7 +7819,7 @@ type MockLabelWidget_SetVisible_Call struct { | |||||
| 7900 | 7819 | ||||
| 7901 | // SetVisible is a helper method to define mock.On call | 7820 | // SetVisible is a helper method to define mock.On call | ||
| 7902 | // - visible bool | 7821 | // - visible bool | ||
| 7903 | - | func (_e *MockLabelWidget_Expecter) SetVisible(visible interface{}) *MockLabelWidget_SetVisible_Call { | 7822 | + | func (_e *MockLabelWidget_Expecter) SetVisible(visible any) *MockLabelWidget_SetVisible_Call { |
| 7904 | return &MockLabelWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 7823 | return &MockLabelWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 7905 | } | 7824 | } | ||
| 7906 | 7825 | ||||
| @@ -7940,7 +7859,7 @@ type MockLabelWidget_SetXalign_Call struct { | |||||
| 7940 | 7859 | ||||
| 7941 | // SetXalign is a helper method to define mock.On call | 7860 | // SetXalign is a helper method to define mock.On call | ||
| 7942 | // - xalign float32 | 7861 | // - xalign float32 | ||
| 7943 | - | func (_e *MockLabelWidget_Expecter) SetXalign(xalign interface{}) *MockLabelWidget_SetXalign_Call { | 7862 | + | func (_e *MockLabelWidget_Expecter) SetXalign(xalign any) *MockLabelWidget_SetXalign_Call { |
| 7944 | return &MockLabelWidget_SetXalign_Call{Call: _e.mock.On("SetXalign", xalign)} | 7863 | return &MockLabelWidget_SetXalign_Call{Call: _e.mock.On("SetXalign", xalign)} | ||
| 7945 | } | 7864 | } | ||
| 7946 | 7865 | ||||
| @@ -8073,7 +7992,7 @@ type MockButtonWidget_AddController_Call struct { | |||||
| 8073 | 7992 | ||||
| 8074 | // AddController is a helper method to define mock.On call | 7993 | // AddController is a helper method to define mock.On call | ||
| 8075 | // - controller *gtk.EventController | 7994 | // - controller *gtk.EventController | ||
| 8076 | - | func (_e *MockButtonWidget_Expecter) AddController(controller interface{}) *MockButtonWidget_AddController_Call { | 7995 | + | func (_e *MockButtonWidget_Expecter) AddController(controller any) *MockButtonWidget_AddController_Call { |
| 8077 | return &MockButtonWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 7996 | return &MockButtonWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 8078 | } | 7997 | } | ||
| 8079 | 7998 | ||||
| @@ -8113,7 +8032,7 @@ type MockButtonWidget_AddCssClass_Call struct { | |||||
| 8113 | 8032 | ||||
| 8114 | // AddCssClass is a helper method to define mock.On call | 8033 | // AddCssClass is a helper method to define mock.On call | ||
| 8115 | // - cssClass string | 8034 | // - cssClass string | ||
| 8116 | - | func (_e *MockButtonWidget_Expecter) AddCssClass(cssClass interface{}) *MockButtonWidget_AddCssClass_Call { | 8035 | + | func (_e *MockButtonWidget_Expecter) AddCssClass(cssClass any) *MockButtonWidget_AddCssClass_Call { |
| 8117 | return &MockButtonWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 8036 | return &MockButtonWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 8118 | } | 8037 | } | ||
| 8119 | 8038 | ||||
| @@ -8179,7 +8098,7 @@ type MockButtonWidget_ComputePoint_Call struct { | |||||
| 8179 | 8098 | ||||
| 8180 | // ComputePoint is a helper method to define mock.On call | 8099 | // ComputePoint is a helper method to define mock.On call | ||
| 8181 | // - target layout.Widget | 8100 | // - target layout.Widget | ||
| 8182 | - | func (_e *MockButtonWidget_Expecter) ComputePoint(target interface{}) *MockButtonWidget_ComputePoint_Call { | 8101 | + | func (_e *MockButtonWidget_Expecter) ComputePoint(target any) *MockButtonWidget_ComputePoint_Call { |
| 8183 | return &MockButtonWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 8102 | return &MockButtonWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 8184 | } | 8103 | } | ||
| 8185 | 8104 | ||||
| @@ -8230,7 +8149,7 @@ type MockButtonWidget_ConnectClicked_Call struct { | |||||
| 8230 | 8149 | ||||
| 8231 | // ConnectClicked is a helper method to define mock.On call | 8150 | // ConnectClicked is a helper method to define mock.On call | ||
| 8232 | // - callback func() | 8151 | // - callback func() | ||
| 8233 | - | func (_e *MockButtonWidget_Expecter) ConnectClicked(callback interface{}) *MockButtonWidget_ConnectClicked_Call { | 8152 | + | func (_e *MockButtonWidget_Expecter) ConnectClicked(callback any) *MockButtonWidget_ConnectClicked_Call { |
| 8234 | return &MockButtonWidget_ConnectClicked_Call{Call: _e.mock.On("ConnectClicked", callback)} | 8153 | return &MockButtonWidget_ConnectClicked_Call{Call: _e.mock.On("ConnectClicked", callback)} | ||
| 8235 | } | 8154 | } | ||
| 8236 | 8155 | ||||
| @@ -8683,7 +8602,7 @@ type MockButtonWidget_HasCssClass_Call struct { | |||||
| 8683 | 8602 | ||||
| 8684 | // HasCssClass is a helper method to define mock.On call | 8603 | // HasCssClass is a helper method to define mock.On call | ||
| 8685 | // - cssClass string | 8604 | // - cssClass string | ||
| 8686 | - | func (_e *MockButtonWidget_Expecter) HasCssClass(cssClass interface{}) *MockButtonWidget_HasCssClass_Call { | 8605 | + | func (_e *MockButtonWidget_Expecter) HasCssClass(cssClass any) *MockButtonWidget_HasCssClass_Call { |
| 8687 | return &MockButtonWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 8606 | return &MockButtonWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 8688 | } | 8607 | } | ||
| 8689 | 8608 | ||||
| @@ -8844,7 +8763,7 @@ type MockButtonWidget_RemoveCssClass_Call struct { | |||||
| 8844 | 8763 | ||||
| 8845 | // RemoveCssClass is a helper method to define mock.On call | 8764 | // RemoveCssClass is a helper method to define mock.On call | ||
| 8846 | // - cssClass string | 8765 | // - cssClass string | ||
| 8847 | - | func (_e *MockButtonWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockButtonWidget_RemoveCssClass_Call { | 8766 | + | func (_e *MockButtonWidget_Expecter) RemoveCssClass(cssClass any) *MockButtonWidget_RemoveCssClass_Call { |
| 8848 | return &MockButtonWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 8767 | return &MockButtonWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 8849 | } | 8768 | } | ||
| 8850 | 8769 | ||||
| @@ -8884,7 +8803,7 @@ type MockButtonWidget_SetCanFocus_Call struct { | |||||
| 8884 | 8803 | ||||
| 8885 | // SetCanFocus is a helper method to define mock.On call | 8804 | // SetCanFocus is a helper method to define mock.On call | ||
| 8886 | // - canFocus bool | 8805 | // - canFocus bool | ||
| 8887 | - | func (_e *MockButtonWidget_Expecter) SetCanFocus(canFocus interface{}) *MockButtonWidget_SetCanFocus_Call { | 8806 | + | func (_e *MockButtonWidget_Expecter) SetCanFocus(canFocus any) *MockButtonWidget_SetCanFocus_Call { |
| 8888 | return &MockButtonWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 8807 | return &MockButtonWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 8889 | } | 8808 | } | ||
| 8890 | 8809 | ||||
| @@ -8924,7 +8843,7 @@ type MockButtonWidget_SetCanTarget_Call struct { | |||||
| 8924 | 8843 | ||||
| 8925 | // SetCanTarget is a helper method to define mock.On call | 8844 | // SetCanTarget is a helper method to define mock.On call | ||
| 8926 | // - canTarget bool | 8845 | // - canTarget bool | ||
| 8927 | - | func (_e *MockButtonWidget_Expecter) SetCanTarget(canTarget interface{}) *MockButtonWidget_SetCanTarget_Call { | 8846 | + | func (_e *MockButtonWidget_Expecter) SetCanTarget(canTarget any) *MockButtonWidget_SetCanTarget_Call { |
| 8928 | return &MockButtonWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 8847 | return &MockButtonWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 8929 | } | 8848 | } | ||
| 8930 | 8849 | ||||
| @@ -8964,7 +8883,7 @@ type MockButtonWidget_SetChild_Call struct { | |||||
| 8964 | 8883 | ||||
| 8965 | // SetChild is a helper method to define mock.On call | 8884 | // SetChild is a helper method to define mock.On call | ||
| 8966 | // - child layout.Widget | 8885 | // - child layout.Widget | ||
| 8967 | - | func (_e *MockButtonWidget_Expecter) SetChild(child interface{}) *MockButtonWidget_SetChild_Call { | 8886 | + | func (_e *MockButtonWidget_Expecter) SetChild(child any) *MockButtonWidget_SetChild_Call { |
| 8968 | return &MockButtonWidget_SetChild_Call{Call: _e.mock.On("SetChild", child)} | 8887 | return &MockButtonWidget_SetChild_Call{Call: _e.mock.On("SetChild", child)} | ||
| 8969 | } | 8888 | } | ||
| 8970 | 8889 | ||||
| @@ -9004,7 +8923,7 @@ type MockButtonWidget_SetFocusOnClick_Call struct { | |||||
| 9004 | 8923 | ||||
| 9005 | // SetFocusOnClick is a helper method to define mock.On call | 8924 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 9006 | // - focusOnClick bool | 8925 | // - focusOnClick bool | ||
| 9007 | - | func (_e *MockButtonWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockButtonWidget_SetFocusOnClick_Call { | 8926 | + | func (_e *MockButtonWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockButtonWidget_SetFocusOnClick_Call { |
| 9008 | return &MockButtonWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 8927 | return &MockButtonWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 9009 | } | 8928 | } | ||
| 9010 | 8929 | ||||
| @@ -9044,7 +8963,7 @@ type MockButtonWidget_SetFocusable_Call struct { | |||||
| 9044 | 8963 | ||||
| 9045 | // SetFocusable is a helper method to define mock.On call | 8964 | // SetFocusable is a helper method to define mock.On call | ||
| 9046 | // - focusable bool | 8965 | // - focusable bool | ||
| 9047 | - | func (_e *MockButtonWidget_Expecter) SetFocusable(focusable interface{}) *MockButtonWidget_SetFocusable_Call { | 8966 | + | func (_e *MockButtonWidget_Expecter) SetFocusable(focusable any) *MockButtonWidget_SetFocusable_Call { |
| 9048 | return &MockButtonWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 8967 | return &MockButtonWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 9049 | } | 8968 | } | ||
| 9050 | 8969 | ||||
| @@ -9084,7 +9003,7 @@ type MockButtonWidget_SetHalign_Call struct { | |||||
| 9084 | 9003 | ||||
| 9085 | // SetHalign is a helper method to define mock.On call | 9004 | // SetHalign is a helper method to define mock.On call | ||
| 9086 | // - align gtk.Align | 9005 | // - align gtk.Align | ||
| 9087 | - | func (_e *MockButtonWidget_Expecter) SetHalign(align interface{}) *MockButtonWidget_SetHalign_Call { | 9006 | + | func (_e *MockButtonWidget_Expecter) SetHalign(align any) *MockButtonWidget_SetHalign_Call { |
| 9088 | return &MockButtonWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 9007 | return &MockButtonWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 9089 | } | 9008 | } | ||
| 9090 | 9009 | ||||
| @@ -9124,7 +9043,7 @@ type MockButtonWidget_SetHexpand_Call struct { | |||||
| 9124 | 9043 | ||||
| 9125 | // SetHexpand is a helper method to define mock.On call | 9044 | // SetHexpand is a helper method to define mock.On call | ||
| 9126 | // - expand bool | 9045 | // - expand bool | ||
| 9127 | - | func (_e *MockButtonWidget_Expecter) SetHexpand(expand interface{}) *MockButtonWidget_SetHexpand_Call { | 9046 | + | func (_e *MockButtonWidget_Expecter) SetHexpand(expand any) *MockButtonWidget_SetHexpand_Call { |
| 9128 | return &MockButtonWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 9047 | return &MockButtonWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 9129 | } | 9048 | } | ||
| 9130 | 9049 | ||||
| @@ -9164,7 +9083,7 @@ type MockButtonWidget_SetIconName_Call struct { | |||||
| 9164 | 9083 | ||||
| 9165 | // SetIconName is a helper method to define mock.On call | 9084 | // SetIconName is a helper method to define mock.On call | ||
| 9166 | // - iconName string | 9085 | // - iconName string | ||
| 9167 | - | func (_e *MockButtonWidget_Expecter) SetIconName(iconName interface{}) *MockButtonWidget_SetIconName_Call { | 9086 | + | func (_e *MockButtonWidget_Expecter) SetIconName(iconName any) *MockButtonWidget_SetIconName_Call { |
| 9168 | return &MockButtonWidget_SetIconName_Call{Call: _e.mock.On("SetIconName", iconName)} | 9087 | return &MockButtonWidget_SetIconName_Call{Call: _e.mock.On("SetIconName", iconName)} | ||
| 9169 | } | 9088 | } | ||
| 9170 | 9089 | ||||
| @@ -9204,7 +9123,7 @@ type MockButtonWidget_SetLabel_Call struct { | |||||
| 9204 | 9123 | ||||
| 9205 | // SetLabel is a helper method to define mock.On call | 9124 | // SetLabel is a helper method to define mock.On call | ||
| 9206 | // - label string | 9125 | // - label string | ||
| 9207 | - | func (_e *MockButtonWidget_Expecter) SetLabel(label interface{}) *MockButtonWidget_SetLabel_Call { | 9126 | + | func (_e *MockButtonWidget_Expecter) SetLabel(label any) *MockButtonWidget_SetLabel_Call { |
| 9208 | return &MockButtonWidget_SetLabel_Call{Call: _e.mock.On("SetLabel", label)} | 9127 | return &MockButtonWidget_SetLabel_Call{Call: _e.mock.On("SetLabel", label)} | ||
| 9209 | } | 9128 | } | ||
| 9210 | 9129 | ||||
| @@ -9244,7 +9163,7 @@ type MockButtonWidget_SetOpacity_Call struct { | |||||
| 9244 | 9163 | ||||
| 9245 | // SetOpacity is a helper method to define mock.On call | 9164 | // SetOpacity is a helper method to define mock.On call | ||
| 9246 | // - opacity float64 | 9165 | // - opacity float64 | ||
| 9247 | - | func (_e *MockButtonWidget_Expecter) SetOpacity(opacity interface{}) *MockButtonWidget_SetOpacity_Call { | 9166 | + | func (_e *MockButtonWidget_Expecter) SetOpacity(opacity any) *MockButtonWidget_SetOpacity_Call { |
| 9248 | return &MockButtonWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 9167 | return &MockButtonWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 9249 | } | 9168 | } | ||
| 9250 | 9169 | ||||
| @@ -9285,7 +9204,7 @@ type MockButtonWidget_SetSizeRequest_Call struct { | |||||
| 9285 | // SetSizeRequest is a helper method to define mock.On call | 9204 | // SetSizeRequest is a helper method to define mock.On call | ||
| 9286 | // - width int | 9205 | // - width int | ||
| 9287 | // - height int | 9206 | // - height int | ||
| 9288 | - | func (_e *MockButtonWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockButtonWidget_SetSizeRequest_Call { | 9207 | + | func (_e *MockButtonWidget_Expecter) SetSizeRequest(width any, height any) *MockButtonWidget_SetSizeRequest_Call { |
| 9289 | return &MockButtonWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 9208 | return &MockButtonWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 9290 | } | 9209 | } | ||
| 9291 | 9210 | ||||
| @@ -9330,7 +9249,7 @@ type MockButtonWidget_SetValign_Call struct { | |||||
| 9330 | 9249 | ||||
| 9331 | // SetValign is a helper method to define mock.On call | 9250 | // SetValign is a helper method to define mock.On call | ||
| 9332 | // - align gtk.Align | 9251 | // - align gtk.Align | ||
| 9333 | - | func (_e *MockButtonWidget_Expecter) SetValign(align interface{}) *MockButtonWidget_SetValign_Call { | 9252 | + | func (_e *MockButtonWidget_Expecter) SetValign(align any) *MockButtonWidget_SetValign_Call { |
| 9334 | return &MockButtonWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 9253 | return &MockButtonWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 9335 | } | 9254 | } | ||
| 9336 | 9255 | ||||
| @@ -9370,7 +9289,7 @@ type MockButtonWidget_SetVexpand_Call struct { | |||||
| 9370 | 9289 | ||||
| 9371 | // SetVexpand is a helper method to define mock.On call | 9290 | // SetVexpand is a helper method to define mock.On call | ||
| 9372 | // - expand bool | 9291 | // - expand bool | ||
| 9373 | - | func (_e *MockButtonWidget_Expecter) SetVexpand(expand interface{}) *MockButtonWidget_SetVexpand_Call { | 9292 | + | func (_e *MockButtonWidget_Expecter) SetVexpand(expand any) *MockButtonWidget_SetVexpand_Call { |
| 9374 | return &MockButtonWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 9293 | return &MockButtonWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 9375 | } | 9294 | } | ||
| 9376 | 9295 | ||||
| @@ -9410,7 +9329,7 @@ type MockButtonWidget_SetVisible_Call struct { | |||||
| 9410 | 9329 | ||||
| 9411 | // SetVisible is a helper method to define mock.On call | 9330 | // SetVisible is a helper method to define mock.On call | ||
| 9412 | // - visible bool | 9331 | // - visible bool | ||
| 9413 | - | func (_e *MockButtonWidget_Expecter) SetVisible(visible interface{}) *MockButtonWidget_SetVisible_Call { | 9332 | + | func (_e *MockButtonWidget_Expecter) SetVisible(visible any) *MockButtonWidget_SetVisible_Call { |
| 9414 | return &MockButtonWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 9333 | return &MockButtonWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 9415 | } | 9334 | } | ||
| 9416 | 9335 | ||||
| @@ -9543,7 +9462,7 @@ type MockImageWidget_AddController_Call struct { | |||||
| 9543 | 9462 | ||||
| 9544 | // AddController is a helper method to define mock.On call | 9463 | // AddController is a helper method to define mock.On call | ||
| 9545 | // - controller *gtk.EventController | 9464 | // - controller *gtk.EventController | ||
| 9546 | - | func (_e *MockImageWidget_Expecter) AddController(controller interface{}) *MockImageWidget_AddController_Call { | 9465 | + | func (_e *MockImageWidget_Expecter) AddController(controller any) *MockImageWidget_AddController_Call { |
| 9547 | return &MockImageWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 9466 | return &MockImageWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 9548 | } | 9467 | } | ||
| 9549 | 9468 | ||||
| @@ -9583,7 +9502,7 @@ type MockImageWidget_AddCssClass_Call struct { | |||||
| 9583 | 9502 | ||||
| 9584 | // AddCssClass is a helper method to define mock.On call | 9503 | // AddCssClass is a helper method to define mock.On call | ||
| 9585 | // - cssClass string | 9504 | // - cssClass string | ||
| 9586 | - | func (_e *MockImageWidget_Expecter) AddCssClass(cssClass interface{}) *MockImageWidget_AddCssClass_Call { | 9505 | + | func (_e *MockImageWidget_Expecter) AddCssClass(cssClass any) *MockImageWidget_AddCssClass_Call { |
| 9587 | return &MockImageWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 9506 | return &MockImageWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 9588 | } | 9507 | } | ||
| 9589 | 9508 | ||||
| @@ -9682,7 +9601,7 @@ type MockImageWidget_ComputePoint_Call struct { | |||||
| 9682 | 9601 | ||||
| 9683 | // ComputePoint is a helper method to define mock.On call | 9602 | // ComputePoint is a helper method to define mock.On call | ||
| 9684 | // - target layout.Widget | 9603 | // - target layout.Widget | ||
| 9685 | - | func (_e *MockImageWidget_Expecter) ComputePoint(target interface{}) *MockImageWidget_ComputePoint_Call { | 9604 | + | func (_e *MockImageWidget_Expecter) ComputePoint(target any) *MockImageWidget_ComputePoint_Call { |
| 9686 | return &MockImageWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 9605 | return &MockImageWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 9687 | } | 9606 | } | ||
| 9688 | 9607 | ||||
| @@ -10045,7 +9964,7 @@ type MockImageWidget_HasCssClass_Call struct { | |||||
| 10045 | 9964 | ||||
| 10046 | // HasCssClass is a helper method to define mock.On call | 9965 | // HasCssClass is a helper method to define mock.On call | ||
| 10047 | // - cssClass string | 9966 | // - cssClass string | ||
| 10048 | - | func (_e *MockImageWidget_Expecter) HasCssClass(cssClass interface{}) *MockImageWidget_HasCssClass_Call { | 9967 | + | func (_e *MockImageWidget_Expecter) HasCssClass(cssClass any) *MockImageWidget_HasCssClass_Call { |
| 10049 | return &MockImageWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 9968 | return &MockImageWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 10050 | } | 9969 | } | ||
| 10051 | 9970 | ||||
| @@ -10206,7 +10125,7 @@ type MockImageWidget_RemoveCssClass_Call struct { | |||||
| 10206 | 10125 | ||||
| 10207 | // RemoveCssClass is a helper method to define mock.On call | 10126 | // RemoveCssClass is a helper method to define mock.On call | ||
| 10208 | // - cssClass string | 10127 | // - cssClass string | ||
| 10209 | - | func (_e *MockImageWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockImageWidget_RemoveCssClass_Call { | 10128 | + | func (_e *MockImageWidget_Expecter) RemoveCssClass(cssClass any) *MockImageWidget_RemoveCssClass_Call { |
| 10210 | return &MockImageWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 10129 | return &MockImageWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 10211 | } | 10130 | } | ||
| 10212 | 10131 | ||||
| @@ -10246,7 +10165,7 @@ type MockImageWidget_SetCanFocus_Call struct { | |||||
| 10246 | 10165 | ||||
| 10247 | // SetCanFocus is a helper method to define mock.On call | 10166 | // SetCanFocus is a helper method to define mock.On call | ||
| 10248 | // - canFocus bool | 10167 | // - canFocus bool | ||
| 10249 | - | func (_e *MockImageWidget_Expecter) SetCanFocus(canFocus interface{}) *MockImageWidget_SetCanFocus_Call { | 10168 | + | func (_e *MockImageWidget_Expecter) SetCanFocus(canFocus any) *MockImageWidget_SetCanFocus_Call { |
| 10250 | return &MockImageWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 10169 | return &MockImageWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 10251 | } | 10170 | } | ||
| 10252 | 10171 | ||||
| @@ -10286,7 +10205,7 @@ type MockImageWidget_SetCanTarget_Call struct { | |||||
| 10286 | 10205 | ||||
| 10287 | // SetCanTarget is a helper method to define mock.On call | 10206 | // SetCanTarget is a helper method to define mock.On call | ||
| 10288 | // - canTarget bool | 10207 | // - canTarget bool | ||
| 10289 | - | func (_e *MockImageWidget_Expecter) SetCanTarget(canTarget interface{}) *MockImageWidget_SetCanTarget_Call { | 10208 | + | func (_e *MockImageWidget_Expecter) SetCanTarget(canTarget any) *MockImageWidget_SetCanTarget_Call { |
| 10290 | return &MockImageWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 10209 | return &MockImageWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 10291 | } | 10210 | } | ||
| 10292 | 10211 | ||||
| @@ -10326,7 +10245,7 @@ type MockImageWidget_SetFocusOnClick_Call struct { | |||||
| 10326 | 10245 | ||||
| 10327 | // SetFocusOnClick is a helper method to define mock.On call | 10246 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 10328 | // - focusOnClick bool | 10247 | // - focusOnClick bool | ||
| 10329 | - | func (_e *MockImageWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockImageWidget_SetFocusOnClick_Call { | 10248 | + | func (_e *MockImageWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockImageWidget_SetFocusOnClick_Call { |
| 10330 | return &MockImageWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 10249 | return &MockImageWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 10331 | } | 10250 | } | ||
| 10332 | 10251 | ||||
| @@ -10366,7 +10285,7 @@ type MockImageWidget_SetFocusable_Call struct { | |||||
| 10366 | 10285 | ||||
| 10367 | // SetFocusable is a helper method to define mock.On call | 10286 | // SetFocusable is a helper method to define mock.On call | ||
| 10368 | // - focusable bool | 10287 | // - focusable bool | ||
| 10369 | - | func (_e *MockImageWidget_Expecter) SetFocusable(focusable interface{}) *MockImageWidget_SetFocusable_Call { | 10288 | + | func (_e *MockImageWidget_Expecter) SetFocusable(focusable any) *MockImageWidget_SetFocusable_Call { |
| 10370 | return &MockImageWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 10289 | return &MockImageWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 10371 | } | 10290 | } | ||
| 10372 | 10291 | ||||
| @@ -10406,7 +10325,7 @@ type MockImageWidget_SetFromFile_Call struct { | |||||
| 10406 | 10325 | ||||
| 10407 | // SetFromFile is a helper method to define mock.On call | 10326 | // SetFromFile is a helper method to define mock.On call | ||
| 10408 | // - filename string | 10327 | // - filename string | ||
| 10409 | - | func (_e *MockImageWidget_Expecter) SetFromFile(filename interface{}) *MockImageWidget_SetFromFile_Call { | 10328 | + | func (_e *MockImageWidget_Expecter) SetFromFile(filename any) *MockImageWidget_SetFromFile_Call { |
| 10410 | return &MockImageWidget_SetFromFile_Call{Call: _e.mock.On("SetFromFile", filename)} | 10329 | return &MockImageWidget_SetFromFile_Call{Call: _e.mock.On("SetFromFile", filename)} | ||
| 10411 | } | 10330 | } | ||
| 10412 | 10331 | ||||
| @@ -10446,7 +10365,7 @@ type MockImageWidget_SetFromIconName_Call struct { | |||||
| 10446 | 10365 | ||||
| 10447 | // SetFromIconName is a helper method to define mock.On call | 10366 | // SetFromIconName is a helper method to define mock.On call | ||
| 10448 | // - iconName string | 10367 | // - iconName string | ||
| 10449 | - | func (_e *MockImageWidget_Expecter) SetFromIconName(iconName interface{}) *MockImageWidget_SetFromIconName_Call { | 10368 | + | func (_e *MockImageWidget_Expecter) SetFromIconName(iconName any) *MockImageWidget_SetFromIconName_Call { |
| 10450 | return &MockImageWidget_SetFromIconName_Call{Call: _e.mock.On("SetFromIconName", iconName)} | 10369 | return &MockImageWidget_SetFromIconName_Call{Call: _e.mock.On("SetFromIconName", iconName)} | ||
| 10451 | } | 10370 | } | ||
| 10452 | 10371 | ||||
| @@ -10486,7 +10405,7 @@ type MockImageWidget_SetFromPaintable_Call struct { | |||||
| 10486 | 10405 | ||||
| 10487 | // SetFromPaintable is a helper method to define mock.On call | 10406 | // SetFromPaintable is a helper method to define mock.On call | ||
| 10488 | // - paintable layout.Paintable | 10407 | // - paintable layout.Paintable | ||
| 10489 | - | func (_e *MockImageWidget_Expecter) SetFromPaintable(paintable interface{}) *MockImageWidget_SetFromPaintable_Call { | 10408 | + | func (_e *MockImageWidget_Expecter) SetFromPaintable(paintable any) *MockImageWidget_SetFromPaintable_Call { |
| 10490 | return &MockImageWidget_SetFromPaintable_Call{Call: _e.mock.On("SetFromPaintable", paintable)} | 10409 | return &MockImageWidget_SetFromPaintable_Call{Call: _e.mock.On("SetFromPaintable", paintable)} | ||
| 10491 | } | 10410 | } | ||
| 10492 | 10411 | ||||
| @@ -10526,7 +10445,7 @@ type MockImageWidget_SetHalign_Call struct { | |||||
| 10526 | 10445 | ||||
| 10527 | // SetHalign is a helper method to define mock.On call | 10446 | // SetHalign is a helper method to define mock.On call | ||
| 10528 | // - align gtk.Align | 10447 | // - align gtk.Align | ||
| 10529 | - | func (_e *MockImageWidget_Expecter) SetHalign(align interface{}) *MockImageWidget_SetHalign_Call { | 10448 | + | func (_e *MockImageWidget_Expecter) SetHalign(align any) *MockImageWidget_SetHalign_Call { |
| 10530 | return &MockImageWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 10449 | return &MockImageWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 10531 | } | 10450 | } | ||
| 10532 | 10451 | ||||
| @@ -10566,7 +10485,7 @@ type MockImageWidget_SetHexpand_Call struct { | |||||
| 10566 | 10485 | ||||
| 10567 | // SetHexpand is a helper method to define mock.On call | 10486 | // SetHexpand is a helper method to define mock.On call | ||
| 10568 | // - expand bool | 10487 | // - expand bool | ||
| 10569 | - | func (_e *MockImageWidget_Expecter) SetHexpand(expand interface{}) *MockImageWidget_SetHexpand_Call { | 10488 | + | func (_e *MockImageWidget_Expecter) SetHexpand(expand any) *MockImageWidget_SetHexpand_Call { |
| 10570 | return &MockImageWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 10489 | return &MockImageWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 10571 | } | 10490 | } | ||
| 10572 | 10491 | ||||
| @@ -10606,7 +10525,7 @@ type MockImageWidget_SetOpacity_Call struct { | |||||
| 10606 | 10525 | ||||
| 10607 | // SetOpacity is a helper method to define mock.On call | 10526 | // SetOpacity is a helper method to define mock.On call | ||
| 10608 | // - opacity float64 | 10527 | // - opacity float64 | ||
| 10609 | - | func (_e *MockImageWidget_Expecter) SetOpacity(opacity interface{}) *MockImageWidget_SetOpacity_Call { | 10528 | + | func (_e *MockImageWidget_Expecter) SetOpacity(opacity any) *MockImageWidget_SetOpacity_Call { |
| 10610 | return &MockImageWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 10529 | return &MockImageWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 10611 | } | 10530 | } | ||
| 10612 | 10531 | ||||
| @@ -10646,7 +10565,7 @@ type MockImageWidget_SetPixelSize_Call struct { | |||||
| 10646 | 10565 | ||||
| 10647 | // SetPixelSize is a helper method to define mock.On call | 10566 | // SetPixelSize is a helper method to define mock.On call | ||
| 10648 | // - pixelSize int | 10567 | // - pixelSize int | ||
| 10649 | - | func (_e *MockImageWidget_Expecter) SetPixelSize(pixelSize interface{}) *MockImageWidget_SetPixelSize_Call { | 10568 | + | func (_e *MockImageWidget_Expecter) SetPixelSize(pixelSize any) *MockImageWidget_SetPixelSize_Call { |
| 10650 | return &MockImageWidget_SetPixelSize_Call{Call: _e.mock.On("SetPixelSize", pixelSize)} | 10569 | return &MockImageWidget_SetPixelSize_Call{Call: _e.mock.On("SetPixelSize", pixelSize)} | ||
| 10651 | } | 10570 | } | ||
| 10652 | 10571 | ||||
| @@ -10687,7 +10606,7 @@ type MockImageWidget_SetSizeRequest_Call struct { | |||||
| 10687 | // SetSizeRequest is a helper method to define mock.On call | 10606 | // SetSizeRequest is a helper method to define mock.On call | ||
| 10688 | // - width int | 10607 | // - width int | ||
| 10689 | // - height int | 10608 | // - height int | ||
| 10690 | - | func (_e *MockImageWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockImageWidget_SetSizeRequest_Call { | 10609 | + | func (_e *MockImageWidget_Expecter) SetSizeRequest(width any, height any) *MockImageWidget_SetSizeRequest_Call { |
| 10691 | return &MockImageWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 10610 | return &MockImageWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 10692 | } | 10611 | } | ||
| 10693 | 10612 | ||||
| @@ -10732,7 +10651,7 @@ type MockImageWidget_SetValign_Call struct { | |||||
| 10732 | 10651 | ||||
| 10733 | // SetValign is a helper method to define mock.On call | 10652 | // SetValign is a helper method to define mock.On call | ||
| 10734 | // - align gtk.Align | 10653 | // - align gtk.Align | ||
| 10735 | - | func (_e *MockImageWidget_Expecter) SetValign(align interface{}) *MockImageWidget_SetValign_Call { | 10654 | + | func (_e *MockImageWidget_Expecter) SetValign(align any) *MockImageWidget_SetValign_Call { |
| 10736 | return &MockImageWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 10655 | return &MockImageWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 10737 | } | 10656 | } | ||
| 10738 | 10657 | ||||
| @@ -10772,7 +10691,7 @@ type MockImageWidget_SetVexpand_Call struct { | |||||
| 10772 | 10691 | ||||
| 10773 | // SetVexpand is a helper method to define mock.On call | 10692 | // SetVexpand is a helper method to define mock.On call | ||
| 10774 | // - expand bool | 10693 | // - expand bool | ||
| 10775 | - | func (_e *MockImageWidget_Expecter) SetVexpand(expand interface{}) *MockImageWidget_SetVexpand_Call { | 10694 | + | func (_e *MockImageWidget_Expecter) SetVexpand(expand any) *MockImageWidget_SetVexpand_Call { |
| 10776 | return &MockImageWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 10695 | return &MockImageWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 10777 | } | 10696 | } | ||
| 10778 | 10697 | ||||
| @@ -10812,7 +10731,7 @@ type MockImageWidget_SetVisible_Call struct { | |||||
| 10812 | 10731 | ||||
| 10813 | // SetVisible is a helper method to define mock.On call | 10732 | // SetVisible is a helper method to define mock.On call | ||
| 10814 | // - visible bool | 10733 | // - visible bool | ||
| 10815 | - | func (_e *MockImageWidget_Expecter) SetVisible(visible interface{}) *MockImageWidget_SetVisible_Call { | 10734 | + | func (_e *MockImageWidget_Expecter) SetVisible(visible any) *MockImageWidget_SetVisible_Call { |
| 10816 | return &MockImageWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 10735 | return &MockImageWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 10817 | } | 10736 | } | ||
| 10818 | 10737 | ||||
| @@ -10945,7 +10864,7 @@ type MockProgressBarWidget_AddController_Call struct { | |||||
| 10945 | 10864 | ||||
| 10946 | // AddController is a helper method to define mock.On call | 10865 | // AddController is a helper method to define mock.On call | ||
| 10947 | // - controller *gtk.EventController | 10866 | // - controller *gtk.EventController | ||
| 10948 | - | func (_e *MockProgressBarWidget_Expecter) AddController(controller interface{}) *MockProgressBarWidget_AddController_Call { | 10867 | + | func (_e *MockProgressBarWidget_Expecter) AddController(controller any) *MockProgressBarWidget_AddController_Call { |
| 10949 | return &MockProgressBarWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 10868 | return &MockProgressBarWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 10950 | } | 10869 | } | ||
| 10951 | 10870 | ||||
| @@ -10985,7 +10904,7 @@ type MockProgressBarWidget_AddCssClass_Call struct { | |||||
| 10985 | 10904 | ||||
| 10986 | // AddCssClass is a helper method to define mock.On call | 10905 | // AddCssClass is a helper method to define mock.On call | ||
| 10987 | // - cssClass string | 10906 | // - cssClass string | ||
| 10988 | - | func (_e *MockProgressBarWidget_Expecter) AddCssClass(cssClass interface{}) *MockProgressBarWidget_AddCssClass_Call { | 10907 | + | func (_e *MockProgressBarWidget_Expecter) AddCssClass(cssClass any) *MockProgressBarWidget_AddCssClass_Call { |
| 10989 | return &MockProgressBarWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 10908 | return &MockProgressBarWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 10990 | } | 10909 | } | ||
| 10991 | 10910 | ||||
| @@ -11051,7 +10970,7 @@ type MockProgressBarWidget_ComputePoint_Call struct { | |||||
| 11051 | 10970 | ||||
| 11052 | // ComputePoint is a helper method to define mock.On call | 10971 | // ComputePoint is a helper method to define mock.On call | ||
| 11053 | // - target layout.Widget | 10972 | // - target layout.Widget | ||
| 11054 | - | func (_e *MockProgressBarWidget_Expecter) ComputePoint(target interface{}) *MockProgressBarWidget_ComputePoint_Call { | 10973 | + | func (_e *MockProgressBarWidget_Expecter) ComputePoint(target any) *MockProgressBarWidget_ComputePoint_Call { |
| 11055 | return &MockProgressBarWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 10974 | return &MockProgressBarWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 11056 | } | 10975 | } | ||
| 11057 | 10976 | ||||
| @@ -11458,7 +11377,7 @@ type MockProgressBarWidget_HasCssClass_Call struct { | |||||
| 11458 | 11377 | ||||
| 11459 | // HasCssClass is a helper method to define mock.On call | 11378 | // HasCssClass is a helper method to define mock.On call | ||
| 11460 | // - cssClass string | 11379 | // - cssClass string | ||
| 11461 | - | func (_e *MockProgressBarWidget_Expecter) HasCssClass(cssClass interface{}) *MockProgressBarWidget_HasCssClass_Call { | 11380 | + | func (_e *MockProgressBarWidget_Expecter) HasCssClass(cssClass any) *MockProgressBarWidget_HasCssClass_Call { |
| 11462 | return &MockProgressBarWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 11381 | return &MockProgressBarWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 11463 | } | 11382 | } | ||
| 11464 | 11383 | ||||
| @@ -11619,7 +11538,7 @@ type MockProgressBarWidget_RemoveCssClass_Call struct { | |||||
| 11619 | 11538 | ||||
| 11620 | // RemoveCssClass is a helper method to define mock.On call | 11539 | // RemoveCssClass is a helper method to define mock.On call | ||
| 11621 | // - cssClass string | 11540 | // - cssClass string | ||
| 11622 | - | func (_e *MockProgressBarWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockProgressBarWidget_RemoveCssClass_Call { | 11541 | + | func (_e *MockProgressBarWidget_Expecter) RemoveCssClass(cssClass any) *MockProgressBarWidget_RemoveCssClass_Call { |
| 11623 | return &MockProgressBarWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 11542 | return &MockProgressBarWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 11624 | } | 11543 | } | ||
| 11625 | 11544 | ||||
| @@ -11659,7 +11578,7 @@ type MockProgressBarWidget_SetCanFocus_Call struct { | |||||
| 11659 | 11578 | ||||
| 11660 | // SetCanFocus is a helper method to define mock.On call | 11579 | // SetCanFocus is a helper method to define mock.On call | ||
| 11661 | // - canFocus bool | 11580 | // - canFocus bool | ||
| 11662 | - | func (_e *MockProgressBarWidget_Expecter) SetCanFocus(canFocus interface{}) *MockProgressBarWidget_SetCanFocus_Call { | 11581 | + | func (_e *MockProgressBarWidget_Expecter) SetCanFocus(canFocus any) *MockProgressBarWidget_SetCanFocus_Call { |
| 11663 | return &MockProgressBarWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 11582 | return &MockProgressBarWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 11664 | } | 11583 | } | ||
| 11665 | 11584 | ||||
| @@ -11699,7 +11618,7 @@ type MockProgressBarWidget_SetCanTarget_Call struct { | |||||
| 11699 | 11618 | ||||
| 11700 | // SetCanTarget is a helper method to define mock.On call | 11619 | // SetCanTarget is a helper method to define mock.On call | ||
| 11701 | // - canTarget bool | 11620 | // - canTarget bool | ||
| 11702 | - | func (_e *MockProgressBarWidget_Expecter) SetCanTarget(canTarget interface{}) *MockProgressBarWidget_SetCanTarget_Call { | 11621 | + | func (_e *MockProgressBarWidget_Expecter) SetCanTarget(canTarget any) *MockProgressBarWidget_SetCanTarget_Call { |
| 11703 | return &MockProgressBarWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 11622 | return &MockProgressBarWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 11704 | } | 11623 | } | ||
| 11705 | 11624 | ||||
| @@ -11739,7 +11658,7 @@ type MockProgressBarWidget_SetFocusOnClick_Call struct { | |||||
| 11739 | 11658 | ||||
| 11740 | // SetFocusOnClick is a helper method to define mock.On call | 11659 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 11741 | // - focusOnClick bool | 11660 | // - focusOnClick bool | ||
| 11742 | - | func (_e *MockProgressBarWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockProgressBarWidget_SetFocusOnClick_Call { | 11661 | + | func (_e *MockProgressBarWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockProgressBarWidget_SetFocusOnClick_Call { |
| 11743 | return &MockProgressBarWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 11662 | return &MockProgressBarWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 11744 | } | 11663 | } | ||
| 11745 | 11664 | ||||
| @@ -11779,7 +11698,7 @@ type MockProgressBarWidget_SetFocusable_Call struct { | |||||
| 11779 | 11698 | ||||
| 11780 | // SetFocusable is a helper method to define mock.On call | 11699 | // SetFocusable is a helper method to define mock.On call | ||
| 11781 | // - focusable bool | 11700 | // - focusable bool | ||
| 11782 | - | func (_e *MockProgressBarWidget_Expecter) SetFocusable(focusable interface{}) *MockProgressBarWidget_SetFocusable_Call { | 11701 | + | func (_e *MockProgressBarWidget_Expecter) SetFocusable(focusable any) *MockProgressBarWidget_SetFocusable_Call { |
| 11783 | return &MockProgressBarWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 11702 | return &MockProgressBarWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 11784 | } | 11703 | } | ||
| 11785 | 11704 | ||||
| @@ -11819,7 +11738,7 @@ type MockProgressBarWidget_SetFraction_Call struct { | |||||
| 11819 | 11738 | ||||
| 11820 | // SetFraction is a helper method to define mock.On call | 11739 | // SetFraction is a helper method to define mock.On call | ||
| 11821 | // - fraction float64 | 11740 | // - fraction float64 | ||
| 11822 | - | func (_e *MockProgressBarWidget_Expecter) SetFraction(fraction interface{}) *MockProgressBarWidget_SetFraction_Call { | 11741 | + | func (_e *MockProgressBarWidget_Expecter) SetFraction(fraction any) *MockProgressBarWidget_SetFraction_Call { |
| 11823 | return &MockProgressBarWidget_SetFraction_Call{Call: _e.mock.On("SetFraction", fraction)} | 11742 | return &MockProgressBarWidget_SetFraction_Call{Call: _e.mock.On("SetFraction", fraction)} | ||
| 11824 | } | 11743 | } | ||
| 11825 | 11744 | ||||
| @@ -11859,7 +11778,7 @@ type MockProgressBarWidget_SetHalign_Call struct { | |||||
| 11859 | 11778 | ||||
| 11860 | // SetHalign is a helper method to define mock.On call | 11779 | // SetHalign is a helper method to define mock.On call | ||
| 11861 | // - align gtk.Align | 11780 | // - align gtk.Align | ||
| 11862 | - | func (_e *MockProgressBarWidget_Expecter) SetHalign(align interface{}) *MockProgressBarWidget_SetHalign_Call { | 11781 | + | func (_e *MockProgressBarWidget_Expecter) SetHalign(align any) *MockProgressBarWidget_SetHalign_Call { |
| 11863 | return &MockProgressBarWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 11782 | return &MockProgressBarWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 11864 | } | 11783 | } | ||
| 11865 | 11784 | ||||
| @@ -11899,7 +11818,7 @@ type MockProgressBarWidget_SetHexpand_Call struct { | |||||
| 11899 | 11818 | ||||
| 11900 | // SetHexpand is a helper method to define mock.On call | 11819 | // SetHexpand is a helper method to define mock.On call | ||
| 11901 | // - expand bool | 11820 | // - expand bool | ||
| 11902 | - | func (_e *MockProgressBarWidget_Expecter) SetHexpand(expand interface{}) *MockProgressBarWidget_SetHexpand_Call { | 11821 | + | func (_e *MockProgressBarWidget_Expecter) SetHexpand(expand any) *MockProgressBarWidget_SetHexpand_Call { |
| 11903 | return &MockProgressBarWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 11822 | return &MockProgressBarWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 11904 | } | 11823 | } | ||
| 11905 | 11824 | ||||
| @@ -11939,7 +11858,7 @@ type MockProgressBarWidget_SetOpacity_Call struct { | |||||
| 11939 | 11858 | ||||
| 11940 | // SetOpacity is a helper method to define mock.On call | 11859 | // SetOpacity is a helper method to define mock.On call | ||
| 11941 | // - opacity float64 | 11860 | // - opacity float64 | ||
| 11942 | - | func (_e *MockProgressBarWidget_Expecter) SetOpacity(opacity interface{}) *MockProgressBarWidget_SetOpacity_Call { | 11861 | + | func (_e *MockProgressBarWidget_Expecter) SetOpacity(opacity any) *MockProgressBarWidget_SetOpacity_Call { |
| 11943 | return &MockProgressBarWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 11862 | return &MockProgressBarWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 11944 | } | 11863 | } | ||
| 11945 | 11864 | ||||
| @@ -11980,7 +11899,7 @@ type MockProgressBarWidget_SetSizeRequest_Call struct { | |||||
| 11980 | // SetSizeRequest is a helper method to define mock.On call | 11899 | // SetSizeRequest is a helper method to define mock.On call | ||
| 11981 | // - width int | 11900 | // - width int | ||
| 11982 | // - height int | 11901 | // - height int | ||
| 11983 | - | func (_e *MockProgressBarWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockProgressBarWidget_SetSizeRequest_Call { | 11902 | + | func (_e *MockProgressBarWidget_Expecter) SetSizeRequest(width any, height any) *MockProgressBarWidget_SetSizeRequest_Call { |
| 11984 | return &MockProgressBarWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 11903 | return &MockProgressBarWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 11985 | } | 11904 | } | ||
| 11986 | 11905 | ||||
| @@ -12025,7 +11944,7 @@ type MockProgressBarWidget_SetValign_Call struct { | |||||
| 12025 | 11944 | ||||
| 12026 | // SetValign is a helper method to define mock.On call | 11945 | // SetValign is a helper method to define mock.On call | ||
| 12027 | // - align gtk.Align | 11946 | // - align gtk.Align | ||
| 12028 | - | func (_e *MockProgressBarWidget_Expecter) SetValign(align interface{}) *MockProgressBarWidget_SetValign_Call { | 11947 | + | func (_e *MockProgressBarWidget_Expecter) SetValign(align any) *MockProgressBarWidget_SetValign_Call { |
| 12029 | return &MockProgressBarWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 11948 | return &MockProgressBarWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 12030 | } | 11949 | } | ||
| 12031 | 11950 | ||||
| @@ -12065,7 +11984,7 @@ type MockProgressBarWidget_SetVexpand_Call struct { | |||||
| 12065 | 11984 | ||||
| 12066 | // SetVexpand is a helper method to define mock.On call | 11985 | // SetVexpand is a helper method to define mock.On call | ||
| 12067 | // - expand bool | 11986 | // - expand bool | ||
| 12068 | - | func (_e *MockProgressBarWidget_Expecter) SetVexpand(expand interface{}) *MockProgressBarWidget_SetVexpand_Call { | 11987 | + | func (_e *MockProgressBarWidget_Expecter) SetVexpand(expand any) *MockProgressBarWidget_SetVexpand_Call { |
| 12069 | return &MockProgressBarWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 11988 | return &MockProgressBarWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 12070 | } | 11989 | } | ||
| 12071 | 11990 | ||||
| @@ -12105,7 +12024,7 @@ type MockProgressBarWidget_SetVisible_Call struct { | |||||
| 12105 | 12024 | ||||
| 12106 | // SetVisible is a helper method to define mock.On call | 12025 | // SetVisible is a helper method to define mock.On call | ||
| 12107 | // - visible bool | 12026 | // - visible bool | ||
| 12108 | - | func (_e *MockProgressBarWidget_Expecter) SetVisible(visible interface{}) *MockProgressBarWidget_SetVisible_Call { | 12027 | + | func (_e *MockProgressBarWidget_Expecter) SetVisible(visible any) *MockProgressBarWidget_SetVisible_Call { |
| 12109 | return &MockProgressBarWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 12028 | return &MockProgressBarWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 12110 | } | 12029 | } | ||
| 12111 | 12030 | ||||
| @@ -12238,7 +12157,7 @@ type MockSpinnerWidget_AddController_Call struct { | |||||
| 12238 | 12157 | ||||
| 12239 | // AddController is a helper method to define mock.On call | 12158 | // AddController is a helper method to define mock.On call | ||
| 12240 | // - controller *gtk.EventController | 12159 | // - controller *gtk.EventController | ||
| 12241 | - | func (_e *MockSpinnerWidget_Expecter) AddController(controller interface{}) *MockSpinnerWidget_AddController_Call { | 12160 | + | func (_e *MockSpinnerWidget_Expecter) AddController(controller any) *MockSpinnerWidget_AddController_Call { |
| 12242 | return &MockSpinnerWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | 12161 | return &MockSpinnerWidget_AddController_Call{Call: _e.mock.On("AddController", controller)} | ||
| 12243 | } | 12162 | } | ||
| 12244 | 12163 | ||||
| @@ -12278,7 +12197,7 @@ type MockSpinnerWidget_AddCssClass_Call struct { | |||||
| 12278 | 12197 | ||||
| 12279 | // AddCssClass is a helper method to define mock.On call | 12198 | // AddCssClass is a helper method to define mock.On call | ||
| 12280 | // - cssClass string | 12199 | // - cssClass string | ||
| 12281 | - | func (_e *MockSpinnerWidget_Expecter) AddCssClass(cssClass interface{}) *MockSpinnerWidget_AddCssClass_Call { | 12200 | + | func (_e *MockSpinnerWidget_Expecter) AddCssClass(cssClass any) *MockSpinnerWidget_AddCssClass_Call { |
| 12282 | return &MockSpinnerWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | 12201 | return &MockSpinnerWidget_AddCssClass_Call{Call: _e.mock.On("AddCssClass", cssClass)} | ||
| 12283 | } | 12202 | } | ||
| 12284 | 12203 | ||||
| @@ -12344,7 +12263,7 @@ type MockSpinnerWidget_ComputePoint_Call struct { | |||||
| 12344 | 12263 | ||||
| 12345 | // ComputePoint is a helper method to define mock.On call | 12264 | // ComputePoint is a helper method to define mock.On call | ||
| 12346 | // - target layout.Widget | 12265 | // - target layout.Widget | ||
| 12347 | - | func (_e *MockSpinnerWidget_Expecter) ComputePoint(target interface{}) *MockSpinnerWidget_ComputePoint_Call { | 12266 | + | func (_e *MockSpinnerWidget_Expecter) ComputePoint(target any) *MockSpinnerWidget_ComputePoint_Call { |
| 12348 | return &MockSpinnerWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | 12267 | return &MockSpinnerWidget_ComputePoint_Call{Call: _e.mock.On("ComputePoint", target)} | ||
| 12349 | } | 12268 | } | ||
| 12350 | 12269 | ||||
| @@ -12751,7 +12670,7 @@ type MockSpinnerWidget_HasCssClass_Call struct { | |||||
| 12751 | 12670 | ||||
| 12752 | // HasCssClass is a helper method to define mock.On call | 12671 | // HasCssClass is a helper method to define mock.On call | ||
| 12753 | // - cssClass string | 12672 | // - cssClass string | ||
| 12754 | - | func (_e *MockSpinnerWidget_Expecter) HasCssClass(cssClass interface{}) *MockSpinnerWidget_HasCssClass_Call { | 12673 | + | func (_e *MockSpinnerWidget_Expecter) HasCssClass(cssClass any) *MockSpinnerWidget_HasCssClass_Call { |
| 12755 | return &MockSpinnerWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | 12674 | return &MockSpinnerWidget_HasCssClass_Call{Call: _e.mock.On("HasCssClass", cssClass)} | ||
| 12756 | } | 12675 | } | ||
| 12757 | 12676 | ||||
| @@ -12912,7 +12831,7 @@ type MockSpinnerWidget_RemoveCssClass_Call struct { | |||||
| 12912 | 12831 | ||||
| 12913 | // RemoveCssClass is a helper method to define mock.On call | 12832 | // RemoveCssClass is a helper method to define mock.On call | ||
| 12914 | // - cssClass string | 12833 | // - cssClass string | ||
| 12915 | - | func (_e *MockSpinnerWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockSpinnerWidget_RemoveCssClass_Call { | 12834 | + | func (_e *MockSpinnerWidget_Expecter) RemoveCssClass(cssClass any) *MockSpinnerWidget_RemoveCssClass_Call { |
| 12916 | return &MockSpinnerWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | 12835 | return &MockSpinnerWidget_RemoveCssClass_Call{Call: _e.mock.On("RemoveCssClass", cssClass)} | ||
| 12917 | } | 12836 | } | ||
| 12918 | 12837 | ||||
| @@ -12952,7 +12871,7 @@ type MockSpinnerWidget_SetCanFocus_Call struct { | |||||
| 12952 | 12871 | ||||
| 12953 | // SetCanFocus is a helper method to define mock.On call | 12872 | // SetCanFocus is a helper method to define mock.On call | ||
| 12954 | // - canFocus bool | 12873 | // - canFocus bool | ||
| 12955 | - | func (_e *MockSpinnerWidget_Expecter) SetCanFocus(canFocus interface{}) *MockSpinnerWidget_SetCanFocus_Call { | 12874 | + | func (_e *MockSpinnerWidget_Expecter) SetCanFocus(canFocus any) *MockSpinnerWidget_SetCanFocus_Call { |
| 12956 | return &MockSpinnerWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | 12875 | return &MockSpinnerWidget_SetCanFocus_Call{Call: _e.mock.On("SetCanFocus", canFocus)} | ||
| 12957 | } | 12876 | } | ||
| 12958 | 12877 | ||||
| @@ -12992,7 +12911,7 @@ type MockSpinnerWidget_SetCanTarget_Call struct { | |||||
| 12992 | 12911 | ||||
| 12993 | // SetCanTarget is a helper method to define mock.On call | 12912 | // SetCanTarget is a helper method to define mock.On call | ||
| 12994 | // - canTarget bool | 12913 | // - canTarget bool | ||
| 12995 | - | func (_e *MockSpinnerWidget_Expecter) SetCanTarget(canTarget interface{}) *MockSpinnerWidget_SetCanTarget_Call { | 12914 | + | func (_e *MockSpinnerWidget_Expecter) SetCanTarget(canTarget any) *MockSpinnerWidget_SetCanTarget_Call { |
| 12996 | return &MockSpinnerWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | 12915 | return &MockSpinnerWidget_SetCanTarget_Call{Call: _e.mock.On("SetCanTarget", canTarget)} | ||
| 12997 | } | 12916 | } | ||
| 12998 | 12917 | ||||
| @@ -13032,7 +12951,7 @@ type MockSpinnerWidget_SetFocusOnClick_Call struct { | |||||
| 13032 | 12951 | ||||
| 13033 | // SetFocusOnClick is a helper method to define mock.On call | 12952 | // SetFocusOnClick is a helper method to define mock.On call | ||
| 13034 | // - focusOnClick bool | 12953 | // - focusOnClick bool | ||
| 13035 | - | func (_e *MockSpinnerWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockSpinnerWidget_SetFocusOnClick_Call { | 12954 | + | func (_e *MockSpinnerWidget_Expecter) SetFocusOnClick(focusOnClick any) *MockSpinnerWidget_SetFocusOnClick_Call { |
| 13036 | return &MockSpinnerWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | 12955 | return &MockSpinnerWidget_SetFocusOnClick_Call{Call: _e.mock.On("SetFocusOnClick", focusOnClick)} | ||
| 13037 | } | 12956 | } | ||
| 13038 | 12957 | ||||
| @@ -13072,7 +12991,7 @@ type MockSpinnerWidget_SetFocusable_Call struct { | |||||
| 13072 | 12991 | ||||
| 13073 | // SetFocusable is a helper method to define mock.On call | 12992 | // SetFocusable is a helper method to define mock.On call | ||
| 13074 | // - focusable bool | 12993 | // - focusable bool | ||
| 13075 | - | func (_e *MockSpinnerWidget_Expecter) SetFocusable(focusable interface{}) *MockSpinnerWidget_SetFocusable_Call { | 12994 | + | func (_e *MockSpinnerWidget_Expecter) SetFocusable(focusable any) *MockSpinnerWidget_SetFocusable_Call { |
| 13076 | return &MockSpinnerWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | 12995 | return &MockSpinnerWidget_SetFocusable_Call{Call: _e.mock.On("SetFocusable", focusable)} | ||
| 13077 | } | 12996 | } | ||
| 13078 | 12997 | ||||
| @@ -13112,7 +13031,7 @@ type MockSpinnerWidget_SetHalign_Call struct { | |||||
| 13112 | 13031 | ||||
| 13113 | // SetHalign is a helper method to define mock.On call | 13032 | // SetHalign is a helper method to define mock.On call | ||
| 13114 | // - align gtk.Align | 13033 | // - align gtk.Align | ||
| 13115 | - | func (_e *MockSpinnerWidget_Expecter) SetHalign(align interface{}) *MockSpinnerWidget_SetHalign_Call { | 13034 | + | func (_e *MockSpinnerWidget_Expecter) SetHalign(align any) *MockSpinnerWidget_SetHalign_Call { |
| 13116 | return &MockSpinnerWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | 13035 | return &MockSpinnerWidget_SetHalign_Call{Call: _e.mock.On("SetHalign", align)} | ||
| 13117 | } | 13036 | } | ||
| 13118 | 13037 | ||||
| @@ -13152,7 +13071,7 @@ type MockSpinnerWidget_SetHexpand_Call struct { | |||||
| 13152 | 13071 | ||||
| 13153 | // SetHexpand is a helper method to define mock.On call | 13072 | // SetHexpand is a helper method to define mock.On call | ||
| 13154 | // - expand bool | 13073 | // - expand bool | ||
| 13155 | - | func (_e *MockSpinnerWidget_Expecter) SetHexpand(expand interface{}) *MockSpinnerWidget_SetHexpand_Call { | 13074 | + | func (_e *MockSpinnerWidget_Expecter) SetHexpand(expand any) *MockSpinnerWidget_SetHexpand_Call { |
| 13156 | return &MockSpinnerWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | 13075 | return &MockSpinnerWidget_SetHexpand_Call{Call: _e.mock.On("SetHexpand", expand)} | ||
| 13157 | } | 13076 | } | ||
| 13158 | 13077 | ||||
| @@ -13192,7 +13111,7 @@ type MockSpinnerWidget_SetOpacity_Call struct { | |||||
| 13192 | 13111 | ||||
| 13193 | // SetOpacity is a helper method to define mock.On call | 13112 | // SetOpacity is a helper method to define mock.On call | ||
| 13194 | // - opacity float64 | 13113 | // - opacity float64 | ||
| 13195 | - | func (_e *MockSpinnerWidget_Expecter) SetOpacity(opacity interface{}) *MockSpinnerWidget_SetOpacity_Call { | 13114 | + | func (_e *MockSpinnerWidget_Expecter) SetOpacity(opacity any) *MockSpinnerWidget_SetOpacity_Call { |
| 13196 | return &MockSpinnerWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | 13115 | return &MockSpinnerWidget_SetOpacity_Call{Call: _e.mock.On("SetOpacity", opacity)} | ||
| 13197 | } | 13116 | } | ||
| 13198 | 13117 | ||||
| @@ -13233,7 +13152,7 @@ type MockSpinnerWidget_SetSizeRequest_Call struct { | |||||
| 13233 | // SetSizeRequest is a helper method to define mock.On call | 13152 | // SetSizeRequest is a helper method to define mock.On call | ||
| 13234 | // - width int | 13153 | // - width int | ||
| 13235 | // - height int | 13154 | // - height int | ||
| 13236 | - | func (_e *MockSpinnerWidget_Expecter) SetSizeRequest(width interface{}, height interface{}) *MockSpinnerWidget_SetSizeRequest_Call { | 13155 | + | func (_e *MockSpinnerWidget_Expecter) SetSizeRequest(width any, height any) *MockSpinnerWidget_SetSizeRequest_Call { |
| 13237 | return &MockSpinnerWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | 13156 | return &MockSpinnerWidget_SetSizeRequest_Call{Call: _e.mock.On("SetSizeRequest", width, height)} | ||
| 13238 | } | 13157 | } | ||
| 13239 | 13158 | ||||
| @@ -13278,7 +13197,7 @@ type MockSpinnerWidget_SetSpinning_Call struct { | |||||
| 13278 | 13197 | ||||
| 13279 | // SetSpinning is a helper method to define mock.On call | 13198 | // SetSpinning is a helper method to define mock.On call | ||
| 13280 | // - spinning bool | 13199 | // - spinning bool | ||
| 13281 | - | func (_e *MockSpinnerWidget_Expecter) SetSpinning(spinning interface{}) *MockSpinnerWidget_SetSpinning_Call { | 13200 | + | func (_e *MockSpinnerWidget_Expecter) SetSpinning(spinning any) *MockSpinnerWidget_SetSpinning_Call { |
| 13282 | return &MockSpinnerWidget_SetSpinning_Call{Call: _e.mock.On("SetSpinning", spinning)} | 13201 | return &MockSpinnerWidget_SetSpinning_Call{Call: _e.mock.On("SetSpinning", spinning)} | ||
| 13283 | } | 13202 | } | ||
| 13284 | 13203 | ||||
| @@ -13318,7 +13237,7 @@ type MockSpinnerWidget_SetValign_Call struct { | |||||
| 13318 | 13237 | ||||
| 13319 | // SetValign is a helper method to define mock.On call | 13238 | // SetValign is a helper method to define mock.On call | ||
| 13320 | // - align gtk.Align | 13239 | // - align gtk.Align | ||
| 13321 | - | func (_e *MockSpinnerWidget_Expecter) SetValign(align interface{}) *MockSpinnerWidget_SetValign_Call { | 13240 | + | func (_e *MockSpinnerWidget_Expecter) SetValign(align any) *MockSpinnerWidget_SetValign_Call { |
| 13322 | return &MockSpinnerWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | 13241 | return &MockSpinnerWidget_SetValign_Call{Call: _e.mock.On("SetValign", align)} | ||
| 13323 | } | 13242 | } | ||
| 13324 | 13243 | ||||
| @@ -13358,7 +13277,7 @@ type MockSpinnerWidget_SetVexpand_Call struct { | |||||
| 13358 | 13277 | ||||
| 13359 | // SetVexpand is a helper method to define mock.On call | 13278 | // SetVexpand is a helper method to define mock.On call | ||
| 13360 | // - expand bool | 13279 | // - expand bool | ||
| 13361 | - | func (_e *MockSpinnerWidget_Expecter) SetVexpand(expand interface{}) *MockSpinnerWidget_SetVexpand_Call { | 13280 | + | func (_e *MockSpinnerWidget_Expecter) SetVexpand(expand any) *MockSpinnerWidget_SetVexpand_Call { |
| 13362 | return &MockSpinnerWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | 13281 | return &MockSpinnerWidget_SetVexpand_Call{Call: _e.mock.On("SetVexpand", expand)} | ||
| 13363 | } | 13282 | } | ||
| 13364 | 13283 | ||||
| @@ -13398,7 +13317,7 @@ type MockSpinnerWidget_SetVisible_Call struct { | |||||
| 13398 | 13317 | ||||
| 13399 | // SetVisible is a helper method to define mock.On call | 13318 | // SetVisible is a helper method to define mock.On call | ||
| 13400 | // - visible bool | 13319 | // - visible bool | ||
| 13401 | - | func (_e *MockSpinnerWidget_Expecter) SetVisible(visible interface{}) *MockSpinnerWidget_SetVisible_Call { | 13320 | + | func (_e *MockSpinnerWidget_Expecter) SetVisible(visible any) *MockSpinnerWidget_SetVisible_Call { |
| 13402 | return &MockSpinnerWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | 13321 | return &MockSpinnerWidget_SetVisible_Call{Call: _e.mock.On("SetVisible", visible)} | ||
| 13403 | } | 13322 | } | ||
| 13404 | 13323 | ||||
| @@ -13611,7 +13530,7 @@ type MockWidgetFactory_NewBox_Call struct { | |||||
| 13611 | // NewBox is a helper method to define mock.On call | 13530 | // NewBox is a helper method to define mock.On call | ||
| 13612 | // - orientation layout.Orientation | 13531 | // - orientation layout.Orientation | ||
| 13613 | // - spacing int | 13532 | // - spacing int | ||
| 13614 | - | func (_e *MockWidgetFactory_Expecter) NewBox(orientation interface{}, spacing interface{}) *MockWidgetFactory_NewBox_Call { | 13533 | + | func (_e *MockWidgetFactory_Expecter) NewBox(orientation any, spacing any) *MockWidgetFactory_NewBox_Call { |
| 13615 | return &MockWidgetFactory_NewBox_Call{Call: _e.mock.On("NewBox", orientation, spacing)} | 13534 | return &MockWidgetFactory_NewBox_Call{Call: _e.mock.On("NewBox", orientation, spacing)} | ||
| 13616 | } | 13535 | } | ||
| 13617 | 13536 | ||||
| @@ -13761,7 +13680,7 @@ type MockWidgetFactory_NewLabel_Call struct { | |||||
| 13761 | 13680 | ||||
| 13762 | // NewLabel is a helper method to define mock.On call | 13681 | // NewLabel is a helper method to define mock.On call | ||
| 13763 | // - text string | 13682 | // - text string | ||
| 13764 | - | func (_e *MockWidgetFactory_Expecter) NewLabel(text interface{}) *MockWidgetFactory_NewLabel_Call { | 13683 | + | func (_e *MockWidgetFactory_Expecter) NewLabel(text any) *MockWidgetFactory_NewLabel_Call { |
| 13765 | return &MockWidgetFactory_NewLabel_Call{Call: _e.mock.On("NewLabel", text)} | 13684 | return &MockWidgetFactory_NewLabel_Call{Call: _e.mock.On("NewLabel", text)} | ||
| 13766 | } | 13685 | } | ||
| 13767 | 13686 | ||||
| @@ -13860,7 +13779,7 @@ type MockWidgetFactory_NewPaned_Call struct { | |||||
| 13860 | 13779 | ||||
| 13861 | // NewPaned is a helper method to define mock.On call | 13780 | // NewPaned is a helper method to define mock.On call | ||
| 13862 | // - orientation layout.Orientation | 13781 | // - orientation layout.Orientation | ||
| 13863 | - | func (_e *MockWidgetFactory_Expecter) NewPaned(orientation interface{}) *MockWidgetFactory_NewPaned_Call { | 13782 | + | func (_e *MockWidgetFactory_Expecter) NewPaned(orientation any) *MockWidgetFactory_NewPaned_Call { |
| 13864 | return &MockWidgetFactory_NewPaned_Call{Call: _e.mock.On("NewPaned", orientation)} | 13783 | return &MockWidgetFactory_NewPaned_Call{Call: _e.mock.On("NewPaned", orientation)} | ||
| 13865 | } | 13784 | } | ||
| 13866 | 13785 | ||||
| @@ -14005,7 +13924,7 @@ type MockWidgetFactory_WrapWidget_Call struct { | |||||
| 14005 | 13924 | ||||
| 14006 | // WrapWidget is a helper method to define mock.On call | 13925 | // WrapWidget is a helper method to define mock.On call | ||
| 14007 | // - w *gtk.Widget | 13926 | // - w *gtk.Widget | ||
| 14008 | - | func (_e *MockWidgetFactory_Expecter) WrapWidget(w interface{}) *MockWidgetFactory_WrapWidget_Call { | 13927 | + | func (_e *MockWidgetFactory_Expecter) WrapWidget(w any) *MockWidgetFactory_WrapWidget_Call { |
| 14009 | return &MockWidgetFactory_WrapWidget_Call{Call: _e.mock.On("WrapWidget", w)} | 13928 | return &MockWidgetFactory_WrapWidget_Call{Call: _e.mock.On("WrapWidget", w)} | ||
| 14010 | } | 13929 | } | ||
| 14011 | 13930 | ||||
| @@ -14086,7 +14005,7 @@ type MockPaneRenderer_RenderPane_Call struct { | |||||
| 14086 | // RenderPane is a helper method to define mock.On call | 14005 | // RenderPane is a helper method to define mock.On call | ||
| 14087 | // - paneID string | 14006 | // - paneID string | ||
| 14088 | // - webViewWidget layout.Widget | 14007 | // - webViewWidget layout.Widget | ||
| 14089 | - | func (_e *MockPaneRenderer_Expecter) RenderPane(paneID interface{}, webViewWidget interface{}) *MockPaneRenderer_RenderPane_Call { | 14008 | + | func (_e *MockPaneRenderer_Expecter) RenderPane(paneID any, webViewWidget any) *MockPaneRenderer_RenderPane_Call { |
| 14090 | return &MockPaneRenderer_RenderPane_Call{Call: _e.mock.On("RenderPane", paneID, webViewWidget)} | 14009 | return &MockPaneRenderer_RenderPane_Call{Call: _e.mock.On("RenderPane", paneID, webViewWidget)} | ||
| 14091 | } | 14010 | } | ||
| 14092 | 14011 | ||||