chore(mocks): regenerate with updated mockery config format
- commit
- 9c927bde5e11d8e7d6e1df711faaced54b71f7bb
- author
- bnema · · 2025-12-18 03:51 UTC
- parent
- bdf3676
- signature
- unsigned
19 files · +2774 -4200
M internal/application/port/mocks/mock_web_view.go +185 -245
| @@ -1,30 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | - | "github.com/bnema/dumber/internal/application/port" | |
| 8 | + | port "github.com/bnema/dumber/internal/application/port" | |
| 11 | 9 | mock "github.com/stretchr/testify/mock" | |
| 12 | 10 | ) | |
| 13 | 11 | ||
| 14 | - | // NewMockWebView creates a new instance of MockWebView. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 15 | - | // The first argument is typically a *testing.T value. | |
| 16 | - | func NewMockWebView(t interface { | |
| 17 | - | mock.TestingT | |
| 18 | - | Cleanup(func()) | |
| 19 | - | }) *MockWebView { | |
| 20 | - | mock := &MockWebView{} | |
| 21 | - | mock.Mock.Test(t) | |
| 22 | - | ||
| 23 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 24 | - | ||
| 25 | - | return mock | |
| 26 | - | } | |
| 27 | - | ||
| 28 | 12 | // MockWebView is an autogenerated mock type for the WebView type | |
| 29 | 13 | type MockWebView struct { | |
| 30 | 14 | mock.Mock | |
| @@ -38,20 +22,21 @@ func (_m *MockWebView) EXPECT() *MockWebView_Expecter { | |||
| 38 | 22 | return &MockWebView_Expecter{mock: &_m.Mock} | |
| 39 | 23 | } | |
| 40 | 24 | ||
| 41 | - | // CanGoBack provides a mock function for the type MockWebView | |
| 42 | - | func (_mock *MockWebView) CanGoBack() bool { | |
| 43 | - | ret := _mock.Called() | |
| 25 | + | // CanGoBack provides a mock function with no fields | |
| 26 | + | func (_m *MockWebView) CanGoBack() bool { | |
| 27 | + | ret := _m.Called() | |
| 44 | 28 | ||
| 45 | 29 | if len(ret) == 0 { | |
| 46 | 30 | panic("no return value specified for CanGoBack") | |
| 47 | 31 | } | |
| 48 | 32 | ||
| 49 | 33 | var r0 bool | |
| 50 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 51 | - | r0 = returnFunc() | |
| 34 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 35 | + | r0 = rf() | |
| 52 | 36 | } else { | |
| 53 | 37 | r0 = ret.Get(0).(bool) | |
| 54 | 38 | } | |
| 39 | + | ||
| 55 | 40 | return r0 | |
| 56 | 41 | } | |
| 57 | 42 | ||
| @@ -72,8 +57,8 @@ func (_c *MockWebView_CanGoBack_Call) Run(run func()) *MockWebView_CanGoBack_Cal | |||
| 72 | 57 | return _c | |
| 73 | 58 | } | |
| 74 | 59 | ||
| 75 | - | func (_c *MockWebView_CanGoBack_Call) Return(b bool) *MockWebView_CanGoBack_Call { | |
| 76 | - | _c.Call.Return(b) | |
| 60 | + | func (_c *MockWebView_CanGoBack_Call) Return(_a0 bool) *MockWebView_CanGoBack_Call { | |
| 61 | + | _c.Call.Return(_a0) | |
| 77 | 62 | return _c | |
| 78 | 63 | } | |
| 79 | 64 | ||
| @@ -82,20 +67,21 @@ func (_c *MockWebView_CanGoBack_Call) RunAndReturn(run func() bool) *MockWebView | |||
| 82 | 67 | return _c | |
| 83 | 68 | } | |
| 84 | 69 | ||
| 85 | - | // CanGoForward provides a mock function for the type MockWebView | |
| 86 | - | func (_mock *MockWebView) CanGoForward() bool { | |
| 87 | - | ret := _mock.Called() | |
| 70 | + | // CanGoForward provides a mock function with no fields | |
| 71 | + | func (_m *MockWebView) CanGoForward() bool { | |
| 72 | + | ret := _m.Called() | |
| 88 | 73 | ||
| 89 | 74 | if len(ret) == 0 { | |
| 90 | 75 | panic("no return value specified for CanGoForward") | |
| 91 | 76 | } | |
| 92 | 77 | ||
| 93 | 78 | var r0 bool | |
| 94 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 95 | - | r0 = returnFunc() | |
| 79 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 80 | + | r0 = rf() | |
| 96 | 81 | } else { | |
| 97 | 82 | r0 = ret.Get(0).(bool) | |
| 98 | 83 | } | |
| 84 | + | ||
| 99 | 85 | return r0 | |
| 100 | 86 | } | |
| 101 | 87 | ||
| @@ -116,8 +102,8 @@ func (_c *MockWebView_CanGoForward_Call) Run(run func()) *MockWebView_CanGoForwa | |||
| 116 | 102 | return _c | |
| 117 | 103 | } | |
| 118 | 104 | ||
| 119 | - | func (_c *MockWebView_CanGoForward_Call) Return(b bool) *MockWebView_CanGoForward_Call { | |
| 120 | - | _c.Call.Return(b) | |
| 105 | + | func (_c *MockWebView_CanGoForward_Call) Return(_a0 bool) *MockWebView_CanGoForward_Call { | |
| 106 | + | _c.Call.Return(_a0) | |
| 121 | 107 | return _c | |
| 122 | 108 | } | |
| 123 | 109 | ||
| @@ -126,10 +112,9 @@ func (_c *MockWebView_CanGoForward_Call) RunAndReturn(run func() bool) *MockWebV | |||
| 126 | 112 | return _c | |
| 127 | 113 | } | |
| 128 | 114 | ||
| 129 | - | // Destroy provides a mock function for the type MockWebView | |
| 130 | - | func (_mock *MockWebView) Destroy() { | |
| 131 | - | _mock.Called() | |
| 132 | - | return | |
| 115 | + | // Destroy provides a mock function with no fields | |
| 116 | + | func (_m *MockWebView) Destroy() { | |
| 117 | + | _m.Called() | |
| 133 | 118 | } | |
| 134 | 119 | ||
| 135 | 120 | // MockWebView_Destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destroy' | |
| @@ -159,20 +144,21 @@ func (_c *MockWebView_Destroy_Call) RunAndReturn(run func()) *MockWebView_Destro | |||
| 159 | 144 | return _c | |
| 160 | 145 | } | |
| 161 | 146 | ||
| 162 | - | // EstimatedProgress provides a mock function for the type MockWebView | |
| 163 | - | func (_mock *MockWebView) EstimatedProgress() float64 { | |
| 164 | - | ret := _mock.Called() | |
| 147 | + | // EstimatedProgress provides a mock function with no fields | |
| 148 | + | func (_m *MockWebView) EstimatedProgress() float64 { | |
| 149 | + | ret := _m.Called() | |
| 165 | 150 | ||
| 166 | 151 | if len(ret) == 0 { | |
| 167 | 152 | panic("no return value specified for EstimatedProgress") | |
| 168 | 153 | } | |
| 169 | 154 | ||
| 170 | 155 | var r0 float64 | |
| 171 | - | if returnFunc, ok := ret.Get(0).(func() float64); ok { | |
| 172 | - | r0 = returnFunc() | |
| 156 | + | if rf, ok := ret.Get(0).(func() float64); ok { | |
| 157 | + | r0 = rf() | |
| 173 | 158 | } else { | |
| 174 | 159 | r0 = ret.Get(0).(float64) | |
| 175 | 160 | } | |
| 161 | + | ||
| 176 | 162 | return r0 | |
| 177 | 163 | } | |
| 178 | 164 | ||
| @@ -193,8 +179,8 @@ func (_c *MockWebView_EstimatedProgress_Call) Run(run func()) *MockWebView_Estim | |||
| 193 | 179 | return _c | |
| 194 | 180 | } | |
| 195 | 181 | ||
| 196 | - | func (_c *MockWebView_EstimatedProgress_Call) Return(f float64) *MockWebView_EstimatedProgress_Call { | |
| 197 | - | _c.Call.Return(f) | |
| 182 | + | func (_c *MockWebView_EstimatedProgress_Call) Return(_a0 float64) *MockWebView_EstimatedProgress_Call { | |
| 183 | + | _c.Call.Return(_a0) | |
| 198 | 184 | return _c | |
| 199 | 185 | } | |
| 200 | 186 | ||
| @@ -203,20 +189,21 @@ func (_c *MockWebView_EstimatedProgress_Call) RunAndReturn(run func() float64) * | |||
| 203 | 189 | return _c | |
| 204 | 190 | } | |
| 205 | 191 | ||
| 206 | - | // GetZoomLevel provides a mock function for the type MockWebView | |
| 207 | - | func (_mock *MockWebView) GetZoomLevel() float64 { | |
| 208 | - | ret := _mock.Called() | |
| 192 | + | // GetZoomLevel provides a mock function with no fields | |
| 193 | + | func (_m *MockWebView) GetZoomLevel() float64 { | |
| 194 | + | ret := _m.Called() | |
| 209 | 195 | ||
| 210 | 196 | if len(ret) == 0 { | |
| 211 | 197 | panic("no return value specified for GetZoomLevel") | |
| 212 | 198 | } | |
| 213 | 199 | ||
| 214 | 200 | var r0 float64 | |
| 215 | - | if returnFunc, ok := ret.Get(0).(func() float64); ok { | |
| 216 | - | r0 = returnFunc() | |
| 201 | + | if rf, ok := ret.Get(0).(func() float64); ok { | |
| 202 | + | r0 = rf() | |
| 217 | 203 | } else { | |
| 218 | 204 | r0 = ret.Get(0).(float64) | |
| 219 | 205 | } | |
| 206 | + | ||
| 220 | 207 | return r0 | |
| 221 | 208 | } | |
| 222 | 209 | ||
| @@ -237,8 +224,8 @@ func (_c *MockWebView_GetZoomLevel_Call) Run(run func()) *MockWebView_GetZoomLev | |||
| 237 | 224 | return _c | |
| 238 | 225 | } | |
| 239 | 226 | ||
| 240 | - | func (_c *MockWebView_GetZoomLevel_Call) Return(f float64) *MockWebView_GetZoomLevel_Call { | |
| 241 | - | _c.Call.Return(f) | |
| 227 | + | func (_c *MockWebView_GetZoomLevel_Call) Return(_a0 float64) *MockWebView_GetZoomLevel_Call { | |
| 228 | + | _c.Call.Return(_a0) | |
| 242 | 229 | return _c | |
| 243 | 230 | } | |
| 244 | 231 | ||
| @@ -247,20 +234,21 @@ func (_c *MockWebView_GetZoomLevel_Call) RunAndReturn(run func() float64) *MockW | |||
| 247 | 234 | return _c | |
| 248 | 235 | } | |
| 249 | 236 | ||
| 250 | - | // GoBack provides a mock function for the type MockWebView | |
| 251 | - | func (_mock *MockWebView) GoBack(ctx context.Context) error { | |
| 252 | - | ret := _mock.Called(ctx) | |
| 237 | + | // GoBack provides a mock function with given fields: ctx | |
| 238 | + | func (_m *MockWebView) GoBack(ctx context.Context) error { | |
| 239 | + | ret := _m.Called(ctx) | |
| 253 | 240 | ||
| 254 | 241 | if len(ret) == 0 { | |
| 255 | 242 | panic("no return value specified for GoBack") | |
| 256 | 243 | } | |
| 257 | 244 | ||
| 258 | 245 | var r0 error | |
| 259 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 260 | - | r0 = returnFunc(ctx) | |
| 246 | + | if rf, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 247 | + | r0 = rf(ctx) | |
| 261 | 248 | } else { | |
| 262 | 249 | r0 = ret.Error(0) | |
| 263 | 250 | } | |
| 251 | + | ||
| 264 | 252 | return r0 | |
| 265 | 253 | } | |
| 266 | 254 | ||
| @@ -277,41 +265,36 @@ func (_e *MockWebView_Expecter) GoBack(ctx interface{}) *MockWebView_GoBack_Call | |||
| 277 | 265 | ||
| 278 | 266 | func (_c *MockWebView_GoBack_Call) Run(run func(ctx context.Context)) *MockWebView_GoBack_Call { | |
| 279 | 267 | _c.Call.Run(func(args mock.Arguments) { | |
| 280 | - | var arg0 context.Context | |
| 281 | - | if args[0] != nil { | |
| 282 | - | arg0 = args[0].(context.Context) | |
| 283 | - | } | |
| 284 | - | run( | |
| 285 | - | arg0, | |
| 286 | - | ) | |
| 268 | + | run(args[0].(context.Context)) | |
| 287 | 269 | }) | |
| 288 | 270 | return _c | |
| 289 | 271 | } | |
| 290 | 272 | ||
| 291 | - | func (_c *MockWebView_GoBack_Call) Return(err error) *MockWebView_GoBack_Call { | |
| 292 | - | _c.Call.Return(err) | |
| 273 | + | func (_c *MockWebView_GoBack_Call) Return(_a0 error) *MockWebView_GoBack_Call { | |
| 274 | + | _c.Call.Return(_a0) | |
| 293 | 275 | return _c | |
| 294 | 276 | } | |
| 295 | 277 | ||
| 296 | - | func (_c *MockWebView_GoBack_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_GoBack_Call { | |
| 278 | + | func (_c *MockWebView_GoBack_Call) RunAndReturn(run func(context.Context) error) *MockWebView_GoBack_Call { | |
| 297 | 279 | _c.Call.Return(run) | |
| 298 | 280 | return _c | |
| 299 | 281 | } | |
| 300 | 282 | ||
| 301 | - | // GoForward provides a mock function for the type MockWebView | |
| 302 | - | func (_mock *MockWebView) GoForward(ctx context.Context) error { | |
| 303 | - | ret := _mock.Called(ctx) | |
| 283 | + | // GoForward provides a mock function with given fields: ctx | |
| 284 | + | func (_m *MockWebView) GoForward(ctx context.Context) error { | |
| 285 | + | ret := _m.Called(ctx) | |
| 304 | 286 | ||
| 305 | 287 | if len(ret) == 0 { | |
| 306 | 288 | panic("no return value specified for GoForward") | |
| 307 | 289 | } | |
| 308 | 290 | ||
| 309 | 291 | var r0 error | |
| 310 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 311 | - | r0 = returnFunc(ctx) | |
| 292 | + | if rf, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 293 | + | r0 = rf(ctx) | |
| 312 | 294 | } else { | |
| 313 | 295 | r0 = ret.Error(0) | |
| 314 | 296 | } | |
| 297 | + | ||
| 315 | 298 | return r0 | |
| 316 | 299 | } | |
| 317 | 300 | ||
| @@ -328,41 +311,36 @@ func (_e *MockWebView_Expecter) GoForward(ctx interface{}) *MockWebView_GoForwar | |||
| 328 | 311 | ||
| 329 | 312 | func (_c *MockWebView_GoForward_Call) Run(run func(ctx context.Context)) *MockWebView_GoForward_Call { | |
| 330 | 313 | _c.Call.Run(func(args mock.Arguments) { | |
| 331 | - | var arg0 context.Context | |
| 332 | - | if args[0] != nil { | |
| 333 | - | arg0 = args[0].(context.Context) | |
| 334 | - | } | |
| 335 | - | run( | |
| 336 | - | arg0, | |
| 337 | - | ) | |
| 314 | + | run(args[0].(context.Context)) | |
| 338 | 315 | }) | |
| 339 | 316 | return _c | |
| 340 | 317 | } | |
| 341 | 318 | ||
| 342 | - | func (_c *MockWebView_GoForward_Call) Return(err error) *MockWebView_GoForward_Call { | |
| 343 | - | _c.Call.Return(err) | |
| 319 | + | func (_c *MockWebView_GoForward_Call) Return(_a0 error) *MockWebView_GoForward_Call { | |
| 320 | + | _c.Call.Return(_a0) | |
| 344 | 321 | return _c | |
| 345 | 322 | } | |
| 346 | 323 | ||
| 347 | - | func (_c *MockWebView_GoForward_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_GoForward_Call { | |
| 324 | + | func (_c *MockWebView_GoForward_Call) RunAndReturn(run func(context.Context) error) *MockWebView_GoForward_Call { | |
| 348 | 325 | _c.Call.Return(run) | |
| 349 | 326 | return _c | |
| 350 | 327 | } | |
| 351 | 328 | ||
| 352 | - | // ID provides a mock function for the type MockWebView | |
| 353 | - | func (_mock *MockWebView) ID() port.WebViewID { | |
| 354 | - | ret := _mock.Called() | |
| 329 | + | // ID provides a mock function with no fields | |
| 330 | + | func (_m *MockWebView) ID() port.WebViewID { | |
| 331 | + | ret := _m.Called() | |
| 355 | 332 | ||
| 356 | 333 | if len(ret) == 0 { | |
| 357 | 334 | panic("no return value specified for ID") | |
| 358 | 335 | } | |
| 359 | 336 | ||
| 360 | 337 | var r0 port.WebViewID | |
| 361 | - | if returnFunc, ok := ret.Get(0).(func() port.WebViewID); ok { | |
| 362 | - | r0 = returnFunc() | |
| 338 | + | if rf, ok := ret.Get(0).(func() port.WebViewID); ok { | |
| 339 | + | r0 = rf() | |
| 363 | 340 | } else { | |
| 364 | 341 | r0 = ret.Get(0).(port.WebViewID) | |
| 365 | 342 | } | |
| 343 | + | ||
| 366 | 344 | return r0 | |
| 367 | 345 | } | |
| 368 | 346 | ||
| @@ -383,8 +361,8 @@ func (_c *MockWebView_ID_Call) Run(run func()) *MockWebView_ID_Call { | |||
| 383 | 361 | return _c | |
| 384 | 362 | } | |
| 385 | 363 | ||
| 386 | - | func (_c *MockWebView_ID_Call) Return(webViewID port.WebViewID) *MockWebView_ID_Call { | |
| 387 | - | _c.Call.Return(webViewID) | |
| 364 | + | func (_c *MockWebView_ID_Call) Return(_a0 port.WebViewID) *MockWebView_ID_Call { | |
| 365 | + | _c.Call.Return(_a0) | |
| 388 | 366 | return _c | |
| 389 | 367 | } | |
| 390 | 368 | ||
| @@ -393,20 +371,21 @@ func (_c *MockWebView_ID_Call) RunAndReturn(run func() port.WebViewID) *MockWebV | |||
| 393 | 371 | return _c | |
| 394 | 372 | } | |
| 395 | 373 | ||
| 396 | - | // IsDestroyed provides a mock function for the type MockWebView | |
| 397 | - | func (_mock *MockWebView) IsDestroyed() bool { | |
| 398 | - | ret := _mock.Called() | |
| 374 | + | // IsDestroyed provides a mock function with no fields | |
| 375 | + | func (_m *MockWebView) IsDestroyed() bool { | |
| 376 | + | ret := _m.Called() | |
| 399 | 377 | ||
| 400 | 378 | if len(ret) == 0 { | |
| 401 | 379 | panic("no return value specified for IsDestroyed") | |
| 402 | 380 | } | |
| 403 | 381 | ||
| 404 | 382 | var r0 bool | |
| 405 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 406 | - | r0 = returnFunc() | |
| 383 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 384 | + | r0 = rf() | |
| 407 | 385 | } else { | |
| 408 | 386 | r0 = ret.Get(0).(bool) | |
| 409 | 387 | } | |
| 388 | + | ||
| 410 | 389 | return r0 | |
| 411 | 390 | } | |
| 412 | 391 | ||
| @@ -427,8 +406,8 @@ func (_c *MockWebView_IsDestroyed_Call) Run(run func()) *MockWebView_IsDestroyed | |||
| 427 | 406 | return _c | |
| 428 | 407 | } | |
| 429 | 408 | ||
| 430 | - | func (_c *MockWebView_IsDestroyed_Call) Return(b bool) *MockWebView_IsDestroyed_Call { | |
| 431 | - | _c.Call.Return(b) | |
| 409 | + | func (_c *MockWebView_IsDestroyed_Call) Return(_a0 bool) *MockWebView_IsDestroyed_Call { | |
| 410 | + | _c.Call.Return(_a0) | |
| 432 | 411 | return _c | |
| 433 | 412 | } | |
| 434 | 413 | ||
| @@ -437,20 +416,21 @@ func (_c *MockWebView_IsDestroyed_Call) RunAndReturn(run func() bool) *MockWebVi | |||
| 437 | 416 | return _c | |
| 438 | 417 | } | |
| 439 | 418 | ||
| 440 | - | // IsLoading provides a mock function for the type MockWebView | |
| 441 | - | func (_mock *MockWebView) IsLoading() bool { | |
| 442 | - | ret := _mock.Called() | |
| 419 | + | // IsLoading provides a mock function with no fields | |
| 420 | + | func (_m *MockWebView) IsLoading() bool { | |
| 421 | + | ret := _m.Called() | |
| 443 | 422 | ||
| 444 | 423 | if len(ret) == 0 { | |
| 445 | 424 | panic("no return value specified for IsLoading") | |
| 446 | 425 | } | |
| 447 | 426 | ||
| 448 | 427 | var r0 bool | |
| 449 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 450 | - | r0 = returnFunc() | |
| 428 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 429 | + | r0 = rf() | |
| 451 | 430 | } else { | |
| 452 | 431 | r0 = ret.Get(0).(bool) | |
| 453 | 432 | } | |
| 433 | + | ||
| 454 | 434 | return r0 | |
| 455 | 435 | } | |
| 456 | 436 | ||
| @@ -471,8 +451,8 @@ func (_c *MockWebView_IsLoading_Call) Run(run func()) *MockWebView_IsLoading_Cal | |||
| 471 | 451 | return _c | |
| 472 | 452 | } | |
| 473 | 453 | ||
| 474 | - | func (_c *MockWebView_IsLoading_Call) Return(b bool) *MockWebView_IsLoading_Call { | |
| 475 | - | _c.Call.Return(b) | |
| 454 | + | func (_c *MockWebView_IsLoading_Call) Return(_a0 bool) *MockWebView_IsLoading_Call { | |
| 455 | + | _c.Call.Return(_a0) | |
| 476 | 456 | return _c | |
| 477 | 457 | } | |
| 478 | 458 | ||
| @@ -481,20 +461,21 @@ func (_c *MockWebView_IsLoading_Call) RunAndReturn(run func() bool) *MockWebView | |||
| 481 | 461 | return _c | |
| 482 | 462 | } | |
| 483 | 463 | ||
| 484 | - | // LoadHTML provides a mock function for the type MockWebView | |
| 485 | - | func (_mock *MockWebView) LoadHTML(ctx context.Context, content string, baseURI string) error { | |
| 486 | - | ret := _mock.Called(ctx, content, baseURI) | |
| 464 | + | // LoadHTML provides a mock function with given fields: ctx, content, baseURI | |
| 465 | + | func (_m *MockWebView) LoadHTML(ctx context.Context, content string, baseURI string) error { | |
| 466 | + | ret := _m.Called(ctx, content, baseURI) | |
| 487 | 467 | ||
| 488 | 468 | if len(ret) == 0 { | |
| 489 | 469 | panic("no return value specified for LoadHTML") | |
| 490 | 470 | } | |
| 491 | 471 | ||
| 492 | 472 | var r0 error | |
| 493 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |
| 494 | - | r0 = returnFunc(ctx, content, baseURI) | |
| 473 | + | if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { | |
| 474 | + | r0 = rf(ctx, content, baseURI) | |
| 495 | 475 | } else { | |
| 496 | 476 | r0 = ret.Error(0) | |
| 497 | 477 | } | |
| 478 | + | ||
| 498 | 479 | return r0 | |
| 499 | 480 | } | |
| 500 | 481 | ||
| @@ -513,51 +494,36 @@ func (_e *MockWebView_Expecter) LoadHTML(ctx interface{}, content interface{}, b | |||
| 513 | 494 | ||
| 514 | 495 | func (_c *MockWebView_LoadHTML_Call) Run(run func(ctx context.Context, content string, baseURI string)) *MockWebView_LoadHTML_Call { | |
| 515 | 496 | _c.Call.Run(func(args mock.Arguments) { | |
| 516 | - | var arg0 context.Context | |
| 517 | - | if args[0] != nil { | |
| 518 | - | arg0 = args[0].(context.Context) | |
| 519 | - | } | |
| 520 | - | var arg1 string | |
| 521 | - | if args[1] != nil { | |
| 522 | - | arg1 = args[1].(string) | |
| 523 | - | } | |
| 524 | - | var arg2 string | |
| 525 | - | if args[2] != nil { | |
| 526 | - | arg2 = args[2].(string) | |
| 527 | - | } | |
| 528 | - | run( | |
| 529 | - | arg0, | |
| 530 | - | arg1, | |
| 531 | - | arg2, | |
| 532 | - | ) | |
| 497 | + | run(args[0].(context.Context), args[1].(string), args[2].(string)) | |
| 533 | 498 | }) | |
| 534 | 499 | return _c | |
| 535 | 500 | } | |
| 536 | 501 | ||
| 537 | - | func (_c *MockWebView_LoadHTML_Call) Return(err error) *MockWebView_LoadHTML_Call { | |
| 538 | - | _c.Call.Return(err) | |
| 502 | + | func (_c *MockWebView_LoadHTML_Call) Return(_a0 error) *MockWebView_LoadHTML_Call { | |
| 503 | + | _c.Call.Return(_a0) | |
| 539 | 504 | return _c | |
| 540 | 505 | } | |
| 541 | 506 | ||
| 542 | - | func (_c *MockWebView_LoadHTML_Call) RunAndReturn(run func(ctx context.Context, content string, baseURI string) error) *MockWebView_LoadHTML_Call { | |
| 507 | + | func (_c *MockWebView_LoadHTML_Call) RunAndReturn(run func(context.Context, string, string) error) *MockWebView_LoadHTML_Call { | |
| 543 | 508 | _c.Call.Return(run) | |
| 544 | 509 | return _c | |
| 545 | 510 | } | |
| 546 | 511 | ||
| 547 | - | // LoadURI provides a mock function for the type MockWebView | |
| 548 | - | func (_mock *MockWebView) LoadURI(ctx context.Context, uri string) error { | |
| 549 | - | ret := _mock.Called(ctx, uri) | |
| 512 | + | // LoadURI provides a mock function with given fields: ctx, uri | |
| 513 | + | func (_m *MockWebView) LoadURI(ctx context.Context, uri string) error { | |
| 514 | + | ret := _m.Called(ctx, uri) | |
| 550 | 515 | ||
| 551 | 516 | if len(ret) == 0 { | |
| 552 | 517 | panic("no return value specified for LoadURI") | |
| 553 | 518 | } | |
| 554 | 519 | ||
| 555 | 520 | var r0 error | |
| 556 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 557 | - | r0 = returnFunc(ctx, uri) | |
| 521 | + | if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 522 | + | r0 = rf(ctx, uri) | |
| 558 | 523 | } else { | |
| 559 | 524 | r0 = ret.Error(0) | |
| 560 | 525 | } | |
| 526 | + | ||
| 561 | 527 | return r0 | |
| 562 | 528 | } | |
| 563 | 529 | ||
| @@ -575,46 +541,36 @@ func (_e *MockWebView_Expecter) LoadURI(ctx interface{}, uri interface{}) *MockW | |||
| 575 | 541 | ||
| 576 | 542 | func (_c *MockWebView_LoadURI_Call) Run(run func(ctx context.Context, uri string)) *MockWebView_LoadURI_Call { | |
| 577 | 543 | _c.Call.Run(func(args mock.Arguments) { | |
| 578 | - | var arg0 context.Context | |
| 579 | - | if args[0] != nil { | |
| 580 | - | arg0 = args[0].(context.Context) | |
| 581 | - | } | |
| 582 | - | var arg1 string | |
| 583 | - | if args[1] != nil { | |
| 584 | - | arg1 = args[1].(string) | |
| 585 | - | } | |
| 586 | - | run( | |
| 587 | - | arg0, | |
| 588 | - | arg1, | |
| 589 | - | ) | |
| 544 | + | run(args[0].(context.Context), args[1].(string)) | |
| 590 | 545 | }) | |
| 591 | 546 | return _c | |
| 592 | 547 | } | |
| 593 | 548 | ||
| 594 | - | func (_c *MockWebView_LoadURI_Call) Return(err error) *MockWebView_LoadURI_Call { | |
| 595 | - | _c.Call.Return(err) | |
| 549 | + | func (_c *MockWebView_LoadURI_Call) Return(_a0 error) *MockWebView_LoadURI_Call { | |
| 550 | + | _c.Call.Return(_a0) | |
| 596 | 551 | return _c | |
| 597 | 552 | } | |
| 598 | 553 | ||
| 599 | - | func (_c *MockWebView_LoadURI_Call) RunAndReturn(run func(ctx context.Context, uri string) error) *MockWebView_LoadURI_Call { | |
| 554 | + | func (_c *MockWebView_LoadURI_Call) RunAndReturn(run func(context.Context, string) error) *MockWebView_LoadURI_Call { | |
| 600 | 555 | _c.Call.Return(run) | |
| 601 | 556 | return _c | |
| 602 | 557 | } | |
| 603 | 558 | ||
| 604 | - | // Reload provides a mock function for the type MockWebView | |
| 605 | - | func (_mock *MockWebView) Reload(ctx context.Context) error { | |
| 606 | - | ret := _mock.Called(ctx) | |
| 559 | + | // Reload provides a mock function with given fields: ctx | |
| 560 | + | func (_m *MockWebView) Reload(ctx context.Context) error { | |
| 561 | + | ret := _m.Called(ctx) | |
| 607 | 562 | ||
| 608 | 563 | if len(ret) == 0 { | |
| 609 | 564 | panic("no return value specified for Reload") | |
| 610 | 565 | } | |
| 611 | 566 | ||
| 612 | 567 | var r0 error | |
| 613 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 614 | - | r0 = returnFunc(ctx) | |
| 568 | + | if rf, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 569 | + | r0 = rf(ctx) | |
| 615 | 570 | } else { | |
| 616 | 571 | r0 = ret.Error(0) | |
| 617 | 572 | } | |
| 573 | + | ||
| 618 | 574 | return r0 | |
| 619 | 575 | } | |
| 620 | 576 | ||
| @@ -631,41 +587,36 @@ func (_e *MockWebView_Expecter) Reload(ctx interface{}) *MockWebView_Reload_Call | |||
| 631 | 587 | ||
| 632 | 588 | func (_c *MockWebView_Reload_Call) Run(run func(ctx context.Context)) *MockWebView_Reload_Call { | |
| 633 | 589 | _c.Call.Run(func(args mock.Arguments) { | |
| 634 | - | var arg0 context.Context | |
| 635 | - | if args[0] != nil { | |
| 636 | - | arg0 = args[0].(context.Context) | |
| 637 | - | } | |
| 638 | - | run( | |
| 639 | - | arg0, | |
| 640 | - | ) | |
| 590 | + | run(args[0].(context.Context)) | |
| 641 | 591 | }) | |
| 642 | 592 | return _c | |
| 643 | 593 | } | |
| 644 | 594 | ||
| 645 | - | func (_c *MockWebView_Reload_Call) Return(err error) *MockWebView_Reload_Call { | |
| 646 | - | _c.Call.Return(err) | |
| 595 | + | func (_c *MockWebView_Reload_Call) Return(_a0 error) *MockWebView_Reload_Call { | |
| 596 | + | _c.Call.Return(_a0) | |
| 647 | 597 | return _c | |
| 648 | 598 | } | |
| 649 | 599 | ||
| 650 | - | func (_c *MockWebView_Reload_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_Reload_Call { | |
| 600 | + | func (_c *MockWebView_Reload_Call) RunAndReturn(run func(context.Context) error) *MockWebView_Reload_Call { | |
| 651 | 601 | _c.Call.Return(run) | |
| 652 | 602 | return _c | |
| 653 | 603 | } | |
| 654 | 604 | ||
| 655 | - | // ReloadBypassCache provides a mock function for the type MockWebView | |
| 656 | - | func (_mock *MockWebView) ReloadBypassCache(ctx context.Context) error { | |
| 657 | - | ret := _mock.Called(ctx) | |
| 605 | + | // ReloadBypassCache provides a mock function with given fields: ctx | |
| 606 | + | func (_m *MockWebView) ReloadBypassCache(ctx context.Context) error { | |
| 607 | + | ret := _m.Called(ctx) | |
| 658 | 608 | ||
| 659 | 609 | if len(ret) == 0 { | |
| 660 | 610 | panic("no return value specified for ReloadBypassCache") | |
| 661 | 611 | } | |
| 662 | 612 | ||
| 663 | 613 | var r0 error | |
| 664 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 665 | - | r0 = returnFunc(ctx) | |
| 614 | + | if rf, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 615 | + | r0 = rf(ctx) | |
| 666 | 616 | } else { | |
| 667 | 617 | r0 = ret.Error(0) | |
| 668 | 618 | } | |
| 619 | + | ||
| 669 | 620 | return r0 | |
| 670 | 621 | } | |
| 671 | 622 | ||
| @@ -682,31 +633,24 @@ func (_e *MockWebView_Expecter) ReloadBypassCache(ctx interface{}) *MockWebView_ | |||
| 682 | 633 | ||
| 683 | 634 | func (_c *MockWebView_ReloadBypassCache_Call) Run(run func(ctx context.Context)) *MockWebView_ReloadBypassCache_Call { | |
| 684 | 635 | _c.Call.Run(func(args mock.Arguments) { | |
| 685 | - | var arg0 context.Context | |
| 686 | - | if args[0] != nil { | |
| 687 | - | arg0 = args[0].(context.Context) | |
| 688 | - | } | |
| 689 | - | run( | |
| 690 | - | arg0, | |
| 691 | - | ) | |
| 636 | + | run(args[0].(context.Context)) | |
| 692 | 637 | }) | |
| 693 | 638 | return _c | |
| 694 | 639 | } | |
| 695 | 640 | ||
| 696 | - | func (_c *MockWebView_ReloadBypassCache_Call) Return(err error) *MockWebView_ReloadBypassCache_Call { | |
| 697 | - | _c.Call.Return(err) | |
| 641 | + | func (_c *MockWebView_ReloadBypassCache_Call) Return(_a0 error) *MockWebView_ReloadBypassCache_Call { | |
| 642 | + | _c.Call.Return(_a0) | |
| 698 | 643 | return _c | |
| 699 | 644 | } | |
| 700 | 645 | ||
| 701 | - | func (_c *MockWebView_ReloadBypassCache_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_ReloadBypassCache_Call { | |
| 646 | + | func (_c *MockWebView_ReloadBypassCache_Call) RunAndReturn(run func(context.Context) error) *MockWebView_ReloadBypassCache_Call { | |
| 702 | 647 | _c.Call.Return(run) | |
| 703 | 648 | return _c | |
| 704 | 649 | } | |
| 705 | 650 | ||
| 706 | - | // SetCallbacks provides a mock function for the type MockWebView | |
| 707 | - | func (_mock *MockWebView) SetCallbacks(callbacks *port.WebViewCallbacks) { | |
| 708 | - | _mock.Called(callbacks) | |
| 709 | - | return | |
| 651 | + | // SetCallbacks provides a mock function with given fields: callbacks | |
| 652 | + | func (_m *MockWebView) SetCallbacks(callbacks *port.WebViewCallbacks) { | |
| 653 | + | _m.Called(callbacks) | |
| 710 | 654 | } | |
| 711 | 655 | ||
| 712 | 656 | // MockWebView_SetCallbacks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCallbacks' | |
| @@ -722,13 +666,7 @@ func (_e *MockWebView_Expecter) SetCallbacks(callbacks interface{}) *MockWebView | |||
| 722 | 666 | ||
| 723 | 667 | func (_c *MockWebView_SetCallbacks_Call) Run(run func(callbacks *port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call { | |
| 724 | 668 | _c.Call.Run(func(args mock.Arguments) { | |
| 725 | - | var arg0 *port.WebViewCallbacks | |
| 726 | - | if args[0] != nil { | |
| 727 | - | arg0 = args[0].(*port.WebViewCallbacks) | |
| 728 | - | } | |
| 729 | - | run( | |
| 730 | - | arg0, | |
| 731 | - | ) | |
| 669 | + | run(args[0].(*port.WebViewCallbacks)) | |
| 732 | 670 | }) | |
| 733 | 671 | return _c | |
| 734 | 672 | } | |
| @@ -738,25 +676,26 @@ func (_c *MockWebView_SetCallbacks_Call) Return() *MockWebView_SetCallbacks_Call | |||
| 738 | 676 | return _c | |
| 739 | 677 | } | |
| 740 | 678 | ||
| 741 | - | func (_c *MockWebView_SetCallbacks_Call) RunAndReturn(run func(callbacks *port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call { | |
| 679 | + | func (_c *MockWebView_SetCallbacks_Call) RunAndReturn(run func(*port.WebViewCallbacks)) *MockWebView_SetCallbacks_Call { | |
| 742 | 680 | _c.Run(run) | |
| 743 | 681 | return _c | |
| 744 | 682 | } | |
| 745 | 683 | ||
| 746 | - | // SetZoomLevel provides a mock function for the type MockWebView | |
| 747 | - | func (_mock *MockWebView) SetZoomLevel(ctx context.Context, level float64) error { | |
| 748 | - | ret := _mock.Called(ctx, level) | |
| 684 | + | // SetZoomLevel provides a mock function with given fields: ctx, level | |
| 685 | + | func (_m *MockWebView) SetZoomLevel(ctx context.Context, level float64) error { | |
| 686 | + | ret := _m.Called(ctx, level) | |
| 749 | 687 | ||
| 750 | 688 | if len(ret) == 0 { | |
| 751 | 689 | panic("no return value specified for SetZoomLevel") | |
| 752 | 690 | } | |
| 753 | 691 | ||
| 754 | 692 | var r0 error | |
| 755 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, float64) error); ok { | |
| 756 | - | r0 = returnFunc(ctx, level) | |
| 693 | + | if rf, ok := ret.Get(0).(func(context.Context, float64) error); ok { | |
| 694 | + | r0 = rf(ctx, level) | |
| 757 | 695 | } else { | |
| 758 | 696 | r0 = ret.Error(0) | |
| 759 | 697 | } | |
| 698 | + | ||
| 760 | 699 | return r0 | |
| 761 | 700 | } | |
| 762 | 701 | ||
| @@ -774,46 +713,36 @@ func (_e *MockWebView_Expecter) SetZoomLevel(ctx interface{}, level interface{}) | |||
| 774 | 713 | ||
| 775 | 714 | func (_c *MockWebView_SetZoomLevel_Call) Run(run func(ctx context.Context, level float64)) *MockWebView_SetZoomLevel_Call { | |
| 776 | 715 | _c.Call.Run(func(args mock.Arguments) { | |
| 777 | - | var arg0 context.Context | |
| 778 | - | if args[0] != nil { | |
| 779 | - | arg0 = args[0].(context.Context) | |
| 780 | - | } | |
| 781 | - | var arg1 float64 | |
| 782 | - | if args[1] != nil { | |
| 783 | - | arg1 = args[1].(float64) | |
| 784 | - | } | |
| 785 | - | run( | |
| 786 | - | arg0, | |
| 787 | - | arg1, | |
| 788 | - | ) | |
| 716 | + | run(args[0].(context.Context), args[1].(float64)) | |
| 789 | 717 | }) | |
| 790 | 718 | return _c | |
| 791 | 719 | } | |
| 792 | 720 | ||
| 793 | - | func (_c *MockWebView_SetZoomLevel_Call) Return(err error) *MockWebView_SetZoomLevel_Call { | |
| 794 | - | _c.Call.Return(err) | |
| 721 | + | func (_c *MockWebView_SetZoomLevel_Call) Return(_a0 error) *MockWebView_SetZoomLevel_Call { | |
| 722 | + | _c.Call.Return(_a0) | |
| 795 | 723 | return _c | |
| 796 | 724 | } | |
| 797 | 725 | ||
| 798 | - | func (_c *MockWebView_SetZoomLevel_Call) RunAndReturn(run func(ctx context.Context, level float64) error) *MockWebView_SetZoomLevel_Call { | |
| 726 | + | func (_c *MockWebView_SetZoomLevel_Call) RunAndReturn(run func(context.Context, float64) error) *MockWebView_SetZoomLevel_Call { | |
| 799 | 727 | _c.Call.Return(run) | |
| 800 | 728 | return _c | |
| 801 | 729 | } | |
| 802 | 730 | ||
| 803 | - | // State provides a mock function for the type MockWebView | |
| 804 | - | func (_mock *MockWebView) State() port.WebViewState { | |
| 805 | - | ret := _mock.Called() | |
| 731 | + | // State provides a mock function with no fields | |
| 732 | + | func (_m *MockWebView) State() port.WebViewState { | |
| 733 | + | ret := _m.Called() | |
| 806 | 734 | ||
| 807 | 735 | if len(ret) == 0 { | |
| 808 | 736 | panic("no return value specified for State") | |
| 809 | 737 | } | |
| 810 | 738 | ||
| 811 | 739 | var r0 port.WebViewState | |
| 812 | - | if returnFunc, ok := ret.Get(0).(func() port.WebViewState); ok { | |
| 813 | - | r0 = returnFunc() | |
| 740 | + | if rf, ok := ret.Get(0).(func() port.WebViewState); ok { | |
| 741 | + | r0 = rf() | |
| 814 | 742 | } else { | |
| 815 | 743 | r0 = ret.Get(0).(port.WebViewState) | |
| 816 | 744 | } | |
| 745 | + | ||
| 817 | 746 | return r0 | |
| 818 | 747 | } | |
| 819 | 748 | ||
| @@ -834,8 +763,8 @@ func (_c *MockWebView_State_Call) Run(run func()) *MockWebView_State_Call { | |||
| 834 | 763 | return _c | |
| 835 | 764 | } | |
| 836 | 765 | ||
| 837 | - | func (_c *MockWebView_State_Call) Return(webViewState port.WebViewState) *MockWebView_State_Call { | |
| 838 | - | _c.Call.Return(webViewState) | |
| 766 | + | func (_c *MockWebView_State_Call) Return(_a0 port.WebViewState) *MockWebView_State_Call { | |
| 767 | + | _c.Call.Return(_a0) | |
| 839 | 768 | return _c | |
| 840 | 769 | } | |
| 841 | 770 | ||
| @@ -844,20 +773,21 @@ func (_c *MockWebView_State_Call) RunAndReturn(run func() port.WebViewState) *Mo | |||
| 844 | 773 | return _c | |
| 845 | 774 | } | |
| 846 | 775 | ||
| 847 | - | // Stop provides a mock function for the type MockWebView | |
| 848 | - | func (_mock *MockWebView) Stop(ctx context.Context) error { | |
| 849 | - | ret := _mock.Called(ctx) | |
| 776 | + | // Stop provides a mock function with given fields: ctx | |
| 777 | + | func (_m *MockWebView) Stop(ctx context.Context) error { | |
| 778 | + | ret := _m.Called(ctx) | |
| 850 | 779 | ||
| 851 | 780 | if len(ret) == 0 { | |
| 852 | 781 | panic("no return value specified for Stop") | |
| 853 | 782 | } | |
| 854 | 783 | ||
| 855 | 784 | var r0 error | |
| 856 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 857 | - | r0 = returnFunc(ctx) | |
| 785 | + | if rf, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 786 | + | r0 = rf(ctx) | |
| 858 | 787 | } else { | |
| 859 | 788 | r0 = ret.Error(0) | |
| 860 | 789 | } | |
| 790 | + | ||
| 861 | 791 | return r0 | |
| 862 | 792 | } | |
| 863 | 793 | ||
| @@ -874,41 +804,36 @@ func (_e *MockWebView_Expecter) Stop(ctx interface{}) *MockWebView_Stop_Call { | |||
| 874 | 804 | ||
| 875 | 805 | func (_c *MockWebView_Stop_Call) Run(run func(ctx context.Context)) *MockWebView_Stop_Call { | |
| 876 | 806 | _c.Call.Run(func(args mock.Arguments) { | |
| 877 | - | var arg0 context.Context | |
| 878 | - | if args[0] != nil { | |
| 879 | - | arg0 = args[0].(context.Context) | |
| 880 | - | } | |
| 881 | - | run( | |
| 882 | - | arg0, | |
| 883 | - | ) | |
| 807 | + | run(args[0].(context.Context)) | |
| 884 | 808 | }) | |
| 885 | 809 | return _c | |
| 886 | 810 | } | |
| 887 | 811 | ||
| 888 | - | func (_c *MockWebView_Stop_Call) Return(err error) *MockWebView_Stop_Call { | |
| 889 | - | _c.Call.Return(err) | |
| 812 | + | func (_c *MockWebView_Stop_Call) Return(_a0 error) *MockWebView_Stop_Call { | |
| 813 | + | _c.Call.Return(_a0) | |
| 890 | 814 | return _c | |
| 891 | 815 | } | |
| 892 | 816 | ||
| 893 | - | func (_c *MockWebView_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockWebView_Stop_Call { | |
| 817 | + | func (_c *MockWebView_Stop_Call) RunAndReturn(run func(context.Context) error) *MockWebView_Stop_Call { | |
| 894 | 818 | _c.Call.Return(run) | |
| 895 | 819 | return _c | |
| 896 | 820 | } | |
| 897 | 821 | ||
| 898 | - | // Title provides a mock function for the type MockWebView | |
| 899 | - | func (_mock *MockWebView) Title() string { | |
| 900 | - | ret := _mock.Called() | |
| 822 | + | // Title provides a mock function with no fields | |
| 823 | + | func (_m *MockWebView) Title() string { | |
| 824 | + | ret := _m.Called() | |
| 901 | 825 | ||
| 902 | 826 | if len(ret) == 0 { | |
| 903 | 827 | panic("no return value specified for Title") | |
| 904 | 828 | } | |
| 905 | 829 | ||
| 906 | 830 | var r0 string | |
| 907 | - | if returnFunc, ok := ret.Get(0).(func() string); ok { | |
| 908 | - | r0 = returnFunc() | |
| 831 | + | if rf, ok := ret.Get(0).(func() string); ok { | |
| 832 | + | r0 = rf() | |
| 909 | 833 | } else { | |
| 910 | 834 | r0 = ret.Get(0).(string) | |
| 911 | 835 | } | |
| 836 | + | ||
| 912 | 837 | return r0 | |
| 913 | 838 | } | |
| 914 | 839 | ||
| @@ -929,8 +854,8 @@ func (_c *MockWebView_Title_Call) Run(run func()) *MockWebView_Title_Call { | |||
| 929 | 854 | return _c | |
| 930 | 855 | } | |
| 931 | 856 | ||
| 932 | - | func (_c *MockWebView_Title_Call) Return(s string) *MockWebView_Title_Call { | |
| 933 | - | _c.Call.Return(s) | |
| 857 | + | func (_c *MockWebView_Title_Call) Return(_a0 string) *MockWebView_Title_Call { | |
| 858 | + | _c.Call.Return(_a0) | |
| 934 | 859 | return _c | |
| 935 | 860 | } | |
| 936 | 861 | ||
| @@ -939,20 +864,21 @@ func (_c *MockWebView_Title_Call) RunAndReturn(run func() string) *MockWebView_T | |||
| 939 | 864 | return _c | |
| 940 | 865 | } | |
| 941 | 866 | ||
| 942 | - | // URI provides a mock function for the type MockWebView | |
| 943 | - | func (_mock *MockWebView) URI() string { | |
| 944 | - | ret := _mock.Called() | |
| 867 | + | // URI provides a mock function with no fields | |
| 868 | + | func (_m *MockWebView) URI() string { | |
| 869 | + | ret := _m.Called() | |
| 945 | 870 | ||
| 946 | 871 | if len(ret) == 0 { | |
| 947 | 872 | panic("no return value specified for URI") | |
| 948 | 873 | } | |
| 949 | 874 | ||
| 950 | 875 | var r0 string | |
| 951 | - | if returnFunc, ok := ret.Get(0).(func() string); ok { | |
| 952 | - | r0 = returnFunc() | |
| 876 | + | if rf, ok := ret.Get(0).(func() string); ok { | |
| 877 | + | r0 = rf() | |
| 953 | 878 | } else { | |
| 954 | 879 | r0 = ret.Get(0).(string) | |
| 955 | 880 | } | |
| 881 | + | ||
| 956 | 882 | return r0 | |
| 957 | 883 | } | |
| 958 | 884 | ||
| @@ -973,8 +899,8 @@ func (_c *MockWebView_URI_Call) Run(run func()) *MockWebView_URI_Call { | |||
| 973 | 899 | return _c | |
| 974 | 900 | } | |
| 975 | 901 | ||
| 976 | - | func (_c *MockWebView_URI_Call) Return(s string) *MockWebView_URI_Call { | |
| 977 | - | _c.Call.Return(s) | |
| 902 | + | func (_c *MockWebView_URI_Call) Return(_a0 string) *MockWebView_URI_Call { | |
| 903 | + | _c.Call.Return(_a0) | |
| 978 | 904 | return _c | |
| 979 | 905 | } | |
| 980 | 906 | ||
| @@ -982,3 +908,17 @@ func (_c *MockWebView_URI_Call) RunAndReturn(run func() string) *MockWebView_URI | |||
| 982 | 908 | _c.Call.Return(run) | |
| 983 | 909 | return _c | |
| 984 | 910 | } | |
| 911 | + | ||
| 912 | + | // NewMockWebView creates a new instance of MockWebView. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 913 | + | // The first argument is typically a *testing.T value. | |
| 914 | + | func NewMockWebView(t interface { | |
| 915 | + | mock.TestingT | |
| 916 | + | Cleanup(func()) | |
| 917 | + | }) *MockWebView { | |
| 918 | + | mock := &MockWebView{} | |
| 919 | + | mock.Mock.Test(t) | |
| 920 | + | ||
| 921 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 922 | + | ||
| 923 | + | return mock | |
| 924 | + | } | |
M internal/application/port/mocks/mock_web_view_factory.go +47 -62
| @@ -1,30 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | - | "github.com/bnema/dumber/internal/application/port" | |
| 8 | + | port "github.com/bnema/dumber/internal/application/port" | |
| 11 | 9 | mock "github.com/stretchr/testify/mock" | |
| 12 | 10 | ) | |
| 13 | 11 | ||
| 14 | - | // NewMockWebViewFactory creates a new instance of MockWebViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 15 | - | // The first argument is typically a *testing.T value. | |
| 16 | - | func NewMockWebViewFactory(t interface { | |
| 17 | - | mock.TestingT | |
| 18 | - | Cleanup(func()) | |
| 19 | - | }) *MockWebViewFactory { | |
| 20 | - | mock := &MockWebViewFactory{} | |
| 21 | - | mock.Mock.Test(t) | |
| 22 | - | ||
| 23 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 24 | - | ||
| 25 | - | return mock | |
| 26 | - | } | |
| 27 | - | ||
| 28 | 12 | // MockWebViewFactory is an autogenerated mock type for the WebViewFactory type | |
| 29 | 13 | type MockWebViewFactory struct { | |
| 30 | 14 | mock.Mock | |
| @@ -38,9 +22,9 @@ func (_m *MockWebViewFactory) EXPECT() *MockWebViewFactory_Expecter { | |||
| 38 | 22 | return &MockWebViewFactory_Expecter{mock: &_m.Mock} | |
| 39 | 23 | } | |
| 40 | 24 | ||
| 41 | - | // Create provides a mock function for the type MockWebViewFactory | |
| 42 | - | func (_mock *MockWebViewFactory) Create(ctx context.Context) (port.WebView, error) { | |
| 43 | - | ret := _mock.Called(ctx) | |
| 25 | + | // Create provides a mock function with given fields: ctx | |
| 26 | + | func (_m *MockWebViewFactory) Create(ctx context.Context) (port.WebView, error) { | |
| 27 | + | ret := _m.Called(ctx) | |
| 44 | 28 | ||
| 45 | 29 | if len(ret) == 0 { | |
| 46 | 30 | panic("no return value specified for Create") | |
| @@ -48,21 +32,23 @@ func (_mock *MockWebViewFactory) Create(ctx context.Context) (port.WebView, erro | |||
| 48 | 32 | ||
| 49 | 33 | var r0 port.WebView | |
| 50 | 34 | var r1 error | |
| 51 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok { | |
| 52 | - | return returnFunc(ctx) | |
| 35 | + | if rf, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok { | |
| 36 | + | return rf(ctx) | |
| 53 | 37 | } | |
| 54 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) port.WebView); ok { | |
| 55 | - | r0 = returnFunc(ctx) | |
| 38 | + | if rf, ok := ret.Get(0).(func(context.Context) port.WebView); ok { | |
| 39 | + | r0 = rf(ctx) | |
| 56 | 40 | } else { | |
| 57 | 41 | if ret.Get(0) != nil { | |
| 58 | 42 | r0 = ret.Get(0).(port.WebView) | |
| 59 | 43 | } | |
| 60 | 44 | } | |
| 61 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 62 | - | r1 = returnFunc(ctx) | |
| 45 | + | ||
| 46 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 47 | + | r1 = rf(ctx) | |
| 63 | 48 | } else { | |
| 64 | 49 | r1 = ret.Error(1) | |
| 65 | 50 | } | |
| 51 | + | ||
| 66 | 52 | return r0, r1 | |
| 67 | 53 | } | |
| 68 | 54 | ||
| @@ -79,30 +65,24 @@ func (_e *MockWebViewFactory_Expecter) Create(ctx interface{}) *MockWebViewFacto | |||
| 79 | 65 | ||
| 80 | 66 | func (_c *MockWebViewFactory_Create_Call) Run(run func(ctx context.Context)) *MockWebViewFactory_Create_Call { | |
| 81 | 67 | _c.Call.Run(func(args mock.Arguments) { | |
| 82 | - | var arg0 context.Context | |
| 83 | - | if args[0] != nil { | |
| 84 | - | arg0 = args[0].(context.Context) | |
| 85 | - | } | |
| 86 | - | run( | |
| 87 | - | arg0, | |
| 88 | - | ) | |
| 68 | + | run(args[0].(context.Context)) | |
| 89 | 69 | }) | |
| 90 | 70 | return _c | |
| 91 | 71 | } | |
| 92 | 72 | ||
| 93 | - | func (_c *MockWebViewFactory_Create_Call) Return(webView port.WebView, err error) *MockWebViewFactory_Create_Call { | |
| 94 | - | _c.Call.Return(webView, err) | |
| 73 | + | func (_c *MockWebViewFactory_Create_Call) Return(_a0 port.WebView, _a1 error) *MockWebViewFactory_Create_Call { | |
| 74 | + | _c.Call.Return(_a0, _a1) | |
| 95 | 75 | return _c | |
| 96 | 76 | } | |
| 97 | 77 | ||
| 98 | - | func (_c *MockWebViewFactory_Create_Call) RunAndReturn(run func(ctx context.Context) (port.WebView, error)) *MockWebViewFactory_Create_Call { | |
| 78 | + | func (_c *MockWebViewFactory_Create_Call) RunAndReturn(run func(context.Context) (port.WebView, error)) *MockWebViewFactory_Create_Call { | |
| 99 | 79 | _c.Call.Return(run) | |
| 100 | 80 | return _c | |
| 101 | 81 | } | |
| 102 | 82 | ||
| 103 | - | // CreateRelated provides a mock function for the type MockWebViewFactory | |
| 104 | - | func (_mock *MockWebViewFactory) CreateRelated(ctx context.Context, parentID port.WebViewID) (port.WebView, error) { | |
| 105 | - | ret := _mock.Called(ctx, parentID) | |
| 83 | + | // CreateRelated provides a mock function with given fields: ctx, parentID | |
| 84 | + | func (_m *MockWebViewFactory) CreateRelated(ctx context.Context, parentID port.WebViewID) (port.WebView, error) { | |
| 85 | + | ret := _m.Called(ctx, parentID) | |
| 106 | 86 | ||
| 107 | 87 | if len(ret) == 0 { | |
| 108 | 88 | panic("no return value specified for CreateRelated") | |
| @@ -110,21 +90,23 @@ func (_mock *MockWebViewFactory) CreateRelated(ctx context.Context, parentID por | |||
| 110 | 90 | ||
| 111 | 91 | var r0 port.WebView | |
| 112 | 92 | var r1 error | |
| 113 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID) (port.WebView, error)); ok { | |
| 114 | - | return returnFunc(ctx, parentID) | |
| 93 | + | if rf, ok := ret.Get(0).(func(context.Context, port.WebViewID) (port.WebView, error)); ok { | |
| 94 | + | return rf(ctx, parentID) | |
| 115 | 95 | } | |
| 116 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, port.WebViewID) port.WebView); ok { | |
| 117 | - | r0 = returnFunc(ctx, parentID) | |
| 96 | + | if rf, ok := ret.Get(0).(func(context.Context, port.WebViewID) port.WebView); ok { | |
| 97 | + | r0 = rf(ctx, parentID) | |
| 118 | 98 | } else { | |
| 119 | 99 | if ret.Get(0) != nil { | |
| 120 | 100 | r0 = ret.Get(0).(port.WebView) | |
| 121 | 101 | } | |
| 122 | 102 | } | |
| 123 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, port.WebViewID) error); ok { | |
| 124 | - | r1 = returnFunc(ctx, parentID) | |
| 103 | + | ||
| 104 | + | if rf, ok := ret.Get(1).(func(context.Context, port.WebViewID) error); ok { | |
| 105 | + | r1 = rf(ctx, parentID) | |
| 125 | 106 | } else { | |
| 126 | 107 | r1 = ret.Error(1) | |
| 127 | 108 | } | |
| 109 | + | ||
| 128 | 110 | return r0, r1 | |
| 129 | 111 | } | |
| 130 | 112 | ||
| @@ -142,28 +124,31 @@ func (_e *MockWebViewFactory_Expecter) CreateRelated(ctx interface{}, parentID i | |||
| 142 | 124 | ||
| 143 | 125 | func (_c *MockWebViewFactory_CreateRelated_Call) Run(run func(ctx context.Context, parentID port.WebViewID)) *MockWebViewFactory_CreateRelated_Call { | |
| 144 | 126 | _c.Call.Run(func(args mock.Arguments) { | |
| 145 | - | var arg0 context.Context | |
| 146 | - | if args[0] != nil { | |
| 147 | - | arg0 = args[0].(context.Context) | |
| 148 | - | } | |
| 149 | - | var arg1 port.WebViewID | |
| 150 | - | if args[1] != nil { | |
| 151 | - | arg1 = args[1].(port.WebViewID) | |
| 152 | - | } | |
| 153 | - | run( | |
| 154 | - | arg0, | |
| 155 | - | arg1, | |
| 156 | - | ) | |
| 127 | + | run(args[0].(context.Context), args[1].(port.WebViewID)) | |
| 157 | 128 | }) | |
| 158 | 129 | return _c | |
| 159 | 130 | } | |
| 160 | 131 | ||
| 161 | - | func (_c *MockWebViewFactory_CreateRelated_Call) Return(webView port.WebView, err error) *MockWebViewFactory_CreateRelated_Call { | |
| 162 | - | _c.Call.Return(webView, err) | |
| 132 | + | func (_c *MockWebViewFactory_CreateRelated_Call) Return(_a0 port.WebView, _a1 error) *MockWebViewFactory_CreateRelated_Call { | |
| 133 | + | _c.Call.Return(_a0, _a1) | |
| 163 | 134 | return _c | |
| 164 | 135 | } | |
| 165 | 136 | ||
| 166 | - | func (_c *MockWebViewFactory_CreateRelated_Call) RunAndReturn(run func(ctx context.Context, parentID port.WebViewID) (port.WebView, error)) *MockWebViewFactory_CreateRelated_Call { | |
| 137 | + | func (_c *MockWebViewFactory_CreateRelated_Call) RunAndReturn(run func(context.Context, port.WebViewID) (port.WebView, error)) *MockWebViewFactory_CreateRelated_Call { | |
| 167 | 138 | _c.Call.Return(run) | |
| 168 | 139 | return _c | |
| 169 | 140 | } | |
| 141 | + | ||
| 142 | + | // NewMockWebViewFactory creates a new instance of MockWebViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 143 | + | // The first argument is typically a *testing.T value. | |
| 144 | + | func NewMockWebViewFactory(t interface { | |
| 145 | + | mock.TestingT | |
| 146 | + | Cleanup(func()) | |
| 147 | + | }) *MockWebViewFactory { | |
| 148 | + | mock := &MockWebViewFactory{} | |
| 149 | + | mock.Mock.Test(t) | |
| 150 | + | ||
| 151 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 152 | + | ||
| 153 | + | return mock | |
| 154 | + | } | |
M internal/application/port/mocks/mock_web_view_pool.go +53 -73
| @@ -1,30 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | - | "github.com/bnema/dumber/internal/application/port" | |
| 8 | + | port "github.com/bnema/dumber/internal/application/port" | |
| 11 | 9 | mock "github.com/stretchr/testify/mock" | |
| 12 | 10 | ) | |
| 13 | 11 | ||
| 14 | - | // NewMockWebViewPool creates a new instance of MockWebViewPool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 15 | - | // The first argument is typically a *testing.T value. | |
| 16 | - | func NewMockWebViewPool(t interface { | |
| 17 | - | mock.TestingT | |
| 18 | - | Cleanup(func()) | |
| 19 | - | }) *MockWebViewPool { | |
| 20 | - | mock := &MockWebViewPool{} | |
| 21 | - | mock.Mock.Test(t) | |
| 22 | - | ||
| 23 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 24 | - | ||
| 25 | - | return mock | |
| 26 | - | } | |
| 27 | - | ||
| 28 | 12 | // MockWebViewPool is an autogenerated mock type for the WebViewPool type | |
| 29 | 13 | type MockWebViewPool struct { | |
| 30 | 14 | mock.Mock | |
| @@ -38,9 +22,9 @@ func (_m *MockWebViewPool) EXPECT() *MockWebViewPool_Expecter { | |||
| 38 | 22 | return &MockWebViewPool_Expecter{mock: &_m.Mock} | |
| 39 | 23 | } | |
| 40 | 24 | ||
| 41 | - | // Acquire provides a mock function for the type MockWebViewPool | |
| 42 | - | func (_mock *MockWebViewPool) Acquire(ctx context.Context) (port.WebView, error) { | |
| 43 | - | ret := _mock.Called(ctx) | |
| 25 | + | // Acquire provides a mock function with given fields: ctx | |
| 26 | + | func (_m *MockWebViewPool) Acquire(ctx context.Context) (port.WebView, error) { | |
| 27 | + | ret := _m.Called(ctx) | |
| 44 | 28 | ||
| 45 | 29 | if len(ret) == 0 { | |
| 46 | 30 | panic("no return value specified for Acquire") | |
| @@ -48,21 +32,23 @@ func (_mock *MockWebViewPool) Acquire(ctx context.Context) (port.WebView, error) | |||
| 48 | 32 | ||
| 49 | 33 | var r0 port.WebView | |
| 50 | 34 | var r1 error | |
| 51 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok { | |
| 52 | - | return returnFunc(ctx) | |
| 35 | + | if rf, ok := ret.Get(0).(func(context.Context) (port.WebView, error)); ok { | |
| 36 | + | return rf(ctx) | |
| 53 | 37 | } | |
| 54 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) port.WebView); ok { | |
| 55 | - | r0 = returnFunc(ctx) | |
| 38 | + | if rf, ok := ret.Get(0).(func(context.Context) port.WebView); ok { | |
| 39 | + | r0 = rf(ctx) | |
| 56 | 40 | } else { | |
| 57 | 41 | if ret.Get(0) != nil { | |
| 58 | 42 | r0 = ret.Get(0).(port.WebView) | |
| 59 | 43 | } | |
| 60 | 44 | } | |
| 61 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 62 | - | r1 = returnFunc(ctx) | |
| 45 | + | ||
| 46 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 47 | + | r1 = rf(ctx) | |
| 63 | 48 | } else { | |
| 64 | 49 | r1 = ret.Error(1) | |
| 65 | 50 | } | |
| 51 | + | ||
| 66 | 52 | return r0, r1 | |
| 67 | 53 | } | |
| 68 | 54 | ||
| @@ -79,31 +65,24 @@ func (_e *MockWebViewPool_Expecter) Acquire(ctx interface{}) *MockWebViewPool_Ac | |||
| 79 | 65 | ||
| 80 | 66 | func (_c *MockWebViewPool_Acquire_Call) Run(run func(ctx context.Context)) *MockWebViewPool_Acquire_Call { | |
| 81 | 67 | _c.Call.Run(func(args mock.Arguments) { | |
| 82 | - | var arg0 context.Context | |
| 83 | - | if args[0] != nil { | |
| 84 | - | arg0 = args[0].(context.Context) | |
| 85 | - | } | |
| 86 | - | run( | |
| 87 | - | arg0, | |
| 88 | - | ) | |
| 68 | + | run(args[0].(context.Context)) | |
| 89 | 69 | }) | |
| 90 | 70 | return _c | |
| 91 | 71 | } | |
| 92 | 72 | ||
| 93 | - | func (_c *MockWebViewPool_Acquire_Call) Return(webView port.WebView, err error) *MockWebViewPool_Acquire_Call { | |
| 94 | - | _c.Call.Return(webView, err) | |
| 73 | + | func (_c *MockWebViewPool_Acquire_Call) Return(_a0 port.WebView, _a1 error) *MockWebViewPool_Acquire_Call { | |
| 74 | + | _c.Call.Return(_a0, _a1) | |
| 95 | 75 | return _c | |
| 96 | 76 | } | |
| 97 | 77 | ||
| 98 | - | func (_c *MockWebViewPool_Acquire_Call) RunAndReturn(run func(ctx context.Context) (port.WebView, error)) *MockWebViewPool_Acquire_Call { | |
| 78 | + | func (_c *MockWebViewPool_Acquire_Call) RunAndReturn(run func(context.Context) (port.WebView, error)) *MockWebViewPool_Acquire_Call { | |
| 99 | 79 | _c.Call.Return(run) | |
| 100 | 80 | return _c | |
| 101 | 81 | } | |
| 102 | 82 | ||
| 103 | - | // Close provides a mock function for the type MockWebViewPool | |
| 104 | - | func (_mock *MockWebViewPool) Close() { | |
| 105 | - | _mock.Called() | |
| 106 | - | return | |
| 83 | + | // Close provides a mock function with no fields | |
| 84 | + | func (_m *MockWebViewPool) Close() { | |
| 85 | + | _m.Called() | |
| 107 | 86 | } | |
| 108 | 87 | ||
| 109 | 88 | // MockWebViewPool_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' | |
| @@ -133,10 +112,9 @@ func (_c *MockWebViewPool_Close_Call) RunAndReturn(run func()) *MockWebViewPool_ | |||
| 133 | 112 | return _c | |
| 134 | 113 | } | |
| 135 | 114 | ||
| 136 | - | // Prewarm provides a mock function for the type MockWebViewPool | |
| 137 | - | func (_mock *MockWebViewPool) Prewarm(count int) { | |
| 138 | - | _mock.Called(count) | |
| 139 | - | return | |
| 115 | + | // Prewarm provides a mock function with given fields: count | |
| 116 | + | func (_m *MockWebViewPool) Prewarm(count int) { | |
| 117 | + | _m.Called(count) | |
| 140 | 118 | } | |
| 141 | 119 | ||
| 142 | 120 | // MockWebViewPool_Prewarm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prewarm' | |
| @@ -152,13 +130,7 @@ func (_e *MockWebViewPool_Expecter) Prewarm(count interface{}) *MockWebViewPool_ | |||
| 152 | 130 | ||
| 153 | 131 | func (_c *MockWebViewPool_Prewarm_Call) Run(run func(count int)) *MockWebViewPool_Prewarm_Call { | |
| 154 | 132 | _c.Call.Run(func(args mock.Arguments) { | |
| 155 | - | var arg0 int | |
| 156 | - | if args[0] != nil { | |
| 157 | - | arg0 = args[0].(int) | |
| 158 | - | } | |
| 159 | - | run( | |
| 160 | - | arg0, | |
| 161 | - | ) | |
| 133 | + | run(args[0].(int)) | |
| 162 | 134 | }) | |
| 163 | 135 | return _c | |
| 164 | 136 | } | |
| @@ -168,15 +140,14 @@ func (_c *MockWebViewPool_Prewarm_Call) Return() *MockWebViewPool_Prewarm_Call { | |||
| 168 | 140 | return _c | |
| 169 | 141 | } | |
| 170 | 142 | ||
| 171 | - | func (_c *MockWebViewPool_Prewarm_Call) RunAndReturn(run func(count int)) *MockWebViewPool_Prewarm_Call { | |
| 143 | + | func (_c *MockWebViewPool_Prewarm_Call) RunAndReturn(run func(int)) *MockWebViewPool_Prewarm_Call { | |
| 172 | 144 | _c.Run(run) | |
| 173 | 145 | return _c | |
| 174 | 146 | } | |
| 175 | 147 | ||
| 176 | - | // Release provides a mock function for the type MockWebViewPool | |
| 177 | - | func (_mock *MockWebViewPool) Release(wv port.WebView) { | |
| 178 | - | _mock.Called(wv) | |
| 179 | - | return | |
| 148 | + | // Release provides a mock function with given fields: wv | |
| 149 | + | func (_m *MockWebViewPool) Release(wv port.WebView) { | |
| 150 | + | _m.Called(wv) | |
| 180 | 151 | } | |
| 181 | 152 | ||
| 182 | 153 | // MockWebViewPool_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release' | |
| @@ -192,13 +163,7 @@ func (_e *MockWebViewPool_Expecter) Release(wv interface{}) *MockWebViewPool_Rel | |||
| 192 | 163 | ||
| 193 | 164 | func (_c *MockWebViewPool_Release_Call) Run(run func(wv port.WebView)) *MockWebViewPool_Release_Call { | |
| 194 | 165 | _c.Call.Run(func(args mock.Arguments) { | |
| 195 | - | var arg0 port.WebView | |
| 196 | - | if args[0] != nil { | |
| 197 | - | arg0 = args[0].(port.WebView) | |
| 198 | - | } | |
| 199 | - | run( | |
| 200 | - | arg0, | |
| 201 | - | ) | |
| 166 | + | run(args[0].(port.WebView)) | |
| 202 | 167 | }) | |
| 203 | 168 | return _c | |
| 204 | 169 | } | |
| @@ -208,25 +173,26 @@ func (_c *MockWebViewPool_Release_Call) Return() *MockWebViewPool_Release_Call { | |||
| 208 | 173 | return _c | |
| 209 | 174 | } | |
| 210 | 175 | ||
| 211 | - | func (_c *MockWebViewPool_Release_Call) RunAndReturn(run func(wv port.WebView)) *MockWebViewPool_Release_Call { | |
| 176 | + | func (_c *MockWebViewPool_Release_Call) RunAndReturn(run func(port.WebView)) *MockWebViewPool_Release_Call { | |
| 212 | 177 | _c.Run(run) | |
| 213 | 178 | return _c | |
| 214 | 179 | } | |
| 215 | 180 | ||
| 216 | - | // Size provides a mock function for the type MockWebViewPool | |
| 217 | - | func (_mock *MockWebViewPool) Size() int { | |
| 218 | - | ret := _mock.Called() | |
| 181 | + | // Size provides a mock function with no fields | |
| 182 | + | func (_m *MockWebViewPool) Size() int { | |
| 183 | + | ret := _m.Called() | |
| 219 | 184 | ||
| 220 | 185 | if len(ret) == 0 { | |
| 221 | 186 | panic("no return value specified for Size") | |
| 222 | 187 | } | |
| 223 | 188 | ||
| 224 | 189 | var r0 int | |
| 225 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 226 | - | r0 = returnFunc() | |
| 190 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 191 | + | r0 = rf() | |
| 227 | 192 | } else { | |
| 228 | 193 | r0 = ret.Get(0).(int) | |
| 229 | 194 | } | |
| 195 | + | ||
| 230 | 196 | return r0 | |
| 231 | 197 | } | |
| 232 | 198 | ||
| @@ -247,8 +213,8 @@ func (_c *MockWebViewPool_Size_Call) Run(run func()) *MockWebViewPool_Size_Call | |||
| 247 | 213 | return _c | |
| 248 | 214 | } | |
| 249 | 215 | ||
| 250 | - | func (_c *MockWebViewPool_Size_Call) Return(n int) *MockWebViewPool_Size_Call { | |
| 251 | - | _c.Call.Return(n) | |
| 216 | + | func (_c *MockWebViewPool_Size_Call) Return(_a0 int) *MockWebViewPool_Size_Call { | |
| 217 | + | _c.Call.Return(_a0) | |
| 252 | 218 | return _c | |
| 253 | 219 | } | |
| 254 | 220 | ||
| @@ -256,3 +222,17 @@ func (_c *MockWebViewPool_Size_Call) RunAndReturn(run func() int) *MockWebViewPo | |||
| 256 | 222 | _c.Call.Return(run) | |
| 257 | 223 | return _c | |
| 258 | 224 | } | |
| 225 | + | ||
| 226 | + | // NewMockWebViewPool creates a new instance of MockWebViewPool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 227 | + | // The first argument is typically a *testing.T value. | |
| 228 | + | func NewMockWebViewPool(t interface { | |
| 229 | + | mock.TestingT | |
| 230 | + | Cleanup(func()) | |
| 231 | + | }) *MockWebViewPool { | |
| 232 | + | mock := &MockWebViewPool{} | |
| 233 | + | mock.Mock.Test(t) | |
| 234 | + | ||
| 235 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 236 | + | ||
| 237 | + | return mock | |
| 238 | + | } | |
M internal/domain/repository/mocks/mock_content_whitelist_repository.go +66 -101
| @@ -1,29 +1,13 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | 8 | mock "github.com/stretchr/testify/mock" | |
| 11 | 9 | ) | |
| 12 | 10 | ||
| 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 | 11 | // MockContentWhitelistRepository is an autogenerated mock type for the ContentWhitelistRepository type | |
| 28 | 12 | type MockContentWhitelistRepository struct { | |
| 29 | 13 | mock.Mock | |
| @@ -37,20 +21,21 @@ func (_m *MockContentWhitelistRepository) EXPECT() *MockContentWhitelistReposito | |||
| 37 | 21 | return &MockContentWhitelistRepository_Expecter{mock: &_m.Mock} | |
| 38 | 22 | } | |
| 39 | 23 | ||
| 40 | - | // Add provides a mock function for the type MockContentWhitelistRepository | |
| 41 | - | func (_mock *MockContentWhitelistRepository) Add(ctx context.Context, domain string) error { | |
| 42 | - | ret := _mock.Called(ctx, domain) | |
| 24 | + | // Add provides a mock function with given fields: ctx, domain | |
| 25 | + | func (_m *MockContentWhitelistRepository) Add(ctx context.Context, domain string) error { | |
| 26 | + | ret := _m.Called(ctx, domain) | |
| 43 | 27 | ||
| 44 | 28 | if len(ret) == 0 { | |
| 45 | 29 | panic("no return value specified for Add") | |
| 46 | 30 | } | |
| 47 | 31 | ||
| 48 | 32 | var r0 error | |
| 49 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 50 | - | r0 = returnFunc(ctx, domain) | |
| 33 | + | if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 34 | + | r0 = rf(ctx, domain) | |
| 51 | 35 | } else { | |
| 52 | 36 | r0 = ret.Error(0) | |
| 53 | 37 | } | |
| 38 | + | ||
| 54 | 39 | return r0 | |
| 55 | 40 | } | |
| 56 | 41 | ||
| @@ -68,35 +53,24 @@ func (_e *MockContentWhitelistRepository_Expecter) Add(ctx interface{}, domain i | |||
| 68 | 53 | ||
| 69 | 54 | func (_c *MockContentWhitelistRepository_Add_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Add_Call { | |
| 70 | 55 | _c.Call.Run(func(args mock.Arguments) { | |
| 71 | - | var arg0 context.Context | |
| 72 | - | if args[0] != nil { | |
| 73 | - | arg0 = args[0].(context.Context) | |
| 74 | - | } | |
| 75 | - | var arg1 string | |
| 76 | - | if args[1] != nil { | |
| 77 | - | arg1 = args[1].(string) | |
| 78 | - | } | |
| 79 | - | run( | |
| 80 | - | arg0, | |
| 81 | - | arg1, | |
| 82 | - | ) | |
| 56 | + | run(args[0].(context.Context), args[1].(string)) | |
| 83 | 57 | }) | |
| 84 | 58 | return _c | |
| 85 | 59 | } | |
| 86 | 60 | ||
| 87 | - | func (_c *MockContentWhitelistRepository_Add_Call) Return(err error) *MockContentWhitelistRepository_Add_Call { | |
| 88 | - | _c.Call.Return(err) | |
| 61 | + | func (_c *MockContentWhitelistRepository_Add_Call) Return(_a0 error) *MockContentWhitelistRepository_Add_Call { | |
| 62 | + | _c.Call.Return(_a0) | |
| 89 | 63 | return _c | |
| 90 | 64 | } | |
| 91 | 65 | ||
| 92 | - | func (_c *MockContentWhitelistRepository_Add_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Add_Call { | |
| 66 | + | func (_c *MockContentWhitelistRepository_Add_Call) RunAndReturn(run func(context.Context, string) error) *MockContentWhitelistRepository_Add_Call { | |
| 93 | 67 | _c.Call.Return(run) | |
| 94 | 68 | return _c | |
| 95 | 69 | } | |
| 96 | 70 | ||
| 97 | - | // Contains provides a mock function for the type MockContentWhitelistRepository | |
| 98 | - | func (_mock *MockContentWhitelistRepository) Contains(ctx context.Context, domain string) (bool, error) { | |
| 99 | - | ret := _mock.Called(ctx, domain) | |
| 71 | + | // Contains provides a mock function with given fields: ctx, domain | |
| 72 | + | func (_m *MockContentWhitelistRepository) Contains(ctx context.Context, domain string) (bool, error) { | |
| 73 | + | ret := _m.Called(ctx, domain) | |
| 100 | 74 | ||
| 101 | 75 | if len(ret) == 0 { | |
| 102 | 76 | panic("no return value specified for Contains") | |
| @@ -104,19 +78,21 @@ func (_mock *MockContentWhitelistRepository) Contains(ctx context.Context, domai | |||
| 104 | 78 | ||
| 105 | 79 | var r0 bool | |
| 106 | 80 | var r1 error | |
| 107 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { | |
| 108 | - | return returnFunc(ctx, domain) | |
| 81 | + | if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { | |
| 82 | + | return rf(ctx, domain) | |
| 109 | 83 | } | |
| 110 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { | |
| 111 | - | r0 = returnFunc(ctx, domain) | |
| 84 | + | if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { | |
| 85 | + | r0 = rf(ctx, domain) | |
| 112 | 86 | } else { | |
| 113 | 87 | r0 = ret.Get(0).(bool) | |
| 114 | 88 | } | |
| 115 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 116 | - | r1 = returnFunc(ctx, domain) | |
| 89 | + | ||
| 90 | + | if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 91 | + | r1 = rf(ctx, domain) | |
| 117 | 92 | } else { | |
| 118 | 93 | r1 = ret.Error(1) | |
| 119 | 94 | } | |
| 95 | + | ||
| 120 | 96 | return r0, r1 | |
| 121 | 97 | } | |
| 122 | 98 | ||
| @@ -134,35 +110,24 @@ func (_e *MockContentWhitelistRepository_Expecter) Contains(ctx interface{}, dom | |||
| 134 | 110 | ||
| 135 | 111 | func (_c *MockContentWhitelistRepository_Contains_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Contains_Call { | |
| 136 | 112 | _c.Call.Run(func(args mock.Arguments) { | |
| 137 | - | var arg0 context.Context | |
| 138 | - | if args[0] != nil { | |
| 139 | - | arg0 = args[0].(context.Context) | |
| 140 | - | } | |
| 141 | - | var arg1 string | |
| 142 | - | if args[1] != nil { | |
| 143 | - | arg1 = args[1].(string) | |
| 144 | - | } | |
| 145 | - | run( | |
| 146 | - | arg0, | |
| 147 | - | arg1, | |
| 148 | - | ) | |
| 113 | + | run(args[0].(context.Context), args[1].(string)) | |
| 149 | 114 | }) | |
| 150 | 115 | return _c | |
| 151 | 116 | } | |
| 152 | 117 | ||
| 153 | - | func (_c *MockContentWhitelistRepository_Contains_Call) Return(b bool, err error) *MockContentWhitelistRepository_Contains_Call { | |
| 154 | - | _c.Call.Return(b, err) | |
| 118 | + | func (_c *MockContentWhitelistRepository_Contains_Call) Return(_a0 bool, _a1 error) *MockContentWhitelistRepository_Contains_Call { | |
| 119 | + | _c.Call.Return(_a0, _a1) | |
| 155 | 120 | return _c | |
| 156 | 121 | } | |
| 157 | 122 | ||
| 158 | - | func (_c *MockContentWhitelistRepository_Contains_Call) RunAndReturn(run func(ctx context.Context, domain string) (bool, error)) *MockContentWhitelistRepository_Contains_Call { | |
| 123 | + | func (_c *MockContentWhitelistRepository_Contains_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *MockContentWhitelistRepository_Contains_Call { | |
| 159 | 124 | _c.Call.Return(run) | |
| 160 | 125 | return _c | |
| 161 | 126 | } | |
| 162 | 127 | ||
| 163 | - | // GetAll provides a mock function for the type MockContentWhitelistRepository | |
| 164 | - | func (_mock *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]string, error) { | |
| 165 | - | ret := _mock.Called(ctx) | |
| 128 | + | // GetAll provides a mock function with given fields: ctx | |
| 129 | + | func (_m *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]string, error) { | |
| 130 | + | ret := _m.Called(ctx) | |
| 166 | 131 | ||
| 167 | 132 | if len(ret) == 0 { | |
| 168 | 133 | panic("no return value specified for GetAll") | |
| @@ -170,21 +135,23 @@ func (_mock *MockContentWhitelistRepository) GetAll(ctx context.Context) ([]stri | |||
| 170 | 135 | ||
| 171 | 136 | var r0 []string | |
| 172 | 137 | var r1 error | |
| 173 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { | |
| 174 | - | return returnFunc(ctx) | |
| 138 | + | if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { | |
| 139 | + | return rf(ctx) | |
| 175 | 140 | } | |
| 176 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { | |
| 177 | - | r0 = returnFunc(ctx) | |
| 141 | + | if rf, ok := ret.Get(0).(func(context.Context) []string); ok { | |
| 142 | + | r0 = rf(ctx) | |
| 178 | 143 | } else { | |
| 179 | 144 | if ret.Get(0) != nil { | |
| 180 | 145 | r0 = ret.Get(0).([]string) | |
| 181 | 146 | } | |
| 182 | 147 | } | |
| 183 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 184 | - | r1 = returnFunc(ctx) | |
| 148 | + | ||
| 149 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 150 | + | r1 = rf(ctx) | |
| 185 | 151 | } else { | |
| 186 | 152 | r1 = ret.Error(1) | |
| 187 | 153 | } | |
| 154 | + | ||
| 188 | 155 | return r0, r1 | |
| 189 | 156 | } | |
| 190 | 157 | ||
| @@ -201,41 +168,36 @@ func (_e *MockContentWhitelistRepository_Expecter) GetAll(ctx interface{}) *Mock | |||
| 201 | 168 | ||
| 202 | 169 | func (_c *MockContentWhitelistRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockContentWhitelistRepository_GetAll_Call { | |
| 203 | 170 | _c.Call.Run(func(args mock.Arguments) { | |
| 204 | - | var arg0 context.Context | |
| 205 | - | if args[0] != nil { | |
| 206 | - | arg0 = args[0].(context.Context) | |
| 207 | - | } | |
| 208 | - | run( | |
| 209 | - | arg0, | |
| 210 | - | ) | |
| 171 | + | run(args[0].(context.Context)) | |
| 211 | 172 | }) | |
| 212 | 173 | return _c | |
| 213 | 174 | } | |
| 214 | 175 | ||
| 215 | - | func (_c *MockContentWhitelistRepository_GetAll_Call) Return(strings []string, err error) *MockContentWhitelistRepository_GetAll_Call { | |
| 216 | - | _c.Call.Return(strings, err) | |
| 176 | + | func (_c *MockContentWhitelistRepository_GetAll_Call) Return(_a0 []string, _a1 error) *MockContentWhitelistRepository_GetAll_Call { | |
| 177 | + | _c.Call.Return(_a0, _a1) | |
| 217 | 178 | return _c | |
| 218 | 179 | } | |
| 219 | 180 | ||
| 220 | - | func (_c *MockContentWhitelistRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockContentWhitelistRepository_GetAll_Call { | |
| 181 | + | func (_c *MockContentWhitelistRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]string, error)) *MockContentWhitelistRepository_GetAll_Call { | |
| 221 | 182 | _c.Call.Return(run) | |
| 222 | 183 | return _c | |
| 223 | 184 | } | |
| 224 | 185 | ||
| 225 | - | // Remove provides a mock function for the type MockContentWhitelistRepository | |
| 226 | - | func (_mock *MockContentWhitelistRepository) Remove(ctx context.Context, domain string) error { | |
| 227 | - | ret := _mock.Called(ctx, domain) | |
| 186 | + | // Remove provides a mock function with given fields: ctx, domain | |
| 187 | + | func (_m *MockContentWhitelistRepository) Remove(ctx context.Context, domain string) error { | |
| 188 | + | ret := _m.Called(ctx, domain) | |
| 228 | 189 | ||
| 229 | 190 | if len(ret) == 0 { | |
| 230 | 191 | panic("no return value specified for Remove") | |
| 231 | 192 | } | |
| 232 | 193 | ||
| 233 | 194 | var r0 error | |
| 234 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 235 | - | r0 = returnFunc(ctx, domain) | |
| 195 | + | if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 196 | + | r0 = rf(ctx, domain) | |
| 236 | 197 | } else { | |
| 237 | 198 | r0 = ret.Error(0) | |
| 238 | 199 | } | |
| 200 | + | ||
| 239 | 201 | return r0 | |
| 240 | 202 | } | |
| 241 | 203 | ||
| @@ -253,28 +215,31 @@ func (_e *MockContentWhitelistRepository_Expecter) Remove(ctx interface{}, domai | |||
| 253 | 215 | ||
| 254 | 216 | func (_c *MockContentWhitelistRepository_Remove_Call) Run(run func(ctx context.Context, domain string)) *MockContentWhitelistRepository_Remove_Call { | |
| 255 | 217 | _c.Call.Run(func(args mock.Arguments) { | |
| 256 | - | var arg0 context.Context | |
| 257 | - | if args[0] != nil { | |
| 258 | - | arg0 = args[0].(context.Context) | |
| 259 | - | } | |
| 260 | - | var arg1 string | |
| 261 | - | if args[1] != nil { | |
| 262 | - | arg1 = args[1].(string) | |
| 263 | - | } | |
| 264 | - | run( | |
| 265 | - | arg0, | |
| 266 | - | arg1, | |
| 267 | - | ) | |
| 218 | + | run(args[0].(context.Context), args[1].(string)) | |
| 268 | 219 | }) | |
| 269 | 220 | return _c | |
| 270 | 221 | } | |
| 271 | 222 | ||
| 272 | - | func (_c *MockContentWhitelistRepository_Remove_Call) Return(err error) *MockContentWhitelistRepository_Remove_Call { | |
| 273 | - | _c.Call.Return(err) | |
| 223 | + | func (_c *MockContentWhitelistRepository_Remove_Call) Return(_a0 error) *MockContentWhitelistRepository_Remove_Call { | |
| 224 | + | _c.Call.Return(_a0) | |
| 274 | 225 | return _c | |
| 275 | 226 | } | |
| 276 | 227 | ||
| 277 | - | func (_c *MockContentWhitelistRepository_Remove_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockContentWhitelistRepository_Remove_Call { | |
| 228 | + | func (_c *MockContentWhitelistRepository_Remove_Call) RunAndReturn(run func(context.Context, string) error) *MockContentWhitelistRepository_Remove_Call { | |
| 278 | 229 | _c.Call.Return(run) | |
| 279 | 230 | return _c | |
| 280 | 231 | } | |
| 232 | + | ||
| 233 | + | // NewMockContentWhitelistRepository creates a new instance of MockContentWhitelistRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 234 | + | // The first argument is typically a *testing.T value. | |
| 235 | + | func NewMockContentWhitelistRepository(t interface { | |
| 236 | + | mock.TestingT | |
| 237 | + | Cleanup(func()) | |
| 238 | + | }) *MockContentWhitelistRepository { | |
| 239 | + | mock := &MockContentWhitelistRepository{} | |
| 240 | + | mock.Mock.Test(t) | |
| 241 | + | ||
| 242 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 243 | + | ||
| 244 | + | return mock | |
| 245 | + | } | |
M internal/domain/repository/mocks/mock_favorite_repository.go +142 -249
| @@ -1,30 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | - | "github.com/bnema/dumber/internal/domain/entity" | |
| 8 | + | entity "github.com/bnema/dumber/internal/domain/entity" | |
| 11 | 9 | mock "github.com/stretchr/testify/mock" | |
| 12 | 10 | ) | |
| 13 | 11 | ||
| 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 | 12 | // MockFavoriteRepository is an autogenerated mock type for the FavoriteRepository type | |
| 29 | 13 | type MockFavoriteRepository struct { | |
| 30 | 14 | mock.Mock | |
| @@ -38,20 +22,21 @@ func (_m *MockFavoriteRepository) EXPECT() *MockFavoriteRepository_Expecter { | |||
| 38 | 22 | return &MockFavoriteRepository_Expecter{mock: &_m.Mock} | |
| 39 | 23 | } | |
| 40 | 24 | ||
| 41 | - | // Delete provides a mock function for the type MockFavoriteRepository | |
| 42 | - | func (_mock *MockFavoriteRepository) Delete(ctx context.Context, id entity.FavoriteID) error { | |
| 43 | - | ret := _mock.Called(ctx, id) | |
| 25 | + | // Delete provides a mock function with given fields: ctx, id | |
| 26 | + | func (_m *MockFavoriteRepository) Delete(ctx context.Context, id entity.FavoriteID) error { | |
| 27 | + | ret := _m.Called(ctx, id) | |
| 44 | 28 | ||
| 45 | 29 | if len(ret) == 0 { | |
| 46 | 30 | panic("no return value specified for Delete") | |
| 47 | 31 | } | |
| 48 | 32 | ||
| 49 | 33 | var r0 error | |
| 50 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok { | |
| 51 | - | r0 = returnFunc(ctx, id) | |
| 34 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) error); ok { | |
| 35 | + | r0 = rf(ctx, id) | |
| 52 | 36 | } else { | |
| 53 | 37 | r0 = ret.Error(0) | |
| 54 | 38 | } | |
| 39 | + | ||
| 55 | 40 | return r0 | |
| 56 | 41 | } | |
| 57 | 42 | ||
| @@ -69,35 +54,24 @@ func (_e *MockFavoriteRepository_Expecter) Delete(ctx interface{}, id interface{ | |||
| 69 | 54 | ||
| 70 | 55 | func (_c *MockFavoriteRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_Delete_Call { | |
| 71 | 56 | _c.Call.Run(func(args mock.Arguments) { | |
| 72 | - | var arg0 context.Context | |
| 73 | - | if args[0] != nil { | |
| 74 | - | arg0 = args[0].(context.Context) | |
| 75 | - | } | |
| 76 | - | var arg1 entity.FavoriteID | |
| 77 | - | if args[1] != nil { | |
| 78 | - | arg1 = args[1].(entity.FavoriteID) | |
| 79 | - | } | |
| 80 | - | run( | |
| 81 | - | arg0, | |
| 82 | - | arg1, | |
| 83 | - | ) | |
| 57 | + | run(args[0].(context.Context), args[1].(entity.FavoriteID)) | |
| 84 | 58 | }) | |
| 85 | 59 | return _c | |
| 86 | 60 | } | |
| 87 | 61 | ||
| 88 | - | func (_c *MockFavoriteRepository_Delete_Call) Return(err error) *MockFavoriteRepository_Delete_Call { | |
| 89 | - | _c.Call.Return(err) | |
| 62 | + | func (_c *MockFavoriteRepository_Delete_Call) Return(_a0 error) *MockFavoriteRepository_Delete_Call { | |
| 63 | + | _c.Call.Return(_a0) | |
| 90 | 64 | return _c | |
| 91 | 65 | } | |
| 92 | 66 | ||
| 93 | - | func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call { | |
| 67 | + | func (_c *MockFavoriteRepository_Delete_Call) RunAndReturn(run func(context.Context, entity.FavoriteID) error) *MockFavoriteRepository_Delete_Call { | |
| 94 | 68 | _c.Call.Return(run) | |
| 95 | 69 | return _c | |
| 96 | 70 | } | |
| 97 | 71 | ||
| 98 | - | // FindByID provides a mock function for the type MockFavoriteRepository | |
| 99 | - | func (_mock *MockFavoriteRepository) FindByID(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error) { | |
| 100 | - | ret := _mock.Called(ctx, id) | |
| 72 | + | // FindByID provides a mock function with given fields: ctx, id | |
| 73 | + | func (_m *MockFavoriteRepository) FindByID(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error) { | |
| 74 | + | ret := _m.Called(ctx, id) | |
| 101 | 75 | ||
| 102 | 76 | if len(ret) == 0 { | |
| 103 | 77 | panic("no return value specified for FindByID") | |
| @@ -105,21 +79,23 @@ func (_mock *MockFavoriteRepository) FindByID(ctx context.Context, id entity.Fav | |||
| 105 | 79 | ||
| 106 | 80 | var r0 *entity.Favorite | |
| 107 | 81 | var r1 error | |
| 108 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok { | |
| 109 | - | return returnFunc(ctx, id) | |
| 82 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) (*entity.Favorite, error)); ok { | |
| 83 | + | return rf(ctx, id) | |
| 110 | 84 | } | |
| 111 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok { | |
| 112 | - | r0 = returnFunc(ctx, id) | |
| 85 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) *entity.Favorite); ok { | |
| 86 | + | r0 = rf(ctx, id) | |
| 113 | 87 | } else { | |
| 114 | 88 | if ret.Get(0) != nil { | |
| 115 | 89 | r0 = ret.Get(0).(*entity.Favorite) | |
| 116 | 90 | } | |
| 117 | 91 | } | |
| 118 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { | |
| 119 | - | r1 = returnFunc(ctx, id) | |
| 92 | + | ||
| 93 | + | if rf, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { | |
| 94 | + | r1 = rf(ctx, id) | |
| 120 | 95 | } else { | |
| 121 | 96 | r1 = ret.Error(1) | |
| 122 | 97 | } | |
| 98 | + | ||
| 123 | 99 | return r0, r1 | |
| 124 | 100 | } | |
| 125 | 101 | ||
| @@ -137,35 +113,24 @@ func (_e *MockFavoriteRepository_Expecter) FindByID(ctx interface{}, id interfac | |||
| 137 | 113 | ||
| 138 | 114 | func (_c *MockFavoriteRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FavoriteID)) *MockFavoriteRepository_FindByID_Call { | |
| 139 | 115 | _c.Call.Run(func(args mock.Arguments) { | |
| 140 | - | var arg0 context.Context | |
| 141 | - | if args[0] != nil { | |
| 142 | - | arg0 = args[0].(context.Context) | |
| 143 | - | } | |
| 144 | - | var arg1 entity.FavoriteID | |
| 145 | - | if args[1] != nil { | |
| 146 | - | arg1 = args[1].(entity.FavoriteID) | |
| 147 | - | } | |
| 148 | - | run( | |
| 149 | - | arg0, | |
| 150 | - | arg1, | |
| 151 | - | ) | |
| 116 | + | run(args[0].(context.Context), args[1].(entity.FavoriteID)) | |
| 152 | 117 | }) | |
| 153 | 118 | return _c | |
| 154 | 119 | } | |
| 155 | 120 | ||
| 156 | - | func (_c *MockFavoriteRepository_FindByID_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByID_Call { | |
| 157 | - | _c.Call.Return(favorite, err) | |
| 121 | + | func (_c *MockFavoriteRepository_FindByID_Call) Return(_a0 *entity.Favorite, _a1 error) *MockFavoriteRepository_FindByID_Call { | |
| 122 | + | _c.Call.Return(_a0, _a1) | |
| 158 | 123 | return _c | |
| 159 | 124 | } | |
| 160 | 125 | ||
| 161 | - | func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call { | |
| 126 | + | func (_c *MockFavoriteRepository_FindByID_Call) RunAndReturn(run func(context.Context, entity.FavoriteID) (*entity.Favorite, error)) *MockFavoriteRepository_FindByID_Call { | |
| 162 | 127 | _c.Call.Return(run) | |
| 163 | 128 | return _c | |
| 164 | 129 | } | |
| 165 | 130 | ||
| 166 | - | // FindByURL provides a mock function for the type MockFavoriteRepository | |
| 167 | - | func (_mock *MockFavoriteRepository) FindByURL(ctx context.Context, url string) (*entity.Favorite, error) { | |
| 168 | - | ret := _mock.Called(ctx, url) | |
| 131 | + | // FindByURL provides a mock function with given fields: ctx, url | |
| 132 | + | func (_m *MockFavoriteRepository) FindByURL(ctx context.Context, url string) (*entity.Favorite, error) { | |
| 133 | + | ret := _m.Called(ctx, url) | |
| 169 | 134 | ||
| 170 | 135 | if len(ret) == 0 { | |
| 171 | 136 | panic("no return value specified for FindByURL") | |
| @@ -173,21 +138,23 @@ func (_mock *MockFavoriteRepository) FindByURL(ctx context.Context, url string) | |||
| 173 | 138 | ||
| 174 | 139 | var r0 *entity.Favorite | |
| 175 | 140 | var r1 error | |
| 176 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok { | |
| 177 | - | return returnFunc(ctx, url) | |
| 141 | + | if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.Favorite, error)); ok { | |
| 142 | + | return rf(ctx, url) | |
| 178 | 143 | } | |
| 179 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok { | |
| 180 | - | r0 = returnFunc(ctx, url) | |
| 144 | + | if rf, ok := ret.Get(0).(func(context.Context, string) *entity.Favorite); ok { | |
| 145 | + | r0 = rf(ctx, url) | |
| 181 | 146 | } else { | |
| 182 | 147 | if ret.Get(0) != nil { | |
| 183 | 148 | r0 = ret.Get(0).(*entity.Favorite) | |
| 184 | 149 | } | |
| 185 | 150 | } | |
| 186 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 187 | - | r1 = returnFunc(ctx, url) | |
| 151 | + | ||
| 152 | + | if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 153 | + | r1 = rf(ctx, url) | |
| 188 | 154 | } else { | |
| 189 | 155 | r1 = ret.Error(1) | |
| 190 | 156 | } | |
| 157 | + | ||
| 191 | 158 | return r0, r1 | |
| 192 | 159 | } | |
| 193 | 160 | ||
| @@ -205,35 +172,24 @@ func (_e *MockFavoriteRepository_Expecter) FindByURL(ctx interface{}, url interf | |||
| 205 | 172 | ||
| 206 | 173 | func (_c *MockFavoriteRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockFavoriteRepository_FindByURL_Call { | |
| 207 | 174 | _c.Call.Run(func(args mock.Arguments) { | |
| 208 | - | var arg0 context.Context | |
| 209 | - | if args[0] != nil { | |
| 210 | - | arg0 = args[0].(context.Context) | |
| 211 | - | } | |
| 212 | - | var arg1 string | |
| 213 | - | if args[1] != nil { | |
| 214 | - | arg1 = args[1].(string) | |
| 215 | - | } | |
| 216 | - | run( | |
| 217 | - | arg0, | |
| 218 | - | arg1, | |
| 219 | - | ) | |
| 175 | + | run(args[0].(context.Context), args[1].(string)) | |
| 220 | 176 | }) | |
| 221 | 177 | return _c | |
| 222 | 178 | } | |
| 223 | 179 | ||
| 224 | - | func (_c *MockFavoriteRepository_FindByURL_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_FindByURL_Call { | |
| 225 | - | _c.Call.Return(favorite, err) | |
| 180 | + | func (_c *MockFavoriteRepository_FindByURL_Call) Return(_a0 *entity.Favorite, _a1 error) *MockFavoriteRepository_FindByURL_Call { | |
| 181 | + | _c.Call.Return(_a0, _a1) | |
| 226 | 182 | return _c | |
| 227 | 183 | } | |
| 228 | 184 | ||
| 229 | - | func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call { | |
| 185 | + | func (_c *MockFavoriteRepository_FindByURL_Call) RunAndReturn(run func(context.Context, string) (*entity.Favorite, error)) *MockFavoriteRepository_FindByURL_Call { | |
| 230 | 186 | _c.Call.Return(run) | |
| 231 | 187 | return _c | |
| 232 | 188 | } | |
| 233 | 189 | ||
| 234 | - | // GetAll provides a mock function for the type MockFavoriteRepository | |
| 235 | - | func (_mock *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favorite, error) { | |
| 236 | - | ret := _mock.Called(ctx) | |
| 190 | + | // GetAll provides a mock function with given fields: ctx | |
| 191 | + | func (_m *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favorite, error) { | |
| 192 | + | ret := _m.Called(ctx) | |
| 237 | 193 | ||
| 238 | 194 | if len(ret) == 0 { | |
| 239 | 195 | panic("no return value specified for GetAll") | |
| @@ -241,21 +197,23 @@ func (_mock *MockFavoriteRepository) GetAll(ctx context.Context) ([]*entity.Favo | |||
| 241 | 197 | ||
| 242 | 198 | var r0 []*entity.Favorite | |
| 243 | 199 | var r1 error | |
| 244 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok { | |
| 245 | - | return returnFunc(ctx) | |
| 200 | + | if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.Favorite, error)); ok { | |
| 201 | + | return rf(ctx) | |
| 246 | 202 | } | |
| 247 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok { | |
| 248 | - | r0 = returnFunc(ctx) | |
| 203 | + | if rf, ok := ret.Get(0).(func(context.Context) []*entity.Favorite); ok { | |
| 204 | + | r0 = rf(ctx) | |
| 249 | 205 | } else { | |
| 250 | 206 | if ret.Get(0) != nil { | |
| 251 | 207 | r0 = ret.Get(0).([]*entity.Favorite) | |
| 252 | 208 | } | |
| 253 | 209 | } | |
| 254 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 255 | - | r1 = returnFunc(ctx) | |
| 210 | + | ||
| 211 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 212 | + | r1 = rf(ctx) | |
| 256 | 213 | } else { | |
| 257 | 214 | r1 = ret.Error(1) | |
| 258 | 215 | } | |
| 216 | + | ||
| 259 | 217 | return r0, r1 | |
| 260 | 218 | } | |
| 261 | 219 | ||
| @@ -272,30 +230,24 @@ func (_e *MockFavoriteRepository_Expecter) GetAll(ctx interface{}) *MockFavorite | |||
| 272 | 230 | ||
| 273 | 231 | func (_c *MockFavoriteRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFavoriteRepository_GetAll_Call { | |
| 274 | 232 | _c.Call.Run(func(args mock.Arguments) { | |
| 275 | - | var arg0 context.Context | |
| 276 | - | if args[0] != nil { | |
| 277 | - | arg0 = args[0].(context.Context) | |
| 278 | - | } | |
| 279 | - | run( | |
| 280 | - | arg0, | |
| 281 | - | ) | |
| 233 | + | run(args[0].(context.Context)) | |
| 282 | 234 | }) | |
| 283 | 235 | return _c | |
| 284 | 236 | } | |
| 285 | 237 | ||
| 286 | - | func (_c *MockFavoriteRepository_GetAll_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetAll_Call { | |
| 287 | - | _c.Call.Return(favorites, err) | |
| 238 | + | func (_c *MockFavoriteRepository_GetAll_Call) Return(_a0 []*entity.Favorite, _a1 error) *MockFavoriteRepository_GetAll_Call { | |
| 239 | + | _c.Call.Return(_a0, _a1) | |
| 288 | 240 | return _c | |
| 289 | 241 | } | |
| 290 | 242 | ||
| 291 | - | func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call { | |
| 243 | + | func (_c *MockFavoriteRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetAll_Call { | |
| 292 | 244 | _c.Call.Return(run) | |
| 293 | 245 | return _c | |
| 294 | 246 | } | |
| 295 | 247 | ||
| 296 | - | // GetByFolder provides a mock function for the type MockFavoriteRepository | |
| 297 | - | func (_mock *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error) { | |
| 298 | - | ret := _mock.Called(ctx, folderID) | |
| 248 | + | // GetByFolder provides a mock function with given fields: ctx, folderID | |
| 249 | + | func (_m *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error) { | |
| 250 | + | ret := _m.Called(ctx, folderID) | |
| 299 | 251 | ||
| 300 | 252 | if len(ret) == 0 { | |
| 301 | 253 | panic("no return value specified for GetByFolder") | |
| @@ -303,21 +255,23 @@ func (_mock *MockFavoriteRepository) GetByFolder(ctx context.Context, folderID * | |||
| 303 | 255 | ||
| 304 | 256 | var r0 []*entity.Favorite | |
| 305 | 257 | var r1 error | |
| 306 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)); ok { | |
| 307 | - | return returnFunc(ctx, folderID) | |
| 258 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)); ok { | |
| 259 | + | return rf(ctx, folderID) | |
| 308 | 260 | } | |
| 309 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Favorite); ok { | |
| 310 | - | r0 = returnFunc(ctx, folderID) | |
| 261 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Favorite); ok { | |
| 262 | + | r0 = rf(ctx, folderID) | |
| 311 | 263 | } else { | |
| 312 | 264 | if ret.Get(0) != nil { | |
| 313 | 265 | r0 = ret.Get(0).([]*entity.Favorite) | |
| 314 | 266 | } | |
| 315 | 267 | } | |
| 316 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok { | |
| 317 | - | r1 = returnFunc(ctx, folderID) | |
| 268 | + | ||
| 269 | + | if rf, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok { | |
| 270 | + | r1 = rf(ctx, folderID) | |
| 318 | 271 | } else { | |
| 319 | 272 | r1 = ret.Error(1) | |
| 320 | 273 | } | |
| 274 | + | ||
| 321 | 275 | return r0, r1 | |
| 322 | 276 | } | |
| 323 | 277 | ||
| @@ -335,35 +289,24 @@ func (_e *MockFavoriteRepository_Expecter) GetByFolder(ctx interface{}, folderID | |||
| 335 | 289 | ||
| 336 | 290 | func (_c *MockFavoriteRepository_GetByFolder_Call) Run(run func(ctx context.Context, folderID *entity.FolderID)) *MockFavoriteRepository_GetByFolder_Call { | |
| 337 | 291 | _c.Call.Run(func(args mock.Arguments) { | |
| 338 | - | var arg0 context.Context | |
| 339 | - | if args[0] != nil { | |
| 340 | - | arg0 = args[0].(context.Context) | |
| 341 | - | } | |
| 342 | - | var arg1 *entity.FolderID | |
| 343 | - | if args[1] != nil { | |
| 344 | - | arg1 = args[1].(*entity.FolderID) | |
| 345 | - | } | |
| 346 | - | run( | |
| 347 | - | arg0, | |
| 348 | - | arg1, | |
| 349 | - | ) | |
| 292 | + | run(args[0].(context.Context), args[1].(*entity.FolderID)) | |
| 350 | 293 | }) | |
| 351 | 294 | return _c | |
| 352 | 295 | } | |
| 353 | 296 | ||
| 354 | - | func (_c *MockFavoriteRepository_GetByFolder_Call) Return(favorites []*entity.Favorite, err error) *MockFavoriteRepository_GetByFolder_Call { | |
| 355 | - | _c.Call.Return(favorites, err) | |
| 297 | + | func (_c *MockFavoriteRepository_GetByFolder_Call) Return(_a0 []*entity.Favorite, _a1 error) *MockFavoriteRepository_GetByFolder_Call { | |
| 298 | + | _c.Call.Return(_a0, _a1) | |
| 356 | 299 | return _c | |
| 357 | 300 | } | |
| 358 | 301 | ||
| 359 | - | func (_c *MockFavoriteRepository_GetByFolder_Call) RunAndReturn(run func(ctx context.Context, folderID *entity.FolderID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByFolder_Call { | |
| 302 | + | func (_c *MockFavoriteRepository_GetByFolder_Call) RunAndReturn(run func(context.Context, *entity.FolderID) ([]*entity.Favorite, error)) *MockFavoriteRepository_GetByFolder_Call { | |
| 360 | 303 | _c.Call.Return(run) | |
| 361 | 304 | return _c | |
| 362 | 305 | } | |
| 363 | 306 | ||
| 364 | - | // GetByShortcut provides a mock function for the type MockFavoriteRepository | |
| 365 | - | func (_mock *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) { | |
| 366 | - | ret := _mock.Called(ctx, key) | |
| 307 | + | // GetByShortcut provides a mock function with given fields: ctx, key | |
| 308 | + | func (_m *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) (*entity.Favorite, error) { | |
| 309 | + | ret := _m.Called(ctx, key) | |
| 367 | 310 | ||
| 368 | 311 | if len(ret) == 0 { | |
| 369 | 312 | panic("no return value specified for GetByShortcut") | |
| @@ -371,21 +314,23 @@ func (_mock *MockFavoriteRepository) GetByShortcut(ctx context.Context, key int) | |||
| 371 | 314 | ||
| 372 | 315 | var r0 *entity.Favorite | |
| 373 | 316 | var r1 error | |
| 374 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok { | |
| 375 | - | return returnFunc(ctx, key) | |
| 317 | + | if rf, ok := ret.Get(0).(func(context.Context, int) (*entity.Favorite, error)); ok { | |
| 318 | + | return rf(ctx, key) | |
| 376 | 319 | } | |
| 377 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok { | |
| 378 | - | r0 = returnFunc(ctx, key) | |
| 320 | + | if rf, ok := ret.Get(0).(func(context.Context, int) *entity.Favorite); ok { | |
| 321 | + | r0 = rf(ctx, key) | |
| 379 | 322 | } else { | |
| 380 | 323 | if ret.Get(0) != nil { | |
| 381 | 324 | r0 = ret.Get(0).(*entity.Favorite) | |
| 382 | 325 | } | |
| 383 | 326 | } | |
| 384 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |
| 385 | - | r1 = returnFunc(ctx, key) | |
| 327 | + | ||
| 328 | + | if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { | |
| 329 | + | r1 = rf(ctx, key) | |
| 386 | 330 | } else { | |
| 387 | 331 | r1 = ret.Error(1) | |
| 388 | 332 | } | |
| 333 | + | ||
| 389 | 334 | return r0, r1 | |
| 390 | 335 | } | |
| 391 | 336 | ||
| @@ -403,46 +348,36 @@ func (_e *MockFavoriteRepository_Expecter) GetByShortcut(ctx interface{}, key in | |||
| 403 | 348 | ||
| 404 | 349 | func (_c *MockFavoriteRepository_GetByShortcut_Call) Run(run func(ctx context.Context, key int)) *MockFavoriteRepository_GetByShortcut_Call { | |
| 405 | 350 | _c.Call.Run(func(args mock.Arguments) { | |
| 406 | - | var arg0 context.Context | |
| 407 | - | if args[0] != nil { | |
| 408 | - | arg0 = args[0].(context.Context) | |
| 409 | - | } | |
| 410 | - | var arg1 int | |
| 411 | - | if args[1] != nil { | |
| 412 | - | arg1 = args[1].(int) | |
| 413 | - | } | |
| 414 | - | run( | |
| 415 | - | arg0, | |
| 416 | - | arg1, | |
| 417 | - | ) | |
| 351 | + | run(args[0].(context.Context), args[1].(int)) | |
| 418 | 352 | }) | |
| 419 | 353 | return _c | |
| 420 | 354 | } | |
| 421 | 355 | ||
| 422 | - | func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(favorite *entity.Favorite, err error) *MockFavoriteRepository_GetByShortcut_Call { | |
| 423 | - | _c.Call.Return(favorite, err) | |
| 356 | + | func (_c *MockFavoriteRepository_GetByShortcut_Call) Return(_a0 *entity.Favorite, _a1 error) *MockFavoriteRepository_GetByShortcut_Call { | |
| 357 | + | _c.Call.Return(_a0, _a1) | |
| 424 | 358 | return _c | |
| 425 | 359 | } | |
| 426 | 360 | ||
| 427 | - | func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(ctx context.Context, key int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call { | |
| 361 | + | func (_c *MockFavoriteRepository_GetByShortcut_Call) RunAndReturn(run func(context.Context, int) (*entity.Favorite, error)) *MockFavoriteRepository_GetByShortcut_Call { | |
| 428 | 362 | _c.Call.Return(run) | |
| 429 | 363 | return _c | |
| 430 | 364 | } | |
| 431 | 365 | ||
| 432 | - | // Save provides a mock function for the type MockFavoriteRepository | |
| 433 | - | func (_mock *MockFavoriteRepository) Save(ctx context.Context, fav *entity.Favorite) error { | |
| 434 | - | ret := _mock.Called(ctx, fav) | |
| 366 | + | // Save provides a mock function with given fields: ctx, fav | |
| 367 | + | func (_m *MockFavoriteRepository) Save(ctx context.Context, fav *entity.Favorite) error { | |
| 368 | + | ret := _m.Called(ctx, fav) | |
| 435 | 369 | ||
| 436 | 370 | if len(ret) == 0 { | |
| 437 | 371 | panic("no return value specified for Save") | |
| 438 | 372 | } | |
| 439 | 373 | ||
| 440 | 374 | var r0 error | |
| 441 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok { | |
| 442 | - | r0 = returnFunc(ctx, fav) | |
| 375 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.Favorite) error); ok { | |
| 376 | + | r0 = rf(ctx, fav) | |
| 443 | 377 | } else { | |
| 444 | 378 | r0 = ret.Error(0) | |
| 445 | 379 | } | |
| 380 | + | ||
| 446 | 381 | return r0 | |
| 447 | 382 | } | |
| 448 | 383 | ||
| @@ -460,46 +395,36 @@ func (_e *MockFavoriteRepository_Expecter) Save(ctx interface{}, fav interface{} | |||
| 460 | 395 | ||
| 461 | 396 | func (_c *MockFavoriteRepository_Save_Call) Run(run func(ctx context.Context, fav *entity.Favorite)) *MockFavoriteRepository_Save_Call { | |
| 462 | 397 | _c.Call.Run(func(args mock.Arguments) { | |
| 463 | - | var arg0 context.Context | |
| 464 | - | if args[0] != nil { | |
| 465 | - | arg0 = args[0].(context.Context) | |
| 466 | - | } | |
| 467 | - | var arg1 *entity.Favorite | |
| 468 | - | if args[1] != nil { | |
| 469 | - | arg1 = args[1].(*entity.Favorite) | |
| 470 | - | } | |
| 471 | - | run( | |
| 472 | - | arg0, | |
| 473 | - | arg1, | |
| 474 | - | ) | |
| 398 | + | run(args[0].(context.Context), args[1].(*entity.Favorite)) | |
| 475 | 399 | }) | |
| 476 | 400 | return _c | |
| 477 | 401 | } | |
| 478 | 402 | ||
| 479 | - | func (_c *MockFavoriteRepository_Save_Call) Return(err error) *MockFavoriteRepository_Save_Call { | |
| 480 | - | _c.Call.Return(err) | |
| 403 | + | func (_c *MockFavoriteRepository_Save_Call) Return(_a0 error) *MockFavoriteRepository_Save_Call { | |
| 404 | + | _c.Call.Return(_a0) | |
| 481 | 405 | return _c | |
| 482 | 406 | } | |
| 483 | 407 | ||
| 484 | - | func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(ctx context.Context, fav *entity.Favorite) error) *MockFavoriteRepository_Save_Call { | |
| 408 | + | func (_c *MockFavoriteRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.Favorite) error) *MockFavoriteRepository_Save_Call { | |
| 485 | 409 | _c.Call.Return(run) | |
| 486 | 410 | return _c | |
| 487 | 411 | } | |
| 488 | 412 | ||
| 489 | - | // SetFolder provides a mock function for the type MockFavoriteRepository | |
| 490 | - | func (_mock *MockFavoriteRepository) SetFolder(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error { | |
| 491 | - | ret := _mock.Called(ctx, id, folderID) | |
| 413 | + | // SetFolder provides a mock function with given fields: ctx, id, folderID | |
| 414 | + | func (_m *MockFavoriteRepository) SetFolder(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error { | |
| 415 | + | ret := _m.Called(ctx, id, folderID) | |
| 492 | 416 | ||
| 493 | 417 | if len(ret) == 0 { | |
| 494 | 418 | panic("no return value specified for SetFolder") | |
| 495 | 419 | } | |
| 496 | 420 | ||
| 497 | 421 | var r0 error | |
| 498 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok { | |
| 499 | - | r0 = returnFunc(ctx, id, folderID) | |
| 422 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *entity.FolderID) error); ok { | |
| 423 | + | r0 = rf(ctx, id, folderID) | |
| 500 | 424 | } else { | |
| 501 | 425 | r0 = ret.Error(0) | |
| 502 | 426 | } | |
| 427 | + | ||
| 503 | 428 | return r0 | |
| 504 | 429 | } | |
| 505 | 430 | ||
| @@ -518,51 +443,36 @@ func (_e *MockFavoriteRepository_Expecter) SetFolder(ctx interface{}, id interfa | |||
| 518 | 443 | ||
| 519 | 444 | func (_c *MockFavoriteRepository_SetFolder_Call) Run(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID)) *MockFavoriteRepository_SetFolder_Call { | |
| 520 | 445 | _c.Call.Run(func(args mock.Arguments) { | |
| 521 | - | var arg0 context.Context | |
| 522 | - | if args[0] != nil { | |
| 523 | - | arg0 = args[0].(context.Context) | |
| 524 | - | } | |
| 525 | - | var arg1 entity.FavoriteID | |
| 526 | - | if args[1] != nil { | |
| 527 | - | arg1 = args[1].(entity.FavoriteID) | |
| 528 | - | } | |
| 529 | - | var arg2 *entity.FolderID | |
| 530 | - | if args[2] != nil { | |
| 531 | - | arg2 = args[2].(*entity.FolderID) | |
| 532 | - | } | |
| 533 | - | run( | |
| 534 | - | arg0, | |
| 535 | - | arg1, | |
| 536 | - | arg2, | |
| 537 | - | ) | |
| 446 | + | run(args[0].(context.Context), args[1].(entity.FavoriteID), args[2].(*entity.FolderID)) | |
| 538 | 447 | }) | |
| 539 | 448 | return _c | |
| 540 | 449 | } | |
| 541 | 450 | ||
| 542 | - | func (_c *MockFavoriteRepository_SetFolder_Call) Return(err error) *MockFavoriteRepository_SetFolder_Call { | |
| 543 | - | _c.Call.Return(err) | |
| 451 | + | func (_c *MockFavoriteRepository_SetFolder_Call) Return(_a0 error) *MockFavoriteRepository_SetFolder_Call { | |
| 452 | + | _c.Call.Return(_a0) | |
| 544 | 453 | return _c | |
| 545 | 454 | } | |
| 546 | 455 | ||
| 547 | - | func (_c *MockFavoriteRepository_SetFolder_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, folderID *entity.FolderID) error) *MockFavoriteRepository_SetFolder_Call { | |
| 456 | + | func (_c *MockFavoriteRepository_SetFolder_Call) RunAndReturn(run func(context.Context, entity.FavoriteID, *entity.FolderID) error) *MockFavoriteRepository_SetFolder_Call { | |
| 548 | 457 | _c.Call.Return(run) | |
| 549 | 458 | return _c | |
| 550 | 459 | } | |
| 551 | 460 | ||
| 552 | - | // SetShortcut provides a mock function for the type MockFavoriteRepository | |
| 553 | - | func (_mock *MockFavoriteRepository) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error { | |
| 554 | - | ret := _mock.Called(ctx, id, key) | |
| 461 | + | // SetShortcut provides a mock function with given fields: ctx, id, key | |
| 462 | + | func (_m *MockFavoriteRepository) SetShortcut(ctx context.Context, id entity.FavoriteID, key *int) error { | |
| 463 | + | ret := _m.Called(ctx, id, key) | |
| 555 | 464 | ||
| 556 | 465 | if len(ret) == 0 { | |
| 557 | 466 | panic("no return value specified for SetShortcut") | |
| 558 | 467 | } | |
| 559 | 468 | ||
| 560 | 469 | var r0 error | |
| 561 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok { | |
| 562 | - | r0 = returnFunc(ctx, id, key) | |
| 470 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, *int) error); ok { | |
| 471 | + | r0 = rf(ctx, id, key) | |
| 563 | 472 | } else { | |
| 564 | 473 | r0 = ret.Error(0) | |
| 565 | 474 | } | |
| 475 | + | ||
| 566 | 476 | return r0 | |
| 567 | 477 | } | |
| 568 | 478 | ||
| @@ -581,51 +491,36 @@ func (_e *MockFavoriteRepository_Expecter) SetShortcut(ctx interface{}, id inter | |||
| 581 | 491 | ||
| 582 | 492 | func (_c *MockFavoriteRepository_SetShortcut_Call) Run(run func(ctx context.Context, id entity.FavoriteID, key *int)) *MockFavoriteRepository_SetShortcut_Call { | |
| 583 | 493 | _c.Call.Run(func(args mock.Arguments) { | |
| 584 | - | var arg0 context.Context | |
| 585 | - | if args[0] != nil { | |
| 586 | - | arg0 = args[0].(context.Context) | |
| 587 | - | } | |
| 588 | - | var arg1 entity.FavoriteID | |
| 589 | - | if args[1] != nil { | |
| 590 | - | arg1 = args[1].(entity.FavoriteID) | |
| 591 | - | } | |
| 592 | - | var arg2 *int | |
| 593 | - | if args[2] != nil { | |
| 594 | - | arg2 = args[2].(*int) | |
| 595 | - | } | |
| 596 | - | run( | |
| 597 | - | arg0, | |
| 598 | - | arg1, | |
| 599 | - | arg2, | |
| 600 | - | ) | |
| 494 | + | run(args[0].(context.Context), args[1].(entity.FavoriteID), args[2].(*int)) | |
| 601 | 495 | }) | |
| 602 | 496 | return _c | |
| 603 | 497 | } | |
| 604 | 498 | ||
| 605 | - | func (_c *MockFavoriteRepository_SetShortcut_Call) Return(err error) *MockFavoriteRepository_SetShortcut_Call { | |
| 606 | - | _c.Call.Return(err) | |
| 499 | + | func (_c *MockFavoriteRepository_SetShortcut_Call) Return(_a0 error) *MockFavoriteRepository_SetShortcut_Call { | |
| 500 | + | _c.Call.Return(_a0) | |
| 607 | 501 | return _c | |
| 608 | 502 | } | |
| 609 | 503 | ||
| 610 | - | func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, key *int) error) *MockFavoriteRepository_SetShortcut_Call { | |
| 504 | + | func (_c *MockFavoriteRepository_SetShortcut_Call) RunAndReturn(run func(context.Context, entity.FavoriteID, *int) error) *MockFavoriteRepository_SetShortcut_Call { | |
| 611 | 505 | _c.Call.Return(run) | |
| 612 | 506 | return _c | |
| 613 | 507 | } | |
| 614 | 508 | ||
| 615 | - | // UpdatePosition provides a mock function for the type MockFavoriteRepository | |
| 616 | - | func (_mock *MockFavoriteRepository) UpdatePosition(ctx context.Context, id entity.FavoriteID, position int) error { | |
| 617 | - | ret := _mock.Called(ctx, id, position) | |
| 509 | + | // UpdatePosition provides a mock function with given fields: ctx, id, position | |
| 510 | + | func (_m *MockFavoriteRepository) UpdatePosition(ctx context.Context, id entity.FavoriteID, position int) error { | |
| 511 | + | ret := _m.Called(ctx, id, position) | |
| 618 | 512 | ||
| 619 | 513 | if len(ret) == 0 { | |
| 620 | 514 | panic("no return value specified for UpdatePosition") | |
| 621 | 515 | } | |
| 622 | 516 | ||
| 623 | 517 | var r0 error | |
| 624 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok { | |
| 625 | - | r0 = returnFunc(ctx, id, position) | |
| 518 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID, int) error); ok { | |
| 519 | + | r0 = rf(ctx, id, position) | |
| 626 | 520 | } else { | |
| 627 | 521 | r0 = ret.Error(0) | |
| 628 | 522 | } | |
| 523 | + | ||
| 629 | 524 | return r0 | |
| 630 | 525 | } | |
| 631 | 526 | ||
| @@ -644,33 +539,31 @@ func (_e *MockFavoriteRepository_Expecter) UpdatePosition(ctx interface{}, id in | |||
| 644 | 539 | ||
| 645 | 540 | func (_c *MockFavoriteRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FavoriteID, position int)) *MockFavoriteRepository_UpdatePosition_Call { | |
| 646 | 541 | _c.Call.Run(func(args mock.Arguments) { | |
| 647 | - | var arg0 context.Context | |
| 648 | - | if args[0] != nil { | |
| 649 | - | arg0 = args[0].(context.Context) | |
| 650 | - | } | |
| 651 | - | var arg1 entity.FavoriteID | |
| 652 | - | if args[1] != nil { | |
| 653 | - | arg1 = args[1].(entity.FavoriteID) | |
| 654 | - | } | |
| 655 | - | var arg2 int | |
| 656 | - | if args[2] != nil { | |
| 657 | - | arg2 = args[2].(int) | |
| 658 | - | } | |
| 659 | - | run( | |
| 660 | - | arg0, | |
| 661 | - | arg1, | |
| 662 | - | arg2, | |
| 663 | - | ) | |
| 542 | + | run(args[0].(context.Context), args[1].(entity.FavoriteID), args[2].(int)) | |
| 664 | 543 | }) | |
| 665 | 544 | return _c | |
| 666 | 545 | } | |
| 667 | 546 | ||
| 668 | - | func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(err error) *MockFavoriteRepository_UpdatePosition_Call { | |
| 669 | - | _c.Call.Return(err) | |
| 547 | + | func (_c *MockFavoriteRepository_UpdatePosition_Call) Return(_a0 error) *MockFavoriteRepository_UpdatePosition_Call { | |
| 548 | + | _c.Call.Return(_a0) | |
| 670 | 549 | return _c | |
| 671 | 550 | } | |
| 672 | 551 | ||
| 673 | - | func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FavoriteID, position int) error) *MockFavoriteRepository_UpdatePosition_Call { | |
| 552 | + | func (_c *MockFavoriteRepository_UpdatePosition_Call) RunAndReturn(run func(context.Context, entity.FavoriteID, int) error) *MockFavoriteRepository_UpdatePosition_Call { | |
| 674 | 553 | _c.Call.Return(run) | |
| 675 | 554 | return _c | |
| 676 | 555 | } | |
| 556 | + | ||
| 557 | + | // NewMockFavoriteRepository creates a new instance of MockFavoriteRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 558 | + | // The first argument is typically a *testing.T value. | |
| 559 | + | func NewMockFavoriteRepository(t interface { | |
| 560 | + | mock.TestingT | |
| 561 | + | Cleanup(func()) | |
| 562 | + | }) *MockFavoriteRepository { | |
| 563 | + | mock := &MockFavoriteRepository{} | |
| 564 | + | mock.Mock.Test(t) | |
| 565 | + | ||
| 566 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 567 | + | ||
| 568 | + | return mock | |
| 569 | + | } | |
M internal/domain/repository/mocks/mock_folder_repository.go +92 -151
| @@ -1,30 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | - | "github.com/bnema/dumber/internal/domain/entity" | |
| 8 | + | entity "github.com/bnema/dumber/internal/domain/entity" | |
| 11 | 9 | mock "github.com/stretchr/testify/mock" | |
| 12 | 10 | ) | |
| 13 | 11 | ||
| 14 | - | // NewMockFolderRepository creates a new instance of MockFolderRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 15 | - | // The first argument is typically a *testing.T value. | |
| 16 | - | func NewMockFolderRepository(t interface { | |
| 17 | - | mock.TestingT | |
| 18 | - | Cleanup(func()) | |
| 19 | - | }) *MockFolderRepository { | |
| 20 | - | mock := &MockFolderRepository{} | |
| 21 | - | mock.Mock.Test(t) | |
| 22 | - | ||
| 23 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 24 | - | ||
| 25 | - | return mock | |
| 26 | - | } | |
| 27 | - | ||
| 28 | 12 | // MockFolderRepository is an autogenerated mock type for the FolderRepository type | |
| 29 | 13 | type MockFolderRepository struct { | |
| 30 | 14 | mock.Mock | |
| @@ -38,20 +22,21 @@ func (_m *MockFolderRepository) EXPECT() *MockFolderRepository_Expecter { | |||
| 38 | 22 | return &MockFolderRepository_Expecter{mock: &_m.Mock} | |
| 39 | 23 | } | |
| 40 | 24 | ||
| 41 | - | // Delete provides a mock function for the type MockFolderRepository | |
| 42 | - | func (_mock *MockFolderRepository) Delete(ctx context.Context, id entity.FolderID) error { | |
| 43 | - | ret := _mock.Called(ctx, id) | |
| 25 | + | // Delete provides a mock function with given fields: ctx, id | |
| 26 | + | func (_m *MockFolderRepository) Delete(ctx context.Context, id entity.FolderID) error { | |
| 27 | + | ret := _m.Called(ctx, id) | |
| 44 | 28 | ||
| 45 | 29 | if len(ret) == 0 { | |
| 46 | 30 | panic("no return value specified for Delete") | |
| 47 | 31 | } | |
| 48 | 32 | ||
| 49 | 33 | var r0 error | |
| 50 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok { | |
| 51 | - | r0 = returnFunc(ctx, id) | |
| 34 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID) error); ok { | |
| 35 | + | r0 = rf(ctx, id) | |
| 52 | 36 | } else { | |
| 53 | 37 | r0 = ret.Error(0) | |
| 54 | 38 | } | |
| 39 | + | ||
| 55 | 40 | return r0 | |
| 56 | 41 | } | |
| 57 | 42 | ||
| @@ -69,35 +54,24 @@ func (_e *MockFolderRepository_Expecter) Delete(ctx interface{}, id interface{}) | |||
| 69 | 54 | ||
| 70 | 55 | func (_c *MockFolderRepository_Delete_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_Delete_Call { | |
| 71 | 56 | _c.Call.Run(func(args mock.Arguments) { | |
| 72 | - | var arg0 context.Context | |
| 73 | - | if args[0] != nil { | |
| 74 | - | arg0 = args[0].(context.Context) | |
| 75 | - | } | |
| 76 | - | var arg1 entity.FolderID | |
| 77 | - | if args[1] != nil { | |
| 78 | - | arg1 = args[1].(entity.FolderID) | |
| 79 | - | } | |
| 80 | - | run( | |
| 81 | - | arg0, | |
| 82 | - | arg1, | |
| 83 | - | ) | |
| 57 | + | run(args[0].(context.Context), args[1].(entity.FolderID)) | |
| 84 | 58 | }) | |
| 85 | 59 | return _c | |
| 86 | 60 | } | |
| 87 | 61 | ||
| 88 | - | func (_c *MockFolderRepository_Delete_Call) Return(err error) *MockFolderRepository_Delete_Call { | |
| 89 | - | _c.Call.Return(err) | |
| 62 | + | func (_c *MockFolderRepository_Delete_Call) Return(_a0 error) *MockFolderRepository_Delete_Call { | |
| 63 | + | _c.Call.Return(_a0) | |
| 90 | 64 | return _c | |
| 91 | 65 | } | |
| 92 | 66 | ||
| 93 | - | func (_c *MockFolderRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) error) *MockFolderRepository_Delete_Call { | |
| 67 | + | func (_c *MockFolderRepository_Delete_Call) RunAndReturn(run func(context.Context, entity.FolderID) error) *MockFolderRepository_Delete_Call { | |
| 94 | 68 | _c.Call.Return(run) | |
| 95 | 69 | return _c | |
| 96 | 70 | } | |
| 97 | 71 | ||
| 98 | - | // FindByID provides a mock function for the type MockFolderRepository | |
| 99 | - | func (_mock *MockFolderRepository) FindByID(ctx context.Context, id entity.FolderID) (*entity.Folder, error) { | |
| 100 | - | ret := _mock.Called(ctx, id) | |
| 72 | + | // FindByID provides a mock function with given fields: ctx, id | |
| 73 | + | func (_m *MockFolderRepository) FindByID(ctx context.Context, id entity.FolderID) (*entity.Folder, error) { | |
| 74 | + | ret := _m.Called(ctx, id) | |
| 101 | 75 | ||
| 102 | 76 | if len(ret) == 0 { | |
| 103 | 77 | panic("no return value specified for FindByID") | |
| @@ -105,21 +79,23 @@ func (_mock *MockFolderRepository) FindByID(ctx context.Context, id entity.Folde | |||
| 105 | 79 | ||
| 106 | 80 | var r0 *entity.Folder | |
| 107 | 81 | var r1 error | |
| 108 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) (*entity.Folder, error)); ok { | |
| 109 | - | return returnFunc(ctx, id) | |
| 82 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID) (*entity.Folder, error)); ok { | |
| 83 | + | return rf(ctx, id) | |
| 110 | 84 | } | |
| 111 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID) *entity.Folder); ok { | |
| 112 | - | r0 = returnFunc(ctx, id) | |
| 85 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID) *entity.Folder); ok { | |
| 86 | + | r0 = rf(ctx, id) | |
| 113 | 87 | } else { | |
| 114 | 88 | if ret.Get(0) != nil { | |
| 115 | 89 | r0 = ret.Get(0).(*entity.Folder) | |
| 116 | 90 | } | |
| 117 | 91 | } | |
| 118 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FolderID) error); ok { | |
| 119 | - | r1 = returnFunc(ctx, id) | |
| 92 | + | ||
| 93 | + | if rf, ok := ret.Get(1).(func(context.Context, entity.FolderID) error); ok { | |
| 94 | + | r1 = rf(ctx, id) | |
| 120 | 95 | } else { | |
| 121 | 96 | r1 = ret.Error(1) | |
| 122 | 97 | } | |
| 98 | + | ||
| 123 | 99 | return r0, r1 | |
| 124 | 100 | } | |
| 125 | 101 | ||
| @@ -137,35 +113,24 @@ func (_e *MockFolderRepository_Expecter) FindByID(ctx interface{}, id interface{ | |||
| 137 | 113 | ||
| 138 | 114 | func (_c *MockFolderRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.FolderID)) *MockFolderRepository_FindByID_Call { | |
| 139 | 115 | _c.Call.Run(func(args mock.Arguments) { | |
| 140 | - | var arg0 context.Context | |
| 141 | - | if args[0] != nil { | |
| 142 | - | arg0 = args[0].(context.Context) | |
| 143 | - | } | |
| 144 | - | var arg1 entity.FolderID | |
| 145 | - | if args[1] != nil { | |
| 146 | - | arg1 = args[1].(entity.FolderID) | |
| 147 | - | } | |
| 148 | - | run( | |
| 149 | - | arg0, | |
| 150 | - | arg1, | |
| 151 | - | ) | |
| 116 | + | run(args[0].(context.Context), args[1].(entity.FolderID)) | |
| 152 | 117 | }) | |
| 153 | 118 | return _c | |
| 154 | 119 | } | |
| 155 | 120 | ||
| 156 | - | func (_c *MockFolderRepository_FindByID_Call) Return(folder *entity.Folder, err error) *MockFolderRepository_FindByID_Call { | |
| 157 | - | _c.Call.Return(folder, err) | |
| 121 | + | func (_c *MockFolderRepository_FindByID_Call) Return(_a0 *entity.Folder, _a1 error) *MockFolderRepository_FindByID_Call { | |
| 122 | + | _c.Call.Return(_a0, _a1) | |
| 158 | 123 | return _c | |
| 159 | 124 | } | |
| 160 | 125 | ||
| 161 | - | func (_c *MockFolderRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID) (*entity.Folder, error)) *MockFolderRepository_FindByID_Call { | |
| 126 | + | func (_c *MockFolderRepository_FindByID_Call) RunAndReturn(run func(context.Context, entity.FolderID) (*entity.Folder, error)) *MockFolderRepository_FindByID_Call { | |
| 162 | 127 | _c.Call.Return(run) | |
| 163 | 128 | return _c | |
| 164 | 129 | } | |
| 165 | 130 | ||
| 166 | - | // GetAll provides a mock function for the type MockFolderRepository | |
| 167 | - | func (_mock *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder, error) { | |
| 168 | - | ret := _mock.Called(ctx) | |
| 131 | + | // GetAll provides a mock function with given fields: ctx | |
| 132 | + | func (_m *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder, error) { | |
| 133 | + | ret := _m.Called(ctx) | |
| 169 | 134 | ||
| 170 | 135 | if len(ret) == 0 { | |
| 171 | 136 | panic("no return value specified for GetAll") | |
| @@ -173,21 +138,23 @@ func (_mock *MockFolderRepository) GetAll(ctx context.Context) ([]*entity.Folder | |||
| 173 | 138 | ||
| 174 | 139 | var r0 []*entity.Folder | |
| 175 | 140 | var r1 error | |
| 176 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok { | |
| 177 | - | return returnFunc(ctx) | |
| 141 | + | if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.Folder, error)); ok { | |
| 142 | + | return rf(ctx) | |
| 178 | 143 | } | |
| 179 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok { | |
| 180 | - | r0 = returnFunc(ctx) | |
| 144 | + | if rf, ok := ret.Get(0).(func(context.Context) []*entity.Folder); ok { | |
| 145 | + | r0 = rf(ctx) | |
| 181 | 146 | } else { | |
| 182 | 147 | if ret.Get(0) != nil { | |
| 183 | 148 | r0 = ret.Get(0).([]*entity.Folder) | |
| 184 | 149 | } | |
| 185 | 150 | } | |
| 186 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 187 | - | r1 = returnFunc(ctx) | |
| 151 | + | ||
| 152 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 153 | + | r1 = rf(ctx) | |
| 188 | 154 | } else { | |
| 189 | 155 | r1 = ret.Error(1) | |
| 190 | 156 | } | |
| 157 | + | ||
| 191 | 158 | return r0, r1 | |
| 192 | 159 | } | |
| 193 | 160 | ||
| @@ -204,30 +171,24 @@ func (_e *MockFolderRepository_Expecter) GetAll(ctx interface{}) *MockFolderRepo | |||
| 204 | 171 | ||
| 205 | 172 | func (_c *MockFolderRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockFolderRepository_GetAll_Call { | |
| 206 | 173 | _c.Call.Run(func(args mock.Arguments) { | |
| 207 | - | var arg0 context.Context | |
| 208 | - | if args[0] != nil { | |
| 209 | - | arg0 = args[0].(context.Context) | |
| 210 | - | } | |
| 211 | - | run( | |
| 212 | - | arg0, | |
| 213 | - | ) | |
| 174 | + | run(args[0].(context.Context)) | |
| 214 | 175 | }) | |
| 215 | 176 | return _c | |
| 216 | 177 | } | |
| 217 | 178 | ||
| 218 | - | func (_c *MockFolderRepository_GetAll_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetAll_Call { | |
| 219 | - | _c.Call.Return(folders, err) | |
| 179 | + | func (_c *MockFolderRepository_GetAll_Call) Return(_a0 []*entity.Folder, _a1 error) *MockFolderRepository_GetAll_Call { | |
| 180 | + | _c.Call.Return(_a0, _a1) | |
| 220 | 181 | return _c | |
| 221 | 182 | } | |
| 222 | 183 | ||
| 223 | - | func (_c *MockFolderRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Folder, error)) *MockFolderRepository_GetAll_Call { | |
| 184 | + | func (_c *MockFolderRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.Folder, error)) *MockFolderRepository_GetAll_Call { | |
| 224 | 185 | _c.Call.Return(run) | |
| 225 | 186 | return _c | |
| 226 | 187 | } | |
| 227 | 188 | ||
| 228 | - | // GetChildren provides a mock function for the type MockFolderRepository | |
| 229 | - | func (_mock *MockFolderRepository) GetChildren(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error) { | |
| 230 | - | ret := _mock.Called(ctx, parentID) | |
| 189 | + | // GetChildren provides a mock function with given fields: ctx, parentID | |
| 190 | + | func (_m *MockFolderRepository) GetChildren(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error) { | |
| 191 | + | ret := _m.Called(ctx, parentID) | |
| 231 | 192 | ||
| 232 | 193 | if len(ret) == 0 { | |
| 233 | 194 | panic("no return value specified for GetChildren") | |
| @@ -235,21 +196,23 @@ func (_mock *MockFolderRepository) GetChildren(ctx context.Context, parentID *en | |||
| 235 | 196 | ||
| 236 | 197 | var r0 []*entity.Folder | |
| 237 | 198 | var r1 error | |
| 238 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Folder, error)); ok { | |
| 239 | - | return returnFunc(ctx, parentID) | |
| 199 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) ([]*entity.Folder, error)); ok { | |
| 200 | + | return rf(ctx, parentID) | |
| 240 | 201 | } | |
| 241 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Folder); ok { | |
| 242 | - | r0 = returnFunc(ctx, parentID) | |
| 202 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.FolderID) []*entity.Folder); ok { | |
| 203 | + | r0 = rf(ctx, parentID) | |
| 243 | 204 | } else { | |
| 244 | 205 | if ret.Get(0) != nil { | |
| 245 | 206 | r0 = ret.Get(0).([]*entity.Folder) | |
| 246 | 207 | } | |
| 247 | 208 | } | |
| 248 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok { | |
| 249 | - | r1 = returnFunc(ctx, parentID) | |
| 209 | + | ||
| 210 | + | if rf, ok := ret.Get(1).(func(context.Context, *entity.FolderID) error); ok { | |
| 211 | + | r1 = rf(ctx, parentID) | |
| 250 | 212 | } else { | |
| 251 | 213 | r1 = ret.Error(1) | |
| 252 | 214 | } | |
| 215 | + | ||
| 253 | 216 | return r0, r1 | |
| 254 | 217 | } | |
| 255 | 218 | ||
| @@ -267,46 +230,36 @@ func (_e *MockFolderRepository_Expecter) GetChildren(ctx interface{}, parentID i | |||
| 267 | 230 | ||
| 268 | 231 | func (_c *MockFolderRepository_GetChildren_Call) Run(run func(ctx context.Context, parentID *entity.FolderID)) *MockFolderRepository_GetChildren_Call { | |
| 269 | 232 | _c.Call.Run(func(args mock.Arguments) { | |
| 270 | - | var arg0 context.Context | |
| 271 | - | if args[0] != nil { | |
| 272 | - | arg0 = args[0].(context.Context) | |
| 273 | - | } | |
| 274 | - | var arg1 *entity.FolderID | |
| 275 | - | if args[1] != nil { | |
| 276 | - | arg1 = args[1].(*entity.FolderID) | |
| 277 | - | } | |
| 278 | - | run( | |
| 279 | - | arg0, | |
| 280 | - | arg1, | |
| 281 | - | ) | |
| 233 | + | run(args[0].(context.Context), args[1].(*entity.FolderID)) | |
| 282 | 234 | }) | |
| 283 | 235 | return _c | |
| 284 | 236 | } | |
| 285 | 237 | ||
| 286 | - | func (_c *MockFolderRepository_GetChildren_Call) Return(folders []*entity.Folder, err error) *MockFolderRepository_GetChildren_Call { | |
| 287 | - | _c.Call.Return(folders, err) | |
| 238 | + | func (_c *MockFolderRepository_GetChildren_Call) Return(_a0 []*entity.Folder, _a1 error) *MockFolderRepository_GetChildren_Call { | |
| 239 | + | _c.Call.Return(_a0, _a1) | |
| 288 | 240 | return _c | |
| 289 | 241 | } | |
| 290 | 242 | ||
| 291 | - | func (_c *MockFolderRepository_GetChildren_Call) RunAndReturn(run func(ctx context.Context, parentID *entity.FolderID) ([]*entity.Folder, error)) *MockFolderRepository_GetChildren_Call { | |
| 243 | + | func (_c *MockFolderRepository_GetChildren_Call) RunAndReturn(run func(context.Context, *entity.FolderID) ([]*entity.Folder, error)) *MockFolderRepository_GetChildren_Call { | |
| 292 | 244 | _c.Call.Return(run) | |
| 293 | 245 | return _c | |
| 294 | 246 | } | |
| 295 | 247 | ||
| 296 | - | // Save provides a mock function for the type MockFolderRepository | |
| 297 | - | func (_mock *MockFolderRepository) Save(ctx context.Context, folder *entity.Folder) error { | |
| 298 | - | ret := _mock.Called(ctx, folder) | |
| 248 | + | // Save provides a mock function with given fields: ctx, folder | |
| 249 | + | func (_m *MockFolderRepository) Save(ctx context.Context, folder *entity.Folder) error { | |
| 250 | + | ret := _m.Called(ctx, folder) | |
| 299 | 251 | ||
| 300 | 252 | if len(ret) == 0 { | |
| 301 | 253 | panic("no return value specified for Save") | |
| 302 | 254 | } | |
| 303 | 255 | ||
| 304 | 256 | var r0 error | |
| 305 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Folder) error); ok { | |
| 306 | - | r0 = returnFunc(ctx, folder) | |
| 257 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.Folder) error); ok { | |
| 258 | + | r0 = rf(ctx, folder) | |
| 307 | 259 | } else { | |
| 308 | 260 | r0 = ret.Error(0) | |
| 309 | 261 | } | |
| 262 | + | ||
| 310 | 263 | return r0 | |
| 311 | 264 | } | |
| 312 | 265 | ||
| @@ -324,46 +277,36 @@ func (_e *MockFolderRepository_Expecter) Save(ctx interface{}, folder interface{ | |||
| 324 | 277 | ||
| 325 | 278 | func (_c *MockFolderRepository_Save_Call) Run(run func(ctx context.Context, folder *entity.Folder)) *MockFolderRepository_Save_Call { | |
| 326 | 279 | _c.Call.Run(func(args mock.Arguments) { | |
| 327 | - | var arg0 context.Context | |
| 328 | - | if args[0] != nil { | |
| 329 | - | arg0 = args[0].(context.Context) | |
| 330 | - | } | |
| 331 | - | var arg1 *entity.Folder | |
| 332 | - | if args[1] != nil { | |
| 333 | - | arg1 = args[1].(*entity.Folder) | |
| 334 | - | } | |
| 335 | - | run( | |
| 336 | - | arg0, | |
| 337 | - | arg1, | |
| 338 | - | ) | |
| 280 | + | run(args[0].(context.Context), args[1].(*entity.Folder)) | |
| 339 | 281 | }) | |
| 340 | 282 | return _c | |
| 341 | 283 | } | |
| 342 | 284 | ||
| 343 | - | func (_c *MockFolderRepository_Save_Call) Return(err error) *MockFolderRepository_Save_Call { | |
| 344 | - | _c.Call.Return(err) | |
| 285 | + | func (_c *MockFolderRepository_Save_Call) Return(_a0 error) *MockFolderRepository_Save_Call { | |
| 286 | + | _c.Call.Return(_a0) | |
| 345 | 287 | return _c | |
| 346 | 288 | } | |
| 347 | 289 | ||
| 348 | - | func (_c *MockFolderRepository_Save_Call) RunAndReturn(run func(ctx context.Context, folder *entity.Folder) error) *MockFolderRepository_Save_Call { | |
| 290 | + | func (_c *MockFolderRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.Folder) error) *MockFolderRepository_Save_Call { | |
| 349 | 291 | _c.Call.Return(run) | |
| 350 | 292 | return _c | |
| 351 | 293 | } | |
| 352 | 294 | ||
| 353 | - | // UpdatePosition provides a mock function for the type MockFolderRepository | |
| 354 | - | func (_mock *MockFolderRepository) UpdatePosition(ctx context.Context, id entity.FolderID, position int) error { | |
| 355 | - | ret := _mock.Called(ctx, id, position) | |
| 295 | + | // UpdatePosition provides a mock function with given fields: ctx, id, position | |
| 296 | + | func (_m *MockFolderRepository) UpdatePosition(ctx context.Context, id entity.FolderID, position int) error { | |
| 297 | + | ret := _m.Called(ctx, id, position) | |
| 356 | 298 | ||
| 357 | 299 | if len(ret) == 0 { | |
| 358 | 300 | panic("no return value specified for UpdatePosition") | |
| 359 | 301 | } | |
| 360 | 302 | ||
| 361 | 303 | var r0 error | |
| 362 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FolderID, int) error); ok { | |
| 363 | - | r0 = returnFunc(ctx, id, position) | |
| 304 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FolderID, int) error); ok { | |
| 305 | + | r0 = rf(ctx, id, position) | |
| 364 | 306 | } else { | |
| 365 | 307 | r0 = ret.Error(0) | |
| 366 | 308 | } | |
| 309 | + | ||
| 367 | 310 | return r0 | |
| 368 | 311 | } | |
| 369 | 312 | ||
| @@ -382,33 +325,31 @@ func (_e *MockFolderRepository_Expecter) UpdatePosition(ctx interface{}, id inte | |||
| 382 | 325 | ||
| 383 | 326 | func (_c *MockFolderRepository_UpdatePosition_Call) Run(run func(ctx context.Context, id entity.FolderID, position int)) *MockFolderRepository_UpdatePosition_Call { | |
| 384 | 327 | _c.Call.Run(func(args mock.Arguments) { | |
| 385 | - | var arg0 context.Context | |
| 386 | - | if args[0] != nil { | |
| 387 | - | arg0 = args[0].(context.Context) | |
| 388 | - | } | |
| 389 | - | var arg1 entity.FolderID | |
| 390 | - | if args[1] != nil { | |
| 391 | - | arg1 = args[1].(entity.FolderID) | |
| 392 | - | } | |
| 393 | - | var arg2 int | |
| 394 | - | if args[2] != nil { | |
| 395 | - | arg2 = args[2].(int) | |
| 396 | - | } | |
| 397 | - | run( | |
| 398 | - | arg0, | |
| 399 | - | arg1, | |
| 400 | - | arg2, | |
| 401 | - | ) | |
| 328 | + | run(args[0].(context.Context), args[1].(entity.FolderID), args[2].(int)) | |
| 402 | 329 | }) | |
| 403 | 330 | return _c | |
| 404 | 331 | } | |
| 405 | 332 | ||
| 406 | - | func (_c *MockFolderRepository_UpdatePosition_Call) Return(err error) *MockFolderRepository_UpdatePosition_Call { | |
| 407 | - | _c.Call.Return(err) | |
| 333 | + | func (_c *MockFolderRepository_UpdatePosition_Call) Return(_a0 error) *MockFolderRepository_UpdatePosition_Call { | |
| 334 | + | _c.Call.Return(_a0) | |
| 408 | 335 | return _c | |
| 409 | 336 | } | |
| 410 | 337 | ||
| 411 | - | func (_c *MockFolderRepository_UpdatePosition_Call) RunAndReturn(run func(ctx context.Context, id entity.FolderID, position int) error) *MockFolderRepository_UpdatePosition_Call { | |
| 338 | + | func (_c *MockFolderRepository_UpdatePosition_Call) RunAndReturn(run func(context.Context, entity.FolderID, int) error) *MockFolderRepository_UpdatePosition_Call { | |
| 412 | 339 | _c.Call.Return(run) | |
| 413 | 340 | return _c | |
| 414 | 341 | } | |
| 342 | + | ||
| 343 | + | // NewMockFolderRepository creates a new instance of MockFolderRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 344 | + | // The first argument is typically a *testing.T value. | |
| 345 | + | func NewMockFolderRepository(t interface { | |
| 346 | + | mock.TestingT | |
| 347 | + | Cleanup(func()) | |
| 348 | + | }) *MockFolderRepository { | |
| 349 | + | mock := &MockFolderRepository{} | |
| 350 | + | mock.Mock.Test(t) | |
| 351 | + | ||
| 352 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 353 | + | ||
| 354 | + | return mock | |
| 355 | + | } | |
M internal/domain/repository/mocks/mock_history_repository.go +184 -303
| @@ -1,30 +1,15 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 9 | - | "time" | |
| 6 | + | context "context" | |
| 10 | 7 | ||
| 11 | - | "github.com/bnema/dumber/internal/domain/entity" | |
| 8 | + | entity "github.com/bnema/dumber/internal/domain/entity" | |
| 12 | 9 | 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 | 10 | ||
| 24 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 25 | - | ||
| 26 | - | return mock | |
| 27 | - | } | |
| 11 | + | time "time" | |
| 12 | + | ) | |
| 28 | 13 | ||
| 29 | 14 | // MockHistoryRepository is an autogenerated mock type for the HistoryRepository type | |
| 30 | 15 | type MockHistoryRepository struct { | |
| @@ -39,20 +24,21 @@ func (_m *MockHistoryRepository) EXPECT() *MockHistoryRepository_Expecter { | |||
| 39 | 24 | return &MockHistoryRepository_Expecter{mock: &_m.Mock} | |
| 40 | 25 | } | |
| 41 | 26 | ||
| 42 | - | // Delete provides a mock function for the type MockHistoryRepository | |
| 43 | - | func (_mock *MockHistoryRepository) Delete(ctx context.Context, id int64) error { | |
| 44 | - | ret := _mock.Called(ctx, id) | |
| 27 | + | // Delete provides a mock function with given fields: ctx, id | |
| 28 | + | func (_m *MockHistoryRepository) Delete(ctx context.Context, id int64) error { | |
| 29 | + | ret := _m.Called(ctx, id) | |
| 45 | 30 | ||
| 46 | 31 | if len(ret) == 0 { | |
| 47 | 32 | panic("no return value specified for Delete") | |
| 48 | 33 | } | |
| 49 | 34 | ||
| 50 | 35 | var r0 error | |
| 51 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { | |
| 52 | - | r0 = returnFunc(ctx, id) | |
| 36 | + | if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { | |
| 37 | + | r0 = rf(ctx, id) | |
| 53 | 38 | } else { | |
| 54 | 39 | r0 = ret.Error(0) | |
| 55 | 40 | } | |
| 41 | + | ||
| 56 | 42 | return r0 | |
| 57 | 43 | } | |
| 58 | 44 | ||
| @@ -70,46 +56,36 @@ func (_e *MockHistoryRepository_Expecter) Delete(ctx interface{}, id interface{} | |||
| 70 | 56 | ||
| 71 | 57 | func (_c *MockHistoryRepository_Delete_Call) Run(run func(ctx context.Context, id int64)) *MockHistoryRepository_Delete_Call { | |
| 72 | 58 | _c.Call.Run(func(args mock.Arguments) { | |
| 73 | - | var arg0 context.Context | |
| 74 | - | if args[0] != nil { | |
| 75 | - | arg0 = args[0].(context.Context) | |
| 76 | - | } | |
| 77 | - | var arg1 int64 | |
| 78 | - | if args[1] != nil { | |
| 79 | - | arg1 = args[1].(int64) | |
| 80 | - | } | |
| 81 | - | run( | |
| 82 | - | arg0, | |
| 83 | - | arg1, | |
| 84 | - | ) | |
| 59 | + | run(args[0].(context.Context), args[1].(int64)) | |
| 85 | 60 | }) | |
| 86 | 61 | return _c | |
| 87 | 62 | } | |
| 88 | 63 | ||
| 89 | - | func (_c *MockHistoryRepository_Delete_Call) Return(err error) *MockHistoryRepository_Delete_Call { | |
| 90 | - | _c.Call.Return(err) | |
| 64 | + | func (_c *MockHistoryRepository_Delete_Call) Return(_a0 error) *MockHistoryRepository_Delete_Call { | |
| 65 | + | _c.Call.Return(_a0) | |
| 91 | 66 | return _c | |
| 92 | 67 | } | |
| 93 | 68 | ||
| 94 | - | func (_c *MockHistoryRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id int64) error) *MockHistoryRepository_Delete_Call { | |
| 69 | + | func (_c *MockHistoryRepository_Delete_Call) RunAndReturn(run func(context.Context, int64) error) *MockHistoryRepository_Delete_Call { | |
| 95 | 70 | _c.Call.Return(run) | |
| 96 | 71 | return _c | |
| 97 | 72 | } | |
| 98 | 73 | ||
| 99 | - | // DeleteAll provides a mock function for the type MockHistoryRepository | |
| 100 | - | func (_mock *MockHistoryRepository) DeleteAll(ctx context.Context) error { | |
| 101 | - | ret := _mock.Called(ctx) | |
| 74 | + | // DeleteAll provides a mock function with given fields: ctx | |
| 75 | + | func (_m *MockHistoryRepository) DeleteAll(ctx context.Context) error { | |
| 76 | + | ret := _m.Called(ctx) | |
| 102 | 77 | ||
| 103 | 78 | if len(ret) == 0 { | |
| 104 | 79 | panic("no return value specified for DeleteAll") | |
| 105 | 80 | } | |
| 106 | 81 | ||
| 107 | 82 | var r0 error | |
| 108 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 109 | - | r0 = returnFunc(ctx) | |
| 83 | + | if rf, ok := ret.Get(0).(func(context.Context) error); ok { | |
| 84 | + | r0 = rf(ctx) | |
| 110 | 85 | } else { | |
| 111 | 86 | r0 = ret.Error(0) | |
| 112 | 87 | } | |
| 88 | + | ||
| 113 | 89 | return r0 | |
| 114 | 90 | } | |
| 115 | 91 | ||
| @@ -126,41 +102,36 @@ func (_e *MockHistoryRepository_Expecter) DeleteAll(ctx interface{}) *MockHistor | |||
| 126 | 102 | ||
| 127 | 103 | func (_c *MockHistoryRepository_DeleteAll_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_DeleteAll_Call { | |
| 128 | 104 | _c.Call.Run(func(args mock.Arguments) { | |
| 129 | - | var arg0 context.Context | |
| 130 | - | if args[0] != nil { | |
| 131 | - | arg0 = args[0].(context.Context) | |
| 132 | - | } | |
| 133 | - | run( | |
| 134 | - | arg0, | |
| 135 | - | ) | |
| 105 | + | run(args[0].(context.Context)) | |
| 136 | 106 | }) | |
| 137 | 107 | return _c | |
| 138 | 108 | } | |
| 139 | 109 | ||
| 140 | - | func (_c *MockHistoryRepository_DeleteAll_Call) Return(err error) *MockHistoryRepository_DeleteAll_Call { | |
| 141 | - | _c.Call.Return(err) | |
| 110 | + | func (_c *MockHistoryRepository_DeleteAll_Call) Return(_a0 error) *MockHistoryRepository_DeleteAll_Call { | |
| 111 | + | _c.Call.Return(_a0) | |
| 142 | 112 | return _c | |
| 143 | 113 | } | |
| 144 | 114 | ||
| 145 | - | func (_c *MockHistoryRepository_DeleteAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockHistoryRepository_DeleteAll_Call { | |
| 115 | + | func (_c *MockHistoryRepository_DeleteAll_Call) RunAndReturn(run func(context.Context) error) *MockHistoryRepository_DeleteAll_Call { | |
| 146 | 116 | _c.Call.Return(run) | |
| 147 | 117 | return _c | |
| 148 | 118 | } | |
| 149 | 119 | ||
| 150 | - | // DeleteByDomain provides a mock function for the type MockHistoryRepository | |
| 151 | - | func (_mock *MockHistoryRepository) DeleteByDomain(ctx context.Context, domain string) error { | |
| 152 | - | ret := _mock.Called(ctx, domain) | |
| 120 | + | // DeleteByDomain provides a mock function with given fields: ctx, domain | |
| 121 | + | func (_m *MockHistoryRepository) DeleteByDomain(ctx context.Context, domain string) error { | |
| 122 | + | ret := _m.Called(ctx, domain) | |
| 153 | 123 | ||
| 154 | 124 | if len(ret) == 0 { | |
| 155 | 125 | panic("no return value specified for DeleteByDomain") | |
| 156 | 126 | } | |
| 157 | 127 | ||
| 158 | 128 | var r0 error | |
| 159 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 160 | - | r0 = returnFunc(ctx, domain) | |
| 129 | + | if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 130 | + | r0 = rf(ctx, domain) | |
| 161 | 131 | } else { | |
| 162 | 132 | r0 = ret.Error(0) | |
| 163 | 133 | } | |
| 134 | + | ||
| 164 | 135 | return r0 | |
| 165 | 136 | } | |
| 166 | 137 | ||
| @@ -178,46 +149,36 @@ func (_e *MockHistoryRepository_Expecter) DeleteByDomain(ctx interface{}, domain | |||
| 178 | 149 | ||
| 179 | 150 | func (_c *MockHistoryRepository_DeleteByDomain_Call) Run(run func(ctx context.Context, domain string)) *MockHistoryRepository_DeleteByDomain_Call { | |
| 180 | 151 | _c.Call.Run(func(args mock.Arguments) { | |
| 181 | - | var arg0 context.Context | |
| 182 | - | if args[0] != nil { | |
| 183 | - | arg0 = args[0].(context.Context) | |
| 184 | - | } | |
| 185 | - | var arg1 string | |
| 186 | - | if args[1] != nil { | |
| 187 | - | arg1 = args[1].(string) | |
| 188 | - | } | |
| 189 | - | run( | |
| 190 | - | arg0, | |
| 191 | - | arg1, | |
| 192 | - | ) | |
| 152 | + | run(args[0].(context.Context), args[1].(string)) | |
| 193 | 153 | }) | |
| 194 | 154 | return _c | |
| 195 | 155 | } | |
| 196 | 156 | ||
| 197 | - | func (_c *MockHistoryRepository_DeleteByDomain_Call) Return(err error) *MockHistoryRepository_DeleteByDomain_Call { | |
| 198 | - | _c.Call.Return(err) | |
| 157 | + | func (_c *MockHistoryRepository_DeleteByDomain_Call) Return(_a0 error) *MockHistoryRepository_DeleteByDomain_Call { | |
| 158 | + | _c.Call.Return(_a0) | |
| 199 | 159 | return _c | |
| 200 | 160 | } | |
| 201 | 161 | ||
| 202 | - | func (_c *MockHistoryRepository_DeleteByDomain_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockHistoryRepository_DeleteByDomain_Call { | |
| 162 | + | func (_c *MockHistoryRepository_DeleteByDomain_Call) RunAndReturn(run func(context.Context, string) error) *MockHistoryRepository_DeleteByDomain_Call { | |
| 203 | 163 | _c.Call.Return(run) | |
| 204 | 164 | return _c | |
| 205 | 165 | } | |
| 206 | 166 | ||
| 207 | - | // DeleteOlderThan provides a mock function for the type MockHistoryRepository | |
| 208 | - | func (_mock *MockHistoryRepository) DeleteOlderThan(ctx context.Context, before time.Time) error { | |
| 209 | - | ret := _mock.Called(ctx, before) | |
| 167 | + | // DeleteOlderThan provides a mock function with given fields: ctx, before | |
| 168 | + | func (_m *MockHistoryRepository) DeleteOlderThan(ctx context.Context, before time.Time) error { | |
| 169 | + | ret := _m.Called(ctx, before) | |
| 210 | 170 | ||
| 211 | 171 | if len(ret) == 0 { | |
| 212 | 172 | panic("no return value specified for DeleteOlderThan") | |
| 213 | 173 | } | |
| 214 | 174 | ||
| 215 | 175 | var r0 error | |
| 216 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { | |
| 217 | - | r0 = returnFunc(ctx, before) | |
| 176 | + | if rf, ok := ret.Get(0).(func(context.Context, time.Time) error); ok { | |
| 177 | + | r0 = rf(ctx, before) | |
| 218 | 178 | } else { | |
| 219 | 179 | r0 = ret.Error(0) | |
| 220 | 180 | } | |
| 181 | + | ||
| 221 | 182 | return r0 | |
| 222 | 183 | } | |
| 223 | 184 | ||
| @@ -235,35 +196,24 @@ func (_e *MockHistoryRepository_Expecter) DeleteOlderThan(ctx interface{}, befor | |||
| 235 | 196 | ||
| 236 | 197 | func (_c *MockHistoryRepository_DeleteOlderThan_Call) Run(run func(ctx context.Context, before time.Time)) *MockHistoryRepository_DeleteOlderThan_Call { | |
| 237 | 198 | _c.Call.Run(func(args mock.Arguments) { | |
| 238 | - | var arg0 context.Context | |
| 239 | - | if args[0] != nil { | |
| 240 | - | arg0 = args[0].(context.Context) | |
| 241 | - | } | |
| 242 | - | var arg1 time.Time | |
| 243 | - | if args[1] != nil { | |
| 244 | - | arg1 = args[1].(time.Time) | |
| 245 | - | } | |
| 246 | - | run( | |
| 247 | - | arg0, | |
| 248 | - | arg1, | |
| 249 | - | ) | |
| 199 | + | run(args[0].(context.Context), args[1].(time.Time)) | |
| 250 | 200 | }) | |
| 251 | 201 | return _c | |
| 252 | 202 | } | |
| 253 | 203 | ||
| 254 | - | func (_c *MockHistoryRepository_DeleteOlderThan_Call) Return(err error) *MockHistoryRepository_DeleteOlderThan_Call { | |
| 255 | - | _c.Call.Return(err) | |
| 204 | + | func (_c *MockHistoryRepository_DeleteOlderThan_Call) Return(_a0 error) *MockHistoryRepository_DeleteOlderThan_Call { | |
| 205 | + | _c.Call.Return(_a0) | |
| 256 | 206 | return _c | |
| 257 | 207 | } | |
| 258 | 208 | ||
| 259 | - | func (_c *MockHistoryRepository_DeleteOlderThan_Call) RunAndReturn(run func(ctx context.Context, before time.Time) error) *MockHistoryRepository_DeleteOlderThan_Call { | |
| 209 | + | func (_c *MockHistoryRepository_DeleteOlderThan_Call) RunAndReturn(run func(context.Context, time.Time) error) *MockHistoryRepository_DeleteOlderThan_Call { | |
| 260 | 210 | _c.Call.Return(run) | |
| 261 | 211 | return _c | |
| 262 | 212 | } | |
| 263 | 213 | ||
| 264 | - | // FindByURL provides a mock function for the type MockHistoryRepository | |
| 265 | - | func (_mock *MockHistoryRepository) FindByURL(ctx context.Context, url string) (*entity.HistoryEntry, error) { | |
| 266 | - | ret := _mock.Called(ctx, url) | |
| 214 | + | // FindByURL provides a mock function with given fields: ctx, url | |
| 215 | + | func (_m *MockHistoryRepository) FindByURL(ctx context.Context, url string) (*entity.HistoryEntry, error) { | |
| 216 | + | ret := _m.Called(ctx, url) | |
| 267 | 217 | ||
| 268 | 218 | if len(ret) == 0 { | |
| 269 | 219 | panic("no return value specified for FindByURL") | |
| @@ -271,21 +221,23 @@ func (_mock *MockHistoryRepository) FindByURL(ctx context.Context, url string) ( | |||
| 271 | 221 | ||
| 272 | 222 | var r0 *entity.HistoryEntry | |
| 273 | 223 | var r1 error | |
| 274 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.HistoryEntry, error)); ok { | |
| 275 | - | return returnFunc(ctx, url) | |
| 224 | + | if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.HistoryEntry, error)); ok { | |
| 225 | + | return rf(ctx, url) | |
| 276 | 226 | } | |
| 277 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.HistoryEntry); ok { | |
| 278 | - | r0 = returnFunc(ctx, url) | |
| 227 | + | if rf, ok := ret.Get(0).(func(context.Context, string) *entity.HistoryEntry); ok { | |
| 228 | + | r0 = rf(ctx, url) | |
| 279 | 229 | } else { | |
| 280 | 230 | if ret.Get(0) != nil { | |
| 281 | 231 | r0 = ret.Get(0).(*entity.HistoryEntry) | |
| 282 | 232 | } | |
| 283 | 233 | } | |
| 284 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 285 | - | r1 = returnFunc(ctx, url) | |
| 234 | + | ||
| 235 | + | if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 236 | + | r1 = rf(ctx, url) | |
| 286 | 237 | } else { | |
| 287 | 238 | r1 = ret.Error(1) | |
| 288 | 239 | } | |
| 240 | + | ||
| 289 | 241 | return r0, r1 | |
| 290 | 242 | } | |
| 291 | 243 | ||
| @@ -303,35 +255,24 @@ func (_e *MockHistoryRepository_Expecter) FindByURL(ctx interface{}, url interfa | |||
| 303 | 255 | ||
| 304 | 256 | func (_c *MockHistoryRepository_FindByURL_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_FindByURL_Call { | |
| 305 | 257 | _c.Call.Run(func(args mock.Arguments) { | |
| 306 | - | var arg0 context.Context | |
| 307 | - | if args[0] != nil { | |
| 308 | - | arg0 = args[0].(context.Context) | |
| 309 | - | } | |
| 310 | - | var arg1 string | |
| 311 | - | if args[1] != nil { | |
| 312 | - | arg1 = args[1].(string) | |
| 313 | - | } | |
| 314 | - | run( | |
| 315 | - | arg0, | |
| 316 | - | arg1, | |
| 317 | - | ) | |
| 258 | + | run(args[0].(context.Context), args[1].(string)) | |
| 318 | 259 | }) | |
| 319 | 260 | return _c | |
| 320 | 261 | } | |
| 321 | 262 | ||
| 322 | - | func (_c *MockHistoryRepository_FindByURL_Call) Return(historyEntry *entity.HistoryEntry, err error) *MockHistoryRepository_FindByURL_Call { | |
| 323 | - | _c.Call.Return(historyEntry, err) | |
| 263 | + | func (_c *MockHistoryRepository_FindByURL_Call) Return(_a0 *entity.HistoryEntry, _a1 error) *MockHistoryRepository_FindByURL_Call { | |
| 264 | + | _c.Call.Return(_a0, _a1) | |
| 324 | 265 | return _c | |
| 325 | 266 | } | |
| 326 | 267 | ||
| 327 | - | func (_c *MockHistoryRepository_FindByURL_Call) RunAndReturn(run func(ctx context.Context, url string) (*entity.HistoryEntry, error)) *MockHistoryRepository_FindByURL_Call { | |
| 268 | + | func (_c *MockHistoryRepository_FindByURL_Call) RunAndReturn(run func(context.Context, string) (*entity.HistoryEntry, error)) *MockHistoryRepository_FindByURL_Call { | |
| 328 | 269 | _c.Call.Return(run) | |
| 329 | 270 | return _c | |
| 330 | 271 | } | |
| 331 | 272 | ||
| 332 | - | // GetDailyVisitCount provides a mock function for the type MockHistoryRepository | |
| 333 | - | func (_mock *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error) { | |
| 334 | - | ret := _mock.Called(ctx, daysAgo) | |
| 273 | + | // GetDailyVisitCount provides a mock function with given fields: ctx, daysAgo | |
| 274 | + | func (_m *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error) { | |
| 275 | + | ret := _m.Called(ctx, daysAgo) | |
| 335 | 276 | ||
| 336 | 277 | if len(ret) == 0 { | |
| 337 | 278 | panic("no return value specified for GetDailyVisitCount") | |
| @@ -339,21 +280,23 @@ func (_mock *MockHistoryRepository) GetDailyVisitCount(ctx context.Context, days | |||
| 339 | 280 | ||
| 340 | 281 | var r0 []*entity.DailyVisitCount | |
| 341 | 282 | var r1 error | |
| 342 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*entity.DailyVisitCount, error)); ok { | |
| 343 | - | return returnFunc(ctx, daysAgo) | |
| 283 | + | if rf, ok := ret.Get(0).(func(context.Context, string) ([]*entity.DailyVisitCount, error)); ok { | |
| 284 | + | return rf(ctx, daysAgo) | |
| 344 | 285 | } | |
| 345 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*entity.DailyVisitCount); ok { | |
| 346 | - | r0 = returnFunc(ctx, daysAgo) | |
| 286 | + | if rf, ok := ret.Get(0).(func(context.Context, string) []*entity.DailyVisitCount); ok { | |
| 287 | + | r0 = rf(ctx, daysAgo) | |
| 347 | 288 | } else { | |
| 348 | 289 | if ret.Get(0) != nil { | |
| 349 | 290 | r0 = ret.Get(0).([]*entity.DailyVisitCount) | |
| 350 | 291 | } | |
| 351 | 292 | } | |
| 352 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 353 | - | r1 = returnFunc(ctx, daysAgo) | |
| 293 | + | ||
| 294 | + | if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 295 | + | r1 = rf(ctx, daysAgo) | |
| 354 | 296 | } else { | |
| 355 | 297 | r1 = ret.Error(1) | |
| 356 | 298 | } | |
| 299 | + | ||
| 357 | 300 | return r0, r1 | |
| 358 | 301 | } | |
| 359 | 302 | ||
| @@ -371,35 +314,24 @@ func (_e *MockHistoryRepository_Expecter) GetDailyVisitCount(ctx interface{}, da | |||
| 371 | 314 | ||
| 372 | 315 | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Run(run func(ctx context.Context, daysAgo string)) *MockHistoryRepository_GetDailyVisitCount_Call { | |
| 373 | 316 | _c.Call.Run(func(args mock.Arguments) { | |
| 374 | - | var arg0 context.Context | |
| 375 | - | if args[0] != nil { | |
| 376 | - | arg0 = args[0].(context.Context) | |
| 377 | - | } | |
| 378 | - | var arg1 string | |
| 379 | - | if args[1] != nil { | |
| 380 | - | arg1 = args[1].(string) | |
| 381 | - | } | |
| 382 | - | run( | |
| 383 | - | arg0, | |
| 384 | - | arg1, | |
| 385 | - | ) | |
| 317 | + | run(args[0].(context.Context), args[1].(string)) | |
| 386 | 318 | }) | |
| 387 | 319 | return _c | |
| 388 | 320 | } | |
| 389 | 321 | ||
| 390 | - | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Return(dailyVisitCounts []*entity.DailyVisitCount, err error) *MockHistoryRepository_GetDailyVisitCount_Call { | |
| 391 | - | _c.Call.Return(dailyVisitCounts, err) | |
| 322 | + | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) Return(_a0 []*entity.DailyVisitCount, _a1 error) *MockHistoryRepository_GetDailyVisitCount_Call { | |
| 323 | + | _c.Call.Return(_a0, _a1) | |
| 392 | 324 | return _c | |
| 393 | 325 | } | |
| 394 | 326 | ||
| 395 | - | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) RunAndReturn(run func(ctx context.Context, daysAgo string) ([]*entity.DailyVisitCount, error)) *MockHistoryRepository_GetDailyVisitCount_Call { | |
| 327 | + | func (_c *MockHistoryRepository_GetDailyVisitCount_Call) RunAndReturn(run func(context.Context, string) ([]*entity.DailyVisitCount, error)) *MockHistoryRepository_GetDailyVisitCount_Call { | |
| 396 | 328 | _c.Call.Return(run) | |
| 397 | 329 | return _c | |
| 398 | 330 | } | |
| 399 | 331 | ||
| 400 | - | // GetDomainStats provides a mock function for the type MockHistoryRepository | |
| 401 | - | func (_mock *MockHistoryRepository) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) { | |
| 402 | - | ret := _mock.Called(ctx, limit) | |
| 332 | + | // GetDomainStats provides a mock function with given fields: ctx, limit | |
| 333 | + | func (_m *MockHistoryRepository) GetDomainStats(ctx context.Context, limit int) ([]*entity.DomainStat, error) { | |
| 334 | + | ret := _m.Called(ctx, limit) | |
| 403 | 335 | ||
| 404 | 336 | if len(ret) == 0 { | |
| 405 | 337 | panic("no return value specified for GetDomainStats") | |
| @@ -407,21 +339,23 @@ func (_mock *MockHistoryRepository) GetDomainStats(ctx context.Context, limit in | |||
| 407 | 339 | ||
| 408 | 340 | var r0 []*entity.DomainStat | |
| 409 | 341 | var r1 error | |
| 410 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok { | |
| 411 | - | return returnFunc(ctx, limit) | |
| 342 | + | if rf, ok := ret.Get(0).(func(context.Context, int) ([]*entity.DomainStat, error)); ok { | |
| 343 | + | return rf(ctx, limit) | |
| 412 | 344 | } | |
| 413 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok { | |
| 414 | - | r0 = returnFunc(ctx, limit) | |
| 345 | + | if rf, ok := ret.Get(0).(func(context.Context, int) []*entity.DomainStat); ok { | |
| 346 | + | r0 = rf(ctx, limit) | |
| 415 | 347 | } else { | |
| 416 | 348 | if ret.Get(0) != nil { | |
| 417 | 349 | r0 = ret.Get(0).([]*entity.DomainStat) | |
| 418 | 350 | } | |
| 419 | 351 | } | |
| 420 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { | |
| 421 | - | r1 = returnFunc(ctx, limit) | |
| 352 | + | ||
| 353 | + | if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { | |
| 354 | + | r1 = rf(ctx, limit) | |
| 422 | 355 | } else { | |
| 423 | 356 | r1 = ret.Error(1) | |
| 424 | 357 | } | |
| 358 | + | ||
| 425 | 359 | return r0, r1 | |
| 426 | 360 | } | |
| 427 | 361 | ||
| @@ -439,35 +373,24 @@ func (_e *MockHistoryRepository_Expecter) GetDomainStats(ctx interface{}, limit | |||
| 439 | 373 | ||
| 440 | 374 | func (_c *MockHistoryRepository_GetDomainStats_Call) Run(run func(ctx context.Context, limit int)) *MockHistoryRepository_GetDomainStats_Call { | |
| 441 | 375 | _c.Call.Run(func(args mock.Arguments) { | |
| 442 | - | var arg0 context.Context | |
| 443 | - | if args[0] != nil { | |
| 444 | - | arg0 = args[0].(context.Context) | |
| 445 | - | } | |
| 446 | - | var arg1 int | |
| 447 | - | if args[1] != nil { | |
| 448 | - | arg1 = args[1].(int) | |
| 449 | - | } | |
| 450 | - | run( | |
| 451 | - | arg0, | |
| 452 | - | arg1, | |
| 453 | - | ) | |
| 376 | + | run(args[0].(context.Context), args[1].(int)) | |
| 454 | 377 | }) | |
| 455 | 378 | return _c | |
| 456 | 379 | } | |
| 457 | 380 | ||
| 458 | - | func (_c *MockHistoryRepository_GetDomainStats_Call) Return(domainStats []*entity.DomainStat, err error) *MockHistoryRepository_GetDomainStats_Call { | |
| 459 | - | _c.Call.Return(domainStats, err) | |
| 381 | + | func (_c *MockHistoryRepository_GetDomainStats_Call) Return(_a0 []*entity.DomainStat, _a1 error) *MockHistoryRepository_GetDomainStats_Call { | |
| 382 | + | _c.Call.Return(_a0, _a1) | |
| 460 | 383 | return _c | |
| 461 | 384 | } | |
| 462 | 385 | ||
| 463 | - | func (_c *MockHistoryRepository_GetDomainStats_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]*entity.DomainStat, error)) *MockHistoryRepository_GetDomainStats_Call { | |
| 386 | + | func (_c *MockHistoryRepository_GetDomainStats_Call) RunAndReturn(run func(context.Context, int) ([]*entity.DomainStat, error)) *MockHistoryRepository_GetDomainStats_Call { | |
| 464 | 387 | _c.Call.Return(run) | |
| 465 | 388 | return _c | |
| 466 | 389 | } | |
| 467 | 390 | ||
| 468 | - | // GetHourlyDistribution provides a mock function for the type MockHistoryRepository | |
| 469 | - | func (_mock *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ([]*entity.HourlyDistribution, error) { | |
| 470 | - | ret := _mock.Called(ctx) | |
| 391 | + | // GetHourlyDistribution provides a mock function with given fields: ctx | |
| 392 | + | func (_m *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ([]*entity.HourlyDistribution, error) { | |
| 393 | + | ret := _m.Called(ctx) | |
| 471 | 394 | ||
| 472 | 395 | if len(ret) == 0 { | |
| 473 | 396 | panic("no return value specified for GetHourlyDistribution") | |
| @@ -475,21 +398,23 @@ func (_mock *MockHistoryRepository) GetHourlyDistribution(ctx context.Context) ( | |||
| 475 | 398 | ||
| 476 | 399 | var r0 []*entity.HourlyDistribution | |
| 477 | 400 | var r1 error | |
| 478 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.HourlyDistribution, error)); ok { | |
| 479 | - | return returnFunc(ctx) | |
| 401 | + | if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.HourlyDistribution, error)); ok { | |
| 402 | + | return rf(ctx) | |
| 480 | 403 | } | |
| 481 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.HourlyDistribution); ok { | |
| 482 | - | r0 = returnFunc(ctx) | |
| 404 | + | if rf, ok := ret.Get(0).(func(context.Context) []*entity.HourlyDistribution); ok { | |
| 405 | + | r0 = rf(ctx) | |
| 483 | 406 | } else { | |
| 484 | 407 | if ret.Get(0) != nil { | |
| 485 | 408 | r0 = ret.Get(0).([]*entity.HourlyDistribution) | |
| 486 | 409 | } | |
| 487 | 410 | } | |
| 488 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 489 | - | r1 = returnFunc(ctx) | |
| 411 | + | ||
| 412 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 413 | + | r1 = rf(ctx) | |
| 490 | 414 | } else { | |
| 491 | 415 | r1 = ret.Error(1) | |
| 492 | 416 | } | |
| 417 | + | ||
| 493 | 418 | return r0, r1 | |
| 494 | 419 | } | |
| 495 | 420 | ||
| @@ -506,30 +431,24 @@ func (_e *MockHistoryRepository_Expecter) GetHourlyDistribution(ctx interface{}) | |||
| 506 | 431 | ||
| 507 | 432 | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetHourlyDistribution_Call { | |
| 508 | 433 | _c.Call.Run(func(args mock.Arguments) { | |
| 509 | - | var arg0 context.Context | |
| 510 | - | if args[0] != nil { | |
| 511 | - | arg0 = args[0].(context.Context) | |
| 512 | - | } | |
| 513 | - | run( | |
| 514 | - | arg0, | |
| 515 | - | ) | |
| 434 | + | run(args[0].(context.Context)) | |
| 516 | 435 | }) | |
| 517 | 436 | return _c | |
| 518 | 437 | } | |
| 519 | 438 | ||
| 520 | - | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Return(hourlyDistributions []*entity.HourlyDistribution, err error) *MockHistoryRepository_GetHourlyDistribution_Call { | |
| 521 | - | _c.Call.Return(hourlyDistributions, err) | |
| 439 | + | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) Return(_a0 []*entity.HourlyDistribution, _a1 error) *MockHistoryRepository_GetHourlyDistribution_Call { | |
| 440 | + | _c.Call.Return(_a0, _a1) | |
| 522 | 441 | return _c | |
| 523 | 442 | } | |
| 524 | 443 | ||
| 525 | - | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.HourlyDistribution, error)) *MockHistoryRepository_GetHourlyDistribution_Call { | |
| 444 | + | func (_c *MockHistoryRepository_GetHourlyDistribution_Call) RunAndReturn(run func(context.Context) ([]*entity.HourlyDistribution, error)) *MockHistoryRepository_GetHourlyDistribution_Call { | |
| 526 | 445 | _c.Call.Return(run) | |
| 527 | 446 | return _c | |
| 528 | 447 | } | |
| 529 | 448 | ||
| 530 | - | // GetRecent provides a mock function for the type MockHistoryRepository | |
| 531 | - | func (_mock *MockHistoryRepository) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) { | |
| 532 | - | ret := _mock.Called(ctx, limit, offset) | |
| 449 | + | // GetRecent provides a mock function with given fields: ctx, limit, offset | |
| 450 | + | func (_m *MockHistoryRepository) GetRecent(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error) { | |
| 451 | + | ret := _m.Called(ctx, limit, offset) | |
| 533 | 452 | ||
| 534 | 453 | if len(ret) == 0 { | |
| 535 | 454 | panic("no return value specified for GetRecent") | |
| @@ -537,21 +456,23 @@ func (_mock *MockHistoryRepository) GetRecent(ctx context.Context, limit int, of | |||
| 537 | 456 | ||
| 538 | 457 | var r0 []*entity.HistoryEntry | |
| 539 | 458 | var r1 error | |
| 540 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok { | |
| 541 | - | return returnFunc(ctx, limit, offset) | |
| 459 | + | if rf, ok := ret.Get(0).(func(context.Context, int, int) ([]*entity.HistoryEntry, error)); ok { | |
| 460 | + | return rf(ctx, limit, offset) | |
| 542 | 461 | } | |
| 543 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok { | |
| 544 | - | r0 = returnFunc(ctx, limit, offset) | |
| 462 | + | if rf, ok := ret.Get(0).(func(context.Context, int, int) []*entity.HistoryEntry); ok { | |
| 463 | + | r0 = rf(ctx, limit, offset) | |
| 545 | 464 | } else { | |
| 546 | 465 | if ret.Get(0) != nil { | |
| 547 | 466 | r0 = ret.Get(0).([]*entity.HistoryEntry) | |
| 548 | 467 | } | |
| 549 | 468 | } | |
| 550 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok { | |
| 551 | - | r1 = returnFunc(ctx, limit, offset) | |
| 469 | + | ||
| 470 | + | if rf, ok := ret.Get(1).(func(context.Context, int, int) error); ok { | |
| 471 | + | r1 = rf(ctx, limit, offset) | |
| 552 | 472 | } else { | |
| 553 | 473 | r1 = ret.Error(1) | |
| 554 | 474 | } | |
| 475 | + | ||
| 555 | 476 | return r0, r1 | |
| 556 | 477 | } | |
| 557 | 478 | ||
| @@ -570,40 +491,24 @@ func (_e *MockHistoryRepository_Expecter) GetRecent(ctx interface{}, limit inter | |||
| 570 | 491 | ||
| 571 | 492 | func (_c *MockHistoryRepository_GetRecent_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockHistoryRepository_GetRecent_Call { | |
| 572 | 493 | _c.Call.Run(func(args mock.Arguments) { | |
| 573 | - | var arg0 context.Context | |
| 574 | - | if args[0] != nil { | |
| 575 | - | arg0 = args[0].(context.Context) | |
| 576 | - | } | |
| 577 | - | var arg1 int | |
| 578 | - | if args[1] != nil { | |
| 579 | - | arg1 = args[1].(int) | |
| 580 | - | } | |
| 581 | - | var arg2 int | |
| 582 | - | if args[2] != nil { | |
| 583 | - | arg2 = args[2].(int) | |
| 584 | - | } | |
| 585 | - | run( | |
| 586 | - | arg0, | |
| 587 | - | arg1, | |
| 588 | - | arg2, | |
| 589 | - | ) | |
| 494 | + | run(args[0].(context.Context), args[1].(int), args[2].(int)) | |
| 590 | 495 | }) | |
| 591 | 496 | return _c | |
| 592 | 497 | } | |
| 593 | 498 | ||
| 594 | - | func (_c *MockHistoryRepository_GetRecent_Call) Return(historyEntrys []*entity.HistoryEntry, err error) *MockHistoryRepository_GetRecent_Call { | |
| 595 | - | _c.Call.Return(historyEntrys, err) | |
| 499 | + | func (_c *MockHistoryRepository_GetRecent_Call) Return(_a0 []*entity.HistoryEntry, _a1 error) *MockHistoryRepository_GetRecent_Call { | |
| 500 | + | _c.Call.Return(_a0, _a1) | |
| 596 | 501 | return _c | |
| 597 | 502 | } | |
| 598 | 503 | ||
| 599 | - | func (_c *MockHistoryRepository_GetRecent_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecent_Call { | |
| 504 | + | func (_c *MockHistoryRepository_GetRecent_Call) RunAndReturn(run func(context.Context, int, int) ([]*entity.HistoryEntry, error)) *MockHistoryRepository_GetRecent_Call { | |
| 600 | 505 | _c.Call.Return(run) | |
| 601 | 506 | return _c | |
| 602 | 507 | } | |
| 603 | 508 | ||
| 604 | - | // GetStats provides a mock function for the type MockHistoryRepository | |
| 605 | - | func (_mock *MockHistoryRepository) GetStats(ctx context.Context) (*entity.HistoryStats, error) { | |
| 606 | - | ret := _mock.Called(ctx) | |
| 509 | + | // GetStats provides a mock function with given fields: ctx | |
| 510 | + | func (_m *MockHistoryRepository) GetStats(ctx context.Context) (*entity.HistoryStats, error) { | |
| 511 | + | ret := _m.Called(ctx) | |
| 607 | 512 | ||
| 608 | 513 | if len(ret) == 0 { | |
| 609 | 514 | panic("no return value specified for GetStats") | |
| @@ -611,21 +516,23 @@ func (_mock *MockHistoryRepository) GetStats(ctx context.Context) (*entity.Histo | |||
| 611 | 516 | ||
| 612 | 517 | var r0 *entity.HistoryStats | |
| 613 | 518 | var r1 error | |
| 614 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok { | |
| 615 | - | return returnFunc(ctx) | |
| 519 | + | if rf, ok := ret.Get(0).(func(context.Context) (*entity.HistoryStats, error)); ok { | |
| 520 | + | return rf(ctx) | |
| 616 | 521 | } | |
| 617 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok { | |
| 618 | - | r0 = returnFunc(ctx) | |
| 522 | + | if rf, ok := ret.Get(0).(func(context.Context) *entity.HistoryStats); ok { | |
| 523 | + | r0 = rf(ctx) | |
| 619 | 524 | } else { | |
| 620 | 525 | if ret.Get(0) != nil { | |
| 621 | 526 | r0 = ret.Get(0).(*entity.HistoryStats) | |
| 622 | 527 | } | |
| 623 | 528 | } | |
| 624 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 625 | - | r1 = returnFunc(ctx) | |
| 529 | + | ||
| 530 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 531 | + | r1 = rf(ctx) | |
| 626 | 532 | } else { | |
| 627 | 533 | r1 = ret.Error(1) | |
| 628 | 534 | } | |
| 535 | + | ||
| 629 | 536 | return r0, r1 | |
| 630 | 537 | } | |
| 631 | 538 | ||
| @@ -642,41 +549,36 @@ func (_e *MockHistoryRepository_Expecter) GetStats(ctx interface{}) *MockHistory | |||
| 642 | 549 | ||
| 643 | 550 | func (_c *MockHistoryRepository_GetStats_Call) Run(run func(ctx context.Context)) *MockHistoryRepository_GetStats_Call { | |
| 644 | 551 | _c.Call.Run(func(args mock.Arguments) { | |
| 645 | - | var arg0 context.Context | |
| 646 | - | if args[0] != nil { | |
| 647 | - | arg0 = args[0].(context.Context) | |
| 648 | - | } | |
| 649 | - | run( | |
| 650 | - | arg0, | |
| 651 | - | ) | |
| 552 | + | run(args[0].(context.Context)) | |
| 652 | 553 | }) | |
| 653 | 554 | return _c | |
| 654 | 555 | } | |
| 655 | 556 | ||
| 656 | - | func (_c *MockHistoryRepository_GetStats_Call) Return(historyStats *entity.HistoryStats, err error) *MockHistoryRepository_GetStats_Call { | |
| 657 | - | _c.Call.Return(historyStats, err) | |
| 557 | + | func (_c *MockHistoryRepository_GetStats_Call) Return(_a0 *entity.HistoryStats, _a1 error) *MockHistoryRepository_GetStats_Call { | |
| 558 | + | _c.Call.Return(_a0, _a1) | |
| 658 | 559 | return _c | |
| 659 | 560 | } | |
| 660 | 561 | ||
| 661 | - | func (_c *MockHistoryRepository_GetStats_Call) RunAndReturn(run func(ctx context.Context) (*entity.HistoryStats, error)) *MockHistoryRepository_GetStats_Call { | |
| 562 | + | func (_c *MockHistoryRepository_GetStats_Call) RunAndReturn(run func(context.Context) (*entity.HistoryStats, error)) *MockHistoryRepository_GetStats_Call { | |
| 662 | 563 | _c.Call.Return(run) | |
| 663 | 564 | return _c | |
| 664 | 565 | } | |
| 665 | 566 | ||
| 666 | - | // IncrementVisitCount provides a mock function for the type MockHistoryRepository | |
| 667 | - | func (_mock *MockHistoryRepository) IncrementVisitCount(ctx context.Context, url string) error { | |
| 668 | - | ret := _mock.Called(ctx, url) | |
| 567 | + | // IncrementVisitCount provides a mock function with given fields: ctx, url | |
| 568 | + | func (_m *MockHistoryRepository) IncrementVisitCount(ctx context.Context, url string) error { | |
| 569 | + | ret := _m.Called(ctx, url) | |
| 669 | 570 | ||
| 670 | 571 | if len(ret) == 0 { | |
| 671 | 572 | panic("no return value specified for IncrementVisitCount") | |
| 672 | 573 | } | |
| 673 | 574 | ||
| 674 | 575 | var r0 error | |
| 675 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 676 | - | r0 = returnFunc(ctx, url) | |
| 576 | + | if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 577 | + | r0 = rf(ctx, url) | |
| 677 | 578 | } else { | |
| 678 | 579 | r0 = ret.Error(0) | |
| 679 | 580 | } | |
| 581 | + | ||
| 680 | 582 | return r0 | |
| 681 | 583 | } | |
| 682 | 584 | ||
| @@ -694,46 +596,36 @@ func (_e *MockHistoryRepository_Expecter) IncrementVisitCount(ctx interface{}, u | |||
| 694 | 596 | ||
| 695 | 597 | func (_c *MockHistoryRepository_IncrementVisitCount_Call) Run(run func(ctx context.Context, url string)) *MockHistoryRepository_IncrementVisitCount_Call { | |
| 696 | 598 | _c.Call.Run(func(args mock.Arguments) { | |
| 697 | - | var arg0 context.Context | |
| 698 | - | if args[0] != nil { | |
| 699 | - | arg0 = args[0].(context.Context) | |
| 700 | - | } | |
| 701 | - | var arg1 string | |
| 702 | - | if args[1] != nil { | |
| 703 | - | arg1 = args[1].(string) | |
| 704 | - | } | |
| 705 | - | run( | |
| 706 | - | arg0, | |
| 707 | - | arg1, | |
| 708 | - | ) | |
| 599 | + | run(args[0].(context.Context), args[1].(string)) | |
| 709 | 600 | }) | |
| 710 | 601 | return _c | |
| 711 | 602 | } | |
| 712 | 603 | ||
| 713 | - | func (_c *MockHistoryRepository_IncrementVisitCount_Call) Return(err error) *MockHistoryRepository_IncrementVisitCount_Call { | |
| 714 | - | _c.Call.Return(err) | |
| 604 | + | func (_c *MockHistoryRepository_IncrementVisitCount_Call) Return(_a0 error) *MockHistoryRepository_IncrementVisitCount_Call { | |
| 605 | + | _c.Call.Return(_a0) | |
| 715 | 606 | return _c | |
| 716 | 607 | } | |
| 717 | 608 | ||
| 718 | - | func (_c *MockHistoryRepository_IncrementVisitCount_Call) RunAndReturn(run func(ctx context.Context, url string) error) *MockHistoryRepository_IncrementVisitCount_Call { | |
| 609 | + | func (_c *MockHistoryRepository_IncrementVisitCount_Call) RunAndReturn(run func(context.Context, string) error) *MockHistoryRepository_IncrementVisitCount_Call { | |
| 719 | 610 | _c.Call.Return(run) | |
| 720 | 611 | return _c | |
| 721 | 612 | } | |
| 722 | 613 | ||
| 723 | - | // Save provides a mock function for the type MockHistoryRepository | |
| 724 | - | func (_mock *MockHistoryRepository) Save(ctx context.Context, entry *entity.HistoryEntry) error { | |
| 725 | - | ret := _mock.Called(ctx, entry) | |
| 614 | + | // Save provides a mock function with given fields: ctx, entry | |
| 615 | + | func (_m *MockHistoryRepository) Save(ctx context.Context, entry *entity.HistoryEntry) error { | |
| 616 | + | ret := _m.Called(ctx, entry) | |
| 726 | 617 | ||
| 727 | 618 | if len(ret) == 0 { | |
| 728 | 619 | panic("no return value specified for Save") | |
| 729 | 620 | } | |
| 730 | 621 | ||
| 731 | 622 | var r0 error | |
| 732 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.HistoryEntry) error); ok { | |
| 733 | - | r0 = returnFunc(ctx, entry) | |
| 623 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.HistoryEntry) error); ok { | |
| 624 | + | r0 = rf(ctx, entry) | |
| 734 | 625 | } else { | |
| 735 | 626 | r0 = ret.Error(0) | |
| 736 | 627 | } | |
| 628 | + | ||
| 737 | 629 | return r0 | |
| 738 | 630 | } | |
| 739 | 631 | ||
| @@ -751,35 +643,24 @@ func (_e *MockHistoryRepository_Expecter) Save(ctx interface{}, entry interface{ | |||
| 751 | 643 | ||
| 752 | 644 | func (_c *MockHistoryRepository_Save_Call) Run(run func(ctx context.Context, entry *entity.HistoryEntry)) *MockHistoryRepository_Save_Call { | |
| 753 | 645 | _c.Call.Run(func(args mock.Arguments) { | |
| 754 | - | var arg0 context.Context | |
| 755 | - | if args[0] != nil { | |
| 756 | - | arg0 = args[0].(context.Context) | |
| 757 | - | } | |
| 758 | - | var arg1 *entity.HistoryEntry | |
| 759 | - | if args[1] != nil { | |
| 760 | - | arg1 = args[1].(*entity.HistoryEntry) | |
| 761 | - | } | |
| 762 | - | run( | |
| 763 | - | arg0, | |
| 764 | - | arg1, | |
| 765 | - | ) | |
| 646 | + | run(args[0].(context.Context), args[1].(*entity.HistoryEntry)) | |
| 766 | 647 | }) | |
| 767 | 648 | return _c | |
| 768 | 649 | } | |
| 769 | 650 | ||
| 770 | - | func (_c *MockHistoryRepository_Save_Call) Return(err error) *MockHistoryRepository_Save_Call { | |
| 771 | - | _c.Call.Return(err) | |
| 651 | + | func (_c *MockHistoryRepository_Save_Call) Return(_a0 error) *MockHistoryRepository_Save_Call { | |
| 652 | + | _c.Call.Return(_a0) | |
| 772 | 653 | return _c | |
| 773 | 654 | } | |
| 774 | 655 | ||
| 775 | - | func (_c *MockHistoryRepository_Save_Call) RunAndReturn(run func(ctx context.Context, entry *entity.HistoryEntry) error) *MockHistoryRepository_Save_Call { | |
| 656 | + | func (_c *MockHistoryRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.HistoryEntry) error) *MockHistoryRepository_Save_Call { | |
| 776 | 657 | _c.Call.Return(run) | |
| 777 | 658 | return _c | |
| 778 | 659 | } | |
| 779 | 660 | ||
| 780 | - | // Search provides a mock function for the type MockHistoryRepository | |
| 781 | - | func (_mock *MockHistoryRepository) Search(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error) { | |
| 782 | - | ret := _mock.Called(ctx, query, limit) | |
| 661 | + | // Search provides a mock function with given fields: ctx, query, limit | |
| 662 | + | func (_m *MockHistoryRepository) Search(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error) { | |
| 663 | + | ret := _m.Called(ctx, query, limit) | |
| 783 | 664 | ||
| 784 | 665 | if len(ret) == 0 { | |
| 785 | 666 | panic("no return value specified for Search") | |
| @@ -787,21 +668,23 @@ func (_mock *MockHistoryRepository) Search(ctx context.Context, query string, li | |||
| 787 | 668 | ||
| 788 | 669 | var r0 []entity.HistoryMatch | |
| 789 | 670 | var r1 error | |
| 790 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) ([]entity.HistoryMatch, error)); ok { | |
| 791 | - | return returnFunc(ctx, query, limit) | |
| 671 | + | if rf, ok := ret.Get(0).(func(context.Context, string, int) ([]entity.HistoryMatch, error)); ok { | |
| 672 | + | return rf(ctx, query, limit) | |
| 792 | 673 | } | |
| 793 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) []entity.HistoryMatch); ok { | |
| 794 | - | r0 = returnFunc(ctx, query, limit) | |
| 674 | + | if rf, ok := ret.Get(0).(func(context.Context, string, int) []entity.HistoryMatch); ok { | |
| 675 | + | r0 = rf(ctx, query, limit) | |
| 795 | 676 | } else { | |
| 796 | 677 | if ret.Get(0) != nil { | |
| 797 | 678 | r0 = ret.Get(0).([]entity.HistoryMatch) | |
| 798 | 679 | } | |
| 799 | 680 | } | |
| 800 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string, int) error); ok { | |
| 801 | - | r1 = returnFunc(ctx, query, limit) | |
| 681 | + | ||
| 682 | + | if rf, ok := ret.Get(1).(func(context.Context, string, int) error); ok { | |
| 683 | + | r1 = rf(ctx, query, limit) | |
| 802 | 684 | } else { | |
| 803 | 685 | r1 = ret.Error(1) | |
| 804 | 686 | } | |
| 687 | + | ||
| 805 | 688 | return r0, r1 | |
| 806 | 689 | } | |
| 807 | 690 | ||
| @@ -820,33 +703,31 @@ func (_e *MockHistoryRepository_Expecter) Search(ctx interface{}, query interfac | |||
| 820 | 703 | ||
| 821 | 704 | func (_c *MockHistoryRepository_Search_Call) Run(run func(ctx context.Context, query string, limit int)) *MockHistoryRepository_Search_Call { | |
| 822 | 705 | _c.Call.Run(func(args mock.Arguments) { | |
| 823 | - | var arg0 context.Context | |
| 824 | - | if args[0] != nil { | |
| 825 | - | arg0 = args[0].(context.Context) | |
| 826 | - | } | |
| 827 | - | var arg1 string | |
| 828 | - | if args[1] != nil { | |
| 829 | - | arg1 = args[1].(string) | |
| 830 | - | } | |
| 831 | - | var arg2 int | |
| 832 | - | if args[2] != nil { | |
| 833 | - | arg2 = args[2].(int) | |
| 834 | - | } | |
| 835 | - | run( | |
| 836 | - | arg0, | |
| 837 | - | arg1, | |
| 838 | - | arg2, | |
| 839 | - | ) | |
| 706 | + | run(args[0].(context.Context), args[1].(string), args[2].(int)) | |
| 840 | 707 | }) | |
| 841 | 708 | return _c | |
| 842 | 709 | } | |
| 843 | 710 | ||
| 844 | - | func (_c *MockHistoryRepository_Search_Call) Return(historyMatchs []entity.HistoryMatch, err error) *MockHistoryRepository_Search_Call { | |
| 845 | - | _c.Call.Return(historyMatchs, err) | |
| 711 | + | func (_c *MockHistoryRepository_Search_Call) Return(_a0 []entity.HistoryMatch, _a1 error) *MockHistoryRepository_Search_Call { | |
| 712 | + | _c.Call.Return(_a0, _a1) | |
| 846 | 713 | return _c | |
| 847 | 714 | } | |
| 848 | 715 | ||
| 849 | - | func (_c *MockHistoryRepository_Search_Call) RunAndReturn(run func(ctx context.Context, query string, limit int) ([]entity.HistoryMatch, error)) *MockHistoryRepository_Search_Call { | |
| 716 | + | func (_c *MockHistoryRepository_Search_Call) RunAndReturn(run func(context.Context, string, int) ([]entity.HistoryMatch, error)) *MockHistoryRepository_Search_Call { | |
| 850 | 717 | _c.Call.Return(run) | |
| 851 | 718 | return _c | |
| 852 | 719 | } | |
| 720 | + | ||
| 721 | + | // NewMockHistoryRepository creates a new instance of MockHistoryRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 722 | + | // The first argument is typically a *testing.T value. | |
| 723 | + | func NewMockHistoryRepository(t interface { | |
| 724 | + | mock.TestingT | |
| 725 | + | Cleanup(func()) | |
| 726 | + | }) *MockHistoryRepository { | |
| 727 | + | mock := &MockHistoryRepository{} | |
| 728 | + | mock.Mock.Test(t) | |
| 729 | + | ||
| 730 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 731 | + | ||
| 732 | + | return mock | |
| 733 | + | } | |
M internal/domain/repository/mocks/mock_tag_repository.go +117 -200
| @@ -1,30 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | - | "github.com/bnema/dumber/internal/domain/entity" | |
| 8 | + | entity "github.com/bnema/dumber/internal/domain/entity" | |
| 11 | 9 | mock "github.com/stretchr/testify/mock" | |
| 12 | 10 | ) | |
| 13 | 11 | ||
| 14 | - | // NewMockTagRepository creates a new instance of MockTagRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 15 | - | // The first argument is typically a *testing.T value. | |
| 16 | - | func NewMockTagRepository(t interface { | |
| 17 | - | mock.TestingT | |
| 18 | - | Cleanup(func()) | |
| 19 | - | }) *MockTagRepository { | |
| 20 | - | mock := &MockTagRepository{} | |
| 21 | - | mock.Mock.Test(t) | |
| 22 | - | ||
| 23 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 24 | - | ||
| 25 | - | return mock | |
| 26 | - | } | |
| 27 | - | ||
| 28 | 12 | // MockTagRepository is an autogenerated mock type for the TagRepository type | |
| 29 | 13 | type MockTagRepository struct { | |
| 30 | 14 | mock.Mock | |
| @@ -38,20 +22,21 @@ func (_m *MockTagRepository) EXPECT() *MockTagRepository_Expecter { | |||
| 38 | 22 | return &MockTagRepository_Expecter{mock: &_m.Mock} | |
| 39 | 23 | } | |
| 40 | 24 | ||
| 41 | - | // AssignToFavorite provides a mock function for the type MockTagRepository | |
| 42 | - | func (_mock *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { | |
| 43 | - | ret := _mock.Called(ctx, tagID, favID) | |
| 25 | + | // AssignToFavorite provides a mock function with given fields: ctx, tagID, favID | |
| 26 | + | func (_m *MockTagRepository) AssignToFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { | |
| 27 | + | ret := _m.Called(ctx, tagID, favID) | |
| 44 | 28 | ||
| 45 | 29 | if len(ret) == 0 { | |
| 46 | 30 | panic("no return value specified for AssignToFavorite") | |
| 47 | 31 | } | |
| 48 | 32 | ||
| 49 | 33 | var r0 error | |
| 50 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { | |
| 51 | - | r0 = returnFunc(ctx, tagID, favID) | |
| 34 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { | |
| 35 | + | r0 = rf(ctx, tagID, favID) | |
| 52 | 36 | } else { | |
| 53 | 37 | r0 = ret.Error(0) | |
| 54 | 38 | } | |
| 39 | + | ||
| 55 | 40 | return r0 | |
| 56 | 41 | } | |
| 57 | 42 | ||
| @@ -70,51 +55,36 @@ func (_e *MockTagRepository_Expecter) AssignToFavorite(ctx interface{}, tagID in | |||
| 70 | 55 | ||
| 71 | 56 | func (_c *MockTagRepository_AssignToFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_AssignToFavorite_Call { | |
| 72 | 57 | _c.Call.Run(func(args mock.Arguments) { | |
| 73 | - | var arg0 context.Context | |
| 74 | - | if args[0] != nil { | |
| 75 | - | arg0 = args[0].(context.Context) | |
| 76 | - | } | |
| 77 | - | var arg1 entity.TagID | |
| 78 | - | if args[1] != nil { | |
| 79 | - | arg1 = args[1].(entity.TagID) | |
| 80 | - | } | |
| 81 | - | var arg2 entity.FavoriteID | |
| 82 | - | if args[2] != nil { | |
| 83 | - | arg2 = args[2].(entity.FavoriteID) | |
| 84 | - | } | |
| 85 | - | run( | |
| 86 | - | arg0, | |
| 87 | - | arg1, | |
| 88 | - | arg2, | |
| 89 | - | ) | |
| 58 | + | run(args[0].(context.Context), args[1].(entity.TagID), args[2].(entity.FavoriteID)) | |
| 90 | 59 | }) | |
| 91 | 60 | return _c | |
| 92 | 61 | } | |
| 93 | 62 | ||
| 94 | - | func (_c *MockTagRepository_AssignToFavorite_Call) Return(err error) *MockTagRepository_AssignToFavorite_Call { | |
| 95 | - | _c.Call.Return(err) | |
| 63 | + | func (_c *MockTagRepository_AssignToFavorite_Call) Return(_a0 error) *MockTagRepository_AssignToFavorite_Call { | |
| 64 | + | _c.Call.Return(_a0) | |
| 96 | 65 | return _c | |
| 97 | 66 | } | |
| 98 | 67 | ||
| 99 | - | func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call { | |
| 68 | + | func (_c *MockTagRepository_AssignToFavorite_Call) RunAndReturn(run func(context.Context, entity.TagID, entity.FavoriteID) error) *MockTagRepository_AssignToFavorite_Call { | |
| 100 | 69 | _c.Call.Return(run) | |
| 101 | 70 | return _c | |
| 102 | 71 | } | |
| 103 | 72 | ||
| 104 | - | // Delete provides a mock function for the type MockTagRepository | |
| 105 | - | func (_mock *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error { | |
| 106 | - | ret := _mock.Called(ctx, id) | |
| 73 | + | // Delete provides a mock function with given fields: ctx, id | |
| 74 | + | func (_m *MockTagRepository) Delete(ctx context.Context, id entity.TagID) error { | |
| 75 | + | ret := _m.Called(ctx, id) | |
| 107 | 76 | ||
| 108 | 77 | if len(ret) == 0 { | |
| 109 | 78 | panic("no return value specified for Delete") | |
| 110 | 79 | } | |
| 111 | 80 | ||
| 112 | 81 | var r0 error | |
| 113 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok { | |
| 114 | - | r0 = returnFunc(ctx, id) | |
| 82 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.TagID) error); ok { | |
| 83 | + | r0 = rf(ctx, id) | |
| 115 | 84 | } else { | |
| 116 | 85 | r0 = ret.Error(0) | |
| 117 | 86 | } | |
| 87 | + | ||
| 118 | 88 | return r0 | |
| 119 | 89 | } | |
| 120 | 90 | ||
| @@ -132,35 +102,24 @@ func (_e *MockTagRepository_Expecter) Delete(ctx interface{}, id interface{}) *M | |||
| 132 | 102 | ||
| 133 | 103 | func (_c *MockTagRepository_Delete_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_Delete_Call { | |
| 134 | 104 | _c.Call.Run(func(args mock.Arguments) { | |
| 135 | - | var arg0 context.Context | |
| 136 | - | if args[0] != nil { | |
| 137 | - | arg0 = args[0].(context.Context) | |
| 138 | - | } | |
| 139 | - | var arg1 entity.TagID | |
| 140 | - | if args[1] != nil { | |
| 141 | - | arg1 = args[1].(entity.TagID) | |
| 142 | - | } | |
| 143 | - | run( | |
| 144 | - | arg0, | |
| 145 | - | arg1, | |
| 146 | - | ) | |
| 105 | + | run(args[0].(context.Context), args[1].(entity.TagID)) | |
| 147 | 106 | }) | |
| 148 | 107 | return _c | |
| 149 | 108 | } | |
| 150 | 109 | ||
| 151 | - | func (_c *MockTagRepository_Delete_Call) Return(err error) *MockTagRepository_Delete_Call { | |
| 152 | - | _c.Call.Return(err) | |
| 110 | + | func (_c *MockTagRepository_Delete_Call) Return(_a0 error) *MockTagRepository_Delete_Call { | |
| 111 | + | _c.Call.Return(_a0) | |
| 153 | 112 | return _c | |
| 154 | 113 | } | |
| 155 | 114 | ||
| 156 | - | func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) error) *MockTagRepository_Delete_Call { | |
| 115 | + | func (_c *MockTagRepository_Delete_Call) RunAndReturn(run func(context.Context, entity.TagID) error) *MockTagRepository_Delete_Call { | |
| 157 | 116 | _c.Call.Return(run) | |
| 158 | 117 | return _c | |
| 159 | 118 | } | |
| 160 | 119 | ||
| 161 | - | // FindByID provides a mock function for the type MockTagRepository | |
| 162 | - | func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) { | |
| 163 | - | ret := _mock.Called(ctx, id) | |
| 120 | + | // FindByID provides a mock function with given fields: ctx, id | |
| 121 | + | func (_m *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) (*entity.Tag, error) { | |
| 122 | + | ret := _m.Called(ctx, id) | |
| 164 | 123 | ||
| 165 | 124 | if len(ret) == 0 { | |
| 166 | 125 | panic("no return value specified for FindByID") | |
| @@ -168,21 +127,23 @@ func (_mock *MockTagRepository) FindByID(ctx context.Context, id entity.TagID) ( | |||
| 168 | 127 | ||
| 169 | 128 | var r0 *entity.Tag | |
| 170 | 129 | var r1 error | |
| 171 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok { | |
| 172 | - | return returnFunc(ctx, id) | |
| 130 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.TagID) (*entity.Tag, error)); ok { | |
| 131 | + | return rf(ctx, id) | |
| 173 | 132 | } | |
| 174 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok { | |
| 175 | - | r0 = returnFunc(ctx, id) | |
| 133 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.TagID) *entity.Tag); ok { | |
| 134 | + | r0 = rf(ctx, id) | |
| 176 | 135 | } else { | |
| 177 | 136 | if ret.Get(0) != nil { | |
| 178 | 137 | r0 = ret.Get(0).(*entity.Tag) | |
| 179 | 138 | } | |
| 180 | 139 | } | |
| 181 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok { | |
| 182 | - | r1 = returnFunc(ctx, id) | |
| 140 | + | ||
| 141 | + | if rf, ok := ret.Get(1).(func(context.Context, entity.TagID) error); ok { | |
| 142 | + | r1 = rf(ctx, id) | |
| 183 | 143 | } else { | |
| 184 | 144 | r1 = ret.Error(1) | |
| 185 | 145 | } | |
| 146 | + | ||
| 186 | 147 | return r0, r1 | |
| 187 | 148 | } | |
| 188 | 149 | ||
| @@ -200,35 +161,24 @@ func (_e *MockTagRepository_Expecter) FindByID(ctx interface{}, id interface{}) | |||
| 200 | 161 | ||
| 201 | 162 | func (_c *MockTagRepository_FindByID_Call) Run(run func(ctx context.Context, id entity.TagID)) *MockTagRepository_FindByID_Call { | |
| 202 | 163 | _c.Call.Run(func(args mock.Arguments) { | |
| 203 | - | var arg0 context.Context | |
| 204 | - | if args[0] != nil { | |
| 205 | - | arg0 = args[0].(context.Context) | |
| 206 | - | } | |
| 207 | - | var arg1 entity.TagID | |
| 208 | - | if args[1] != nil { | |
| 209 | - | arg1 = args[1].(entity.TagID) | |
| 210 | - | } | |
| 211 | - | run( | |
| 212 | - | arg0, | |
| 213 | - | arg1, | |
| 214 | - | ) | |
| 164 | + | run(args[0].(context.Context), args[1].(entity.TagID)) | |
| 215 | 165 | }) | |
| 216 | 166 | return _c | |
| 217 | 167 | } | |
| 218 | 168 | ||
| 219 | - | func (_c *MockTagRepository_FindByID_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByID_Call { | |
| 220 | - | _c.Call.Return(tag, err) | |
| 169 | + | func (_c *MockTagRepository_FindByID_Call) Return(_a0 *entity.Tag, _a1 error) *MockTagRepository_FindByID_Call { | |
| 170 | + | _c.Call.Return(_a0, _a1) | |
| 221 | 171 | return _c | |
| 222 | 172 | } | |
| 223 | 173 | ||
| 224 | - | func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(ctx context.Context, id entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call { | |
| 174 | + | func (_c *MockTagRepository_FindByID_Call) RunAndReturn(run func(context.Context, entity.TagID) (*entity.Tag, error)) *MockTagRepository_FindByID_Call { | |
| 225 | 175 | _c.Call.Return(run) | |
| 226 | 176 | return _c | |
| 227 | 177 | } | |
| 228 | 178 | ||
| 229 | - | // FindByName provides a mock function for the type MockTagRepository | |
| 230 | - | func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) { | |
| 231 | - | ret := _mock.Called(ctx, name) | |
| 179 | + | // FindByName provides a mock function with given fields: ctx, name | |
| 180 | + | func (_m *MockTagRepository) FindByName(ctx context.Context, name string) (*entity.Tag, error) { | |
| 181 | + | ret := _m.Called(ctx, name) | |
| 232 | 182 | ||
| 233 | 183 | if len(ret) == 0 { | |
| 234 | 184 | panic("no return value specified for FindByName") | |
| @@ -236,21 +186,23 @@ func (_mock *MockTagRepository) FindByName(ctx context.Context, name string) (*e | |||
| 236 | 186 | ||
| 237 | 187 | var r0 *entity.Tag | |
| 238 | 188 | var r1 error | |
| 239 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok { | |
| 240 | - | return returnFunc(ctx, name) | |
| 189 | + | if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.Tag, error)); ok { | |
| 190 | + | return rf(ctx, name) | |
| 241 | 191 | } | |
| 242 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok { | |
| 243 | - | r0 = returnFunc(ctx, name) | |
| 192 | + | if rf, ok := ret.Get(0).(func(context.Context, string) *entity.Tag); ok { | |
| 193 | + | r0 = rf(ctx, name) | |
| 244 | 194 | } else { | |
| 245 | 195 | if ret.Get(0) != nil { | |
| 246 | 196 | r0 = ret.Get(0).(*entity.Tag) | |
| 247 | 197 | } | |
| 248 | 198 | } | |
| 249 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 250 | - | r1 = returnFunc(ctx, name) | |
| 199 | + | ||
| 200 | + | if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 201 | + | r1 = rf(ctx, name) | |
| 251 | 202 | } else { | |
| 252 | 203 | r1 = ret.Error(1) | |
| 253 | 204 | } | |
| 205 | + | ||
| 254 | 206 | return r0, r1 | |
| 255 | 207 | } | |
| 256 | 208 | ||
| @@ -268,35 +220,24 @@ func (_e *MockTagRepository_Expecter) FindByName(ctx interface{}, name interface | |||
| 268 | 220 | ||
| 269 | 221 | func (_c *MockTagRepository_FindByName_Call) Run(run func(ctx context.Context, name string)) *MockTagRepository_FindByName_Call { | |
| 270 | 222 | _c.Call.Run(func(args mock.Arguments) { | |
| 271 | - | var arg0 context.Context | |
| 272 | - | if args[0] != nil { | |
| 273 | - | arg0 = args[0].(context.Context) | |
| 274 | - | } | |
| 275 | - | var arg1 string | |
| 276 | - | if args[1] != nil { | |
| 277 | - | arg1 = args[1].(string) | |
| 278 | - | } | |
| 279 | - | run( | |
| 280 | - | arg0, | |
| 281 | - | arg1, | |
| 282 | - | ) | |
| 223 | + | run(args[0].(context.Context), args[1].(string)) | |
| 283 | 224 | }) | |
| 284 | 225 | return _c | |
| 285 | 226 | } | |
| 286 | 227 | ||
| 287 | - | func (_c *MockTagRepository_FindByName_Call) Return(tag *entity.Tag, err error) *MockTagRepository_FindByName_Call { | |
| 288 | - | _c.Call.Return(tag, err) | |
| 228 | + | func (_c *MockTagRepository_FindByName_Call) Return(_a0 *entity.Tag, _a1 error) *MockTagRepository_FindByName_Call { | |
| 229 | + | _c.Call.Return(_a0, _a1) | |
| 289 | 230 | return _c | |
| 290 | 231 | } | |
| 291 | 232 | ||
| 292 | - | func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(ctx context.Context, name string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call { | |
| 233 | + | func (_c *MockTagRepository_FindByName_Call) RunAndReturn(run func(context.Context, string) (*entity.Tag, error)) *MockTagRepository_FindByName_Call { | |
| 293 | 234 | _c.Call.Return(run) | |
| 294 | 235 | return _c | |
| 295 | 236 | } | |
| 296 | 237 | ||
| 297 | - | // GetAll provides a mock function for the type MockTagRepository | |
| 298 | - | func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) { | |
| 299 | - | ret := _mock.Called(ctx) | |
| 238 | + | // GetAll provides a mock function with given fields: ctx | |
| 239 | + | func (_m *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, error) { | |
| 240 | + | ret := _m.Called(ctx) | |
| 300 | 241 | ||
| 301 | 242 | if len(ret) == 0 { | |
| 302 | 243 | panic("no return value specified for GetAll") | |
| @@ -304,21 +245,23 @@ func (_mock *MockTagRepository) GetAll(ctx context.Context) ([]*entity.Tag, erro | |||
| 304 | 245 | ||
| 305 | 246 | var r0 []*entity.Tag | |
| 306 | 247 | var r1 error | |
| 307 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok { | |
| 308 | - | return returnFunc(ctx) | |
| 248 | + | if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.Tag, error)); ok { | |
| 249 | + | return rf(ctx) | |
| 309 | 250 | } | |
| 310 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok { | |
| 311 | - | r0 = returnFunc(ctx) | |
| 251 | + | if rf, ok := ret.Get(0).(func(context.Context) []*entity.Tag); ok { | |
| 252 | + | r0 = rf(ctx) | |
| 312 | 253 | } else { | |
| 313 | 254 | if ret.Get(0) != nil { | |
| 314 | 255 | r0 = ret.Get(0).([]*entity.Tag) | |
| 315 | 256 | } | |
| 316 | 257 | } | |
| 317 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 318 | - | r1 = returnFunc(ctx) | |
| 258 | + | ||
| 259 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 260 | + | r1 = rf(ctx) | |
| 319 | 261 | } else { | |
| 320 | 262 | r1 = ret.Error(1) | |
| 321 | 263 | } | |
| 264 | + | ||
| 322 | 265 | return r0, r1 | |
| 323 | 266 | } | |
| 324 | 267 | ||
| @@ -335,30 +278,24 @@ func (_e *MockTagRepository_Expecter) GetAll(ctx interface{}) *MockTagRepository | |||
| 335 | 278 | ||
| 336 | 279 | func (_c *MockTagRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockTagRepository_GetAll_Call { | |
| 337 | 280 | _c.Call.Run(func(args mock.Arguments) { | |
| 338 | - | var arg0 context.Context | |
| 339 | - | if args[0] != nil { | |
| 340 | - | arg0 = args[0].(context.Context) | |
| 341 | - | } | |
| 342 | - | run( | |
| 343 | - | arg0, | |
| 344 | - | ) | |
| 281 | + | run(args[0].(context.Context)) | |
| 345 | 282 | }) | |
| 346 | 283 | return _c | |
| 347 | 284 | } | |
| 348 | 285 | ||
| 349 | - | func (_c *MockTagRepository_GetAll_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetAll_Call { | |
| 350 | - | _c.Call.Return(tags, err) | |
| 286 | + | func (_c *MockTagRepository_GetAll_Call) Return(_a0 []*entity.Tag, _a1 error) *MockTagRepository_GetAll_Call { | |
| 287 | + | _c.Call.Return(_a0, _a1) | |
| 351 | 288 | return _c | |
| 352 | 289 | } | |
| 353 | 290 | ||
| 354 | - | func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call { | |
| 291 | + | func (_c *MockTagRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.Tag, error)) *MockTagRepository_GetAll_Call { | |
| 355 | 292 | _c.Call.Return(run) | |
| 356 | 293 | return _c | |
| 357 | 294 | } | |
| 358 | 295 | ||
| 359 | - | // GetForFavorite provides a mock function for the type MockTagRepository | |
| 360 | - | func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) { | |
| 361 | - | ret := _mock.Called(ctx, favID) | |
| 296 | + | // GetForFavorite provides a mock function with given fields: ctx, favID | |
| 297 | + | func (_m *MockTagRepository) GetForFavorite(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error) { | |
| 298 | + | ret := _m.Called(ctx, favID) | |
| 362 | 299 | ||
| 363 | 300 | if len(ret) == 0 { | |
| 364 | 301 | panic("no return value specified for GetForFavorite") | |
| @@ -366,21 +303,23 @@ func (_mock *MockTagRepository) GetForFavorite(ctx context.Context, favID entity | |||
| 366 | 303 | ||
| 367 | 304 | var r0 []*entity.Tag | |
| 368 | 305 | var r1 error | |
| 369 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok { | |
| 370 | - | return returnFunc(ctx, favID) | |
| 306 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)); ok { | |
| 307 | + | return rf(ctx, favID) | |
| 371 | 308 | } | |
| 372 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok { | |
| 373 | - | r0 = returnFunc(ctx, favID) | |
| 309 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.FavoriteID) []*entity.Tag); ok { | |
| 310 | + | r0 = rf(ctx, favID) | |
| 374 | 311 | } else { | |
| 375 | 312 | if ret.Get(0) != nil { | |
| 376 | 313 | r0 = ret.Get(0).([]*entity.Tag) | |
| 377 | 314 | } | |
| 378 | 315 | } | |
| 379 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { | |
| 380 | - | r1 = returnFunc(ctx, favID) | |
| 316 | + | ||
| 317 | + | if rf, ok := ret.Get(1).(func(context.Context, entity.FavoriteID) error); ok { | |
| 318 | + | r1 = rf(ctx, favID) | |
| 381 | 319 | } else { | |
| 382 | 320 | r1 = ret.Error(1) | |
| 383 | 321 | } | |
| 322 | + | ||
| 384 | 323 | return r0, r1 | |
| 385 | 324 | } | |
| 386 | 325 | ||
| @@ -398,46 +337,36 @@ func (_e *MockTagRepository_Expecter) GetForFavorite(ctx interface{}, favID inte | |||
| 398 | 337 | ||
| 399 | 338 | func (_c *MockTagRepository_GetForFavorite_Call) Run(run func(ctx context.Context, favID entity.FavoriteID)) *MockTagRepository_GetForFavorite_Call { | |
| 400 | 339 | _c.Call.Run(func(args mock.Arguments) { | |
| 401 | - | var arg0 context.Context | |
| 402 | - | if args[0] != nil { | |
| 403 | - | arg0 = args[0].(context.Context) | |
| 404 | - | } | |
| 405 | - | var arg1 entity.FavoriteID | |
| 406 | - | if args[1] != nil { | |
| 407 | - | arg1 = args[1].(entity.FavoriteID) | |
| 408 | - | } | |
| 409 | - | run( | |
| 410 | - | arg0, | |
| 411 | - | arg1, | |
| 412 | - | ) | |
| 340 | + | run(args[0].(context.Context), args[1].(entity.FavoriteID)) | |
| 413 | 341 | }) | |
| 414 | 342 | return _c | |
| 415 | 343 | } | |
| 416 | 344 | ||
| 417 | - | func (_c *MockTagRepository_GetForFavorite_Call) Return(tags []*entity.Tag, err error) *MockTagRepository_GetForFavorite_Call { | |
| 418 | - | _c.Call.Return(tags, err) | |
| 345 | + | func (_c *MockTagRepository_GetForFavorite_Call) Return(_a0 []*entity.Tag, _a1 error) *MockTagRepository_GetForFavorite_Call { | |
| 346 | + | _c.Call.Return(_a0, _a1) | |
| 419 | 347 | return _c | |
| 420 | 348 | } | |
| 421 | 349 | ||
| 422 | - | func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(ctx context.Context, favID entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call { | |
| 350 | + | func (_c *MockTagRepository_GetForFavorite_Call) RunAndReturn(run func(context.Context, entity.FavoriteID) ([]*entity.Tag, error)) *MockTagRepository_GetForFavorite_Call { | |
| 423 | 351 | _c.Call.Return(run) | |
| 424 | 352 | return _c | |
| 425 | 353 | } | |
| 426 | 354 | ||
| 427 | - | // RemoveFromFavorite provides a mock function for the type MockTagRepository | |
| 428 | - | func (_mock *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { | |
| 429 | - | ret := _mock.Called(ctx, tagID, favID) | |
| 355 | + | // RemoveFromFavorite provides a mock function with given fields: ctx, tagID, favID | |
| 356 | + | func (_m *MockTagRepository) RemoveFromFavorite(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error { | |
| 357 | + | ret := _m.Called(ctx, tagID, favID) | |
| 430 | 358 | ||
| 431 | 359 | if len(ret) == 0 { | |
| 432 | 360 | panic("no return value specified for RemoveFromFavorite") | |
| 433 | 361 | } | |
| 434 | 362 | ||
| 435 | 363 | var r0 error | |
| 436 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { | |
| 437 | - | r0 = returnFunc(ctx, tagID, favID) | |
| 364 | + | if rf, ok := ret.Get(0).(func(context.Context, entity.TagID, entity.FavoriteID) error); ok { | |
| 365 | + | r0 = rf(ctx, tagID, favID) | |
| 438 | 366 | } else { | |
| 439 | 367 | r0 = ret.Error(0) | |
| 440 | 368 | } | |
| 369 | + | ||
| 441 | 370 | return r0 | |
| 442 | 371 | } | |
| 443 | 372 | ||
| @@ -456,51 +385,36 @@ func (_e *MockTagRepository_Expecter) RemoveFromFavorite(ctx interface{}, tagID | |||
| 456 | 385 | ||
| 457 | 386 | func (_c *MockTagRepository_RemoveFromFavorite_Call) Run(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID)) *MockTagRepository_RemoveFromFavorite_Call { | |
| 458 | 387 | _c.Call.Run(func(args mock.Arguments) { | |
| 459 | - | var arg0 context.Context | |
| 460 | - | if args[0] != nil { | |
| 461 | - | arg0 = args[0].(context.Context) | |
| 462 | - | } | |
| 463 | - | var arg1 entity.TagID | |
| 464 | - | if args[1] != nil { | |
| 465 | - | arg1 = args[1].(entity.TagID) | |
| 466 | - | } | |
| 467 | - | var arg2 entity.FavoriteID | |
| 468 | - | if args[2] != nil { | |
| 469 | - | arg2 = args[2].(entity.FavoriteID) | |
| 470 | - | } | |
| 471 | - | run( | |
| 472 | - | arg0, | |
| 473 | - | arg1, | |
| 474 | - | arg2, | |
| 475 | - | ) | |
| 388 | + | run(args[0].(context.Context), args[1].(entity.TagID), args[2].(entity.FavoriteID)) | |
| 476 | 389 | }) | |
| 477 | 390 | return _c | |
| 478 | 391 | } | |
| 479 | 392 | ||
| 480 | - | func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(err error) *MockTagRepository_RemoveFromFavorite_Call { | |
| 481 | - | _c.Call.Return(err) | |
| 393 | + | func (_c *MockTagRepository_RemoveFromFavorite_Call) Return(_a0 error) *MockTagRepository_RemoveFromFavorite_Call { | |
| 394 | + | _c.Call.Return(_a0) | |
| 482 | 395 | return _c | |
| 483 | 396 | } | |
| 484 | 397 | ||
| 485 | - | func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(ctx context.Context, tagID entity.TagID, favID entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call { | |
| 398 | + | func (_c *MockTagRepository_RemoveFromFavorite_Call) RunAndReturn(run func(context.Context, entity.TagID, entity.FavoriteID) error) *MockTagRepository_RemoveFromFavorite_Call { | |
| 486 | 399 | _c.Call.Return(run) | |
| 487 | 400 | return _c | |
| 488 | 401 | } | |
| 489 | 402 | ||
| 490 | - | // Save provides a mock function for the type MockTagRepository | |
| 491 | - | func (_mock *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error { | |
| 492 | - | ret := _mock.Called(ctx, tag) | |
| 403 | + | // Save provides a mock function with given fields: ctx, tag | |
| 404 | + | func (_m *MockTagRepository) Save(ctx context.Context, tag *entity.Tag) error { | |
| 405 | + | ret := _m.Called(ctx, tag) | |
| 493 | 406 | ||
| 494 | 407 | if len(ret) == 0 { | |
| 495 | 408 | panic("no return value specified for Save") | |
| 496 | 409 | } | |
| 497 | 410 | ||
| 498 | 411 | var r0 error | |
| 499 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok { | |
| 500 | - | r0 = returnFunc(ctx, tag) | |
| 412 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.Tag) error); ok { | |
| 413 | + | r0 = rf(ctx, tag) | |
| 501 | 414 | } else { | |
| 502 | 415 | r0 = ret.Error(0) | |
| 503 | 416 | } | |
| 417 | + | ||
| 504 | 418 | return r0 | |
| 505 | 419 | } | |
| 506 | 420 | ||
| @@ -518,28 +432,31 @@ func (_e *MockTagRepository_Expecter) Save(ctx interface{}, tag interface{}) *Mo | |||
| 518 | 432 | ||
| 519 | 433 | func (_c *MockTagRepository_Save_Call) Run(run func(ctx context.Context, tag *entity.Tag)) *MockTagRepository_Save_Call { | |
| 520 | 434 | _c.Call.Run(func(args mock.Arguments) { | |
| 521 | - | var arg0 context.Context | |
| 522 | - | if args[0] != nil { | |
| 523 | - | arg0 = args[0].(context.Context) | |
| 524 | - | } | |
| 525 | - | var arg1 *entity.Tag | |
| 526 | - | if args[1] != nil { | |
| 527 | - | arg1 = args[1].(*entity.Tag) | |
| 528 | - | } | |
| 529 | - | run( | |
| 530 | - | arg0, | |
| 531 | - | arg1, | |
| 532 | - | ) | |
| 435 | + | run(args[0].(context.Context), args[1].(*entity.Tag)) | |
| 533 | 436 | }) | |
| 534 | 437 | return _c | |
| 535 | 438 | } | |
| 536 | 439 | ||
| 537 | - | func (_c *MockTagRepository_Save_Call) Return(err error) *MockTagRepository_Save_Call { | |
| 538 | - | _c.Call.Return(err) | |
| 440 | + | func (_c *MockTagRepository_Save_Call) Return(_a0 error) *MockTagRepository_Save_Call { | |
| 441 | + | _c.Call.Return(_a0) | |
| 539 | 442 | return _c | |
| 540 | 443 | } | |
| 541 | 444 | ||
| 542 | - | func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(ctx context.Context, tag *entity.Tag) error) *MockTagRepository_Save_Call { | |
| 445 | + | func (_c *MockTagRepository_Save_Call) RunAndReturn(run func(context.Context, *entity.Tag) error) *MockTagRepository_Save_Call { | |
| 543 | 446 | _c.Call.Return(run) | |
| 544 | 447 | return _c | |
| 545 | 448 | } | |
| 449 | + | ||
| 450 | + | // NewMockTagRepository creates a new instance of MockTagRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 451 | + | // The first argument is typically a *testing.T value. | |
| 452 | + | func NewMockTagRepository(t interface { | |
| 453 | + | mock.TestingT | |
| 454 | + | Cleanup(func()) | |
| 455 | + | }) *MockTagRepository { | |
| 456 | + | mock := &MockTagRepository{} | |
| 457 | + | mock.Mock.Test(t) | |
| 458 | + | ||
| 459 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 460 | + | ||
| 461 | + | return mock | |
| 462 | + | } | |
M internal/domain/repository/mocks/mock_zoom_repository.go +67 -102
| @@ -1,30 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "context" | |
| 6 | + | context "context" | |
| 9 | 7 | ||
| 10 | - | "github.com/bnema/dumber/internal/domain/entity" | |
| 8 | + | entity "github.com/bnema/dumber/internal/domain/entity" | |
| 11 | 9 | mock "github.com/stretchr/testify/mock" | |
| 12 | 10 | ) | |
| 13 | 11 | ||
| 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 | 12 | // MockZoomRepository is an autogenerated mock type for the ZoomRepository type | |
| 29 | 13 | type MockZoomRepository struct { | |
| 30 | 14 | mock.Mock | |
| @@ -38,20 +22,21 @@ func (_m *MockZoomRepository) EXPECT() *MockZoomRepository_Expecter { | |||
| 38 | 22 | return &MockZoomRepository_Expecter{mock: &_m.Mock} | |
| 39 | 23 | } | |
| 40 | 24 | ||
| 41 | - | // Delete provides a mock function for the type MockZoomRepository | |
| 42 | - | func (_mock *MockZoomRepository) Delete(ctx context.Context, domain string) error { | |
| 43 | - | ret := _mock.Called(ctx, domain) | |
| 25 | + | // Delete provides a mock function with given fields: ctx, domain | |
| 26 | + | func (_m *MockZoomRepository) Delete(ctx context.Context, domain string) error { | |
| 27 | + | ret := _m.Called(ctx, domain) | |
| 44 | 28 | ||
| 45 | 29 | if len(ret) == 0 { | |
| 46 | 30 | panic("no return value specified for Delete") | |
| 47 | 31 | } | |
| 48 | 32 | ||
| 49 | 33 | var r0 error | |
| 50 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 51 | - | r0 = returnFunc(ctx, domain) | |
| 34 | + | if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { | |
| 35 | + | r0 = rf(ctx, domain) | |
| 52 | 36 | } else { | |
| 53 | 37 | r0 = ret.Error(0) | |
| 54 | 38 | } | |
| 39 | + | ||
| 55 | 40 | return r0 | |
| 56 | 41 | } | |
| 57 | 42 | ||
| @@ -69,35 +54,24 @@ func (_e *MockZoomRepository_Expecter) Delete(ctx interface{}, domain interface{ | |||
| 69 | 54 | ||
| 70 | 55 | func (_c *MockZoomRepository_Delete_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Delete_Call { | |
| 71 | 56 | _c.Call.Run(func(args mock.Arguments) { | |
| 72 | - | var arg0 context.Context | |
| 73 | - | if args[0] != nil { | |
| 74 | - | arg0 = args[0].(context.Context) | |
| 75 | - | } | |
| 76 | - | var arg1 string | |
| 77 | - | if args[1] != nil { | |
| 78 | - | arg1 = args[1].(string) | |
| 79 | - | } | |
| 80 | - | run( | |
| 81 | - | arg0, | |
| 82 | - | arg1, | |
| 83 | - | ) | |
| 57 | + | run(args[0].(context.Context), args[1].(string)) | |
| 84 | 58 | }) | |
| 85 | 59 | return _c | |
| 86 | 60 | } | |
| 87 | 61 | ||
| 88 | - | func (_c *MockZoomRepository_Delete_Call) Return(err error) *MockZoomRepository_Delete_Call { | |
| 89 | - | _c.Call.Return(err) | |
| 62 | + | func (_c *MockZoomRepository_Delete_Call) Return(_a0 error) *MockZoomRepository_Delete_Call { | |
| 63 | + | _c.Call.Return(_a0) | |
| 90 | 64 | return _c | |
| 91 | 65 | } | |
| 92 | 66 | ||
| 93 | - | func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockZoomRepository_Delete_Call { | |
| 67 | + | func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(context.Context, string) error) *MockZoomRepository_Delete_Call { | |
| 94 | 68 | _c.Call.Return(run) | |
| 95 | 69 | return _c | |
| 96 | 70 | } | |
| 97 | 71 | ||
| 98 | - | // Get provides a mock function for the type MockZoomRepository | |
| 99 | - | func (_mock *MockZoomRepository) Get(ctx context.Context, domain string) (*entity.ZoomLevel, error) { | |
| 100 | - | ret := _mock.Called(ctx, domain) | |
| 72 | + | // Get provides a mock function with given fields: ctx, domain | |
| 73 | + | func (_m *MockZoomRepository) Get(ctx context.Context, domain string) (*entity.ZoomLevel, error) { | |
| 74 | + | ret := _m.Called(ctx, domain) | |
| 101 | 75 | ||
| 102 | 76 | if len(ret) == 0 { | |
| 103 | 77 | panic("no return value specified for Get") | |
| @@ -105,21 +79,23 @@ func (_mock *MockZoomRepository) Get(ctx context.Context, domain string) (*entit | |||
| 105 | 79 | ||
| 106 | 80 | var r0 *entity.ZoomLevel | |
| 107 | 81 | var r1 error | |
| 108 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok { | |
| 109 | - | return returnFunc(ctx, domain) | |
| 82 | + | if rf, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok { | |
| 83 | + | return rf(ctx, domain) | |
| 110 | 84 | } | |
| 111 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok { | |
| 112 | - | r0 = returnFunc(ctx, domain) | |
| 85 | + | if rf, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok { | |
| 86 | + | r0 = rf(ctx, domain) | |
| 113 | 87 | } else { | |
| 114 | 88 | if ret.Get(0) != nil { | |
| 115 | 89 | r0 = ret.Get(0).(*entity.ZoomLevel) | |
| 116 | 90 | } | |
| 117 | 91 | } | |
| 118 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 119 | - | r1 = returnFunc(ctx, domain) | |
| 92 | + | ||
| 93 | + | if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 94 | + | r1 = rf(ctx, domain) | |
| 120 | 95 | } else { | |
| 121 | 96 | r1 = ret.Error(1) | |
| 122 | 97 | } | |
| 98 | + | ||
| 123 | 99 | return r0, r1 | |
| 124 | 100 | } | |
| 125 | 101 | ||
| @@ -137,35 +113,24 @@ func (_e *MockZoomRepository_Expecter) Get(ctx interface{}, domain interface{}) | |||
| 137 | 113 | ||
| 138 | 114 | func (_c *MockZoomRepository_Get_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Get_Call { | |
| 139 | 115 | _c.Call.Run(func(args mock.Arguments) { | |
| 140 | - | var arg0 context.Context | |
| 141 | - | if args[0] != nil { | |
| 142 | - | arg0 = args[0].(context.Context) | |
| 143 | - | } | |
| 144 | - | var arg1 string | |
| 145 | - | if args[1] != nil { | |
| 146 | - | arg1 = args[1].(string) | |
| 147 | - | } | |
| 148 | - | run( | |
| 149 | - | arg0, | |
| 150 | - | arg1, | |
| 151 | - | ) | |
| 116 | + | run(args[0].(context.Context), args[1].(string)) | |
| 152 | 117 | }) | |
| 153 | 118 | return _c | |
| 154 | 119 | } | |
| 155 | 120 | ||
| 156 | - | func (_c *MockZoomRepository_Get_Call) Return(zoomLevel *entity.ZoomLevel, err error) *MockZoomRepository_Get_Call { | |
| 157 | - | _c.Call.Return(zoomLevel, err) | |
| 121 | + | func (_c *MockZoomRepository_Get_Call) Return(_a0 *entity.ZoomLevel, _a1 error) *MockZoomRepository_Get_Call { | |
| 122 | + | _c.Call.Return(_a0, _a1) | |
| 158 | 123 | return _c | |
| 159 | 124 | } | |
| 160 | 125 | ||
| 161 | - | func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call { | |
| 126 | + | func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(context.Context, string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call { | |
| 162 | 127 | _c.Call.Return(run) | |
| 163 | 128 | return _c | |
| 164 | 129 | } | |
| 165 | 130 | ||
| 166 | - | // GetAll provides a mock function for the type MockZoomRepository | |
| 167 | - | func (_mock *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLevel, error) { | |
| 168 | - | ret := _mock.Called(ctx) | |
| 131 | + | // GetAll provides a mock function with given fields: ctx | |
| 132 | + | func (_m *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLevel, error) { | |
| 133 | + | ret := _m.Called(ctx) | |
| 169 | 134 | ||
| 170 | 135 | if len(ret) == 0 { | |
| 171 | 136 | panic("no return value specified for GetAll") | |
| @@ -173,21 +138,23 @@ func (_mock *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLeve | |||
| 173 | 138 | ||
| 174 | 139 | var r0 []*entity.ZoomLevel | |
| 175 | 140 | var r1 error | |
| 176 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok { | |
| 177 | - | return returnFunc(ctx) | |
| 141 | + | if rf, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok { | |
| 142 | + | return rf(ctx) | |
| 178 | 143 | } | |
| 179 | - | if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok { | |
| 180 | - | r0 = returnFunc(ctx) | |
| 144 | + | if rf, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok { | |
| 145 | + | r0 = rf(ctx) | |
| 181 | 146 | } else { | |
| 182 | 147 | if ret.Get(0) != nil { | |
| 183 | 148 | r0 = ret.Get(0).([]*entity.ZoomLevel) | |
| 184 | 149 | } | |
| 185 | 150 | } | |
| 186 | - | if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 187 | - | r1 = returnFunc(ctx) | |
| 151 | + | ||
| 152 | + | if rf, ok := ret.Get(1).(func(context.Context) error); ok { | |
| 153 | + | r1 = rf(ctx) | |
| 188 | 154 | } else { | |
| 189 | 155 | r1 = ret.Error(1) | |
| 190 | 156 | } | |
| 157 | + | ||
| 191 | 158 | return r0, r1 | |
| 192 | 159 | } | |
| 193 | 160 | ||
| @@ -204,41 +171,36 @@ func (_e *MockZoomRepository_Expecter) GetAll(ctx interface{}) *MockZoomReposito | |||
| 204 | 171 | ||
| 205 | 172 | func (_c *MockZoomRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockZoomRepository_GetAll_Call { | |
| 206 | 173 | _c.Call.Run(func(args mock.Arguments) { | |
| 207 | - | var arg0 context.Context | |
| 208 | - | if args[0] != nil { | |
| 209 | - | arg0 = args[0].(context.Context) | |
| 210 | - | } | |
| 211 | - | run( | |
| 212 | - | arg0, | |
| 213 | - | ) | |
| 174 | + | run(args[0].(context.Context)) | |
| 214 | 175 | }) | |
| 215 | 176 | return _c | |
| 216 | 177 | } | |
| 217 | 178 | ||
| 218 | - | func (_c *MockZoomRepository_GetAll_Call) Return(zoomLevels []*entity.ZoomLevel, err error) *MockZoomRepository_GetAll_Call { | |
| 219 | - | _c.Call.Return(zoomLevels, err) | |
| 179 | + | func (_c *MockZoomRepository_GetAll_Call) Return(_a0 []*entity.ZoomLevel, _a1 error) *MockZoomRepository_GetAll_Call { | |
| 180 | + | _c.Call.Return(_a0, _a1) | |
| 220 | 181 | return _c | |
| 221 | 182 | } | |
| 222 | 183 | ||
| 223 | - | func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call { | |
| 184 | + | func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call { | |
| 224 | 185 | _c.Call.Return(run) | |
| 225 | 186 | return _c | |
| 226 | 187 | } | |
| 227 | 188 | ||
| 228 | - | // Set provides a mock function for the type MockZoomRepository | |
| 229 | - | func (_mock *MockZoomRepository) Set(ctx context.Context, level *entity.ZoomLevel) error { | |
| 230 | - | ret := _mock.Called(ctx, level) | |
| 189 | + | // Set provides a mock function with given fields: ctx, level | |
| 190 | + | func (_m *MockZoomRepository) Set(ctx context.Context, level *entity.ZoomLevel) error { | |
| 191 | + | ret := _m.Called(ctx, level) | |
| 231 | 192 | ||
| 232 | 193 | if len(ret) == 0 { | |
| 233 | 194 | panic("no return value specified for Set") | |
| 234 | 195 | } | |
| 235 | 196 | ||
| 236 | 197 | var r0 error | |
| 237 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok { | |
| 238 | - | r0 = returnFunc(ctx, level) | |
| 198 | + | if rf, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok { | |
| 199 | + | r0 = rf(ctx, level) | |
| 239 | 200 | } else { | |
| 240 | 201 | r0 = ret.Error(0) | |
| 241 | 202 | } | |
| 203 | + | ||
| 242 | 204 | return r0 | |
| 243 | 205 | } | |
| 244 | 206 | ||
| @@ -256,28 +218,31 @@ func (_e *MockZoomRepository_Expecter) Set(ctx interface{}, level interface{}) * | |||
| 256 | 218 | ||
| 257 | 219 | func (_c *MockZoomRepository_Set_Call) Run(run func(ctx context.Context, level *entity.ZoomLevel)) *MockZoomRepository_Set_Call { | |
| 258 | 220 | _c.Call.Run(func(args mock.Arguments) { | |
| 259 | - | var arg0 context.Context | |
| 260 | - | if args[0] != nil { | |
| 261 | - | arg0 = args[0].(context.Context) | |
| 262 | - | } | |
| 263 | - | var arg1 *entity.ZoomLevel | |
| 264 | - | if args[1] != nil { | |
| 265 | - | arg1 = args[1].(*entity.ZoomLevel) | |
| 266 | - | } | |
| 267 | - | run( | |
| 268 | - | arg0, | |
| 269 | - | arg1, | |
| 270 | - | ) | |
| 221 | + | run(args[0].(context.Context), args[1].(*entity.ZoomLevel)) | |
| 271 | 222 | }) | |
| 272 | 223 | return _c | |
| 273 | 224 | } | |
| 274 | 225 | ||
| 275 | - | func (_c *MockZoomRepository_Set_Call) Return(err error) *MockZoomRepository_Set_Call { | |
| 276 | - | _c.Call.Return(err) | |
| 226 | + | func (_c *MockZoomRepository_Set_Call) Return(_a0 error) *MockZoomRepository_Set_Call { | |
| 227 | + | _c.Call.Return(_a0) | |
| 277 | 228 | return _c | |
| 278 | 229 | } | |
| 279 | 230 | ||
| 280 | - | func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(ctx context.Context, level *entity.ZoomLevel) error) *MockZoomRepository_Set_Call { | |
| 231 | + | func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(context.Context, *entity.ZoomLevel) error) *MockZoomRepository_Set_Call { | |
| 281 | 232 | _c.Call.Return(run) | |
| 282 | 233 | return _c | |
| 283 | 234 | } | |
| 235 | + | ||
| 236 | + | // NewMockZoomRepository creates a new instance of MockZoomRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 237 | + | // The first argument is typically a *testing.T value. | |
| 238 | + | func NewMockZoomRepository(t interface { | |
| 239 | + | mock.TestingT | |
| 240 | + | Cleanup(func()) | |
| 241 | + | }) *MockZoomRepository { | |
| 242 | + | mock := &MockZoomRepository{} | |
| 243 | + | mock.Mock.Test(t) | |
| 244 | + | ||
| 245 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 246 | + | ||
| 247 | + | return mock | |
| 248 | + | } | |
M internal/ui/layout/mocks/mock_box_widget.go +254 -409
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockBoxWidget creates a new instance of MockBoxWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockBoxWidget(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockBoxWidget { | |
| 19 | - | mock := &MockBoxWidget{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockBoxWidget is an autogenerated mock type for the BoxWidget type | |
| 28 | 13 | type MockBoxWidget struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,10 +22,9 @@ func (_m *MockBoxWidget) EXPECT() *MockBoxWidget_Expecter { | |||
| 37 | 22 | return &MockBoxWidget_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // AddController provides a mock function for the type MockBoxWidget | |
| 41 | - | func (_mock *MockBoxWidget) AddController(controller *gtk.EventController) { | |
| 42 | - | _mock.Called(controller) | |
| 43 | - | return | |
| 25 | + | // AddController provides a mock function with given fields: controller | |
| 26 | + | func (_m *MockBoxWidget) AddController(controller *gtk.EventController) { | |
| 27 | + | _m.Called(controller) | |
| 44 | 28 | } | |
| 45 | 29 | ||
| 46 | 30 | // MockBoxWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController' | |
| @@ -56,13 +40,7 @@ func (_e *MockBoxWidget_Expecter) AddController(controller interface{}) *MockBox | |||
| 56 | 40 | ||
| 57 | 41 | func (_c *MockBoxWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockBoxWidget_AddController_Call { | |
| 58 | 42 | _c.Call.Run(func(args mock.Arguments) { | |
| 59 | - | var arg0 *gtk.EventController | |
| 60 | - | if args[0] != nil { | |
| 61 | - | arg0 = args[0].(*gtk.EventController) | |
| 62 | - | } | |
| 63 | - | run( | |
| 64 | - | arg0, | |
| 65 | - | ) | |
| 43 | + | run(args[0].(*gtk.EventController)) | |
| 66 | 44 | }) | |
| 67 | 45 | return _c | |
| 68 | 46 | } | |
| @@ -72,15 +50,14 @@ func (_c *MockBoxWidget_AddController_Call) Return() *MockBoxWidget_AddControlle | |||
| 72 | 50 | return _c | |
| 73 | 51 | } | |
| 74 | 52 | ||
| 75 | - | func (_c *MockBoxWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockBoxWidget_AddController_Call { | |
| 53 | + | func (_c *MockBoxWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockBoxWidget_AddController_Call { | |
| 76 | 54 | _c.Run(run) | |
| 77 | 55 | return _c | |
| 78 | 56 | } | |
| 79 | 57 | ||
| 80 | - | // AddCssClass provides a mock function for the type MockBoxWidget | |
| 81 | - | func (_mock *MockBoxWidget) AddCssClass(cssClass string) { | |
| 82 | - | _mock.Called(cssClass) | |
| 83 | - | return | |
| 58 | + | // AddCssClass provides a mock function with given fields: cssClass | |
| 59 | + | func (_m *MockBoxWidget) AddCssClass(cssClass string) { | |
| 60 | + | _m.Called(cssClass) | |
| 84 | 61 | } | |
| 85 | 62 | ||
| 86 | 63 | // MockBoxWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass' | |
| @@ -96,13 +73,7 @@ func (_e *MockBoxWidget_Expecter) AddCssClass(cssClass interface{}) *MockBoxWidg | |||
| 96 | 73 | ||
| 97 | 74 | func (_c *MockBoxWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockBoxWidget_AddCssClass_Call { | |
| 98 | 75 | _c.Call.Run(func(args mock.Arguments) { | |
| 99 | - | var arg0 string | |
| 100 | - | if args[0] != nil { | |
| 101 | - | arg0 = args[0].(string) | |
| 102 | - | } | |
| 103 | - | run( | |
| 104 | - | arg0, | |
| 105 | - | ) | |
| 76 | + | run(args[0].(string)) | |
| 106 | 77 | }) | |
| 107 | 78 | return _c | |
| 108 | 79 | } | |
| @@ -112,15 +83,14 @@ func (_c *MockBoxWidget_AddCssClass_Call) Return() *MockBoxWidget_AddCssClass_Ca | |||
| 112 | 83 | return _c | |
| 113 | 84 | } | |
| 114 | 85 | ||
| 115 | - | func (_c *MockBoxWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockBoxWidget_AddCssClass_Call { | |
| 86 | + | func (_c *MockBoxWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockBoxWidget_AddCssClass_Call { | |
| 116 | 87 | _c.Run(run) | |
| 117 | 88 | return _c | |
| 118 | 89 | } | |
| 119 | 90 | ||
| 120 | - | // Append provides a mock function for the type MockBoxWidget | |
| 121 | - | func (_mock *MockBoxWidget) Append(child layout.Widget) { | |
| 122 | - | _mock.Called(child) | |
| 123 | - | return | |
| 91 | + | // Append provides a mock function with given fields: child | |
| 92 | + | func (_m *MockBoxWidget) Append(child layout.Widget) { | |
| 93 | + | _m.Called(child) | |
| 124 | 94 | } | |
| 125 | 95 | ||
| 126 | 96 | // MockBoxWidget_Append_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Append' | |
| @@ -136,13 +106,7 @@ func (_e *MockBoxWidget_Expecter) Append(child interface{}) *MockBoxWidget_Appen | |||
| 136 | 106 | ||
| 137 | 107 | func (_c *MockBoxWidget_Append_Call) Run(run func(child layout.Widget)) *MockBoxWidget_Append_Call { | |
| 138 | 108 | _c.Call.Run(func(args mock.Arguments) { | |
| 139 | - | var arg0 layout.Widget | |
| 140 | - | if args[0] != nil { | |
| 141 | - | arg0 = args[0].(layout.Widget) | |
| 142 | - | } | |
| 143 | - | run( | |
| 144 | - | arg0, | |
| 145 | - | ) | |
| 109 | + | run(args[0].(layout.Widget)) | |
| 146 | 110 | }) | |
| 147 | 111 | return _c | |
| 148 | 112 | } | |
| @@ -152,14 +116,14 @@ func (_c *MockBoxWidget_Append_Call) Return() *MockBoxWidget_Append_Call { | |||
| 152 | 116 | return _c | |
| 153 | 117 | } | |
| 154 | 118 | ||
| 155 | - | func (_c *MockBoxWidget_Append_Call) RunAndReturn(run func(child layout.Widget)) *MockBoxWidget_Append_Call { | |
| 119 | + | func (_c *MockBoxWidget_Append_Call) RunAndReturn(run func(layout.Widget)) *MockBoxWidget_Append_Call { | |
| 156 | 120 | _c.Run(run) | |
| 157 | 121 | return _c | |
| 158 | 122 | } | |
| 159 | 123 | ||
| 160 | - | // ComputePoint provides a mock function for the type MockBoxWidget | |
| 161 | - | func (_mock *MockBoxWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 162 | - | ret := _mock.Called(target) | |
| 124 | + | // ComputePoint provides a mock function with given fields: target | |
| 125 | + | func (_m *MockBoxWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 126 | + | ret := _m.Called(target) | |
| 163 | 127 | ||
| 164 | 128 | if len(ret) == 0 { | |
| 165 | 129 | panic("no return value specified for ComputePoint") | |
| @@ -168,24 +132,27 @@ func (_mock *MockBoxWidget) ComputePoint(target layout.Widget) (float64, float64 | |||
| 168 | 132 | var r0 float64 | |
| 169 | 133 | var r1 float64 | |
| 170 | 134 | var r2 bool | |
| 171 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 172 | - | return returnFunc(target) | |
| 135 | + | if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 136 | + | return rf(target) | |
| 173 | 137 | } | |
| 174 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 175 | - | r0 = returnFunc(target) | |
| 138 | + | if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 139 | + | r0 = rf(target) | |
| 176 | 140 | } else { | |
| 177 | 141 | r0 = ret.Get(0).(float64) | |
| 178 | 142 | } | |
| 179 | - | if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 180 | - | r1 = returnFunc(target) | |
| 143 | + | ||
| 144 | + | if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 145 | + | r1 = rf(target) | |
| 181 | 146 | } else { | |
| 182 | 147 | r1 = ret.Get(1).(float64) | |
| 183 | 148 | } | |
| 184 | - | if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 185 | - | r2 = returnFunc(target) | |
| 149 | + | ||
| 150 | + | if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 151 | + | r2 = rf(target) | |
| 186 | 152 | } else { | |
| 187 | 153 | r2 = ret.Get(2).(bool) | |
| 188 | 154 | } | |
| 155 | + | ||
| 189 | 156 | return r0, r1, r2 | |
| 190 | 157 | } | |
| 191 | 158 | ||
| @@ -202,13 +169,7 @@ func (_e *MockBoxWidget_Expecter) ComputePoint(target interface{}) *MockBoxWidge | |||
| 202 | 169 | ||
| 203 | 170 | func (_c *MockBoxWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockBoxWidget_ComputePoint_Call { | |
| 204 | 171 | _c.Call.Run(func(args mock.Arguments) { | |
| 205 | - | var arg0 layout.Widget | |
| 206 | - | if args[0] != nil { | |
| 207 | - | arg0 = args[0].(layout.Widget) | |
| 208 | - | } | |
| 209 | - | run( | |
| 210 | - | arg0, | |
| 211 | - | ) | |
| 172 | + | run(args[0].(layout.Widget)) | |
| 212 | 173 | }) | |
| 213 | 174 | return _c | |
| 214 | 175 | } | |
| @@ -218,25 +179,26 @@ func (_c *MockBoxWidget_ComputePoint_Call) Return(x float64, y float64, ok bool) | |||
| 218 | 179 | return _c | |
| 219 | 180 | } | |
| 220 | 181 | ||
| 221 | - | func (_c *MockBoxWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockBoxWidget_ComputePoint_Call { | |
| 182 | + | func (_c *MockBoxWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockBoxWidget_ComputePoint_Call { | |
| 222 | 183 | _c.Call.Return(run) | |
| 223 | 184 | return _c | |
| 224 | 185 | } | |
| 225 | 186 | ||
| 226 | - | // GetAllocatedHeight provides a mock function for the type MockBoxWidget | |
| 227 | - | func (_mock *MockBoxWidget) GetAllocatedHeight() int { | |
| 228 | - | ret := _mock.Called() | |
| 187 | + | // GetAllocatedHeight provides a mock function with no fields | |
| 188 | + | func (_m *MockBoxWidget) GetAllocatedHeight() int { | |
| 189 | + | ret := _m.Called() | |
| 229 | 190 | ||
| 230 | 191 | if len(ret) == 0 { | |
| 231 | 192 | panic("no return value specified for GetAllocatedHeight") | |
| 232 | 193 | } | |
| 233 | 194 | ||
| 234 | 195 | var r0 int | |
| 235 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 236 | - | r0 = returnFunc() | |
| 196 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 197 | + | r0 = rf() | |
| 237 | 198 | } else { | |
| 238 | 199 | r0 = ret.Get(0).(int) | |
| 239 | 200 | } | |
| 201 | + | ||
| 240 | 202 | return r0 | |
| 241 | 203 | } | |
| 242 | 204 | ||
| @@ -257,8 +219,8 @@ func (_c *MockBoxWidget_GetAllocatedHeight_Call) Run(run func()) *MockBoxWidget_ | |||
| 257 | 219 | return _c | |
| 258 | 220 | } | |
| 259 | 221 | ||
| 260 | - | func (_c *MockBoxWidget_GetAllocatedHeight_Call) Return(n int) *MockBoxWidget_GetAllocatedHeight_Call { | |
| 261 | - | _c.Call.Return(n) | |
| 222 | + | func (_c *MockBoxWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockBoxWidget_GetAllocatedHeight_Call { | |
| 223 | + | _c.Call.Return(_a0) | |
| 262 | 224 | return _c | |
| 263 | 225 | } | |
| 264 | 226 | ||
| @@ -267,20 +229,21 @@ func (_c *MockBoxWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) *M | |||
| 267 | 229 | return _c | |
| 268 | 230 | } | |
| 269 | 231 | ||
| 270 | - | // GetAllocatedWidth provides a mock function for the type MockBoxWidget | |
| 271 | - | func (_mock *MockBoxWidget) GetAllocatedWidth() int { | |
| 272 | - | ret := _mock.Called() | |
| 232 | + | // GetAllocatedWidth provides a mock function with no fields | |
| 233 | + | func (_m *MockBoxWidget) GetAllocatedWidth() int { | |
| 234 | + | ret := _m.Called() | |
| 273 | 235 | ||
| 274 | 236 | if len(ret) == 0 { | |
| 275 | 237 | panic("no return value specified for GetAllocatedWidth") | |
| 276 | 238 | } | |
| 277 | 239 | ||
| 278 | 240 | var r0 int | |
| 279 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 280 | - | r0 = returnFunc() | |
| 241 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 242 | + | r0 = rf() | |
| 281 | 243 | } else { | |
| 282 | 244 | r0 = ret.Get(0).(int) | |
| 283 | 245 | } | |
| 246 | + | ||
| 284 | 247 | return r0 | |
| 285 | 248 | } | |
| 286 | 249 | ||
| @@ -301,8 +264,8 @@ func (_c *MockBoxWidget_GetAllocatedWidth_Call) Run(run func()) *MockBoxWidget_G | |||
| 301 | 264 | return _c | |
| 302 | 265 | } | |
| 303 | 266 | ||
| 304 | - | func (_c *MockBoxWidget_GetAllocatedWidth_Call) Return(n int) *MockBoxWidget_GetAllocatedWidth_Call { | |
| 305 | - | _c.Call.Return(n) | |
| 267 | + | func (_c *MockBoxWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockBoxWidget_GetAllocatedWidth_Call { | |
| 268 | + | _c.Call.Return(_a0) | |
| 306 | 269 | return _c | |
| 307 | 270 | } | |
| 308 | 271 | ||
| @@ -311,20 +274,21 @@ func (_c *MockBoxWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) *Mo | |||
| 311 | 274 | return _c | |
| 312 | 275 | } | |
| 313 | 276 | ||
| 314 | - | // GetHexpand provides a mock function for the type MockBoxWidget | |
| 315 | - | func (_mock *MockBoxWidget) GetHexpand() bool { | |
| 316 | - | ret := _mock.Called() | |
| 277 | + | // GetHexpand provides a mock function with no fields | |
| 278 | + | func (_m *MockBoxWidget) GetHexpand() bool { | |
| 279 | + | ret := _m.Called() | |
| 317 | 280 | ||
| 318 | 281 | if len(ret) == 0 { | |
| 319 | 282 | panic("no return value specified for GetHexpand") | |
| 320 | 283 | } | |
| 321 | 284 | ||
| 322 | 285 | var r0 bool | |
| 323 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 324 | - | r0 = returnFunc() | |
| 286 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 287 | + | r0 = rf() | |
| 325 | 288 | } else { | |
| 326 | 289 | r0 = ret.Get(0).(bool) | |
| 327 | 290 | } | |
| 291 | + | ||
| 328 | 292 | return r0 | |
| 329 | 293 | } | |
| 330 | 294 | ||
| @@ -345,8 +309,8 @@ func (_c *MockBoxWidget_GetHexpand_Call) Run(run func()) *MockBoxWidget_GetHexpa | |||
| 345 | 309 | return _c | |
| 346 | 310 | } | |
| 347 | 311 | ||
| 348 | - | func (_c *MockBoxWidget_GetHexpand_Call) Return(b bool) *MockBoxWidget_GetHexpand_Call { | |
| 349 | - | _c.Call.Return(b) | |
| 312 | + | func (_c *MockBoxWidget_GetHexpand_Call) Return(_a0 bool) *MockBoxWidget_GetHexpand_Call { | |
| 313 | + | _c.Call.Return(_a0) | |
| 350 | 314 | return _c | |
| 351 | 315 | } | |
| 352 | 316 | ||
| @@ -355,20 +319,21 @@ func (_c *MockBoxWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockBoxW | |||
| 355 | 319 | return _c | |
| 356 | 320 | } | |
| 357 | 321 | ||
| 358 | - | // GetHomogeneous provides a mock function for the type MockBoxWidget | |
| 359 | - | func (_mock *MockBoxWidget) GetHomogeneous() bool { | |
| 360 | - | ret := _mock.Called() | |
| 322 | + | // GetHomogeneous provides a mock function with no fields | |
| 323 | + | func (_m *MockBoxWidget) GetHomogeneous() bool { | |
| 324 | + | ret := _m.Called() | |
| 361 | 325 | ||
| 362 | 326 | if len(ret) == 0 { | |
| 363 | 327 | panic("no return value specified for GetHomogeneous") | |
| 364 | 328 | } | |
| 365 | 329 | ||
| 366 | 330 | var r0 bool | |
| 367 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 368 | - | r0 = returnFunc() | |
| 331 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 332 | + | r0 = rf() | |
| 369 | 333 | } else { | |
| 370 | 334 | r0 = ret.Get(0).(bool) | |
| 371 | 335 | } | |
| 336 | + | ||
| 372 | 337 | return r0 | |
| 373 | 338 | } | |
| 374 | 339 | ||
| @@ -389,8 +354,8 @@ func (_c *MockBoxWidget_GetHomogeneous_Call) Run(run func()) *MockBoxWidget_GetH | |||
| 389 | 354 | return _c | |
| 390 | 355 | } | |
| 391 | 356 | ||
| 392 | - | func (_c *MockBoxWidget_GetHomogeneous_Call) Return(b bool) *MockBoxWidget_GetHomogeneous_Call { | |
| 393 | - | _c.Call.Return(b) | |
| 357 | + | func (_c *MockBoxWidget_GetHomogeneous_Call) Return(_a0 bool) *MockBoxWidget_GetHomogeneous_Call { | |
| 358 | + | _c.Call.Return(_a0) | |
| 394 | 359 | return _c | |
| 395 | 360 | } | |
| 396 | 361 | ||
| @@ -399,20 +364,21 @@ func (_c *MockBoxWidget_GetHomogeneous_Call) RunAndReturn(run func() bool) *Mock | |||
| 399 | 364 | return _c | |
| 400 | 365 | } | |
| 401 | 366 | ||
| 402 | - | // GetOrientation provides a mock function for the type MockBoxWidget | |
| 403 | - | func (_mock *MockBoxWidget) GetOrientation() layout.Orientation { | |
| 404 | - | ret := _mock.Called() | |
| 367 | + | // GetOrientation provides a mock function with no fields | |
| 368 | + | func (_m *MockBoxWidget) GetOrientation() gtk.Orientation { | |
| 369 | + | ret := _m.Called() | |
| 405 | 370 | ||
| 406 | 371 | if len(ret) == 0 { | |
| 407 | 372 | panic("no return value specified for GetOrientation") | |
| 408 | 373 | } | |
| 409 | 374 | ||
| 410 | - | var r0 layout.Orientation | |
| 411 | - | if returnFunc, ok := ret.Get(0).(func() layout.Orientation); ok { | |
| 412 | - | r0 = returnFunc() | |
| 375 | + | var r0 gtk.Orientation | |
| 376 | + | if rf, ok := ret.Get(0).(func() gtk.Orientation); ok { | |
| 377 | + | r0 = rf() | |
| 413 | 378 | } else { | |
| 414 | - | r0 = ret.Get(0).(layout.Orientation) | |
| 379 | + | r0 = ret.Get(0).(gtk.Orientation) | |
| 415 | 380 | } | |
| 381 | + | ||
| 416 | 382 | return r0 | |
| 417 | 383 | } | |
| 418 | 384 | ||
| @@ -433,32 +399,33 @@ func (_c *MockBoxWidget_GetOrientation_Call) Run(run func()) *MockBoxWidget_GetO | |||
| 433 | 399 | return _c | |
| 434 | 400 | } | |
| 435 | 401 | ||
| 436 | - | func (_c *MockBoxWidget_GetOrientation_Call) Return(v layout.Orientation) *MockBoxWidget_GetOrientation_Call { | |
| 437 | - | _c.Call.Return(v) | |
| 402 | + | func (_c *MockBoxWidget_GetOrientation_Call) Return(_a0 gtk.Orientation) *MockBoxWidget_GetOrientation_Call { | |
| 403 | + | _c.Call.Return(_a0) | |
| 438 | 404 | return _c | |
| 439 | 405 | } | |
| 440 | 406 | ||
| 441 | - | func (_c *MockBoxWidget_GetOrientation_Call) RunAndReturn(run func() layout.Orientation) *MockBoxWidget_GetOrientation_Call { | |
| 407 | + | func (_c *MockBoxWidget_GetOrientation_Call) RunAndReturn(run func() gtk.Orientation) *MockBoxWidget_GetOrientation_Call { | |
| 442 | 408 | _c.Call.Return(run) | |
| 443 | 409 | return _c | |
| 444 | 410 | } | |
| 445 | 411 | ||
| 446 | - | // GetParent provides a mock function for the type MockBoxWidget | |
| 447 | - | func (_mock *MockBoxWidget) GetParent() layout.Widget { | |
| 448 | - | ret := _mock.Called() | |
| 412 | + | // GetParent provides a mock function with no fields | |
| 413 | + | func (_m *MockBoxWidget) GetParent() layout.Widget { | |
| 414 | + | ret := _m.Called() | |
| 449 | 415 | ||
| 450 | 416 | if len(ret) == 0 { | |
| 451 | 417 | panic("no return value specified for GetParent") | |
| 452 | 418 | } | |
| 453 | 419 | ||
| 454 | 420 | var r0 layout.Widget | |
| 455 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 456 | - | r0 = returnFunc() | |
| 421 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 422 | + | r0 = rf() | |
| 457 | 423 | } else { | |
| 458 | 424 | if ret.Get(0) != nil { | |
| 459 | 425 | r0 = ret.Get(0).(layout.Widget) | |
| 460 | 426 | } | |
| 461 | 427 | } | |
| 428 | + | ||
| 462 | 429 | return r0 | |
| 463 | 430 | } | |
| 464 | 431 | ||
| @@ -479,8 +446,8 @@ func (_c *MockBoxWidget_GetParent_Call) Run(run func()) *MockBoxWidget_GetParent | |||
| 479 | 446 | return _c | |
| 480 | 447 | } | |
| 481 | 448 | ||
| 482 | - | func (_c *MockBoxWidget_GetParent_Call) Return(widget layout.Widget) *MockBoxWidget_GetParent_Call { | |
| 483 | - | _c.Call.Return(widget) | |
| 449 | + | func (_c *MockBoxWidget_GetParent_Call) Return(_a0 layout.Widget) *MockBoxWidget_GetParent_Call { | |
| 450 | + | _c.Call.Return(_a0) | |
| 484 | 451 | return _c | |
| 485 | 452 | } | |
| 486 | 453 | ||
| @@ -489,20 +456,21 @@ func (_c *MockBoxWidget_GetParent_Call) RunAndReturn(run func() layout.Widget) * | |||
| 489 | 456 | return _c | |
| 490 | 457 | } | |
| 491 | 458 | ||
| 492 | - | // GetSpacing provides a mock function for the type MockBoxWidget | |
| 493 | - | func (_mock *MockBoxWidget) GetSpacing() int { | |
| 494 | - | ret := _mock.Called() | |
| 459 | + | // GetSpacing provides a mock function with no fields | |
| 460 | + | func (_m *MockBoxWidget) GetSpacing() int { | |
| 461 | + | ret := _m.Called() | |
| 495 | 462 | ||
| 496 | 463 | if len(ret) == 0 { | |
| 497 | 464 | panic("no return value specified for GetSpacing") | |
| 498 | 465 | } | |
| 499 | 466 | ||
| 500 | 467 | var r0 int | |
| 501 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 502 | - | r0 = returnFunc() | |
| 468 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 469 | + | r0 = rf() | |
| 503 | 470 | } else { | |
| 504 | 471 | r0 = ret.Get(0).(int) | |
| 505 | 472 | } | |
| 473 | + | ||
| 506 | 474 | return r0 | |
| 507 | 475 | } | |
| 508 | 476 | ||
| @@ -523,8 +491,8 @@ func (_c *MockBoxWidget_GetSpacing_Call) Run(run func()) *MockBoxWidget_GetSpaci | |||
| 523 | 491 | return _c | |
| 524 | 492 | } | |
| 525 | 493 | ||
| 526 | - | func (_c *MockBoxWidget_GetSpacing_Call) Return(n int) *MockBoxWidget_GetSpacing_Call { | |
| 527 | - | _c.Call.Return(n) | |
| 494 | + | func (_c *MockBoxWidget_GetSpacing_Call) Return(_a0 int) *MockBoxWidget_GetSpacing_Call { | |
| 495 | + | _c.Call.Return(_a0) | |
| 528 | 496 | return _c | |
| 529 | 497 | } | |
| 530 | 498 | ||
| @@ -533,20 +501,21 @@ func (_c *MockBoxWidget_GetSpacing_Call) RunAndReturn(run func() int) *MockBoxWi | |||
| 533 | 501 | return _c | |
| 534 | 502 | } | |
| 535 | 503 | ||
| 536 | - | // GetVexpand provides a mock function for the type MockBoxWidget | |
| 537 | - | func (_mock *MockBoxWidget) GetVexpand() bool { | |
| 538 | - | ret := _mock.Called() | |
| 504 | + | // GetVexpand provides a mock function with no fields | |
| 505 | + | func (_m *MockBoxWidget) GetVexpand() bool { | |
| 506 | + | ret := _m.Called() | |
| 539 | 507 | ||
| 540 | 508 | if len(ret) == 0 { | |
| 541 | 509 | panic("no return value specified for GetVexpand") | |
| 542 | 510 | } | |
| 543 | 511 | ||
| 544 | 512 | var r0 bool | |
| 545 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 546 | - | r0 = returnFunc() | |
| 513 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 514 | + | r0 = rf() | |
| 547 | 515 | } else { | |
| 548 | 516 | r0 = ret.Get(0).(bool) | |
| 549 | 517 | } | |
| 518 | + | ||
| 550 | 519 | return r0 | |
| 551 | 520 | } | |
| 552 | 521 | ||
| @@ -567,8 +536,8 @@ func (_c *MockBoxWidget_GetVexpand_Call) Run(run func()) *MockBoxWidget_GetVexpa | |||
| 567 | 536 | return _c | |
| 568 | 537 | } | |
| 569 | 538 | ||
| 570 | - | func (_c *MockBoxWidget_GetVexpand_Call) Return(b bool) *MockBoxWidget_GetVexpand_Call { | |
| 571 | - | _c.Call.Return(b) | |
| 539 | + | func (_c *MockBoxWidget_GetVexpand_Call) Return(_a0 bool) *MockBoxWidget_GetVexpand_Call { | |
| 540 | + | _c.Call.Return(_a0) | |
| 572 | 541 | return _c | |
| 573 | 542 | } | |
| 574 | 543 | ||
| @@ -577,20 +546,21 @@ func (_c *MockBoxWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockBoxW | |||
| 577 | 546 | return _c | |
| 578 | 547 | } | |
| 579 | 548 | ||
| 580 | - | // GrabFocus provides a mock function for the type MockBoxWidget | |
| 581 | - | func (_mock *MockBoxWidget) GrabFocus() bool { | |
| 582 | - | ret := _mock.Called() | |
| 549 | + | // GrabFocus provides a mock function with no fields | |
| 550 | + | func (_m *MockBoxWidget) GrabFocus() bool { | |
| 551 | + | ret := _m.Called() | |
| 583 | 552 | ||
| 584 | 553 | if len(ret) == 0 { | |
| 585 | 554 | panic("no return value specified for GrabFocus") | |
| 586 | 555 | } | |
| 587 | 556 | ||
| 588 | 557 | var r0 bool | |
| 589 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 590 | - | r0 = returnFunc() | |
| 558 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 559 | + | r0 = rf() | |
| 591 | 560 | } else { | |
| 592 | 561 | r0 = ret.Get(0).(bool) | |
| 593 | 562 | } | |
| 563 | + | ||
| 594 | 564 | return r0 | |
| 595 | 565 | } | |
| 596 | 566 | ||
| @@ -611,8 +581,8 @@ func (_c *MockBoxWidget_GrabFocus_Call) Run(run func()) *MockBoxWidget_GrabFocus | |||
| 611 | 581 | return _c | |
| 612 | 582 | } | |
| 613 | 583 | ||
| 614 | - | func (_c *MockBoxWidget_GrabFocus_Call) Return(b bool) *MockBoxWidget_GrabFocus_Call { | |
| 615 | - | _c.Call.Return(b) | |
| 584 | + | func (_c *MockBoxWidget_GrabFocus_Call) Return(_a0 bool) *MockBoxWidget_GrabFocus_Call { | |
| 585 | + | _c.Call.Return(_a0) | |
| 616 | 586 | return _c | |
| 617 | 587 | } | |
| 618 | 588 | ||
| @@ -621,22 +591,23 @@ func (_c *MockBoxWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockBoxWi | |||
| 621 | 591 | return _c | |
| 622 | 592 | } | |
| 623 | 593 | ||
| 624 | - | // GtkWidget provides a mock function for the type MockBoxWidget | |
| 625 | - | func (_mock *MockBoxWidget) GtkWidget() *gtk.Widget { | |
| 626 | - | ret := _mock.Called() | |
| 594 | + | // GtkWidget provides a mock function with no fields | |
| 595 | + | func (_m *MockBoxWidget) GtkWidget() *gtk.Widget { | |
| 596 | + | ret := _m.Called() | |
| 627 | 597 | ||
| 628 | 598 | if len(ret) == 0 { | |
| 629 | 599 | panic("no return value specified for GtkWidget") | |
| 630 | 600 | } | |
| 631 | 601 | ||
| 632 | 602 | var r0 *gtk.Widget | |
| 633 | - | if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 634 | - | r0 = returnFunc() | |
| 603 | + | if rf, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 604 | + | r0 = rf() | |
| 635 | 605 | } else { | |
| 636 | 606 | if ret.Get(0) != nil { | |
| 637 | 607 | r0 = ret.Get(0).(*gtk.Widget) | |
| 638 | 608 | } | |
| 639 | 609 | } | |
| 610 | + | ||
| 640 | 611 | return r0 | |
| 641 | 612 | } | |
| 642 | 613 | ||
| @@ -657,8 +628,8 @@ func (_c *MockBoxWidget_GtkWidget_Call) Run(run func()) *MockBoxWidget_GtkWidget | |||
| 657 | 628 | return _c | |
| 658 | 629 | } | |
| 659 | 630 | ||
| 660 | - | func (_c *MockBoxWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockBoxWidget_GtkWidget_Call { | |
| 661 | - | _c.Call.Return(widget) | |
| 631 | + | func (_c *MockBoxWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockBoxWidget_GtkWidget_Call { | |
| 632 | + | _c.Call.Return(_a0) | |
| 662 | 633 | return _c | |
| 663 | 634 | } | |
| 664 | 635 | ||
| @@ -667,20 +638,21 @@ func (_c *MockBoxWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) *Mo | |||
| 667 | 638 | return _c | |
| 668 | 639 | } | |
| 669 | 640 | ||
| 670 | - | // HasCssClass provides a mock function for the type MockBoxWidget | |
| 671 | - | func (_mock *MockBoxWidget) HasCssClass(cssClass string) bool { | |
| 672 | - | ret := _mock.Called(cssClass) | |
| 641 | + | // HasCssClass provides a mock function with given fields: cssClass | |
| 642 | + | func (_m *MockBoxWidget) HasCssClass(cssClass string) bool { | |
| 643 | + | ret := _m.Called(cssClass) | |
| 673 | 644 | ||
| 674 | 645 | if len(ret) == 0 { | |
| 675 | 646 | panic("no return value specified for HasCssClass") | |
| 676 | 647 | } | |
| 677 | 648 | ||
| 678 | 649 | var r0 bool | |
| 679 | - | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |
| 680 | - | r0 = returnFunc(cssClass) | |
| 650 | + | if rf, ok := ret.Get(0).(func(string) bool); ok { | |
| 651 | + | r0 = rf(cssClass) | |
| 681 | 652 | } else { | |
| 682 | 653 | r0 = ret.Get(0).(bool) | |
| 683 | 654 | } | |
| 655 | + | ||
| 684 | 656 | return r0 | |
| 685 | 657 | } | |
| 686 | 658 | ||
| @@ -697,41 +669,36 @@ func (_e *MockBoxWidget_Expecter) HasCssClass(cssClass interface{}) *MockBoxWidg | |||
| 697 | 669 | ||
| 698 | 670 | func (_c *MockBoxWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockBoxWidget_HasCssClass_Call { | |
| 699 | 671 | _c.Call.Run(func(args mock.Arguments) { | |
| 700 | - | var arg0 string | |
| 701 | - | if args[0] != nil { | |
| 702 | - | arg0 = args[0].(string) | |
| 703 | - | } | |
| 704 | - | run( | |
| 705 | - | arg0, | |
| 706 | - | ) | |
| 672 | + | run(args[0].(string)) | |
| 707 | 673 | }) | |
| 708 | 674 | return _c | |
| 709 | 675 | } | |
| 710 | 676 | ||
| 711 | - | func (_c *MockBoxWidget_HasCssClass_Call) Return(b bool) *MockBoxWidget_HasCssClass_Call { | |
| 712 | - | _c.Call.Return(b) | |
| 677 | + | func (_c *MockBoxWidget_HasCssClass_Call) Return(_a0 bool) *MockBoxWidget_HasCssClass_Call { | |
| 678 | + | _c.Call.Return(_a0) | |
| 713 | 679 | return _c | |
| 714 | 680 | } | |
| 715 | 681 | ||
| 716 | - | func (_c *MockBoxWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockBoxWidget_HasCssClass_Call { | |
| 682 | + | func (_c *MockBoxWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockBoxWidget_HasCssClass_Call { | |
| 717 | 683 | _c.Call.Return(run) | |
| 718 | 684 | return _c | |
| 719 | 685 | } | |
| 720 | 686 | ||
| 721 | - | // HasFocus provides a mock function for the type MockBoxWidget | |
| 722 | - | func (_mock *MockBoxWidget) HasFocus() bool { | |
| 723 | - | ret := _mock.Called() | |
| 687 | + | // HasFocus provides a mock function with no fields | |
| 688 | + | func (_m *MockBoxWidget) HasFocus() bool { | |
| 689 | + | ret := _m.Called() | |
| 724 | 690 | ||
| 725 | 691 | if len(ret) == 0 { | |
| 726 | 692 | panic("no return value specified for HasFocus") | |
| 727 | 693 | } | |
| 728 | 694 | ||
| 729 | 695 | var r0 bool | |
| 730 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 731 | - | r0 = returnFunc() | |
| 696 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 697 | + | r0 = rf() | |
| 732 | 698 | } else { | |
| 733 | 699 | r0 = ret.Get(0).(bool) | |
| 734 | 700 | } | |
| 701 | + | ||
| 735 | 702 | return r0 | |
| 736 | 703 | } | |
| 737 | 704 | ||
| @@ -752,8 +719,8 @@ func (_c *MockBoxWidget_HasFocus_Call) Run(run func()) *MockBoxWidget_HasFocus_C | |||
| 752 | 719 | return _c | |
| 753 | 720 | } | |
| 754 | 721 | ||
| 755 | - | func (_c *MockBoxWidget_HasFocus_Call) Return(b bool) *MockBoxWidget_HasFocus_Call { | |
| 756 | - | _c.Call.Return(b) | |
| 722 | + | func (_c *MockBoxWidget_HasFocus_Call) Return(_a0 bool) *MockBoxWidget_HasFocus_Call { | |
| 723 | + | _c.Call.Return(_a0) | |
| 757 | 724 | return _c | |
| 758 | 725 | } | |
| 759 | 726 | ||
| @@ -762,10 +729,9 @@ func (_c *MockBoxWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockBoxWid | |||
| 762 | 729 | return _c | |
| 763 | 730 | } | |
| 764 | 731 | ||
| 765 | - | // Hide provides a mock function for the type MockBoxWidget | |
| 766 | - | func (_mock *MockBoxWidget) Hide() { | |
| 767 | - | _mock.Called() | |
| 768 | - | return | |
| 732 | + | // Hide provides a mock function with no fields | |
| 733 | + | func (_m *MockBoxWidget) Hide() { | |
| 734 | + | _m.Called() | |
| 769 | 735 | } | |
| 770 | 736 | ||
| 771 | 737 | // MockBoxWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |
| @@ -795,10 +761,9 @@ func (_c *MockBoxWidget_Hide_Call) RunAndReturn(run func()) *MockBoxWidget_Hide_ | |||
| 795 | 761 | return _c | |
| 796 | 762 | } | |
| 797 | 763 | ||
| 798 | - | // InsertChildAfter provides a mock function for the type MockBoxWidget | |
| 799 | - | func (_mock *MockBoxWidget) InsertChildAfter(child layout.Widget, sibling layout.Widget) { | |
| 800 | - | _mock.Called(child, sibling) | |
| 801 | - | return | |
| 764 | + | // InsertChildAfter provides a mock function with given fields: child, sibling | |
| 765 | + | func (_m *MockBoxWidget) InsertChildAfter(child layout.Widget, sibling layout.Widget) { | |
| 766 | + | _m.Called(child, sibling) | |
| 802 | 767 | } | |
| 803 | 768 | ||
| 804 | 769 | // MockBoxWidget_InsertChildAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertChildAfter' | |
| @@ -815,18 +780,7 @@ func (_e *MockBoxWidget_Expecter) InsertChildAfter(child interface{}, sibling in | |||
| 815 | 780 | ||
| 816 | 781 | func (_c *MockBoxWidget_InsertChildAfter_Call) Run(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_InsertChildAfter_Call { | |
| 817 | 782 | _c.Call.Run(func(args mock.Arguments) { | |
| 818 | - | var arg0 layout.Widget | |
| 819 | - | if args[0] != nil { | |
| 820 | - | arg0 = args[0].(layout.Widget) | |
| 821 | - | } | |
| 822 | - | var arg1 layout.Widget | |
| 823 | - | if args[1] != nil { | |
| 824 | - | arg1 = args[1].(layout.Widget) | |
| 825 | - | } | |
| 826 | - | run( | |
| 827 | - | arg0, | |
| 828 | - | arg1, | |
| 829 | - | ) | |
| 783 | + | run(args[0].(layout.Widget), args[1].(layout.Widget)) | |
| 830 | 784 | }) | |
| 831 | 785 | return _c | |
| 832 | 786 | } | |
| @@ -836,25 +790,26 @@ func (_c *MockBoxWidget_InsertChildAfter_Call) Return() *MockBoxWidget_InsertChi | |||
| 836 | 790 | return _c | |
| 837 | 791 | } | |
| 838 | 792 | ||
| 839 | - | func (_c *MockBoxWidget_InsertChildAfter_Call) RunAndReturn(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_InsertChildAfter_Call { | |
| 793 | + | func (_c *MockBoxWidget_InsertChildAfter_Call) RunAndReturn(run func(layout.Widget, layout.Widget)) *MockBoxWidget_InsertChildAfter_Call { | |
| 840 | 794 | _c.Run(run) | |
| 841 | 795 | return _c | |
| 842 | 796 | } | |
| 843 | 797 | ||
| 844 | - | // IsVisible provides a mock function for the type MockBoxWidget | |
| 845 | - | func (_mock *MockBoxWidget) IsVisible() bool { | |
| 846 | - | ret := _mock.Called() | |
| 798 | + | // IsVisible provides a mock function with no fields | |
| 799 | + | func (_m *MockBoxWidget) IsVisible() bool { | |
| 800 | + | ret := _m.Called() | |
| 847 | 801 | ||
| 848 | 802 | if len(ret) == 0 { | |
| 849 | 803 | panic("no return value specified for IsVisible") | |
| 850 | 804 | } | |
| 851 | 805 | ||
| 852 | 806 | var r0 bool | |
| 853 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 854 | - | r0 = returnFunc() | |
| 807 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 808 | + | r0 = rf() | |
| 855 | 809 | } else { | |
| 856 | 810 | r0 = ret.Get(0).(bool) | |
| 857 | 811 | } | |
| 812 | + | ||
| 858 | 813 | return r0 | |
| 859 | 814 | } | |
| 860 | 815 | ||
| @@ -875,8 +830,8 @@ func (_c *MockBoxWidget_IsVisible_Call) Run(run func()) *MockBoxWidget_IsVisible | |||
| 875 | 830 | return _c | |
| 876 | 831 | } | |
| 877 | 832 | ||
| 878 | - | func (_c *MockBoxWidget_IsVisible_Call) Return(b bool) *MockBoxWidget_IsVisible_Call { | |
| 879 | - | _c.Call.Return(b) | |
| 833 | + | func (_c *MockBoxWidget_IsVisible_Call) Return(_a0 bool) *MockBoxWidget_IsVisible_Call { | |
| 834 | + | _c.Call.Return(_a0) | |
| 880 | 835 | return _c | |
| 881 | 836 | } | |
| 882 | 837 | ||
| @@ -885,10 +840,9 @@ func (_c *MockBoxWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockBoxWi | |||
| 885 | 840 | return _c | |
| 886 | 841 | } | |
| 887 | 842 | ||
| 888 | - | // Prepend provides a mock function for the type MockBoxWidget | |
| 889 | - | func (_mock *MockBoxWidget) Prepend(child layout.Widget) { | |
| 890 | - | _mock.Called(child) | |
| 891 | - | return | |
| 843 | + | // Prepend provides a mock function with given fields: child | |
| 844 | + | func (_m *MockBoxWidget) Prepend(child layout.Widget) { | |
| 845 | + | _m.Called(child) | |
| 892 | 846 | } | |
| 893 | 847 | ||
| 894 | 848 | // MockBoxWidget_Prepend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prepend' | |
| @@ -904,13 +858,7 @@ func (_e *MockBoxWidget_Expecter) Prepend(child interface{}) *MockBoxWidget_Prep | |||
| 904 | 858 | ||
| 905 | 859 | func (_c *MockBoxWidget_Prepend_Call) Run(run func(child layout.Widget)) *MockBoxWidget_Prepend_Call { | |
| 906 | 860 | _c.Call.Run(func(args mock.Arguments) { | |
| 907 | - | var arg0 layout.Widget | |
| 908 | - | if args[0] != nil { | |
| 909 | - | arg0 = args[0].(layout.Widget) | |
| 910 | - | } | |
| 911 | - | run( | |
| 912 | - | arg0, | |
| 913 | - | ) | |
| 861 | + | run(args[0].(layout.Widget)) | |
| 914 | 862 | }) | |
| 915 | 863 | return _c | |
| 916 | 864 | } | |
| @@ -920,15 +868,14 @@ func (_c *MockBoxWidget_Prepend_Call) Return() *MockBoxWidget_Prepend_Call { | |||
| 920 | 868 | return _c | |
| 921 | 869 | } | |
| 922 | 870 | ||
| 923 | - | func (_c *MockBoxWidget_Prepend_Call) RunAndReturn(run func(child layout.Widget)) *MockBoxWidget_Prepend_Call { | |
| 871 | + | func (_c *MockBoxWidget_Prepend_Call) RunAndReturn(run func(layout.Widget)) *MockBoxWidget_Prepend_Call { | |
| 924 | 872 | _c.Run(run) | |
| 925 | 873 | return _c | |
| 926 | 874 | } | |
| 927 | 875 | ||
| 928 | - | // Remove provides a mock function for the type MockBoxWidget | |
| 929 | - | func (_mock *MockBoxWidget) Remove(child layout.Widget) { | |
| 930 | - | _mock.Called(child) | |
| 931 | - | return | |
| 876 | + | // Remove provides a mock function with given fields: child | |
| 877 | + | func (_m *MockBoxWidget) Remove(child layout.Widget) { | |
| 878 | + | _m.Called(child) | |
| 932 | 879 | } | |
| 933 | 880 | ||
| 934 | 881 | // MockBoxWidget_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' | |
| @@ -944,13 +891,7 @@ func (_e *MockBoxWidget_Expecter) Remove(child interface{}) *MockBoxWidget_Remov | |||
| 944 | 891 | ||
| 945 | 892 | func (_c *MockBoxWidget_Remove_Call) Run(run func(child layout.Widget)) *MockBoxWidget_Remove_Call { | |
| 946 | 893 | _c.Call.Run(func(args mock.Arguments) { | |
| 947 | - | var arg0 layout.Widget | |
| 948 | - | if args[0] != nil { | |
| 949 | - | arg0 = args[0].(layout.Widget) | |
| 950 | - | } | |
| 951 | - | run( | |
| 952 | - | arg0, | |
| 953 | - | ) | |
| 894 | + | run(args[0].(layout.Widget)) | |
| 954 | 895 | }) | |
| 955 | 896 | return _c | |
| 956 | 897 | } | |
| @@ -960,15 +901,14 @@ func (_c *MockBoxWidget_Remove_Call) Return() *MockBoxWidget_Remove_Call { | |||
| 960 | 901 | return _c | |
| 961 | 902 | } | |
| 962 | 903 | ||
| 963 | - | func (_c *MockBoxWidget_Remove_Call) RunAndReturn(run func(child layout.Widget)) *MockBoxWidget_Remove_Call { | |
| 904 | + | func (_c *MockBoxWidget_Remove_Call) RunAndReturn(run func(layout.Widget)) *MockBoxWidget_Remove_Call { | |
| 964 | 905 | _c.Run(run) | |
| 965 | 906 | return _c | |
| 966 | 907 | } | |
| 967 | 908 | ||
| 968 | - | // RemoveCssClass provides a mock function for the type MockBoxWidget | |
| 969 | - | func (_mock *MockBoxWidget) RemoveCssClass(cssClass string) { | |
| 970 | - | _mock.Called(cssClass) | |
| 971 | - | return | |
| 909 | + | // RemoveCssClass provides a mock function with given fields: cssClass | |
| 910 | + | func (_m *MockBoxWidget) RemoveCssClass(cssClass string) { | |
| 911 | + | _m.Called(cssClass) | |
| 972 | 912 | } | |
| 973 | 913 | ||
| 974 | 914 | // MockBoxWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass' | |
| @@ -984,13 +924,7 @@ func (_e *MockBoxWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockBoxW | |||
| 984 | 924 | ||
| 985 | 925 | func (_c *MockBoxWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockBoxWidget_RemoveCssClass_Call { | |
| 986 | 926 | _c.Call.Run(func(args mock.Arguments) { | |
| 987 | - | var arg0 string | |
| 988 | - | if args[0] != nil { | |
| 989 | - | arg0 = args[0].(string) | |
| 990 | - | } | |
| 991 | - | run( | |
| 992 | - | arg0, | |
| 993 | - | ) | |
| 927 | + | run(args[0].(string)) | |
| 994 | 928 | }) | |
| 995 | 929 | return _c | |
| 996 | 930 | } | |
| @@ -1000,15 +934,14 @@ func (_c *MockBoxWidget_RemoveCssClass_Call) Return() *MockBoxWidget_RemoveCssCl | |||
| 1000 | 934 | return _c | |
| 1001 | 935 | } | |
| 1002 | 936 | ||
| 1003 | - | func (_c *MockBoxWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockBoxWidget_RemoveCssClass_Call { | |
| 937 | + | func (_c *MockBoxWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockBoxWidget_RemoveCssClass_Call { | |
| 1004 | 938 | _c.Run(run) | |
| 1005 | 939 | return _c | |
| 1006 | 940 | } | |
| 1007 | 941 | ||
| 1008 | - | // ReorderChildAfter provides a mock function for the type MockBoxWidget | |
| 1009 | - | func (_mock *MockBoxWidget) ReorderChildAfter(child layout.Widget, sibling layout.Widget) { | |
| 1010 | - | _mock.Called(child, sibling) | |
| 1011 | - | return | |
| 942 | + | // ReorderChildAfter provides a mock function with given fields: child, sibling | |
| 943 | + | func (_m *MockBoxWidget) ReorderChildAfter(child layout.Widget, sibling layout.Widget) { | |
| 944 | + | _m.Called(child, sibling) | |
| 1012 | 945 | } | |
| 1013 | 946 | ||
| 1014 | 947 | // MockBoxWidget_ReorderChildAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReorderChildAfter' | |
| @@ -1025,18 +958,7 @@ func (_e *MockBoxWidget_Expecter) ReorderChildAfter(child interface{}, sibling i | |||
| 1025 | 958 | ||
| 1026 | 959 | func (_c *MockBoxWidget_ReorderChildAfter_Call) Run(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_ReorderChildAfter_Call { | |
| 1027 | 960 | _c.Call.Run(func(args mock.Arguments) { | |
| 1028 | - | var arg0 layout.Widget | |
| 1029 | - | if args[0] != nil { | |
| 1030 | - | arg0 = args[0].(layout.Widget) | |
| 1031 | - | } | |
| 1032 | - | var arg1 layout.Widget | |
| 1033 | - | if args[1] != nil { | |
| 1034 | - | arg1 = args[1].(layout.Widget) | |
| 1035 | - | } | |
| 1036 | - | run( | |
| 1037 | - | arg0, | |
| 1038 | - | arg1, | |
| 1039 | - | ) | |
| 961 | + | run(args[0].(layout.Widget), args[1].(layout.Widget)) | |
| 1040 | 962 | }) | |
| 1041 | 963 | return _c | |
| 1042 | 964 | } | |
| @@ -1046,15 +968,14 @@ func (_c *MockBoxWidget_ReorderChildAfter_Call) Return() *MockBoxWidget_ReorderC | |||
| 1046 | 968 | return _c | |
| 1047 | 969 | } | |
| 1048 | 970 | ||
| 1049 | - | func (_c *MockBoxWidget_ReorderChildAfter_Call) RunAndReturn(run func(child layout.Widget, sibling layout.Widget)) *MockBoxWidget_ReorderChildAfter_Call { | |
| 971 | + | func (_c *MockBoxWidget_ReorderChildAfter_Call) RunAndReturn(run func(layout.Widget, layout.Widget)) *MockBoxWidget_ReorderChildAfter_Call { | |
| 1050 | 972 | _c.Run(run) | |
| 1051 | 973 | return _c | |
| 1052 | 974 | } | |
| 1053 | 975 | ||
| 1054 | - | // SetCanFocus provides a mock function for the type MockBoxWidget | |
| 1055 | - | func (_mock *MockBoxWidget) SetCanFocus(canFocus bool) { | |
| 1056 | - | _mock.Called(canFocus) | |
| 1057 | - | return | |
| 976 | + | // SetCanFocus provides a mock function with given fields: canFocus | |
| 977 | + | func (_m *MockBoxWidget) SetCanFocus(canFocus bool) { | |
| 978 | + | _m.Called(canFocus) | |
| 1058 | 979 | } | |
| 1059 | 980 | ||
| 1060 | 981 | // MockBoxWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus' | |
| @@ -1070,13 +991,7 @@ func (_e *MockBoxWidget_Expecter) SetCanFocus(canFocus interface{}) *MockBoxWidg | |||
| 1070 | 991 | ||
| 1071 | 992 | func (_c *MockBoxWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockBoxWidget_SetCanFocus_Call { | |
| 1072 | 993 | _c.Call.Run(func(args mock.Arguments) { | |
| 1073 | - | var arg0 bool | |
| 1074 | - | if args[0] != nil { | |
| 1075 | - | arg0 = args[0].(bool) | |
| 1076 | - | } | |
| 1077 | - | run( | |
| 1078 | - | arg0, | |
| 1079 | - | ) | |
| 994 | + | run(args[0].(bool)) | |
| 1080 | 995 | }) | |
| 1081 | 996 | return _c | |
| 1082 | 997 | } | |
| @@ -1086,15 +1001,14 @@ func (_c *MockBoxWidget_SetCanFocus_Call) Return() *MockBoxWidget_SetCanFocus_Ca | |||
| 1086 | 1001 | return _c | |
| 1087 | 1002 | } | |
| 1088 | 1003 | ||
| 1089 | - | func (_c *MockBoxWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockBoxWidget_SetCanFocus_Call { | |
| 1004 | + | func (_c *MockBoxWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetCanFocus_Call { | |
| 1090 | 1005 | _c.Run(run) | |
| 1091 | 1006 | return _c | |
| 1092 | 1007 | } | |
| 1093 | 1008 | ||
| 1094 | - | // SetCanTarget provides a mock function for the type MockBoxWidget | |
| 1095 | - | func (_mock *MockBoxWidget) SetCanTarget(canTarget bool) { | |
| 1096 | - | _mock.Called(canTarget) | |
| 1097 | - | return | |
| 1009 | + | // SetCanTarget provides a mock function with given fields: canTarget | |
| 1010 | + | func (_m *MockBoxWidget) SetCanTarget(canTarget bool) { | |
| 1011 | + | _m.Called(canTarget) | |
| 1098 | 1012 | } | |
| 1099 | 1013 | ||
| 1100 | 1014 | // MockBoxWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget' | |
| @@ -1110,13 +1024,7 @@ func (_e *MockBoxWidget_Expecter) SetCanTarget(canTarget interface{}) *MockBoxWi | |||
| 1110 | 1024 | ||
| 1111 | 1025 | func (_c *MockBoxWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockBoxWidget_SetCanTarget_Call { | |
| 1112 | 1026 | _c.Call.Run(func(args mock.Arguments) { | |
| 1113 | - | var arg0 bool | |
| 1114 | - | if args[0] != nil { | |
| 1115 | - | arg0 = args[0].(bool) | |
| 1116 | - | } | |
| 1117 | - | run( | |
| 1118 | - | arg0, | |
| 1119 | - | ) | |
| 1027 | + | run(args[0].(bool)) | |
| 1120 | 1028 | }) | |
| 1121 | 1029 | return _c | |
| 1122 | 1030 | } | |
| @@ -1126,15 +1034,14 @@ func (_c *MockBoxWidget_SetCanTarget_Call) Return() *MockBoxWidget_SetCanTarget_ | |||
| 1126 | 1034 | return _c | |
| 1127 | 1035 | } | |
| 1128 | 1036 | ||
| 1129 | - | func (_c *MockBoxWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockBoxWidget_SetCanTarget_Call { | |
| 1037 | + | func (_c *MockBoxWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetCanTarget_Call { | |
| 1130 | 1038 | _c.Run(run) | |
| 1131 | 1039 | return _c | |
| 1132 | 1040 | } | |
| 1133 | 1041 | ||
| 1134 | - | // SetFocusOnClick provides a mock function for the type MockBoxWidget | |
| 1135 | - | func (_mock *MockBoxWidget) SetFocusOnClick(focusOnClick bool) { | |
| 1136 | - | _mock.Called(focusOnClick) | |
| 1137 | - | return | |
| 1042 | + | // SetFocusOnClick provides a mock function with given fields: focusOnClick | |
| 1043 | + | func (_m *MockBoxWidget) SetFocusOnClick(focusOnClick bool) { | |
| 1044 | + | _m.Called(focusOnClick) | |
| 1138 | 1045 | } | |
| 1139 | 1046 | ||
| 1140 | 1047 | // MockBoxWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick' | |
| @@ -1150,13 +1057,7 @@ func (_e *MockBoxWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *Moc | |||
| 1150 | 1057 | ||
| 1151 | 1058 | func (_c *MockBoxWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockBoxWidget_SetFocusOnClick_Call { | |
| 1152 | 1059 | _c.Call.Run(func(args mock.Arguments) { | |
| 1153 | - | var arg0 bool | |
| 1154 | - | if args[0] != nil { | |
| 1155 | - | arg0 = args[0].(bool) | |
| 1156 | - | } | |
| 1157 | - | run( | |
| 1158 | - | arg0, | |
| 1159 | - | ) | |
| 1060 | + | run(args[0].(bool)) | |
| 1160 | 1061 | }) | |
| 1161 | 1062 | return _c | |
| 1162 | 1063 | } | |
| @@ -1166,15 +1067,14 @@ func (_c *MockBoxWidget_SetFocusOnClick_Call) Return() *MockBoxWidget_SetFocusOn | |||
| 1166 | 1067 | return _c | |
| 1167 | 1068 | } | |
| 1168 | 1069 | ||
| 1169 | - | func (_c *MockBoxWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockBoxWidget_SetFocusOnClick_Call { | |
| 1070 | + | func (_c *MockBoxWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetFocusOnClick_Call { | |
| 1170 | 1071 | _c.Run(run) | |
| 1171 | 1072 | return _c | |
| 1172 | 1073 | } | |
| 1173 | 1074 | ||
| 1174 | - | // SetHalign provides a mock function for the type MockBoxWidget | |
| 1175 | - | func (_mock *MockBoxWidget) SetHalign(align gtk.Align) { | |
| 1176 | - | _mock.Called(align) | |
| 1177 | - | return | |
| 1075 | + | // SetHalign provides a mock function with given fields: align | |
| 1076 | + | func (_m *MockBoxWidget) SetHalign(align gtk.Align) { | |
| 1077 | + | _m.Called(align) | |
| 1178 | 1078 | } | |
| 1179 | 1079 | ||
| 1180 | 1080 | // MockBoxWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign' | |
| @@ -1190,13 +1090,7 @@ func (_e *MockBoxWidget_Expecter) SetHalign(align interface{}) *MockBoxWidget_Se | |||
| 1190 | 1090 | ||
| 1191 | 1091 | func (_c *MockBoxWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockBoxWidget_SetHalign_Call { | |
| 1192 | 1092 | _c.Call.Run(func(args mock.Arguments) { | |
| 1193 | - | var arg0 gtk.Align | |
| 1194 | - | if args[0] != nil { | |
| 1195 | - | arg0 = args[0].(gtk.Align) | |
| 1196 | - | } | |
| 1197 | - | run( | |
| 1198 | - | arg0, | |
| 1199 | - | ) | |
| 1093 | + | run(args[0].(gtk.Align)) | |
| 1200 | 1094 | }) | |
| 1201 | 1095 | return _c | |
| 1202 | 1096 | } | |
| @@ -1206,15 +1100,14 @@ func (_c *MockBoxWidget_SetHalign_Call) Return() *MockBoxWidget_SetHalign_Call { | |||
| 1206 | 1100 | return _c | |
| 1207 | 1101 | } | |
| 1208 | 1102 | ||
| 1209 | - | func (_c *MockBoxWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockBoxWidget_SetHalign_Call { | |
| 1103 | + | func (_c *MockBoxWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockBoxWidget_SetHalign_Call { | |
| 1210 | 1104 | _c.Run(run) | |
| 1211 | 1105 | return _c | |
| 1212 | 1106 | } | |
| 1213 | 1107 | ||
| 1214 | - | // SetHexpand provides a mock function for the type MockBoxWidget | |
| 1215 | - | func (_mock *MockBoxWidget) SetHexpand(expand bool) { | |
| 1216 | - | _mock.Called(expand) | |
| 1217 | - | return | |
| 1108 | + | // SetHexpand provides a mock function with given fields: expand | |
| 1109 | + | func (_m *MockBoxWidget) SetHexpand(expand bool) { | |
| 1110 | + | _m.Called(expand) | |
| 1218 | 1111 | } | |
| 1219 | 1112 | ||
| 1220 | 1113 | // MockBoxWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand' | |
| @@ -1230,13 +1123,7 @@ func (_e *MockBoxWidget_Expecter) SetHexpand(expand interface{}) *MockBoxWidget_ | |||
| 1230 | 1123 | ||
| 1231 | 1124 | func (_c *MockBoxWidget_SetHexpand_Call) Run(run func(expand bool)) *MockBoxWidget_SetHexpand_Call { | |
| 1232 | 1125 | _c.Call.Run(func(args mock.Arguments) { | |
| 1233 | - | var arg0 bool | |
| 1234 | - | if args[0] != nil { | |
| 1235 | - | arg0 = args[0].(bool) | |
| 1236 | - | } | |
| 1237 | - | run( | |
| 1238 | - | arg0, | |
| 1239 | - | ) | |
| 1126 | + | run(args[0].(bool)) | |
| 1240 | 1127 | }) | |
| 1241 | 1128 | return _c | |
| 1242 | 1129 | } | |
| @@ -1246,15 +1133,14 @@ func (_c *MockBoxWidget_SetHexpand_Call) Return() *MockBoxWidget_SetHexpand_Call | |||
| 1246 | 1133 | return _c | |
| 1247 | 1134 | } | |
| 1248 | 1135 | ||
| 1249 | - | func (_c *MockBoxWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockBoxWidget_SetHexpand_Call { | |
| 1136 | + | func (_c *MockBoxWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetHexpand_Call { | |
| 1250 | 1137 | _c.Run(run) | |
| 1251 | 1138 | return _c | |
| 1252 | 1139 | } | |
| 1253 | 1140 | ||
| 1254 | - | // SetHomogeneous provides a mock function for the type MockBoxWidget | |
| 1255 | - | func (_mock *MockBoxWidget) SetHomogeneous(homogeneous bool) { | |
| 1256 | - | _mock.Called(homogeneous) | |
| 1257 | - | return | |
| 1141 | + | // SetHomogeneous provides a mock function with given fields: homogeneous | |
| 1142 | + | func (_m *MockBoxWidget) SetHomogeneous(homogeneous bool) { | |
| 1143 | + | _m.Called(homogeneous) | |
| 1258 | 1144 | } | |
| 1259 | 1145 | ||
| 1260 | 1146 | // MockBoxWidget_SetHomogeneous_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHomogeneous' | |
| @@ -1270,13 +1156,7 @@ func (_e *MockBoxWidget_Expecter) SetHomogeneous(homogeneous interface{}) *MockB | |||
| 1270 | 1156 | ||
| 1271 | 1157 | func (_c *MockBoxWidget_SetHomogeneous_Call) Run(run func(homogeneous bool)) *MockBoxWidget_SetHomogeneous_Call { | |
| 1272 | 1158 | _c.Call.Run(func(args mock.Arguments) { | |
| 1273 | - | var arg0 bool | |
| 1274 | - | if args[0] != nil { | |
| 1275 | - | arg0 = args[0].(bool) | |
| 1276 | - | } | |
| 1277 | - | run( | |
| 1278 | - | arg0, | |
| 1279 | - | ) | |
| 1159 | + | run(args[0].(bool)) | |
| 1280 | 1160 | }) | |
| 1281 | 1161 | return _c | |
| 1282 | 1162 | } | |
| @@ -1286,15 +1166,14 @@ func (_c *MockBoxWidget_SetHomogeneous_Call) Return() *MockBoxWidget_SetHomogene | |||
| 1286 | 1166 | return _c | |
| 1287 | 1167 | } | |
| 1288 | 1168 | ||
| 1289 | - | func (_c *MockBoxWidget_SetHomogeneous_Call) RunAndReturn(run func(homogeneous bool)) *MockBoxWidget_SetHomogeneous_Call { | |
| 1169 | + | func (_c *MockBoxWidget_SetHomogeneous_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetHomogeneous_Call { | |
| 1290 | 1170 | _c.Run(run) | |
| 1291 | 1171 | return _c | |
| 1292 | 1172 | } | |
| 1293 | 1173 | ||
| 1294 | - | // SetOrientation provides a mock function for the type MockBoxWidget | |
| 1295 | - | func (_mock *MockBoxWidget) SetOrientation(orientation layout.Orientation) { | |
| 1296 | - | _mock.Called(orientation) | |
| 1297 | - | return | |
| 1174 | + | // SetOrientation provides a mock function with given fields: orientation | |
| 1175 | + | func (_m *MockBoxWidget) SetOrientation(orientation gtk.Orientation) { | |
| 1176 | + | _m.Called(orientation) | |
| 1298 | 1177 | } | |
| 1299 | 1178 | ||
| 1300 | 1179 | // MockBoxWidget_SetOrientation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetOrientation' | |
| @@ -1303,20 +1182,14 @@ type MockBoxWidget_SetOrientation_Call struct { | |||
| 1303 | 1182 | } | |
| 1304 | 1183 | ||
| 1305 | 1184 | // SetOrientation is a helper method to define mock.On call | |
| 1306 | - | // - orientation layout.Orientation | |
| 1185 | + | // - orientation gtk.Orientation | |
| 1307 | 1186 | func (_e *MockBoxWidget_Expecter) SetOrientation(orientation interface{}) *MockBoxWidget_SetOrientation_Call { | |
| 1308 | 1187 | return &MockBoxWidget_SetOrientation_Call{Call: _e.mock.On("SetOrientation", orientation)} | |
| 1309 | 1188 | } | |
| 1310 | 1189 | ||
| 1311 | - | func (_c *MockBoxWidget_SetOrientation_Call) Run(run func(orientation layout.Orientation)) *MockBoxWidget_SetOrientation_Call { | |
| 1190 | + | func (_c *MockBoxWidget_SetOrientation_Call) Run(run func(orientation gtk.Orientation)) *MockBoxWidget_SetOrientation_Call { | |
| 1312 | 1191 | _c.Call.Run(func(args mock.Arguments) { | |
| 1313 | - | var arg0 layout.Orientation | |
| 1314 | - | if args[0] != nil { | |
| 1315 | - | arg0 = args[0].(layout.Orientation) | |
| 1316 | - | } | |
| 1317 | - | run( | |
| 1318 | - | arg0, | |
| 1319 | - | ) | |
| 1192 | + | run(args[0].(gtk.Orientation)) | |
| 1320 | 1193 | }) | |
| 1321 | 1194 | return _c | |
| 1322 | 1195 | } | |
| @@ -1326,15 +1199,14 @@ func (_c *MockBoxWidget_SetOrientation_Call) Return() *MockBoxWidget_SetOrientat | |||
| 1326 | 1199 | return _c | |
| 1327 | 1200 | } | |
| 1328 | 1201 | ||
| 1329 | - | func (_c *MockBoxWidget_SetOrientation_Call) RunAndReturn(run func(orientation layout.Orientation)) *MockBoxWidget_SetOrientation_Call { | |
| 1202 | + | func (_c *MockBoxWidget_SetOrientation_Call) RunAndReturn(run func(gtk.Orientation)) *MockBoxWidget_SetOrientation_Call { | |
| 1330 | 1203 | _c.Run(run) | |
| 1331 | 1204 | return _c | |
| 1332 | 1205 | } | |
| 1333 | 1206 | ||
| 1334 | - | // SetSizeRequest provides a mock function for the type MockBoxWidget | |
| 1335 | - | func (_mock *MockBoxWidget) SetSizeRequest(width int, height int) { | |
| 1336 | - | _mock.Called(width, height) | |
| 1337 | - | return | |
| 1207 | + | // SetSizeRequest provides a mock function with given fields: width, height | |
| 1208 | + | func (_m *MockBoxWidget) SetSizeRequest(width int, height int) { | |
| 1209 | + | _m.Called(width, height) | |
| 1338 | 1210 | } | |
| 1339 | 1211 | ||
| 1340 | 1212 | // MockBoxWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest' | |
| @@ -1351,18 +1223,7 @@ func (_e *MockBoxWidget_Expecter) SetSizeRequest(width interface{}, height inter | |||
| 1351 | 1223 | ||
| 1352 | 1224 | func (_c *MockBoxWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockBoxWidget_SetSizeRequest_Call { | |
| 1353 | 1225 | _c.Call.Run(func(args mock.Arguments) { | |
| 1354 | - | var arg0 int | |
| 1355 | - | if args[0] != nil { | |
| 1356 | - | arg0 = args[0].(int) | |
| 1357 | - | } | |
| 1358 | - | var arg1 int | |
| 1359 | - | if args[1] != nil { | |
| 1360 | - | arg1 = args[1].(int) | |
| 1361 | - | } | |
| 1362 | - | run( | |
| 1363 | - | arg0, | |
| 1364 | - | arg1, | |
| 1365 | - | ) | |
| 1226 | + | run(args[0].(int), args[1].(int)) | |
| 1366 | 1227 | }) | |
| 1367 | 1228 | return _c | |
| 1368 | 1229 | } | |
| @@ -1372,15 +1233,14 @@ func (_c *MockBoxWidget_SetSizeRequest_Call) Return() *MockBoxWidget_SetSizeRequ | |||
| 1372 | 1233 | return _c | |
| 1373 | 1234 | } | |
| 1374 | 1235 | ||
| 1375 | - | func (_c *MockBoxWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockBoxWidget_SetSizeRequest_Call { | |
| 1236 | + | func (_c *MockBoxWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockBoxWidget_SetSizeRequest_Call { | |
| 1376 | 1237 | _c.Run(run) | |
| 1377 | 1238 | return _c | |
| 1378 | 1239 | } | |
| 1379 | 1240 | ||
| 1380 | - | // SetSpacing provides a mock function for the type MockBoxWidget | |
| 1381 | - | func (_mock *MockBoxWidget) SetSpacing(spacing int) { | |
| 1382 | - | _mock.Called(spacing) | |
| 1383 | - | return | |
| 1241 | + | // SetSpacing provides a mock function with given fields: spacing | |
| 1242 | + | func (_m *MockBoxWidget) SetSpacing(spacing int) { | |
| 1243 | + | _m.Called(spacing) | |
| 1384 | 1244 | } | |
| 1385 | 1245 | ||
| 1386 | 1246 | // MockBoxWidget_SetSpacing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSpacing' | |
| @@ -1396,13 +1256,7 @@ func (_e *MockBoxWidget_Expecter) SetSpacing(spacing interface{}) *MockBoxWidget | |||
| 1396 | 1256 | ||
| 1397 | 1257 | func (_c *MockBoxWidget_SetSpacing_Call) Run(run func(spacing int)) *MockBoxWidget_SetSpacing_Call { | |
| 1398 | 1258 | _c.Call.Run(func(args mock.Arguments) { | |
| 1399 | - | var arg0 int | |
| 1400 | - | if args[0] != nil { | |
| 1401 | - | arg0 = args[0].(int) | |
| 1402 | - | } | |
| 1403 | - | run( | |
| 1404 | - | arg0, | |
| 1405 | - | ) | |
| 1259 | + | run(args[0].(int)) | |
| 1406 | 1260 | }) | |
| 1407 | 1261 | return _c | |
| 1408 | 1262 | } | |
| @@ -1412,15 +1266,14 @@ func (_c *MockBoxWidget_SetSpacing_Call) Return() *MockBoxWidget_SetSpacing_Call | |||
| 1412 | 1266 | return _c | |
| 1413 | 1267 | } | |
| 1414 | 1268 | ||
| 1415 | - | func (_c *MockBoxWidget_SetSpacing_Call) RunAndReturn(run func(spacing int)) *MockBoxWidget_SetSpacing_Call { | |
| 1269 | + | func (_c *MockBoxWidget_SetSpacing_Call) RunAndReturn(run func(int)) *MockBoxWidget_SetSpacing_Call { | |
| 1416 | 1270 | _c.Run(run) | |
| 1417 | 1271 | return _c | |
| 1418 | 1272 | } | |
| 1419 | 1273 | ||
| 1420 | - | // SetValign provides a mock function for the type MockBoxWidget | |
| 1421 | - | func (_mock *MockBoxWidget) SetValign(align gtk.Align) { | |
| 1422 | - | _mock.Called(align) | |
| 1423 | - | return | |
| 1274 | + | // SetValign provides a mock function with given fields: align | |
| 1275 | + | func (_m *MockBoxWidget) SetValign(align gtk.Align) { | |
| 1276 | + | _m.Called(align) | |
| 1424 | 1277 | } | |
| 1425 | 1278 | ||
| 1426 | 1279 | // MockBoxWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign' | |
| @@ -1436,13 +1289,7 @@ func (_e *MockBoxWidget_Expecter) SetValign(align interface{}) *MockBoxWidget_Se | |||
| 1436 | 1289 | ||
| 1437 | 1290 | func (_c *MockBoxWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockBoxWidget_SetValign_Call { | |
| 1438 | 1291 | _c.Call.Run(func(args mock.Arguments) { | |
| 1439 | - | var arg0 gtk.Align | |
| 1440 | - | if args[0] != nil { | |
| 1441 | - | arg0 = args[0].(gtk.Align) | |
| 1442 | - | } | |
| 1443 | - | run( | |
| 1444 | - | arg0, | |
| 1445 | - | ) | |
| 1292 | + | run(args[0].(gtk.Align)) | |
| 1446 | 1293 | }) | |
| 1447 | 1294 | return _c | |
| 1448 | 1295 | } | |
| @@ -1452,15 +1299,14 @@ func (_c *MockBoxWidget_SetValign_Call) Return() *MockBoxWidget_SetValign_Call { | |||
| 1452 | 1299 | return _c | |
| 1453 | 1300 | } | |
| 1454 | 1301 | ||
| 1455 | - | func (_c *MockBoxWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockBoxWidget_SetValign_Call { | |
| 1302 | + | func (_c *MockBoxWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockBoxWidget_SetValign_Call { | |
| 1456 | 1303 | _c.Run(run) | |
| 1457 | 1304 | return _c | |
| 1458 | 1305 | } | |
| 1459 | 1306 | ||
| 1460 | - | // SetVexpand provides a mock function for the type MockBoxWidget | |
| 1461 | - | func (_mock *MockBoxWidget) SetVexpand(expand bool) { | |
| 1462 | - | _mock.Called(expand) | |
| 1463 | - | return | |
| 1307 | + | // SetVexpand provides a mock function with given fields: expand | |
| 1308 | + | func (_m *MockBoxWidget) SetVexpand(expand bool) { | |
| 1309 | + | _m.Called(expand) | |
| 1464 | 1310 | } | |
| 1465 | 1311 | ||
| 1466 | 1312 | // MockBoxWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand' | |
| @@ -1476,13 +1322,7 @@ func (_e *MockBoxWidget_Expecter) SetVexpand(expand interface{}) *MockBoxWidget_ | |||
| 1476 | 1322 | ||
| 1477 | 1323 | func (_c *MockBoxWidget_SetVexpand_Call) Run(run func(expand bool)) *MockBoxWidget_SetVexpand_Call { | |
| 1478 | 1324 | _c.Call.Run(func(args mock.Arguments) { | |
| 1479 | - | var arg0 bool | |
| 1480 | - | if args[0] != nil { | |
| 1481 | - | arg0 = args[0].(bool) | |
| 1482 | - | } | |
| 1483 | - | run( | |
| 1484 | - | arg0, | |
| 1485 | - | ) | |
| 1325 | + | run(args[0].(bool)) | |
| 1486 | 1326 | }) | |
| 1487 | 1327 | return _c | |
| 1488 | 1328 | } | |
| @@ -1492,15 +1332,14 @@ func (_c *MockBoxWidget_SetVexpand_Call) Return() *MockBoxWidget_SetVexpand_Call | |||
| 1492 | 1332 | return _c | |
| 1493 | 1333 | } | |
| 1494 | 1334 | ||
| 1495 | - | func (_c *MockBoxWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockBoxWidget_SetVexpand_Call { | |
| 1335 | + | func (_c *MockBoxWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetVexpand_Call { | |
| 1496 | 1336 | _c.Run(run) | |
| 1497 | 1337 | return _c | |
| 1498 | 1338 | } | |
| 1499 | 1339 | ||
| 1500 | - | // SetVisible provides a mock function for the type MockBoxWidget | |
| 1501 | - | func (_mock *MockBoxWidget) SetVisible(visible bool) { | |
| 1502 | - | _mock.Called(visible) | |
| 1503 | - | return | |
| 1340 | + | // SetVisible provides a mock function with given fields: visible | |
| 1341 | + | func (_m *MockBoxWidget) SetVisible(visible bool) { | |
| 1342 | + | _m.Called(visible) | |
| 1504 | 1343 | } | |
| 1505 | 1344 | ||
| 1506 | 1345 | // MockBoxWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible' | |
| @@ -1516,13 +1355,7 @@ func (_e *MockBoxWidget_Expecter) SetVisible(visible interface{}) *MockBoxWidget | |||
| 1516 | 1355 | ||
| 1517 | 1356 | func (_c *MockBoxWidget_SetVisible_Call) Run(run func(visible bool)) *MockBoxWidget_SetVisible_Call { | |
| 1518 | 1357 | _c.Call.Run(func(args mock.Arguments) { | |
| 1519 | - | var arg0 bool | |
| 1520 | - | if args[0] != nil { | |
| 1521 | - | arg0 = args[0].(bool) | |
| 1522 | - | } | |
| 1523 | - | run( | |
| 1524 | - | arg0, | |
| 1525 | - | ) | |
| 1358 | + | run(args[0].(bool)) | |
| 1526 | 1359 | }) | |
| 1527 | 1360 | return _c | |
| 1528 | 1361 | } | |
| @@ -1532,15 +1365,14 @@ func (_c *MockBoxWidget_SetVisible_Call) Return() *MockBoxWidget_SetVisible_Call | |||
| 1532 | 1365 | return _c | |
| 1533 | 1366 | } | |
| 1534 | 1367 | ||
| 1535 | - | func (_c *MockBoxWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockBoxWidget_SetVisible_Call { | |
| 1368 | + | func (_c *MockBoxWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockBoxWidget_SetVisible_Call { | |
| 1536 | 1369 | _c.Run(run) | |
| 1537 | 1370 | return _c | |
| 1538 | 1371 | } | |
| 1539 | 1372 | ||
| 1540 | - | // Show provides a mock function for the type MockBoxWidget | |
| 1541 | - | func (_mock *MockBoxWidget) Show() { | |
| 1542 | - | _mock.Called() | |
| 1543 | - | return | |
| 1373 | + | // Show provides a mock function with no fields | |
| 1374 | + | func (_m *MockBoxWidget) Show() { | |
| 1375 | + | _m.Called() | |
| 1544 | 1376 | } | |
| 1545 | 1377 | ||
| 1546 | 1378 | // MockBoxWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |
| @@ -1570,10 +1402,9 @@ func (_c *MockBoxWidget_Show_Call) RunAndReturn(run func()) *MockBoxWidget_Show_ | |||
| 1570 | 1402 | return _c | |
| 1571 | 1403 | } | |
| 1572 | 1404 | ||
| 1573 | - | // Unparent provides a mock function for the type MockBoxWidget | |
| 1574 | - | func (_mock *MockBoxWidget) Unparent() { | |
| 1575 | - | _mock.Called() | |
| 1576 | - | return | |
| 1405 | + | // Unparent provides a mock function with no fields | |
| 1406 | + | func (_m *MockBoxWidget) Unparent() { | |
| 1407 | + | _m.Called() | |
| 1577 | 1408 | } | |
| 1578 | 1409 | ||
| 1579 | 1410 | // MockBoxWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent' | |
| @@ -1602,3 +1433,17 @@ func (_c *MockBoxWidget_Unparent_Call) RunAndReturn(run func()) *MockBoxWidget_U | |||
| 1602 | 1433 | _c.Run(run) | |
| 1603 | 1434 | return _c | |
| 1604 | 1435 | } | |
| 1436 | + | ||
| 1437 | + | // NewMockBoxWidget creates a new instance of MockBoxWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 1438 | + | // The first argument is typically a *testing.T value. | |
| 1439 | + | func NewMockBoxWidget(t interface { | |
| 1440 | + | mock.TestingT | |
| 1441 | + | Cleanup(func()) | |
| 1442 | + | }) *MockBoxWidget { | |
| 1443 | + | mock := &MockBoxWidget{} | |
| 1444 | + | mock.Mock.Test(t) | |
| 1445 | + | ||
| 1446 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 1447 | + | ||
| 1448 | + | return mock | |
| 1449 | + | } | |
M internal/ui/layout/mocks/mock_button_widget.go +221 -330
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockButtonWidget creates a new instance of MockButtonWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockButtonWidget(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockButtonWidget { | |
| 19 | - | mock := &MockButtonWidget{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockButtonWidget is an autogenerated mock type for the ButtonWidget type | |
| 28 | 13 | type MockButtonWidget struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,10 +22,9 @@ func (_m *MockButtonWidget) EXPECT() *MockButtonWidget_Expecter { | |||
| 37 | 22 | return &MockButtonWidget_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // AddController provides a mock function for the type MockButtonWidget | |
| 41 | - | func (_mock *MockButtonWidget) AddController(controller *gtk.EventController) { | |
| 42 | - | _mock.Called(controller) | |
| 43 | - | return | |
| 25 | + | // AddController provides a mock function with given fields: controller | |
| 26 | + | func (_m *MockButtonWidget) AddController(controller *gtk.EventController) { | |
| 27 | + | _m.Called(controller) | |
| 44 | 28 | } | |
| 45 | 29 | ||
| 46 | 30 | // MockButtonWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController' | |
| @@ -56,13 +40,7 @@ func (_e *MockButtonWidget_Expecter) AddController(controller interface{}) *Mock | |||
| 56 | 40 | ||
| 57 | 41 | func (_c *MockButtonWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockButtonWidget_AddController_Call { | |
| 58 | 42 | _c.Call.Run(func(args mock.Arguments) { | |
| 59 | - | var arg0 *gtk.EventController | |
| 60 | - | if args[0] != nil { | |
| 61 | - | arg0 = args[0].(*gtk.EventController) | |
| 62 | - | } | |
| 63 | - | run( | |
| 64 | - | arg0, | |
| 65 | - | ) | |
| 43 | + | run(args[0].(*gtk.EventController)) | |
| 66 | 44 | }) | |
| 67 | 45 | return _c | |
| 68 | 46 | } | |
| @@ -72,15 +50,14 @@ func (_c *MockButtonWidget_AddController_Call) Return() *MockButtonWidget_AddCon | |||
| 72 | 50 | return _c | |
| 73 | 51 | } | |
| 74 | 52 | ||
| 75 | - | func (_c *MockButtonWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockButtonWidget_AddController_Call { | |
| 53 | + | func (_c *MockButtonWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockButtonWidget_AddController_Call { | |
| 76 | 54 | _c.Run(run) | |
| 77 | 55 | return _c | |
| 78 | 56 | } | |
| 79 | 57 | ||
| 80 | - | // AddCssClass provides a mock function for the type MockButtonWidget | |
| 81 | - | func (_mock *MockButtonWidget) AddCssClass(cssClass string) { | |
| 82 | - | _mock.Called(cssClass) | |
| 83 | - | return | |
| 58 | + | // AddCssClass provides a mock function with given fields: cssClass | |
| 59 | + | func (_m *MockButtonWidget) AddCssClass(cssClass string) { | |
| 60 | + | _m.Called(cssClass) | |
| 84 | 61 | } | |
| 85 | 62 | ||
| 86 | 63 | // MockButtonWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass' | |
| @@ -96,13 +73,7 @@ func (_e *MockButtonWidget_Expecter) AddCssClass(cssClass interface{}) *MockButt | |||
| 96 | 73 | ||
| 97 | 74 | func (_c *MockButtonWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockButtonWidget_AddCssClass_Call { | |
| 98 | 75 | _c.Call.Run(func(args mock.Arguments) { | |
| 99 | - | var arg0 string | |
| 100 | - | if args[0] != nil { | |
| 101 | - | arg0 = args[0].(string) | |
| 102 | - | } | |
| 103 | - | run( | |
| 104 | - | arg0, | |
| 105 | - | ) | |
| 76 | + | run(args[0].(string)) | |
| 106 | 77 | }) | |
| 107 | 78 | return _c | |
| 108 | 79 | } | |
| @@ -112,14 +83,14 @@ func (_c *MockButtonWidget_AddCssClass_Call) Return() *MockButtonWidget_AddCssCl | |||
| 112 | 83 | return _c | |
| 113 | 84 | } | |
| 114 | 85 | ||
| 115 | - | func (_c *MockButtonWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockButtonWidget_AddCssClass_Call { | |
| 86 | + | func (_c *MockButtonWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockButtonWidget_AddCssClass_Call { | |
| 116 | 87 | _c.Run(run) | |
| 117 | 88 | return _c | |
| 118 | 89 | } | |
| 119 | 90 | ||
| 120 | - | // ComputePoint provides a mock function for the type MockButtonWidget | |
| 121 | - | func (_mock *MockButtonWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 122 | - | ret := _mock.Called(target) | |
| 91 | + | // ComputePoint provides a mock function with given fields: target | |
| 92 | + | func (_m *MockButtonWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 93 | + | ret := _m.Called(target) | |
| 123 | 94 | ||
| 124 | 95 | if len(ret) == 0 { | |
| 125 | 96 | panic("no return value specified for ComputePoint") | |
| @@ -128,24 +99,27 @@ func (_mock *MockButtonWidget) ComputePoint(target layout.Widget) (float64, floa | |||
| 128 | 99 | var r0 float64 | |
| 129 | 100 | var r1 float64 | |
| 130 | 101 | var r2 bool | |
| 131 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 132 | - | return returnFunc(target) | |
| 102 | + | if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 103 | + | return rf(target) | |
| 133 | 104 | } | |
| 134 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 135 | - | r0 = returnFunc(target) | |
| 105 | + | if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 106 | + | r0 = rf(target) | |
| 136 | 107 | } else { | |
| 137 | 108 | r0 = ret.Get(0).(float64) | |
| 138 | 109 | } | |
| 139 | - | if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 140 | - | r1 = returnFunc(target) | |
| 110 | + | ||
| 111 | + | if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 112 | + | r1 = rf(target) | |
| 141 | 113 | } else { | |
| 142 | 114 | r1 = ret.Get(1).(float64) | |
| 143 | 115 | } | |
| 144 | - | if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 145 | - | r2 = returnFunc(target) | |
| 116 | + | ||
| 117 | + | if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 118 | + | r2 = rf(target) | |
| 146 | 119 | } else { | |
| 147 | 120 | r2 = ret.Get(2).(bool) | |
| 148 | 121 | } | |
| 122 | + | ||
| 149 | 123 | return r0, r1, r2 | |
| 150 | 124 | } | |
| 151 | 125 | ||
| @@ -162,13 +136,7 @@ func (_e *MockButtonWidget_Expecter) ComputePoint(target interface{}) *MockButto | |||
| 162 | 136 | ||
| 163 | 137 | func (_c *MockButtonWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockButtonWidget_ComputePoint_Call { | |
| 164 | 138 | _c.Call.Run(func(args mock.Arguments) { | |
| 165 | - | var arg0 layout.Widget | |
| 166 | - | if args[0] != nil { | |
| 167 | - | arg0 = args[0].(layout.Widget) | |
| 168 | - | } | |
| 169 | - | run( | |
| 170 | - | arg0, | |
| 171 | - | ) | |
| 139 | + | run(args[0].(layout.Widget)) | |
| 172 | 140 | }) | |
| 173 | 141 | return _c | |
| 174 | 142 | } | |
| @@ -178,25 +146,26 @@ func (_c *MockButtonWidget_ComputePoint_Call) Return(x float64, y float64, ok bo | |||
| 178 | 146 | return _c | |
| 179 | 147 | } | |
| 180 | 148 | ||
| 181 | - | func (_c *MockButtonWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockButtonWidget_ComputePoint_Call { | |
| 149 | + | func (_c *MockButtonWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockButtonWidget_ComputePoint_Call { | |
| 182 | 150 | _c.Call.Return(run) | |
| 183 | 151 | return _c | |
| 184 | 152 | } | |
| 185 | 153 | ||
| 186 | - | // ConnectClicked provides a mock function for the type MockButtonWidget | |
| 187 | - | func (_mock *MockButtonWidget) ConnectClicked(callback func()) uint32 { | |
| 188 | - | ret := _mock.Called(callback) | |
| 154 | + | // ConnectClicked provides a mock function with given fields: callback | |
| 155 | + | func (_m *MockButtonWidget) ConnectClicked(callback func()) uint32 { | |
| 156 | + | ret := _m.Called(callback) | |
| 189 | 157 | ||
| 190 | 158 | if len(ret) == 0 { | |
| 191 | 159 | panic("no return value specified for ConnectClicked") | |
| 192 | 160 | } | |
| 193 | 161 | ||
| 194 | 162 | var r0 uint32 | |
| 195 | - | if returnFunc, ok := ret.Get(0).(func(func()) uint32); ok { | |
| 196 | - | r0 = returnFunc(callback) | |
| 163 | + | if rf, ok := ret.Get(0).(func(func()) uint32); ok { | |
| 164 | + | r0 = rf(callback) | |
| 197 | 165 | } else { | |
| 198 | 166 | r0 = ret.Get(0).(uint32) | |
| 199 | 167 | } | |
| 168 | + | ||
| 200 | 169 | return r0 | |
| 201 | 170 | } | |
| 202 | 171 | ||
| @@ -213,41 +182,36 @@ func (_e *MockButtonWidget_Expecter) ConnectClicked(callback interface{}) *MockB | |||
| 213 | 182 | ||
| 214 | 183 | func (_c *MockButtonWidget_ConnectClicked_Call) Run(run func(callback func())) *MockButtonWidget_ConnectClicked_Call { | |
| 215 | 184 | _c.Call.Run(func(args mock.Arguments) { | |
| 216 | - | var arg0 func() | |
| 217 | - | if args[0] != nil { | |
| 218 | - | arg0 = args[0].(func()) | |
| 219 | - | } | |
| 220 | - | run( | |
| 221 | - | arg0, | |
| 222 | - | ) | |
| 185 | + | run(args[0].(func())) | |
| 223 | 186 | }) | |
| 224 | 187 | return _c | |
| 225 | 188 | } | |
| 226 | 189 | ||
| 227 | - | func (_c *MockButtonWidget_ConnectClicked_Call) Return(v uint32) *MockButtonWidget_ConnectClicked_Call { | |
| 228 | - | _c.Call.Return(v) | |
| 190 | + | func (_c *MockButtonWidget_ConnectClicked_Call) Return(_a0 uint32) *MockButtonWidget_ConnectClicked_Call { | |
| 191 | + | _c.Call.Return(_a0) | |
| 229 | 192 | return _c | |
| 230 | 193 | } | |
| 231 | 194 | ||
| 232 | - | func (_c *MockButtonWidget_ConnectClicked_Call) RunAndReturn(run func(callback func()) uint32) *MockButtonWidget_ConnectClicked_Call { | |
| 195 | + | func (_c *MockButtonWidget_ConnectClicked_Call) RunAndReturn(run func(func()) uint32) *MockButtonWidget_ConnectClicked_Call { | |
| 233 | 196 | _c.Call.Return(run) | |
| 234 | 197 | return _c | |
| 235 | 198 | } | |
| 236 | 199 | ||
| 237 | - | // GetAllocatedHeight provides a mock function for the type MockButtonWidget | |
| 238 | - | func (_mock *MockButtonWidget) GetAllocatedHeight() int { | |
| 239 | - | ret := _mock.Called() | |
| 200 | + | // GetAllocatedHeight provides a mock function with no fields | |
| 201 | + | func (_m *MockButtonWidget) GetAllocatedHeight() int { | |
| 202 | + | ret := _m.Called() | |
| 240 | 203 | ||
| 241 | 204 | if len(ret) == 0 { | |
| 242 | 205 | panic("no return value specified for GetAllocatedHeight") | |
| 243 | 206 | } | |
| 244 | 207 | ||
| 245 | 208 | var r0 int | |
| 246 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 247 | - | r0 = returnFunc() | |
| 209 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 210 | + | r0 = rf() | |
| 248 | 211 | } else { | |
| 249 | 212 | r0 = ret.Get(0).(int) | |
| 250 | 213 | } | |
| 214 | + | ||
| 251 | 215 | return r0 | |
| 252 | 216 | } | |
| 253 | 217 | ||
| @@ -268,8 +232,8 @@ func (_c *MockButtonWidget_GetAllocatedHeight_Call) Run(run func()) *MockButtonW | |||
| 268 | 232 | return _c | |
| 269 | 233 | } | |
| 270 | 234 | ||
| 271 | - | func (_c *MockButtonWidget_GetAllocatedHeight_Call) Return(n int) *MockButtonWidget_GetAllocatedHeight_Call { | |
| 272 | - | _c.Call.Return(n) | |
| 235 | + | func (_c *MockButtonWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockButtonWidget_GetAllocatedHeight_Call { | |
| 236 | + | _c.Call.Return(_a0) | |
| 273 | 237 | return _c | |
| 274 | 238 | } | |
| 275 | 239 | ||
| @@ -278,20 +242,21 @@ func (_c *MockButtonWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) | |||
| 278 | 242 | return _c | |
| 279 | 243 | } | |
| 280 | 244 | ||
| 281 | - | // GetAllocatedWidth provides a mock function for the type MockButtonWidget | |
| 282 | - | func (_mock *MockButtonWidget) GetAllocatedWidth() int { | |
| 283 | - | ret := _mock.Called() | |
| 245 | + | // GetAllocatedWidth provides a mock function with no fields | |
| 246 | + | func (_m *MockButtonWidget) GetAllocatedWidth() int { | |
| 247 | + | ret := _m.Called() | |
| 284 | 248 | ||
| 285 | 249 | if len(ret) == 0 { | |
| 286 | 250 | panic("no return value specified for GetAllocatedWidth") | |
| 287 | 251 | } | |
| 288 | 252 | ||
| 289 | 253 | var r0 int | |
| 290 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 291 | - | r0 = returnFunc() | |
| 254 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 255 | + | r0 = rf() | |
| 292 | 256 | } else { | |
| 293 | 257 | r0 = ret.Get(0).(int) | |
| 294 | 258 | } | |
| 259 | + | ||
| 295 | 260 | return r0 | |
| 296 | 261 | } | |
| 297 | 262 | ||
| @@ -312,8 +277,8 @@ func (_c *MockButtonWidget_GetAllocatedWidth_Call) Run(run func()) *MockButtonWi | |||
| 312 | 277 | return _c | |
| 313 | 278 | } | |
| 314 | 279 | ||
| 315 | - | func (_c *MockButtonWidget_GetAllocatedWidth_Call) Return(n int) *MockButtonWidget_GetAllocatedWidth_Call { | |
| 316 | - | _c.Call.Return(n) | |
| 280 | + | func (_c *MockButtonWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockButtonWidget_GetAllocatedWidth_Call { | |
| 281 | + | _c.Call.Return(_a0) | |
| 317 | 282 | return _c | |
| 318 | 283 | } | |
| 319 | 284 | ||
| @@ -322,22 +287,23 @@ func (_c *MockButtonWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) | |||
| 322 | 287 | return _c | |
| 323 | 288 | } | |
| 324 | 289 | ||
| 325 | - | // GetChild provides a mock function for the type MockButtonWidget | |
| 326 | - | func (_mock *MockButtonWidget) GetChild() layout.Widget { | |
| 327 | - | ret := _mock.Called() | |
| 290 | + | // GetChild provides a mock function with no fields | |
| 291 | + | func (_m *MockButtonWidget) GetChild() layout.Widget { | |
| 292 | + | ret := _m.Called() | |
| 328 | 293 | ||
| 329 | 294 | if len(ret) == 0 { | |
| 330 | 295 | panic("no return value specified for GetChild") | |
| 331 | 296 | } | |
| 332 | 297 | ||
| 333 | 298 | var r0 layout.Widget | |
| 334 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 335 | - | r0 = returnFunc() | |
| 299 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 300 | + | r0 = rf() | |
| 336 | 301 | } else { | |
| 337 | 302 | if ret.Get(0) != nil { | |
| 338 | 303 | r0 = ret.Get(0).(layout.Widget) | |
| 339 | 304 | } | |
| 340 | 305 | } | |
| 306 | + | ||
| 341 | 307 | return r0 | |
| 342 | 308 | } | |
| 343 | 309 | ||
| @@ -358,8 +324,8 @@ func (_c *MockButtonWidget_GetChild_Call) Run(run func()) *MockButtonWidget_GetC | |||
| 358 | 324 | return _c | |
| 359 | 325 | } | |
| 360 | 326 | ||
| 361 | - | func (_c *MockButtonWidget_GetChild_Call) Return(widget layout.Widget) *MockButtonWidget_GetChild_Call { | |
| 362 | - | _c.Call.Return(widget) | |
| 327 | + | func (_c *MockButtonWidget_GetChild_Call) Return(_a0 layout.Widget) *MockButtonWidget_GetChild_Call { | |
| 328 | + | _c.Call.Return(_a0) | |
| 363 | 329 | return _c | |
| 364 | 330 | } | |
| 365 | 331 | ||
| @@ -368,20 +334,21 @@ func (_c *MockButtonWidget_GetChild_Call) RunAndReturn(run func() layout.Widget) | |||
| 368 | 334 | return _c | |
| 369 | 335 | } | |
| 370 | 336 | ||
| 371 | - | // GetHexpand provides a mock function for the type MockButtonWidget | |
| 372 | - | func (_mock *MockButtonWidget) GetHexpand() bool { | |
| 373 | - | ret := _mock.Called() | |
| 337 | + | // GetHexpand provides a mock function with no fields | |
| 338 | + | func (_m *MockButtonWidget) GetHexpand() bool { | |
| 339 | + | ret := _m.Called() | |
| 374 | 340 | ||
| 375 | 341 | if len(ret) == 0 { | |
| 376 | 342 | panic("no return value specified for GetHexpand") | |
| 377 | 343 | } | |
| 378 | 344 | ||
| 379 | 345 | var r0 bool | |
| 380 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 381 | - | r0 = returnFunc() | |
| 346 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 347 | + | r0 = rf() | |
| 382 | 348 | } else { | |
| 383 | 349 | r0 = ret.Get(0).(bool) | |
| 384 | 350 | } | |
| 351 | + | ||
| 385 | 352 | return r0 | |
| 386 | 353 | } | |
| 387 | 354 | ||
| @@ -402,8 +369,8 @@ func (_c *MockButtonWidget_GetHexpand_Call) Run(run func()) *MockButtonWidget_Ge | |||
| 402 | 369 | return _c | |
| 403 | 370 | } | |
| 404 | 371 | ||
| 405 | - | func (_c *MockButtonWidget_GetHexpand_Call) Return(b bool) *MockButtonWidget_GetHexpand_Call { | |
| 406 | - | _c.Call.Return(b) | |
| 372 | + | func (_c *MockButtonWidget_GetHexpand_Call) Return(_a0 bool) *MockButtonWidget_GetHexpand_Call { | |
| 373 | + | _c.Call.Return(_a0) | |
| 407 | 374 | return _c | |
| 408 | 375 | } | |
| 409 | 376 | ||
| @@ -412,20 +379,21 @@ func (_c *MockButtonWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockB | |||
| 412 | 379 | return _c | |
| 413 | 380 | } | |
| 414 | 381 | ||
| 415 | - | // GetLabel provides a mock function for the type MockButtonWidget | |
| 416 | - | func (_mock *MockButtonWidget) GetLabel() string { | |
| 417 | - | ret := _mock.Called() | |
| 382 | + | // GetLabel provides a mock function with no fields | |
| 383 | + | func (_m *MockButtonWidget) GetLabel() string { | |
| 384 | + | ret := _m.Called() | |
| 418 | 385 | ||
| 419 | 386 | if len(ret) == 0 { | |
| 420 | 387 | panic("no return value specified for GetLabel") | |
| 421 | 388 | } | |
| 422 | 389 | ||
| 423 | 390 | var r0 string | |
| 424 | - | if returnFunc, ok := ret.Get(0).(func() string); ok { | |
| 425 | - | r0 = returnFunc() | |
| 391 | + | if rf, ok := ret.Get(0).(func() string); ok { | |
| 392 | + | r0 = rf() | |
| 426 | 393 | } else { | |
| 427 | 394 | r0 = ret.Get(0).(string) | |
| 428 | 395 | } | |
| 396 | + | ||
| 429 | 397 | return r0 | |
| 430 | 398 | } | |
| 431 | 399 | ||
| @@ -446,8 +414,8 @@ func (_c *MockButtonWidget_GetLabel_Call) Run(run func()) *MockButtonWidget_GetL | |||
| 446 | 414 | return _c | |
| 447 | 415 | } | |
| 448 | 416 | ||
| 449 | - | func (_c *MockButtonWidget_GetLabel_Call) Return(s string) *MockButtonWidget_GetLabel_Call { | |
| 450 | - | _c.Call.Return(s) | |
| 417 | + | func (_c *MockButtonWidget_GetLabel_Call) Return(_a0 string) *MockButtonWidget_GetLabel_Call { | |
| 418 | + | _c.Call.Return(_a0) | |
| 451 | 419 | return _c | |
| 452 | 420 | } | |
| 453 | 421 | ||
| @@ -456,22 +424,23 @@ func (_c *MockButtonWidget_GetLabel_Call) RunAndReturn(run func() string) *MockB | |||
| 456 | 424 | return _c | |
| 457 | 425 | } | |
| 458 | 426 | ||
| 459 | - | // GetParent provides a mock function for the type MockButtonWidget | |
| 460 | - | func (_mock *MockButtonWidget) GetParent() layout.Widget { | |
| 461 | - | ret := _mock.Called() | |
| 427 | + | // GetParent provides a mock function with no fields | |
| 428 | + | func (_m *MockButtonWidget) GetParent() layout.Widget { | |
| 429 | + | ret := _m.Called() | |
| 462 | 430 | ||
| 463 | 431 | if len(ret) == 0 { | |
| 464 | 432 | panic("no return value specified for GetParent") | |
| 465 | 433 | } | |
| 466 | 434 | ||
| 467 | 435 | var r0 layout.Widget | |
| 468 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 469 | - | r0 = returnFunc() | |
| 436 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 437 | + | r0 = rf() | |
| 470 | 438 | } else { | |
| 471 | 439 | if ret.Get(0) != nil { | |
| 472 | 440 | r0 = ret.Get(0).(layout.Widget) | |
| 473 | 441 | } | |
| 474 | 442 | } | |
| 443 | + | ||
| 475 | 444 | return r0 | |
| 476 | 445 | } | |
| 477 | 446 | ||
| @@ -492,8 +461,8 @@ func (_c *MockButtonWidget_GetParent_Call) Run(run func()) *MockButtonWidget_Get | |||
| 492 | 461 | return _c | |
| 493 | 462 | } | |
| 494 | 463 | ||
| 495 | - | func (_c *MockButtonWidget_GetParent_Call) Return(widget layout.Widget) *MockButtonWidget_GetParent_Call { | |
| 496 | - | _c.Call.Return(widget) | |
| 464 | + | func (_c *MockButtonWidget_GetParent_Call) Return(_a0 layout.Widget) *MockButtonWidget_GetParent_Call { | |
| 465 | + | _c.Call.Return(_a0) | |
| 497 | 466 | return _c | |
| 498 | 467 | } | |
| 499 | 468 | ||
| @@ -502,20 +471,21 @@ func (_c *MockButtonWidget_GetParent_Call) RunAndReturn(run func() layout.Widget | |||
| 502 | 471 | return _c | |
| 503 | 472 | } | |
| 504 | 473 | ||
| 505 | - | // GetVexpand provides a mock function for the type MockButtonWidget | |
| 506 | - | func (_mock *MockButtonWidget) GetVexpand() bool { | |
| 507 | - | ret := _mock.Called() | |
| 474 | + | // GetVexpand provides a mock function with no fields | |
| 475 | + | func (_m *MockButtonWidget) GetVexpand() bool { | |
| 476 | + | ret := _m.Called() | |
| 508 | 477 | ||
| 509 | 478 | if len(ret) == 0 { | |
| 510 | 479 | panic("no return value specified for GetVexpand") | |
| 511 | 480 | } | |
| 512 | 481 | ||
| 513 | 482 | var r0 bool | |
| 514 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 515 | - | r0 = returnFunc() | |
| 483 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 484 | + | r0 = rf() | |
| 516 | 485 | } else { | |
| 517 | 486 | r0 = ret.Get(0).(bool) | |
| 518 | 487 | } | |
| 488 | + | ||
| 519 | 489 | return r0 | |
| 520 | 490 | } | |
| 521 | 491 | ||
| @@ -536,8 +506,8 @@ func (_c *MockButtonWidget_GetVexpand_Call) Run(run func()) *MockButtonWidget_Ge | |||
| 536 | 506 | return _c | |
| 537 | 507 | } | |
| 538 | 508 | ||
| 539 | - | func (_c *MockButtonWidget_GetVexpand_Call) Return(b bool) *MockButtonWidget_GetVexpand_Call { | |
| 540 | - | _c.Call.Return(b) | |
| 509 | + | func (_c *MockButtonWidget_GetVexpand_Call) Return(_a0 bool) *MockButtonWidget_GetVexpand_Call { | |
| 510 | + | _c.Call.Return(_a0) | |
| 541 | 511 | return _c | |
| 542 | 512 | } | |
| 543 | 513 | ||
| @@ -546,20 +516,21 @@ func (_c *MockButtonWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockB | |||
| 546 | 516 | return _c | |
| 547 | 517 | } | |
| 548 | 518 | ||
| 549 | - | // GrabFocus provides a mock function for the type MockButtonWidget | |
| 550 | - | func (_mock *MockButtonWidget) GrabFocus() bool { | |
| 551 | - | ret := _mock.Called() | |
| 519 | + | // GrabFocus provides a mock function with no fields | |
| 520 | + | func (_m *MockButtonWidget) GrabFocus() bool { | |
| 521 | + | ret := _m.Called() | |
| 552 | 522 | ||
| 553 | 523 | if len(ret) == 0 { | |
| 554 | 524 | panic("no return value specified for GrabFocus") | |
| 555 | 525 | } | |
| 556 | 526 | ||
| 557 | 527 | var r0 bool | |
| 558 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 559 | - | r0 = returnFunc() | |
| 528 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 529 | + | r0 = rf() | |
| 560 | 530 | } else { | |
| 561 | 531 | r0 = ret.Get(0).(bool) | |
| 562 | 532 | } | |
| 533 | + | ||
| 563 | 534 | return r0 | |
| 564 | 535 | } | |
| 565 | 536 | ||
| @@ -580,8 +551,8 @@ func (_c *MockButtonWidget_GrabFocus_Call) Run(run func()) *MockButtonWidget_Gra | |||
| 580 | 551 | return _c | |
| 581 | 552 | } | |
| 582 | 553 | ||
| 583 | - | func (_c *MockButtonWidget_GrabFocus_Call) Return(b bool) *MockButtonWidget_GrabFocus_Call { | |
| 584 | - | _c.Call.Return(b) | |
| 554 | + | func (_c *MockButtonWidget_GrabFocus_Call) Return(_a0 bool) *MockButtonWidget_GrabFocus_Call { | |
| 555 | + | _c.Call.Return(_a0) | |
| 585 | 556 | return _c | |
| 586 | 557 | } | |
| 587 | 558 | ||
| @@ -590,22 +561,23 @@ func (_c *MockButtonWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockBu | |||
| 590 | 561 | return _c | |
| 591 | 562 | } | |
| 592 | 563 | ||
| 593 | - | // GtkWidget provides a mock function for the type MockButtonWidget | |
| 594 | - | func (_mock *MockButtonWidget) GtkWidget() *gtk.Widget { | |
| 595 | - | ret := _mock.Called() | |
| 564 | + | // GtkWidget provides a mock function with no fields | |
| 565 | + | func (_m *MockButtonWidget) GtkWidget() *gtk.Widget { | |
| 566 | + | ret := _m.Called() | |
| 596 | 567 | ||
| 597 | 568 | if len(ret) == 0 { | |
| 598 | 569 | panic("no return value specified for GtkWidget") | |
| 599 | 570 | } | |
| 600 | 571 | ||
| 601 | 572 | var r0 *gtk.Widget | |
| 602 | - | if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 603 | - | r0 = returnFunc() | |
| 573 | + | if rf, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 574 | + | r0 = rf() | |
| 604 | 575 | } else { | |
| 605 | 576 | if ret.Get(0) != nil { | |
| 606 | 577 | r0 = ret.Get(0).(*gtk.Widget) | |
| 607 | 578 | } | |
| 608 | 579 | } | |
| 580 | + | ||
| 609 | 581 | return r0 | |
| 610 | 582 | } | |
| 611 | 583 | ||
| @@ -626,8 +598,8 @@ func (_c *MockButtonWidget_GtkWidget_Call) Run(run func()) *MockButtonWidget_Gtk | |||
| 626 | 598 | return _c | |
| 627 | 599 | } | |
| 628 | 600 | ||
| 629 | - | func (_c *MockButtonWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockButtonWidget_GtkWidget_Call { | |
| 630 | - | _c.Call.Return(widget) | |
| 601 | + | func (_c *MockButtonWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockButtonWidget_GtkWidget_Call { | |
| 602 | + | _c.Call.Return(_a0) | |
| 631 | 603 | return _c | |
| 632 | 604 | } | |
| 633 | 605 | ||
| @@ -636,20 +608,21 @@ func (_c *MockButtonWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) | |||
| 636 | 608 | return _c | |
| 637 | 609 | } | |
| 638 | 610 | ||
| 639 | - | // HasCssClass provides a mock function for the type MockButtonWidget | |
| 640 | - | func (_mock *MockButtonWidget) HasCssClass(cssClass string) bool { | |
| 641 | - | ret := _mock.Called(cssClass) | |
| 611 | + | // HasCssClass provides a mock function with given fields: cssClass | |
| 612 | + | func (_m *MockButtonWidget) HasCssClass(cssClass string) bool { | |
| 613 | + | ret := _m.Called(cssClass) | |
| 642 | 614 | ||
| 643 | 615 | if len(ret) == 0 { | |
| 644 | 616 | panic("no return value specified for HasCssClass") | |
| 645 | 617 | } | |
| 646 | 618 | ||
| 647 | 619 | var r0 bool | |
| 648 | - | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |
| 649 | - | r0 = returnFunc(cssClass) | |
| 620 | + | if rf, ok := ret.Get(0).(func(string) bool); ok { | |
| 621 | + | r0 = rf(cssClass) | |
| 650 | 622 | } else { | |
| 651 | 623 | r0 = ret.Get(0).(bool) | |
| 652 | 624 | } | |
| 625 | + | ||
| 653 | 626 | return r0 | |
| 654 | 627 | } | |
| 655 | 628 | ||
| @@ -666,41 +639,36 @@ func (_e *MockButtonWidget_Expecter) HasCssClass(cssClass interface{}) *MockButt | |||
| 666 | 639 | ||
| 667 | 640 | func (_c *MockButtonWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockButtonWidget_HasCssClass_Call { | |
| 668 | 641 | _c.Call.Run(func(args mock.Arguments) { | |
| 669 | - | var arg0 string | |
| 670 | - | if args[0] != nil { | |
| 671 | - | arg0 = args[0].(string) | |
| 672 | - | } | |
| 673 | - | run( | |
| 674 | - | arg0, | |
| 675 | - | ) | |
| 642 | + | run(args[0].(string)) | |
| 676 | 643 | }) | |
| 677 | 644 | return _c | |
| 678 | 645 | } | |
| 679 | 646 | ||
| 680 | - | func (_c *MockButtonWidget_HasCssClass_Call) Return(b bool) *MockButtonWidget_HasCssClass_Call { | |
| 681 | - | _c.Call.Return(b) | |
| 647 | + | func (_c *MockButtonWidget_HasCssClass_Call) Return(_a0 bool) *MockButtonWidget_HasCssClass_Call { | |
| 648 | + | _c.Call.Return(_a0) | |
| 682 | 649 | return _c | |
| 683 | 650 | } | |
| 684 | 651 | ||
| 685 | - | func (_c *MockButtonWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockButtonWidget_HasCssClass_Call { | |
| 652 | + | func (_c *MockButtonWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockButtonWidget_HasCssClass_Call { | |
| 686 | 653 | _c.Call.Return(run) | |
| 687 | 654 | return _c | |
| 688 | 655 | } | |
| 689 | 656 | ||
| 690 | - | // HasFocus provides a mock function for the type MockButtonWidget | |
| 691 | - | func (_mock *MockButtonWidget) HasFocus() bool { | |
| 692 | - | ret := _mock.Called() | |
| 657 | + | // HasFocus provides a mock function with no fields | |
| 658 | + | func (_m *MockButtonWidget) HasFocus() bool { | |
| 659 | + | ret := _m.Called() | |
| 693 | 660 | ||
| 694 | 661 | if len(ret) == 0 { | |
| 695 | 662 | panic("no return value specified for HasFocus") | |
| 696 | 663 | } | |
| 697 | 664 | ||
| 698 | 665 | var r0 bool | |
| 699 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 700 | - | r0 = returnFunc() | |
| 666 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 667 | + | r0 = rf() | |
| 701 | 668 | } else { | |
| 702 | 669 | r0 = ret.Get(0).(bool) | |
| 703 | 670 | } | |
| 671 | + | ||
| 704 | 672 | return r0 | |
| 705 | 673 | } | |
| 706 | 674 | ||
| @@ -721,8 +689,8 @@ func (_c *MockButtonWidget_HasFocus_Call) Run(run func()) *MockButtonWidget_HasF | |||
| 721 | 689 | return _c | |
| 722 | 690 | } | |
| 723 | 691 | ||
| 724 | - | func (_c *MockButtonWidget_HasFocus_Call) Return(b bool) *MockButtonWidget_HasFocus_Call { | |
| 725 | - | _c.Call.Return(b) | |
| 692 | + | func (_c *MockButtonWidget_HasFocus_Call) Return(_a0 bool) *MockButtonWidget_HasFocus_Call { | |
| 693 | + | _c.Call.Return(_a0) | |
| 726 | 694 | return _c | |
| 727 | 695 | } | |
| 728 | 696 | ||
| @@ -731,10 +699,9 @@ func (_c *MockButtonWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockBut | |||
| 731 | 699 | return _c | |
| 732 | 700 | } | |
| 733 | 701 | ||
| 734 | - | // Hide provides a mock function for the type MockButtonWidget | |
| 735 | - | func (_mock *MockButtonWidget) Hide() { | |
| 736 | - | _mock.Called() | |
| 737 | - | return | |
| 702 | + | // Hide provides a mock function with no fields | |
| 703 | + | func (_m *MockButtonWidget) Hide() { | |
| 704 | + | _m.Called() | |
| 738 | 705 | } | |
| 739 | 706 | ||
| 740 | 707 | // MockButtonWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |
| @@ -764,20 +731,21 @@ func (_c *MockButtonWidget_Hide_Call) RunAndReturn(run func()) *MockButtonWidget | |||
| 764 | 731 | return _c | |
| 765 | 732 | } | |
| 766 | 733 | ||
| 767 | - | // IsVisible provides a mock function for the type MockButtonWidget | |
| 768 | - | func (_mock *MockButtonWidget) IsVisible() bool { | |
| 769 | - | ret := _mock.Called() | |
| 734 | + | // IsVisible provides a mock function with no fields | |
| 735 | + | func (_m *MockButtonWidget) IsVisible() bool { | |
| 736 | + | ret := _m.Called() | |
| 770 | 737 | ||
| 771 | 738 | if len(ret) == 0 { | |
| 772 | 739 | panic("no return value specified for IsVisible") | |
| 773 | 740 | } | |
| 774 | 741 | ||
| 775 | 742 | var r0 bool | |
| 776 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 777 | - | r0 = returnFunc() | |
| 743 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 744 | + | r0 = rf() | |
| 778 | 745 | } else { | |
| 779 | 746 | r0 = ret.Get(0).(bool) | |
| 780 | 747 | } | |
| 748 | + | ||
| 781 | 749 | return r0 | |
| 782 | 750 | } | |
| 783 | 751 | ||
| @@ -798,8 +766,8 @@ func (_c *MockButtonWidget_IsVisible_Call) Run(run func()) *MockButtonWidget_IsV | |||
| 798 | 766 | return _c | |
| 799 | 767 | } | |
| 800 | 768 | ||
| 801 | - | func (_c *MockButtonWidget_IsVisible_Call) Return(b bool) *MockButtonWidget_IsVisible_Call { | |
| 802 | - | _c.Call.Return(b) | |
| 769 | + | func (_c *MockButtonWidget_IsVisible_Call) Return(_a0 bool) *MockButtonWidget_IsVisible_Call { | |
| 770 | + | _c.Call.Return(_a0) | |
| 803 | 771 | return _c | |
| 804 | 772 | } | |
| 805 | 773 | ||
| @@ -808,10 +776,9 @@ func (_c *MockButtonWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockBu | |||
| 808 | 776 | return _c | |
| 809 | 777 | } | |
| 810 | 778 | ||
| 811 | - | // RemoveCssClass provides a mock function for the type MockButtonWidget | |
| 812 | - | func (_mock *MockButtonWidget) RemoveCssClass(cssClass string) { | |
| 813 | - | _mock.Called(cssClass) | |
| 814 | - | return | |
| 779 | + | // RemoveCssClass provides a mock function with given fields: cssClass | |
| 780 | + | func (_m *MockButtonWidget) RemoveCssClass(cssClass string) { | |
| 781 | + | _m.Called(cssClass) | |
| 815 | 782 | } | |
| 816 | 783 | ||
| 817 | 784 | // MockButtonWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass' | |
| @@ -827,13 +794,7 @@ func (_e *MockButtonWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockB | |||
| 827 | 794 | ||
| 828 | 795 | func (_c *MockButtonWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockButtonWidget_RemoveCssClass_Call { | |
| 829 | 796 | _c.Call.Run(func(args mock.Arguments) { | |
| 830 | - | var arg0 string | |
| 831 | - | if args[0] != nil { | |
| 832 | - | arg0 = args[0].(string) | |
| 833 | - | } | |
| 834 | - | run( | |
| 835 | - | arg0, | |
| 836 | - | ) | |
| 797 | + | run(args[0].(string)) | |
| 837 | 798 | }) | |
| 838 | 799 | return _c | |
| 839 | 800 | } | |
| @@ -843,15 +804,14 @@ func (_c *MockButtonWidget_RemoveCssClass_Call) Return() *MockButtonWidget_Remov | |||
| 843 | 804 | return _c | |
| 844 | 805 | } | |
| 845 | 806 | ||
| 846 | - | func (_c *MockButtonWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockButtonWidget_RemoveCssClass_Call { | |
| 807 | + | func (_c *MockButtonWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockButtonWidget_RemoveCssClass_Call { | |
| 847 | 808 | _c.Run(run) | |
| 848 | 809 | return _c | |
| 849 | 810 | } | |
| 850 | 811 | ||
| 851 | - | // SetCanFocus provides a mock function for the type MockButtonWidget | |
| 852 | - | func (_mock *MockButtonWidget) SetCanFocus(canFocus bool) { | |
| 853 | - | _mock.Called(canFocus) | |
| 854 | - | return | |
| 812 | + | // SetCanFocus provides a mock function with given fields: canFocus | |
| 813 | + | func (_m *MockButtonWidget) SetCanFocus(canFocus bool) { | |
| 814 | + | _m.Called(canFocus) | |
| 855 | 815 | } | |
| 856 | 816 | ||
| 857 | 817 | // MockButtonWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus' | |
| @@ -867,13 +827,7 @@ func (_e *MockButtonWidget_Expecter) SetCanFocus(canFocus interface{}) *MockButt | |||
| 867 | 827 | ||
| 868 | 828 | func (_c *MockButtonWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockButtonWidget_SetCanFocus_Call { | |
| 869 | 829 | _c.Call.Run(func(args mock.Arguments) { | |
| 870 | - | var arg0 bool | |
| 871 | - | if args[0] != nil { | |
| 872 | - | arg0 = args[0].(bool) | |
| 873 | - | } | |
| 874 | - | run( | |
| 875 | - | arg0, | |
| 876 | - | ) | |
| 830 | + | run(args[0].(bool)) | |
| 877 | 831 | }) | |
| 878 | 832 | return _c | |
| 879 | 833 | } | |
| @@ -883,15 +837,14 @@ func (_c *MockButtonWidget_SetCanFocus_Call) Return() *MockButtonWidget_SetCanFo | |||
| 883 | 837 | return _c | |
| 884 | 838 | } | |
| 885 | 839 | ||
| 886 | - | func (_c *MockButtonWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockButtonWidget_SetCanFocus_Call { | |
| 840 | + | func (_c *MockButtonWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetCanFocus_Call { | |
| 887 | 841 | _c.Run(run) | |
| 888 | 842 | return _c | |
| 889 | 843 | } | |
| 890 | 844 | ||
| 891 | - | // SetCanTarget provides a mock function for the type MockButtonWidget | |
| 892 | - | func (_mock *MockButtonWidget) SetCanTarget(canTarget bool) { | |
| 893 | - | _mock.Called(canTarget) | |
| 894 | - | return | |
| 845 | + | // SetCanTarget provides a mock function with given fields: canTarget | |
| 846 | + | func (_m *MockButtonWidget) SetCanTarget(canTarget bool) { | |
| 847 | + | _m.Called(canTarget) | |
| 895 | 848 | } | |
| 896 | 849 | ||
| 897 | 850 | // MockButtonWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget' | |
| @@ -907,13 +860,7 @@ func (_e *MockButtonWidget_Expecter) SetCanTarget(canTarget interface{}) *MockBu | |||
| 907 | 860 | ||
| 908 | 861 | func (_c *MockButtonWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockButtonWidget_SetCanTarget_Call { | |
| 909 | 862 | _c.Call.Run(func(args mock.Arguments) { | |
| 910 | - | var arg0 bool | |
| 911 | - | if args[0] != nil { | |
| 912 | - | arg0 = args[0].(bool) | |
| 913 | - | } | |
| 914 | - | run( | |
| 915 | - | arg0, | |
| 916 | - | ) | |
| 863 | + | run(args[0].(bool)) | |
| 917 | 864 | }) | |
| 918 | 865 | return _c | |
| 919 | 866 | } | |
| @@ -923,15 +870,14 @@ func (_c *MockButtonWidget_SetCanTarget_Call) Return() *MockButtonWidget_SetCanT | |||
| 923 | 870 | return _c | |
| 924 | 871 | } | |
| 925 | 872 | ||
| 926 | - | func (_c *MockButtonWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockButtonWidget_SetCanTarget_Call { | |
| 873 | + | func (_c *MockButtonWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetCanTarget_Call { | |
| 927 | 874 | _c.Run(run) | |
| 928 | 875 | return _c | |
| 929 | 876 | } | |
| 930 | 877 | ||
| 931 | - | // SetChild provides a mock function for the type MockButtonWidget | |
| 932 | - | func (_mock *MockButtonWidget) SetChild(child layout.Widget) { | |
| 933 | - | _mock.Called(child) | |
| 934 | - | return | |
| 878 | + | // SetChild provides a mock function with given fields: child | |
| 879 | + | func (_m *MockButtonWidget) SetChild(child layout.Widget) { | |
| 880 | + | _m.Called(child) | |
| 935 | 881 | } | |
| 936 | 882 | ||
| 937 | 883 | // MockButtonWidget_SetChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetChild' | |
| @@ -947,13 +893,7 @@ func (_e *MockButtonWidget_Expecter) SetChild(child interface{}) *MockButtonWidg | |||
| 947 | 893 | ||
| 948 | 894 | func (_c *MockButtonWidget_SetChild_Call) Run(run func(child layout.Widget)) *MockButtonWidget_SetChild_Call { | |
| 949 | 895 | _c.Call.Run(func(args mock.Arguments) { | |
| 950 | - | var arg0 layout.Widget | |
| 951 | - | if args[0] != nil { | |
| 952 | - | arg0 = args[0].(layout.Widget) | |
| 953 | - | } | |
| 954 | - | run( | |
| 955 | - | arg0, | |
| 956 | - | ) | |
| 896 | + | run(args[0].(layout.Widget)) | |
| 957 | 897 | }) | |
| 958 | 898 | return _c | |
| 959 | 899 | } | |
| @@ -963,15 +903,14 @@ func (_c *MockButtonWidget_SetChild_Call) Return() *MockButtonWidget_SetChild_Ca | |||
| 963 | 903 | return _c | |
| 964 | 904 | } | |
| 965 | 905 | ||
| 966 | - | func (_c *MockButtonWidget_SetChild_Call) RunAndReturn(run func(child layout.Widget)) *MockButtonWidget_SetChild_Call { | |
| 906 | + | func (_c *MockButtonWidget_SetChild_Call) RunAndReturn(run func(layout.Widget)) *MockButtonWidget_SetChild_Call { | |
| 967 | 907 | _c.Run(run) | |
| 968 | 908 | return _c | |
| 969 | 909 | } | |
| 970 | 910 | ||
| 971 | - | // SetFocusOnClick provides a mock function for the type MockButtonWidget | |
| 972 | - | func (_mock *MockButtonWidget) SetFocusOnClick(focusOnClick bool) { | |
| 973 | - | _mock.Called(focusOnClick) | |
| 974 | - | return | |
| 911 | + | // SetFocusOnClick provides a mock function with given fields: focusOnClick | |
| 912 | + | func (_m *MockButtonWidget) SetFocusOnClick(focusOnClick bool) { | |
| 913 | + | _m.Called(focusOnClick) | |
| 975 | 914 | } | |
| 976 | 915 | ||
| 977 | 916 | // MockButtonWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick' | |
| @@ -987,13 +926,7 @@ func (_e *MockButtonWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) * | |||
| 987 | 926 | ||
| 988 | 927 | func (_c *MockButtonWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockButtonWidget_SetFocusOnClick_Call { | |
| 989 | 928 | _c.Call.Run(func(args mock.Arguments) { | |
| 990 | - | var arg0 bool | |
| 991 | - | if args[0] != nil { | |
| 992 | - | arg0 = args[0].(bool) | |
| 993 | - | } | |
| 994 | - | run( | |
| 995 | - | arg0, | |
| 996 | - | ) | |
| 929 | + | run(args[0].(bool)) | |
| 997 | 930 | }) | |
| 998 | 931 | return _c | |
| 999 | 932 | } | |
| @@ -1003,15 +936,14 @@ func (_c *MockButtonWidget_SetFocusOnClick_Call) Return() *MockButtonWidget_SetF | |||
| 1003 | 936 | return _c | |
| 1004 | 937 | } | |
| 1005 | 938 | ||
| 1006 | - | func (_c *MockButtonWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockButtonWidget_SetFocusOnClick_Call { | |
| 939 | + | func (_c *MockButtonWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetFocusOnClick_Call { | |
| 1007 | 940 | _c.Run(run) | |
| 1008 | 941 | return _c | |
| 1009 | 942 | } | |
| 1010 | 943 | ||
| 1011 | - | // SetHalign provides a mock function for the type MockButtonWidget | |
| 1012 | - | func (_mock *MockButtonWidget) SetHalign(align gtk.Align) { | |
| 1013 | - | _mock.Called(align) | |
| 1014 | - | return | |
| 944 | + | // SetHalign provides a mock function with given fields: align | |
| 945 | + | func (_m *MockButtonWidget) SetHalign(align gtk.Align) { | |
| 946 | + | _m.Called(align) | |
| 1015 | 947 | } | |
| 1016 | 948 | ||
| 1017 | 949 | // MockButtonWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign' | |
| @@ -1027,13 +959,7 @@ func (_e *MockButtonWidget_Expecter) SetHalign(align interface{}) *MockButtonWid | |||
| 1027 | 959 | ||
| 1028 | 960 | func (_c *MockButtonWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockButtonWidget_SetHalign_Call { | |
| 1029 | 961 | _c.Call.Run(func(args mock.Arguments) { | |
| 1030 | - | var arg0 gtk.Align | |
| 1031 | - | if args[0] != nil { | |
| 1032 | - | arg0 = args[0].(gtk.Align) | |
| 1033 | - | } | |
| 1034 | - | run( | |
| 1035 | - | arg0, | |
| 1036 | - | ) | |
| 962 | + | run(args[0].(gtk.Align)) | |
| 1037 | 963 | }) | |
| 1038 | 964 | return _c | |
| 1039 | 965 | } | |
| @@ -1043,15 +969,14 @@ func (_c *MockButtonWidget_SetHalign_Call) Return() *MockButtonWidget_SetHalign_ | |||
| 1043 | 969 | return _c | |
| 1044 | 970 | } | |
| 1045 | 971 | ||
| 1046 | - | func (_c *MockButtonWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockButtonWidget_SetHalign_Call { | |
| 972 | + | func (_c *MockButtonWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockButtonWidget_SetHalign_Call { | |
| 1047 | 973 | _c.Run(run) | |
| 1048 | 974 | return _c | |
| 1049 | 975 | } | |
| 1050 | 976 | ||
| 1051 | - | // SetHexpand provides a mock function for the type MockButtonWidget | |
| 1052 | - | func (_mock *MockButtonWidget) SetHexpand(expand bool) { | |
| 1053 | - | _mock.Called(expand) | |
| 1054 | - | return | |
| 977 | + | // SetHexpand provides a mock function with given fields: expand | |
| 978 | + | func (_m *MockButtonWidget) SetHexpand(expand bool) { | |
| 979 | + | _m.Called(expand) | |
| 1055 | 980 | } | |
| 1056 | 981 | ||
| 1057 | 982 | // MockButtonWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand' | |
| @@ -1067,13 +992,7 @@ func (_e *MockButtonWidget_Expecter) SetHexpand(expand interface{}) *MockButtonW | |||
| 1067 | 992 | ||
| 1068 | 993 | func (_c *MockButtonWidget_SetHexpand_Call) Run(run func(expand bool)) *MockButtonWidget_SetHexpand_Call { | |
| 1069 | 994 | _c.Call.Run(func(args mock.Arguments) { | |
| 1070 | - | var arg0 bool | |
| 1071 | - | if args[0] != nil { | |
| 1072 | - | arg0 = args[0].(bool) | |
| 1073 | - | } | |
| 1074 | - | run( | |
| 1075 | - | arg0, | |
| 1076 | - | ) | |
| 995 | + | run(args[0].(bool)) | |
| 1077 | 996 | }) | |
| 1078 | 997 | return _c | |
| 1079 | 998 | } | |
| @@ -1083,15 +1002,14 @@ func (_c *MockButtonWidget_SetHexpand_Call) Return() *MockButtonWidget_SetHexpan | |||
| 1083 | 1002 | return _c | |
| 1084 | 1003 | } | |
| 1085 | 1004 | ||
| 1086 | - | func (_c *MockButtonWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockButtonWidget_SetHexpand_Call { | |
| 1005 | + | func (_c *MockButtonWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetHexpand_Call { | |
| 1087 | 1006 | _c.Run(run) | |
| 1088 | 1007 | return _c | |
| 1089 | 1008 | } | |
| 1090 | 1009 | ||
| 1091 | - | // SetLabel provides a mock function for the type MockButtonWidget | |
| 1092 | - | func (_mock *MockButtonWidget) SetLabel(label string) { | |
| 1093 | - | _mock.Called(label) | |
| 1094 | - | return | |
| 1010 | + | // SetLabel provides a mock function with given fields: label | |
| 1011 | + | func (_m *MockButtonWidget) SetLabel(label string) { | |
| 1012 | + | _m.Called(label) | |
| 1095 | 1013 | } | |
| 1096 | 1014 | ||
| 1097 | 1015 | // MockButtonWidget_SetLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLabel' | |
| @@ -1107,13 +1025,7 @@ func (_e *MockButtonWidget_Expecter) SetLabel(label interface{}) *MockButtonWidg | |||
| 1107 | 1025 | ||
| 1108 | 1026 | func (_c *MockButtonWidget_SetLabel_Call) Run(run func(label string)) *MockButtonWidget_SetLabel_Call { | |
| 1109 | 1027 | _c.Call.Run(func(args mock.Arguments) { | |
| 1110 | - | var arg0 string | |
| 1111 | - | if args[0] != nil { | |
| 1112 | - | arg0 = args[0].(string) | |
| 1113 | - | } | |
| 1114 | - | run( | |
| 1115 | - | arg0, | |
| 1116 | - | ) | |
| 1028 | + | run(args[0].(string)) | |
| 1117 | 1029 | }) | |
| 1118 | 1030 | return _c | |
| 1119 | 1031 | } | |
| @@ -1123,15 +1035,14 @@ func (_c *MockButtonWidget_SetLabel_Call) Return() *MockButtonWidget_SetLabel_Ca | |||
| 1123 | 1035 | return _c | |
| 1124 | 1036 | } | |
| 1125 | 1037 | ||
| 1126 | - | func (_c *MockButtonWidget_SetLabel_Call) RunAndReturn(run func(label string)) *MockButtonWidget_SetLabel_Call { | |
| 1038 | + | func (_c *MockButtonWidget_SetLabel_Call) RunAndReturn(run func(string)) *MockButtonWidget_SetLabel_Call { | |
| 1127 | 1039 | _c.Run(run) | |
| 1128 | 1040 | return _c | |
| 1129 | 1041 | } | |
| 1130 | 1042 | ||
| 1131 | - | // SetSizeRequest provides a mock function for the type MockButtonWidget | |
| 1132 | - | func (_mock *MockButtonWidget) SetSizeRequest(width int, height int) { | |
| 1133 | - | _mock.Called(width, height) | |
| 1134 | - | return | |
| 1043 | + | // SetSizeRequest provides a mock function with given fields: width, height | |
| 1044 | + | func (_m *MockButtonWidget) SetSizeRequest(width int, height int) { | |
| 1045 | + | _m.Called(width, height) | |
| 1135 | 1046 | } | |
| 1136 | 1047 | ||
| 1137 | 1048 | // MockButtonWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest' | |
| @@ -1148,18 +1059,7 @@ func (_e *MockButtonWidget_Expecter) SetSizeRequest(width interface{}, height in | |||
| 1148 | 1059 | ||
| 1149 | 1060 | func (_c *MockButtonWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockButtonWidget_SetSizeRequest_Call { | |
| 1150 | 1061 | _c.Call.Run(func(args mock.Arguments) { | |
| 1151 | - | var arg0 int | |
| 1152 | - | if args[0] != nil { | |
| 1153 | - | arg0 = args[0].(int) | |
| 1154 | - | } | |
| 1155 | - | var arg1 int | |
| 1156 | - | if args[1] != nil { | |
| 1157 | - | arg1 = args[1].(int) | |
| 1158 | - | } | |
| 1159 | - | run( | |
| 1160 | - | arg0, | |
| 1161 | - | arg1, | |
| 1162 | - | ) | |
| 1062 | + | run(args[0].(int), args[1].(int)) | |
| 1163 | 1063 | }) | |
| 1164 | 1064 | return _c | |
| 1165 | 1065 | } | |
| @@ -1169,15 +1069,14 @@ func (_c *MockButtonWidget_SetSizeRequest_Call) Return() *MockButtonWidget_SetSi | |||
| 1169 | 1069 | return _c | |
| 1170 | 1070 | } | |
| 1171 | 1071 | ||
| 1172 | - | func (_c *MockButtonWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockButtonWidget_SetSizeRequest_Call { | |
| 1072 | + | func (_c *MockButtonWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockButtonWidget_SetSizeRequest_Call { | |
| 1173 | 1073 | _c.Run(run) | |
| 1174 | 1074 | return _c | |
| 1175 | 1075 | } | |
| 1176 | 1076 | ||
| 1177 | - | // SetValign provides a mock function for the type MockButtonWidget | |
| 1178 | - | func (_mock *MockButtonWidget) SetValign(align gtk.Align) { | |
| 1179 | - | _mock.Called(align) | |
| 1180 | - | return | |
| 1077 | + | // SetValign provides a mock function with given fields: align | |
| 1078 | + | func (_m *MockButtonWidget) SetValign(align gtk.Align) { | |
| 1079 | + | _m.Called(align) | |
| 1181 | 1080 | } | |
| 1182 | 1081 | ||
| 1183 | 1082 | // MockButtonWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign' | |
| @@ -1193,13 +1092,7 @@ func (_e *MockButtonWidget_Expecter) SetValign(align interface{}) *MockButtonWid | |||
| 1193 | 1092 | ||
| 1194 | 1093 | func (_c *MockButtonWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockButtonWidget_SetValign_Call { | |
| 1195 | 1094 | _c.Call.Run(func(args mock.Arguments) { | |
| 1196 | - | var arg0 gtk.Align | |
| 1197 | - | if args[0] != nil { | |
| 1198 | - | arg0 = args[0].(gtk.Align) | |
| 1199 | - | } | |
| 1200 | - | run( | |
| 1201 | - | arg0, | |
| 1202 | - | ) | |
| 1095 | + | run(args[0].(gtk.Align)) | |
| 1203 | 1096 | }) | |
| 1204 | 1097 | return _c | |
| 1205 | 1098 | } | |
| @@ -1209,15 +1102,14 @@ func (_c *MockButtonWidget_SetValign_Call) Return() *MockButtonWidget_SetValign_ | |||
| 1209 | 1102 | return _c | |
| 1210 | 1103 | } | |
| 1211 | 1104 | ||
| 1212 | - | func (_c *MockButtonWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockButtonWidget_SetValign_Call { | |
| 1105 | + | func (_c *MockButtonWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockButtonWidget_SetValign_Call { | |
| 1213 | 1106 | _c.Run(run) | |
| 1214 | 1107 | return _c | |
| 1215 | 1108 | } | |
| 1216 | 1109 | ||
| 1217 | - | // SetVexpand provides a mock function for the type MockButtonWidget | |
| 1218 | - | func (_mock *MockButtonWidget) SetVexpand(expand bool) { | |
| 1219 | - | _mock.Called(expand) | |
| 1220 | - | return | |
| 1110 | + | // SetVexpand provides a mock function with given fields: expand | |
| 1111 | + | func (_m *MockButtonWidget) SetVexpand(expand bool) { | |
| 1112 | + | _m.Called(expand) | |
| 1221 | 1113 | } | |
| 1222 | 1114 | ||
| 1223 | 1115 | // MockButtonWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand' | |
| @@ -1233,13 +1125,7 @@ func (_e *MockButtonWidget_Expecter) SetVexpand(expand interface{}) *MockButtonW | |||
| 1233 | 1125 | ||
| 1234 | 1126 | func (_c *MockButtonWidget_SetVexpand_Call) Run(run func(expand bool)) *MockButtonWidget_SetVexpand_Call { | |
| 1235 | 1127 | _c.Call.Run(func(args mock.Arguments) { | |
| 1236 | - | var arg0 bool | |
| 1237 | - | if args[0] != nil { | |
| 1238 | - | arg0 = args[0].(bool) | |
| 1239 | - | } | |
| 1240 | - | run( | |
| 1241 | - | arg0, | |
| 1242 | - | ) | |
| 1128 | + | run(args[0].(bool)) | |
| 1243 | 1129 | }) | |
| 1244 | 1130 | return _c | |
| 1245 | 1131 | } | |
| @@ -1249,15 +1135,14 @@ func (_c *MockButtonWidget_SetVexpand_Call) Return() *MockButtonWidget_SetVexpan | |||
| 1249 | 1135 | return _c | |
| 1250 | 1136 | } | |
| 1251 | 1137 | ||
| 1252 | - | func (_c *MockButtonWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockButtonWidget_SetVexpand_Call { | |
| 1138 | + | func (_c *MockButtonWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetVexpand_Call { | |
| 1253 | 1139 | _c.Run(run) | |
| 1254 | 1140 | return _c | |
| 1255 | 1141 | } | |
| 1256 | 1142 | ||
| 1257 | - | // SetVisible provides a mock function for the type MockButtonWidget | |
| 1258 | - | func (_mock *MockButtonWidget) SetVisible(visible bool) { | |
| 1259 | - | _mock.Called(visible) | |
| 1260 | - | return | |
| 1143 | + | // SetVisible provides a mock function with given fields: visible | |
| 1144 | + | func (_m *MockButtonWidget) SetVisible(visible bool) { | |
| 1145 | + | _m.Called(visible) | |
| 1261 | 1146 | } | |
| 1262 | 1147 | ||
| 1263 | 1148 | // MockButtonWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible' | |
| @@ -1273,13 +1158,7 @@ func (_e *MockButtonWidget_Expecter) SetVisible(visible interface{}) *MockButton | |||
| 1273 | 1158 | ||
| 1274 | 1159 | func (_c *MockButtonWidget_SetVisible_Call) Run(run func(visible bool)) *MockButtonWidget_SetVisible_Call { | |
| 1275 | 1160 | _c.Call.Run(func(args mock.Arguments) { | |
| 1276 | - | var arg0 bool | |
| 1277 | - | if args[0] != nil { | |
| 1278 | - | arg0 = args[0].(bool) | |
| 1279 | - | } | |
| 1280 | - | run( | |
| 1281 | - | arg0, | |
| 1282 | - | ) | |
| 1161 | + | run(args[0].(bool)) | |
| 1283 | 1162 | }) | |
| 1284 | 1163 | return _c | |
| 1285 | 1164 | } | |
| @@ -1289,15 +1168,14 @@ func (_c *MockButtonWidget_SetVisible_Call) Return() *MockButtonWidget_SetVisibl | |||
| 1289 | 1168 | return _c | |
| 1290 | 1169 | } | |
| 1291 | 1170 | ||
| 1292 | - | func (_c *MockButtonWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockButtonWidget_SetVisible_Call { | |
| 1171 | + | func (_c *MockButtonWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockButtonWidget_SetVisible_Call { | |
| 1293 | 1172 | _c.Run(run) | |
| 1294 | 1173 | return _c | |
| 1295 | 1174 | } | |
| 1296 | 1175 | ||
| 1297 | - | // Show provides a mock function for the type MockButtonWidget | |
| 1298 | - | func (_mock *MockButtonWidget) Show() { | |
| 1299 | - | _mock.Called() | |
| 1300 | - | return | |
| 1176 | + | // Show provides a mock function with no fields | |
| 1177 | + | func (_m *MockButtonWidget) Show() { | |
| 1178 | + | _m.Called() | |
| 1301 | 1179 | } | |
| 1302 | 1180 | ||
| 1303 | 1181 | // MockButtonWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |
| @@ -1327,10 +1205,9 @@ func (_c *MockButtonWidget_Show_Call) RunAndReturn(run func()) *MockButtonWidget | |||
| 1327 | 1205 | return _c | |
| 1328 | 1206 | } | |
| 1329 | 1207 | ||
| 1330 | - | // Unparent provides a mock function for the type MockButtonWidget | |
| 1331 | - | func (_mock *MockButtonWidget) Unparent() { | |
| 1332 | - | _mock.Called() | |
| 1333 | - | return | |
| 1208 | + | // Unparent provides a mock function with no fields | |
| 1209 | + | func (_m *MockButtonWidget) Unparent() { | |
| 1210 | + | _m.Called() | |
| 1334 | 1211 | } | |
| 1335 | 1212 | ||
| 1336 | 1213 | // MockButtonWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent' | |
| @@ -1359,3 +1236,17 @@ func (_c *MockButtonWidget_Unparent_Call) RunAndReturn(run func()) *MockButtonWi | |||
| 1359 | 1236 | _c.Run(run) | |
| 1360 | 1237 | return _c | |
| 1361 | 1238 | } | |
| 1239 | + | ||
| 1240 | + | // NewMockButtonWidget creates a new instance of MockButtonWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 1241 | + | // The first argument is typically a *testing.T value. | |
| 1242 | + | func NewMockButtonWidget(t interface { | |
| 1243 | + | mock.TestingT | |
| 1244 | + | Cleanup(func()) | |
| 1245 | + | }) *MockButtonWidget { | |
| 1246 | + | mock := &MockButtonWidget{} | |
| 1247 | + | mock.Mock.Test(t) | |
| 1248 | + | ||
| 1249 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 1250 | + | ||
| 1251 | + | return mock | |
| 1252 | + | } | |
M internal/ui/layout/mocks/mock_image_widget.go +208 -329
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockImageWidget creates a new instance of MockImageWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockImageWidget(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockImageWidget { | |
| 19 | - | mock := &MockImageWidget{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockImageWidget is an autogenerated mock type for the ImageWidget type | |
| 28 | 13 | type MockImageWidget struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,10 +22,9 @@ func (_m *MockImageWidget) EXPECT() *MockImageWidget_Expecter { | |||
| 37 | 22 | return &MockImageWidget_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // AddController provides a mock function for the type MockImageWidget | |
| 41 | - | func (_mock *MockImageWidget) AddController(controller *gtk.EventController) { | |
| 42 | - | _mock.Called(controller) | |
| 43 | - | return | |
| 25 | + | // AddController provides a mock function with given fields: controller | |
| 26 | + | func (_m *MockImageWidget) AddController(controller *gtk.EventController) { | |
| 27 | + | _m.Called(controller) | |
| 44 | 28 | } | |
| 45 | 29 | ||
| 46 | 30 | // MockImageWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController' | |
| @@ -56,13 +40,7 @@ func (_e *MockImageWidget_Expecter) AddController(controller interface{}) *MockI | |||
| 56 | 40 | ||
| 57 | 41 | func (_c *MockImageWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockImageWidget_AddController_Call { | |
| 58 | 42 | _c.Call.Run(func(args mock.Arguments) { | |
| 59 | - | var arg0 *gtk.EventController | |
| 60 | - | if args[0] != nil { | |
| 61 | - | arg0 = args[0].(*gtk.EventController) | |
| 62 | - | } | |
| 63 | - | run( | |
| 64 | - | arg0, | |
| 65 | - | ) | |
| 43 | + | run(args[0].(*gtk.EventController)) | |
| 66 | 44 | }) | |
| 67 | 45 | return _c | |
| 68 | 46 | } | |
| @@ -72,15 +50,14 @@ func (_c *MockImageWidget_AddController_Call) Return() *MockImageWidget_AddContr | |||
| 72 | 50 | return _c | |
| 73 | 51 | } | |
| 74 | 52 | ||
| 75 | - | func (_c *MockImageWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockImageWidget_AddController_Call { | |
| 53 | + | func (_c *MockImageWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockImageWidget_AddController_Call { | |
| 76 | 54 | _c.Run(run) | |
| 77 | 55 | return _c | |
| 78 | 56 | } | |
| 79 | 57 | ||
| 80 | - | // AddCssClass provides a mock function for the type MockImageWidget | |
| 81 | - | func (_mock *MockImageWidget) AddCssClass(cssClass string) { | |
| 82 | - | _mock.Called(cssClass) | |
| 83 | - | return | |
| 58 | + | // AddCssClass provides a mock function with given fields: cssClass | |
| 59 | + | func (_m *MockImageWidget) AddCssClass(cssClass string) { | |
| 60 | + | _m.Called(cssClass) | |
| 84 | 61 | } | |
| 85 | 62 | ||
| 86 | 63 | // MockImageWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass' | |
| @@ -96,13 +73,7 @@ func (_e *MockImageWidget_Expecter) AddCssClass(cssClass interface{}) *MockImage | |||
| 96 | 73 | ||
| 97 | 74 | func (_c *MockImageWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockImageWidget_AddCssClass_Call { | |
| 98 | 75 | _c.Call.Run(func(args mock.Arguments) { | |
| 99 | - | var arg0 string | |
| 100 | - | if args[0] != nil { | |
| 101 | - | arg0 = args[0].(string) | |
| 102 | - | } | |
| 103 | - | run( | |
| 104 | - | arg0, | |
| 105 | - | ) | |
| 76 | + | run(args[0].(string)) | |
| 106 | 77 | }) | |
| 107 | 78 | return _c | |
| 108 | 79 | } | |
| @@ -112,15 +83,14 @@ func (_c *MockImageWidget_AddCssClass_Call) Return() *MockImageWidget_AddCssClas | |||
| 112 | 83 | return _c | |
| 113 | 84 | } | |
| 114 | 85 | ||
| 115 | - | func (_c *MockImageWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockImageWidget_AddCssClass_Call { | |
| 86 | + | func (_c *MockImageWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockImageWidget_AddCssClass_Call { | |
| 116 | 87 | _c.Run(run) | |
| 117 | 88 | return _c | |
| 118 | 89 | } | |
| 119 | 90 | ||
| 120 | - | // Clear provides a mock function for the type MockImageWidget | |
| 121 | - | func (_mock *MockImageWidget) Clear() { | |
| 122 | - | _mock.Called() | |
| 123 | - | return | |
| 91 | + | // Clear provides a mock function with no fields | |
| 92 | + | func (_m *MockImageWidget) Clear() { | |
| 93 | + | _m.Called() | |
| 124 | 94 | } | |
| 125 | 95 | ||
| 126 | 96 | // MockImageWidget_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear' | |
| @@ -150,9 +120,9 @@ func (_c *MockImageWidget_Clear_Call) RunAndReturn(run func()) *MockImageWidget_ | |||
| 150 | 120 | return _c | |
| 151 | 121 | } | |
| 152 | 122 | ||
| 153 | - | // ComputePoint provides a mock function for the type MockImageWidget | |
| 154 | - | func (_mock *MockImageWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 155 | - | ret := _mock.Called(target) | |
| 123 | + | // ComputePoint provides a mock function with given fields: target | |
| 124 | + | func (_m *MockImageWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 125 | + | ret := _m.Called(target) | |
| 156 | 126 | ||
| 157 | 127 | if len(ret) == 0 { | |
| 158 | 128 | panic("no return value specified for ComputePoint") | |
| @@ -161,24 +131,27 @@ func (_mock *MockImageWidget) ComputePoint(target layout.Widget) (float64, float | |||
| 161 | 131 | var r0 float64 | |
| 162 | 132 | var r1 float64 | |
| 163 | 133 | var r2 bool | |
| 164 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 165 | - | return returnFunc(target) | |
| 134 | + | if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 135 | + | return rf(target) | |
| 166 | 136 | } | |
| 167 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 168 | - | r0 = returnFunc(target) | |
| 137 | + | if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 138 | + | r0 = rf(target) | |
| 169 | 139 | } else { | |
| 170 | 140 | r0 = ret.Get(0).(float64) | |
| 171 | 141 | } | |
| 172 | - | if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 173 | - | r1 = returnFunc(target) | |
| 142 | + | ||
| 143 | + | if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 144 | + | r1 = rf(target) | |
| 174 | 145 | } else { | |
| 175 | 146 | r1 = ret.Get(1).(float64) | |
| 176 | 147 | } | |
| 177 | - | if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 178 | - | r2 = returnFunc(target) | |
| 148 | + | ||
| 149 | + | if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 150 | + | r2 = rf(target) | |
| 179 | 151 | } else { | |
| 180 | 152 | r2 = ret.Get(2).(bool) | |
| 181 | 153 | } | |
| 154 | + | ||
| 182 | 155 | return r0, r1, r2 | |
| 183 | 156 | } | |
| 184 | 157 | ||
| @@ -195,13 +168,7 @@ func (_e *MockImageWidget_Expecter) ComputePoint(target interface{}) *MockImageW | |||
| 195 | 168 | ||
| 196 | 169 | func (_c *MockImageWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockImageWidget_ComputePoint_Call { | |
| 197 | 170 | _c.Call.Run(func(args mock.Arguments) { | |
| 198 | - | var arg0 layout.Widget | |
| 199 | - | if args[0] != nil { | |
| 200 | - | arg0 = args[0].(layout.Widget) | |
| 201 | - | } | |
| 202 | - | run( | |
| 203 | - | arg0, | |
| 204 | - | ) | |
| 171 | + | run(args[0].(layout.Widget)) | |
| 205 | 172 | }) | |
| 206 | 173 | return _c | |
| 207 | 174 | } | |
| @@ -211,25 +178,26 @@ func (_c *MockImageWidget_ComputePoint_Call) Return(x float64, y float64, ok boo | |||
| 211 | 178 | return _c | |
| 212 | 179 | } | |
| 213 | 180 | ||
| 214 | - | func (_c *MockImageWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockImageWidget_ComputePoint_Call { | |
| 181 | + | func (_c *MockImageWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockImageWidget_ComputePoint_Call { | |
| 215 | 182 | _c.Call.Return(run) | |
| 216 | 183 | return _c | |
| 217 | 184 | } | |
| 218 | 185 | ||
| 219 | - | // GetAllocatedHeight provides a mock function for the type MockImageWidget | |
| 220 | - | func (_mock *MockImageWidget) GetAllocatedHeight() int { | |
| 221 | - | ret := _mock.Called() | |
| 186 | + | // GetAllocatedHeight provides a mock function with no fields | |
| 187 | + | func (_m *MockImageWidget) GetAllocatedHeight() int { | |
| 188 | + | ret := _m.Called() | |
| 222 | 189 | ||
| 223 | 190 | if len(ret) == 0 { | |
| 224 | 191 | panic("no return value specified for GetAllocatedHeight") | |
| 225 | 192 | } | |
| 226 | 193 | ||
| 227 | 194 | var r0 int | |
| 228 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 229 | - | r0 = returnFunc() | |
| 195 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 196 | + | r0 = rf() | |
| 230 | 197 | } else { | |
| 231 | 198 | r0 = ret.Get(0).(int) | |
| 232 | 199 | } | |
| 200 | + | ||
| 233 | 201 | return r0 | |
| 234 | 202 | } | |
| 235 | 203 | ||
| @@ -250,8 +218,8 @@ func (_c *MockImageWidget_GetAllocatedHeight_Call) Run(run func()) *MockImageWid | |||
| 250 | 218 | return _c | |
| 251 | 219 | } | |
| 252 | 220 | ||
| 253 | - | func (_c *MockImageWidget_GetAllocatedHeight_Call) Return(n int) *MockImageWidget_GetAllocatedHeight_Call { | |
| 254 | - | _c.Call.Return(n) | |
| 221 | + | func (_c *MockImageWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockImageWidget_GetAllocatedHeight_Call { | |
| 222 | + | _c.Call.Return(_a0) | |
| 255 | 223 | return _c | |
| 256 | 224 | } | |
| 257 | 225 | ||
| @@ -260,20 +228,21 @@ func (_c *MockImageWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) | |||
| 260 | 228 | return _c | |
| 261 | 229 | } | |
| 262 | 230 | ||
| 263 | - | // GetAllocatedWidth provides a mock function for the type MockImageWidget | |
| 264 | - | func (_mock *MockImageWidget) GetAllocatedWidth() int { | |
| 265 | - | ret := _mock.Called() | |
| 231 | + | // GetAllocatedWidth provides a mock function with no fields | |
| 232 | + | func (_m *MockImageWidget) GetAllocatedWidth() int { | |
| 233 | + | ret := _m.Called() | |
| 266 | 234 | ||
| 267 | 235 | if len(ret) == 0 { | |
| 268 | 236 | panic("no return value specified for GetAllocatedWidth") | |
| 269 | 237 | } | |
| 270 | 238 | ||
| 271 | 239 | var r0 int | |
| 272 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 273 | - | r0 = returnFunc() | |
| 240 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 241 | + | r0 = rf() | |
| 274 | 242 | } else { | |
| 275 | 243 | r0 = ret.Get(0).(int) | |
| 276 | 244 | } | |
| 245 | + | ||
| 277 | 246 | return r0 | |
| 278 | 247 | } | |
| 279 | 248 | ||
| @@ -294,8 +263,8 @@ func (_c *MockImageWidget_GetAllocatedWidth_Call) Run(run func()) *MockImageWidg | |||
| 294 | 263 | return _c | |
| 295 | 264 | } | |
| 296 | 265 | ||
| 297 | - | func (_c *MockImageWidget_GetAllocatedWidth_Call) Return(n int) *MockImageWidget_GetAllocatedWidth_Call { | |
| 298 | - | _c.Call.Return(n) | |
| 266 | + | func (_c *MockImageWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockImageWidget_GetAllocatedWidth_Call { | |
| 267 | + | _c.Call.Return(_a0) | |
| 299 | 268 | return _c | |
| 300 | 269 | } | |
| 301 | 270 | ||
| @@ -304,20 +273,21 @@ func (_c *MockImageWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) * | |||
| 304 | 273 | return _c | |
| 305 | 274 | } | |
| 306 | 275 | ||
| 307 | - | // GetHexpand provides a mock function for the type MockImageWidget | |
| 308 | - | func (_mock *MockImageWidget) GetHexpand() bool { | |
| 309 | - | ret := _mock.Called() | |
| 276 | + | // GetHexpand provides a mock function with no fields | |
| 277 | + | func (_m *MockImageWidget) GetHexpand() bool { | |
| 278 | + | ret := _m.Called() | |
| 310 | 279 | ||
| 311 | 280 | if len(ret) == 0 { | |
| 312 | 281 | panic("no return value specified for GetHexpand") | |
| 313 | 282 | } | |
| 314 | 283 | ||
| 315 | 284 | var r0 bool | |
| 316 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 317 | - | r0 = returnFunc() | |
| 285 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 286 | + | r0 = rf() | |
| 318 | 287 | } else { | |
| 319 | 288 | r0 = ret.Get(0).(bool) | |
| 320 | 289 | } | |
| 290 | + | ||
| 321 | 291 | return r0 | |
| 322 | 292 | } | |
| 323 | 293 | ||
| @@ -338,8 +308,8 @@ func (_c *MockImageWidget_GetHexpand_Call) Run(run func()) *MockImageWidget_GetH | |||
| 338 | 308 | return _c | |
| 339 | 309 | } | |
| 340 | 310 | ||
| 341 | - | func (_c *MockImageWidget_GetHexpand_Call) Return(b bool) *MockImageWidget_GetHexpand_Call { | |
| 342 | - | _c.Call.Return(b) | |
| 311 | + | func (_c *MockImageWidget_GetHexpand_Call) Return(_a0 bool) *MockImageWidget_GetHexpand_Call { | |
| 312 | + | _c.Call.Return(_a0) | |
| 343 | 313 | return _c | |
| 344 | 314 | } | |
| 345 | 315 | ||
| @@ -348,22 +318,23 @@ func (_c *MockImageWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockIm | |||
| 348 | 318 | return _c | |
| 349 | 319 | } | |
| 350 | 320 | ||
| 351 | - | // GetParent provides a mock function for the type MockImageWidget | |
| 352 | - | func (_mock *MockImageWidget) GetParent() layout.Widget { | |
| 353 | - | ret := _mock.Called() | |
| 321 | + | // GetParent provides a mock function with no fields | |
| 322 | + | func (_m *MockImageWidget) GetParent() layout.Widget { | |
| 323 | + | ret := _m.Called() | |
| 354 | 324 | ||
| 355 | 325 | if len(ret) == 0 { | |
| 356 | 326 | panic("no return value specified for GetParent") | |
| 357 | 327 | } | |
| 358 | 328 | ||
| 359 | 329 | var r0 layout.Widget | |
| 360 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 361 | - | r0 = returnFunc() | |
| 330 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 331 | + | r0 = rf() | |
| 362 | 332 | } else { | |
| 363 | 333 | if ret.Get(0) != nil { | |
| 364 | 334 | r0 = ret.Get(0).(layout.Widget) | |
| 365 | 335 | } | |
| 366 | 336 | } | |
| 337 | + | ||
| 367 | 338 | return r0 | |
| 368 | 339 | } | |
| 369 | 340 | ||
| @@ -384,8 +355,8 @@ func (_c *MockImageWidget_GetParent_Call) Run(run func()) *MockImageWidget_GetPa | |||
| 384 | 355 | return _c | |
| 385 | 356 | } | |
| 386 | 357 | ||
| 387 | - | func (_c *MockImageWidget_GetParent_Call) Return(widget layout.Widget) *MockImageWidget_GetParent_Call { | |
| 388 | - | _c.Call.Return(widget) | |
| 358 | + | func (_c *MockImageWidget_GetParent_Call) Return(_a0 layout.Widget) *MockImageWidget_GetParent_Call { | |
| 359 | + | _c.Call.Return(_a0) | |
| 389 | 360 | return _c | |
| 390 | 361 | } | |
| 391 | 362 | ||
| @@ -394,20 +365,21 @@ func (_c *MockImageWidget_GetParent_Call) RunAndReturn(run func() layout.Widget) | |||
| 394 | 365 | return _c | |
| 395 | 366 | } | |
| 396 | 367 | ||
| 397 | - | // GetVexpand provides a mock function for the type MockImageWidget | |
| 398 | - | func (_mock *MockImageWidget) GetVexpand() bool { | |
| 399 | - | ret := _mock.Called() | |
| 368 | + | // GetVexpand provides a mock function with no fields | |
| 369 | + | func (_m *MockImageWidget) GetVexpand() bool { | |
| 370 | + | ret := _m.Called() | |
| 400 | 371 | ||
| 401 | 372 | if len(ret) == 0 { | |
| 402 | 373 | panic("no return value specified for GetVexpand") | |
| 403 | 374 | } | |
| 404 | 375 | ||
| 405 | 376 | var r0 bool | |
| 406 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 407 | - | r0 = returnFunc() | |
| 377 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 378 | + | r0 = rf() | |
| 408 | 379 | } else { | |
| 409 | 380 | r0 = ret.Get(0).(bool) | |
| 410 | 381 | } | |
| 382 | + | ||
| 411 | 383 | return r0 | |
| 412 | 384 | } | |
| 413 | 385 | ||
| @@ -428,8 +400,8 @@ func (_c *MockImageWidget_GetVexpand_Call) Run(run func()) *MockImageWidget_GetV | |||
| 428 | 400 | return _c | |
| 429 | 401 | } | |
| 430 | 402 | ||
| 431 | - | func (_c *MockImageWidget_GetVexpand_Call) Return(b bool) *MockImageWidget_GetVexpand_Call { | |
| 432 | - | _c.Call.Return(b) | |
| 403 | + | func (_c *MockImageWidget_GetVexpand_Call) Return(_a0 bool) *MockImageWidget_GetVexpand_Call { | |
| 404 | + | _c.Call.Return(_a0) | |
| 433 | 405 | return _c | |
| 434 | 406 | } | |
| 435 | 407 | ||
| @@ -438,20 +410,21 @@ func (_c *MockImageWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockIm | |||
| 438 | 410 | return _c | |
| 439 | 411 | } | |
| 440 | 412 | ||
| 441 | - | // GrabFocus provides a mock function for the type MockImageWidget | |
| 442 | - | func (_mock *MockImageWidget) GrabFocus() bool { | |
| 443 | - | ret := _mock.Called() | |
| 413 | + | // GrabFocus provides a mock function with no fields | |
| 414 | + | func (_m *MockImageWidget) GrabFocus() bool { | |
| 415 | + | ret := _m.Called() | |
| 444 | 416 | ||
| 445 | 417 | if len(ret) == 0 { | |
| 446 | 418 | panic("no return value specified for GrabFocus") | |
| 447 | 419 | } | |
| 448 | 420 | ||
| 449 | 421 | var r0 bool | |
| 450 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 451 | - | r0 = returnFunc() | |
| 422 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 423 | + | r0 = rf() | |
| 452 | 424 | } else { | |
| 453 | 425 | r0 = ret.Get(0).(bool) | |
| 454 | 426 | } | |
| 427 | + | ||
| 455 | 428 | return r0 | |
| 456 | 429 | } | |
| 457 | 430 | ||
| @@ -472,8 +445,8 @@ func (_c *MockImageWidget_GrabFocus_Call) Run(run func()) *MockImageWidget_GrabF | |||
| 472 | 445 | return _c | |
| 473 | 446 | } | |
| 474 | 447 | ||
| 475 | - | func (_c *MockImageWidget_GrabFocus_Call) Return(b bool) *MockImageWidget_GrabFocus_Call { | |
| 476 | - | _c.Call.Return(b) | |
| 448 | + | func (_c *MockImageWidget_GrabFocus_Call) Return(_a0 bool) *MockImageWidget_GrabFocus_Call { | |
| 449 | + | _c.Call.Return(_a0) | |
| 477 | 450 | return _c | |
| 478 | 451 | } | |
| 479 | 452 | ||
| @@ -482,22 +455,23 @@ func (_c *MockImageWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockIma | |||
| 482 | 455 | return _c | |
| 483 | 456 | } | |
| 484 | 457 | ||
| 485 | - | // GtkWidget provides a mock function for the type MockImageWidget | |
| 486 | - | func (_mock *MockImageWidget) GtkWidget() *gtk.Widget { | |
| 487 | - | ret := _mock.Called() | |
| 458 | + | // GtkWidget provides a mock function with no fields | |
| 459 | + | func (_m *MockImageWidget) GtkWidget() *gtk.Widget { | |
| 460 | + | ret := _m.Called() | |
| 488 | 461 | ||
| 489 | 462 | if len(ret) == 0 { | |
| 490 | 463 | panic("no return value specified for GtkWidget") | |
| 491 | 464 | } | |
| 492 | 465 | ||
| 493 | 466 | var r0 *gtk.Widget | |
| 494 | - | if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 495 | - | r0 = returnFunc() | |
| 467 | + | if rf, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 468 | + | r0 = rf() | |
| 496 | 469 | } else { | |
| 497 | 470 | if ret.Get(0) != nil { | |
| 498 | 471 | r0 = ret.Get(0).(*gtk.Widget) | |
| 499 | 472 | } | |
| 500 | 473 | } | |
| 474 | + | ||
| 501 | 475 | return r0 | |
| 502 | 476 | } | |
| 503 | 477 | ||
| @@ -518,8 +492,8 @@ func (_c *MockImageWidget_GtkWidget_Call) Run(run func()) *MockImageWidget_GtkWi | |||
| 518 | 492 | return _c | |
| 519 | 493 | } | |
| 520 | 494 | ||
| 521 | - | func (_c *MockImageWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockImageWidget_GtkWidget_Call { | |
| 522 | - | _c.Call.Return(widget) | |
| 495 | + | func (_c *MockImageWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockImageWidget_GtkWidget_Call { | |
| 496 | + | _c.Call.Return(_a0) | |
| 523 | 497 | return _c | |
| 524 | 498 | } | |
| 525 | 499 | ||
| @@ -528,20 +502,21 @@ func (_c *MockImageWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) * | |||
| 528 | 502 | return _c | |
| 529 | 503 | } | |
| 530 | 504 | ||
| 531 | - | // HasCssClass provides a mock function for the type MockImageWidget | |
| 532 | - | func (_mock *MockImageWidget) HasCssClass(cssClass string) bool { | |
| 533 | - | ret := _mock.Called(cssClass) | |
| 505 | + | // HasCssClass provides a mock function with given fields: cssClass | |
| 506 | + | func (_m *MockImageWidget) HasCssClass(cssClass string) bool { | |
| 507 | + | ret := _m.Called(cssClass) | |
| 534 | 508 | ||
| 535 | 509 | if len(ret) == 0 { | |
| 536 | 510 | panic("no return value specified for HasCssClass") | |
| 537 | 511 | } | |
| 538 | 512 | ||
| 539 | 513 | var r0 bool | |
| 540 | - | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |
| 541 | - | r0 = returnFunc(cssClass) | |
| 514 | + | if rf, ok := ret.Get(0).(func(string) bool); ok { | |
| 515 | + | r0 = rf(cssClass) | |
| 542 | 516 | } else { | |
| 543 | 517 | r0 = ret.Get(0).(bool) | |
| 544 | 518 | } | |
| 519 | + | ||
| 545 | 520 | return r0 | |
| 546 | 521 | } | |
| 547 | 522 | ||
| @@ -558,41 +533,36 @@ func (_e *MockImageWidget_Expecter) HasCssClass(cssClass interface{}) *MockImage | |||
| 558 | 533 | ||
| 559 | 534 | func (_c *MockImageWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockImageWidget_HasCssClass_Call { | |
| 560 | 535 | _c.Call.Run(func(args mock.Arguments) { | |
| 561 | - | var arg0 string | |
| 562 | - | if args[0] != nil { | |
| 563 | - | arg0 = args[0].(string) | |
| 564 | - | } | |
| 565 | - | run( | |
| 566 | - | arg0, | |
| 567 | - | ) | |
| 536 | + | run(args[0].(string)) | |
| 568 | 537 | }) | |
| 569 | 538 | return _c | |
| 570 | 539 | } | |
| 571 | 540 | ||
| 572 | - | func (_c *MockImageWidget_HasCssClass_Call) Return(b bool) *MockImageWidget_HasCssClass_Call { | |
| 573 | - | _c.Call.Return(b) | |
| 541 | + | func (_c *MockImageWidget_HasCssClass_Call) Return(_a0 bool) *MockImageWidget_HasCssClass_Call { | |
| 542 | + | _c.Call.Return(_a0) | |
| 574 | 543 | return _c | |
| 575 | 544 | } | |
| 576 | 545 | ||
| 577 | - | func (_c *MockImageWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockImageWidget_HasCssClass_Call { | |
| 546 | + | func (_c *MockImageWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockImageWidget_HasCssClass_Call { | |
| 578 | 547 | _c.Call.Return(run) | |
| 579 | 548 | return _c | |
| 580 | 549 | } | |
| 581 | 550 | ||
| 582 | - | // HasFocus provides a mock function for the type MockImageWidget | |
| 583 | - | func (_mock *MockImageWidget) HasFocus() bool { | |
| 584 | - | ret := _mock.Called() | |
| 551 | + | // HasFocus provides a mock function with no fields | |
| 552 | + | func (_m *MockImageWidget) HasFocus() bool { | |
| 553 | + | ret := _m.Called() | |
| 585 | 554 | ||
| 586 | 555 | if len(ret) == 0 { | |
| 587 | 556 | panic("no return value specified for HasFocus") | |
| 588 | 557 | } | |
| 589 | 558 | ||
| 590 | 559 | var r0 bool | |
| 591 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 592 | - | r0 = returnFunc() | |
| 560 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 561 | + | r0 = rf() | |
| 593 | 562 | } else { | |
| 594 | 563 | r0 = ret.Get(0).(bool) | |
| 595 | 564 | } | |
| 565 | + | ||
| 596 | 566 | return r0 | |
| 597 | 567 | } | |
| 598 | 568 | ||
| @@ -613,8 +583,8 @@ func (_c *MockImageWidget_HasFocus_Call) Run(run func()) *MockImageWidget_HasFoc | |||
| 613 | 583 | return _c | |
| 614 | 584 | } | |
| 615 | 585 | ||
| 616 | - | func (_c *MockImageWidget_HasFocus_Call) Return(b bool) *MockImageWidget_HasFocus_Call { | |
| 617 | - | _c.Call.Return(b) | |
| 586 | + | func (_c *MockImageWidget_HasFocus_Call) Return(_a0 bool) *MockImageWidget_HasFocus_Call { | |
| 587 | + | _c.Call.Return(_a0) | |
| 618 | 588 | return _c | |
| 619 | 589 | } | |
| 620 | 590 | ||
| @@ -623,10 +593,9 @@ func (_c *MockImageWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockImag | |||
| 623 | 593 | return _c | |
| 624 | 594 | } | |
| 625 | 595 | ||
| 626 | - | // Hide provides a mock function for the type MockImageWidget | |
| 627 | - | func (_mock *MockImageWidget) Hide() { | |
| 628 | - | _mock.Called() | |
| 629 | - | return | |
| 596 | + | // Hide provides a mock function with no fields | |
| 597 | + | func (_m *MockImageWidget) Hide() { | |
| 598 | + | _m.Called() | |
| 630 | 599 | } | |
| 631 | 600 | ||
| 632 | 601 | // MockImageWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |
| @@ -656,20 +625,21 @@ func (_c *MockImageWidget_Hide_Call) RunAndReturn(run func()) *MockImageWidget_H | |||
| 656 | 625 | return _c | |
| 657 | 626 | } | |
| 658 | 627 | ||
| 659 | - | // IsVisible provides a mock function for the type MockImageWidget | |
| 660 | - | func (_mock *MockImageWidget) IsVisible() bool { | |
| 661 | - | ret := _mock.Called() | |
| 628 | + | // IsVisible provides a mock function with no fields | |
| 629 | + | func (_m *MockImageWidget) IsVisible() bool { | |
| 630 | + | ret := _m.Called() | |
| 662 | 631 | ||
| 663 | 632 | if len(ret) == 0 { | |
| 664 | 633 | panic("no return value specified for IsVisible") | |
| 665 | 634 | } | |
| 666 | 635 | ||
| 667 | 636 | var r0 bool | |
| 668 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 669 | - | r0 = returnFunc() | |
| 637 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 638 | + | r0 = rf() | |
| 670 | 639 | } else { | |
| 671 | 640 | r0 = ret.Get(0).(bool) | |
| 672 | 641 | } | |
| 642 | + | ||
| 673 | 643 | return r0 | |
| 674 | 644 | } | |
| 675 | 645 | ||
| @@ -690,8 +660,8 @@ func (_c *MockImageWidget_IsVisible_Call) Run(run func()) *MockImageWidget_IsVis | |||
| 690 | 660 | return _c | |
| 691 | 661 | } | |
| 692 | 662 | ||
| 693 | - | func (_c *MockImageWidget_IsVisible_Call) Return(b bool) *MockImageWidget_IsVisible_Call { | |
| 694 | - | _c.Call.Return(b) | |
| 663 | + | func (_c *MockImageWidget_IsVisible_Call) Return(_a0 bool) *MockImageWidget_IsVisible_Call { | |
| 664 | + | _c.Call.Return(_a0) | |
| 695 | 665 | return _c | |
| 696 | 666 | } | |
| 697 | 667 | ||
| @@ -700,10 +670,9 @@ func (_c *MockImageWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockIma | |||
| 700 | 670 | return _c | |
| 701 | 671 | } | |
| 702 | 672 | ||
| 703 | - | // RemoveCssClass provides a mock function for the type MockImageWidget | |
| 704 | - | func (_mock *MockImageWidget) RemoveCssClass(cssClass string) { | |
| 705 | - | _mock.Called(cssClass) | |
| 706 | - | return | |
| 673 | + | // RemoveCssClass provides a mock function with given fields: cssClass | |
| 674 | + | func (_m *MockImageWidget) RemoveCssClass(cssClass string) { | |
| 675 | + | _m.Called(cssClass) | |
| 707 | 676 | } | |
| 708 | 677 | ||
| 709 | 678 | // MockImageWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass' | |
| @@ -719,13 +688,7 @@ func (_e *MockImageWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockIm | |||
| 719 | 688 | ||
| 720 | 689 | func (_c *MockImageWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockImageWidget_RemoveCssClass_Call { | |
| 721 | 690 | _c.Call.Run(func(args mock.Arguments) { | |
| 722 | - | var arg0 string | |
| 723 | - | if args[0] != nil { | |
| 724 | - | arg0 = args[0].(string) | |
| 725 | - | } | |
| 726 | - | run( | |
| 727 | - | arg0, | |
| 728 | - | ) | |
| 691 | + | run(args[0].(string)) | |
| 729 | 692 | }) | |
| 730 | 693 | return _c | |
| 731 | 694 | } | |
| @@ -735,15 +698,14 @@ func (_c *MockImageWidget_RemoveCssClass_Call) Return() *MockImageWidget_RemoveC | |||
| 735 | 698 | return _c | |
| 736 | 699 | } | |
| 737 | 700 | ||
| 738 | - | func (_c *MockImageWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockImageWidget_RemoveCssClass_Call { | |
| 701 | + | func (_c *MockImageWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockImageWidget_RemoveCssClass_Call { | |
| 739 | 702 | _c.Run(run) | |
| 740 | 703 | return _c | |
| 741 | 704 | } | |
| 742 | 705 | ||
| 743 | - | // SetCanFocus provides a mock function for the type MockImageWidget | |
| 744 | - | func (_mock *MockImageWidget) SetCanFocus(canFocus bool) { | |
| 745 | - | _mock.Called(canFocus) | |
| 746 | - | return | |
| 706 | + | // SetCanFocus provides a mock function with given fields: canFocus | |
| 707 | + | func (_m *MockImageWidget) SetCanFocus(canFocus bool) { | |
| 708 | + | _m.Called(canFocus) | |
| 747 | 709 | } | |
| 748 | 710 | ||
| 749 | 711 | // MockImageWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus' | |
| @@ -759,13 +721,7 @@ func (_e *MockImageWidget_Expecter) SetCanFocus(canFocus interface{}) *MockImage | |||
| 759 | 721 | ||
| 760 | 722 | func (_c *MockImageWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockImageWidget_SetCanFocus_Call { | |
| 761 | 723 | _c.Call.Run(func(args mock.Arguments) { | |
| 762 | - | var arg0 bool | |
| 763 | - | if args[0] != nil { | |
| 764 | - | arg0 = args[0].(bool) | |
| 765 | - | } | |
| 766 | - | run( | |
| 767 | - | arg0, | |
| 768 | - | ) | |
| 724 | + | run(args[0].(bool)) | |
| 769 | 725 | }) | |
| 770 | 726 | return _c | |
| 771 | 727 | } | |
| @@ -775,15 +731,14 @@ func (_c *MockImageWidget_SetCanFocus_Call) Return() *MockImageWidget_SetCanFocu | |||
| 775 | 731 | return _c | |
| 776 | 732 | } | |
| 777 | 733 | ||
| 778 | - | func (_c *MockImageWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockImageWidget_SetCanFocus_Call { | |
| 734 | + | func (_c *MockImageWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetCanFocus_Call { | |
| 779 | 735 | _c.Run(run) | |
| 780 | 736 | return _c | |
| 781 | 737 | } | |
| 782 | 738 | ||
| 783 | - | // SetCanTarget provides a mock function for the type MockImageWidget | |
| 784 | - | func (_mock *MockImageWidget) SetCanTarget(canTarget bool) { | |
| 785 | - | _mock.Called(canTarget) | |
| 786 | - | return | |
| 739 | + | // SetCanTarget provides a mock function with given fields: canTarget | |
| 740 | + | func (_m *MockImageWidget) SetCanTarget(canTarget bool) { | |
| 741 | + | _m.Called(canTarget) | |
| 787 | 742 | } | |
| 788 | 743 | ||
| 789 | 744 | // MockImageWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget' | |
| @@ -799,13 +754,7 @@ func (_e *MockImageWidget_Expecter) SetCanTarget(canTarget interface{}) *MockIma | |||
| 799 | 754 | ||
| 800 | 755 | func (_c *MockImageWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockImageWidget_SetCanTarget_Call { | |
| 801 | 756 | _c.Call.Run(func(args mock.Arguments) { | |
| 802 | - | var arg0 bool | |
| 803 | - | if args[0] != nil { | |
| 804 | - | arg0 = args[0].(bool) | |
| 805 | - | } | |
| 806 | - | run( | |
| 807 | - | arg0, | |
| 808 | - | ) | |
| 757 | + | run(args[0].(bool)) | |
| 809 | 758 | }) | |
| 810 | 759 | return _c | |
| 811 | 760 | } | |
| @@ -815,15 +764,14 @@ func (_c *MockImageWidget_SetCanTarget_Call) Return() *MockImageWidget_SetCanTar | |||
| 815 | 764 | return _c | |
| 816 | 765 | } | |
| 817 | 766 | ||
| 818 | - | func (_c *MockImageWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockImageWidget_SetCanTarget_Call { | |
| 767 | + | func (_c *MockImageWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetCanTarget_Call { | |
| 819 | 768 | _c.Run(run) | |
| 820 | 769 | return _c | |
| 821 | 770 | } | |
| 822 | 771 | ||
| 823 | - | // SetFocusOnClick provides a mock function for the type MockImageWidget | |
| 824 | - | func (_mock *MockImageWidget) SetFocusOnClick(focusOnClick bool) { | |
| 825 | - | _mock.Called(focusOnClick) | |
| 826 | - | return | |
| 772 | + | // SetFocusOnClick provides a mock function with given fields: focusOnClick | |
| 773 | + | func (_m *MockImageWidget) SetFocusOnClick(focusOnClick bool) { | |
| 774 | + | _m.Called(focusOnClick) | |
| 827 | 775 | } | |
| 828 | 776 | ||
| 829 | 777 | // MockImageWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick' | |
| @@ -839,13 +787,7 @@ func (_e *MockImageWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *M | |||
| 839 | 787 | ||
| 840 | 788 | func (_c *MockImageWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockImageWidget_SetFocusOnClick_Call { | |
| 841 | 789 | _c.Call.Run(func(args mock.Arguments) { | |
| 842 | - | var arg0 bool | |
| 843 | - | if args[0] != nil { | |
| 844 | - | arg0 = args[0].(bool) | |
| 845 | - | } | |
| 846 | - | run( | |
| 847 | - | arg0, | |
| 848 | - | ) | |
| 790 | + | run(args[0].(bool)) | |
| 849 | 791 | }) | |
| 850 | 792 | return _c | |
| 851 | 793 | } | |
| @@ -855,15 +797,14 @@ func (_c *MockImageWidget_SetFocusOnClick_Call) Return() *MockImageWidget_SetFoc | |||
| 855 | 797 | return _c | |
| 856 | 798 | } | |
| 857 | 799 | ||
| 858 | - | func (_c *MockImageWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockImageWidget_SetFocusOnClick_Call { | |
| 800 | + | func (_c *MockImageWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetFocusOnClick_Call { | |
| 859 | 801 | _c.Run(run) | |
| 860 | 802 | return _c | |
| 861 | 803 | } | |
| 862 | 804 | ||
| 863 | - | // SetFromFile provides a mock function for the type MockImageWidget | |
| 864 | - | func (_mock *MockImageWidget) SetFromFile(filename string) { | |
| 865 | - | _mock.Called(filename) | |
| 866 | - | return | |
| 805 | + | // SetFromFile provides a mock function with given fields: filename | |
| 806 | + | func (_m *MockImageWidget) SetFromFile(filename string) { | |
| 807 | + | _m.Called(filename) | |
| 867 | 808 | } | |
| 868 | 809 | ||
| 869 | 810 | // MockImageWidget_SetFromFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFromFile' | |
| @@ -879,13 +820,7 @@ func (_e *MockImageWidget_Expecter) SetFromFile(filename interface{}) *MockImage | |||
| 879 | 820 | ||
| 880 | 821 | func (_c *MockImageWidget_SetFromFile_Call) Run(run func(filename string)) *MockImageWidget_SetFromFile_Call { | |
| 881 | 822 | _c.Call.Run(func(args mock.Arguments) { | |
| 882 | - | var arg0 string | |
| 883 | - | if args[0] != nil { | |
| 884 | - | arg0 = args[0].(string) | |
| 885 | - | } | |
| 886 | - | run( | |
| 887 | - | arg0, | |
| 888 | - | ) | |
| 823 | + | run(args[0].(string)) | |
| 889 | 824 | }) | |
| 890 | 825 | return _c | |
| 891 | 826 | } | |
| @@ -895,15 +830,14 @@ func (_c *MockImageWidget_SetFromFile_Call) Return() *MockImageWidget_SetFromFil | |||
| 895 | 830 | return _c | |
| 896 | 831 | } | |
| 897 | 832 | ||
| 898 | - | func (_c *MockImageWidget_SetFromFile_Call) RunAndReturn(run func(filename string)) *MockImageWidget_SetFromFile_Call { | |
| 833 | + | func (_c *MockImageWidget_SetFromFile_Call) RunAndReturn(run func(string)) *MockImageWidget_SetFromFile_Call { | |
| 899 | 834 | _c.Run(run) | |
| 900 | 835 | return _c | |
| 901 | 836 | } | |
| 902 | 837 | ||
| 903 | - | // SetFromIconName provides a mock function for the type MockImageWidget | |
| 904 | - | func (_mock *MockImageWidget) SetFromIconName(iconName string) { | |
| 905 | - | _mock.Called(iconName) | |
| 906 | - | return | |
| 838 | + | // SetFromIconName provides a mock function with given fields: iconName | |
| 839 | + | func (_m *MockImageWidget) SetFromIconName(iconName string) { | |
| 840 | + | _m.Called(iconName) | |
| 907 | 841 | } | |
| 908 | 842 | ||
| 909 | 843 | // MockImageWidget_SetFromIconName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFromIconName' | |
| @@ -919,13 +853,7 @@ func (_e *MockImageWidget_Expecter) SetFromIconName(iconName interface{}) *MockI | |||
| 919 | 853 | ||
| 920 | 854 | func (_c *MockImageWidget_SetFromIconName_Call) Run(run func(iconName string)) *MockImageWidget_SetFromIconName_Call { | |
| 921 | 855 | _c.Call.Run(func(args mock.Arguments) { | |
| 922 | - | var arg0 string | |
| 923 | - | if args[0] != nil { | |
| 924 | - | arg0 = args[0].(string) | |
| 925 | - | } | |
| 926 | - | run( | |
| 927 | - | arg0, | |
| 928 | - | ) | |
| 856 | + | run(args[0].(string)) | |
| 929 | 857 | }) | |
| 930 | 858 | return _c | |
| 931 | 859 | } | |
| @@ -935,15 +863,14 @@ func (_c *MockImageWidget_SetFromIconName_Call) Return() *MockImageWidget_SetFro | |||
| 935 | 863 | return _c | |
| 936 | 864 | } | |
| 937 | 865 | ||
| 938 | - | func (_c *MockImageWidget_SetFromIconName_Call) RunAndReturn(run func(iconName string)) *MockImageWidget_SetFromIconName_Call { | |
| 866 | + | func (_c *MockImageWidget_SetFromIconName_Call) RunAndReturn(run func(string)) *MockImageWidget_SetFromIconName_Call { | |
| 939 | 867 | _c.Run(run) | |
| 940 | 868 | return _c | |
| 941 | 869 | } | |
| 942 | 870 | ||
| 943 | - | // SetFromPaintable provides a mock function for the type MockImageWidget | |
| 944 | - | func (_mock *MockImageWidget) SetFromPaintable(paintable layout.Paintable) { | |
| 945 | - | _mock.Called(paintable) | |
| 946 | - | return | |
| 871 | + | // SetFromPaintable provides a mock function with given fields: paintable | |
| 872 | + | func (_m *MockImageWidget) SetFromPaintable(paintable layout.Paintable) { | |
| 873 | + | _m.Called(paintable) | |
| 947 | 874 | } | |
| 948 | 875 | ||
| 949 | 876 | // MockImageWidget_SetFromPaintable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFromPaintable' | |
| @@ -959,13 +886,7 @@ func (_e *MockImageWidget_Expecter) SetFromPaintable(paintable interface{}) *Moc | |||
| 959 | 886 | ||
| 960 | 887 | func (_c *MockImageWidget_SetFromPaintable_Call) Run(run func(paintable layout.Paintable)) *MockImageWidget_SetFromPaintable_Call { | |
| 961 | 888 | _c.Call.Run(func(args mock.Arguments) { | |
| 962 | - | var arg0 layout.Paintable | |
| 963 | - | if args[0] != nil { | |
| 964 | - | arg0 = args[0].(layout.Paintable) | |
| 965 | - | } | |
| 966 | - | run( | |
| 967 | - | arg0, | |
| 968 | - | ) | |
| 889 | + | run(args[0].(layout.Paintable)) | |
| 969 | 890 | }) | |
| 970 | 891 | return _c | |
| 971 | 892 | } | |
| @@ -975,15 +896,14 @@ func (_c *MockImageWidget_SetFromPaintable_Call) Return() *MockImageWidget_SetFr | |||
| 975 | 896 | return _c | |
| 976 | 897 | } | |
| 977 | 898 | ||
| 978 | - | func (_c *MockImageWidget_SetFromPaintable_Call) RunAndReturn(run func(paintable layout.Paintable)) *MockImageWidget_SetFromPaintable_Call { | |
| 899 | + | func (_c *MockImageWidget_SetFromPaintable_Call) RunAndReturn(run func(layout.Paintable)) *MockImageWidget_SetFromPaintable_Call { | |
| 979 | 900 | _c.Run(run) | |
| 980 | 901 | return _c | |
| 981 | 902 | } | |
| 982 | 903 | ||
| 983 | - | // SetHalign provides a mock function for the type MockImageWidget | |
| 984 | - | func (_mock *MockImageWidget) SetHalign(align gtk.Align) { | |
| 985 | - | _mock.Called(align) | |
| 986 | - | return | |
| 904 | + | // SetHalign provides a mock function with given fields: align | |
| 905 | + | func (_m *MockImageWidget) SetHalign(align gtk.Align) { | |
| 906 | + | _m.Called(align) | |
| 987 | 907 | } | |
| 988 | 908 | ||
| 989 | 909 | // MockImageWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign' | |
| @@ -999,13 +919,7 @@ func (_e *MockImageWidget_Expecter) SetHalign(align interface{}) *MockImageWidge | |||
| 999 | 919 | ||
| 1000 | 920 | func (_c *MockImageWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockImageWidget_SetHalign_Call { | |
| 1001 | 921 | _c.Call.Run(func(args mock.Arguments) { | |
| 1002 | - | var arg0 gtk.Align | |
| 1003 | - | if args[0] != nil { | |
| 1004 | - | arg0 = args[0].(gtk.Align) | |
| 1005 | - | } | |
| 1006 | - | run( | |
| 1007 | - | arg0, | |
| 1008 | - | ) | |
| 922 | + | run(args[0].(gtk.Align)) | |
| 1009 | 923 | }) | |
| 1010 | 924 | return _c | |
| 1011 | 925 | } | |
| @@ -1015,15 +929,14 @@ func (_c *MockImageWidget_SetHalign_Call) Return() *MockImageWidget_SetHalign_Ca | |||
| 1015 | 929 | return _c | |
| 1016 | 930 | } | |
| 1017 | 931 | ||
| 1018 | - | func (_c *MockImageWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockImageWidget_SetHalign_Call { | |
| 932 | + | func (_c *MockImageWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockImageWidget_SetHalign_Call { | |
| 1019 | 933 | _c.Run(run) | |
| 1020 | 934 | return _c | |
| 1021 | 935 | } | |
| 1022 | 936 | ||
| 1023 | - | // SetHexpand provides a mock function for the type MockImageWidget | |
| 1024 | - | func (_mock *MockImageWidget) SetHexpand(expand bool) { | |
| 1025 | - | _mock.Called(expand) | |
| 1026 | - | return | |
| 937 | + | // SetHexpand provides a mock function with given fields: expand | |
| 938 | + | func (_m *MockImageWidget) SetHexpand(expand bool) { | |
| 939 | + | _m.Called(expand) | |
| 1027 | 940 | } | |
| 1028 | 941 | ||
| 1029 | 942 | // MockImageWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand' | |
| @@ -1039,13 +952,7 @@ func (_e *MockImageWidget_Expecter) SetHexpand(expand interface{}) *MockImageWid | |||
| 1039 | 952 | ||
| 1040 | 953 | func (_c *MockImageWidget_SetHexpand_Call) Run(run func(expand bool)) *MockImageWidget_SetHexpand_Call { | |
| 1041 | 954 | _c.Call.Run(func(args mock.Arguments) { | |
| 1042 | - | var arg0 bool | |
| 1043 | - | if args[0] != nil { | |
| 1044 | - | arg0 = args[0].(bool) | |
| 1045 | - | } | |
| 1046 | - | run( | |
| 1047 | - | arg0, | |
| 1048 | - | ) | |
| 955 | + | run(args[0].(bool)) | |
| 1049 | 956 | }) | |
| 1050 | 957 | return _c | |
| 1051 | 958 | } | |
| @@ -1055,15 +962,14 @@ func (_c *MockImageWidget_SetHexpand_Call) Return() *MockImageWidget_SetHexpand_ | |||
| 1055 | 962 | return _c | |
| 1056 | 963 | } | |
| 1057 | 964 | ||
| 1058 | - | func (_c *MockImageWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockImageWidget_SetHexpand_Call { | |
| 965 | + | func (_c *MockImageWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetHexpand_Call { | |
| 1059 | 966 | _c.Run(run) | |
| 1060 | 967 | return _c | |
| 1061 | 968 | } | |
| 1062 | 969 | ||
| 1063 | - | // SetPixelSize provides a mock function for the type MockImageWidget | |
| 1064 | - | func (_mock *MockImageWidget) SetPixelSize(pixelSize int) { | |
| 1065 | - | _mock.Called(pixelSize) | |
| 1066 | - | return | |
| 970 | + | // SetPixelSize provides a mock function with given fields: pixelSize | |
| 971 | + | func (_m *MockImageWidget) SetPixelSize(pixelSize int) { | |
| 972 | + | _m.Called(pixelSize) | |
| 1067 | 973 | } | |
| 1068 | 974 | ||
| 1069 | 975 | // MockImageWidget_SetPixelSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPixelSize' | |
| @@ -1079,13 +985,7 @@ func (_e *MockImageWidget_Expecter) SetPixelSize(pixelSize interface{}) *MockIma | |||
| 1079 | 985 | ||
| 1080 | 986 | func (_c *MockImageWidget_SetPixelSize_Call) Run(run func(pixelSize int)) *MockImageWidget_SetPixelSize_Call { | |
| 1081 | 987 | _c.Call.Run(func(args mock.Arguments) { | |
| 1082 | - | var arg0 int | |
| 1083 | - | if args[0] != nil { | |
| 1084 | - | arg0 = args[0].(int) | |
| 1085 | - | } | |
| 1086 | - | run( | |
| 1087 | - | arg0, | |
| 1088 | - | ) | |
| 988 | + | run(args[0].(int)) | |
| 1089 | 989 | }) | |
| 1090 | 990 | return _c | |
| 1091 | 991 | } | |
| @@ -1095,15 +995,14 @@ func (_c *MockImageWidget_SetPixelSize_Call) Return() *MockImageWidget_SetPixelS | |||
| 1095 | 995 | return _c | |
| 1096 | 996 | } | |
| 1097 | 997 | ||
| 1098 | - | func (_c *MockImageWidget_SetPixelSize_Call) RunAndReturn(run func(pixelSize int)) *MockImageWidget_SetPixelSize_Call { | |
| 998 | + | func (_c *MockImageWidget_SetPixelSize_Call) RunAndReturn(run func(int)) *MockImageWidget_SetPixelSize_Call { | |
| 1099 | 999 | _c.Run(run) | |
| 1100 | 1000 | return _c | |
| 1101 | 1001 | } | |
| 1102 | 1002 | ||
| 1103 | - | // SetSizeRequest provides a mock function for the type MockImageWidget | |
| 1104 | - | func (_mock *MockImageWidget) SetSizeRequest(width int, height int) { | |
| 1105 | - | _mock.Called(width, height) | |
| 1106 | - | return | |
| 1003 | + | // SetSizeRequest provides a mock function with given fields: width, height | |
| 1004 | + | func (_m *MockImageWidget) SetSizeRequest(width int, height int) { | |
| 1005 | + | _m.Called(width, height) | |
| 1107 | 1006 | } | |
| 1108 | 1007 | ||
| 1109 | 1008 | // MockImageWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest' | |
| @@ -1120,18 +1019,7 @@ func (_e *MockImageWidget_Expecter) SetSizeRequest(width interface{}, height int | |||
| 1120 | 1019 | ||
| 1121 | 1020 | func (_c *MockImageWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockImageWidget_SetSizeRequest_Call { | |
| 1122 | 1021 | _c.Call.Run(func(args mock.Arguments) { | |
| 1123 | - | var arg0 int | |
| 1124 | - | if args[0] != nil { | |
| 1125 | - | arg0 = args[0].(int) | |
| 1126 | - | } | |
| 1127 | - | var arg1 int | |
| 1128 | - | if args[1] != nil { | |
| 1129 | - | arg1 = args[1].(int) | |
| 1130 | - | } | |
| 1131 | - | run( | |
| 1132 | - | arg0, | |
| 1133 | - | arg1, | |
| 1134 | - | ) | |
| 1022 | + | run(args[0].(int), args[1].(int)) | |
| 1135 | 1023 | }) | |
| 1136 | 1024 | return _c | |
| 1137 | 1025 | } | |
| @@ -1141,15 +1029,14 @@ func (_c *MockImageWidget_SetSizeRequest_Call) Return() *MockImageWidget_SetSize | |||
| 1141 | 1029 | return _c | |
| 1142 | 1030 | } | |
| 1143 | 1031 | ||
| 1144 | - | func (_c *MockImageWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockImageWidget_SetSizeRequest_Call { | |
| 1032 | + | func (_c *MockImageWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockImageWidget_SetSizeRequest_Call { | |
| 1145 | 1033 | _c.Run(run) | |
| 1146 | 1034 | return _c | |
| 1147 | 1035 | } | |
| 1148 | 1036 | ||
| 1149 | - | // SetValign provides a mock function for the type MockImageWidget | |
| 1150 | - | func (_mock *MockImageWidget) SetValign(align gtk.Align) { | |
| 1151 | - | _mock.Called(align) | |
| 1152 | - | return | |
| 1037 | + | // SetValign provides a mock function with given fields: align | |
| 1038 | + | func (_m *MockImageWidget) SetValign(align gtk.Align) { | |
| 1039 | + | _m.Called(align) | |
| 1153 | 1040 | } | |
| 1154 | 1041 | ||
| 1155 | 1042 | // MockImageWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign' | |
| @@ -1165,13 +1052,7 @@ func (_e *MockImageWidget_Expecter) SetValign(align interface{}) *MockImageWidge | |||
| 1165 | 1052 | ||
| 1166 | 1053 | func (_c *MockImageWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockImageWidget_SetValign_Call { | |
| 1167 | 1054 | _c.Call.Run(func(args mock.Arguments) { | |
| 1168 | - | var arg0 gtk.Align | |
| 1169 | - | if args[0] != nil { | |
| 1170 | - | arg0 = args[0].(gtk.Align) | |
| 1171 | - | } | |
| 1172 | - | run( | |
| 1173 | - | arg0, | |
| 1174 | - | ) | |
| 1055 | + | run(args[0].(gtk.Align)) | |
| 1175 | 1056 | }) | |
| 1176 | 1057 | return _c | |
| 1177 | 1058 | } | |
| @@ -1181,15 +1062,14 @@ func (_c *MockImageWidget_SetValign_Call) Return() *MockImageWidget_SetValign_Ca | |||
| 1181 | 1062 | return _c | |
| 1182 | 1063 | } | |
| 1183 | 1064 | ||
| 1184 | - | func (_c *MockImageWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockImageWidget_SetValign_Call { | |
| 1065 | + | func (_c *MockImageWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockImageWidget_SetValign_Call { | |
| 1185 | 1066 | _c.Run(run) | |
| 1186 | 1067 | return _c | |
| 1187 | 1068 | } | |
| 1188 | 1069 | ||
| 1189 | - | // SetVexpand provides a mock function for the type MockImageWidget | |
| 1190 | - | func (_mock *MockImageWidget) SetVexpand(expand bool) { | |
| 1191 | - | _mock.Called(expand) | |
| 1192 | - | return | |
| 1070 | + | // SetVexpand provides a mock function with given fields: expand | |
| 1071 | + | func (_m *MockImageWidget) SetVexpand(expand bool) { | |
| 1072 | + | _m.Called(expand) | |
| 1193 | 1073 | } | |
| 1194 | 1074 | ||
| 1195 | 1075 | // MockImageWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand' | |
| @@ -1205,13 +1085,7 @@ func (_e *MockImageWidget_Expecter) SetVexpand(expand interface{}) *MockImageWid | |||
| 1205 | 1085 | ||
| 1206 | 1086 | func (_c *MockImageWidget_SetVexpand_Call) Run(run func(expand bool)) *MockImageWidget_SetVexpand_Call { | |
| 1207 | 1087 | _c.Call.Run(func(args mock.Arguments) { | |
| 1208 | - | var arg0 bool | |
| 1209 | - | if args[0] != nil { | |
| 1210 | - | arg0 = args[0].(bool) | |
| 1211 | - | } | |
| 1212 | - | run( | |
| 1213 | - | arg0, | |
| 1214 | - | ) | |
| 1088 | + | run(args[0].(bool)) | |
| 1215 | 1089 | }) | |
| 1216 | 1090 | return _c | |
| 1217 | 1091 | } | |
| @@ -1221,15 +1095,14 @@ func (_c *MockImageWidget_SetVexpand_Call) Return() *MockImageWidget_SetVexpand_ | |||
| 1221 | 1095 | return _c | |
| 1222 | 1096 | } | |
| 1223 | 1097 | ||
| 1224 | - | func (_c *MockImageWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockImageWidget_SetVexpand_Call { | |
| 1098 | + | func (_c *MockImageWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetVexpand_Call { | |
| 1225 | 1099 | _c.Run(run) | |
| 1226 | 1100 | return _c | |
| 1227 | 1101 | } | |
| 1228 | 1102 | ||
| 1229 | - | // SetVisible provides a mock function for the type MockImageWidget | |
| 1230 | - | func (_mock *MockImageWidget) SetVisible(visible bool) { | |
| 1231 | - | _mock.Called(visible) | |
| 1232 | - | return | |
| 1103 | + | // SetVisible provides a mock function with given fields: visible | |
| 1104 | + | func (_m *MockImageWidget) SetVisible(visible bool) { | |
| 1105 | + | _m.Called(visible) | |
| 1233 | 1106 | } | |
| 1234 | 1107 | ||
| 1235 | 1108 | // MockImageWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible' | |
| @@ -1245,13 +1118,7 @@ func (_e *MockImageWidget_Expecter) SetVisible(visible interface{}) *MockImageWi | |||
| 1245 | 1118 | ||
| 1246 | 1119 | func (_c *MockImageWidget_SetVisible_Call) Run(run func(visible bool)) *MockImageWidget_SetVisible_Call { | |
| 1247 | 1120 | _c.Call.Run(func(args mock.Arguments) { | |
| 1248 | - | var arg0 bool | |
| 1249 | - | if args[0] != nil { | |
| 1250 | - | arg0 = args[0].(bool) | |
| 1251 | - | } | |
| 1252 | - | run( | |
| 1253 | - | arg0, | |
| 1254 | - | ) | |
| 1121 | + | run(args[0].(bool)) | |
| 1255 | 1122 | }) | |
| 1256 | 1123 | return _c | |
| 1257 | 1124 | } | |
| @@ -1261,15 +1128,14 @@ func (_c *MockImageWidget_SetVisible_Call) Return() *MockImageWidget_SetVisible_ | |||
| 1261 | 1128 | return _c | |
| 1262 | 1129 | } | |
| 1263 | 1130 | ||
| 1264 | - | func (_c *MockImageWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockImageWidget_SetVisible_Call { | |
| 1131 | + | func (_c *MockImageWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockImageWidget_SetVisible_Call { | |
| 1265 | 1132 | _c.Run(run) | |
| 1266 | 1133 | return _c | |
| 1267 | 1134 | } | |
| 1268 | 1135 | ||
| 1269 | - | // Show provides a mock function for the type MockImageWidget | |
| 1270 | - | func (_mock *MockImageWidget) Show() { | |
| 1271 | - | _mock.Called() | |
| 1272 | - | return | |
| 1136 | + | // Show provides a mock function with no fields | |
| 1137 | + | func (_m *MockImageWidget) Show() { | |
| 1138 | + | _m.Called() | |
| 1273 | 1139 | } | |
| 1274 | 1140 | ||
| 1275 | 1141 | // MockImageWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |
| @@ -1299,10 +1165,9 @@ func (_c *MockImageWidget_Show_Call) RunAndReturn(run func()) *MockImageWidget_S | |||
| 1299 | 1165 | return _c | |
| 1300 | 1166 | } | |
| 1301 | 1167 | ||
| 1302 | - | // Unparent provides a mock function for the type MockImageWidget | |
| 1303 | - | func (_mock *MockImageWidget) Unparent() { | |
| 1304 | - | _mock.Called() | |
| 1305 | - | return | |
| 1168 | + | // Unparent provides a mock function with no fields | |
| 1169 | + | func (_m *MockImageWidget) Unparent() { | |
| 1170 | + | _m.Called() | |
| 1306 | 1171 | } | |
| 1307 | 1172 | ||
| 1308 | 1173 | // MockImageWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent' | |
| @@ -1331,3 +1196,17 @@ func (_c *MockImageWidget_Unparent_Call) RunAndReturn(run func()) *MockImageWidg | |||
| 1331 | 1196 | _c.Run(run) | |
| 1332 | 1197 | return _c | |
| 1333 | 1198 | } | |
| 1199 | + | ||
| 1200 | + | // NewMockImageWidget creates a new instance of MockImageWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 1201 | + | // The first argument is typically a *testing.T value. | |
| 1202 | + | func NewMockImageWidget(t interface { | |
| 1203 | + | mock.TestingT | |
| 1204 | + | Cleanup(func()) | |
| 1205 | + | }) *MockImageWidget { | |
| 1206 | + | mock := &MockImageWidget{} | |
| 1207 | + | mock.Mock.Test(t) | |
| 1208 | + | ||
| 1209 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 1210 | + | ||
| 1211 | + | return mock | |
| 1212 | + | } | |
M internal/ui/layout/mocks/mock_label_widget.go +220 -346
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockLabelWidget creates a new instance of MockLabelWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockLabelWidget(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockLabelWidget { | |
| 19 | - | mock := &MockLabelWidget{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockLabelWidget is an autogenerated mock type for the LabelWidget type | |
| 28 | 13 | type MockLabelWidget struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,10 +22,9 @@ func (_m *MockLabelWidget) EXPECT() *MockLabelWidget_Expecter { | |||
| 37 | 22 | return &MockLabelWidget_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // AddController provides a mock function for the type MockLabelWidget | |
| 41 | - | func (_mock *MockLabelWidget) AddController(controller *gtk.EventController) { | |
| 42 | - | _mock.Called(controller) | |
| 43 | - | return | |
| 25 | + | // AddController provides a mock function with given fields: controller | |
| 26 | + | func (_m *MockLabelWidget) AddController(controller *gtk.EventController) { | |
| 27 | + | _m.Called(controller) | |
| 44 | 28 | } | |
| 45 | 29 | ||
| 46 | 30 | // MockLabelWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController' | |
| @@ -56,13 +40,7 @@ func (_e *MockLabelWidget_Expecter) AddController(controller interface{}) *MockL | |||
| 56 | 40 | ||
| 57 | 41 | func (_c *MockLabelWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockLabelWidget_AddController_Call { | |
| 58 | 42 | _c.Call.Run(func(args mock.Arguments) { | |
| 59 | - | var arg0 *gtk.EventController | |
| 60 | - | if args[0] != nil { | |
| 61 | - | arg0 = args[0].(*gtk.EventController) | |
| 62 | - | } | |
| 63 | - | run( | |
| 64 | - | arg0, | |
| 65 | - | ) | |
| 43 | + | run(args[0].(*gtk.EventController)) | |
| 66 | 44 | }) | |
| 67 | 45 | return _c | |
| 68 | 46 | } | |
| @@ -72,15 +50,14 @@ func (_c *MockLabelWidget_AddController_Call) Return() *MockLabelWidget_AddContr | |||
| 72 | 50 | return _c | |
| 73 | 51 | } | |
| 74 | 52 | ||
| 75 | - | func (_c *MockLabelWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockLabelWidget_AddController_Call { | |
| 53 | + | func (_c *MockLabelWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockLabelWidget_AddController_Call { | |
| 76 | 54 | _c.Run(run) | |
| 77 | 55 | return _c | |
| 78 | 56 | } | |
| 79 | 57 | ||
| 80 | - | // AddCssClass provides a mock function for the type MockLabelWidget | |
| 81 | - | func (_mock *MockLabelWidget) AddCssClass(cssClass string) { | |
| 82 | - | _mock.Called(cssClass) | |
| 83 | - | return | |
| 58 | + | // AddCssClass provides a mock function with given fields: cssClass | |
| 59 | + | func (_m *MockLabelWidget) AddCssClass(cssClass string) { | |
| 60 | + | _m.Called(cssClass) | |
| 84 | 61 | } | |
| 85 | 62 | ||
| 86 | 63 | // MockLabelWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass' | |
| @@ -96,13 +73,7 @@ func (_e *MockLabelWidget_Expecter) AddCssClass(cssClass interface{}) *MockLabel | |||
| 96 | 73 | ||
| 97 | 74 | func (_c *MockLabelWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockLabelWidget_AddCssClass_Call { | |
| 98 | 75 | _c.Call.Run(func(args mock.Arguments) { | |
| 99 | - | var arg0 string | |
| 100 | - | if args[0] != nil { | |
| 101 | - | arg0 = args[0].(string) | |
| 102 | - | } | |
| 103 | - | run( | |
| 104 | - | arg0, | |
| 105 | - | ) | |
| 76 | + | run(args[0].(string)) | |
| 106 | 77 | }) | |
| 107 | 78 | return _c | |
| 108 | 79 | } | |
| @@ -112,14 +83,14 @@ func (_c *MockLabelWidget_AddCssClass_Call) Return() *MockLabelWidget_AddCssClas | |||
| 112 | 83 | return _c | |
| 113 | 84 | } | |
| 114 | 85 | ||
| 115 | - | func (_c *MockLabelWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockLabelWidget_AddCssClass_Call { | |
| 86 | + | func (_c *MockLabelWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockLabelWidget_AddCssClass_Call { | |
| 116 | 87 | _c.Run(run) | |
| 117 | 88 | return _c | |
| 118 | 89 | } | |
| 119 | 90 | ||
| 120 | - | // ComputePoint provides a mock function for the type MockLabelWidget | |
| 121 | - | func (_mock *MockLabelWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 122 | - | ret := _mock.Called(target) | |
| 91 | + | // ComputePoint provides a mock function with given fields: target | |
| 92 | + | func (_m *MockLabelWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 93 | + | ret := _m.Called(target) | |
| 123 | 94 | ||
| 124 | 95 | if len(ret) == 0 { | |
| 125 | 96 | panic("no return value specified for ComputePoint") | |
| @@ -128,24 +99,27 @@ func (_mock *MockLabelWidget) ComputePoint(target layout.Widget) (float64, float | |||
| 128 | 99 | var r0 float64 | |
| 129 | 100 | var r1 float64 | |
| 130 | 101 | var r2 bool | |
| 131 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 132 | - | return returnFunc(target) | |
| 102 | + | if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 103 | + | return rf(target) | |
| 133 | 104 | } | |
| 134 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 135 | - | r0 = returnFunc(target) | |
| 105 | + | if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 106 | + | r0 = rf(target) | |
| 136 | 107 | } else { | |
| 137 | 108 | r0 = ret.Get(0).(float64) | |
| 138 | 109 | } | |
| 139 | - | if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 140 | - | r1 = returnFunc(target) | |
| 110 | + | ||
| 111 | + | if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 112 | + | r1 = rf(target) | |
| 141 | 113 | } else { | |
| 142 | 114 | r1 = ret.Get(1).(float64) | |
| 143 | 115 | } | |
| 144 | - | if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 145 | - | r2 = returnFunc(target) | |
| 116 | + | ||
| 117 | + | if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 118 | + | r2 = rf(target) | |
| 146 | 119 | } else { | |
| 147 | 120 | r2 = ret.Get(2).(bool) | |
| 148 | 121 | } | |
| 122 | + | ||
| 149 | 123 | return r0, r1, r2 | |
| 150 | 124 | } | |
| 151 | 125 | ||
| @@ -162,13 +136,7 @@ func (_e *MockLabelWidget_Expecter) ComputePoint(target interface{}) *MockLabelW | |||
| 162 | 136 | ||
| 163 | 137 | func (_c *MockLabelWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockLabelWidget_ComputePoint_Call { | |
| 164 | 138 | _c.Call.Run(func(args mock.Arguments) { | |
| 165 | - | var arg0 layout.Widget | |
| 166 | - | if args[0] != nil { | |
| 167 | - | arg0 = args[0].(layout.Widget) | |
| 168 | - | } | |
| 169 | - | run( | |
| 170 | - | arg0, | |
| 171 | - | ) | |
| 139 | + | run(args[0].(layout.Widget)) | |
| 172 | 140 | }) | |
| 173 | 141 | return _c | |
| 174 | 142 | } | |
| @@ -178,25 +146,26 @@ func (_c *MockLabelWidget_ComputePoint_Call) Return(x float64, y float64, ok boo | |||
| 178 | 146 | return _c | |
| 179 | 147 | } | |
| 180 | 148 | ||
| 181 | - | func (_c *MockLabelWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockLabelWidget_ComputePoint_Call { | |
| 149 | + | func (_c *MockLabelWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockLabelWidget_ComputePoint_Call { | |
| 182 | 150 | _c.Call.Return(run) | |
| 183 | 151 | return _c | |
| 184 | 152 | } | |
| 185 | 153 | ||
| 186 | - | // GetAllocatedHeight provides a mock function for the type MockLabelWidget | |
| 187 | - | func (_mock *MockLabelWidget) GetAllocatedHeight() int { | |
| 188 | - | ret := _mock.Called() | |
| 154 | + | // GetAllocatedHeight provides a mock function with no fields | |
| 155 | + | func (_m *MockLabelWidget) GetAllocatedHeight() int { | |
| 156 | + | ret := _m.Called() | |
| 189 | 157 | ||
| 190 | 158 | if len(ret) == 0 { | |
| 191 | 159 | panic("no return value specified for GetAllocatedHeight") | |
| 192 | 160 | } | |
| 193 | 161 | ||
| 194 | 162 | var r0 int | |
| 195 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 196 | - | r0 = returnFunc() | |
| 163 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 164 | + | r0 = rf() | |
| 197 | 165 | } else { | |
| 198 | 166 | r0 = ret.Get(0).(int) | |
| 199 | 167 | } | |
| 168 | + | ||
| 200 | 169 | return r0 | |
| 201 | 170 | } | |
| 202 | 171 | ||
| @@ -217,8 +186,8 @@ func (_c *MockLabelWidget_GetAllocatedHeight_Call) Run(run func()) *MockLabelWid | |||
| 217 | 186 | return _c | |
| 218 | 187 | } | |
| 219 | 188 | ||
| 220 | - | func (_c *MockLabelWidget_GetAllocatedHeight_Call) Return(n int) *MockLabelWidget_GetAllocatedHeight_Call { | |
| 221 | - | _c.Call.Return(n) | |
| 189 | + | func (_c *MockLabelWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockLabelWidget_GetAllocatedHeight_Call { | |
| 190 | + | _c.Call.Return(_a0) | |
| 222 | 191 | return _c | |
| 223 | 192 | } | |
| 224 | 193 | ||
| @@ -227,20 +196,21 @@ func (_c *MockLabelWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) | |||
| 227 | 196 | return _c | |
| 228 | 197 | } | |
| 229 | 198 | ||
| 230 | - | // GetAllocatedWidth provides a mock function for the type MockLabelWidget | |
| 231 | - | func (_mock *MockLabelWidget) GetAllocatedWidth() int { | |
| 232 | - | ret := _mock.Called() | |
| 199 | + | // GetAllocatedWidth provides a mock function with no fields | |
| 200 | + | func (_m *MockLabelWidget) GetAllocatedWidth() int { | |
| 201 | + | ret := _m.Called() | |
| 233 | 202 | ||
| 234 | 203 | if len(ret) == 0 { | |
| 235 | 204 | panic("no return value specified for GetAllocatedWidth") | |
| 236 | 205 | } | |
| 237 | 206 | ||
| 238 | 207 | var r0 int | |
| 239 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 240 | - | r0 = returnFunc() | |
| 208 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 209 | + | r0 = rf() | |
| 241 | 210 | } else { | |
| 242 | 211 | r0 = ret.Get(0).(int) | |
| 243 | 212 | } | |
| 213 | + | ||
| 244 | 214 | return r0 | |
| 245 | 215 | } | |
| 246 | 216 | ||
| @@ -261,8 +231,8 @@ func (_c *MockLabelWidget_GetAllocatedWidth_Call) Run(run func()) *MockLabelWidg | |||
| 261 | 231 | return _c | |
| 262 | 232 | } | |
| 263 | 233 | ||
| 264 | - | func (_c *MockLabelWidget_GetAllocatedWidth_Call) Return(n int) *MockLabelWidget_GetAllocatedWidth_Call { | |
| 265 | - | _c.Call.Return(n) | |
| 234 | + | func (_c *MockLabelWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockLabelWidget_GetAllocatedWidth_Call { | |
| 235 | + | _c.Call.Return(_a0) | |
| 266 | 236 | return _c | |
| 267 | 237 | } | |
| 268 | 238 | ||
| @@ -271,20 +241,21 @@ func (_c *MockLabelWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) * | |||
| 271 | 241 | return _c | |
| 272 | 242 | } | |
| 273 | 243 | ||
| 274 | - | // GetHexpand provides a mock function for the type MockLabelWidget | |
| 275 | - | func (_mock *MockLabelWidget) GetHexpand() bool { | |
| 276 | - | ret := _mock.Called() | |
| 244 | + | // GetHexpand provides a mock function with no fields | |
| 245 | + | func (_m *MockLabelWidget) GetHexpand() bool { | |
| 246 | + | ret := _m.Called() | |
| 277 | 247 | ||
| 278 | 248 | if len(ret) == 0 { | |
| 279 | 249 | panic("no return value specified for GetHexpand") | |
| 280 | 250 | } | |
| 281 | 251 | ||
| 282 | 252 | var r0 bool | |
| 283 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 284 | - | r0 = returnFunc() | |
| 253 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 254 | + | r0 = rf() | |
| 285 | 255 | } else { | |
| 286 | 256 | r0 = ret.Get(0).(bool) | |
| 287 | 257 | } | |
| 258 | + | ||
| 288 | 259 | return r0 | |
| 289 | 260 | } | |
| 290 | 261 | ||
| @@ -305,8 +276,8 @@ func (_c *MockLabelWidget_GetHexpand_Call) Run(run func()) *MockLabelWidget_GetH | |||
| 305 | 276 | return _c | |
| 306 | 277 | } | |
| 307 | 278 | ||
| 308 | - | func (_c *MockLabelWidget_GetHexpand_Call) Return(b bool) *MockLabelWidget_GetHexpand_Call { | |
| 309 | - | _c.Call.Return(b) | |
| 279 | + | func (_c *MockLabelWidget_GetHexpand_Call) Return(_a0 bool) *MockLabelWidget_GetHexpand_Call { | |
| 280 | + | _c.Call.Return(_a0) | |
| 310 | 281 | return _c | |
| 311 | 282 | } | |
| 312 | 283 | ||
| @@ -315,22 +286,23 @@ func (_c *MockLabelWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockLa | |||
| 315 | 286 | return _c | |
| 316 | 287 | } | |
| 317 | 288 | ||
| 318 | - | // GetParent provides a mock function for the type MockLabelWidget | |
| 319 | - | func (_mock *MockLabelWidget) GetParent() layout.Widget { | |
| 320 | - | ret := _mock.Called() | |
| 289 | + | // GetParent provides a mock function with no fields | |
| 290 | + | func (_m *MockLabelWidget) GetParent() layout.Widget { | |
| 291 | + | ret := _m.Called() | |
| 321 | 292 | ||
| 322 | 293 | if len(ret) == 0 { | |
| 323 | 294 | panic("no return value specified for GetParent") | |
| 324 | 295 | } | |
| 325 | 296 | ||
| 326 | 297 | var r0 layout.Widget | |
| 327 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 328 | - | r0 = returnFunc() | |
| 298 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 299 | + | r0 = rf() | |
| 329 | 300 | } else { | |
| 330 | 301 | if ret.Get(0) != nil { | |
| 331 | 302 | r0 = ret.Get(0).(layout.Widget) | |
| 332 | 303 | } | |
| 333 | 304 | } | |
| 305 | + | ||
| 334 | 306 | return r0 | |
| 335 | 307 | } | |
| 336 | 308 | ||
| @@ -351,8 +323,8 @@ func (_c *MockLabelWidget_GetParent_Call) Run(run func()) *MockLabelWidget_GetPa | |||
| 351 | 323 | return _c | |
| 352 | 324 | } | |
| 353 | 325 | ||
| 354 | - | func (_c *MockLabelWidget_GetParent_Call) Return(widget layout.Widget) *MockLabelWidget_GetParent_Call { | |
| 355 | - | _c.Call.Return(widget) | |
| 326 | + | func (_c *MockLabelWidget_GetParent_Call) Return(_a0 layout.Widget) *MockLabelWidget_GetParent_Call { | |
| 327 | + | _c.Call.Return(_a0) | |
| 356 | 328 | return _c | |
| 357 | 329 | } | |
| 358 | 330 | ||
| @@ -361,20 +333,21 @@ func (_c *MockLabelWidget_GetParent_Call) RunAndReturn(run func() layout.Widget) | |||
| 361 | 333 | return _c | |
| 362 | 334 | } | |
| 363 | 335 | ||
| 364 | - | // GetText provides a mock function for the type MockLabelWidget | |
| 365 | - | func (_mock *MockLabelWidget) GetText() string { | |
| 366 | - | ret := _mock.Called() | |
| 336 | + | // GetText provides a mock function with no fields | |
| 337 | + | func (_m *MockLabelWidget) GetText() string { | |
| 338 | + | ret := _m.Called() | |
| 367 | 339 | ||
| 368 | 340 | if len(ret) == 0 { | |
| 369 | 341 | panic("no return value specified for GetText") | |
| 370 | 342 | } | |
| 371 | 343 | ||
| 372 | 344 | var r0 string | |
| 373 | - | if returnFunc, ok := ret.Get(0).(func() string); ok { | |
| 374 | - | r0 = returnFunc() | |
| 345 | + | if rf, ok := ret.Get(0).(func() string); ok { | |
| 346 | + | r0 = rf() | |
| 375 | 347 | } else { | |
| 376 | 348 | r0 = ret.Get(0).(string) | |
| 377 | 349 | } | |
| 350 | + | ||
| 378 | 351 | return r0 | |
| 379 | 352 | } | |
| 380 | 353 | ||
| @@ -395,8 +368,8 @@ func (_c *MockLabelWidget_GetText_Call) Run(run func()) *MockLabelWidget_GetText | |||
| 395 | 368 | return _c | |
| 396 | 369 | } | |
| 397 | 370 | ||
| 398 | - | func (_c *MockLabelWidget_GetText_Call) Return(s string) *MockLabelWidget_GetText_Call { | |
| 399 | - | _c.Call.Return(s) | |
| 371 | + | func (_c *MockLabelWidget_GetText_Call) Return(_a0 string) *MockLabelWidget_GetText_Call { | |
| 372 | + | _c.Call.Return(_a0) | |
| 400 | 373 | return _c | |
| 401 | 374 | } | |
| 402 | 375 | ||
| @@ -405,20 +378,21 @@ func (_c *MockLabelWidget_GetText_Call) RunAndReturn(run func() string) *MockLab | |||
| 405 | 378 | return _c | |
| 406 | 379 | } | |
| 407 | 380 | ||
| 408 | - | // GetVexpand provides a mock function for the type MockLabelWidget | |
| 409 | - | func (_mock *MockLabelWidget) GetVexpand() bool { | |
| 410 | - | ret := _mock.Called() | |
| 381 | + | // GetVexpand provides a mock function with no fields | |
| 382 | + | func (_m *MockLabelWidget) GetVexpand() bool { | |
| 383 | + | ret := _m.Called() | |
| 411 | 384 | ||
| 412 | 385 | if len(ret) == 0 { | |
| 413 | 386 | panic("no return value specified for GetVexpand") | |
| 414 | 387 | } | |
| 415 | 388 | ||
| 416 | 389 | var r0 bool | |
| 417 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 418 | - | r0 = returnFunc() | |
| 390 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 391 | + | r0 = rf() | |
| 419 | 392 | } else { | |
| 420 | 393 | r0 = ret.Get(0).(bool) | |
| 421 | 394 | } | |
| 395 | + | ||
| 422 | 396 | return r0 | |
| 423 | 397 | } | |
| 424 | 398 | ||
| @@ -439,8 +413,8 @@ func (_c *MockLabelWidget_GetVexpand_Call) Run(run func()) *MockLabelWidget_GetV | |||
| 439 | 413 | return _c | |
| 440 | 414 | } | |
| 441 | 415 | ||
| 442 | - | func (_c *MockLabelWidget_GetVexpand_Call) Return(b bool) *MockLabelWidget_GetVexpand_Call { | |
| 443 | - | _c.Call.Return(b) | |
| 416 | + | func (_c *MockLabelWidget_GetVexpand_Call) Return(_a0 bool) *MockLabelWidget_GetVexpand_Call { | |
| 417 | + | _c.Call.Return(_a0) | |
| 444 | 418 | return _c | |
| 445 | 419 | } | |
| 446 | 420 | ||
| @@ -449,20 +423,21 @@ func (_c *MockLabelWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockLa | |||
| 449 | 423 | return _c | |
| 450 | 424 | } | |
| 451 | 425 | ||
| 452 | - | // GrabFocus provides a mock function for the type MockLabelWidget | |
| 453 | - | func (_mock *MockLabelWidget) GrabFocus() bool { | |
| 454 | - | ret := _mock.Called() | |
| 426 | + | // GrabFocus provides a mock function with no fields | |
| 427 | + | func (_m *MockLabelWidget) GrabFocus() bool { | |
| 428 | + | ret := _m.Called() | |
| 455 | 429 | ||
| 456 | 430 | if len(ret) == 0 { | |
| 457 | 431 | panic("no return value specified for GrabFocus") | |
| 458 | 432 | } | |
| 459 | 433 | ||
| 460 | 434 | var r0 bool | |
| 461 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 462 | - | r0 = returnFunc() | |
| 435 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 436 | + | r0 = rf() | |
| 463 | 437 | } else { | |
| 464 | 438 | r0 = ret.Get(0).(bool) | |
| 465 | 439 | } | |
| 440 | + | ||
| 466 | 441 | return r0 | |
| 467 | 442 | } | |
| 468 | 443 | ||
| @@ -483,8 +458,8 @@ func (_c *MockLabelWidget_GrabFocus_Call) Run(run func()) *MockLabelWidget_GrabF | |||
| 483 | 458 | return _c | |
| 484 | 459 | } | |
| 485 | 460 | ||
| 486 | - | func (_c *MockLabelWidget_GrabFocus_Call) Return(b bool) *MockLabelWidget_GrabFocus_Call { | |
| 487 | - | _c.Call.Return(b) | |
| 461 | + | func (_c *MockLabelWidget_GrabFocus_Call) Return(_a0 bool) *MockLabelWidget_GrabFocus_Call { | |
| 462 | + | _c.Call.Return(_a0) | |
| 488 | 463 | return _c | |
| 489 | 464 | } | |
| 490 | 465 | ||
| @@ -493,22 +468,23 @@ func (_c *MockLabelWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockLab | |||
| 493 | 468 | return _c | |
| 494 | 469 | } | |
| 495 | 470 | ||
| 496 | - | // GtkWidget provides a mock function for the type MockLabelWidget | |
| 497 | - | func (_mock *MockLabelWidget) GtkWidget() *gtk.Widget { | |
| 498 | - | ret := _mock.Called() | |
| 471 | + | // GtkWidget provides a mock function with no fields | |
| 472 | + | func (_m *MockLabelWidget) GtkWidget() *gtk.Widget { | |
| 473 | + | ret := _m.Called() | |
| 499 | 474 | ||
| 500 | 475 | if len(ret) == 0 { | |
| 501 | 476 | panic("no return value specified for GtkWidget") | |
| 502 | 477 | } | |
| 503 | 478 | ||
| 504 | 479 | var r0 *gtk.Widget | |
| 505 | - | if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 506 | - | r0 = returnFunc() | |
| 480 | + | if rf, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 481 | + | r0 = rf() | |
| 507 | 482 | } else { | |
| 508 | 483 | if ret.Get(0) != nil { | |
| 509 | 484 | r0 = ret.Get(0).(*gtk.Widget) | |
| 510 | 485 | } | |
| 511 | 486 | } | |
| 487 | + | ||
| 512 | 488 | return r0 | |
| 513 | 489 | } | |
| 514 | 490 | ||
| @@ -529,8 +505,8 @@ func (_c *MockLabelWidget_GtkWidget_Call) Run(run func()) *MockLabelWidget_GtkWi | |||
| 529 | 505 | return _c | |
| 530 | 506 | } | |
| 531 | 507 | ||
| 532 | - | func (_c *MockLabelWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockLabelWidget_GtkWidget_Call { | |
| 533 | - | _c.Call.Return(widget) | |
| 508 | + | func (_c *MockLabelWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockLabelWidget_GtkWidget_Call { | |
| 509 | + | _c.Call.Return(_a0) | |
| 534 | 510 | return _c | |
| 535 | 511 | } | |
| 536 | 512 | ||
| @@ -539,20 +515,21 @@ func (_c *MockLabelWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) * | |||
| 539 | 515 | return _c | |
| 540 | 516 | } | |
| 541 | 517 | ||
| 542 | - | // HasCssClass provides a mock function for the type MockLabelWidget | |
| 543 | - | func (_mock *MockLabelWidget) HasCssClass(cssClass string) bool { | |
| 544 | - | ret := _mock.Called(cssClass) | |
| 518 | + | // HasCssClass provides a mock function with given fields: cssClass | |
| 519 | + | func (_m *MockLabelWidget) HasCssClass(cssClass string) bool { | |
| 520 | + | ret := _m.Called(cssClass) | |
| 545 | 521 | ||
| 546 | 522 | if len(ret) == 0 { | |
| 547 | 523 | panic("no return value specified for HasCssClass") | |
| 548 | 524 | } | |
| 549 | 525 | ||
| 550 | 526 | var r0 bool | |
| 551 | - | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |
| 552 | - | r0 = returnFunc(cssClass) | |
| 527 | + | if rf, ok := ret.Get(0).(func(string) bool); ok { | |
| 528 | + | r0 = rf(cssClass) | |
| 553 | 529 | } else { | |
| 554 | 530 | r0 = ret.Get(0).(bool) | |
| 555 | 531 | } | |
| 532 | + | ||
| 556 | 533 | return r0 | |
| 557 | 534 | } | |
| 558 | 535 | ||
| @@ -569,41 +546,36 @@ func (_e *MockLabelWidget_Expecter) HasCssClass(cssClass interface{}) *MockLabel | |||
| 569 | 546 | ||
| 570 | 547 | func (_c *MockLabelWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockLabelWidget_HasCssClass_Call { | |
| 571 | 548 | _c.Call.Run(func(args mock.Arguments) { | |
| 572 | - | var arg0 string | |
| 573 | - | if args[0] != nil { | |
| 574 | - | arg0 = args[0].(string) | |
| 575 | - | } | |
| 576 | - | run( | |
| 577 | - | arg0, | |
| 578 | - | ) | |
| 549 | + | run(args[0].(string)) | |
| 579 | 550 | }) | |
| 580 | 551 | return _c | |
| 581 | 552 | } | |
| 582 | 553 | ||
| 583 | - | func (_c *MockLabelWidget_HasCssClass_Call) Return(b bool) *MockLabelWidget_HasCssClass_Call { | |
| 584 | - | _c.Call.Return(b) | |
| 554 | + | func (_c *MockLabelWidget_HasCssClass_Call) Return(_a0 bool) *MockLabelWidget_HasCssClass_Call { | |
| 555 | + | _c.Call.Return(_a0) | |
| 585 | 556 | return _c | |
| 586 | 557 | } | |
| 587 | 558 | ||
| 588 | - | func (_c *MockLabelWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockLabelWidget_HasCssClass_Call { | |
| 559 | + | func (_c *MockLabelWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockLabelWidget_HasCssClass_Call { | |
| 589 | 560 | _c.Call.Return(run) | |
| 590 | 561 | return _c | |
| 591 | 562 | } | |
| 592 | 563 | ||
| 593 | - | // HasFocus provides a mock function for the type MockLabelWidget | |
| 594 | - | func (_mock *MockLabelWidget) HasFocus() bool { | |
| 595 | - | ret := _mock.Called() | |
| 564 | + | // HasFocus provides a mock function with no fields | |
| 565 | + | func (_m *MockLabelWidget) HasFocus() bool { | |
| 566 | + | ret := _m.Called() | |
| 596 | 567 | ||
| 597 | 568 | if len(ret) == 0 { | |
| 598 | 569 | panic("no return value specified for HasFocus") | |
| 599 | 570 | } | |
| 600 | 571 | ||
| 601 | 572 | var r0 bool | |
| 602 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 603 | - | r0 = returnFunc() | |
| 573 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 574 | + | r0 = rf() | |
| 604 | 575 | } else { | |
| 605 | 576 | r0 = ret.Get(0).(bool) | |
| 606 | 577 | } | |
| 578 | + | ||
| 607 | 579 | return r0 | |
| 608 | 580 | } | |
| 609 | 581 | ||
| @@ -624,8 +596,8 @@ func (_c *MockLabelWidget_HasFocus_Call) Run(run func()) *MockLabelWidget_HasFoc | |||
| 624 | 596 | return _c | |
| 625 | 597 | } | |
| 626 | 598 | ||
| 627 | - | func (_c *MockLabelWidget_HasFocus_Call) Return(b bool) *MockLabelWidget_HasFocus_Call { | |
| 628 | - | _c.Call.Return(b) | |
| 599 | + | func (_c *MockLabelWidget_HasFocus_Call) Return(_a0 bool) *MockLabelWidget_HasFocus_Call { | |
| 600 | + | _c.Call.Return(_a0) | |
| 629 | 601 | return _c | |
| 630 | 602 | } | |
| 631 | 603 | ||
| @@ -634,10 +606,9 @@ func (_c *MockLabelWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockLabe | |||
| 634 | 606 | return _c | |
| 635 | 607 | } | |
| 636 | 608 | ||
| 637 | - | // Hide provides a mock function for the type MockLabelWidget | |
| 638 | - | func (_mock *MockLabelWidget) Hide() { | |
| 639 | - | _mock.Called() | |
| 640 | - | return | |
| 609 | + | // Hide provides a mock function with no fields | |
| 610 | + | func (_m *MockLabelWidget) Hide() { | |
| 611 | + | _m.Called() | |
| 641 | 612 | } | |
| 642 | 613 | ||
| 643 | 614 | // MockLabelWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |
| @@ -667,20 +638,21 @@ func (_c *MockLabelWidget_Hide_Call) RunAndReturn(run func()) *MockLabelWidget_H | |||
| 667 | 638 | return _c | |
| 668 | 639 | } | |
| 669 | 640 | ||
| 670 | - | // IsVisible provides a mock function for the type MockLabelWidget | |
| 671 | - | func (_mock *MockLabelWidget) IsVisible() bool { | |
| 672 | - | ret := _mock.Called() | |
| 641 | + | // IsVisible provides a mock function with no fields | |
| 642 | + | func (_m *MockLabelWidget) IsVisible() bool { | |
| 643 | + | ret := _m.Called() | |
| 673 | 644 | ||
| 674 | 645 | if len(ret) == 0 { | |
| 675 | 646 | panic("no return value specified for IsVisible") | |
| 676 | 647 | } | |
| 677 | 648 | ||
| 678 | 649 | var r0 bool | |
| 679 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 680 | - | r0 = returnFunc() | |
| 650 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 651 | + | r0 = rf() | |
| 681 | 652 | } else { | |
| 682 | 653 | r0 = ret.Get(0).(bool) | |
| 683 | 654 | } | |
| 655 | + | ||
| 684 | 656 | return r0 | |
| 685 | 657 | } | |
| 686 | 658 | ||
| @@ -701,8 +673,8 @@ func (_c *MockLabelWidget_IsVisible_Call) Run(run func()) *MockLabelWidget_IsVis | |||
| 701 | 673 | return _c | |
| 702 | 674 | } | |
| 703 | 675 | ||
| 704 | - | func (_c *MockLabelWidget_IsVisible_Call) Return(b bool) *MockLabelWidget_IsVisible_Call { | |
| 705 | - | _c.Call.Return(b) | |
| 676 | + | func (_c *MockLabelWidget_IsVisible_Call) Return(_a0 bool) *MockLabelWidget_IsVisible_Call { | |
| 677 | + | _c.Call.Return(_a0) | |
| 706 | 678 | return _c | |
| 707 | 679 | } | |
| 708 | 680 | ||
| @@ -711,10 +683,9 @@ func (_c *MockLabelWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockLab | |||
| 711 | 683 | return _c | |
| 712 | 684 | } | |
| 713 | 685 | ||
| 714 | - | // RemoveCssClass provides a mock function for the type MockLabelWidget | |
| 715 | - | func (_mock *MockLabelWidget) RemoveCssClass(cssClass string) { | |
| 716 | - | _mock.Called(cssClass) | |
| 717 | - | return | |
| 686 | + | // RemoveCssClass provides a mock function with given fields: cssClass | |
| 687 | + | func (_m *MockLabelWidget) RemoveCssClass(cssClass string) { | |
| 688 | + | _m.Called(cssClass) | |
| 718 | 689 | } | |
| 719 | 690 | ||
| 720 | 691 | // MockLabelWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass' | |
| @@ -730,13 +701,7 @@ func (_e *MockLabelWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockLa | |||
| 730 | 701 | ||
| 731 | 702 | func (_c *MockLabelWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockLabelWidget_RemoveCssClass_Call { | |
| 732 | 703 | _c.Call.Run(func(args mock.Arguments) { | |
| 733 | - | var arg0 string | |
| 734 | - | if args[0] != nil { | |
| 735 | - | arg0 = args[0].(string) | |
| 736 | - | } | |
| 737 | - | run( | |
| 738 | - | arg0, | |
| 739 | - | ) | |
| 704 | + | run(args[0].(string)) | |
| 740 | 705 | }) | |
| 741 | 706 | return _c | |
| 742 | 707 | } | |
| @@ -746,15 +711,14 @@ func (_c *MockLabelWidget_RemoveCssClass_Call) Return() *MockLabelWidget_RemoveC | |||
| 746 | 711 | return _c | |
| 747 | 712 | } | |
| 748 | 713 | ||
| 749 | - | func (_c *MockLabelWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockLabelWidget_RemoveCssClass_Call { | |
| 714 | + | func (_c *MockLabelWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockLabelWidget_RemoveCssClass_Call { | |
| 750 | 715 | _c.Run(run) | |
| 751 | 716 | return _c | |
| 752 | 717 | } | |
| 753 | 718 | ||
| 754 | - | // SetCanFocus provides a mock function for the type MockLabelWidget | |
| 755 | - | func (_mock *MockLabelWidget) SetCanFocus(canFocus bool) { | |
| 756 | - | _mock.Called(canFocus) | |
| 757 | - | return | |
| 719 | + | // SetCanFocus provides a mock function with given fields: canFocus | |
| 720 | + | func (_m *MockLabelWidget) SetCanFocus(canFocus bool) { | |
| 721 | + | _m.Called(canFocus) | |
| 758 | 722 | } | |
| 759 | 723 | ||
| 760 | 724 | // MockLabelWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus' | |
| @@ -770,13 +734,7 @@ func (_e *MockLabelWidget_Expecter) SetCanFocus(canFocus interface{}) *MockLabel | |||
| 770 | 734 | ||
| 771 | 735 | func (_c *MockLabelWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockLabelWidget_SetCanFocus_Call { | |
| 772 | 736 | _c.Call.Run(func(args mock.Arguments) { | |
| 773 | - | var arg0 bool | |
| 774 | - | if args[0] != nil { | |
| 775 | - | arg0 = args[0].(bool) | |
| 776 | - | } | |
| 777 | - | run( | |
| 778 | - | arg0, | |
| 779 | - | ) | |
| 737 | + | run(args[0].(bool)) | |
| 780 | 738 | }) | |
| 781 | 739 | return _c | |
| 782 | 740 | } | |
| @@ -786,15 +744,14 @@ func (_c *MockLabelWidget_SetCanFocus_Call) Return() *MockLabelWidget_SetCanFocu | |||
| 786 | 744 | return _c | |
| 787 | 745 | } | |
| 788 | 746 | ||
| 789 | - | func (_c *MockLabelWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockLabelWidget_SetCanFocus_Call { | |
| 747 | + | func (_c *MockLabelWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetCanFocus_Call { | |
| 790 | 748 | _c.Run(run) | |
| 791 | 749 | return _c | |
| 792 | 750 | } | |
| 793 | 751 | ||
| 794 | - | // SetCanTarget provides a mock function for the type MockLabelWidget | |
| 795 | - | func (_mock *MockLabelWidget) SetCanTarget(canTarget bool) { | |
| 796 | - | _mock.Called(canTarget) | |
| 797 | - | return | |
| 752 | + | // SetCanTarget provides a mock function with given fields: canTarget | |
| 753 | + | func (_m *MockLabelWidget) SetCanTarget(canTarget bool) { | |
| 754 | + | _m.Called(canTarget) | |
| 798 | 755 | } | |
| 799 | 756 | ||
| 800 | 757 | // MockLabelWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget' | |
| @@ -810,13 +767,7 @@ func (_e *MockLabelWidget_Expecter) SetCanTarget(canTarget interface{}) *MockLab | |||
| 810 | 767 | ||
| 811 | 768 | func (_c *MockLabelWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockLabelWidget_SetCanTarget_Call { | |
| 812 | 769 | _c.Call.Run(func(args mock.Arguments) { | |
| 813 | - | var arg0 bool | |
| 814 | - | if args[0] != nil { | |
| 815 | - | arg0 = args[0].(bool) | |
| 816 | - | } | |
| 817 | - | run( | |
| 818 | - | arg0, | |
| 819 | - | ) | |
| 770 | + | run(args[0].(bool)) | |
| 820 | 771 | }) | |
| 821 | 772 | return _c | |
| 822 | 773 | } | |
| @@ -826,15 +777,14 @@ func (_c *MockLabelWidget_SetCanTarget_Call) Return() *MockLabelWidget_SetCanTar | |||
| 826 | 777 | return _c | |
| 827 | 778 | } | |
| 828 | 779 | ||
| 829 | - | func (_c *MockLabelWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockLabelWidget_SetCanTarget_Call { | |
| 780 | + | func (_c *MockLabelWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetCanTarget_Call { | |
| 830 | 781 | _c.Run(run) | |
| 831 | 782 | return _c | |
| 832 | 783 | } | |
| 833 | 784 | ||
| 834 | - | // SetEllipsize provides a mock function for the type MockLabelWidget | |
| 835 | - | func (_mock *MockLabelWidget) SetEllipsize(mode layout.EllipsizeMode) { | |
| 836 | - | _mock.Called(mode) | |
| 837 | - | return | |
| 785 | + | // SetEllipsize provides a mock function with given fields: mode | |
| 786 | + | func (_m *MockLabelWidget) SetEllipsize(mode int) { | |
| 787 | + | _m.Called(mode) | |
| 838 | 788 | } | |
| 839 | 789 | ||
| 840 | 790 | // MockLabelWidget_SetEllipsize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEllipsize' | |
| @@ -843,20 +793,14 @@ type MockLabelWidget_SetEllipsize_Call struct { | |||
| 843 | 793 | } | |
| 844 | 794 | ||
| 845 | 795 | // SetEllipsize is a helper method to define mock.On call | |
| 846 | - | // - mode layout.EllipsizeMode | |
| 796 | + | // - mode int | |
| 847 | 797 | func (_e *MockLabelWidget_Expecter) SetEllipsize(mode interface{}) *MockLabelWidget_SetEllipsize_Call { | |
| 848 | 798 | return &MockLabelWidget_SetEllipsize_Call{Call: _e.mock.On("SetEllipsize", mode)} | |
| 849 | 799 | } | |
| 850 | 800 | ||
| 851 | - | func (_c *MockLabelWidget_SetEllipsize_Call) Run(run func(mode layout.EllipsizeMode)) *MockLabelWidget_SetEllipsize_Call { | |
| 801 | + | func (_c *MockLabelWidget_SetEllipsize_Call) Run(run func(mode int)) *MockLabelWidget_SetEllipsize_Call { | |
| 852 | 802 | _c.Call.Run(func(args mock.Arguments) { | |
| 853 | - | var arg0 layout.EllipsizeMode | |
| 854 | - | if args[0] != nil { | |
| 855 | - | arg0 = args[0].(layout.EllipsizeMode) | |
| 856 | - | } | |
| 857 | - | run( | |
| 858 | - | arg0, | |
| 859 | - | ) | |
| 803 | + | run(args[0].(int)) | |
| 860 | 804 | }) | |
| 861 | 805 | return _c | |
| 862 | 806 | } | |
| @@ -866,15 +810,14 @@ func (_c *MockLabelWidget_SetEllipsize_Call) Return() *MockLabelWidget_SetEllips | |||
| 866 | 810 | return _c | |
| 867 | 811 | } | |
| 868 | 812 | ||
| 869 | - | func (_c *MockLabelWidget_SetEllipsize_Call) RunAndReturn(run func(mode layout.EllipsizeMode)) *MockLabelWidget_SetEllipsize_Call { | |
| 813 | + | func (_c *MockLabelWidget_SetEllipsize_Call) RunAndReturn(run func(int)) *MockLabelWidget_SetEllipsize_Call { | |
| 870 | 814 | _c.Run(run) | |
| 871 | 815 | return _c | |
| 872 | 816 | } | |
| 873 | 817 | ||
| 874 | - | // SetFocusOnClick provides a mock function for the type MockLabelWidget | |
| 875 | - | func (_mock *MockLabelWidget) SetFocusOnClick(focusOnClick bool) { | |
| 876 | - | _mock.Called(focusOnClick) | |
| 877 | - | return | |
| 818 | + | // SetFocusOnClick provides a mock function with given fields: focusOnClick | |
| 819 | + | func (_m *MockLabelWidget) SetFocusOnClick(focusOnClick bool) { | |
| 820 | + | _m.Called(focusOnClick) | |
| 878 | 821 | } | |
| 879 | 822 | ||
| 880 | 823 | // MockLabelWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick' | |
| @@ -890,13 +833,7 @@ func (_e *MockLabelWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *M | |||
| 890 | 833 | ||
| 891 | 834 | func (_c *MockLabelWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockLabelWidget_SetFocusOnClick_Call { | |
| 892 | 835 | _c.Call.Run(func(args mock.Arguments) { | |
| 893 | - | var arg0 bool | |
| 894 | - | if args[0] != nil { | |
| 895 | - | arg0 = args[0].(bool) | |
| 896 | - | } | |
| 897 | - | run( | |
| 898 | - | arg0, | |
| 899 | - | ) | |
| 836 | + | run(args[0].(bool)) | |
| 900 | 837 | }) | |
| 901 | 838 | return _c | |
| 902 | 839 | } | |
| @@ -906,15 +843,14 @@ func (_c *MockLabelWidget_SetFocusOnClick_Call) Return() *MockLabelWidget_SetFoc | |||
| 906 | 843 | return _c | |
| 907 | 844 | } | |
| 908 | 845 | ||
| 909 | - | func (_c *MockLabelWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockLabelWidget_SetFocusOnClick_Call { | |
| 846 | + | func (_c *MockLabelWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetFocusOnClick_Call { | |
| 910 | 847 | _c.Run(run) | |
| 911 | 848 | return _c | |
| 912 | 849 | } | |
| 913 | 850 | ||
| 914 | - | // SetHalign provides a mock function for the type MockLabelWidget | |
| 915 | - | func (_mock *MockLabelWidget) SetHalign(align gtk.Align) { | |
| 916 | - | _mock.Called(align) | |
| 917 | - | return | |
| 851 | + | // SetHalign provides a mock function with given fields: align | |
| 852 | + | func (_m *MockLabelWidget) SetHalign(align gtk.Align) { | |
| 853 | + | _m.Called(align) | |
| 918 | 854 | } | |
| 919 | 855 | ||
| 920 | 856 | // MockLabelWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign' | |
| @@ -930,13 +866,7 @@ func (_e *MockLabelWidget_Expecter) SetHalign(align interface{}) *MockLabelWidge | |||
| 930 | 866 | ||
| 931 | 867 | func (_c *MockLabelWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockLabelWidget_SetHalign_Call { | |
| 932 | 868 | _c.Call.Run(func(args mock.Arguments) { | |
| 933 | - | var arg0 gtk.Align | |
| 934 | - | if args[0] != nil { | |
| 935 | - | arg0 = args[0].(gtk.Align) | |
| 936 | - | } | |
| 937 | - | run( | |
| 938 | - | arg0, | |
| 939 | - | ) | |
| 869 | + | run(args[0].(gtk.Align)) | |
| 940 | 870 | }) | |
| 941 | 871 | return _c | |
| 942 | 872 | } | |
| @@ -946,15 +876,14 @@ func (_c *MockLabelWidget_SetHalign_Call) Return() *MockLabelWidget_SetHalign_Ca | |||
| 946 | 876 | return _c | |
| 947 | 877 | } | |
| 948 | 878 | ||
| 949 | - | func (_c *MockLabelWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockLabelWidget_SetHalign_Call { | |
| 879 | + | func (_c *MockLabelWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockLabelWidget_SetHalign_Call { | |
| 950 | 880 | _c.Run(run) | |
| 951 | 881 | return _c | |
| 952 | 882 | } | |
| 953 | 883 | ||
| 954 | - | // SetHexpand provides a mock function for the type MockLabelWidget | |
| 955 | - | func (_mock *MockLabelWidget) SetHexpand(expand bool) { | |
| 956 | - | _mock.Called(expand) | |
| 957 | - | return | |
| 884 | + | // SetHexpand provides a mock function with given fields: expand | |
| 885 | + | func (_m *MockLabelWidget) SetHexpand(expand bool) { | |
| 886 | + | _m.Called(expand) | |
| 958 | 887 | } | |
| 959 | 888 | ||
| 960 | 889 | // MockLabelWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand' | |
| @@ -970,13 +899,7 @@ func (_e *MockLabelWidget_Expecter) SetHexpand(expand interface{}) *MockLabelWid | |||
| 970 | 899 | ||
| 971 | 900 | func (_c *MockLabelWidget_SetHexpand_Call) Run(run func(expand bool)) *MockLabelWidget_SetHexpand_Call { | |
| 972 | 901 | _c.Call.Run(func(args mock.Arguments) { | |
| 973 | - | var arg0 bool | |
| 974 | - | if args[0] != nil { | |
| 975 | - | arg0 = args[0].(bool) | |
| 976 | - | } | |
| 977 | - | run( | |
| 978 | - | arg0, | |
| 979 | - | ) | |
| 902 | + | run(args[0].(bool)) | |
| 980 | 903 | }) | |
| 981 | 904 | return _c | |
| 982 | 905 | } | |
| @@ -986,15 +909,14 @@ func (_c *MockLabelWidget_SetHexpand_Call) Return() *MockLabelWidget_SetHexpand_ | |||
| 986 | 909 | return _c | |
| 987 | 910 | } | |
| 988 | 911 | ||
| 989 | - | func (_c *MockLabelWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockLabelWidget_SetHexpand_Call { | |
| 912 | + | func (_c *MockLabelWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetHexpand_Call { | |
| 990 | 913 | _c.Run(run) | |
| 991 | 914 | return _c | |
| 992 | 915 | } | |
| 993 | 916 | ||
| 994 | - | // SetMarkup provides a mock function for the type MockLabelWidget | |
| 995 | - | func (_mock *MockLabelWidget) SetMarkup(markup string) { | |
| 996 | - | _mock.Called(markup) | |
| 997 | - | return | |
| 917 | + | // SetMarkup provides a mock function with given fields: markup | |
| 918 | + | func (_m *MockLabelWidget) SetMarkup(markup string) { | |
| 919 | + | _m.Called(markup) | |
| 998 | 920 | } | |
| 999 | 921 | ||
| 1000 | 922 | // MockLabelWidget_SetMarkup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMarkup' | |
| @@ -1010,13 +932,7 @@ func (_e *MockLabelWidget_Expecter) SetMarkup(markup interface{}) *MockLabelWidg | |||
| 1010 | 932 | ||
| 1011 | 933 | func (_c *MockLabelWidget_SetMarkup_Call) Run(run func(markup string)) *MockLabelWidget_SetMarkup_Call { | |
| 1012 | 934 | _c.Call.Run(func(args mock.Arguments) { | |
| 1013 | - | var arg0 string | |
| 1014 | - | if args[0] != nil { | |
| 1015 | - | arg0 = args[0].(string) | |
| 1016 | - | } | |
| 1017 | - | run( | |
| 1018 | - | arg0, | |
| 1019 | - | ) | |
| 935 | + | run(args[0].(string)) | |
| 1020 | 936 | }) | |
| 1021 | 937 | return _c | |
| 1022 | 938 | } | |
| @@ -1026,15 +942,14 @@ func (_c *MockLabelWidget_SetMarkup_Call) Return() *MockLabelWidget_SetMarkup_Ca | |||
| 1026 | 942 | return _c | |
| 1027 | 943 | } | |
| 1028 | 944 | ||
| 1029 | - | func (_c *MockLabelWidget_SetMarkup_Call) RunAndReturn(run func(markup string)) *MockLabelWidget_SetMarkup_Call { | |
| 945 | + | func (_c *MockLabelWidget_SetMarkup_Call) RunAndReturn(run func(string)) *MockLabelWidget_SetMarkup_Call { | |
| 1030 | 946 | _c.Run(run) | |
| 1031 | 947 | return _c | |
| 1032 | 948 | } | |
| 1033 | 949 | ||
| 1034 | - | // SetMaxWidthChars provides a mock function for the type MockLabelWidget | |
| 1035 | - | func (_mock *MockLabelWidget) SetMaxWidthChars(nChars int) { | |
| 1036 | - | _mock.Called(nChars) | |
| 1037 | - | return | |
| 950 | + | // SetMaxWidthChars provides a mock function with given fields: nChars | |
| 951 | + | func (_m *MockLabelWidget) SetMaxWidthChars(nChars int) { | |
| 952 | + | _m.Called(nChars) | |
| 1038 | 953 | } | |
| 1039 | 954 | ||
| 1040 | 955 | // MockLabelWidget_SetMaxWidthChars_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMaxWidthChars' | |
| @@ -1050,13 +965,7 @@ func (_e *MockLabelWidget_Expecter) SetMaxWidthChars(nChars interface{}) *MockLa | |||
| 1050 | 965 | ||
| 1051 | 966 | func (_c *MockLabelWidget_SetMaxWidthChars_Call) Run(run func(nChars int)) *MockLabelWidget_SetMaxWidthChars_Call { | |
| 1052 | 967 | _c.Call.Run(func(args mock.Arguments) { | |
| 1053 | - | var arg0 int | |
| 1054 | - | if args[0] != nil { | |
| 1055 | - | arg0 = args[0].(int) | |
| 1056 | - | } | |
| 1057 | - | run( | |
| 1058 | - | arg0, | |
| 1059 | - | ) | |
| 968 | + | run(args[0].(int)) | |
| 1060 | 969 | }) | |
| 1061 | 970 | return _c | |
| 1062 | 971 | } | |
| @@ -1066,15 +975,14 @@ func (_c *MockLabelWidget_SetMaxWidthChars_Call) Return() *MockLabelWidget_SetMa | |||
| 1066 | 975 | return _c | |
| 1067 | 976 | } | |
| 1068 | 977 | ||
| 1069 | - | func (_c *MockLabelWidget_SetMaxWidthChars_Call) RunAndReturn(run func(nChars int)) *MockLabelWidget_SetMaxWidthChars_Call { | |
| 978 | + | func (_c *MockLabelWidget_SetMaxWidthChars_Call) RunAndReturn(run func(int)) *MockLabelWidget_SetMaxWidthChars_Call { | |
| 1070 | 979 | _c.Run(run) | |
| 1071 | 980 | return _c | |
| 1072 | 981 | } | |
| 1073 | 982 | ||
| 1074 | - | // SetSizeRequest provides a mock function for the type MockLabelWidget | |
| 1075 | - | func (_mock *MockLabelWidget) SetSizeRequest(width int, height int) { | |
| 1076 | - | _mock.Called(width, height) | |
| 1077 | - | return | |
| 983 | + | // SetSizeRequest provides a mock function with given fields: width, height | |
| 984 | + | func (_m *MockLabelWidget) SetSizeRequest(width int, height int) { | |
| 985 | + | _m.Called(width, height) | |
| 1078 | 986 | } | |
| 1079 | 987 | ||
| 1080 | 988 | // MockLabelWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest' | |
| @@ -1091,18 +999,7 @@ func (_e *MockLabelWidget_Expecter) SetSizeRequest(width interface{}, height int | |||
| 1091 | 999 | ||
| 1092 | 1000 | func (_c *MockLabelWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockLabelWidget_SetSizeRequest_Call { | |
| 1093 | 1001 | _c.Call.Run(func(args mock.Arguments) { | |
| 1094 | - | var arg0 int | |
| 1095 | - | if args[0] != nil { | |
| 1096 | - | arg0 = args[0].(int) | |
| 1097 | - | } | |
| 1098 | - | var arg1 int | |
| 1099 | - | if args[1] != nil { | |
| 1100 | - | arg1 = args[1].(int) | |
| 1101 | - | } | |
| 1102 | - | run( | |
| 1103 | - | arg0, | |
| 1104 | - | arg1, | |
| 1105 | - | ) | |
| 1002 | + | run(args[0].(int), args[1].(int)) | |
| 1106 | 1003 | }) | |
| 1107 | 1004 | return _c | |
| 1108 | 1005 | } | |
| @@ -1112,15 +1009,14 @@ func (_c *MockLabelWidget_SetSizeRequest_Call) Return() *MockLabelWidget_SetSize | |||
| 1112 | 1009 | return _c | |
| 1113 | 1010 | } | |
| 1114 | 1011 | ||
| 1115 | - | func (_c *MockLabelWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockLabelWidget_SetSizeRequest_Call { | |
| 1012 | + | func (_c *MockLabelWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockLabelWidget_SetSizeRequest_Call { | |
| 1116 | 1013 | _c.Run(run) | |
| 1117 | 1014 | return _c | |
| 1118 | 1015 | } | |
| 1119 | 1016 | ||
| 1120 | - | // SetText provides a mock function for the type MockLabelWidget | |
| 1121 | - | func (_mock *MockLabelWidget) SetText(text string) { | |
| 1122 | - | _mock.Called(text) | |
| 1123 | - | return | |
| 1017 | + | // SetText provides a mock function with given fields: text | |
| 1018 | + | func (_m *MockLabelWidget) SetText(text string) { | |
| 1019 | + | _m.Called(text) | |
| 1124 | 1020 | } | |
| 1125 | 1021 | ||
| 1126 | 1022 | // MockLabelWidget_SetText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetText' | |
| @@ -1136,13 +1032,7 @@ func (_e *MockLabelWidget_Expecter) SetText(text interface{}) *MockLabelWidget_S | |||
| 1136 | 1032 | ||
| 1137 | 1033 | func (_c *MockLabelWidget_SetText_Call) Run(run func(text string)) *MockLabelWidget_SetText_Call { | |
| 1138 | 1034 | _c.Call.Run(func(args mock.Arguments) { | |
| 1139 | - | var arg0 string | |
| 1140 | - | if args[0] != nil { | |
| 1141 | - | arg0 = args[0].(string) | |
| 1142 | - | } | |
| 1143 | - | run( | |
| 1144 | - | arg0, | |
| 1145 | - | ) | |
| 1035 | + | run(args[0].(string)) | |
| 1146 | 1036 | }) | |
| 1147 | 1037 | return _c | |
| 1148 | 1038 | } | |
| @@ -1152,15 +1042,14 @@ func (_c *MockLabelWidget_SetText_Call) Return() *MockLabelWidget_SetText_Call { | |||
| 1152 | 1042 | return _c | |
| 1153 | 1043 | } | |
| 1154 | 1044 | ||
| 1155 | - | func (_c *MockLabelWidget_SetText_Call) RunAndReturn(run func(text string)) *MockLabelWidget_SetText_Call { | |
| 1045 | + | func (_c *MockLabelWidget_SetText_Call) RunAndReturn(run func(string)) *MockLabelWidget_SetText_Call { | |
| 1156 | 1046 | _c.Run(run) | |
| 1157 | 1047 | return _c | |
| 1158 | 1048 | } | |
| 1159 | 1049 | ||
| 1160 | - | // SetValign provides a mock function for the type MockLabelWidget | |
| 1161 | - | func (_mock *MockLabelWidget) SetValign(align gtk.Align) { | |
| 1162 | - | _mock.Called(align) | |
| 1163 | - | return | |
| 1050 | + | // SetValign provides a mock function with given fields: align | |
| 1051 | + | func (_m *MockLabelWidget) SetValign(align gtk.Align) { | |
| 1052 | + | _m.Called(align) | |
| 1164 | 1053 | } | |
| 1165 | 1054 | ||
| 1166 | 1055 | // MockLabelWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign' | |
| @@ -1176,13 +1065,7 @@ func (_e *MockLabelWidget_Expecter) SetValign(align interface{}) *MockLabelWidge | |||
| 1176 | 1065 | ||
| 1177 | 1066 | func (_c *MockLabelWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockLabelWidget_SetValign_Call { | |
| 1178 | 1067 | _c.Call.Run(func(args mock.Arguments) { | |
| 1179 | - | var arg0 gtk.Align | |
| 1180 | - | if args[0] != nil { | |
| 1181 | - | arg0 = args[0].(gtk.Align) | |
| 1182 | - | } | |
| 1183 | - | run( | |
| 1184 | - | arg0, | |
| 1185 | - | ) | |
| 1068 | + | run(args[0].(gtk.Align)) | |
| 1186 | 1069 | }) | |
| 1187 | 1070 | return _c | |
| 1188 | 1071 | } | |
| @@ -1192,15 +1075,14 @@ func (_c *MockLabelWidget_SetValign_Call) Return() *MockLabelWidget_SetValign_Ca | |||
| 1192 | 1075 | return _c | |
| 1193 | 1076 | } | |
| 1194 | 1077 | ||
| 1195 | - | func (_c *MockLabelWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockLabelWidget_SetValign_Call { | |
| 1078 | + | func (_c *MockLabelWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockLabelWidget_SetValign_Call { | |
| 1196 | 1079 | _c.Run(run) | |
| 1197 | 1080 | return _c | |
| 1198 | 1081 | } | |
| 1199 | 1082 | ||
| 1200 | - | // SetVexpand provides a mock function for the type MockLabelWidget | |
| 1201 | - | func (_mock *MockLabelWidget) SetVexpand(expand bool) { | |
| 1202 | - | _mock.Called(expand) | |
| 1203 | - | return | |
| 1083 | + | // SetVexpand provides a mock function with given fields: expand | |
| 1084 | + | func (_m *MockLabelWidget) SetVexpand(expand bool) { | |
| 1085 | + | _m.Called(expand) | |
| 1204 | 1086 | } | |
| 1205 | 1087 | ||
| 1206 | 1088 | // MockLabelWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand' | |
| @@ -1216,13 +1098,7 @@ func (_e *MockLabelWidget_Expecter) SetVexpand(expand interface{}) *MockLabelWid | |||
| 1216 | 1098 | ||
| 1217 | 1099 | func (_c *MockLabelWidget_SetVexpand_Call) Run(run func(expand bool)) *MockLabelWidget_SetVexpand_Call { | |
| 1218 | 1100 | _c.Call.Run(func(args mock.Arguments) { | |
| 1219 | - | var arg0 bool | |
| 1220 | - | if args[0] != nil { | |
| 1221 | - | arg0 = args[0].(bool) | |
| 1222 | - | } | |
| 1223 | - | run( | |
| 1224 | - | arg0, | |
| 1225 | - | ) | |
| 1101 | + | run(args[0].(bool)) | |
| 1226 | 1102 | }) | |
| 1227 | 1103 | return _c | |
| 1228 | 1104 | } | |
| @@ -1232,15 +1108,14 @@ func (_c *MockLabelWidget_SetVexpand_Call) Return() *MockLabelWidget_SetVexpand_ | |||
| 1232 | 1108 | return _c | |
| 1233 | 1109 | } | |
| 1234 | 1110 | ||
| 1235 | - | func (_c *MockLabelWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockLabelWidget_SetVexpand_Call { | |
| 1111 | + | func (_c *MockLabelWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetVexpand_Call { | |
| 1236 | 1112 | _c.Run(run) | |
| 1237 | 1113 | return _c | |
| 1238 | 1114 | } | |
| 1239 | 1115 | ||
| 1240 | - | // SetVisible provides a mock function for the type MockLabelWidget | |
| 1241 | - | func (_mock *MockLabelWidget) SetVisible(visible bool) { | |
| 1242 | - | _mock.Called(visible) | |
| 1243 | - | return | |
| 1116 | + | // SetVisible provides a mock function with given fields: visible | |
| 1117 | + | func (_m *MockLabelWidget) SetVisible(visible bool) { | |
| 1118 | + | _m.Called(visible) | |
| 1244 | 1119 | } | |
| 1245 | 1120 | ||
| 1246 | 1121 | // MockLabelWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible' | |
| @@ -1256,13 +1131,7 @@ func (_e *MockLabelWidget_Expecter) SetVisible(visible interface{}) *MockLabelWi | |||
| 1256 | 1131 | ||
| 1257 | 1132 | func (_c *MockLabelWidget_SetVisible_Call) Run(run func(visible bool)) *MockLabelWidget_SetVisible_Call { | |
| 1258 | 1133 | _c.Call.Run(func(args mock.Arguments) { | |
| 1259 | - | var arg0 bool | |
| 1260 | - | if args[0] != nil { | |
| 1261 | - | arg0 = args[0].(bool) | |
| 1262 | - | } | |
| 1263 | - | run( | |
| 1264 | - | arg0, | |
| 1265 | - | ) | |
| 1134 | + | run(args[0].(bool)) | |
| 1266 | 1135 | }) | |
| 1267 | 1136 | return _c | |
| 1268 | 1137 | } | |
| @@ -1272,15 +1141,14 @@ func (_c *MockLabelWidget_SetVisible_Call) Return() *MockLabelWidget_SetVisible_ | |||
| 1272 | 1141 | return _c | |
| 1273 | 1142 | } | |
| 1274 | 1143 | ||
| 1275 | - | func (_c *MockLabelWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockLabelWidget_SetVisible_Call { | |
| 1144 | + | func (_c *MockLabelWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockLabelWidget_SetVisible_Call { | |
| 1276 | 1145 | _c.Run(run) | |
| 1277 | 1146 | return _c | |
| 1278 | 1147 | } | |
| 1279 | 1148 | ||
| 1280 | - | // SetXalign provides a mock function for the type MockLabelWidget | |
| 1281 | - | func (_mock *MockLabelWidget) SetXalign(xalign float32) { | |
| 1282 | - | _mock.Called(xalign) | |
| 1283 | - | return | |
| 1149 | + | // SetXalign provides a mock function with given fields: xalign | |
| 1150 | + | func (_m *MockLabelWidget) SetXalign(xalign float32) { | |
| 1151 | + | _m.Called(xalign) | |
| 1284 | 1152 | } | |
| 1285 | 1153 | ||
| 1286 | 1154 | // MockLabelWidget_SetXalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetXalign' | |
| @@ -1296,13 +1164,7 @@ func (_e *MockLabelWidget_Expecter) SetXalign(xalign interface{}) *MockLabelWidg | |||
| 1296 | 1164 | ||
| 1297 | 1165 | func (_c *MockLabelWidget_SetXalign_Call) Run(run func(xalign float32)) *MockLabelWidget_SetXalign_Call { | |
| 1298 | 1166 | _c.Call.Run(func(args mock.Arguments) { | |
| 1299 | - | var arg0 float32 | |
| 1300 | - | if args[0] != nil { | |
| 1301 | - | arg0 = args[0].(float32) | |
| 1302 | - | } | |
| 1303 | - | run( | |
| 1304 | - | arg0, | |
| 1305 | - | ) | |
| 1167 | + | run(args[0].(float32)) | |
| 1306 | 1168 | }) | |
| 1307 | 1169 | return _c | |
| 1308 | 1170 | } | |
| @@ -1312,15 +1174,14 @@ func (_c *MockLabelWidget_SetXalign_Call) Return() *MockLabelWidget_SetXalign_Ca | |||
| 1312 | 1174 | return _c | |
| 1313 | 1175 | } | |
| 1314 | 1176 | ||
| 1315 | - | func (_c *MockLabelWidget_SetXalign_Call) RunAndReturn(run func(xalign float32)) *MockLabelWidget_SetXalign_Call { | |
| 1177 | + | func (_c *MockLabelWidget_SetXalign_Call) RunAndReturn(run func(float32)) *MockLabelWidget_SetXalign_Call { | |
| 1316 | 1178 | _c.Run(run) | |
| 1317 | 1179 | return _c | |
| 1318 | 1180 | } | |
| 1319 | 1181 | ||
| 1320 | - | // Show provides a mock function for the type MockLabelWidget | |
| 1321 | - | func (_mock *MockLabelWidget) Show() { | |
| 1322 | - | _mock.Called() | |
| 1323 | - | return | |
| 1182 | + | // Show provides a mock function with no fields | |
| 1183 | + | func (_m *MockLabelWidget) Show() { | |
| 1184 | + | _m.Called() | |
| 1324 | 1185 | } | |
| 1325 | 1186 | ||
| 1326 | 1187 | // MockLabelWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |
| @@ -1350,10 +1211,9 @@ func (_c *MockLabelWidget_Show_Call) RunAndReturn(run func()) *MockLabelWidget_S | |||
| 1350 | 1211 | return _c | |
| 1351 | 1212 | } | |
| 1352 | 1213 | ||
| 1353 | - | // Unparent provides a mock function for the type MockLabelWidget | |
| 1354 | - | func (_mock *MockLabelWidget) Unparent() { | |
| 1355 | - | _mock.Called() | |
| 1356 | - | return | |
| 1214 | + | // Unparent provides a mock function with no fields | |
| 1215 | + | func (_m *MockLabelWidget) Unparent() { | |
| 1216 | + | _m.Called() | |
| 1357 | 1217 | } | |
| 1358 | 1218 | ||
| 1359 | 1219 | // MockLabelWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent' | |
| @@ -1382,3 +1242,17 @@ func (_c *MockLabelWidget_Unparent_Call) RunAndReturn(run func()) *MockLabelWidg | |||
| 1382 | 1242 | _c.Run(run) | |
| 1383 | 1243 | return _c | |
| 1384 | 1244 | } | |
| 1245 | + | ||
| 1246 | + | // NewMockLabelWidget creates a new instance of MockLabelWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 1247 | + | // The first argument is typically a *testing.T value. | |
| 1248 | + | func NewMockLabelWidget(t interface { | |
| 1249 | + | mock.TestingT | |
| 1250 | + | Cleanup(func()) | |
| 1251 | + | }) *MockLabelWidget { | |
| 1252 | + | mock := &MockLabelWidget{} | |
| 1253 | + | mock.Mock.Test(t) | |
| 1254 | + | ||
| 1255 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 1256 | + | ||
| 1257 | + | return mock | |
| 1258 | + | } | |
M internal/ui/layout/mocks/mock_overlay_widget.go +238 -384
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockOverlayWidget creates a new instance of MockOverlayWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockOverlayWidget(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockOverlayWidget { | |
| 19 | - | mock := &MockOverlayWidget{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockOverlayWidget is an autogenerated mock type for the OverlayWidget type | |
| 28 | 13 | type MockOverlayWidget struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,10 +22,9 @@ func (_m *MockOverlayWidget) EXPECT() *MockOverlayWidget_Expecter { | |||
| 37 | 22 | return &MockOverlayWidget_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // AddController provides a mock function for the type MockOverlayWidget | |
| 41 | - | func (_mock *MockOverlayWidget) AddController(controller *gtk.EventController) { | |
| 42 | - | _mock.Called(controller) | |
| 43 | - | return | |
| 25 | + | // AddController provides a mock function with given fields: controller | |
| 26 | + | func (_m *MockOverlayWidget) AddController(controller *gtk.EventController) { | |
| 27 | + | _m.Called(controller) | |
| 44 | 28 | } | |
| 45 | 29 | ||
| 46 | 30 | // MockOverlayWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController' | |
| @@ -56,13 +40,7 @@ func (_e *MockOverlayWidget_Expecter) AddController(controller interface{}) *Moc | |||
| 56 | 40 | ||
| 57 | 41 | func (_c *MockOverlayWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockOverlayWidget_AddController_Call { | |
| 58 | 42 | _c.Call.Run(func(args mock.Arguments) { | |
| 59 | - | var arg0 *gtk.EventController | |
| 60 | - | if args[0] != nil { | |
| 61 | - | arg0 = args[0].(*gtk.EventController) | |
| 62 | - | } | |
| 63 | - | run( | |
| 64 | - | arg0, | |
| 65 | - | ) | |
| 43 | + | run(args[0].(*gtk.EventController)) | |
| 66 | 44 | }) | |
| 67 | 45 | return _c | |
| 68 | 46 | } | |
| @@ -72,15 +50,14 @@ func (_c *MockOverlayWidget_AddController_Call) Return() *MockOverlayWidget_AddC | |||
| 72 | 50 | return _c | |
| 73 | 51 | } | |
| 74 | 52 | ||
| 75 | - | func (_c *MockOverlayWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockOverlayWidget_AddController_Call { | |
| 53 | + | func (_c *MockOverlayWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockOverlayWidget_AddController_Call { | |
| 76 | 54 | _c.Run(run) | |
| 77 | 55 | return _c | |
| 78 | 56 | } | |
| 79 | 57 | ||
| 80 | - | // AddCssClass provides a mock function for the type MockOverlayWidget | |
| 81 | - | func (_mock *MockOverlayWidget) AddCssClass(cssClass string) { | |
| 82 | - | _mock.Called(cssClass) | |
| 83 | - | return | |
| 58 | + | // AddCssClass provides a mock function with given fields: cssClass | |
| 59 | + | func (_m *MockOverlayWidget) AddCssClass(cssClass string) { | |
| 60 | + | _m.Called(cssClass) | |
| 84 | 61 | } | |
| 85 | 62 | ||
| 86 | 63 | // MockOverlayWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass' | |
| @@ -96,13 +73,7 @@ func (_e *MockOverlayWidget_Expecter) AddCssClass(cssClass interface{}) *MockOve | |||
| 96 | 73 | ||
| 97 | 74 | func (_c *MockOverlayWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockOverlayWidget_AddCssClass_Call { | |
| 98 | 75 | _c.Call.Run(func(args mock.Arguments) { | |
| 99 | - | var arg0 string | |
| 100 | - | if args[0] != nil { | |
| 101 | - | arg0 = args[0].(string) | |
| 102 | - | } | |
| 103 | - | run( | |
| 104 | - | arg0, | |
| 105 | - | ) | |
| 76 | + | run(args[0].(string)) | |
| 106 | 77 | }) | |
| 107 | 78 | return _c | |
| 108 | 79 | } | |
| @@ -112,15 +83,14 @@ func (_c *MockOverlayWidget_AddCssClass_Call) Return() *MockOverlayWidget_AddCss | |||
| 112 | 83 | return _c | |
| 113 | 84 | } | |
| 114 | 85 | ||
| 115 | - | func (_c *MockOverlayWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockOverlayWidget_AddCssClass_Call { | |
| 86 | + | func (_c *MockOverlayWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockOverlayWidget_AddCssClass_Call { | |
| 116 | 87 | _c.Run(run) | |
| 117 | 88 | return _c | |
| 118 | 89 | } | |
| 119 | 90 | ||
| 120 | - | // AddOverlay provides a mock function for the type MockOverlayWidget | |
| 121 | - | func (_mock *MockOverlayWidget) AddOverlay(overlay layout.Widget) { | |
| 122 | - | _mock.Called(overlay) | |
| 123 | - | return | |
| 91 | + | // AddOverlay provides a mock function with given fields: overlay | |
| 92 | + | func (_m *MockOverlayWidget) AddOverlay(overlay layout.Widget) { | |
| 93 | + | _m.Called(overlay) | |
| 124 | 94 | } | |
| 125 | 95 | ||
| 126 | 96 | // MockOverlayWidget_AddOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddOverlay' | |
| @@ -136,13 +106,7 @@ func (_e *MockOverlayWidget_Expecter) AddOverlay(overlay interface{}) *MockOverl | |||
| 136 | 106 | ||
| 137 | 107 | func (_c *MockOverlayWidget_AddOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_AddOverlay_Call { | |
| 138 | 108 | _c.Call.Run(func(args mock.Arguments) { | |
| 139 | - | var arg0 layout.Widget | |
| 140 | - | if args[0] != nil { | |
| 141 | - | arg0 = args[0].(layout.Widget) | |
| 142 | - | } | |
| 143 | - | run( | |
| 144 | - | arg0, | |
| 145 | - | ) | |
| 109 | + | run(args[0].(layout.Widget)) | |
| 146 | 110 | }) | |
| 147 | 111 | return _c | |
| 148 | 112 | } | |
| @@ -152,14 +116,14 @@ func (_c *MockOverlayWidget_AddOverlay_Call) Return() *MockOverlayWidget_AddOver | |||
| 152 | 116 | return _c | |
| 153 | 117 | } | |
| 154 | 118 | ||
| 155 | - | func (_c *MockOverlayWidget_AddOverlay_Call) RunAndReturn(run func(overlay layout.Widget)) *MockOverlayWidget_AddOverlay_Call { | |
| 119 | + | func (_c *MockOverlayWidget_AddOverlay_Call) RunAndReturn(run func(layout.Widget)) *MockOverlayWidget_AddOverlay_Call { | |
| 156 | 120 | _c.Run(run) | |
| 157 | 121 | return _c | |
| 158 | 122 | } | |
| 159 | 123 | ||
| 160 | - | // ComputePoint provides a mock function for the type MockOverlayWidget | |
| 161 | - | func (_mock *MockOverlayWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 162 | - | ret := _mock.Called(target) | |
| 124 | + | // ComputePoint provides a mock function with given fields: target | |
| 125 | + | func (_m *MockOverlayWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 126 | + | ret := _m.Called(target) | |
| 163 | 127 | ||
| 164 | 128 | if len(ret) == 0 { | |
| 165 | 129 | panic("no return value specified for ComputePoint") | |
| @@ -168,24 +132,27 @@ func (_mock *MockOverlayWidget) ComputePoint(target layout.Widget) (float64, flo | |||
| 168 | 132 | var r0 float64 | |
| 169 | 133 | var r1 float64 | |
| 170 | 134 | var r2 bool | |
| 171 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 172 | - | return returnFunc(target) | |
| 135 | + | if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 136 | + | return rf(target) | |
| 173 | 137 | } | |
| 174 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 175 | - | r0 = returnFunc(target) | |
| 138 | + | if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 139 | + | r0 = rf(target) | |
| 176 | 140 | } else { | |
| 177 | 141 | r0 = ret.Get(0).(float64) | |
| 178 | 142 | } | |
| 179 | - | if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 180 | - | r1 = returnFunc(target) | |
| 143 | + | ||
| 144 | + | if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 145 | + | r1 = rf(target) | |
| 181 | 146 | } else { | |
| 182 | 147 | r1 = ret.Get(1).(float64) | |
| 183 | 148 | } | |
| 184 | - | if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 185 | - | r2 = returnFunc(target) | |
| 149 | + | ||
| 150 | + | if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 151 | + | r2 = rf(target) | |
| 186 | 152 | } else { | |
| 187 | 153 | r2 = ret.Get(2).(bool) | |
| 188 | 154 | } | |
| 155 | + | ||
| 189 | 156 | return r0, r1, r2 | |
| 190 | 157 | } | |
| 191 | 158 | ||
| @@ -202,13 +169,7 @@ func (_e *MockOverlayWidget_Expecter) ComputePoint(target interface{}) *MockOver | |||
| 202 | 169 | ||
| 203 | 170 | func (_c *MockOverlayWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockOverlayWidget_ComputePoint_Call { | |
| 204 | 171 | _c.Call.Run(func(args mock.Arguments) { | |
| 205 | - | var arg0 layout.Widget | |
| 206 | - | if args[0] != nil { | |
| 207 | - | arg0 = args[0].(layout.Widget) | |
| 208 | - | } | |
| 209 | - | run( | |
| 210 | - | arg0, | |
| 211 | - | ) | |
| 172 | + | run(args[0].(layout.Widget)) | |
| 212 | 173 | }) | |
| 213 | 174 | return _c | |
| 214 | 175 | } | |
| @@ -218,25 +179,26 @@ func (_c *MockOverlayWidget_ComputePoint_Call) Return(x float64, y float64, ok b | |||
| 218 | 179 | return _c | |
| 219 | 180 | } | |
| 220 | 181 | ||
| 221 | - | func (_c *MockOverlayWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockOverlayWidget_ComputePoint_Call { | |
| 182 | + | func (_c *MockOverlayWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockOverlayWidget_ComputePoint_Call { | |
| 222 | 183 | _c.Call.Return(run) | |
| 223 | 184 | return _c | |
| 224 | 185 | } | |
| 225 | 186 | ||
| 226 | - | // GetAllocatedHeight provides a mock function for the type MockOverlayWidget | |
| 227 | - | func (_mock *MockOverlayWidget) GetAllocatedHeight() int { | |
| 228 | - | ret := _mock.Called() | |
| 187 | + | // GetAllocatedHeight provides a mock function with no fields | |
| 188 | + | func (_m *MockOverlayWidget) GetAllocatedHeight() int { | |
| 189 | + | ret := _m.Called() | |
| 229 | 190 | ||
| 230 | 191 | if len(ret) == 0 { | |
| 231 | 192 | panic("no return value specified for GetAllocatedHeight") | |
| 232 | 193 | } | |
| 233 | 194 | ||
| 234 | 195 | var r0 int | |
| 235 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 236 | - | r0 = returnFunc() | |
| 196 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 197 | + | r0 = rf() | |
| 237 | 198 | } else { | |
| 238 | 199 | r0 = ret.Get(0).(int) | |
| 239 | 200 | } | |
| 201 | + | ||
| 240 | 202 | return r0 | |
| 241 | 203 | } | |
| 242 | 204 | ||
| @@ -257,8 +219,8 @@ func (_c *MockOverlayWidget_GetAllocatedHeight_Call) Run(run func()) *MockOverla | |||
| 257 | 219 | return _c | |
| 258 | 220 | } | |
| 259 | 221 | ||
| 260 | - | func (_c *MockOverlayWidget_GetAllocatedHeight_Call) Return(n int) *MockOverlayWidget_GetAllocatedHeight_Call { | |
| 261 | - | _c.Call.Return(n) | |
| 222 | + | func (_c *MockOverlayWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockOverlayWidget_GetAllocatedHeight_Call { | |
| 223 | + | _c.Call.Return(_a0) | |
| 262 | 224 | return _c | |
| 263 | 225 | } | |
| 264 | 226 | ||
| @@ -267,20 +229,21 @@ func (_c *MockOverlayWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int | |||
| 267 | 229 | return _c | |
| 268 | 230 | } | |
| 269 | 231 | ||
| 270 | - | // GetAllocatedWidth provides a mock function for the type MockOverlayWidget | |
| 271 | - | func (_mock *MockOverlayWidget) GetAllocatedWidth() int { | |
| 272 | - | ret := _mock.Called() | |
| 232 | + | // GetAllocatedWidth provides a mock function with no fields | |
| 233 | + | func (_m *MockOverlayWidget) GetAllocatedWidth() int { | |
| 234 | + | ret := _m.Called() | |
| 273 | 235 | ||
| 274 | 236 | if len(ret) == 0 { | |
| 275 | 237 | panic("no return value specified for GetAllocatedWidth") | |
| 276 | 238 | } | |
| 277 | 239 | ||
| 278 | 240 | var r0 int | |
| 279 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 280 | - | r0 = returnFunc() | |
| 241 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 242 | + | r0 = rf() | |
| 281 | 243 | } else { | |
| 282 | 244 | r0 = ret.Get(0).(int) | |
| 283 | 245 | } | |
| 246 | + | ||
| 284 | 247 | return r0 | |
| 285 | 248 | } | |
| 286 | 249 | ||
| @@ -301,8 +264,8 @@ func (_c *MockOverlayWidget_GetAllocatedWidth_Call) Run(run func()) *MockOverlay | |||
| 301 | 264 | return _c | |
| 302 | 265 | } | |
| 303 | 266 | ||
| 304 | - | func (_c *MockOverlayWidget_GetAllocatedWidth_Call) Return(n int) *MockOverlayWidget_GetAllocatedWidth_Call { | |
| 305 | - | _c.Call.Return(n) | |
| 267 | + | func (_c *MockOverlayWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockOverlayWidget_GetAllocatedWidth_Call { | |
| 268 | + | _c.Call.Return(_a0) | |
| 306 | 269 | return _c | |
| 307 | 270 | } | |
| 308 | 271 | ||
| @@ -311,22 +274,23 @@ func (_c *MockOverlayWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) | |||
| 311 | 274 | return _c | |
| 312 | 275 | } | |
| 313 | 276 | ||
| 314 | - | // GetChild provides a mock function for the type MockOverlayWidget | |
| 315 | - | func (_mock *MockOverlayWidget) GetChild() layout.Widget { | |
| 316 | - | ret := _mock.Called() | |
| 277 | + | // GetChild provides a mock function with no fields | |
| 278 | + | func (_m *MockOverlayWidget) GetChild() layout.Widget { | |
| 279 | + | ret := _m.Called() | |
| 317 | 280 | ||
| 318 | 281 | if len(ret) == 0 { | |
| 319 | 282 | panic("no return value specified for GetChild") | |
| 320 | 283 | } | |
| 321 | 284 | ||
| 322 | 285 | var r0 layout.Widget | |
| 323 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 324 | - | r0 = returnFunc() | |
| 286 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 287 | + | r0 = rf() | |
| 325 | 288 | } else { | |
| 326 | 289 | if ret.Get(0) != nil { | |
| 327 | 290 | r0 = ret.Get(0).(layout.Widget) | |
| 328 | 291 | } | |
| 329 | 292 | } | |
| 293 | + | ||
| 330 | 294 | return r0 | |
| 331 | 295 | } | |
| 332 | 296 | ||
| @@ -347,8 +311,8 @@ func (_c *MockOverlayWidget_GetChild_Call) Run(run func()) *MockOverlayWidget_Ge | |||
| 347 | 311 | return _c | |
| 348 | 312 | } | |
| 349 | 313 | ||
| 350 | - | func (_c *MockOverlayWidget_GetChild_Call) Return(widget layout.Widget) *MockOverlayWidget_GetChild_Call { | |
| 351 | - | _c.Call.Return(widget) | |
| 314 | + | func (_c *MockOverlayWidget_GetChild_Call) Return(_a0 layout.Widget) *MockOverlayWidget_GetChild_Call { | |
| 315 | + | _c.Call.Return(_a0) | |
| 352 | 316 | return _c | |
| 353 | 317 | } | |
| 354 | 318 | ||
| @@ -357,20 +321,21 @@ func (_c *MockOverlayWidget_GetChild_Call) RunAndReturn(run func() layout.Widget | |||
| 357 | 321 | return _c | |
| 358 | 322 | } | |
| 359 | 323 | ||
| 360 | - | // GetClipOverlay provides a mock function for the type MockOverlayWidget | |
| 361 | - | func (_mock *MockOverlayWidget) GetClipOverlay(overlay layout.Widget) bool { | |
| 362 | - | ret := _mock.Called(overlay) | |
| 324 | + | // GetClipOverlay provides a mock function with given fields: overlay | |
| 325 | + | func (_m *MockOverlayWidget) GetClipOverlay(overlay layout.Widget) bool { | |
| 326 | + | ret := _m.Called(overlay) | |
| 363 | 327 | ||
| 364 | 328 | if len(ret) == 0 { | |
| 365 | 329 | panic("no return value specified for GetClipOverlay") | |
| 366 | 330 | } | |
| 367 | 331 | ||
| 368 | 332 | var r0 bool | |
| 369 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) bool); ok { | |
| 370 | - | r0 = returnFunc(overlay) | |
| 333 | + | if rf, ok := ret.Get(0).(func(layout.Widget) bool); ok { | |
| 334 | + | r0 = rf(overlay) | |
| 371 | 335 | } else { | |
| 372 | 336 | r0 = ret.Get(0).(bool) | |
| 373 | 337 | } | |
| 338 | + | ||
| 374 | 339 | return r0 | |
| 375 | 340 | } | |
| 376 | 341 | ||
| @@ -387,41 +352,36 @@ func (_e *MockOverlayWidget_Expecter) GetClipOverlay(overlay interface{}) *MockO | |||
| 387 | 352 | ||
| 388 | 353 | func (_c *MockOverlayWidget_GetClipOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_GetClipOverlay_Call { | |
| 389 | 354 | _c.Call.Run(func(args mock.Arguments) { | |
| 390 | - | var arg0 layout.Widget | |
| 391 | - | if args[0] != nil { | |
| 392 | - | arg0 = args[0].(layout.Widget) | |
| 393 | - | } | |
| 394 | - | run( | |
| 395 | - | arg0, | |
| 396 | - | ) | |
| 355 | + | run(args[0].(layout.Widget)) | |
| 397 | 356 | }) | |
| 398 | 357 | return _c | |
| 399 | 358 | } | |
| 400 | 359 | ||
| 401 | - | func (_c *MockOverlayWidget_GetClipOverlay_Call) Return(b bool) *MockOverlayWidget_GetClipOverlay_Call { | |
| 402 | - | _c.Call.Return(b) | |
| 360 | + | func (_c *MockOverlayWidget_GetClipOverlay_Call) Return(_a0 bool) *MockOverlayWidget_GetClipOverlay_Call { | |
| 361 | + | _c.Call.Return(_a0) | |
| 403 | 362 | return _c | |
| 404 | 363 | } | |
| 405 | 364 | ||
| 406 | - | func (_c *MockOverlayWidget_GetClipOverlay_Call) RunAndReturn(run func(overlay layout.Widget) bool) *MockOverlayWidget_GetClipOverlay_Call { | |
| 365 | + | func (_c *MockOverlayWidget_GetClipOverlay_Call) RunAndReturn(run func(layout.Widget) bool) *MockOverlayWidget_GetClipOverlay_Call { | |
| 407 | 366 | _c.Call.Return(run) | |
| 408 | 367 | return _c | |
| 409 | 368 | } | |
| 410 | 369 | ||
| 411 | - | // GetHexpand provides a mock function for the type MockOverlayWidget | |
| 412 | - | func (_mock *MockOverlayWidget) GetHexpand() bool { | |
| 413 | - | ret := _mock.Called() | |
| 370 | + | // GetHexpand provides a mock function with no fields | |
| 371 | + | func (_m *MockOverlayWidget) GetHexpand() bool { | |
| 372 | + | ret := _m.Called() | |
| 414 | 373 | ||
| 415 | 374 | if len(ret) == 0 { | |
| 416 | 375 | panic("no return value specified for GetHexpand") | |
| 417 | 376 | } | |
| 418 | 377 | ||
| 419 | 378 | var r0 bool | |
| 420 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 421 | - | r0 = returnFunc() | |
| 379 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 380 | + | r0 = rf() | |
| 422 | 381 | } else { | |
| 423 | 382 | r0 = ret.Get(0).(bool) | |
| 424 | 383 | } | |
| 384 | + | ||
| 425 | 385 | return r0 | |
| 426 | 386 | } | |
| 427 | 387 | ||
| @@ -442,8 +402,8 @@ func (_c *MockOverlayWidget_GetHexpand_Call) Run(run func()) *MockOverlayWidget_ | |||
| 442 | 402 | return _c | |
| 443 | 403 | } | |
| 444 | 404 | ||
| 445 | - | func (_c *MockOverlayWidget_GetHexpand_Call) Return(b bool) *MockOverlayWidget_GetHexpand_Call { | |
| 446 | - | _c.Call.Return(b) | |
| 405 | + | func (_c *MockOverlayWidget_GetHexpand_Call) Return(_a0 bool) *MockOverlayWidget_GetHexpand_Call { | |
| 406 | + | _c.Call.Return(_a0) | |
| 447 | 407 | return _c | |
| 448 | 408 | } | |
| 449 | 409 | ||
| @@ -452,20 +412,21 @@ func (_c *MockOverlayWidget_GetHexpand_Call) RunAndReturn(run func() bool) *Mock | |||
| 452 | 412 | return _c | |
| 453 | 413 | } | |
| 454 | 414 | ||
| 455 | - | // GetMeasureOverlay provides a mock function for the type MockOverlayWidget | |
| 456 | - | func (_mock *MockOverlayWidget) GetMeasureOverlay(overlay layout.Widget) bool { | |
| 457 | - | ret := _mock.Called(overlay) | |
| 415 | + | // GetMeasureOverlay provides a mock function with given fields: overlay | |
| 416 | + | func (_m *MockOverlayWidget) GetMeasureOverlay(overlay layout.Widget) bool { | |
| 417 | + | ret := _m.Called(overlay) | |
| 458 | 418 | ||
| 459 | 419 | if len(ret) == 0 { | |
| 460 | 420 | panic("no return value specified for GetMeasureOverlay") | |
| 461 | 421 | } | |
| 462 | 422 | ||
| 463 | 423 | var r0 bool | |
| 464 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) bool); ok { | |
| 465 | - | r0 = returnFunc(overlay) | |
| 424 | + | if rf, ok := ret.Get(0).(func(layout.Widget) bool); ok { | |
| 425 | + | r0 = rf(overlay) | |
| 466 | 426 | } else { | |
| 467 | 427 | r0 = ret.Get(0).(bool) | |
| 468 | 428 | } | |
| 429 | + | ||
| 469 | 430 | return r0 | |
| 470 | 431 | } | |
| 471 | 432 | ||
| @@ -482,43 +443,38 @@ func (_e *MockOverlayWidget_Expecter) GetMeasureOverlay(overlay interface{}) *Mo | |||
| 482 | 443 | ||
| 483 | 444 | func (_c *MockOverlayWidget_GetMeasureOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_GetMeasureOverlay_Call { | |
| 484 | 445 | _c.Call.Run(func(args mock.Arguments) { | |
| 485 | - | var arg0 layout.Widget | |
| 486 | - | if args[0] != nil { | |
| 487 | - | arg0 = args[0].(layout.Widget) | |
| 488 | - | } | |
| 489 | - | run( | |
| 490 | - | arg0, | |
| 491 | - | ) | |
| 446 | + | run(args[0].(layout.Widget)) | |
| 492 | 447 | }) | |
| 493 | 448 | return _c | |
| 494 | 449 | } | |
| 495 | 450 | ||
| 496 | - | func (_c *MockOverlayWidget_GetMeasureOverlay_Call) Return(b bool) *MockOverlayWidget_GetMeasureOverlay_Call { | |
| 497 | - | _c.Call.Return(b) | |
| 451 | + | func (_c *MockOverlayWidget_GetMeasureOverlay_Call) Return(_a0 bool) *MockOverlayWidget_GetMeasureOverlay_Call { | |
| 452 | + | _c.Call.Return(_a0) | |
| 498 | 453 | return _c | |
| 499 | 454 | } | |
| 500 | 455 | ||
| 501 | - | func (_c *MockOverlayWidget_GetMeasureOverlay_Call) RunAndReturn(run func(overlay layout.Widget) bool) *MockOverlayWidget_GetMeasureOverlay_Call { | |
| 456 | + | func (_c *MockOverlayWidget_GetMeasureOverlay_Call) RunAndReturn(run func(layout.Widget) bool) *MockOverlayWidget_GetMeasureOverlay_Call { | |
| 502 | 457 | _c.Call.Return(run) | |
| 503 | 458 | return _c | |
| 504 | 459 | } | |
| 505 | 460 | ||
| 506 | - | // GetParent provides a mock function for the type MockOverlayWidget | |
| 507 | - | func (_mock *MockOverlayWidget) GetParent() layout.Widget { | |
| 508 | - | ret := _mock.Called() | |
| 461 | + | // GetParent provides a mock function with no fields | |
| 462 | + | func (_m *MockOverlayWidget) GetParent() layout.Widget { | |
| 463 | + | ret := _m.Called() | |
| 509 | 464 | ||
| 510 | 465 | if len(ret) == 0 { | |
| 511 | 466 | panic("no return value specified for GetParent") | |
| 512 | 467 | } | |
| 513 | 468 | ||
| 514 | 469 | var r0 layout.Widget | |
| 515 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 516 | - | r0 = returnFunc() | |
| 470 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 471 | + | r0 = rf() | |
| 517 | 472 | } else { | |
| 518 | 473 | if ret.Get(0) != nil { | |
| 519 | 474 | r0 = ret.Get(0).(layout.Widget) | |
| 520 | 475 | } | |
| 521 | 476 | } | |
| 477 | + | ||
| 522 | 478 | return r0 | |
| 523 | 479 | } | |
| 524 | 480 | ||
| @@ -539,8 +495,8 @@ func (_c *MockOverlayWidget_GetParent_Call) Run(run func()) *MockOverlayWidget_G | |||
| 539 | 495 | return _c | |
| 540 | 496 | } | |
| 541 | 497 | ||
| 542 | - | func (_c *MockOverlayWidget_GetParent_Call) Return(widget layout.Widget) *MockOverlayWidget_GetParent_Call { | |
| 543 | - | _c.Call.Return(widget) | |
| 498 | + | func (_c *MockOverlayWidget_GetParent_Call) Return(_a0 layout.Widget) *MockOverlayWidget_GetParent_Call { | |
| 499 | + | _c.Call.Return(_a0) | |
| 544 | 500 | return _c | |
| 545 | 501 | } | |
| 546 | 502 | ||
| @@ -549,20 +505,21 @@ func (_c *MockOverlayWidget_GetParent_Call) RunAndReturn(run func() layout.Widge | |||
| 549 | 505 | return _c | |
| 550 | 506 | } | |
| 551 | 507 | ||
| 552 | - | // GetVexpand provides a mock function for the type MockOverlayWidget | |
| 553 | - | func (_mock *MockOverlayWidget) GetVexpand() bool { | |
| 554 | - | ret := _mock.Called() | |
| 508 | + | // GetVexpand provides a mock function with no fields | |
| 509 | + | func (_m *MockOverlayWidget) GetVexpand() bool { | |
| 510 | + | ret := _m.Called() | |
| 555 | 511 | ||
| 556 | 512 | if len(ret) == 0 { | |
| 557 | 513 | panic("no return value specified for GetVexpand") | |
| 558 | 514 | } | |
| 559 | 515 | ||
| 560 | 516 | var r0 bool | |
| 561 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 562 | - | r0 = returnFunc() | |
| 517 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 518 | + | r0 = rf() | |
| 563 | 519 | } else { | |
| 564 | 520 | r0 = ret.Get(0).(bool) | |
| 565 | 521 | } | |
| 522 | + | ||
| 566 | 523 | return r0 | |
| 567 | 524 | } | |
| 568 | 525 | ||
| @@ -583,8 +540,8 @@ func (_c *MockOverlayWidget_GetVexpand_Call) Run(run func()) *MockOverlayWidget_ | |||
| 583 | 540 | return _c | |
| 584 | 541 | } | |
| 585 | 542 | ||
| 586 | - | func (_c *MockOverlayWidget_GetVexpand_Call) Return(b bool) *MockOverlayWidget_GetVexpand_Call { | |
| 587 | - | _c.Call.Return(b) | |
| 543 | + | func (_c *MockOverlayWidget_GetVexpand_Call) Return(_a0 bool) *MockOverlayWidget_GetVexpand_Call { | |
| 544 | + | _c.Call.Return(_a0) | |
| 588 | 545 | return _c | |
| 589 | 546 | } | |
| 590 | 547 | ||
| @@ -593,20 +550,21 @@ func (_c *MockOverlayWidget_GetVexpand_Call) RunAndReturn(run func() bool) *Mock | |||
| 593 | 550 | return _c | |
| 594 | 551 | } | |
| 595 | 552 | ||
| 596 | - | // GrabFocus provides a mock function for the type MockOverlayWidget | |
| 597 | - | func (_mock *MockOverlayWidget) GrabFocus() bool { | |
| 598 | - | ret := _mock.Called() | |
| 553 | + | // GrabFocus provides a mock function with no fields | |
| 554 | + | func (_m *MockOverlayWidget) GrabFocus() bool { | |
| 555 | + | ret := _m.Called() | |
| 599 | 556 | ||
| 600 | 557 | if len(ret) == 0 { | |
| 601 | 558 | panic("no return value specified for GrabFocus") | |
| 602 | 559 | } | |
| 603 | 560 | ||
| 604 | 561 | var r0 bool | |
| 605 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 606 | - | r0 = returnFunc() | |
| 562 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 563 | + | r0 = rf() | |
| 607 | 564 | } else { | |
| 608 | 565 | r0 = ret.Get(0).(bool) | |
| 609 | 566 | } | |
| 567 | + | ||
| 610 | 568 | return r0 | |
| 611 | 569 | } | |
| 612 | 570 | ||
| @@ -627,8 +585,8 @@ func (_c *MockOverlayWidget_GrabFocus_Call) Run(run func()) *MockOverlayWidget_G | |||
| 627 | 585 | return _c | |
| 628 | 586 | } | |
| 629 | 587 | ||
| 630 | - | func (_c *MockOverlayWidget_GrabFocus_Call) Return(b bool) *MockOverlayWidget_GrabFocus_Call { | |
| 631 | - | _c.Call.Return(b) | |
| 588 | + | func (_c *MockOverlayWidget_GrabFocus_Call) Return(_a0 bool) *MockOverlayWidget_GrabFocus_Call { | |
| 589 | + | _c.Call.Return(_a0) | |
| 632 | 590 | return _c | |
| 633 | 591 | } | |
| 634 | 592 | ||
| @@ -637,22 +595,23 @@ func (_c *MockOverlayWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockO | |||
| 637 | 595 | return _c | |
| 638 | 596 | } | |
| 639 | 597 | ||
| 640 | - | // GtkWidget provides a mock function for the type MockOverlayWidget | |
| 641 | - | func (_mock *MockOverlayWidget) GtkWidget() *gtk.Widget { | |
| 642 | - | ret := _mock.Called() | |
| 598 | + | // GtkWidget provides a mock function with no fields | |
| 599 | + | func (_m *MockOverlayWidget) GtkWidget() *gtk.Widget { | |
| 600 | + | ret := _m.Called() | |
| 643 | 601 | ||
| 644 | 602 | if len(ret) == 0 { | |
| 645 | 603 | panic("no return value specified for GtkWidget") | |
| 646 | 604 | } | |
| 647 | 605 | ||
| 648 | 606 | var r0 *gtk.Widget | |
| 649 | - | if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 650 | - | r0 = returnFunc() | |
| 607 | + | if rf, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 608 | + | r0 = rf() | |
| 651 | 609 | } else { | |
| 652 | 610 | if ret.Get(0) != nil { | |
| 653 | 611 | r0 = ret.Get(0).(*gtk.Widget) | |
| 654 | 612 | } | |
| 655 | 613 | } | |
| 614 | + | ||
| 656 | 615 | return r0 | |
| 657 | 616 | } | |
| 658 | 617 | ||
| @@ -673,8 +632,8 @@ func (_c *MockOverlayWidget_GtkWidget_Call) Run(run func()) *MockOverlayWidget_G | |||
| 673 | 632 | return _c | |
| 674 | 633 | } | |
| 675 | 634 | ||
| 676 | - | func (_c *MockOverlayWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockOverlayWidget_GtkWidget_Call { | |
| 677 | - | _c.Call.Return(widget) | |
| 635 | + | func (_c *MockOverlayWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockOverlayWidget_GtkWidget_Call { | |
| 636 | + | _c.Call.Return(_a0) | |
| 678 | 637 | return _c | |
| 679 | 638 | } | |
| 680 | 639 | ||
| @@ -683,20 +642,21 @@ func (_c *MockOverlayWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) | |||
| 683 | 642 | return _c | |
| 684 | 643 | } | |
| 685 | 644 | ||
| 686 | - | // HasCssClass provides a mock function for the type MockOverlayWidget | |
| 687 | - | func (_mock *MockOverlayWidget) HasCssClass(cssClass string) bool { | |
| 688 | - | ret := _mock.Called(cssClass) | |
| 645 | + | // HasCssClass provides a mock function with given fields: cssClass | |
| 646 | + | func (_m *MockOverlayWidget) HasCssClass(cssClass string) bool { | |
| 647 | + | ret := _m.Called(cssClass) | |
| 689 | 648 | ||
| 690 | 649 | if len(ret) == 0 { | |
| 691 | 650 | panic("no return value specified for HasCssClass") | |
| 692 | 651 | } | |
| 693 | 652 | ||
| 694 | 653 | var r0 bool | |
| 695 | - | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |
| 696 | - | r0 = returnFunc(cssClass) | |
| 654 | + | if rf, ok := ret.Get(0).(func(string) bool); ok { | |
| 655 | + | r0 = rf(cssClass) | |
| 697 | 656 | } else { | |
| 698 | 657 | r0 = ret.Get(0).(bool) | |
| 699 | 658 | } | |
| 659 | + | ||
| 700 | 660 | return r0 | |
| 701 | 661 | } | |
| 702 | 662 | ||
| @@ -713,41 +673,36 @@ func (_e *MockOverlayWidget_Expecter) HasCssClass(cssClass interface{}) *MockOve | |||
| 713 | 673 | ||
| 714 | 674 | func (_c *MockOverlayWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockOverlayWidget_HasCssClass_Call { | |
| 715 | 675 | _c.Call.Run(func(args mock.Arguments) { | |
| 716 | - | var arg0 string | |
| 717 | - | if args[0] != nil { | |
| 718 | - | arg0 = args[0].(string) | |
| 719 | - | } | |
| 720 | - | run( | |
| 721 | - | arg0, | |
| 722 | - | ) | |
| 676 | + | run(args[0].(string)) | |
| 723 | 677 | }) | |
| 724 | 678 | return _c | |
| 725 | 679 | } | |
| 726 | 680 | ||
| 727 | - | func (_c *MockOverlayWidget_HasCssClass_Call) Return(b bool) *MockOverlayWidget_HasCssClass_Call { | |
| 728 | - | _c.Call.Return(b) | |
| 681 | + | func (_c *MockOverlayWidget_HasCssClass_Call) Return(_a0 bool) *MockOverlayWidget_HasCssClass_Call { | |
| 682 | + | _c.Call.Return(_a0) | |
| 729 | 683 | return _c | |
| 730 | 684 | } | |
| 731 | 685 | ||
| 732 | - | func (_c *MockOverlayWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockOverlayWidget_HasCssClass_Call { | |
| 686 | + | func (_c *MockOverlayWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockOverlayWidget_HasCssClass_Call { | |
| 733 | 687 | _c.Call.Return(run) | |
| 734 | 688 | return _c | |
| 735 | 689 | } | |
| 736 | 690 | ||
| 737 | - | // HasFocus provides a mock function for the type MockOverlayWidget | |
| 738 | - | func (_mock *MockOverlayWidget) HasFocus() bool { | |
| 739 | - | ret := _mock.Called() | |
| 691 | + | // HasFocus provides a mock function with no fields | |
| 692 | + | func (_m *MockOverlayWidget) HasFocus() bool { | |
| 693 | + | ret := _m.Called() | |
| 740 | 694 | ||
| 741 | 695 | if len(ret) == 0 { | |
| 742 | 696 | panic("no return value specified for HasFocus") | |
| 743 | 697 | } | |
| 744 | 698 | ||
| 745 | 699 | var r0 bool | |
| 746 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 747 | - | r0 = returnFunc() | |
| 700 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 701 | + | r0 = rf() | |
| 748 | 702 | } else { | |
| 749 | 703 | r0 = ret.Get(0).(bool) | |
| 750 | 704 | } | |
| 705 | + | ||
| 751 | 706 | return r0 | |
| 752 | 707 | } | |
| 753 | 708 | ||
| @@ -768,8 +723,8 @@ func (_c *MockOverlayWidget_HasFocus_Call) Run(run func()) *MockOverlayWidget_Ha | |||
| 768 | 723 | return _c | |
| 769 | 724 | } | |
| 770 | 725 | ||
| 771 | - | func (_c *MockOverlayWidget_HasFocus_Call) Return(b bool) *MockOverlayWidget_HasFocus_Call { | |
| 772 | - | _c.Call.Return(b) | |
| 726 | + | func (_c *MockOverlayWidget_HasFocus_Call) Return(_a0 bool) *MockOverlayWidget_HasFocus_Call { | |
| 727 | + | _c.Call.Return(_a0) | |
| 773 | 728 | return _c | |
| 774 | 729 | } | |
| 775 | 730 | ||
| @@ -778,10 +733,9 @@ func (_c *MockOverlayWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockOv | |||
| 778 | 733 | return _c | |
| 779 | 734 | } | |
| 780 | 735 | ||
| 781 | - | // Hide provides a mock function for the type MockOverlayWidget | |
| 782 | - | func (_mock *MockOverlayWidget) Hide() { | |
| 783 | - | _mock.Called() | |
| 784 | - | return | |
| 736 | + | // Hide provides a mock function with no fields | |
| 737 | + | func (_m *MockOverlayWidget) Hide() { | |
| 738 | + | _m.Called() | |
| 785 | 739 | } | |
| 786 | 740 | ||
| 787 | 741 | // MockOverlayWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |
| @@ -811,20 +765,21 @@ func (_c *MockOverlayWidget_Hide_Call) RunAndReturn(run func()) *MockOverlayWidg | |||
| 811 | 765 | return _c | |
| 812 | 766 | } | |
| 813 | 767 | ||
| 814 | - | // IsVisible provides a mock function for the type MockOverlayWidget | |
| 815 | - | func (_mock *MockOverlayWidget) IsVisible() bool { | |
| 816 | - | ret := _mock.Called() | |
| 768 | + | // IsVisible provides a mock function with no fields | |
| 769 | + | func (_m *MockOverlayWidget) IsVisible() bool { | |
| 770 | + | ret := _m.Called() | |
| 817 | 771 | ||
| 818 | 772 | if len(ret) == 0 { | |
| 819 | 773 | panic("no return value specified for IsVisible") | |
| 820 | 774 | } | |
| 821 | 775 | ||
| 822 | 776 | var r0 bool | |
| 823 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 824 | - | r0 = returnFunc() | |
| 777 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 778 | + | r0 = rf() | |
| 825 | 779 | } else { | |
| 826 | 780 | r0 = ret.Get(0).(bool) | |
| 827 | 781 | } | |
| 782 | + | ||
| 828 | 783 | return r0 | |
| 829 | 784 | } | |
| 830 | 785 | ||
| @@ -845,8 +800,8 @@ func (_c *MockOverlayWidget_IsVisible_Call) Run(run func()) *MockOverlayWidget_I | |||
| 845 | 800 | return _c | |
| 846 | 801 | } | |
| 847 | 802 | ||
| 848 | - | func (_c *MockOverlayWidget_IsVisible_Call) Return(b bool) *MockOverlayWidget_IsVisible_Call { | |
| 849 | - | _c.Call.Return(b) | |
| 803 | + | func (_c *MockOverlayWidget_IsVisible_Call) Return(_a0 bool) *MockOverlayWidget_IsVisible_Call { | |
| 804 | + | _c.Call.Return(_a0) | |
| 850 | 805 | return _c | |
| 851 | 806 | } | |
| 852 | 807 | ||
| @@ -855,10 +810,9 @@ func (_c *MockOverlayWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockO | |||
| 855 | 810 | return _c | |
| 856 | 811 | } | |
| 857 | 812 | ||
| 858 | - | // RemoveCssClass provides a mock function for the type MockOverlayWidget | |
| 859 | - | func (_mock *MockOverlayWidget) RemoveCssClass(cssClass string) { | |
| 860 | - | _mock.Called(cssClass) | |
| 861 | - | return | |
| 813 | + | // RemoveCssClass provides a mock function with given fields: cssClass | |
| 814 | + | func (_m *MockOverlayWidget) RemoveCssClass(cssClass string) { | |
| 815 | + | _m.Called(cssClass) | |
| 862 | 816 | } | |
| 863 | 817 | ||
| 864 | 818 | // MockOverlayWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass' | |
| @@ -874,13 +828,7 @@ func (_e *MockOverlayWidget_Expecter) RemoveCssClass(cssClass interface{}) *Mock | |||
| 874 | 828 | ||
| 875 | 829 | func (_c *MockOverlayWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockOverlayWidget_RemoveCssClass_Call { | |
| 876 | 830 | _c.Call.Run(func(args mock.Arguments) { | |
| 877 | - | var arg0 string | |
| 878 | - | if args[0] != nil { | |
| 879 | - | arg0 = args[0].(string) | |
| 880 | - | } | |
| 881 | - | run( | |
| 882 | - | arg0, | |
| 883 | - | ) | |
| 831 | + | run(args[0].(string)) | |
| 884 | 832 | }) | |
| 885 | 833 | return _c | |
| 886 | 834 | } | |
| @@ -890,15 +838,14 @@ func (_c *MockOverlayWidget_RemoveCssClass_Call) Return() *MockOverlayWidget_Rem | |||
| 890 | 838 | return _c | |
| 891 | 839 | } | |
| 892 | 840 | ||
| 893 | - | func (_c *MockOverlayWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockOverlayWidget_RemoveCssClass_Call { | |
| 841 | + | func (_c *MockOverlayWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockOverlayWidget_RemoveCssClass_Call { | |
| 894 | 842 | _c.Run(run) | |
| 895 | 843 | return _c | |
| 896 | 844 | } | |
| 897 | 845 | ||
| 898 | - | // RemoveOverlay provides a mock function for the type MockOverlayWidget | |
| 899 | - | func (_mock *MockOverlayWidget) RemoveOverlay(overlay layout.Widget) { | |
| 900 | - | _mock.Called(overlay) | |
| 901 | - | return | |
| 846 | + | // RemoveOverlay provides a mock function with given fields: overlay | |
| 847 | + | func (_m *MockOverlayWidget) RemoveOverlay(overlay layout.Widget) { | |
| 848 | + | _m.Called(overlay) | |
| 902 | 849 | } | |
| 903 | 850 | ||
| 904 | 851 | // MockOverlayWidget_RemoveOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveOverlay' | |
| @@ -914,13 +861,7 @@ func (_e *MockOverlayWidget_Expecter) RemoveOverlay(overlay interface{}) *MockOv | |||
| 914 | 861 | ||
| 915 | 862 | func (_c *MockOverlayWidget_RemoveOverlay_Call) Run(run func(overlay layout.Widget)) *MockOverlayWidget_RemoveOverlay_Call { | |
| 916 | 863 | _c.Call.Run(func(args mock.Arguments) { | |
| 917 | - | var arg0 layout.Widget | |
| 918 | - | if args[0] != nil { | |
| 919 | - | arg0 = args[0].(layout.Widget) | |
| 920 | - | } | |
| 921 | - | run( | |
| 922 | - | arg0, | |
| 923 | - | ) | |
| 864 | + | run(args[0].(layout.Widget)) | |
| 924 | 865 | }) | |
| 925 | 866 | return _c | |
| 926 | 867 | } | |
| @@ -930,15 +871,14 @@ func (_c *MockOverlayWidget_RemoveOverlay_Call) Return() *MockOverlayWidget_Remo | |||
| 930 | 871 | return _c | |
| 931 | 872 | } | |
| 932 | 873 | ||
| 933 | - | func (_c *MockOverlayWidget_RemoveOverlay_Call) RunAndReturn(run func(overlay layout.Widget)) *MockOverlayWidget_RemoveOverlay_Call { | |
| 874 | + | func (_c *MockOverlayWidget_RemoveOverlay_Call) RunAndReturn(run func(layout.Widget)) *MockOverlayWidget_RemoveOverlay_Call { | |
| 934 | 875 | _c.Run(run) | |
| 935 | 876 | return _c | |
| 936 | 877 | } | |
| 937 | 878 | ||
| 938 | - | // SetCanFocus provides a mock function for the type MockOverlayWidget | |
| 939 | - | func (_mock *MockOverlayWidget) SetCanFocus(canFocus bool) { | |
| 940 | - | _mock.Called(canFocus) | |
| 941 | - | return | |
| 879 | + | // SetCanFocus provides a mock function with given fields: canFocus | |
| 880 | + | func (_m *MockOverlayWidget) SetCanFocus(canFocus bool) { | |
| 881 | + | _m.Called(canFocus) | |
| 942 | 882 | } | |
| 943 | 883 | ||
| 944 | 884 | // MockOverlayWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus' | |
| @@ -954,13 +894,7 @@ func (_e *MockOverlayWidget_Expecter) SetCanFocus(canFocus interface{}) *MockOve | |||
| 954 | 894 | ||
| 955 | 895 | func (_c *MockOverlayWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockOverlayWidget_SetCanFocus_Call { | |
| 956 | 896 | _c.Call.Run(func(args mock.Arguments) { | |
| 957 | - | var arg0 bool | |
| 958 | - | if args[0] != nil { | |
| 959 | - | arg0 = args[0].(bool) | |
| 960 | - | } | |
| 961 | - | run( | |
| 962 | - | arg0, | |
| 963 | - | ) | |
| 897 | + | run(args[0].(bool)) | |
| 964 | 898 | }) | |
| 965 | 899 | return _c | |
| 966 | 900 | } | |
| @@ -970,15 +904,14 @@ func (_c *MockOverlayWidget_SetCanFocus_Call) Return() *MockOverlayWidget_SetCan | |||
| 970 | 904 | return _c | |
| 971 | 905 | } | |
| 972 | 906 | ||
| 973 | - | func (_c *MockOverlayWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockOverlayWidget_SetCanFocus_Call { | |
| 907 | + | func (_c *MockOverlayWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetCanFocus_Call { | |
| 974 | 908 | _c.Run(run) | |
| 975 | 909 | return _c | |
| 976 | 910 | } | |
| 977 | 911 | ||
| 978 | - | // SetCanTarget provides a mock function for the type MockOverlayWidget | |
| 979 | - | func (_mock *MockOverlayWidget) SetCanTarget(canTarget bool) { | |
| 980 | - | _mock.Called(canTarget) | |
| 981 | - | return | |
| 912 | + | // SetCanTarget provides a mock function with given fields: canTarget | |
| 913 | + | func (_m *MockOverlayWidget) SetCanTarget(canTarget bool) { | |
| 914 | + | _m.Called(canTarget) | |
| 982 | 915 | } | |
| 983 | 916 | ||
| 984 | 917 | // MockOverlayWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget' | |
| @@ -994,13 +927,7 @@ func (_e *MockOverlayWidget_Expecter) SetCanTarget(canTarget interface{}) *MockO | |||
| 994 | 927 | ||
| 995 | 928 | func (_c *MockOverlayWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockOverlayWidget_SetCanTarget_Call { | |
| 996 | 929 | _c.Call.Run(func(args mock.Arguments) { | |
| 997 | - | var arg0 bool | |
| 998 | - | if args[0] != nil { | |
| 999 | - | arg0 = args[0].(bool) | |
| 1000 | - | } | |
| 1001 | - | run( | |
| 1002 | - | arg0, | |
| 1003 | - | ) | |
| 930 | + | run(args[0].(bool)) | |
| 1004 | 931 | }) | |
| 1005 | 932 | return _c | |
| 1006 | 933 | } | |
| @@ -1010,15 +937,14 @@ func (_c *MockOverlayWidget_SetCanTarget_Call) Return() *MockOverlayWidget_SetCa | |||
| 1010 | 937 | return _c | |
| 1011 | 938 | } | |
| 1012 | 939 | ||
| 1013 | - | func (_c *MockOverlayWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockOverlayWidget_SetCanTarget_Call { | |
| 940 | + | func (_c *MockOverlayWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetCanTarget_Call { | |
| 1014 | 941 | _c.Run(run) | |
| 1015 | 942 | return _c | |
| 1016 | 943 | } | |
| 1017 | 944 | ||
| 1018 | - | // SetChild provides a mock function for the type MockOverlayWidget | |
| 1019 | - | func (_mock *MockOverlayWidget) SetChild(child layout.Widget) { | |
| 1020 | - | _mock.Called(child) | |
| 1021 | - | return | |
| 945 | + | // SetChild provides a mock function with given fields: child | |
| 946 | + | func (_m *MockOverlayWidget) SetChild(child layout.Widget) { | |
| 947 | + | _m.Called(child) | |
| 1022 | 948 | } | |
| 1023 | 949 | ||
| 1024 | 950 | // MockOverlayWidget_SetChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetChild' | |
| @@ -1034,13 +960,7 @@ func (_e *MockOverlayWidget_Expecter) SetChild(child interface{}) *MockOverlayWi | |||
| 1034 | 960 | ||
| 1035 | 961 | func (_c *MockOverlayWidget_SetChild_Call) Run(run func(child layout.Widget)) *MockOverlayWidget_SetChild_Call { | |
| 1036 | 962 | _c.Call.Run(func(args mock.Arguments) { | |
| 1037 | - | var arg0 layout.Widget | |
| 1038 | - | if args[0] != nil { | |
| 1039 | - | arg0 = args[0].(layout.Widget) | |
| 1040 | - | } | |
| 1041 | - | run( | |
| 1042 | - | arg0, | |
| 1043 | - | ) | |
| 963 | + | run(args[0].(layout.Widget)) | |
| 1044 | 964 | }) | |
| 1045 | 965 | return _c | |
| 1046 | 966 | } | |
| @@ -1050,15 +970,14 @@ func (_c *MockOverlayWidget_SetChild_Call) Return() *MockOverlayWidget_SetChild_ | |||
| 1050 | 970 | return _c | |
| 1051 | 971 | } | |
| 1052 | 972 | ||
| 1053 | - | func (_c *MockOverlayWidget_SetChild_Call) RunAndReturn(run func(child layout.Widget)) *MockOverlayWidget_SetChild_Call { | |
| 973 | + | func (_c *MockOverlayWidget_SetChild_Call) RunAndReturn(run func(layout.Widget)) *MockOverlayWidget_SetChild_Call { | |
| 1054 | 974 | _c.Run(run) | |
| 1055 | 975 | return _c | |
| 1056 | 976 | } | |
| 1057 | 977 | ||
| 1058 | - | // SetClipOverlay provides a mock function for the type MockOverlayWidget | |
| 1059 | - | func (_mock *MockOverlayWidget) SetClipOverlay(overlay layout.Widget, clip bool) { | |
| 1060 | - | _mock.Called(overlay, clip) | |
| 1061 | - | return | |
| 978 | + | // SetClipOverlay provides a mock function with given fields: overlay, clip | |
| 979 | + | func (_m *MockOverlayWidget) SetClipOverlay(overlay layout.Widget, clip bool) { | |
| 980 | + | _m.Called(overlay, clip) | |
| 1062 | 981 | } | |
| 1063 | 982 | ||
| 1064 | 983 | // MockOverlayWidget_SetClipOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetClipOverlay' | |
| @@ -1075,18 +994,7 @@ func (_e *MockOverlayWidget_Expecter) SetClipOverlay(overlay interface{}, clip i | |||
| 1075 | 994 | ||
| 1076 | 995 | func (_c *MockOverlayWidget_SetClipOverlay_Call) Run(run func(overlay layout.Widget, clip bool)) *MockOverlayWidget_SetClipOverlay_Call { | |
| 1077 | 996 | _c.Call.Run(func(args mock.Arguments) { | |
| 1078 | - | var arg0 layout.Widget | |
| 1079 | - | if args[0] != nil { | |
| 1080 | - | arg0 = args[0].(layout.Widget) | |
| 1081 | - | } | |
| 1082 | - | var arg1 bool | |
| 1083 | - | if args[1] != nil { | |
| 1084 | - | arg1 = args[1].(bool) | |
| 1085 | - | } | |
| 1086 | - | run( | |
| 1087 | - | arg0, | |
| 1088 | - | arg1, | |
| 1089 | - | ) | |
| 997 | + | run(args[0].(layout.Widget), args[1].(bool)) | |
| 1090 | 998 | }) | |
| 1091 | 999 | return _c | |
| 1092 | 1000 | } | |
| @@ -1096,15 +1004,14 @@ func (_c *MockOverlayWidget_SetClipOverlay_Call) Return() *MockOverlayWidget_Set | |||
| 1096 | 1004 | return _c | |
| 1097 | 1005 | } | |
| 1098 | 1006 | ||
| 1099 | - | func (_c *MockOverlayWidget_SetClipOverlay_Call) RunAndReturn(run func(overlay layout.Widget, clip bool)) *MockOverlayWidget_SetClipOverlay_Call { | |
| 1007 | + | func (_c *MockOverlayWidget_SetClipOverlay_Call) RunAndReturn(run func(layout.Widget, bool)) *MockOverlayWidget_SetClipOverlay_Call { | |
| 1100 | 1008 | _c.Run(run) | |
| 1101 | 1009 | return _c | |
| 1102 | 1010 | } | |
| 1103 | 1011 | ||
| 1104 | - | // SetFocusOnClick provides a mock function for the type MockOverlayWidget | |
| 1105 | - | func (_mock *MockOverlayWidget) SetFocusOnClick(focusOnClick bool) { | |
| 1106 | - | _mock.Called(focusOnClick) | |
| 1107 | - | return | |
| 1012 | + | // SetFocusOnClick provides a mock function with given fields: focusOnClick | |
| 1013 | + | func (_m *MockOverlayWidget) SetFocusOnClick(focusOnClick bool) { | |
| 1014 | + | _m.Called(focusOnClick) | |
| 1108 | 1015 | } | |
| 1109 | 1016 | ||
| 1110 | 1017 | // MockOverlayWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick' | |
| @@ -1120,13 +1027,7 @@ func (_e *MockOverlayWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) | |||
| 1120 | 1027 | ||
| 1121 | 1028 | func (_c *MockOverlayWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockOverlayWidget_SetFocusOnClick_Call { | |
| 1122 | 1029 | _c.Call.Run(func(args mock.Arguments) { | |
| 1123 | - | var arg0 bool | |
| 1124 | - | if args[0] != nil { | |
| 1125 | - | arg0 = args[0].(bool) | |
| 1126 | - | } | |
| 1127 | - | run( | |
| 1128 | - | arg0, | |
| 1129 | - | ) | |
| 1030 | + | run(args[0].(bool)) | |
| 1130 | 1031 | }) | |
| 1131 | 1032 | return _c | |
| 1132 | 1033 | } | |
| @@ -1136,15 +1037,14 @@ func (_c *MockOverlayWidget_SetFocusOnClick_Call) Return() *MockOverlayWidget_Se | |||
| 1136 | 1037 | return _c | |
| 1137 | 1038 | } | |
| 1138 | 1039 | ||
| 1139 | - | func (_c *MockOverlayWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockOverlayWidget_SetFocusOnClick_Call { | |
| 1040 | + | func (_c *MockOverlayWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetFocusOnClick_Call { | |
| 1140 | 1041 | _c.Run(run) | |
| 1141 | 1042 | return _c | |
| 1142 | 1043 | } | |
| 1143 | 1044 | ||
| 1144 | - | // SetHalign provides a mock function for the type MockOverlayWidget | |
| 1145 | - | func (_mock *MockOverlayWidget) SetHalign(align gtk.Align) { | |
| 1146 | - | _mock.Called(align) | |
| 1147 | - | return | |
| 1045 | + | // SetHalign provides a mock function with given fields: align | |
| 1046 | + | func (_m *MockOverlayWidget) SetHalign(align gtk.Align) { | |
| 1047 | + | _m.Called(align) | |
| 1148 | 1048 | } | |
| 1149 | 1049 | ||
| 1150 | 1050 | // MockOverlayWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign' | |
| @@ -1160,13 +1060,7 @@ func (_e *MockOverlayWidget_Expecter) SetHalign(align interface{}) *MockOverlayW | |||
| 1160 | 1060 | ||
| 1161 | 1061 | func (_c *MockOverlayWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockOverlayWidget_SetHalign_Call { | |
| 1162 | 1062 | _c.Call.Run(func(args mock.Arguments) { | |
| 1163 | - | var arg0 gtk.Align | |
| 1164 | - | if args[0] != nil { | |
| 1165 | - | arg0 = args[0].(gtk.Align) | |
| 1166 | - | } | |
| 1167 | - | run( | |
| 1168 | - | arg0, | |
| 1169 | - | ) | |
| 1063 | + | run(args[0].(gtk.Align)) | |
| 1170 | 1064 | }) | |
| 1171 | 1065 | return _c | |
| 1172 | 1066 | } | |
| @@ -1176,15 +1070,14 @@ func (_c *MockOverlayWidget_SetHalign_Call) Return() *MockOverlayWidget_SetHalig | |||
| 1176 | 1070 | return _c | |
| 1177 | 1071 | } | |
| 1178 | 1072 | ||
| 1179 | - | func (_c *MockOverlayWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockOverlayWidget_SetHalign_Call { | |
| 1073 | + | func (_c *MockOverlayWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockOverlayWidget_SetHalign_Call { | |
| 1180 | 1074 | _c.Run(run) | |
| 1181 | 1075 | return _c | |
| 1182 | 1076 | } | |
| 1183 | 1077 | ||
| 1184 | - | // SetHexpand provides a mock function for the type MockOverlayWidget | |
| 1185 | - | func (_mock *MockOverlayWidget) SetHexpand(expand bool) { | |
| 1186 | - | _mock.Called(expand) | |
| 1187 | - | return | |
| 1078 | + | // SetHexpand provides a mock function with given fields: expand | |
| 1079 | + | func (_m *MockOverlayWidget) SetHexpand(expand bool) { | |
| 1080 | + | _m.Called(expand) | |
| 1188 | 1081 | } | |
| 1189 | 1082 | ||
| 1190 | 1083 | // MockOverlayWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand' | |
| @@ -1200,13 +1093,7 @@ func (_e *MockOverlayWidget_Expecter) SetHexpand(expand interface{}) *MockOverla | |||
| 1200 | 1093 | ||
| 1201 | 1094 | func (_c *MockOverlayWidget_SetHexpand_Call) Run(run func(expand bool)) *MockOverlayWidget_SetHexpand_Call { | |
| 1202 | 1095 | _c.Call.Run(func(args mock.Arguments) { | |
| 1203 | - | var arg0 bool | |
| 1204 | - | if args[0] != nil { | |
| 1205 | - | arg0 = args[0].(bool) | |
| 1206 | - | } | |
| 1207 | - | run( | |
| 1208 | - | arg0, | |
| 1209 | - | ) | |
| 1096 | + | run(args[0].(bool)) | |
| 1210 | 1097 | }) | |
| 1211 | 1098 | return _c | |
| 1212 | 1099 | } | |
| @@ -1216,15 +1103,14 @@ func (_c *MockOverlayWidget_SetHexpand_Call) Return() *MockOverlayWidget_SetHexp | |||
| 1216 | 1103 | return _c | |
| 1217 | 1104 | } | |
| 1218 | 1105 | ||
| 1219 | - | func (_c *MockOverlayWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockOverlayWidget_SetHexpand_Call { | |
| 1106 | + | func (_c *MockOverlayWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetHexpand_Call { | |
| 1220 | 1107 | _c.Run(run) | |
| 1221 | 1108 | return _c | |
| 1222 | 1109 | } | |
| 1223 | 1110 | ||
| 1224 | - | // SetMeasureOverlay provides a mock function for the type MockOverlayWidget | |
| 1225 | - | func (_mock *MockOverlayWidget) SetMeasureOverlay(overlay layout.Widget, measure bool) { | |
| 1226 | - | _mock.Called(overlay, measure) | |
| 1227 | - | return | |
| 1111 | + | // SetMeasureOverlay provides a mock function with given fields: overlay, measure | |
| 1112 | + | func (_m *MockOverlayWidget) SetMeasureOverlay(overlay layout.Widget, measure bool) { | |
| 1113 | + | _m.Called(overlay, measure) | |
| 1228 | 1114 | } | |
| 1229 | 1115 | ||
| 1230 | 1116 | // MockOverlayWidget_SetMeasureOverlay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMeasureOverlay' | |
| @@ -1241,18 +1127,7 @@ func (_e *MockOverlayWidget_Expecter) SetMeasureOverlay(overlay interface{}, mea | |||
| 1241 | 1127 | ||
| 1242 | 1128 | func (_c *MockOverlayWidget_SetMeasureOverlay_Call) Run(run func(overlay layout.Widget, measure bool)) *MockOverlayWidget_SetMeasureOverlay_Call { | |
| 1243 | 1129 | _c.Call.Run(func(args mock.Arguments) { | |
| 1244 | - | var arg0 layout.Widget | |
| 1245 | - | if args[0] != nil { | |
| 1246 | - | arg0 = args[0].(layout.Widget) | |
| 1247 | - | } | |
| 1248 | - | var arg1 bool | |
| 1249 | - | if args[1] != nil { | |
| 1250 | - | arg1 = args[1].(bool) | |
| 1251 | - | } | |
| 1252 | - | run( | |
| 1253 | - | arg0, | |
| 1254 | - | arg1, | |
| 1255 | - | ) | |
| 1130 | + | run(args[0].(layout.Widget), args[1].(bool)) | |
| 1256 | 1131 | }) | |
| 1257 | 1132 | return _c | |
| 1258 | 1133 | } | |
| @@ -1262,15 +1137,14 @@ func (_c *MockOverlayWidget_SetMeasureOverlay_Call) Return() *MockOverlayWidget_ | |||
| 1262 | 1137 | return _c | |
| 1263 | 1138 | } | |
| 1264 | 1139 | ||
| 1265 | - | func (_c *MockOverlayWidget_SetMeasureOverlay_Call) RunAndReturn(run func(overlay layout.Widget, measure bool)) *MockOverlayWidget_SetMeasureOverlay_Call { | |
| 1140 | + | func (_c *MockOverlayWidget_SetMeasureOverlay_Call) RunAndReturn(run func(layout.Widget, bool)) *MockOverlayWidget_SetMeasureOverlay_Call { | |
| 1266 | 1141 | _c.Run(run) | |
| 1267 | 1142 | return _c | |
| 1268 | 1143 | } | |
| 1269 | 1144 | ||
| 1270 | - | // SetSizeRequest provides a mock function for the type MockOverlayWidget | |
| 1271 | - | func (_mock *MockOverlayWidget) SetSizeRequest(width int, height int) { | |
| 1272 | - | _mock.Called(width, height) | |
| 1273 | - | return | |
| 1145 | + | // SetSizeRequest provides a mock function with given fields: width, height | |
| 1146 | + | func (_m *MockOverlayWidget) SetSizeRequest(width int, height int) { | |
| 1147 | + | _m.Called(width, height) | |
| 1274 | 1148 | } | |
| 1275 | 1149 | ||
| 1276 | 1150 | // MockOverlayWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest' | |
| @@ -1287,18 +1161,7 @@ func (_e *MockOverlayWidget_Expecter) SetSizeRequest(width interface{}, height i | |||
| 1287 | 1161 | ||
| 1288 | 1162 | func (_c *MockOverlayWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockOverlayWidget_SetSizeRequest_Call { | |
| 1289 | 1163 | _c.Call.Run(func(args mock.Arguments) { | |
| 1290 | - | var arg0 int | |
| 1291 | - | if args[0] != nil { | |
| 1292 | - | arg0 = args[0].(int) | |
| 1293 | - | } | |
| 1294 | - | var arg1 int | |
| 1295 | - | if args[1] != nil { | |
| 1296 | - | arg1 = args[1].(int) | |
| 1297 | - | } | |
| 1298 | - | run( | |
| 1299 | - | arg0, | |
| 1300 | - | arg1, | |
| 1301 | - | ) | |
| 1164 | + | run(args[0].(int), args[1].(int)) | |
| 1302 | 1165 | }) | |
| 1303 | 1166 | return _c | |
| 1304 | 1167 | } | |
| @@ -1308,15 +1171,14 @@ func (_c *MockOverlayWidget_SetSizeRequest_Call) Return() *MockOverlayWidget_Set | |||
| 1308 | 1171 | return _c | |
| 1309 | 1172 | } | |
| 1310 | 1173 | ||
| 1311 | - | func (_c *MockOverlayWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockOverlayWidget_SetSizeRequest_Call { | |
| 1174 | + | func (_c *MockOverlayWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockOverlayWidget_SetSizeRequest_Call { | |
| 1312 | 1175 | _c.Run(run) | |
| 1313 | 1176 | return _c | |
| 1314 | 1177 | } | |
| 1315 | 1178 | ||
| 1316 | - | // SetValign provides a mock function for the type MockOverlayWidget | |
| 1317 | - | func (_mock *MockOverlayWidget) SetValign(align gtk.Align) { | |
| 1318 | - | _mock.Called(align) | |
| 1319 | - | return | |
| 1179 | + | // SetValign provides a mock function with given fields: align | |
| 1180 | + | func (_m *MockOverlayWidget) SetValign(align gtk.Align) { | |
| 1181 | + | _m.Called(align) | |
| 1320 | 1182 | } | |
| 1321 | 1183 | ||
| 1322 | 1184 | // MockOverlayWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign' | |
| @@ -1332,13 +1194,7 @@ func (_e *MockOverlayWidget_Expecter) SetValign(align interface{}) *MockOverlayW | |||
| 1332 | 1194 | ||
| 1333 | 1195 | func (_c *MockOverlayWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockOverlayWidget_SetValign_Call { | |
| 1334 | 1196 | _c.Call.Run(func(args mock.Arguments) { | |
| 1335 | - | var arg0 gtk.Align | |
| 1336 | - | if args[0] != nil { | |
| 1337 | - | arg0 = args[0].(gtk.Align) | |
| 1338 | - | } | |
| 1339 | - | run( | |
| 1340 | - | arg0, | |
| 1341 | - | ) | |
| 1197 | + | run(args[0].(gtk.Align)) | |
| 1342 | 1198 | }) | |
| 1343 | 1199 | return _c | |
| 1344 | 1200 | } | |
| @@ -1348,15 +1204,14 @@ func (_c *MockOverlayWidget_SetValign_Call) Return() *MockOverlayWidget_SetValig | |||
| 1348 | 1204 | return _c | |
| 1349 | 1205 | } | |
| 1350 | 1206 | ||
| 1351 | - | func (_c *MockOverlayWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockOverlayWidget_SetValign_Call { | |
| 1207 | + | func (_c *MockOverlayWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockOverlayWidget_SetValign_Call { | |
| 1352 | 1208 | _c.Run(run) | |
| 1353 | 1209 | return _c | |
| 1354 | 1210 | } | |
| 1355 | 1211 | ||
| 1356 | - | // SetVexpand provides a mock function for the type MockOverlayWidget | |
| 1357 | - | func (_mock *MockOverlayWidget) SetVexpand(expand bool) { | |
| 1358 | - | _mock.Called(expand) | |
| 1359 | - | return | |
| 1212 | + | // SetVexpand provides a mock function with given fields: expand | |
| 1213 | + | func (_m *MockOverlayWidget) SetVexpand(expand bool) { | |
| 1214 | + | _m.Called(expand) | |
| 1360 | 1215 | } | |
| 1361 | 1216 | ||
| 1362 | 1217 | // MockOverlayWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand' | |
| @@ -1372,13 +1227,7 @@ func (_e *MockOverlayWidget_Expecter) SetVexpand(expand interface{}) *MockOverla | |||
| 1372 | 1227 | ||
| 1373 | 1228 | func (_c *MockOverlayWidget_SetVexpand_Call) Run(run func(expand bool)) *MockOverlayWidget_SetVexpand_Call { | |
| 1374 | 1229 | _c.Call.Run(func(args mock.Arguments) { | |
| 1375 | - | var arg0 bool | |
| 1376 | - | if args[0] != nil { | |
| 1377 | - | arg0 = args[0].(bool) | |
| 1378 | - | } | |
| 1379 | - | run( | |
| 1380 | - | arg0, | |
| 1381 | - | ) | |
| 1230 | + | run(args[0].(bool)) | |
| 1382 | 1231 | }) | |
| 1383 | 1232 | return _c | |
| 1384 | 1233 | } | |
| @@ -1388,15 +1237,14 @@ func (_c *MockOverlayWidget_SetVexpand_Call) Return() *MockOverlayWidget_SetVexp | |||
| 1388 | 1237 | return _c | |
| 1389 | 1238 | } | |
| 1390 | 1239 | ||
| 1391 | - | func (_c *MockOverlayWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockOverlayWidget_SetVexpand_Call { | |
| 1240 | + | func (_c *MockOverlayWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetVexpand_Call { | |
| 1392 | 1241 | _c.Run(run) | |
| 1393 | 1242 | return _c | |
| 1394 | 1243 | } | |
| 1395 | 1244 | ||
| 1396 | - | // SetVisible provides a mock function for the type MockOverlayWidget | |
| 1397 | - | func (_mock *MockOverlayWidget) SetVisible(visible bool) { | |
| 1398 | - | _mock.Called(visible) | |
| 1399 | - | return | |
| 1245 | + | // SetVisible provides a mock function with given fields: visible | |
| 1246 | + | func (_m *MockOverlayWidget) SetVisible(visible bool) { | |
| 1247 | + | _m.Called(visible) | |
| 1400 | 1248 | } | |
| 1401 | 1249 | ||
| 1402 | 1250 | // MockOverlayWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible' | |
| @@ -1412,13 +1260,7 @@ func (_e *MockOverlayWidget_Expecter) SetVisible(visible interface{}) *MockOverl | |||
| 1412 | 1260 | ||
| 1413 | 1261 | func (_c *MockOverlayWidget_SetVisible_Call) Run(run func(visible bool)) *MockOverlayWidget_SetVisible_Call { | |
| 1414 | 1262 | _c.Call.Run(func(args mock.Arguments) { | |
| 1415 | - | var arg0 bool | |
| 1416 | - | if args[0] != nil { | |
| 1417 | - | arg0 = args[0].(bool) | |
| 1418 | - | } | |
| 1419 | - | run( | |
| 1420 | - | arg0, | |
| 1421 | - | ) | |
| 1263 | + | run(args[0].(bool)) | |
| 1422 | 1264 | }) | |
| 1423 | 1265 | return _c | |
| 1424 | 1266 | } | |
| @@ -1428,15 +1270,14 @@ func (_c *MockOverlayWidget_SetVisible_Call) Return() *MockOverlayWidget_SetVisi | |||
| 1428 | 1270 | return _c | |
| 1429 | 1271 | } | |
| 1430 | 1272 | ||
| 1431 | - | func (_c *MockOverlayWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockOverlayWidget_SetVisible_Call { | |
| 1273 | + | func (_c *MockOverlayWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockOverlayWidget_SetVisible_Call { | |
| 1432 | 1274 | _c.Run(run) | |
| 1433 | 1275 | return _c | |
| 1434 | 1276 | } | |
| 1435 | 1277 | ||
| 1436 | - | // Show provides a mock function for the type MockOverlayWidget | |
| 1437 | - | func (_mock *MockOverlayWidget) Show() { | |
| 1438 | - | _mock.Called() | |
| 1439 | - | return | |
| 1278 | + | // Show provides a mock function with no fields | |
| 1279 | + | func (_m *MockOverlayWidget) Show() { | |
| 1280 | + | _m.Called() | |
| 1440 | 1281 | } | |
| 1441 | 1282 | ||
| 1442 | 1283 | // MockOverlayWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |
| @@ -1466,10 +1307,9 @@ func (_c *MockOverlayWidget_Show_Call) RunAndReturn(run func()) *MockOverlayWidg | |||
| 1466 | 1307 | return _c | |
| 1467 | 1308 | } | |
| 1468 | 1309 | ||
| 1469 | - | // Unparent provides a mock function for the type MockOverlayWidget | |
| 1470 | - | func (_mock *MockOverlayWidget) Unparent() { | |
| 1471 | - | _mock.Called() | |
| 1472 | - | return | |
| 1310 | + | // Unparent provides a mock function with no fields | |
| 1311 | + | func (_m *MockOverlayWidget) Unparent() { | |
| 1312 | + | _m.Called() | |
| 1473 | 1313 | } | |
| 1474 | 1314 | ||
| 1475 | 1315 | // MockOverlayWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent' | |
| @@ -1498,3 +1338,17 @@ func (_c *MockOverlayWidget_Unparent_Call) RunAndReturn(run func()) *MockOverlay | |||
| 1498 | 1338 | _c.Run(run) | |
| 1499 | 1339 | return _c | |
| 1500 | 1340 | } | |
| 1341 | + | ||
| 1342 | + | // NewMockOverlayWidget creates a new instance of MockOverlayWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 1343 | + | // The first argument is typically a *testing.T value. | |
| 1344 | + | func NewMockOverlayWidget(t interface { | |
| 1345 | + | mock.TestingT | |
| 1346 | + | Cleanup(func()) | |
| 1347 | + | }) *MockOverlayWidget { | |
| 1348 | + | mock := &MockOverlayWidget{} | |
| 1349 | + | mock.Mock.Test(t) | |
| 1350 | + | ||
| 1351 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 1352 | + | ||
| 1353 | + | return mock | |
| 1354 | + | } | |
M internal/ui/layout/mocks/mock_pane_renderer.go +26 -38
| @@ -1,28 +1,12 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | 7 | mock "github.com/stretchr/testify/mock" | |
| 10 | 8 | ) | |
| 11 | 9 | ||
| 12 | - | // NewMockPaneRenderer creates a new instance of MockPaneRenderer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 13 | - | // The first argument is typically a *testing.T value. | |
| 14 | - | func NewMockPaneRenderer(t interface { | |
| 15 | - | mock.TestingT | |
| 16 | - | Cleanup(func()) | |
| 17 | - | }) *MockPaneRenderer { | |
| 18 | - | mock := &MockPaneRenderer{} | |
| 19 | - | mock.Mock.Test(t) | |
| 20 | - | ||
| 21 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 22 | - | ||
| 23 | - | return mock | |
| 24 | - | } | |
| 25 | - | ||
| 26 | 10 | // MockPaneRenderer is an autogenerated mock type for the PaneRenderer type | |
| 27 | 11 | type MockPaneRenderer struct { | |
| 28 | 12 | mock.Mock | |
| @@ -36,22 +20,23 @@ func (_m *MockPaneRenderer) EXPECT() *MockPaneRenderer_Expecter { | |||
| 36 | 20 | return &MockPaneRenderer_Expecter{mock: &_m.Mock} | |
| 37 | 21 | } | |
| 38 | 22 | ||
| 39 | - | // RenderPane provides a mock function for the type MockPaneRenderer | |
| 40 | - | func (_mock *MockPaneRenderer) RenderPane(paneID string, webViewWidget layout.Widget) layout.Widget { | |
| 41 | - | ret := _mock.Called(paneID, webViewWidget) | |
| 23 | + | // RenderPane provides a mock function with given fields: paneID, webViewWidget | |
| 24 | + | func (_m *MockPaneRenderer) RenderPane(paneID string, webViewWidget layout.Widget) layout.Widget { | |
| 25 | + | ret := _m.Called(paneID, webViewWidget) | |
| 42 | 26 | ||
| 43 | 27 | if len(ret) == 0 { | |
| 44 | 28 | panic("no return value specified for RenderPane") | |
| 45 | 29 | } | |
| 46 | 30 | ||
| 47 | 31 | var r0 layout.Widget | |
| 48 | - | if returnFunc, ok := ret.Get(0).(func(string, layout.Widget) layout.Widget); ok { | |
| 49 | - | r0 = returnFunc(paneID, webViewWidget) | |
| 32 | + | if rf, ok := ret.Get(0).(func(string, layout.Widget) layout.Widget); ok { | |
| 33 | + | r0 = rf(paneID, webViewWidget) | |
| 50 | 34 | } else { | |
| 51 | 35 | if ret.Get(0) != nil { | |
| 52 | 36 | r0 = ret.Get(0).(layout.Widget) | |
| 53 | 37 | } | |
| 54 | 38 | } | |
| 39 | + | ||
| 55 | 40 | return r0 | |
| 56 | 41 | } | |
| 57 | 42 | ||
| @@ -69,28 +54,31 @@ func (_e *MockPaneRenderer_Expecter) RenderPane(paneID interface{}, webViewWidge | |||
| 69 | 54 | ||
| 70 | 55 | func (_c *MockPaneRenderer_RenderPane_Call) Run(run func(paneID string, webViewWidget layout.Widget)) *MockPaneRenderer_RenderPane_Call { | |
| 71 | 56 | _c.Call.Run(func(args mock.Arguments) { | |
| 72 | - | var arg0 string | |
| 73 | - | if args[0] != nil { | |
| 74 | - | arg0 = args[0].(string) | |
| 75 | - | } | |
| 76 | - | var arg1 layout.Widget | |
| 77 | - | if args[1] != nil { | |
| 78 | - | arg1 = args[1].(layout.Widget) | |
| 79 | - | } | |
| 80 | - | run( | |
| 81 | - | arg0, | |
| 82 | - | arg1, | |
| 83 | - | ) | |
| 57 | + | run(args[0].(string), args[1].(layout.Widget)) | |
| 84 | 58 | }) | |
| 85 | 59 | return _c | |
| 86 | 60 | } | |
| 87 | 61 | ||
| 88 | - | func (_c *MockPaneRenderer_RenderPane_Call) Return(widget layout.Widget) *MockPaneRenderer_RenderPane_Call { | |
| 89 | - | _c.Call.Return(widget) | |
| 62 | + | func (_c *MockPaneRenderer_RenderPane_Call) Return(_a0 layout.Widget) *MockPaneRenderer_RenderPane_Call { | |
| 63 | + | _c.Call.Return(_a0) | |
| 90 | 64 | return _c | |
| 91 | 65 | } | |
| 92 | 66 | ||
| 93 | - | func (_c *MockPaneRenderer_RenderPane_Call) RunAndReturn(run func(paneID string, webViewWidget layout.Widget) layout.Widget) *MockPaneRenderer_RenderPane_Call { | |
| 67 | + | func (_c *MockPaneRenderer_RenderPane_Call) RunAndReturn(run func(string, layout.Widget) layout.Widget) *MockPaneRenderer_RenderPane_Call { | |
| 94 | 68 | _c.Call.Return(run) | |
| 95 | 69 | return _c | |
| 96 | 70 | } | |
| 71 | + | ||
| 72 | + | // NewMockPaneRenderer creates a new instance of MockPaneRenderer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 73 | + | // The first argument is typically a *testing.T value. | |
| 74 | + | func NewMockPaneRenderer(t interface { | |
| 75 | + | mock.TestingT | |
| 76 | + | Cleanup(func()) | |
| 77 | + | }) *MockPaneRenderer { | |
| 78 | + | mock := &MockPaneRenderer{} | |
| 79 | + | mock.Mock.Test(t) | |
| 80 | + | ||
| 81 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 82 | + | ||
| 83 | + | return mock | |
| 84 | + | } | |
M internal/ui/layout/mocks/mock_pane_view_factory.go +28 -34
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/domain/entity" | |
| 9 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 6 | + | entity "github.com/bnema/dumber/internal/domain/entity" | |
| 7 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 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 | 12 | // MockPaneViewFactory is an autogenerated mock type for the PaneViewFactory type | |
| 28 | 13 | type MockPaneViewFactory struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,22 +22,23 @@ func (_m *MockPaneViewFactory) EXPECT() *MockPaneViewFactory_Expecter { | |||
| 37 | 22 | return &MockPaneViewFactory_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // CreatePaneView provides a mock function for the type MockPaneViewFactory | |
| 41 | - | func (_mock *MockPaneViewFactory) CreatePaneView(node *entity.PaneNode) layout.Widget { | |
| 42 | - | ret := _mock.Called(node) | |
| 25 | + | // CreatePaneView provides a mock function with given fields: node | |
| 26 | + | func (_m *MockPaneViewFactory) CreatePaneView(node *entity.PaneNode) layout.Widget { | |
| 27 | + | ret := _m.Called(node) | |
| 43 | 28 | ||
| 44 | 29 | if len(ret) == 0 { | |
| 45 | 30 | panic("no return value specified for CreatePaneView") | |
| 46 | 31 | } | |
| 47 | 32 | ||
| 48 | 33 | var r0 layout.Widget | |
| 49 | - | if returnFunc, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok { | |
| 50 | - | r0 = returnFunc(node) | |
| 34 | + | if rf, ok := ret.Get(0).(func(*entity.PaneNode) layout.Widget); ok { | |
| 35 | + | r0 = rf(node) | |
| 51 | 36 | } else { | |
| 52 | 37 | if ret.Get(0) != nil { | |
| 53 | 38 | r0 = ret.Get(0).(layout.Widget) | |
| 54 | 39 | } | |
| 55 | 40 | } | |
| 41 | + | ||
| 56 | 42 | return r0 | |
| 57 | 43 | } | |
| 58 | 44 | ||
| @@ -69,23 +55,31 @@ func (_e *MockPaneViewFactory_Expecter) CreatePaneView(node interface{}) *MockPa | |||
| 69 | 55 | ||
| 70 | 56 | func (_c *MockPaneViewFactory_CreatePaneView_Call) Run(run func(node *entity.PaneNode)) *MockPaneViewFactory_CreatePaneView_Call { | |
| 71 | 57 | _c.Call.Run(func(args mock.Arguments) { | |
| 72 | - | var arg0 *entity.PaneNode | |
| 73 | - | if args[0] != nil { | |
| 74 | - | arg0 = args[0].(*entity.PaneNode) | |
| 75 | - | } | |
| 76 | - | run( | |
| 77 | - | arg0, | |
| 78 | - | ) | |
| 58 | + | run(args[0].(*entity.PaneNode)) | |
| 79 | 59 | }) | |
| 80 | 60 | return _c | |
| 81 | 61 | } | |
| 82 | 62 | ||
| 83 | - | func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(widget layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |
| 84 | - | _c.Call.Return(widget) | |
| 63 | + | func (_c *MockPaneViewFactory_CreatePaneView_Call) Return(_a0 layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |
| 64 | + | _c.Call.Return(_a0) | |
| 85 | 65 | return _c | |
| 86 | 66 | } | |
| 87 | 67 | ||
| 88 | - | func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(node *entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |
| 68 | + | func (_c *MockPaneViewFactory_CreatePaneView_Call) RunAndReturn(run func(*entity.PaneNode) layout.Widget) *MockPaneViewFactory_CreatePaneView_Call { | |
| 89 | 69 | _c.Call.Return(run) | |
| 90 | 70 | return _c | |
| 91 | 71 | } | |
| 72 | + | ||
| 73 | + | // NewMockPaneViewFactory creates a new instance of MockPaneViewFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 74 | + | // The first argument is typically a *testing.T value. | |
| 75 | + | func NewMockPaneViewFactory(t interface { | |
| 76 | + | mock.TestingT | |
| 77 | + | Cleanup(func()) | |
| 78 | + | }) *MockPaneViewFactory { | |
| 79 | + | mock := &MockPaneViewFactory{} | |
| 80 | + | mock.Mock.Test(t) | |
| 81 | + | ||
| 82 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 83 | + | ||
| 84 | + | return mock | |
| 85 | + | } | |
M internal/ui/layout/mocks/mock_paned_widget.go +309 -459
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockPanedWidget creates a new instance of MockPanedWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockPanedWidget(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockPanedWidget { | |
| 19 | - | mock := &MockPanedWidget{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockPanedWidget is an autogenerated mock type for the PanedWidget type | |
| 28 | 13 | type MockPanedWidget struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,10 +22,9 @@ func (_m *MockPanedWidget) EXPECT() *MockPanedWidget_Expecter { | |||
| 37 | 22 | return &MockPanedWidget_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // AddController provides a mock function for the type MockPanedWidget | |
| 41 | - | func (_mock *MockPanedWidget) AddController(controller *gtk.EventController) { | |
| 42 | - | _mock.Called(controller) | |
| 43 | - | return | |
| 25 | + | // AddController provides a mock function with given fields: controller | |
| 26 | + | func (_m *MockPanedWidget) AddController(controller *gtk.EventController) { | |
| 27 | + | _m.Called(controller) | |
| 44 | 28 | } | |
| 45 | 29 | ||
| 46 | 30 | // MockPanedWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController' | |
| @@ -56,13 +40,7 @@ func (_e *MockPanedWidget_Expecter) AddController(controller interface{}) *MockP | |||
| 56 | 40 | ||
| 57 | 41 | func (_c *MockPanedWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockPanedWidget_AddController_Call { | |
| 58 | 42 | _c.Call.Run(func(args mock.Arguments) { | |
| 59 | - | var arg0 *gtk.EventController | |
| 60 | - | if args[0] != nil { | |
| 61 | - | arg0 = args[0].(*gtk.EventController) | |
| 62 | - | } | |
| 63 | - | run( | |
| 64 | - | arg0, | |
| 65 | - | ) | |
| 43 | + | run(args[0].(*gtk.EventController)) | |
| 66 | 44 | }) | |
| 67 | 45 | return _c | |
| 68 | 46 | } | |
| @@ -72,15 +50,14 @@ func (_c *MockPanedWidget_AddController_Call) Return() *MockPanedWidget_AddContr | |||
| 72 | 50 | return _c | |
| 73 | 51 | } | |
| 74 | 52 | ||
| 75 | - | func (_c *MockPanedWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockPanedWidget_AddController_Call { | |
| 53 | + | func (_c *MockPanedWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockPanedWidget_AddController_Call { | |
| 76 | 54 | _c.Run(run) | |
| 77 | 55 | return _c | |
| 78 | 56 | } | |
| 79 | 57 | ||
| 80 | - | // AddCssClass provides a mock function for the type MockPanedWidget | |
| 81 | - | func (_mock *MockPanedWidget) AddCssClass(cssClass string) { | |
| 82 | - | _mock.Called(cssClass) | |
| 83 | - | return | |
| 58 | + | // AddCssClass provides a mock function with given fields: cssClass | |
| 59 | + | func (_m *MockPanedWidget) AddCssClass(cssClass string) { | |
| 60 | + | _m.Called(cssClass) | |
| 84 | 61 | } | |
| 85 | 62 | ||
| 86 | 63 | // MockPanedWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass' | |
| @@ -96,13 +73,7 @@ func (_e *MockPanedWidget_Expecter) AddCssClass(cssClass interface{}) *MockPaned | |||
| 96 | 73 | ||
| 97 | 74 | func (_c *MockPanedWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockPanedWidget_AddCssClass_Call { | |
| 98 | 75 | _c.Call.Run(func(args mock.Arguments) { | |
| 99 | - | var arg0 string | |
| 100 | - | if args[0] != nil { | |
| 101 | - | arg0 = args[0].(string) | |
| 102 | - | } | |
| 103 | - | run( | |
| 104 | - | arg0, | |
| 105 | - | ) | |
| 76 | + | run(args[0].(string)) | |
| 106 | 77 | }) | |
| 107 | 78 | return _c | |
| 108 | 79 | } | |
| @@ -112,25 +83,26 @@ func (_c *MockPanedWidget_AddCssClass_Call) Return() *MockPanedWidget_AddCssClas | |||
| 112 | 83 | return _c | |
| 113 | 84 | } | |
| 114 | 85 | ||
| 115 | - | func (_c *MockPanedWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockPanedWidget_AddCssClass_Call { | |
| 86 | + | func (_c *MockPanedWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockPanedWidget_AddCssClass_Call { | |
| 116 | 87 | _c.Run(run) | |
| 117 | 88 | return _c | |
| 118 | 89 | } | |
| 119 | 90 | ||
| 120 | - | // AddTickCallback provides a mock function for the type MockPanedWidget | |
| 121 | - | func (_mock *MockPanedWidget) AddTickCallback(callback func() bool) uint { | |
| 122 | - | ret := _mock.Called(callback) | |
| 91 | + | // AddTickCallback provides a mock function with given fields: callback | |
| 92 | + | func (_m *MockPanedWidget) AddTickCallback(callback func() bool) uint { | |
| 93 | + | ret := _m.Called(callback) | |
| 123 | 94 | ||
| 124 | 95 | if len(ret) == 0 { | |
| 125 | 96 | panic("no return value specified for AddTickCallback") | |
| 126 | 97 | } | |
| 127 | 98 | ||
| 128 | 99 | var r0 uint | |
| 129 | - | if returnFunc, ok := ret.Get(0).(func(func() bool) uint); ok { | |
| 130 | - | r0 = returnFunc(callback) | |
| 100 | + | if rf, ok := ret.Get(0).(func(func() bool) uint); ok { | |
| 101 | + | r0 = rf(callback) | |
| 131 | 102 | } else { | |
| 132 | 103 | r0 = ret.Get(0).(uint) | |
| 133 | 104 | } | |
| 105 | + | ||
| 134 | 106 | return r0 | |
| 135 | 107 | } | |
| 136 | 108 | ||
| @@ -147,30 +119,24 @@ func (_e *MockPanedWidget_Expecter) AddTickCallback(callback interface{}) *MockP | |||
| 147 | 119 | ||
| 148 | 120 | func (_c *MockPanedWidget_AddTickCallback_Call) Run(run func(callback func() bool)) *MockPanedWidget_AddTickCallback_Call { | |
| 149 | 121 | _c.Call.Run(func(args mock.Arguments) { | |
| 150 | - | var arg0 func() bool | |
| 151 | - | if args[0] != nil { | |
| 152 | - | arg0 = args[0].(func() bool) | |
| 153 | - | } | |
| 154 | - | run( | |
| 155 | - | arg0, | |
| 156 | - | ) | |
| 122 | + | run(args[0].(func() bool)) | |
| 157 | 123 | }) | |
| 158 | 124 | return _c | |
| 159 | 125 | } | |
| 160 | 126 | ||
| 161 | - | func (_c *MockPanedWidget_AddTickCallback_Call) Return(v uint) *MockPanedWidget_AddTickCallback_Call { | |
| 162 | - | _c.Call.Return(v) | |
| 127 | + | func (_c *MockPanedWidget_AddTickCallback_Call) Return(_a0 uint) *MockPanedWidget_AddTickCallback_Call { | |
| 128 | + | _c.Call.Return(_a0) | |
| 163 | 129 | return _c | |
| 164 | 130 | } | |
| 165 | 131 | ||
| 166 | - | func (_c *MockPanedWidget_AddTickCallback_Call) RunAndReturn(run func(callback func() bool) uint) *MockPanedWidget_AddTickCallback_Call { | |
| 132 | + | func (_c *MockPanedWidget_AddTickCallback_Call) RunAndReturn(run func(func() bool) uint) *MockPanedWidget_AddTickCallback_Call { | |
| 167 | 133 | _c.Call.Return(run) | |
| 168 | 134 | return _c | |
| 169 | 135 | } | |
| 170 | 136 | ||
| 171 | - | // ComputePoint provides a mock function for the type MockPanedWidget | |
| 172 | - | func (_mock *MockPanedWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 173 | - | ret := _mock.Called(target) | |
| 137 | + | // ComputePoint provides a mock function with given fields: target | |
| 138 | + | func (_m *MockPanedWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 139 | + | ret := _m.Called(target) | |
| 174 | 140 | ||
| 175 | 141 | if len(ret) == 0 { | |
| 176 | 142 | panic("no return value specified for ComputePoint") | |
| @@ -179,24 +145,27 @@ func (_mock *MockPanedWidget) ComputePoint(target layout.Widget) (float64, float | |||
| 179 | 145 | var r0 float64 | |
| 180 | 146 | var r1 float64 | |
| 181 | 147 | var r2 bool | |
| 182 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 183 | - | return returnFunc(target) | |
| 148 | + | if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 149 | + | return rf(target) | |
| 184 | 150 | } | |
| 185 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 186 | - | r0 = returnFunc(target) | |
| 151 | + | if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 152 | + | r0 = rf(target) | |
| 187 | 153 | } else { | |
| 188 | 154 | r0 = ret.Get(0).(float64) | |
| 189 | 155 | } | |
| 190 | - | if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 191 | - | r1 = returnFunc(target) | |
| 156 | + | ||
| 157 | + | if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 158 | + | r1 = rf(target) | |
| 192 | 159 | } else { | |
| 193 | 160 | r1 = ret.Get(1).(float64) | |
| 194 | 161 | } | |
| 195 | - | if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 196 | - | r2 = returnFunc(target) | |
| 162 | + | ||
| 163 | + | if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 164 | + | r2 = rf(target) | |
| 197 | 165 | } else { | |
| 198 | 166 | r2 = ret.Get(2).(bool) | |
| 199 | 167 | } | |
| 168 | + | ||
| 200 | 169 | return r0, r1, r2 | |
| 201 | 170 | } | |
| 202 | 171 | ||
| @@ -213,13 +182,7 @@ func (_e *MockPanedWidget_Expecter) ComputePoint(target interface{}) *MockPanedW | |||
| 213 | 182 | ||
| 214 | 183 | func (_c *MockPanedWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockPanedWidget_ComputePoint_Call { | |
| 215 | 184 | _c.Call.Run(func(args mock.Arguments) { | |
| 216 | - | var arg0 layout.Widget | |
| 217 | - | if args[0] != nil { | |
| 218 | - | arg0 = args[0].(layout.Widget) | |
| 219 | - | } | |
| 220 | - | run( | |
| 221 | - | arg0, | |
| 222 | - | ) | |
| 185 | + | run(args[0].(layout.Widget)) | |
| 223 | 186 | }) | |
| 224 | 187 | return _c | |
| 225 | 188 | } | |
| @@ -229,25 +192,26 @@ func (_c *MockPanedWidget_ComputePoint_Call) Return(x float64, y float64, ok boo | |||
| 229 | 192 | return _c | |
| 230 | 193 | } | |
| 231 | 194 | ||
| 232 | - | func (_c *MockPanedWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockPanedWidget_ComputePoint_Call { | |
| 195 | + | func (_c *MockPanedWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockPanedWidget_ComputePoint_Call { | |
| 233 | 196 | _c.Call.Return(run) | |
| 234 | 197 | return _c | |
| 235 | 198 | } | |
| 236 | 199 | ||
| 237 | - | // ConnectMap provides a mock function for the type MockPanedWidget | |
| 238 | - | func (_mock *MockPanedWidget) ConnectMap(callback func()) uint32 { | |
| 239 | - | ret := _mock.Called(callback) | |
| 200 | + | // ConnectMap provides a mock function with given fields: callback | |
| 201 | + | func (_m *MockPanedWidget) ConnectMap(callback func()) uint32 { | |
| 202 | + | ret := _m.Called(callback) | |
| 240 | 203 | ||
| 241 | 204 | if len(ret) == 0 { | |
| 242 | 205 | panic("no return value specified for ConnectMap") | |
| 243 | 206 | } | |
| 244 | 207 | ||
| 245 | 208 | var r0 uint32 | |
| 246 | - | if returnFunc, ok := ret.Get(0).(func(func()) uint32); ok { | |
| 247 | - | r0 = returnFunc(callback) | |
| 209 | + | if rf, ok := ret.Get(0).(func(func()) uint32); ok { | |
| 210 | + | r0 = rf(callback) | |
| 248 | 211 | } else { | |
| 249 | 212 | r0 = ret.Get(0).(uint32) | |
| 250 | 213 | } | |
| 214 | + | ||
| 251 | 215 | return r0 | |
| 252 | 216 | } | |
| 253 | 217 | ||
| @@ -264,41 +228,36 @@ func (_e *MockPanedWidget_Expecter) ConnectMap(callback interface{}) *MockPanedW | |||
| 264 | 228 | ||
| 265 | 229 | func (_c *MockPanedWidget_ConnectMap_Call) Run(run func(callback func())) *MockPanedWidget_ConnectMap_Call { | |
| 266 | 230 | _c.Call.Run(func(args mock.Arguments) { | |
| 267 | - | var arg0 func() | |
| 268 | - | if args[0] != nil { | |
| 269 | - | arg0 = args[0].(func()) | |
| 270 | - | } | |
| 271 | - | run( | |
| 272 | - | arg0, | |
| 273 | - | ) | |
| 231 | + | run(args[0].(func())) | |
| 274 | 232 | }) | |
| 275 | 233 | return _c | |
| 276 | 234 | } | |
| 277 | 235 | ||
| 278 | - | func (_c *MockPanedWidget_ConnectMap_Call) Return(v uint32) *MockPanedWidget_ConnectMap_Call { | |
| 279 | - | _c.Call.Return(v) | |
| 236 | + | func (_c *MockPanedWidget_ConnectMap_Call) Return(_a0 uint32) *MockPanedWidget_ConnectMap_Call { | |
| 237 | + | _c.Call.Return(_a0) | |
| 280 | 238 | return _c | |
| 281 | 239 | } | |
| 282 | 240 | ||
| 283 | - | func (_c *MockPanedWidget_ConnectMap_Call) RunAndReturn(run func(callback func()) uint32) *MockPanedWidget_ConnectMap_Call { | |
| 241 | + | func (_c *MockPanedWidget_ConnectMap_Call) RunAndReturn(run func(func()) uint32) *MockPanedWidget_ConnectMap_Call { | |
| 284 | 242 | _c.Call.Return(run) | |
| 285 | 243 | return _c | |
| 286 | 244 | } | |
| 287 | 245 | ||
| 288 | - | // GetAllocatedHeight provides a mock function for the type MockPanedWidget | |
| 289 | - | func (_mock *MockPanedWidget) GetAllocatedHeight() int { | |
| 290 | - | ret := _mock.Called() | |
| 246 | + | // GetAllocatedHeight provides a mock function with no fields | |
| 247 | + | func (_m *MockPanedWidget) GetAllocatedHeight() int { | |
| 248 | + | ret := _m.Called() | |
| 291 | 249 | ||
| 292 | 250 | if len(ret) == 0 { | |
| 293 | 251 | panic("no return value specified for GetAllocatedHeight") | |
| 294 | 252 | } | |
| 295 | 253 | ||
| 296 | 254 | var r0 int | |
| 297 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 298 | - | r0 = returnFunc() | |
| 255 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 256 | + | r0 = rf() | |
| 299 | 257 | } else { | |
| 300 | 258 | r0 = ret.Get(0).(int) | |
| 301 | 259 | } | |
| 260 | + | ||
| 302 | 261 | return r0 | |
| 303 | 262 | } | |
| 304 | 263 | ||
| @@ -319,8 +278,8 @@ func (_c *MockPanedWidget_GetAllocatedHeight_Call) Run(run func()) *MockPanedWid | |||
| 319 | 278 | return _c | |
| 320 | 279 | } | |
| 321 | 280 | ||
| 322 | - | func (_c *MockPanedWidget_GetAllocatedHeight_Call) Return(n int) *MockPanedWidget_GetAllocatedHeight_Call { | |
| 323 | - | _c.Call.Return(n) | |
| 281 | + | func (_c *MockPanedWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockPanedWidget_GetAllocatedHeight_Call { | |
| 282 | + | _c.Call.Return(_a0) | |
| 324 | 283 | return _c | |
| 325 | 284 | } | |
| 326 | 285 | ||
| @@ -329,20 +288,21 @@ func (_c *MockPanedWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) | |||
| 329 | 288 | return _c | |
| 330 | 289 | } | |
| 331 | 290 | ||
| 332 | - | // GetAllocatedWidth provides a mock function for the type MockPanedWidget | |
| 333 | - | func (_mock *MockPanedWidget) GetAllocatedWidth() int { | |
| 334 | - | ret := _mock.Called() | |
| 291 | + | // GetAllocatedWidth provides a mock function with no fields | |
| 292 | + | func (_m *MockPanedWidget) GetAllocatedWidth() int { | |
| 293 | + | ret := _m.Called() | |
| 335 | 294 | ||
| 336 | 295 | if len(ret) == 0 { | |
| 337 | 296 | panic("no return value specified for GetAllocatedWidth") | |
| 338 | 297 | } | |
| 339 | 298 | ||
| 340 | 299 | var r0 int | |
| 341 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 342 | - | r0 = returnFunc() | |
| 300 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 301 | + | r0 = rf() | |
| 343 | 302 | } else { | |
| 344 | 303 | r0 = ret.Get(0).(int) | |
| 345 | 304 | } | |
| 305 | + | ||
| 346 | 306 | return r0 | |
| 347 | 307 | } | |
| 348 | 308 | ||
| @@ -363,8 +323,8 @@ func (_c *MockPanedWidget_GetAllocatedWidth_Call) Run(run func()) *MockPanedWidg | |||
| 363 | 323 | return _c | |
| 364 | 324 | } | |
| 365 | 325 | ||
| 366 | - | func (_c *MockPanedWidget_GetAllocatedWidth_Call) Return(n int) *MockPanedWidget_GetAllocatedWidth_Call { | |
| 367 | - | _c.Call.Return(n) | |
| 326 | + | func (_c *MockPanedWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockPanedWidget_GetAllocatedWidth_Call { | |
| 327 | + | _c.Call.Return(_a0) | |
| 368 | 328 | return _c | |
| 369 | 329 | } | |
| 370 | 330 | ||
| @@ -373,22 +333,23 @@ func (_c *MockPanedWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) * | |||
| 373 | 333 | return _c | |
| 374 | 334 | } | |
| 375 | 335 | ||
| 376 | - | // GetEndChild provides a mock function for the type MockPanedWidget | |
| 377 | - | func (_mock *MockPanedWidget) GetEndChild() layout.Widget { | |
| 378 | - | ret := _mock.Called() | |
| 336 | + | // GetEndChild provides a mock function with no fields | |
| 337 | + | func (_m *MockPanedWidget) GetEndChild() layout.Widget { | |
| 338 | + | ret := _m.Called() | |
| 379 | 339 | ||
| 380 | 340 | if len(ret) == 0 { | |
| 381 | 341 | panic("no return value specified for GetEndChild") | |
| 382 | 342 | } | |
| 383 | 343 | ||
| 384 | 344 | var r0 layout.Widget | |
| 385 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 386 | - | r0 = returnFunc() | |
| 345 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 346 | + | r0 = rf() | |
| 387 | 347 | } else { | |
| 388 | 348 | if ret.Get(0) != nil { | |
| 389 | 349 | r0 = ret.Get(0).(layout.Widget) | |
| 390 | 350 | } | |
| 391 | 351 | } | |
| 352 | + | ||
| 392 | 353 | return r0 | |
| 393 | 354 | } | |
| 394 | 355 | ||
| @@ -409,8 +370,8 @@ func (_c *MockPanedWidget_GetEndChild_Call) Run(run func()) *MockPanedWidget_Get | |||
| 409 | 370 | return _c | |
| 410 | 371 | } | |
| 411 | 372 | ||
| 412 | - | func (_c *MockPanedWidget_GetEndChild_Call) Return(widget layout.Widget) *MockPanedWidget_GetEndChild_Call { | |
| 413 | - | _c.Call.Return(widget) | |
| 373 | + | func (_c *MockPanedWidget_GetEndChild_Call) Return(_a0 layout.Widget) *MockPanedWidget_GetEndChild_Call { | |
| 374 | + | _c.Call.Return(_a0) | |
| 414 | 375 | return _c | |
| 415 | 376 | } | |
| 416 | 377 | ||
| @@ -419,20 +380,21 @@ func (_c *MockPanedWidget_GetEndChild_Call) RunAndReturn(run func() layout.Widge | |||
| 419 | 380 | return _c | |
| 420 | 381 | } | |
| 421 | 382 | ||
| 422 | - | // GetHexpand provides a mock function for the type MockPanedWidget | |
| 423 | - | func (_mock *MockPanedWidget) GetHexpand() bool { | |
| 424 | - | ret := _mock.Called() | |
| 383 | + | // GetHexpand provides a mock function with no fields | |
| 384 | + | func (_m *MockPanedWidget) GetHexpand() bool { | |
| 385 | + | ret := _m.Called() | |
| 425 | 386 | ||
| 426 | 387 | if len(ret) == 0 { | |
| 427 | 388 | panic("no return value specified for GetHexpand") | |
| 428 | 389 | } | |
| 429 | 390 | ||
| 430 | 391 | var r0 bool | |
| 431 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 432 | - | r0 = returnFunc() | |
| 392 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 393 | + | r0 = rf() | |
| 433 | 394 | } else { | |
| 434 | 395 | r0 = ret.Get(0).(bool) | |
| 435 | 396 | } | |
| 397 | + | ||
| 436 | 398 | return r0 | |
| 437 | 399 | } | |
| 438 | 400 | ||
| @@ -453,8 +415,8 @@ func (_c *MockPanedWidget_GetHexpand_Call) Run(run func()) *MockPanedWidget_GetH | |||
| 453 | 415 | return _c | |
| 454 | 416 | } | |
| 455 | 417 | ||
| 456 | - | func (_c *MockPanedWidget_GetHexpand_Call) Return(b bool) *MockPanedWidget_GetHexpand_Call { | |
| 457 | - | _c.Call.Return(b) | |
| 418 | + | func (_c *MockPanedWidget_GetHexpand_Call) Return(_a0 bool) *MockPanedWidget_GetHexpand_Call { | |
| 419 | + | _c.Call.Return(_a0) | |
| 458 | 420 | return _c | |
| 459 | 421 | } | |
| 460 | 422 | ||
| @@ -463,22 +425,23 @@ func (_c *MockPanedWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockPa | |||
| 463 | 425 | return _c | |
| 464 | 426 | } | |
| 465 | 427 | ||
| 466 | - | // GetParent provides a mock function for the type MockPanedWidget | |
| 467 | - | func (_mock *MockPanedWidget) GetParent() layout.Widget { | |
| 468 | - | ret := _mock.Called() | |
| 428 | + | // GetParent provides a mock function with no fields | |
| 429 | + | func (_m *MockPanedWidget) GetParent() layout.Widget { | |
| 430 | + | ret := _m.Called() | |
| 469 | 431 | ||
| 470 | 432 | if len(ret) == 0 { | |
| 471 | 433 | panic("no return value specified for GetParent") | |
| 472 | 434 | } | |
| 473 | 435 | ||
| 474 | 436 | var r0 layout.Widget | |
| 475 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 476 | - | r0 = returnFunc() | |
| 437 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 438 | + | r0 = rf() | |
| 477 | 439 | } else { | |
| 478 | 440 | if ret.Get(0) != nil { | |
| 479 | 441 | r0 = ret.Get(0).(layout.Widget) | |
| 480 | 442 | } | |
| 481 | 443 | } | |
| 444 | + | ||
| 482 | 445 | return r0 | |
| 483 | 446 | } | |
| 484 | 447 | ||
| @@ -499,8 +462,8 @@ func (_c *MockPanedWidget_GetParent_Call) Run(run func()) *MockPanedWidget_GetPa | |||
| 499 | 462 | return _c | |
| 500 | 463 | } | |
| 501 | 464 | ||
| 502 | - | func (_c *MockPanedWidget_GetParent_Call) Return(widget layout.Widget) *MockPanedWidget_GetParent_Call { | |
| 503 | - | _c.Call.Return(widget) | |
| 465 | + | func (_c *MockPanedWidget_GetParent_Call) Return(_a0 layout.Widget) *MockPanedWidget_GetParent_Call { | |
| 466 | + | _c.Call.Return(_a0) | |
| 504 | 467 | return _c | |
| 505 | 468 | } | |
| 506 | 469 | ||
| @@ -509,20 +472,21 @@ func (_c *MockPanedWidget_GetParent_Call) RunAndReturn(run func() layout.Widget) | |||
| 509 | 472 | return _c | |
| 510 | 473 | } | |
| 511 | 474 | ||
| 512 | - | // GetPosition provides a mock function for the type MockPanedWidget | |
| 513 | - | func (_mock *MockPanedWidget) GetPosition() int { | |
| 514 | - | ret := _mock.Called() | |
| 475 | + | // GetPosition provides a mock function with no fields | |
| 476 | + | func (_m *MockPanedWidget) GetPosition() int { | |
| 477 | + | ret := _m.Called() | |
| 515 | 478 | ||
| 516 | 479 | if len(ret) == 0 { | |
| 517 | 480 | panic("no return value specified for GetPosition") | |
| 518 | 481 | } | |
| 519 | 482 | ||
| 520 | 483 | var r0 int | |
| 521 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 522 | - | r0 = returnFunc() | |
| 484 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 485 | + | r0 = rf() | |
| 523 | 486 | } else { | |
| 524 | 487 | r0 = ret.Get(0).(int) | |
| 525 | 488 | } | |
| 489 | + | ||
| 526 | 490 | return r0 | |
| 527 | 491 | } | |
| 528 | 492 | ||
| @@ -543,8 +507,8 @@ func (_c *MockPanedWidget_GetPosition_Call) Run(run func()) *MockPanedWidget_Get | |||
| 543 | 507 | return _c | |
| 544 | 508 | } | |
| 545 | 509 | ||
| 546 | - | func (_c *MockPanedWidget_GetPosition_Call) Return(n int) *MockPanedWidget_GetPosition_Call { | |
| 547 | - | _c.Call.Return(n) | |
| 510 | + | func (_c *MockPanedWidget_GetPosition_Call) Return(_a0 int) *MockPanedWidget_GetPosition_Call { | |
| 511 | + | _c.Call.Return(_a0) | |
| 548 | 512 | return _c | |
| 549 | 513 | } | |
| 550 | 514 | ||
| @@ -553,20 +517,21 @@ func (_c *MockPanedWidget_GetPosition_Call) RunAndReturn(run func() int) *MockPa | |||
| 553 | 517 | return _c | |
| 554 | 518 | } | |
| 555 | 519 | ||
| 556 | - | // GetResizeEndChild provides a mock function for the type MockPanedWidget | |
| 557 | - | func (_mock *MockPanedWidget) GetResizeEndChild() bool { | |
| 558 | - | ret := _mock.Called() | |
| 520 | + | // GetResizeEndChild provides a mock function with no fields | |
| 521 | + | func (_m *MockPanedWidget) GetResizeEndChild() bool { | |
| 522 | + | ret := _m.Called() | |
| 559 | 523 | ||
| 560 | 524 | if len(ret) == 0 { | |
| 561 | 525 | panic("no return value specified for GetResizeEndChild") | |
| 562 | 526 | } | |
| 563 | 527 | ||
| 564 | 528 | var r0 bool | |
| 565 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 566 | - | r0 = returnFunc() | |
| 529 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 530 | + | r0 = rf() | |
| 567 | 531 | } else { | |
| 568 | 532 | r0 = ret.Get(0).(bool) | |
| 569 | 533 | } | |
| 534 | + | ||
| 570 | 535 | return r0 | |
| 571 | 536 | } | |
| 572 | 537 | ||
| @@ -587,8 +552,8 @@ func (_c *MockPanedWidget_GetResizeEndChild_Call) Run(run func()) *MockPanedWidg | |||
| 587 | 552 | return _c | |
| 588 | 553 | } | |
| 589 | 554 | ||
| 590 | - | func (_c *MockPanedWidget_GetResizeEndChild_Call) Return(b bool) *MockPanedWidget_GetResizeEndChild_Call { | |
| 591 | - | _c.Call.Return(b) | |
| 555 | + | func (_c *MockPanedWidget_GetResizeEndChild_Call) Return(_a0 bool) *MockPanedWidget_GetResizeEndChild_Call { | |
| 556 | + | _c.Call.Return(_a0) | |
| 592 | 557 | return _c | |
| 593 | 558 | } | |
| 594 | 559 | ||
| @@ -597,20 +562,21 @@ func (_c *MockPanedWidget_GetResizeEndChild_Call) RunAndReturn(run func() bool) | |||
| 597 | 562 | return _c | |
| 598 | 563 | } | |
| 599 | 564 | ||
| 600 | - | // GetResizeStartChild provides a mock function for the type MockPanedWidget | |
| 601 | - | func (_mock *MockPanedWidget) GetResizeStartChild() bool { | |
| 602 | - | ret := _mock.Called() | |
| 565 | + | // GetResizeStartChild provides a mock function with no fields | |
| 566 | + | func (_m *MockPanedWidget) GetResizeStartChild() bool { | |
| 567 | + | ret := _m.Called() | |
| 603 | 568 | ||
| 604 | 569 | if len(ret) == 0 { | |
| 605 | 570 | panic("no return value specified for GetResizeStartChild") | |
| 606 | 571 | } | |
| 607 | 572 | ||
| 608 | 573 | var r0 bool | |
| 609 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 610 | - | r0 = returnFunc() | |
| 574 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 575 | + | r0 = rf() | |
| 611 | 576 | } else { | |
| 612 | 577 | r0 = ret.Get(0).(bool) | |
| 613 | 578 | } | |
| 579 | + | ||
| 614 | 580 | return r0 | |
| 615 | 581 | } | |
| 616 | 582 | ||
| @@ -631,8 +597,8 @@ func (_c *MockPanedWidget_GetResizeStartChild_Call) Run(run func()) *MockPanedWi | |||
| 631 | 597 | return _c | |
| 632 | 598 | } | |
| 633 | 599 | ||
| 634 | - | func (_c *MockPanedWidget_GetResizeStartChild_Call) Return(b bool) *MockPanedWidget_GetResizeStartChild_Call { | |
| 635 | - | _c.Call.Return(b) | |
| 600 | + | func (_c *MockPanedWidget_GetResizeStartChild_Call) Return(_a0 bool) *MockPanedWidget_GetResizeStartChild_Call { | |
| 601 | + | _c.Call.Return(_a0) | |
| 636 | 602 | return _c | |
| 637 | 603 | } | |
| 638 | 604 | ||
| @@ -641,20 +607,21 @@ func (_c *MockPanedWidget_GetResizeStartChild_Call) RunAndReturn(run func() bool | |||
| 641 | 607 | return _c | |
| 642 | 608 | } | |
| 643 | 609 | ||
| 644 | - | // GetShrinkEndChild provides a mock function for the type MockPanedWidget | |
| 645 | - | func (_mock *MockPanedWidget) GetShrinkEndChild() bool { | |
| 646 | - | ret := _mock.Called() | |
| 610 | + | // GetShrinkEndChild provides a mock function with no fields | |
| 611 | + | func (_m *MockPanedWidget) GetShrinkEndChild() bool { | |
| 612 | + | ret := _m.Called() | |
| 647 | 613 | ||
| 648 | 614 | if len(ret) == 0 { | |
| 649 | 615 | panic("no return value specified for GetShrinkEndChild") | |
| 650 | 616 | } | |
| 651 | 617 | ||
| 652 | 618 | var r0 bool | |
| 653 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 654 | - | r0 = returnFunc() | |
| 619 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 620 | + | r0 = rf() | |
| 655 | 621 | } else { | |
| 656 | 622 | r0 = ret.Get(0).(bool) | |
| 657 | 623 | } | |
| 624 | + | ||
| 658 | 625 | return r0 | |
| 659 | 626 | } | |
| 660 | 627 | ||
| @@ -675,8 +642,8 @@ func (_c *MockPanedWidget_GetShrinkEndChild_Call) Run(run func()) *MockPanedWidg | |||
| 675 | 642 | return _c | |
| 676 | 643 | } | |
| 677 | 644 | ||
| 678 | - | func (_c *MockPanedWidget_GetShrinkEndChild_Call) Return(b bool) *MockPanedWidget_GetShrinkEndChild_Call { | |
| 679 | - | _c.Call.Return(b) | |
| 645 | + | func (_c *MockPanedWidget_GetShrinkEndChild_Call) Return(_a0 bool) *MockPanedWidget_GetShrinkEndChild_Call { | |
| 646 | + | _c.Call.Return(_a0) | |
| 680 | 647 | return _c | |
| 681 | 648 | } | |
| 682 | 649 | ||
| @@ -685,20 +652,21 @@ func (_c *MockPanedWidget_GetShrinkEndChild_Call) RunAndReturn(run func() bool) | |||
| 685 | 652 | return _c | |
| 686 | 653 | } | |
| 687 | 654 | ||
| 688 | - | // GetShrinkStartChild provides a mock function for the type MockPanedWidget | |
| 689 | - | func (_mock *MockPanedWidget) GetShrinkStartChild() bool { | |
| 690 | - | ret := _mock.Called() | |
| 655 | + | // GetShrinkStartChild provides a mock function with no fields | |
| 656 | + | func (_m *MockPanedWidget) GetShrinkStartChild() bool { | |
| 657 | + | ret := _m.Called() | |
| 691 | 658 | ||
| 692 | 659 | if len(ret) == 0 { | |
| 693 | 660 | panic("no return value specified for GetShrinkStartChild") | |
| 694 | 661 | } | |
| 695 | 662 | ||
| 696 | 663 | var r0 bool | |
| 697 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 698 | - | r0 = returnFunc() | |
| 664 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 665 | + | r0 = rf() | |
| 699 | 666 | } else { | |
| 700 | 667 | r0 = ret.Get(0).(bool) | |
| 701 | 668 | } | |
| 669 | + | ||
| 702 | 670 | return r0 | |
| 703 | 671 | } | |
| 704 | 672 | ||
| @@ -719,8 +687,8 @@ func (_c *MockPanedWidget_GetShrinkStartChild_Call) Run(run func()) *MockPanedWi | |||
| 719 | 687 | return _c | |
| 720 | 688 | } | |
| 721 | 689 | ||
| 722 | - | func (_c *MockPanedWidget_GetShrinkStartChild_Call) Return(b bool) *MockPanedWidget_GetShrinkStartChild_Call { | |
| 723 | - | _c.Call.Return(b) | |
| 690 | + | func (_c *MockPanedWidget_GetShrinkStartChild_Call) Return(_a0 bool) *MockPanedWidget_GetShrinkStartChild_Call { | |
| 691 | + | _c.Call.Return(_a0) | |
| 724 | 692 | return _c | |
| 725 | 693 | } | |
| 726 | 694 | ||
| @@ -729,22 +697,23 @@ func (_c *MockPanedWidget_GetShrinkStartChild_Call) RunAndReturn(run func() bool | |||
| 729 | 697 | return _c | |
| 730 | 698 | } | |
| 731 | 699 | ||
| 732 | - | // GetStartChild provides a mock function for the type MockPanedWidget | |
| 733 | - | func (_mock *MockPanedWidget) GetStartChild() layout.Widget { | |
| 734 | - | ret := _mock.Called() | |
| 700 | + | // GetStartChild provides a mock function with no fields | |
| 701 | + | func (_m *MockPanedWidget) GetStartChild() layout.Widget { | |
| 702 | + | ret := _m.Called() | |
| 735 | 703 | ||
| 736 | 704 | if len(ret) == 0 { | |
| 737 | 705 | panic("no return value specified for GetStartChild") | |
| 738 | 706 | } | |
| 739 | 707 | ||
| 740 | 708 | var r0 layout.Widget | |
| 741 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 742 | - | r0 = returnFunc() | |
| 709 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 710 | + | r0 = rf() | |
| 743 | 711 | } else { | |
| 744 | 712 | if ret.Get(0) != nil { | |
| 745 | 713 | r0 = ret.Get(0).(layout.Widget) | |
| 746 | 714 | } | |
| 747 | 715 | } | |
| 716 | + | ||
| 748 | 717 | return r0 | |
| 749 | 718 | } | |
| 750 | 719 | ||
| @@ -765,8 +734,8 @@ func (_c *MockPanedWidget_GetStartChild_Call) Run(run func()) *MockPanedWidget_G | |||
| 765 | 734 | return _c | |
| 766 | 735 | } | |
| 767 | 736 | ||
| 768 | - | func (_c *MockPanedWidget_GetStartChild_Call) Return(widget layout.Widget) *MockPanedWidget_GetStartChild_Call { | |
| 769 | - | _c.Call.Return(widget) | |
| 737 | + | func (_c *MockPanedWidget_GetStartChild_Call) Return(_a0 layout.Widget) *MockPanedWidget_GetStartChild_Call { | |
| 738 | + | _c.Call.Return(_a0) | |
| 770 | 739 | return _c | |
| 771 | 740 | } | |
| 772 | 741 | ||
| @@ -775,20 +744,21 @@ func (_c *MockPanedWidget_GetStartChild_Call) RunAndReturn(run func() layout.Wid | |||
| 775 | 744 | return _c | |
| 776 | 745 | } | |
| 777 | 746 | ||
| 778 | - | // GetVexpand provides a mock function for the type MockPanedWidget | |
| 779 | - | func (_mock *MockPanedWidget) GetVexpand() bool { | |
| 780 | - | ret := _mock.Called() | |
| 747 | + | // GetVexpand provides a mock function with no fields | |
| 748 | + | func (_m *MockPanedWidget) GetVexpand() bool { | |
| 749 | + | ret := _m.Called() | |
| 781 | 750 | ||
| 782 | 751 | if len(ret) == 0 { | |
| 783 | 752 | panic("no return value specified for GetVexpand") | |
| 784 | 753 | } | |
| 785 | 754 | ||
| 786 | 755 | var r0 bool | |
| 787 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 788 | - | r0 = returnFunc() | |
| 756 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 757 | + | r0 = rf() | |
| 789 | 758 | } else { | |
| 790 | 759 | r0 = ret.Get(0).(bool) | |
| 791 | 760 | } | |
| 761 | + | ||
| 792 | 762 | return r0 | |
| 793 | 763 | } | |
| 794 | 764 | ||
| @@ -809,8 +779,8 @@ func (_c *MockPanedWidget_GetVexpand_Call) Run(run func()) *MockPanedWidget_GetV | |||
| 809 | 779 | return _c | |
| 810 | 780 | } | |
| 811 | 781 | ||
| 812 | - | func (_c *MockPanedWidget_GetVexpand_Call) Return(b bool) *MockPanedWidget_GetVexpand_Call { | |
| 813 | - | _c.Call.Return(b) | |
| 782 | + | func (_c *MockPanedWidget_GetVexpand_Call) Return(_a0 bool) *MockPanedWidget_GetVexpand_Call { | |
| 783 | + | _c.Call.Return(_a0) | |
| 814 | 784 | return _c | |
| 815 | 785 | } | |
| 816 | 786 | ||
| @@ -819,20 +789,21 @@ func (_c *MockPanedWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockPa | |||
| 819 | 789 | return _c | |
| 820 | 790 | } | |
| 821 | 791 | ||
| 822 | - | // GetWideHandle provides a mock function for the type MockPanedWidget | |
| 823 | - | func (_mock *MockPanedWidget) GetWideHandle() bool { | |
| 824 | - | ret := _mock.Called() | |
| 792 | + | // GetWideHandle provides a mock function with no fields | |
| 793 | + | func (_m *MockPanedWidget) GetWideHandle() bool { | |
| 794 | + | ret := _m.Called() | |
| 825 | 795 | ||
| 826 | 796 | if len(ret) == 0 { | |
| 827 | 797 | panic("no return value specified for GetWideHandle") | |
| 828 | 798 | } | |
| 829 | 799 | ||
| 830 | 800 | var r0 bool | |
| 831 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 832 | - | r0 = returnFunc() | |
| 801 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 802 | + | r0 = rf() | |
| 833 | 803 | } else { | |
| 834 | 804 | r0 = ret.Get(0).(bool) | |
| 835 | 805 | } | |
| 806 | + | ||
| 836 | 807 | return r0 | |
| 837 | 808 | } | |
| 838 | 809 | ||
| @@ -853,8 +824,8 @@ func (_c *MockPanedWidget_GetWideHandle_Call) Run(run func()) *MockPanedWidget_G | |||
| 853 | 824 | return _c | |
| 854 | 825 | } | |
| 855 | 826 | ||
| 856 | - | func (_c *MockPanedWidget_GetWideHandle_Call) Return(b bool) *MockPanedWidget_GetWideHandle_Call { | |
| 857 | - | _c.Call.Return(b) | |
| 827 | + | func (_c *MockPanedWidget_GetWideHandle_Call) Return(_a0 bool) *MockPanedWidget_GetWideHandle_Call { | |
| 828 | + | _c.Call.Return(_a0) | |
| 858 | 829 | return _c | |
| 859 | 830 | } | |
| 860 | 831 | ||
| @@ -863,20 +834,21 @@ func (_c *MockPanedWidget_GetWideHandle_Call) RunAndReturn(run func() bool) *Moc | |||
| 863 | 834 | return _c | |
| 864 | 835 | } | |
| 865 | 836 | ||
| 866 | - | // GrabFocus provides a mock function for the type MockPanedWidget | |
| 867 | - | func (_mock *MockPanedWidget) GrabFocus() bool { | |
| 868 | - | ret := _mock.Called() | |
| 837 | + | // GrabFocus provides a mock function with no fields | |
| 838 | + | func (_m *MockPanedWidget) GrabFocus() bool { | |
| 839 | + | ret := _m.Called() | |
| 869 | 840 | ||
| 870 | 841 | if len(ret) == 0 { | |
| 871 | 842 | panic("no return value specified for GrabFocus") | |
| 872 | 843 | } | |
| 873 | 844 | ||
| 874 | 845 | var r0 bool | |
| 875 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 876 | - | r0 = returnFunc() | |
| 846 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 847 | + | r0 = rf() | |
| 877 | 848 | } else { | |
| 878 | 849 | r0 = ret.Get(0).(bool) | |
| 879 | 850 | } | |
| 851 | + | ||
| 880 | 852 | return r0 | |
| 881 | 853 | } | |
| 882 | 854 | ||
| @@ -897,8 +869,8 @@ func (_c *MockPanedWidget_GrabFocus_Call) Run(run func()) *MockPanedWidget_GrabF | |||
| 897 | 869 | return _c | |
| 898 | 870 | } | |
| 899 | 871 | ||
| 900 | - | func (_c *MockPanedWidget_GrabFocus_Call) Return(b bool) *MockPanedWidget_GrabFocus_Call { | |
| 901 | - | _c.Call.Return(b) | |
| 872 | + | func (_c *MockPanedWidget_GrabFocus_Call) Return(_a0 bool) *MockPanedWidget_GrabFocus_Call { | |
| 873 | + | _c.Call.Return(_a0) | |
| 902 | 874 | return _c | |
| 903 | 875 | } | |
| 904 | 876 | ||
| @@ -907,22 +879,23 @@ func (_c *MockPanedWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockPan | |||
| 907 | 879 | return _c | |
| 908 | 880 | } | |
| 909 | 881 | ||
| 910 | - | // GtkWidget provides a mock function for the type MockPanedWidget | |
| 911 | - | func (_mock *MockPanedWidget) GtkWidget() *gtk.Widget { | |
| 912 | - | ret := _mock.Called() | |
| 882 | + | // GtkWidget provides a mock function with no fields | |
| 883 | + | func (_m *MockPanedWidget) GtkWidget() *gtk.Widget { | |
| 884 | + | ret := _m.Called() | |
| 913 | 885 | ||
| 914 | 886 | if len(ret) == 0 { | |
| 915 | 887 | panic("no return value specified for GtkWidget") | |
| 916 | 888 | } | |
| 917 | 889 | ||
| 918 | 890 | var r0 *gtk.Widget | |
| 919 | - | if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 920 | - | r0 = returnFunc() | |
| 891 | + | if rf, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 892 | + | r0 = rf() | |
| 921 | 893 | } else { | |
| 922 | 894 | if ret.Get(0) != nil { | |
| 923 | 895 | r0 = ret.Get(0).(*gtk.Widget) | |
| 924 | 896 | } | |
| 925 | 897 | } | |
| 898 | + | ||
| 926 | 899 | return r0 | |
| 927 | 900 | } | |
| 928 | 901 | ||
| @@ -943,8 +916,8 @@ func (_c *MockPanedWidget_GtkWidget_Call) Run(run func()) *MockPanedWidget_GtkWi | |||
| 943 | 916 | return _c | |
| 944 | 917 | } | |
| 945 | 918 | ||
| 946 | - | func (_c *MockPanedWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockPanedWidget_GtkWidget_Call { | |
| 947 | - | _c.Call.Return(widget) | |
| 919 | + | func (_c *MockPanedWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockPanedWidget_GtkWidget_Call { | |
| 920 | + | _c.Call.Return(_a0) | |
| 948 | 921 | return _c | |
| 949 | 922 | } | |
| 950 | 923 | ||
| @@ -953,20 +926,21 @@ func (_c *MockPanedWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) * | |||
| 953 | 926 | return _c | |
| 954 | 927 | } | |
| 955 | 928 | ||
| 956 | - | // HasCssClass provides a mock function for the type MockPanedWidget | |
| 957 | - | func (_mock *MockPanedWidget) HasCssClass(cssClass string) bool { | |
| 958 | - | ret := _mock.Called(cssClass) | |
| 929 | + | // HasCssClass provides a mock function with given fields: cssClass | |
| 930 | + | func (_m *MockPanedWidget) HasCssClass(cssClass string) bool { | |
| 931 | + | ret := _m.Called(cssClass) | |
| 959 | 932 | ||
| 960 | 933 | if len(ret) == 0 { | |
| 961 | 934 | panic("no return value specified for HasCssClass") | |
| 962 | 935 | } | |
| 963 | 936 | ||
| 964 | 937 | var r0 bool | |
| 965 | - | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |
| 966 | - | r0 = returnFunc(cssClass) | |
| 938 | + | if rf, ok := ret.Get(0).(func(string) bool); ok { | |
| 939 | + | r0 = rf(cssClass) | |
| 967 | 940 | } else { | |
| 968 | 941 | r0 = ret.Get(0).(bool) | |
| 969 | 942 | } | |
| 943 | + | ||
| 970 | 944 | return r0 | |
| 971 | 945 | } | |
| 972 | 946 | ||
| @@ -983,41 +957,36 @@ func (_e *MockPanedWidget_Expecter) HasCssClass(cssClass interface{}) *MockPaned | |||
| 983 | 957 | ||
| 984 | 958 | func (_c *MockPanedWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockPanedWidget_HasCssClass_Call { | |
| 985 | 959 | _c.Call.Run(func(args mock.Arguments) { | |
| 986 | - | var arg0 string | |
| 987 | - | if args[0] != nil { | |
| 988 | - | arg0 = args[0].(string) | |
| 989 | - | } | |
| 990 | - | run( | |
| 991 | - | arg0, | |
| 992 | - | ) | |
| 960 | + | run(args[0].(string)) | |
| 993 | 961 | }) | |
| 994 | 962 | return _c | |
| 995 | 963 | } | |
| 996 | 964 | ||
| 997 | - | func (_c *MockPanedWidget_HasCssClass_Call) Return(b bool) *MockPanedWidget_HasCssClass_Call { | |
| 998 | - | _c.Call.Return(b) | |
| 965 | + | func (_c *MockPanedWidget_HasCssClass_Call) Return(_a0 bool) *MockPanedWidget_HasCssClass_Call { | |
| 966 | + | _c.Call.Return(_a0) | |
| 999 | 967 | return _c | |
| 1000 | 968 | } | |
| 1001 | 969 | ||
| 1002 | - | func (_c *MockPanedWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockPanedWidget_HasCssClass_Call { | |
| 970 | + | func (_c *MockPanedWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockPanedWidget_HasCssClass_Call { | |
| 1003 | 971 | _c.Call.Return(run) | |
| 1004 | 972 | return _c | |
| 1005 | 973 | } | |
| 1006 | 974 | ||
| 1007 | - | // HasFocus provides a mock function for the type MockPanedWidget | |
| 1008 | - | func (_mock *MockPanedWidget) HasFocus() bool { | |
| 1009 | - | ret := _mock.Called() | |
| 975 | + | // HasFocus provides a mock function with no fields | |
| 976 | + | func (_m *MockPanedWidget) HasFocus() bool { | |
| 977 | + | ret := _m.Called() | |
| 1010 | 978 | ||
| 1011 | 979 | if len(ret) == 0 { | |
| 1012 | 980 | panic("no return value specified for HasFocus") | |
| 1013 | 981 | } | |
| 1014 | 982 | ||
| 1015 | 983 | var r0 bool | |
| 1016 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 1017 | - | r0 = returnFunc() | |
| 984 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 985 | + | r0 = rf() | |
| 1018 | 986 | } else { | |
| 1019 | 987 | r0 = ret.Get(0).(bool) | |
| 1020 | 988 | } | |
| 989 | + | ||
| 1021 | 990 | return r0 | |
| 1022 | 991 | } | |
| 1023 | 992 | ||
| @@ -1038,8 +1007,8 @@ func (_c *MockPanedWidget_HasFocus_Call) Run(run func()) *MockPanedWidget_HasFoc | |||
| 1038 | 1007 | return _c | |
| 1039 | 1008 | } | |
| 1040 | 1009 | ||
| 1041 | - | func (_c *MockPanedWidget_HasFocus_Call) Return(b bool) *MockPanedWidget_HasFocus_Call { | |
| 1042 | - | _c.Call.Return(b) | |
| 1010 | + | func (_c *MockPanedWidget_HasFocus_Call) Return(_a0 bool) *MockPanedWidget_HasFocus_Call { | |
| 1011 | + | _c.Call.Return(_a0) | |
| 1043 | 1012 | return _c | |
| 1044 | 1013 | } | |
| 1045 | 1014 | ||
| @@ -1048,10 +1017,9 @@ func (_c *MockPanedWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockPane | |||
| 1048 | 1017 | return _c | |
| 1049 | 1018 | } | |
| 1050 | 1019 | ||
| 1051 | - | // Hide provides a mock function for the type MockPanedWidget | |
| 1052 | - | func (_mock *MockPanedWidget) Hide() { | |
| 1053 | - | _mock.Called() | |
| 1054 | - | return | |
| 1020 | + | // Hide provides a mock function with no fields | |
| 1021 | + | func (_m *MockPanedWidget) Hide() { | |
| 1022 | + | _m.Called() | |
| 1055 | 1023 | } | |
| 1056 | 1024 | ||
| 1057 | 1025 | // MockPanedWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |
| @@ -1081,20 +1049,21 @@ func (_c *MockPanedWidget_Hide_Call) RunAndReturn(run func()) *MockPanedWidget_H | |||
| 1081 | 1049 | return _c | |
| 1082 | 1050 | } | |
| 1083 | 1051 | ||
| 1084 | - | // IsVisible provides a mock function for the type MockPanedWidget | |
| 1085 | - | func (_mock *MockPanedWidget) IsVisible() bool { | |
| 1086 | - | ret := _mock.Called() | |
| 1052 | + | // IsVisible provides a mock function with no fields | |
| 1053 | + | func (_m *MockPanedWidget) IsVisible() bool { | |
| 1054 | + | ret := _m.Called() | |
| 1087 | 1055 | ||
| 1088 | 1056 | if len(ret) == 0 { | |
| 1089 | 1057 | panic("no return value specified for IsVisible") | |
| 1090 | 1058 | } | |
| 1091 | 1059 | ||
| 1092 | 1060 | var r0 bool | |
| 1093 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 1094 | - | r0 = returnFunc() | |
| 1061 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 1062 | + | r0 = rf() | |
| 1095 | 1063 | } else { | |
| 1096 | 1064 | r0 = ret.Get(0).(bool) | |
| 1097 | 1065 | } | |
| 1066 | + | ||
| 1098 | 1067 | return r0 | |
| 1099 | 1068 | } | |
| 1100 | 1069 | ||
| @@ -1115,8 +1084,8 @@ func (_c *MockPanedWidget_IsVisible_Call) Run(run func()) *MockPanedWidget_IsVis | |||
| 1115 | 1084 | return _c | |
| 1116 | 1085 | } | |
| 1117 | 1086 | ||
| 1118 | - | func (_c *MockPanedWidget_IsVisible_Call) Return(b bool) *MockPanedWidget_IsVisible_Call { | |
| 1119 | - | _c.Call.Return(b) | |
| 1087 | + | func (_c *MockPanedWidget_IsVisible_Call) Return(_a0 bool) *MockPanedWidget_IsVisible_Call { | |
| 1088 | + | _c.Call.Return(_a0) | |
| 1120 | 1089 | return _c | |
| 1121 | 1090 | } | |
| 1122 | 1091 | ||
| @@ -1125,10 +1094,9 @@ func (_c *MockPanedWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockPan | |||
| 1125 | 1094 | return _c | |
| 1126 | 1095 | } | |
| 1127 | 1096 | ||
| 1128 | - | // RemoveCssClass provides a mock function for the type MockPanedWidget | |
| 1129 | - | func (_mock *MockPanedWidget) RemoveCssClass(cssClass string) { | |
| 1130 | - | _mock.Called(cssClass) | |
| 1131 | - | return | |
| 1097 | + | // RemoveCssClass provides a mock function with given fields: cssClass | |
| 1098 | + | func (_m *MockPanedWidget) RemoveCssClass(cssClass string) { | |
| 1099 | + | _m.Called(cssClass) | |
| 1132 | 1100 | } | |
| 1133 | 1101 | ||
| 1134 | 1102 | // MockPanedWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass' | |
| @@ -1144,13 +1112,7 @@ func (_e *MockPanedWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockPa | |||
| 1144 | 1112 | ||
| 1145 | 1113 | func (_c *MockPanedWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockPanedWidget_RemoveCssClass_Call { | |
| 1146 | 1114 | _c.Call.Run(func(args mock.Arguments) { | |
| 1147 | - | var arg0 string | |
| 1148 | - | if args[0] != nil { | |
| 1149 | - | arg0 = args[0].(string) | |
| 1150 | - | } | |
| 1151 | - | run( | |
| 1152 | - | arg0, | |
| 1153 | - | ) | |
| 1115 | + | run(args[0].(string)) | |
| 1154 | 1116 | }) | |
| 1155 | 1117 | return _c | |
| 1156 | 1118 | } | |
| @@ -1160,15 +1122,14 @@ func (_c *MockPanedWidget_RemoveCssClass_Call) Return() *MockPanedWidget_RemoveC | |||
| 1160 | 1122 | return _c | |
| 1161 | 1123 | } | |
| 1162 | 1124 | ||
| 1163 | - | func (_c *MockPanedWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockPanedWidget_RemoveCssClass_Call { | |
| 1125 | + | func (_c *MockPanedWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockPanedWidget_RemoveCssClass_Call { | |
| 1164 | 1126 | _c.Run(run) | |
| 1165 | 1127 | return _c | |
| 1166 | 1128 | } | |
| 1167 | 1129 | ||
| 1168 | - | // SetCanFocus provides a mock function for the type MockPanedWidget | |
| 1169 | - | func (_mock *MockPanedWidget) SetCanFocus(canFocus bool) { | |
| 1170 | - | _mock.Called(canFocus) | |
| 1171 | - | return | |
| 1130 | + | // SetCanFocus provides a mock function with given fields: canFocus | |
| 1131 | + | func (_m *MockPanedWidget) SetCanFocus(canFocus bool) { | |
| 1132 | + | _m.Called(canFocus) | |
| 1172 | 1133 | } | |
| 1173 | 1134 | ||
| 1174 | 1135 | // MockPanedWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus' | |
| @@ -1184,13 +1145,7 @@ func (_e *MockPanedWidget_Expecter) SetCanFocus(canFocus interface{}) *MockPaned | |||
| 1184 | 1145 | ||
| 1185 | 1146 | func (_c *MockPanedWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockPanedWidget_SetCanFocus_Call { | |
| 1186 | 1147 | _c.Call.Run(func(args mock.Arguments) { | |
| 1187 | - | var arg0 bool | |
| 1188 | - | if args[0] != nil { | |
| 1189 | - | arg0 = args[0].(bool) | |
| 1190 | - | } | |
| 1191 | - | run( | |
| 1192 | - | arg0, | |
| 1193 | - | ) | |
| 1148 | + | run(args[0].(bool)) | |
| 1194 | 1149 | }) | |
| 1195 | 1150 | return _c | |
| 1196 | 1151 | } | |
| @@ -1200,15 +1155,14 @@ func (_c *MockPanedWidget_SetCanFocus_Call) Return() *MockPanedWidget_SetCanFocu | |||
| 1200 | 1155 | return _c | |
| 1201 | 1156 | } | |
| 1202 | 1157 | ||
| 1203 | - | func (_c *MockPanedWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockPanedWidget_SetCanFocus_Call { | |
| 1158 | + | func (_c *MockPanedWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetCanFocus_Call { | |
| 1204 | 1159 | _c.Run(run) | |
| 1205 | 1160 | return _c | |
| 1206 | 1161 | } | |
| 1207 | 1162 | ||
| 1208 | - | // SetCanTarget provides a mock function for the type MockPanedWidget | |
| 1209 | - | func (_mock *MockPanedWidget) SetCanTarget(canTarget bool) { | |
| 1210 | - | _mock.Called(canTarget) | |
| 1211 | - | return | |
| 1163 | + | // SetCanTarget provides a mock function with given fields: canTarget | |
| 1164 | + | func (_m *MockPanedWidget) SetCanTarget(canTarget bool) { | |
| 1165 | + | _m.Called(canTarget) | |
| 1212 | 1166 | } | |
| 1213 | 1167 | ||
| 1214 | 1168 | // MockPanedWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget' | |
| @@ -1224,13 +1178,7 @@ func (_e *MockPanedWidget_Expecter) SetCanTarget(canTarget interface{}) *MockPan | |||
| 1224 | 1178 | ||
| 1225 | 1179 | func (_c *MockPanedWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockPanedWidget_SetCanTarget_Call { | |
| 1226 | 1180 | _c.Call.Run(func(args mock.Arguments) { | |
| 1227 | - | var arg0 bool | |
| 1228 | - | if args[0] != nil { | |
| 1229 | - | arg0 = args[0].(bool) | |
| 1230 | - | } | |
| 1231 | - | run( | |
| 1232 | - | arg0, | |
| 1233 | - | ) | |
| 1181 | + | run(args[0].(bool)) | |
| 1234 | 1182 | }) | |
| 1235 | 1183 | return _c | |
| 1236 | 1184 | } | |
| @@ -1240,15 +1188,14 @@ func (_c *MockPanedWidget_SetCanTarget_Call) Return() *MockPanedWidget_SetCanTar | |||
| 1240 | 1188 | return _c | |
| 1241 | 1189 | } | |
| 1242 | 1190 | ||
| 1243 | - | func (_c *MockPanedWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockPanedWidget_SetCanTarget_Call { | |
| 1191 | + | func (_c *MockPanedWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetCanTarget_Call { | |
| 1244 | 1192 | _c.Run(run) | |
| 1245 | 1193 | return _c | |
| 1246 | 1194 | } | |
| 1247 | 1195 | ||
| 1248 | - | // SetEndChild provides a mock function for the type MockPanedWidget | |
| 1249 | - | func (_mock *MockPanedWidget) SetEndChild(child layout.Widget) { | |
| 1250 | - | _mock.Called(child) | |
| 1251 | - | return | |
| 1196 | + | // SetEndChild provides a mock function with given fields: child | |
| 1197 | + | func (_m *MockPanedWidget) SetEndChild(child layout.Widget) { | |
| 1198 | + | _m.Called(child) | |
| 1252 | 1199 | } | |
| 1253 | 1200 | ||
| 1254 | 1201 | // MockPanedWidget_SetEndChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEndChild' | |
| @@ -1264,13 +1211,7 @@ func (_e *MockPanedWidget_Expecter) SetEndChild(child interface{}) *MockPanedWid | |||
| 1264 | 1211 | ||
| 1265 | 1212 | func (_c *MockPanedWidget_SetEndChild_Call) Run(run func(child layout.Widget)) *MockPanedWidget_SetEndChild_Call { | |
| 1266 | 1213 | _c.Call.Run(func(args mock.Arguments) { | |
| 1267 | - | var arg0 layout.Widget | |
| 1268 | - | if args[0] != nil { | |
| 1269 | - | arg0 = args[0].(layout.Widget) | |
| 1270 | - | } | |
| 1271 | - | run( | |
| 1272 | - | arg0, | |
| 1273 | - | ) | |
| 1214 | + | run(args[0].(layout.Widget)) | |
| 1274 | 1215 | }) | |
| 1275 | 1216 | return _c | |
| 1276 | 1217 | } | |
| @@ -1280,15 +1221,14 @@ func (_c *MockPanedWidget_SetEndChild_Call) Return() *MockPanedWidget_SetEndChil | |||
| 1280 | 1221 | return _c | |
| 1281 | 1222 | } | |
| 1282 | 1223 | ||
| 1283 | - | func (_c *MockPanedWidget_SetEndChild_Call) RunAndReturn(run func(child layout.Widget)) *MockPanedWidget_SetEndChild_Call { | |
| 1224 | + | func (_c *MockPanedWidget_SetEndChild_Call) RunAndReturn(run func(layout.Widget)) *MockPanedWidget_SetEndChild_Call { | |
| 1284 | 1225 | _c.Run(run) | |
| 1285 | 1226 | return _c | |
| 1286 | 1227 | } | |
| 1287 | 1228 | ||
| 1288 | - | // SetFocusOnClick provides a mock function for the type MockPanedWidget | |
| 1289 | - | func (_mock *MockPanedWidget) SetFocusOnClick(focusOnClick bool) { | |
| 1290 | - | _mock.Called(focusOnClick) | |
| 1291 | - | return | |
| 1229 | + | // SetFocusOnClick provides a mock function with given fields: focusOnClick | |
| 1230 | + | func (_m *MockPanedWidget) SetFocusOnClick(focusOnClick bool) { | |
| 1231 | + | _m.Called(focusOnClick) | |
| 1292 | 1232 | } | |
| 1293 | 1233 | ||
| 1294 | 1234 | // MockPanedWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick' | |
| @@ -1304,13 +1244,7 @@ func (_e *MockPanedWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *M | |||
| 1304 | 1244 | ||
| 1305 | 1245 | func (_c *MockPanedWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockPanedWidget_SetFocusOnClick_Call { | |
| 1306 | 1246 | _c.Call.Run(func(args mock.Arguments) { | |
| 1307 | - | var arg0 bool | |
| 1308 | - | if args[0] != nil { | |
| 1309 | - | arg0 = args[0].(bool) | |
| 1310 | - | } | |
| 1311 | - | run( | |
| 1312 | - | arg0, | |
| 1313 | - | ) | |
| 1247 | + | run(args[0].(bool)) | |
| 1314 | 1248 | }) | |
| 1315 | 1249 | return _c | |
| 1316 | 1250 | } | |
| @@ -1320,15 +1254,14 @@ func (_c *MockPanedWidget_SetFocusOnClick_Call) Return() *MockPanedWidget_SetFoc | |||
| 1320 | 1254 | return _c | |
| 1321 | 1255 | } | |
| 1322 | 1256 | ||
| 1323 | - | func (_c *MockPanedWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockPanedWidget_SetFocusOnClick_Call { | |
| 1257 | + | func (_c *MockPanedWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetFocusOnClick_Call { | |
| 1324 | 1258 | _c.Run(run) | |
| 1325 | 1259 | return _c | |
| 1326 | 1260 | } | |
| 1327 | 1261 | ||
| 1328 | - | // SetHalign provides a mock function for the type MockPanedWidget | |
| 1329 | - | func (_mock *MockPanedWidget) SetHalign(align gtk.Align) { | |
| 1330 | - | _mock.Called(align) | |
| 1331 | - | return | |
| 1262 | + | // SetHalign provides a mock function with given fields: align | |
| 1263 | + | func (_m *MockPanedWidget) SetHalign(align gtk.Align) { | |
| 1264 | + | _m.Called(align) | |
| 1332 | 1265 | } | |
| 1333 | 1266 | ||
| 1334 | 1267 | // MockPanedWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign' | |
| @@ -1344,13 +1277,7 @@ func (_e *MockPanedWidget_Expecter) SetHalign(align interface{}) *MockPanedWidge | |||
| 1344 | 1277 | ||
| 1345 | 1278 | func (_c *MockPanedWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockPanedWidget_SetHalign_Call { | |
| 1346 | 1279 | _c.Call.Run(func(args mock.Arguments) { | |
| 1347 | - | var arg0 gtk.Align | |
| 1348 | - | if args[0] != nil { | |
| 1349 | - | arg0 = args[0].(gtk.Align) | |
| 1350 | - | } | |
| 1351 | - | run( | |
| 1352 | - | arg0, | |
| 1353 | - | ) | |
| 1280 | + | run(args[0].(gtk.Align)) | |
| 1354 | 1281 | }) | |
| 1355 | 1282 | return _c | |
| 1356 | 1283 | } | |
| @@ -1360,15 +1287,14 @@ func (_c *MockPanedWidget_SetHalign_Call) Return() *MockPanedWidget_SetHalign_Ca | |||
| 1360 | 1287 | return _c | |
| 1361 | 1288 | } | |
| 1362 | 1289 | ||
| 1363 | - | func (_c *MockPanedWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockPanedWidget_SetHalign_Call { | |
| 1290 | + | func (_c *MockPanedWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockPanedWidget_SetHalign_Call { | |
| 1364 | 1291 | _c.Run(run) | |
| 1365 | 1292 | return _c | |
| 1366 | 1293 | } | |
| 1367 | 1294 | ||
| 1368 | - | // SetHexpand provides a mock function for the type MockPanedWidget | |
| 1369 | - | func (_mock *MockPanedWidget) SetHexpand(expand bool) { | |
| 1370 | - | _mock.Called(expand) | |
| 1371 | - | return | |
| 1295 | + | // SetHexpand provides a mock function with given fields: expand | |
| 1296 | + | func (_m *MockPanedWidget) SetHexpand(expand bool) { | |
| 1297 | + | _m.Called(expand) | |
| 1372 | 1298 | } | |
| 1373 | 1299 | ||
| 1374 | 1300 | // MockPanedWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand' | |
| @@ -1384,13 +1310,7 @@ func (_e *MockPanedWidget_Expecter) SetHexpand(expand interface{}) *MockPanedWid | |||
| 1384 | 1310 | ||
| 1385 | 1311 | func (_c *MockPanedWidget_SetHexpand_Call) Run(run func(expand bool)) *MockPanedWidget_SetHexpand_Call { | |
| 1386 | 1312 | _c.Call.Run(func(args mock.Arguments) { | |
| 1387 | - | var arg0 bool | |
| 1388 | - | if args[0] != nil { | |
| 1389 | - | arg0 = args[0].(bool) | |
| 1390 | - | } | |
| 1391 | - | run( | |
| 1392 | - | arg0, | |
| 1393 | - | ) | |
| 1313 | + | run(args[0].(bool)) | |
| 1394 | 1314 | }) | |
| 1395 | 1315 | return _c | |
| 1396 | 1316 | } | |
| @@ -1400,15 +1320,14 @@ func (_c *MockPanedWidget_SetHexpand_Call) Return() *MockPanedWidget_SetHexpand_ | |||
| 1400 | 1320 | return _c | |
| 1401 | 1321 | } | |
| 1402 | 1322 | ||
| 1403 | - | func (_c *MockPanedWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockPanedWidget_SetHexpand_Call { | |
| 1323 | + | func (_c *MockPanedWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetHexpand_Call { | |
| 1404 | 1324 | _c.Run(run) | |
| 1405 | 1325 | return _c | |
| 1406 | 1326 | } | |
| 1407 | 1327 | ||
| 1408 | - | // SetPosition provides a mock function for the type MockPanedWidget | |
| 1409 | - | func (_mock *MockPanedWidget) SetPosition(position int) { | |
| 1410 | - | _mock.Called(position) | |
| 1411 | - | return | |
| 1328 | + | // SetPosition provides a mock function with given fields: position | |
| 1329 | + | func (_m *MockPanedWidget) SetPosition(position int) { | |
| 1330 | + | _m.Called(position) | |
| 1412 | 1331 | } | |
| 1413 | 1332 | ||
| 1414 | 1333 | // MockPanedWidget_SetPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPosition' | |
| @@ -1424,13 +1343,7 @@ func (_e *MockPanedWidget_Expecter) SetPosition(position interface{}) *MockPaned | |||
| 1424 | 1343 | ||
| 1425 | 1344 | func (_c *MockPanedWidget_SetPosition_Call) Run(run func(position int)) *MockPanedWidget_SetPosition_Call { | |
| 1426 | 1345 | _c.Call.Run(func(args mock.Arguments) { | |
| 1427 | - | var arg0 int | |
| 1428 | - | if args[0] != nil { | |
| 1429 | - | arg0 = args[0].(int) | |
| 1430 | - | } | |
| 1431 | - | run( | |
| 1432 | - | arg0, | |
| 1433 | - | ) | |
| 1346 | + | run(args[0].(int)) | |
| 1434 | 1347 | }) | |
| 1435 | 1348 | return _c | |
| 1436 | 1349 | } | |
| @@ -1440,15 +1353,14 @@ func (_c *MockPanedWidget_SetPosition_Call) Return() *MockPanedWidget_SetPositio | |||
| 1440 | 1353 | return _c | |
| 1441 | 1354 | } | |
| 1442 | 1355 | ||
| 1443 | - | func (_c *MockPanedWidget_SetPosition_Call) RunAndReturn(run func(position int)) *MockPanedWidget_SetPosition_Call { | |
| 1356 | + | func (_c *MockPanedWidget_SetPosition_Call) RunAndReturn(run func(int)) *MockPanedWidget_SetPosition_Call { | |
| 1444 | 1357 | _c.Run(run) | |
| 1445 | 1358 | return _c | |
| 1446 | 1359 | } | |
| 1447 | 1360 | ||
| 1448 | - | // SetResizeEndChild provides a mock function for the type MockPanedWidget | |
| 1449 | - | func (_mock *MockPanedWidget) SetResizeEndChild(resize bool) { | |
| 1450 | - | _mock.Called(resize) | |
| 1451 | - | return | |
| 1361 | + | // SetResizeEndChild provides a mock function with given fields: resize | |
| 1362 | + | func (_m *MockPanedWidget) SetResizeEndChild(resize bool) { | |
| 1363 | + | _m.Called(resize) | |
| 1452 | 1364 | } | |
| 1453 | 1365 | ||
| 1454 | 1366 | // MockPanedWidget_SetResizeEndChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetResizeEndChild' | |
| @@ -1464,13 +1376,7 @@ func (_e *MockPanedWidget_Expecter) SetResizeEndChild(resize interface{}) *MockP | |||
| 1464 | 1376 | ||
| 1465 | 1377 | func (_c *MockPanedWidget_SetResizeEndChild_Call) Run(run func(resize bool)) *MockPanedWidget_SetResizeEndChild_Call { | |
| 1466 | 1378 | _c.Call.Run(func(args mock.Arguments) { | |
| 1467 | - | var arg0 bool | |
| 1468 | - | if args[0] != nil { | |
| 1469 | - | arg0 = args[0].(bool) | |
| 1470 | - | } | |
| 1471 | - | run( | |
| 1472 | - | arg0, | |
| 1473 | - | ) | |
| 1379 | + | run(args[0].(bool)) | |
| 1474 | 1380 | }) | |
| 1475 | 1381 | return _c | |
| 1476 | 1382 | } | |
| @@ -1480,15 +1386,14 @@ func (_c *MockPanedWidget_SetResizeEndChild_Call) Return() *MockPanedWidget_SetR | |||
| 1480 | 1386 | return _c | |
| 1481 | 1387 | } | |
| 1482 | 1388 | ||
| 1483 | - | func (_c *MockPanedWidget_SetResizeEndChild_Call) RunAndReturn(run func(resize bool)) *MockPanedWidget_SetResizeEndChild_Call { | |
| 1389 | + | func (_c *MockPanedWidget_SetResizeEndChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetResizeEndChild_Call { | |
| 1484 | 1390 | _c.Run(run) | |
| 1485 | 1391 | return _c | |
| 1486 | 1392 | } | |
| 1487 | 1393 | ||
| 1488 | - | // SetResizeStartChild provides a mock function for the type MockPanedWidget | |
| 1489 | - | func (_mock *MockPanedWidget) SetResizeStartChild(resize bool) { | |
| 1490 | - | _mock.Called(resize) | |
| 1491 | - | return | |
| 1394 | + | // SetResizeStartChild provides a mock function with given fields: resize | |
| 1395 | + | func (_m *MockPanedWidget) SetResizeStartChild(resize bool) { | |
| 1396 | + | _m.Called(resize) | |
| 1492 | 1397 | } | |
| 1493 | 1398 | ||
| 1494 | 1399 | // MockPanedWidget_SetResizeStartChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetResizeStartChild' | |
| @@ -1504,13 +1409,7 @@ func (_e *MockPanedWidget_Expecter) SetResizeStartChild(resize interface{}) *Moc | |||
| 1504 | 1409 | ||
| 1505 | 1410 | func (_c *MockPanedWidget_SetResizeStartChild_Call) Run(run func(resize bool)) *MockPanedWidget_SetResizeStartChild_Call { | |
| 1506 | 1411 | _c.Call.Run(func(args mock.Arguments) { | |
| 1507 | - | var arg0 bool | |
| 1508 | - | if args[0] != nil { | |
| 1509 | - | arg0 = args[0].(bool) | |
| 1510 | - | } | |
| 1511 | - | run( | |
| 1512 | - | arg0, | |
| 1513 | - | ) | |
| 1412 | + | run(args[0].(bool)) | |
| 1514 | 1413 | }) | |
| 1515 | 1414 | return _c | |
| 1516 | 1415 | } | |
| @@ -1520,15 +1419,14 @@ func (_c *MockPanedWidget_SetResizeStartChild_Call) Return() *MockPanedWidget_Se | |||
| 1520 | 1419 | return _c | |
| 1521 | 1420 | } | |
| 1522 | 1421 | ||
| 1523 | - | func (_c *MockPanedWidget_SetResizeStartChild_Call) RunAndReturn(run func(resize bool)) *MockPanedWidget_SetResizeStartChild_Call { | |
| 1422 | + | func (_c *MockPanedWidget_SetResizeStartChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetResizeStartChild_Call { | |
| 1524 | 1423 | _c.Run(run) | |
| 1525 | 1424 | return _c | |
| 1526 | 1425 | } | |
| 1527 | 1426 | ||
| 1528 | - | // SetShrinkEndChild provides a mock function for the type MockPanedWidget | |
| 1529 | - | func (_mock *MockPanedWidget) SetShrinkEndChild(shrink bool) { | |
| 1530 | - | _mock.Called(shrink) | |
| 1531 | - | return | |
| 1427 | + | // SetShrinkEndChild provides a mock function with given fields: shrink | |
| 1428 | + | func (_m *MockPanedWidget) SetShrinkEndChild(shrink bool) { | |
| 1429 | + | _m.Called(shrink) | |
| 1532 | 1430 | } | |
| 1533 | 1431 | ||
| 1534 | 1432 | // MockPanedWidget_SetShrinkEndChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShrinkEndChild' | |
| @@ -1544,13 +1442,7 @@ func (_e *MockPanedWidget_Expecter) SetShrinkEndChild(shrink interface{}) *MockP | |||
| 1544 | 1442 | ||
| 1545 | 1443 | func (_c *MockPanedWidget_SetShrinkEndChild_Call) Run(run func(shrink bool)) *MockPanedWidget_SetShrinkEndChild_Call { | |
| 1546 | 1444 | _c.Call.Run(func(args mock.Arguments) { | |
| 1547 | - | var arg0 bool | |
| 1548 | - | if args[0] != nil { | |
| 1549 | - | arg0 = args[0].(bool) | |
| 1550 | - | } | |
| 1551 | - | run( | |
| 1552 | - | arg0, | |
| 1553 | - | ) | |
| 1445 | + | run(args[0].(bool)) | |
| 1554 | 1446 | }) | |
| 1555 | 1447 | return _c | |
| 1556 | 1448 | } | |
| @@ -1560,15 +1452,14 @@ func (_c *MockPanedWidget_SetShrinkEndChild_Call) Return() *MockPanedWidget_SetS | |||
| 1560 | 1452 | return _c | |
| 1561 | 1453 | } | |
| 1562 | 1454 | ||
| 1563 | - | func (_c *MockPanedWidget_SetShrinkEndChild_Call) RunAndReturn(run func(shrink bool)) *MockPanedWidget_SetShrinkEndChild_Call { | |
| 1455 | + | func (_c *MockPanedWidget_SetShrinkEndChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetShrinkEndChild_Call { | |
| 1564 | 1456 | _c.Run(run) | |
| 1565 | 1457 | return _c | |
| 1566 | 1458 | } | |
| 1567 | 1459 | ||
| 1568 | - | // SetShrinkStartChild provides a mock function for the type MockPanedWidget | |
| 1569 | - | func (_mock *MockPanedWidget) SetShrinkStartChild(shrink bool) { | |
| 1570 | - | _mock.Called(shrink) | |
| 1571 | - | return | |
| 1460 | + | // SetShrinkStartChild provides a mock function with given fields: shrink | |
| 1461 | + | func (_m *MockPanedWidget) SetShrinkStartChild(shrink bool) { | |
| 1462 | + | _m.Called(shrink) | |
| 1572 | 1463 | } | |
| 1573 | 1464 | ||
| 1574 | 1465 | // MockPanedWidget_SetShrinkStartChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShrinkStartChild' | |
| @@ -1584,13 +1475,7 @@ func (_e *MockPanedWidget_Expecter) SetShrinkStartChild(shrink interface{}) *Moc | |||
| 1584 | 1475 | ||
| 1585 | 1476 | func (_c *MockPanedWidget_SetShrinkStartChild_Call) Run(run func(shrink bool)) *MockPanedWidget_SetShrinkStartChild_Call { | |
| 1586 | 1477 | _c.Call.Run(func(args mock.Arguments) { | |
| 1587 | - | var arg0 bool | |
| 1588 | - | if args[0] != nil { | |
| 1589 | - | arg0 = args[0].(bool) | |
| 1590 | - | } | |
| 1591 | - | run( | |
| 1592 | - | arg0, | |
| 1593 | - | ) | |
| 1478 | + | run(args[0].(bool)) | |
| 1594 | 1479 | }) | |
| 1595 | 1480 | return _c | |
| 1596 | 1481 | } | |
| @@ -1600,15 +1485,14 @@ func (_c *MockPanedWidget_SetShrinkStartChild_Call) Return() *MockPanedWidget_Se | |||
| 1600 | 1485 | return _c | |
| 1601 | 1486 | } | |
| 1602 | 1487 | ||
| 1603 | - | func (_c *MockPanedWidget_SetShrinkStartChild_Call) RunAndReturn(run func(shrink bool)) *MockPanedWidget_SetShrinkStartChild_Call { | |
| 1488 | + | func (_c *MockPanedWidget_SetShrinkStartChild_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetShrinkStartChild_Call { | |
| 1604 | 1489 | _c.Run(run) | |
| 1605 | 1490 | return _c | |
| 1606 | 1491 | } | |
| 1607 | 1492 | ||
| 1608 | - | // SetSizeRequest provides a mock function for the type MockPanedWidget | |
| 1609 | - | func (_mock *MockPanedWidget) SetSizeRequest(width int, height int) { | |
| 1610 | - | _mock.Called(width, height) | |
| 1611 | - | return | |
| 1493 | + | // SetSizeRequest provides a mock function with given fields: width, height | |
| 1494 | + | func (_m *MockPanedWidget) SetSizeRequest(width int, height int) { | |
| 1495 | + | _m.Called(width, height) | |
| 1612 | 1496 | } | |
| 1613 | 1497 | ||
| 1614 | 1498 | // MockPanedWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest' | |
| @@ -1625,18 +1509,7 @@ func (_e *MockPanedWidget_Expecter) SetSizeRequest(width interface{}, height int | |||
| 1625 | 1509 | ||
| 1626 | 1510 | func (_c *MockPanedWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockPanedWidget_SetSizeRequest_Call { | |
| 1627 | 1511 | _c.Call.Run(func(args mock.Arguments) { | |
| 1628 | - | var arg0 int | |
| 1629 | - | if args[0] != nil { | |
| 1630 | - | arg0 = args[0].(int) | |
| 1631 | - | } | |
| 1632 | - | var arg1 int | |
| 1633 | - | if args[1] != nil { | |
| 1634 | - | arg1 = args[1].(int) | |
| 1635 | - | } | |
| 1636 | - | run( | |
| 1637 | - | arg0, | |
| 1638 | - | arg1, | |
| 1639 | - | ) | |
| 1512 | + | run(args[0].(int), args[1].(int)) | |
| 1640 | 1513 | }) | |
| 1641 | 1514 | return _c | |
| 1642 | 1515 | } | |
| @@ -1646,15 +1519,14 @@ func (_c *MockPanedWidget_SetSizeRequest_Call) Return() *MockPanedWidget_SetSize | |||
| 1646 | 1519 | return _c | |
| 1647 | 1520 | } | |
| 1648 | 1521 | ||
| 1649 | - | func (_c *MockPanedWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockPanedWidget_SetSizeRequest_Call { | |
| 1522 | + | func (_c *MockPanedWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockPanedWidget_SetSizeRequest_Call { | |
| 1650 | 1523 | _c.Run(run) | |
| 1651 | 1524 | return _c | |
| 1652 | 1525 | } | |
| 1653 | 1526 | ||
| 1654 | - | // SetStartChild provides a mock function for the type MockPanedWidget | |
| 1655 | - | func (_mock *MockPanedWidget) SetStartChild(child layout.Widget) { | |
| 1656 | - | _mock.Called(child) | |
| 1657 | - | return | |
| 1527 | + | // SetStartChild provides a mock function with given fields: child | |
| 1528 | + | func (_m *MockPanedWidget) SetStartChild(child layout.Widget) { | |
| 1529 | + | _m.Called(child) | |
| 1658 | 1530 | } | |
| 1659 | 1531 | ||
| 1660 | 1532 | // MockPanedWidget_SetStartChild_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStartChild' | |
| @@ -1670,13 +1542,7 @@ func (_e *MockPanedWidget_Expecter) SetStartChild(child interface{}) *MockPanedW | |||
| 1670 | 1542 | ||
| 1671 | 1543 | func (_c *MockPanedWidget_SetStartChild_Call) Run(run func(child layout.Widget)) *MockPanedWidget_SetStartChild_Call { | |
| 1672 | 1544 | _c.Call.Run(func(args mock.Arguments) { | |
| 1673 | - | var arg0 layout.Widget | |
| 1674 | - | if args[0] != nil { | |
| 1675 | - | arg0 = args[0].(layout.Widget) | |
| 1676 | - | } | |
| 1677 | - | run( | |
| 1678 | - | arg0, | |
| 1679 | - | ) | |
| 1545 | + | run(args[0].(layout.Widget)) | |
| 1680 | 1546 | }) | |
| 1681 | 1547 | return _c | |
| 1682 | 1548 | } | |
| @@ -1686,15 +1552,14 @@ func (_c *MockPanedWidget_SetStartChild_Call) Return() *MockPanedWidget_SetStart | |||
| 1686 | 1552 | return _c | |
| 1687 | 1553 | } | |
| 1688 | 1554 | ||
| 1689 | - | func (_c *MockPanedWidget_SetStartChild_Call) RunAndReturn(run func(child layout.Widget)) *MockPanedWidget_SetStartChild_Call { | |
| 1555 | + | func (_c *MockPanedWidget_SetStartChild_Call) RunAndReturn(run func(layout.Widget)) *MockPanedWidget_SetStartChild_Call { | |
| 1690 | 1556 | _c.Run(run) | |
| 1691 | 1557 | return _c | |
| 1692 | 1558 | } | |
| 1693 | 1559 | ||
| 1694 | - | // SetValign provides a mock function for the type MockPanedWidget | |
| 1695 | - | func (_mock *MockPanedWidget) SetValign(align gtk.Align) { | |
| 1696 | - | _mock.Called(align) | |
| 1697 | - | return | |
| 1560 | + | // SetValign provides a mock function with given fields: align | |
| 1561 | + | func (_m *MockPanedWidget) SetValign(align gtk.Align) { | |
| 1562 | + | _m.Called(align) | |
| 1698 | 1563 | } | |
| 1699 | 1564 | ||
| 1700 | 1565 | // MockPanedWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign' | |
| @@ -1710,13 +1575,7 @@ func (_e *MockPanedWidget_Expecter) SetValign(align interface{}) *MockPanedWidge | |||
| 1710 | 1575 | ||
| 1711 | 1576 | func (_c *MockPanedWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockPanedWidget_SetValign_Call { | |
| 1712 | 1577 | _c.Call.Run(func(args mock.Arguments) { | |
| 1713 | - | var arg0 gtk.Align | |
| 1714 | - | if args[0] != nil { | |
| 1715 | - | arg0 = args[0].(gtk.Align) | |
| 1716 | - | } | |
| 1717 | - | run( | |
| 1718 | - | arg0, | |
| 1719 | - | ) | |
| 1578 | + | run(args[0].(gtk.Align)) | |
| 1720 | 1579 | }) | |
| 1721 | 1580 | return _c | |
| 1722 | 1581 | } | |
| @@ -1726,15 +1585,14 @@ func (_c *MockPanedWidget_SetValign_Call) Return() *MockPanedWidget_SetValign_Ca | |||
| 1726 | 1585 | return _c | |
| 1727 | 1586 | } | |
| 1728 | 1587 | ||
| 1729 | - | func (_c *MockPanedWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockPanedWidget_SetValign_Call { | |
| 1588 | + | func (_c *MockPanedWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockPanedWidget_SetValign_Call { | |
| 1730 | 1589 | _c.Run(run) | |
| 1731 | 1590 | return _c | |
| 1732 | 1591 | } | |
| 1733 | 1592 | ||
| 1734 | - | // SetVexpand provides a mock function for the type MockPanedWidget | |
| 1735 | - | func (_mock *MockPanedWidget) SetVexpand(expand bool) { | |
| 1736 | - | _mock.Called(expand) | |
| 1737 | - | return | |
| 1593 | + | // SetVexpand provides a mock function with given fields: expand | |
| 1594 | + | func (_m *MockPanedWidget) SetVexpand(expand bool) { | |
| 1595 | + | _m.Called(expand) | |
| 1738 | 1596 | } | |
| 1739 | 1597 | ||
| 1740 | 1598 | // MockPanedWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand' | |
| @@ -1750,13 +1608,7 @@ func (_e *MockPanedWidget_Expecter) SetVexpand(expand interface{}) *MockPanedWid | |||
| 1750 | 1608 | ||
| 1751 | 1609 | func (_c *MockPanedWidget_SetVexpand_Call) Run(run func(expand bool)) *MockPanedWidget_SetVexpand_Call { | |
| 1752 | 1610 | _c.Call.Run(func(args mock.Arguments) { | |
| 1753 | - | var arg0 bool | |
| 1754 | - | if args[0] != nil { | |
| 1755 | - | arg0 = args[0].(bool) | |
| 1756 | - | } | |
| 1757 | - | run( | |
| 1758 | - | arg0, | |
| 1759 | - | ) | |
| 1611 | + | run(args[0].(bool)) | |
| 1760 | 1612 | }) | |
| 1761 | 1613 | return _c | |
| 1762 | 1614 | } | |
| @@ -1766,15 +1618,14 @@ func (_c *MockPanedWidget_SetVexpand_Call) Return() *MockPanedWidget_SetVexpand_ | |||
| 1766 | 1618 | return _c | |
| 1767 | 1619 | } | |
| 1768 | 1620 | ||
| 1769 | - | func (_c *MockPanedWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockPanedWidget_SetVexpand_Call { | |
| 1621 | + | func (_c *MockPanedWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetVexpand_Call { | |
| 1770 | 1622 | _c.Run(run) | |
| 1771 | 1623 | return _c | |
| 1772 | 1624 | } | |
| 1773 | 1625 | ||
| 1774 | - | // SetVisible provides a mock function for the type MockPanedWidget | |
| 1775 | - | func (_mock *MockPanedWidget) SetVisible(visible bool) { | |
| 1776 | - | _mock.Called(visible) | |
| 1777 | - | return | |
| 1626 | + | // SetVisible provides a mock function with given fields: visible | |
| 1627 | + | func (_m *MockPanedWidget) SetVisible(visible bool) { | |
| 1628 | + | _m.Called(visible) | |
| 1778 | 1629 | } | |
| 1779 | 1630 | ||
| 1780 | 1631 | // MockPanedWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible' | |
| @@ -1790,13 +1641,7 @@ func (_e *MockPanedWidget_Expecter) SetVisible(visible interface{}) *MockPanedWi | |||
| 1790 | 1641 | ||
| 1791 | 1642 | func (_c *MockPanedWidget_SetVisible_Call) Run(run func(visible bool)) *MockPanedWidget_SetVisible_Call { | |
| 1792 | 1643 | _c.Call.Run(func(args mock.Arguments) { | |
| 1793 | - | var arg0 bool | |
| 1794 | - | if args[0] != nil { | |
| 1795 | - | arg0 = args[0].(bool) | |
| 1796 | - | } | |
| 1797 | - | run( | |
| 1798 | - | arg0, | |
| 1799 | - | ) | |
| 1644 | + | run(args[0].(bool)) | |
| 1800 | 1645 | }) | |
| 1801 | 1646 | return _c | |
| 1802 | 1647 | } | |
| @@ -1806,15 +1651,14 @@ func (_c *MockPanedWidget_SetVisible_Call) Return() *MockPanedWidget_SetVisible_ | |||
| 1806 | 1651 | return _c | |
| 1807 | 1652 | } | |
| 1808 | 1653 | ||
| 1809 | - | func (_c *MockPanedWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockPanedWidget_SetVisible_Call { | |
| 1654 | + | func (_c *MockPanedWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetVisible_Call { | |
| 1810 | 1655 | _c.Run(run) | |
| 1811 | 1656 | return _c | |
| 1812 | 1657 | } | |
| 1813 | 1658 | ||
| 1814 | - | // SetWideHandle provides a mock function for the type MockPanedWidget | |
| 1815 | - | func (_mock *MockPanedWidget) SetWideHandle(wide bool) { | |
| 1816 | - | _mock.Called(wide) | |
| 1817 | - | return | |
| 1659 | + | // SetWideHandle provides a mock function with given fields: wide | |
| 1660 | + | func (_m *MockPanedWidget) SetWideHandle(wide bool) { | |
| 1661 | + | _m.Called(wide) | |
| 1818 | 1662 | } | |
| 1819 | 1663 | ||
| 1820 | 1664 | // MockPanedWidget_SetWideHandle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWideHandle' | |
| @@ -1830,13 +1674,7 @@ func (_e *MockPanedWidget_Expecter) SetWideHandle(wide interface{}) *MockPanedWi | |||
| 1830 | 1674 | ||
| 1831 | 1675 | func (_c *MockPanedWidget_SetWideHandle_Call) Run(run func(wide bool)) *MockPanedWidget_SetWideHandle_Call { | |
| 1832 | 1676 | _c.Call.Run(func(args mock.Arguments) { | |
| 1833 | - | var arg0 bool | |
| 1834 | - | if args[0] != nil { | |
| 1835 | - | arg0 = args[0].(bool) | |
| 1836 | - | } | |
| 1837 | - | run( | |
| 1838 | - | arg0, | |
| 1839 | - | ) | |
| 1677 | + | run(args[0].(bool)) | |
| 1840 | 1678 | }) | |
| 1841 | 1679 | return _c | |
| 1842 | 1680 | } | |
| @@ -1846,15 +1684,14 @@ func (_c *MockPanedWidget_SetWideHandle_Call) Return() *MockPanedWidget_SetWideH | |||
| 1846 | 1684 | return _c | |
| 1847 | 1685 | } | |
| 1848 | 1686 | ||
| 1849 | - | func (_c *MockPanedWidget_SetWideHandle_Call) RunAndReturn(run func(wide bool)) *MockPanedWidget_SetWideHandle_Call { | |
| 1687 | + | func (_c *MockPanedWidget_SetWideHandle_Call) RunAndReturn(run func(bool)) *MockPanedWidget_SetWideHandle_Call { | |
| 1850 | 1688 | _c.Run(run) | |
| 1851 | 1689 | return _c | |
| 1852 | 1690 | } | |
| 1853 | 1691 | ||
| 1854 | - | // Show provides a mock function for the type MockPanedWidget | |
| 1855 | - | func (_mock *MockPanedWidget) Show() { | |
| 1856 | - | _mock.Called() | |
| 1857 | - | return | |
| 1692 | + | // Show provides a mock function with no fields | |
| 1693 | + | func (_m *MockPanedWidget) Show() { | |
| 1694 | + | _m.Called() | |
| 1858 | 1695 | } | |
| 1859 | 1696 | ||
| 1860 | 1697 | // MockPanedWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |
| @@ -1884,10 +1721,9 @@ func (_c *MockPanedWidget_Show_Call) RunAndReturn(run func()) *MockPanedWidget_S | |||
| 1884 | 1721 | return _c | |
| 1885 | 1722 | } | |
| 1886 | 1723 | ||
| 1887 | - | // Unparent provides a mock function for the type MockPanedWidget | |
| 1888 | - | func (_mock *MockPanedWidget) Unparent() { | |
| 1889 | - | _mock.Called() | |
| 1890 | - | return | |
| 1724 | + | // Unparent provides a mock function with no fields | |
| 1725 | + | func (_m *MockPanedWidget) Unparent() { | |
| 1726 | + | _m.Called() | |
| 1891 | 1727 | } | |
| 1892 | 1728 | ||
| 1893 | 1729 | // MockPanedWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent' | |
| @@ -1916,3 +1752,17 @@ func (_c *MockPanedWidget_Unparent_Call) RunAndReturn(run func()) *MockPanedWidg | |||
| 1916 | 1752 | _c.Run(run) | |
| 1917 | 1753 | return _c | |
| 1918 | 1754 | } | |
| 1755 | + | ||
| 1756 | + | // NewMockPanedWidget creates a new instance of MockPanedWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 1757 | + | // The first argument is typically a *testing.T value. | |
| 1758 | + | func NewMockPanedWidget(t interface { | |
| 1759 | + | mock.TestingT | |
| 1760 | + | Cleanup(func()) | |
| 1761 | + | }) *MockPanedWidget { | |
| 1762 | + | mock := &MockPanedWidget{} | |
| 1763 | + | mock.Mock.Test(t) | |
| 1764 | + | ||
| 1765 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 1766 | + | ||
| 1767 | + | return mock | |
| 1768 | + | } | |
M internal/ui/layout/mocks/mock_widget.go +185 -277
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockWidget creates a new instance of MockWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockWidget(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockWidget { | |
| 19 | - | mock := &MockWidget{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockWidget is an autogenerated mock type for the Widget type | |
| 28 | 13 | type MockWidget struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,10 +22,9 @@ func (_m *MockWidget) EXPECT() *MockWidget_Expecter { | |||
| 37 | 22 | return &MockWidget_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // AddController provides a mock function for the type MockWidget | |
| 41 | - | func (_mock *MockWidget) AddController(controller *gtk.EventController) { | |
| 42 | - | _mock.Called(controller) | |
| 43 | - | return | |
| 25 | + | // AddController provides a mock function with given fields: controller | |
| 26 | + | func (_m *MockWidget) AddController(controller *gtk.EventController) { | |
| 27 | + | _m.Called(controller) | |
| 44 | 28 | } | |
| 45 | 29 | ||
| 46 | 30 | // MockWidget_AddController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddController' | |
| @@ -56,13 +40,7 @@ func (_e *MockWidget_Expecter) AddController(controller interface{}) *MockWidget | |||
| 56 | 40 | ||
| 57 | 41 | func (_c *MockWidget_AddController_Call) Run(run func(controller *gtk.EventController)) *MockWidget_AddController_Call { | |
| 58 | 42 | _c.Call.Run(func(args mock.Arguments) { | |
| 59 | - | var arg0 *gtk.EventController | |
| 60 | - | if args[0] != nil { | |
| 61 | - | arg0 = args[0].(*gtk.EventController) | |
| 62 | - | } | |
| 63 | - | run( | |
| 64 | - | arg0, | |
| 65 | - | ) | |
| 43 | + | run(args[0].(*gtk.EventController)) | |
| 66 | 44 | }) | |
| 67 | 45 | return _c | |
| 68 | 46 | } | |
| @@ -72,15 +50,14 @@ func (_c *MockWidget_AddController_Call) Return() *MockWidget_AddController_Call | |||
| 72 | 50 | return _c | |
| 73 | 51 | } | |
| 74 | 52 | ||
| 75 | - | func (_c *MockWidget_AddController_Call) RunAndReturn(run func(controller *gtk.EventController)) *MockWidget_AddController_Call { | |
| 53 | + | func (_c *MockWidget_AddController_Call) RunAndReturn(run func(*gtk.EventController)) *MockWidget_AddController_Call { | |
| 76 | 54 | _c.Run(run) | |
| 77 | 55 | return _c | |
| 78 | 56 | } | |
| 79 | 57 | ||
| 80 | - | // AddCssClass provides a mock function for the type MockWidget | |
| 81 | - | func (_mock *MockWidget) AddCssClass(cssClass string) { | |
| 82 | - | _mock.Called(cssClass) | |
| 83 | - | return | |
| 58 | + | // AddCssClass provides a mock function with given fields: cssClass | |
| 59 | + | func (_m *MockWidget) AddCssClass(cssClass string) { | |
| 60 | + | _m.Called(cssClass) | |
| 84 | 61 | } | |
| 85 | 62 | ||
| 86 | 63 | // MockWidget_AddCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCssClass' | |
| @@ -96,13 +73,7 @@ func (_e *MockWidget_Expecter) AddCssClass(cssClass interface{}) *MockWidget_Add | |||
| 96 | 73 | ||
| 97 | 74 | func (_c *MockWidget_AddCssClass_Call) Run(run func(cssClass string)) *MockWidget_AddCssClass_Call { | |
| 98 | 75 | _c.Call.Run(func(args mock.Arguments) { | |
| 99 | - | var arg0 string | |
| 100 | - | if args[0] != nil { | |
| 101 | - | arg0 = args[0].(string) | |
| 102 | - | } | |
| 103 | - | run( | |
| 104 | - | arg0, | |
| 105 | - | ) | |
| 76 | + | run(args[0].(string)) | |
| 106 | 77 | }) | |
| 107 | 78 | return _c | |
| 108 | 79 | } | |
| @@ -112,14 +83,14 @@ func (_c *MockWidget_AddCssClass_Call) Return() *MockWidget_AddCssClass_Call { | |||
| 112 | 83 | return _c | |
| 113 | 84 | } | |
| 114 | 85 | ||
| 115 | - | func (_c *MockWidget_AddCssClass_Call) RunAndReturn(run func(cssClass string)) *MockWidget_AddCssClass_Call { | |
| 86 | + | func (_c *MockWidget_AddCssClass_Call) RunAndReturn(run func(string)) *MockWidget_AddCssClass_Call { | |
| 116 | 87 | _c.Run(run) | |
| 117 | 88 | return _c | |
| 118 | 89 | } | |
| 119 | 90 | ||
| 120 | - | // ComputePoint provides a mock function for the type MockWidget | |
| 121 | - | func (_mock *MockWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 122 | - | ret := _mock.Called(target) | |
| 91 | + | // ComputePoint provides a mock function with given fields: target | |
| 92 | + | func (_m *MockWidget) ComputePoint(target layout.Widget) (float64, float64, bool) { | |
| 93 | + | ret := _m.Called(target) | |
| 123 | 94 | ||
| 124 | 95 | if len(ret) == 0 { | |
| 125 | 96 | panic("no return value specified for ComputePoint") | |
| @@ -128,24 +99,27 @@ func (_mock *MockWidget) ComputePoint(target layout.Widget) (float64, float64, b | |||
| 128 | 99 | var r0 float64 | |
| 129 | 100 | var r1 float64 | |
| 130 | 101 | var r2 bool | |
| 131 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 132 | - | return returnFunc(target) | |
| 102 | + | if rf, ok := ret.Get(0).(func(layout.Widget) (float64, float64, bool)); ok { | |
| 103 | + | return rf(target) | |
| 133 | 104 | } | |
| 134 | - | if returnFunc, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 135 | - | r0 = returnFunc(target) | |
| 105 | + | if rf, ok := ret.Get(0).(func(layout.Widget) float64); ok { | |
| 106 | + | r0 = rf(target) | |
| 136 | 107 | } else { | |
| 137 | 108 | r0 = ret.Get(0).(float64) | |
| 138 | 109 | } | |
| 139 | - | if returnFunc, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 140 | - | r1 = returnFunc(target) | |
| 110 | + | ||
| 111 | + | if rf, ok := ret.Get(1).(func(layout.Widget) float64); ok { | |
| 112 | + | r1 = rf(target) | |
| 141 | 113 | } else { | |
| 142 | 114 | r1 = ret.Get(1).(float64) | |
| 143 | 115 | } | |
| 144 | - | if returnFunc, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 145 | - | r2 = returnFunc(target) | |
| 116 | + | ||
| 117 | + | if rf, ok := ret.Get(2).(func(layout.Widget) bool); ok { | |
| 118 | + | r2 = rf(target) | |
| 146 | 119 | } else { | |
| 147 | 120 | r2 = ret.Get(2).(bool) | |
| 148 | 121 | } | |
| 122 | + | ||
| 149 | 123 | return r0, r1, r2 | |
| 150 | 124 | } | |
| 151 | 125 | ||
| @@ -162,13 +136,7 @@ func (_e *MockWidget_Expecter) ComputePoint(target interface{}) *MockWidget_Comp | |||
| 162 | 136 | ||
| 163 | 137 | func (_c *MockWidget_ComputePoint_Call) Run(run func(target layout.Widget)) *MockWidget_ComputePoint_Call { | |
| 164 | 138 | _c.Call.Run(func(args mock.Arguments) { | |
| 165 | - | var arg0 layout.Widget | |
| 166 | - | if args[0] != nil { | |
| 167 | - | arg0 = args[0].(layout.Widget) | |
| 168 | - | } | |
| 169 | - | run( | |
| 170 | - | arg0, | |
| 171 | - | ) | |
| 139 | + | run(args[0].(layout.Widget)) | |
| 172 | 140 | }) | |
| 173 | 141 | return _c | |
| 174 | 142 | } | |
| @@ -178,25 +146,26 @@ func (_c *MockWidget_ComputePoint_Call) Return(x float64, y float64, ok bool) *M | |||
| 178 | 146 | return _c | |
| 179 | 147 | } | |
| 180 | 148 | ||
| 181 | - | func (_c *MockWidget_ComputePoint_Call) RunAndReturn(run func(target layout.Widget) (float64, float64, bool)) *MockWidget_ComputePoint_Call { | |
| 149 | + | func (_c *MockWidget_ComputePoint_Call) RunAndReturn(run func(layout.Widget) (float64, float64, bool)) *MockWidget_ComputePoint_Call { | |
| 182 | 150 | _c.Call.Return(run) | |
| 183 | 151 | return _c | |
| 184 | 152 | } | |
| 185 | 153 | ||
| 186 | - | // GetAllocatedHeight provides a mock function for the type MockWidget | |
| 187 | - | func (_mock *MockWidget) GetAllocatedHeight() int { | |
| 188 | - | ret := _mock.Called() | |
| 154 | + | // GetAllocatedHeight provides a mock function with no fields | |
| 155 | + | func (_m *MockWidget) GetAllocatedHeight() int { | |
| 156 | + | ret := _m.Called() | |
| 189 | 157 | ||
| 190 | 158 | if len(ret) == 0 { | |
| 191 | 159 | panic("no return value specified for GetAllocatedHeight") | |
| 192 | 160 | } | |
| 193 | 161 | ||
| 194 | 162 | var r0 int | |
| 195 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 196 | - | r0 = returnFunc() | |
| 163 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 164 | + | r0 = rf() | |
| 197 | 165 | } else { | |
| 198 | 166 | r0 = ret.Get(0).(int) | |
| 199 | 167 | } | |
| 168 | + | ||
| 200 | 169 | return r0 | |
| 201 | 170 | } | |
| 202 | 171 | ||
| @@ -217,8 +186,8 @@ func (_c *MockWidget_GetAllocatedHeight_Call) Run(run func()) *MockWidget_GetAll | |||
| 217 | 186 | return _c | |
| 218 | 187 | } | |
| 219 | 188 | ||
| 220 | - | func (_c *MockWidget_GetAllocatedHeight_Call) Return(n int) *MockWidget_GetAllocatedHeight_Call { | |
| 221 | - | _c.Call.Return(n) | |
| 189 | + | func (_c *MockWidget_GetAllocatedHeight_Call) Return(_a0 int) *MockWidget_GetAllocatedHeight_Call { | |
| 190 | + | _c.Call.Return(_a0) | |
| 222 | 191 | return _c | |
| 223 | 192 | } | |
| 224 | 193 | ||
| @@ -227,20 +196,21 @@ func (_c *MockWidget_GetAllocatedHeight_Call) RunAndReturn(run func() int) *Mock | |||
| 227 | 196 | return _c | |
| 228 | 197 | } | |
| 229 | 198 | ||
| 230 | - | // GetAllocatedWidth provides a mock function for the type MockWidget | |
| 231 | - | func (_mock *MockWidget) GetAllocatedWidth() int { | |
| 232 | - | ret := _mock.Called() | |
| 199 | + | // GetAllocatedWidth provides a mock function with no fields | |
| 200 | + | func (_m *MockWidget) GetAllocatedWidth() int { | |
| 201 | + | ret := _m.Called() | |
| 233 | 202 | ||
| 234 | 203 | if len(ret) == 0 { | |
| 235 | 204 | panic("no return value specified for GetAllocatedWidth") | |
| 236 | 205 | } | |
| 237 | 206 | ||
| 238 | 207 | var r0 int | |
| 239 | - | if returnFunc, ok := ret.Get(0).(func() int); ok { | |
| 240 | - | r0 = returnFunc() | |
| 208 | + | if rf, ok := ret.Get(0).(func() int); ok { | |
| 209 | + | r0 = rf() | |
| 241 | 210 | } else { | |
| 242 | 211 | r0 = ret.Get(0).(int) | |
| 243 | 212 | } | |
| 213 | + | ||
| 244 | 214 | return r0 | |
| 245 | 215 | } | |
| 246 | 216 | ||
| @@ -261,8 +231,8 @@ func (_c *MockWidget_GetAllocatedWidth_Call) Run(run func()) *MockWidget_GetAllo | |||
| 261 | 231 | return _c | |
| 262 | 232 | } | |
| 263 | 233 | ||
| 264 | - | func (_c *MockWidget_GetAllocatedWidth_Call) Return(n int) *MockWidget_GetAllocatedWidth_Call { | |
| 265 | - | _c.Call.Return(n) | |
| 234 | + | func (_c *MockWidget_GetAllocatedWidth_Call) Return(_a0 int) *MockWidget_GetAllocatedWidth_Call { | |
| 235 | + | _c.Call.Return(_a0) | |
| 266 | 236 | return _c | |
| 267 | 237 | } | |
| 268 | 238 | ||
| @@ -271,20 +241,21 @@ func (_c *MockWidget_GetAllocatedWidth_Call) RunAndReturn(run func() int) *MockW | |||
| 271 | 241 | return _c | |
| 272 | 242 | } | |
| 273 | 243 | ||
| 274 | - | // GetHexpand provides a mock function for the type MockWidget | |
| 275 | - | func (_mock *MockWidget) GetHexpand() bool { | |
| 276 | - | ret := _mock.Called() | |
| 244 | + | // GetHexpand provides a mock function with no fields | |
| 245 | + | func (_m *MockWidget) GetHexpand() bool { | |
| 246 | + | ret := _m.Called() | |
| 277 | 247 | ||
| 278 | 248 | if len(ret) == 0 { | |
| 279 | 249 | panic("no return value specified for GetHexpand") | |
| 280 | 250 | } | |
| 281 | 251 | ||
| 282 | 252 | var r0 bool | |
| 283 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 284 | - | r0 = returnFunc() | |
| 253 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 254 | + | r0 = rf() | |
| 285 | 255 | } else { | |
| 286 | 256 | r0 = ret.Get(0).(bool) | |
| 287 | 257 | } | |
| 258 | + | ||
| 288 | 259 | return r0 | |
| 289 | 260 | } | |
| 290 | 261 | ||
| @@ -305,8 +276,8 @@ func (_c *MockWidget_GetHexpand_Call) Run(run func()) *MockWidget_GetHexpand_Cal | |||
| 305 | 276 | return _c | |
| 306 | 277 | } | |
| 307 | 278 | ||
| 308 | - | func (_c *MockWidget_GetHexpand_Call) Return(b bool) *MockWidget_GetHexpand_Call { | |
| 309 | - | _c.Call.Return(b) | |
| 279 | + | func (_c *MockWidget_GetHexpand_Call) Return(_a0 bool) *MockWidget_GetHexpand_Call { | |
| 280 | + | _c.Call.Return(_a0) | |
| 310 | 281 | return _c | |
| 311 | 282 | } | |
| 312 | 283 | ||
| @@ -315,22 +286,23 @@ func (_c *MockWidget_GetHexpand_Call) RunAndReturn(run func() bool) *MockWidget_ | |||
| 315 | 286 | return _c | |
| 316 | 287 | } | |
| 317 | 288 | ||
| 318 | - | // GetParent provides a mock function for the type MockWidget | |
| 319 | - | func (_mock *MockWidget) GetParent() layout.Widget { | |
| 320 | - | ret := _mock.Called() | |
| 289 | + | // GetParent provides a mock function with no fields | |
| 290 | + | func (_m *MockWidget) GetParent() layout.Widget { | |
| 291 | + | ret := _m.Called() | |
| 321 | 292 | ||
| 322 | 293 | if len(ret) == 0 { | |
| 323 | 294 | panic("no return value specified for GetParent") | |
| 324 | 295 | } | |
| 325 | 296 | ||
| 326 | 297 | var r0 layout.Widget | |
| 327 | - | if returnFunc, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 328 | - | r0 = returnFunc() | |
| 298 | + | if rf, ok := ret.Get(0).(func() layout.Widget); ok { | |
| 299 | + | r0 = rf() | |
| 329 | 300 | } else { | |
| 330 | 301 | if ret.Get(0) != nil { | |
| 331 | 302 | r0 = ret.Get(0).(layout.Widget) | |
| 332 | 303 | } | |
| 333 | 304 | } | |
| 305 | + | ||
| 334 | 306 | return r0 | |
| 335 | 307 | } | |
| 336 | 308 | ||
| @@ -351,8 +323,8 @@ func (_c *MockWidget_GetParent_Call) Run(run func()) *MockWidget_GetParent_Call | |||
| 351 | 323 | return _c | |
| 352 | 324 | } | |
| 353 | 325 | ||
| 354 | - | func (_c *MockWidget_GetParent_Call) Return(widget layout.Widget) *MockWidget_GetParent_Call { | |
| 355 | - | _c.Call.Return(widget) | |
| 326 | + | func (_c *MockWidget_GetParent_Call) Return(_a0 layout.Widget) *MockWidget_GetParent_Call { | |
| 327 | + | _c.Call.Return(_a0) | |
| 356 | 328 | return _c | |
| 357 | 329 | } | |
| 358 | 330 | ||
| @@ -361,20 +333,21 @@ func (_c *MockWidget_GetParent_Call) RunAndReturn(run func() layout.Widget) *Moc | |||
| 361 | 333 | return _c | |
| 362 | 334 | } | |
| 363 | 335 | ||
| 364 | - | // GetVexpand provides a mock function for the type MockWidget | |
| 365 | - | func (_mock *MockWidget) GetVexpand() bool { | |
| 366 | - | ret := _mock.Called() | |
| 336 | + | // GetVexpand provides a mock function with no fields | |
| 337 | + | func (_m *MockWidget) GetVexpand() bool { | |
| 338 | + | ret := _m.Called() | |
| 367 | 339 | ||
| 368 | 340 | if len(ret) == 0 { | |
| 369 | 341 | panic("no return value specified for GetVexpand") | |
| 370 | 342 | } | |
| 371 | 343 | ||
| 372 | 344 | var r0 bool | |
| 373 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 374 | - | r0 = returnFunc() | |
| 345 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 346 | + | r0 = rf() | |
| 375 | 347 | } else { | |
| 376 | 348 | r0 = ret.Get(0).(bool) | |
| 377 | 349 | } | |
| 350 | + | ||
| 378 | 351 | return r0 | |
| 379 | 352 | } | |
| 380 | 353 | ||
| @@ -395,8 +368,8 @@ func (_c *MockWidget_GetVexpand_Call) Run(run func()) *MockWidget_GetVexpand_Cal | |||
| 395 | 368 | return _c | |
| 396 | 369 | } | |
| 397 | 370 | ||
| 398 | - | func (_c *MockWidget_GetVexpand_Call) Return(b bool) *MockWidget_GetVexpand_Call { | |
| 399 | - | _c.Call.Return(b) | |
| 371 | + | func (_c *MockWidget_GetVexpand_Call) Return(_a0 bool) *MockWidget_GetVexpand_Call { | |
| 372 | + | _c.Call.Return(_a0) | |
| 400 | 373 | return _c | |
| 401 | 374 | } | |
| 402 | 375 | ||
| @@ -405,20 +378,21 @@ func (_c *MockWidget_GetVexpand_Call) RunAndReturn(run func() bool) *MockWidget_ | |||
| 405 | 378 | return _c | |
| 406 | 379 | } | |
| 407 | 380 | ||
| 408 | - | // GrabFocus provides a mock function for the type MockWidget | |
| 409 | - | func (_mock *MockWidget) GrabFocus() bool { | |
| 410 | - | ret := _mock.Called() | |
| 381 | + | // GrabFocus provides a mock function with no fields | |
| 382 | + | func (_m *MockWidget) GrabFocus() bool { | |
| 383 | + | ret := _m.Called() | |
| 411 | 384 | ||
| 412 | 385 | if len(ret) == 0 { | |
| 413 | 386 | panic("no return value specified for GrabFocus") | |
| 414 | 387 | } | |
| 415 | 388 | ||
| 416 | 389 | var r0 bool | |
| 417 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 418 | - | r0 = returnFunc() | |
| 390 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 391 | + | r0 = rf() | |
| 419 | 392 | } else { | |
| 420 | 393 | r0 = ret.Get(0).(bool) | |
| 421 | 394 | } | |
| 395 | + | ||
| 422 | 396 | return r0 | |
| 423 | 397 | } | |
| 424 | 398 | ||
| @@ -439,8 +413,8 @@ func (_c *MockWidget_GrabFocus_Call) Run(run func()) *MockWidget_GrabFocus_Call | |||
| 439 | 413 | return _c | |
| 440 | 414 | } | |
| 441 | 415 | ||
| 442 | - | func (_c *MockWidget_GrabFocus_Call) Return(b bool) *MockWidget_GrabFocus_Call { | |
| 443 | - | _c.Call.Return(b) | |
| 416 | + | func (_c *MockWidget_GrabFocus_Call) Return(_a0 bool) *MockWidget_GrabFocus_Call { | |
| 417 | + | _c.Call.Return(_a0) | |
| 444 | 418 | return _c | |
| 445 | 419 | } | |
| 446 | 420 | ||
| @@ -449,22 +423,23 @@ func (_c *MockWidget_GrabFocus_Call) RunAndReturn(run func() bool) *MockWidget_G | |||
| 449 | 423 | return _c | |
| 450 | 424 | } | |
| 451 | 425 | ||
| 452 | - | // GtkWidget provides a mock function for the type MockWidget | |
| 453 | - | func (_mock *MockWidget) GtkWidget() *gtk.Widget { | |
| 454 | - | ret := _mock.Called() | |
| 426 | + | // GtkWidget provides a mock function with no fields | |
| 427 | + | func (_m *MockWidget) GtkWidget() *gtk.Widget { | |
| 428 | + | ret := _m.Called() | |
| 455 | 429 | ||
| 456 | 430 | if len(ret) == 0 { | |
| 457 | 431 | panic("no return value specified for GtkWidget") | |
| 458 | 432 | } | |
| 459 | 433 | ||
| 460 | 434 | var r0 *gtk.Widget | |
| 461 | - | if returnFunc, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 462 | - | r0 = returnFunc() | |
| 435 | + | if rf, ok := ret.Get(0).(func() *gtk.Widget); ok { | |
| 436 | + | r0 = rf() | |
| 463 | 437 | } else { | |
| 464 | 438 | if ret.Get(0) != nil { | |
| 465 | 439 | r0 = ret.Get(0).(*gtk.Widget) | |
| 466 | 440 | } | |
| 467 | 441 | } | |
| 442 | + | ||
| 468 | 443 | return r0 | |
| 469 | 444 | } | |
| 470 | 445 | ||
| @@ -485,8 +460,8 @@ func (_c *MockWidget_GtkWidget_Call) Run(run func()) *MockWidget_GtkWidget_Call | |||
| 485 | 460 | return _c | |
| 486 | 461 | } | |
| 487 | 462 | ||
| 488 | - | func (_c *MockWidget_GtkWidget_Call) Return(widget *gtk.Widget) *MockWidget_GtkWidget_Call { | |
| 489 | - | _c.Call.Return(widget) | |
| 463 | + | func (_c *MockWidget_GtkWidget_Call) Return(_a0 *gtk.Widget) *MockWidget_GtkWidget_Call { | |
| 464 | + | _c.Call.Return(_a0) | |
| 490 | 465 | return _c | |
| 491 | 466 | } | |
| 492 | 467 | ||
| @@ -495,20 +470,21 @@ func (_c *MockWidget_GtkWidget_Call) RunAndReturn(run func() *gtk.Widget) *MockW | |||
| 495 | 470 | return _c | |
| 496 | 471 | } | |
| 497 | 472 | ||
| 498 | - | // HasCssClass provides a mock function for the type MockWidget | |
| 499 | - | func (_mock *MockWidget) HasCssClass(cssClass string) bool { | |
| 500 | - | ret := _mock.Called(cssClass) | |
| 473 | + | // HasCssClass provides a mock function with given fields: cssClass | |
| 474 | + | func (_m *MockWidget) HasCssClass(cssClass string) bool { | |
| 475 | + | ret := _m.Called(cssClass) | |
| 501 | 476 | ||
| 502 | 477 | if len(ret) == 0 { | |
| 503 | 478 | panic("no return value specified for HasCssClass") | |
| 504 | 479 | } | |
| 505 | 480 | ||
| 506 | 481 | var r0 bool | |
| 507 | - | if returnFunc, ok := ret.Get(0).(func(string) bool); ok { | |
| 508 | - | r0 = returnFunc(cssClass) | |
| 482 | + | if rf, ok := ret.Get(0).(func(string) bool); ok { | |
| 483 | + | r0 = rf(cssClass) | |
| 509 | 484 | } else { | |
| 510 | 485 | r0 = ret.Get(0).(bool) | |
| 511 | 486 | } | |
| 487 | + | ||
| 512 | 488 | return r0 | |
| 513 | 489 | } | |
| 514 | 490 | ||
| @@ -525,41 +501,36 @@ func (_e *MockWidget_Expecter) HasCssClass(cssClass interface{}) *MockWidget_Has | |||
| 525 | 501 | ||
| 526 | 502 | func (_c *MockWidget_HasCssClass_Call) Run(run func(cssClass string)) *MockWidget_HasCssClass_Call { | |
| 527 | 503 | _c.Call.Run(func(args mock.Arguments) { | |
| 528 | - | var arg0 string | |
| 529 | - | if args[0] != nil { | |
| 530 | - | arg0 = args[0].(string) | |
| 531 | - | } | |
| 532 | - | run( | |
| 533 | - | arg0, | |
| 534 | - | ) | |
| 504 | + | run(args[0].(string)) | |
| 535 | 505 | }) | |
| 536 | 506 | return _c | |
| 537 | 507 | } | |
| 538 | 508 | ||
| 539 | - | func (_c *MockWidget_HasCssClass_Call) Return(b bool) *MockWidget_HasCssClass_Call { | |
| 540 | - | _c.Call.Return(b) | |
| 509 | + | func (_c *MockWidget_HasCssClass_Call) Return(_a0 bool) *MockWidget_HasCssClass_Call { | |
| 510 | + | _c.Call.Return(_a0) | |
| 541 | 511 | return _c | |
| 542 | 512 | } | |
| 543 | 513 | ||
| 544 | - | func (_c *MockWidget_HasCssClass_Call) RunAndReturn(run func(cssClass string) bool) *MockWidget_HasCssClass_Call { | |
| 514 | + | func (_c *MockWidget_HasCssClass_Call) RunAndReturn(run func(string) bool) *MockWidget_HasCssClass_Call { | |
| 545 | 515 | _c.Call.Return(run) | |
| 546 | 516 | return _c | |
| 547 | 517 | } | |
| 548 | 518 | ||
| 549 | - | // HasFocus provides a mock function for the type MockWidget | |
| 550 | - | func (_mock *MockWidget) HasFocus() bool { | |
| 551 | - | ret := _mock.Called() | |
| 519 | + | // HasFocus provides a mock function with no fields | |
| 520 | + | func (_m *MockWidget) HasFocus() bool { | |
| 521 | + | ret := _m.Called() | |
| 552 | 522 | ||
| 553 | 523 | if len(ret) == 0 { | |
| 554 | 524 | panic("no return value specified for HasFocus") | |
| 555 | 525 | } | |
| 556 | 526 | ||
| 557 | 527 | var r0 bool | |
| 558 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 559 | - | r0 = returnFunc() | |
| 528 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 529 | + | r0 = rf() | |
| 560 | 530 | } else { | |
| 561 | 531 | r0 = ret.Get(0).(bool) | |
| 562 | 532 | } | |
| 533 | + | ||
| 563 | 534 | return r0 | |
| 564 | 535 | } | |
| 565 | 536 | ||
| @@ -580,8 +551,8 @@ func (_c *MockWidget_HasFocus_Call) Run(run func()) *MockWidget_HasFocus_Call { | |||
| 580 | 551 | return _c | |
| 581 | 552 | } | |
| 582 | 553 | ||
| 583 | - | func (_c *MockWidget_HasFocus_Call) Return(b bool) *MockWidget_HasFocus_Call { | |
| 584 | - | _c.Call.Return(b) | |
| 554 | + | func (_c *MockWidget_HasFocus_Call) Return(_a0 bool) *MockWidget_HasFocus_Call { | |
| 555 | + | _c.Call.Return(_a0) | |
| 585 | 556 | return _c | |
| 586 | 557 | } | |
| 587 | 558 | ||
| @@ -590,10 +561,9 @@ func (_c *MockWidget_HasFocus_Call) RunAndReturn(run func() bool) *MockWidget_Ha | |||
| 590 | 561 | return _c | |
| 591 | 562 | } | |
| 592 | 563 | ||
| 593 | - | // Hide provides a mock function for the type MockWidget | |
| 594 | - | func (_mock *MockWidget) Hide() { | |
| 595 | - | _mock.Called() | |
| 596 | - | return | |
| 564 | + | // Hide provides a mock function with no fields | |
| 565 | + | func (_m *MockWidget) Hide() { | |
| 566 | + | _m.Called() | |
| 597 | 567 | } | |
| 598 | 568 | ||
| 599 | 569 | // MockWidget_Hide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hide' | |
| @@ -623,20 +593,21 @@ func (_c *MockWidget_Hide_Call) RunAndReturn(run func()) *MockWidget_Hide_Call { | |||
| 623 | 593 | return _c | |
| 624 | 594 | } | |
| 625 | 595 | ||
| 626 | - | // IsVisible provides a mock function for the type MockWidget | |
| 627 | - | func (_mock *MockWidget) IsVisible() bool { | |
| 628 | - | ret := _mock.Called() | |
| 596 | + | // IsVisible provides a mock function with no fields | |
| 597 | + | func (_m *MockWidget) IsVisible() bool { | |
| 598 | + | ret := _m.Called() | |
| 629 | 599 | ||
| 630 | 600 | if len(ret) == 0 { | |
| 631 | 601 | panic("no return value specified for IsVisible") | |
| 632 | 602 | } | |
| 633 | 603 | ||
| 634 | 604 | var r0 bool | |
| 635 | - | if returnFunc, ok := ret.Get(0).(func() bool); ok { | |
| 636 | - | r0 = returnFunc() | |
| 605 | + | if rf, ok := ret.Get(0).(func() bool); ok { | |
| 606 | + | r0 = rf() | |
| 637 | 607 | } else { | |
| 638 | 608 | r0 = ret.Get(0).(bool) | |
| 639 | 609 | } | |
| 610 | + | ||
| 640 | 611 | return r0 | |
| 641 | 612 | } | |
| 642 | 613 | ||
| @@ -657,8 +628,8 @@ func (_c *MockWidget_IsVisible_Call) Run(run func()) *MockWidget_IsVisible_Call | |||
| 657 | 628 | return _c | |
| 658 | 629 | } | |
| 659 | 630 | ||
| 660 | - | func (_c *MockWidget_IsVisible_Call) Return(b bool) *MockWidget_IsVisible_Call { | |
| 661 | - | _c.Call.Return(b) | |
| 631 | + | func (_c *MockWidget_IsVisible_Call) Return(_a0 bool) *MockWidget_IsVisible_Call { | |
| 632 | + | _c.Call.Return(_a0) | |
| 662 | 633 | return _c | |
| 663 | 634 | } | |
| 664 | 635 | ||
| @@ -667,10 +638,9 @@ func (_c *MockWidget_IsVisible_Call) RunAndReturn(run func() bool) *MockWidget_I | |||
| 667 | 638 | return _c | |
| 668 | 639 | } | |
| 669 | 640 | ||
| 670 | - | // RemoveCssClass provides a mock function for the type MockWidget | |
| 671 | - | func (_mock *MockWidget) RemoveCssClass(cssClass string) { | |
| 672 | - | _mock.Called(cssClass) | |
| 673 | - | return | |
| 641 | + | // RemoveCssClass provides a mock function with given fields: cssClass | |
| 642 | + | func (_m *MockWidget) RemoveCssClass(cssClass string) { | |
| 643 | + | _m.Called(cssClass) | |
| 674 | 644 | } | |
| 675 | 645 | ||
| 676 | 646 | // MockWidget_RemoveCssClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCssClass' | |
| @@ -686,13 +656,7 @@ func (_e *MockWidget_Expecter) RemoveCssClass(cssClass interface{}) *MockWidget_ | |||
| 686 | 656 | ||
| 687 | 657 | func (_c *MockWidget_RemoveCssClass_Call) Run(run func(cssClass string)) *MockWidget_RemoveCssClass_Call { | |
| 688 | 658 | _c.Call.Run(func(args mock.Arguments) { | |
| 689 | - | var arg0 string | |
| 690 | - | if args[0] != nil { | |
| 691 | - | arg0 = args[0].(string) | |
| 692 | - | } | |
| 693 | - | run( | |
| 694 | - | arg0, | |
| 695 | - | ) | |
| 659 | + | run(args[0].(string)) | |
| 696 | 660 | }) | |
| 697 | 661 | return _c | |
| 698 | 662 | } | |
| @@ -702,15 +666,14 @@ func (_c *MockWidget_RemoveCssClass_Call) Return() *MockWidget_RemoveCssClass_Ca | |||
| 702 | 666 | return _c | |
| 703 | 667 | } | |
| 704 | 668 | ||
| 705 | - | func (_c *MockWidget_RemoveCssClass_Call) RunAndReturn(run func(cssClass string)) *MockWidget_RemoveCssClass_Call { | |
| 669 | + | func (_c *MockWidget_RemoveCssClass_Call) RunAndReturn(run func(string)) *MockWidget_RemoveCssClass_Call { | |
| 706 | 670 | _c.Run(run) | |
| 707 | 671 | return _c | |
| 708 | 672 | } | |
| 709 | 673 | ||
| 710 | - | // SetCanFocus provides a mock function for the type MockWidget | |
| 711 | - | func (_mock *MockWidget) SetCanFocus(canFocus bool) { | |
| 712 | - | _mock.Called(canFocus) | |
| 713 | - | return | |
| 674 | + | // SetCanFocus provides a mock function with given fields: canFocus | |
| 675 | + | func (_m *MockWidget) SetCanFocus(canFocus bool) { | |
| 676 | + | _m.Called(canFocus) | |
| 714 | 677 | } | |
| 715 | 678 | ||
| 716 | 679 | // MockWidget_SetCanFocus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanFocus' | |
| @@ -726,13 +689,7 @@ func (_e *MockWidget_Expecter) SetCanFocus(canFocus interface{}) *MockWidget_Set | |||
| 726 | 689 | ||
| 727 | 690 | func (_c *MockWidget_SetCanFocus_Call) Run(run func(canFocus bool)) *MockWidget_SetCanFocus_Call { | |
| 728 | 691 | _c.Call.Run(func(args mock.Arguments) { | |
| 729 | - | var arg0 bool | |
| 730 | - | if args[0] != nil { | |
| 731 | - | arg0 = args[0].(bool) | |
| 732 | - | } | |
| 733 | - | run( | |
| 734 | - | arg0, | |
| 735 | - | ) | |
| 692 | + | run(args[0].(bool)) | |
| 736 | 693 | }) | |
| 737 | 694 | return _c | |
| 738 | 695 | } | |
| @@ -742,15 +699,14 @@ func (_c *MockWidget_SetCanFocus_Call) Return() *MockWidget_SetCanFocus_Call { | |||
| 742 | 699 | return _c | |
| 743 | 700 | } | |
| 744 | 701 | ||
| 745 | - | func (_c *MockWidget_SetCanFocus_Call) RunAndReturn(run func(canFocus bool)) *MockWidget_SetCanFocus_Call { | |
| 702 | + | func (_c *MockWidget_SetCanFocus_Call) RunAndReturn(run func(bool)) *MockWidget_SetCanFocus_Call { | |
| 746 | 703 | _c.Run(run) | |
| 747 | 704 | return _c | |
| 748 | 705 | } | |
| 749 | 706 | ||
| 750 | - | // SetCanTarget provides a mock function for the type MockWidget | |
| 751 | - | func (_mock *MockWidget) SetCanTarget(canTarget bool) { | |
| 752 | - | _mock.Called(canTarget) | |
| 753 | - | return | |
| 707 | + | // SetCanTarget provides a mock function with given fields: canTarget | |
| 708 | + | func (_m *MockWidget) SetCanTarget(canTarget bool) { | |
| 709 | + | _m.Called(canTarget) | |
| 754 | 710 | } | |
| 755 | 711 | ||
| 756 | 712 | // MockWidget_SetCanTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCanTarget' | |
| @@ -766,13 +722,7 @@ func (_e *MockWidget_Expecter) SetCanTarget(canTarget interface{}) *MockWidget_S | |||
| 766 | 722 | ||
| 767 | 723 | func (_c *MockWidget_SetCanTarget_Call) Run(run func(canTarget bool)) *MockWidget_SetCanTarget_Call { | |
| 768 | 724 | _c.Call.Run(func(args mock.Arguments) { | |
| 769 | - | var arg0 bool | |
| 770 | - | if args[0] != nil { | |
| 771 | - | arg0 = args[0].(bool) | |
| 772 | - | } | |
| 773 | - | run( | |
| 774 | - | arg0, | |
| 775 | - | ) | |
| 725 | + | run(args[0].(bool)) | |
| 776 | 726 | }) | |
| 777 | 727 | return _c | |
| 778 | 728 | } | |
| @@ -782,15 +732,14 @@ func (_c *MockWidget_SetCanTarget_Call) Return() *MockWidget_SetCanTarget_Call { | |||
| 782 | 732 | return _c | |
| 783 | 733 | } | |
| 784 | 734 | ||
| 785 | - | func (_c *MockWidget_SetCanTarget_Call) RunAndReturn(run func(canTarget bool)) *MockWidget_SetCanTarget_Call { | |
| 735 | + | func (_c *MockWidget_SetCanTarget_Call) RunAndReturn(run func(bool)) *MockWidget_SetCanTarget_Call { | |
| 786 | 736 | _c.Run(run) | |
| 787 | 737 | return _c | |
| 788 | 738 | } | |
| 789 | 739 | ||
| 790 | - | // SetFocusOnClick provides a mock function for the type MockWidget | |
| 791 | - | func (_mock *MockWidget) SetFocusOnClick(focusOnClick bool) { | |
| 792 | - | _mock.Called(focusOnClick) | |
| 793 | - | return | |
| 740 | + | // SetFocusOnClick provides a mock function with given fields: focusOnClick | |
| 741 | + | func (_m *MockWidget) SetFocusOnClick(focusOnClick bool) { | |
| 742 | + | _m.Called(focusOnClick) | |
| 794 | 743 | } | |
| 795 | 744 | ||
| 796 | 745 | // MockWidget_SetFocusOnClick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFocusOnClick' | |
| @@ -806,13 +755,7 @@ func (_e *MockWidget_Expecter) SetFocusOnClick(focusOnClick interface{}) *MockWi | |||
| 806 | 755 | ||
| 807 | 756 | func (_c *MockWidget_SetFocusOnClick_Call) Run(run func(focusOnClick bool)) *MockWidget_SetFocusOnClick_Call { | |
| 808 | 757 | _c.Call.Run(func(args mock.Arguments) { | |
| 809 | - | var arg0 bool | |
| 810 | - | if args[0] != nil { | |
| 811 | - | arg0 = args[0].(bool) | |
| 812 | - | } | |
| 813 | - | run( | |
| 814 | - | arg0, | |
| 815 | - | ) | |
| 758 | + | run(args[0].(bool)) | |
| 816 | 759 | }) | |
| 817 | 760 | return _c | |
| 818 | 761 | } | |
| @@ -822,15 +765,14 @@ func (_c *MockWidget_SetFocusOnClick_Call) Return() *MockWidget_SetFocusOnClick_ | |||
| 822 | 765 | return _c | |
| 823 | 766 | } | |
| 824 | 767 | ||
| 825 | - | func (_c *MockWidget_SetFocusOnClick_Call) RunAndReturn(run func(focusOnClick bool)) *MockWidget_SetFocusOnClick_Call { | |
| 768 | + | func (_c *MockWidget_SetFocusOnClick_Call) RunAndReturn(run func(bool)) *MockWidget_SetFocusOnClick_Call { | |
| 826 | 769 | _c.Run(run) | |
| 827 | 770 | return _c | |
| 828 | 771 | } | |
| 829 | 772 | ||
| 830 | - | // SetHalign provides a mock function for the type MockWidget | |
| 831 | - | func (_mock *MockWidget) SetHalign(align gtk.Align) { | |
| 832 | - | _mock.Called(align) | |
| 833 | - | return | |
| 773 | + | // SetHalign provides a mock function with given fields: align | |
| 774 | + | func (_m *MockWidget) SetHalign(align gtk.Align) { | |
| 775 | + | _m.Called(align) | |
| 834 | 776 | } | |
| 835 | 777 | ||
| 836 | 778 | // MockWidget_SetHalign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHalign' | |
| @@ -846,13 +788,7 @@ func (_e *MockWidget_Expecter) SetHalign(align interface{}) *MockWidget_SetHalig | |||
| 846 | 788 | ||
| 847 | 789 | func (_c *MockWidget_SetHalign_Call) Run(run func(align gtk.Align)) *MockWidget_SetHalign_Call { | |
| 848 | 790 | _c.Call.Run(func(args mock.Arguments) { | |
| 849 | - | var arg0 gtk.Align | |
| 850 | - | if args[0] != nil { | |
| 851 | - | arg0 = args[0].(gtk.Align) | |
| 852 | - | } | |
| 853 | - | run( | |
| 854 | - | arg0, | |
| 855 | - | ) | |
| 791 | + | run(args[0].(gtk.Align)) | |
| 856 | 792 | }) | |
| 857 | 793 | return _c | |
| 858 | 794 | } | |
| @@ -862,15 +798,14 @@ func (_c *MockWidget_SetHalign_Call) Return() *MockWidget_SetHalign_Call { | |||
| 862 | 798 | return _c | |
| 863 | 799 | } | |
| 864 | 800 | ||
| 865 | - | func (_c *MockWidget_SetHalign_Call) RunAndReturn(run func(align gtk.Align)) *MockWidget_SetHalign_Call { | |
| 801 | + | func (_c *MockWidget_SetHalign_Call) RunAndReturn(run func(gtk.Align)) *MockWidget_SetHalign_Call { | |
| 866 | 802 | _c.Run(run) | |
| 867 | 803 | return _c | |
| 868 | 804 | } | |
| 869 | 805 | ||
| 870 | - | // SetHexpand provides a mock function for the type MockWidget | |
| 871 | - | func (_mock *MockWidget) SetHexpand(expand bool) { | |
| 872 | - | _mock.Called(expand) | |
| 873 | - | return | |
| 806 | + | // SetHexpand provides a mock function with given fields: expand | |
| 807 | + | func (_m *MockWidget) SetHexpand(expand bool) { | |
| 808 | + | _m.Called(expand) | |
| 874 | 809 | } | |
| 875 | 810 | ||
| 876 | 811 | // MockWidget_SetHexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHexpand' | |
| @@ -886,13 +821,7 @@ func (_e *MockWidget_Expecter) SetHexpand(expand interface{}) *MockWidget_SetHex | |||
| 886 | 821 | ||
| 887 | 822 | func (_c *MockWidget_SetHexpand_Call) Run(run func(expand bool)) *MockWidget_SetHexpand_Call { | |
| 888 | 823 | _c.Call.Run(func(args mock.Arguments) { | |
| 889 | - | var arg0 bool | |
| 890 | - | if args[0] != nil { | |
| 891 | - | arg0 = args[0].(bool) | |
| 892 | - | } | |
| 893 | - | run( | |
| 894 | - | arg0, | |
| 895 | - | ) | |
| 824 | + | run(args[0].(bool)) | |
| 896 | 825 | }) | |
| 897 | 826 | return _c | |
| 898 | 827 | } | |
| @@ -902,15 +831,14 @@ func (_c *MockWidget_SetHexpand_Call) Return() *MockWidget_SetHexpand_Call { | |||
| 902 | 831 | return _c | |
| 903 | 832 | } | |
| 904 | 833 | ||
| 905 | - | func (_c *MockWidget_SetHexpand_Call) RunAndReturn(run func(expand bool)) *MockWidget_SetHexpand_Call { | |
| 834 | + | func (_c *MockWidget_SetHexpand_Call) RunAndReturn(run func(bool)) *MockWidget_SetHexpand_Call { | |
| 906 | 835 | _c.Run(run) | |
| 907 | 836 | return _c | |
| 908 | 837 | } | |
| 909 | 838 | ||
| 910 | - | // SetSizeRequest provides a mock function for the type MockWidget | |
| 911 | - | func (_mock *MockWidget) SetSizeRequest(width int, height int) { | |
| 912 | - | _mock.Called(width, height) | |
| 913 | - | return | |
| 839 | + | // SetSizeRequest provides a mock function with given fields: width, height | |
| 840 | + | func (_m *MockWidget) SetSizeRequest(width int, height int) { | |
| 841 | + | _m.Called(width, height) | |
| 914 | 842 | } | |
| 915 | 843 | ||
| 916 | 844 | // MockWidget_SetSizeRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSizeRequest' | |
| @@ -927,18 +855,7 @@ func (_e *MockWidget_Expecter) SetSizeRequest(width interface{}, height interfac | |||
| 927 | 855 | ||
| 928 | 856 | func (_c *MockWidget_SetSizeRequest_Call) Run(run func(width int, height int)) *MockWidget_SetSizeRequest_Call { | |
| 929 | 857 | _c.Call.Run(func(args mock.Arguments) { | |
| 930 | - | var arg0 int | |
| 931 | - | if args[0] != nil { | |
| 932 | - | arg0 = args[0].(int) | |
| 933 | - | } | |
| 934 | - | var arg1 int | |
| 935 | - | if args[1] != nil { | |
| 936 | - | arg1 = args[1].(int) | |
| 937 | - | } | |
| 938 | - | run( | |
| 939 | - | arg0, | |
| 940 | - | arg1, | |
| 941 | - | ) | |
| 858 | + | run(args[0].(int), args[1].(int)) | |
| 942 | 859 | }) | |
| 943 | 860 | return _c | |
| 944 | 861 | } | |
| @@ -948,15 +865,14 @@ func (_c *MockWidget_SetSizeRequest_Call) Return() *MockWidget_SetSizeRequest_Ca | |||
| 948 | 865 | return _c | |
| 949 | 866 | } | |
| 950 | 867 | ||
| 951 | - | func (_c *MockWidget_SetSizeRequest_Call) RunAndReturn(run func(width int, height int)) *MockWidget_SetSizeRequest_Call { | |
| 868 | + | func (_c *MockWidget_SetSizeRequest_Call) RunAndReturn(run func(int, int)) *MockWidget_SetSizeRequest_Call { | |
| 952 | 869 | _c.Run(run) | |
| 953 | 870 | return _c | |
| 954 | 871 | } | |
| 955 | 872 | ||
| 956 | - | // SetValign provides a mock function for the type MockWidget | |
| 957 | - | func (_mock *MockWidget) SetValign(align gtk.Align) { | |
| 958 | - | _mock.Called(align) | |
| 959 | - | return | |
| 873 | + | // SetValign provides a mock function with given fields: align | |
| 874 | + | func (_m *MockWidget) SetValign(align gtk.Align) { | |
| 875 | + | _m.Called(align) | |
| 960 | 876 | } | |
| 961 | 877 | ||
| 962 | 878 | // MockWidget_SetValign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValign' | |
| @@ -972,13 +888,7 @@ func (_e *MockWidget_Expecter) SetValign(align interface{}) *MockWidget_SetValig | |||
| 972 | 888 | ||
| 973 | 889 | func (_c *MockWidget_SetValign_Call) Run(run func(align gtk.Align)) *MockWidget_SetValign_Call { | |
| 974 | 890 | _c.Call.Run(func(args mock.Arguments) { | |
| 975 | - | var arg0 gtk.Align | |
| 976 | - | if args[0] != nil { | |
| 977 | - | arg0 = args[0].(gtk.Align) | |
| 978 | - | } | |
| 979 | - | run( | |
| 980 | - | arg0, | |
| 981 | - | ) | |
| 891 | + | run(args[0].(gtk.Align)) | |
| 982 | 892 | }) | |
| 983 | 893 | return _c | |
| 984 | 894 | } | |
| @@ -988,15 +898,14 @@ func (_c *MockWidget_SetValign_Call) Return() *MockWidget_SetValign_Call { | |||
| 988 | 898 | return _c | |
| 989 | 899 | } | |
| 990 | 900 | ||
| 991 | - | func (_c *MockWidget_SetValign_Call) RunAndReturn(run func(align gtk.Align)) *MockWidget_SetValign_Call { | |
| 901 | + | func (_c *MockWidget_SetValign_Call) RunAndReturn(run func(gtk.Align)) *MockWidget_SetValign_Call { | |
| 992 | 902 | _c.Run(run) | |
| 993 | 903 | return _c | |
| 994 | 904 | } | |
| 995 | 905 | ||
| 996 | - | // SetVexpand provides a mock function for the type MockWidget | |
| 997 | - | func (_mock *MockWidget) SetVexpand(expand bool) { | |
| 998 | - | _mock.Called(expand) | |
| 999 | - | return | |
| 906 | + | // SetVexpand provides a mock function with given fields: expand | |
| 907 | + | func (_m *MockWidget) SetVexpand(expand bool) { | |
| 908 | + | _m.Called(expand) | |
| 1000 | 909 | } | |
| 1001 | 910 | ||
| 1002 | 911 | // MockWidget_SetVexpand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVexpand' | |
| @@ -1012,13 +921,7 @@ func (_e *MockWidget_Expecter) SetVexpand(expand interface{}) *MockWidget_SetVex | |||
| 1012 | 921 | ||
| 1013 | 922 | func (_c *MockWidget_SetVexpand_Call) Run(run func(expand bool)) *MockWidget_SetVexpand_Call { | |
| 1014 | 923 | _c.Call.Run(func(args mock.Arguments) { | |
| 1015 | - | var arg0 bool | |
| 1016 | - | if args[0] != nil { | |
| 1017 | - | arg0 = args[0].(bool) | |
| 1018 | - | } | |
| 1019 | - | run( | |
| 1020 | - | arg0, | |
| 1021 | - | ) | |
| 924 | + | run(args[0].(bool)) | |
| 1022 | 925 | }) | |
| 1023 | 926 | return _c | |
| 1024 | 927 | } | |
| @@ -1028,15 +931,14 @@ func (_c *MockWidget_SetVexpand_Call) Return() *MockWidget_SetVexpand_Call { | |||
| 1028 | 931 | return _c | |
| 1029 | 932 | } | |
| 1030 | 933 | ||
| 1031 | - | func (_c *MockWidget_SetVexpand_Call) RunAndReturn(run func(expand bool)) *MockWidget_SetVexpand_Call { | |
| 934 | + | func (_c *MockWidget_SetVexpand_Call) RunAndReturn(run func(bool)) *MockWidget_SetVexpand_Call { | |
| 1032 | 935 | _c.Run(run) | |
| 1033 | 936 | return _c | |
| 1034 | 937 | } | |
| 1035 | 938 | ||
| 1036 | - | // SetVisible provides a mock function for the type MockWidget | |
| 1037 | - | func (_mock *MockWidget) SetVisible(visible bool) { | |
| 1038 | - | _mock.Called(visible) | |
| 1039 | - | return | |
| 939 | + | // SetVisible provides a mock function with given fields: visible | |
| 940 | + | func (_m *MockWidget) SetVisible(visible bool) { | |
| 941 | + | _m.Called(visible) | |
| 1040 | 942 | } | |
| 1041 | 943 | ||
| 1042 | 944 | // MockWidget_SetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetVisible' | |
| @@ -1052,13 +954,7 @@ func (_e *MockWidget_Expecter) SetVisible(visible interface{}) *MockWidget_SetVi | |||
| 1052 | 954 | ||
| 1053 | 955 | func (_c *MockWidget_SetVisible_Call) Run(run func(visible bool)) *MockWidget_SetVisible_Call { | |
| 1054 | 956 | _c.Call.Run(func(args mock.Arguments) { | |
| 1055 | - | var arg0 bool | |
| 1056 | - | if args[0] != nil { | |
| 1057 | - | arg0 = args[0].(bool) | |
| 1058 | - | } | |
| 1059 | - | run( | |
| 1060 | - | arg0, | |
| 1061 | - | ) | |
| 957 | + | run(args[0].(bool)) | |
| 1062 | 958 | }) | |
| 1063 | 959 | return _c | |
| 1064 | 960 | } | |
| @@ -1068,15 +964,14 @@ func (_c *MockWidget_SetVisible_Call) Return() *MockWidget_SetVisible_Call { | |||
| 1068 | 964 | return _c | |
| 1069 | 965 | } | |
| 1070 | 966 | ||
| 1071 | - | func (_c *MockWidget_SetVisible_Call) RunAndReturn(run func(visible bool)) *MockWidget_SetVisible_Call { | |
| 967 | + | func (_c *MockWidget_SetVisible_Call) RunAndReturn(run func(bool)) *MockWidget_SetVisible_Call { | |
| 1072 | 968 | _c.Run(run) | |
| 1073 | 969 | return _c | |
| 1074 | 970 | } | |
| 1075 | 971 | ||
| 1076 | - | // Show provides a mock function for the type MockWidget | |
| 1077 | - | func (_mock *MockWidget) Show() { | |
| 1078 | - | _mock.Called() | |
| 1079 | - | return | |
| 972 | + | // Show provides a mock function with no fields | |
| 973 | + | func (_m *MockWidget) Show() { | |
| 974 | + | _m.Called() | |
| 1080 | 975 | } | |
| 1081 | 976 | ||
| 1082 | 977 | // MockWidget_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' | |
| @@ -1106,10 +1001,9 @@ func (_c *MockWidget_Show_Call) RunAndReturn(run func()) *MockWidget_Show_Call { | |||
| 1106 | 1001 | return _c | |
| 1107 | 1002 | } | |
| 1108 | 1003 | ||
| 1109 | - | // Unparent provides a mock function for the type MockWidget | |
| 1110 | - | func (_mock *MockWidget) Unparent() { | |
| 1111 | - | _mock.Called() | |
| 1112 | - | return | |
| 1004 | + | // Unparent provides a mock function with no fields | |
| 1005 | + | func (_m *MockWidget) Unparent() { | |
| 1006 | + | _m.Called() | |
| 1113 | 1007 | } | |
| 1114 | 1008 | ||
| 1115 | 1009 | // MockWidget_Unparent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unparent' | |
| @@ -1138,3 +1032,17 @@ func (_c *MockWidget_Unparent_Call) RunAndReturn(run func()) *MockWidget_Unparen | |||
| 1138 | 1032 | _c.Run(run) | |
| 1139 | 1033 | return _c | |
| 1140 | 1034 | } | |
| 1035 | + | ||
| 1036 | + | // NewMockWidget creates a new instance of MockWidget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 1037 | + | // The first argument is typically a *testing.T value. | |
| 1038 | + | func NewMockWidget(t interface { | |
| 1039 | + | mock.TestingT | |
| 1040 | + | Cleanup(func()) | |
| 1041 | + | }) *MockWidget { | |
| 1042 | + | mock := &MockWidget{} | |
| 1043 | + | mock.Mock.Test(t) | |
| 1044 | + | ||
| 1045 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 1046 | + | ||
| 1047 | + | return mock | |
| 1048 | + | } | |
M internal/ui/layout/mocks/mock_widget_factory.go +132 -108
| @@ -1,29 +1,14 @@ | |||
| 1 | - | // Code generated by mockery; DO NOT EDIT. | |
| 2 | - | // github.com/vektra/mockery | |
| 3 | - | // template: testify | |
| 1 | + | // Code generated by mockery v2.53.5. DO NOT EDIT. | |
| 4 | 2 | ||
| 5 | 3 | package mocks | |
| 6 | 4 | ||
| 7 | 5 | import ( | |
| 8 | - | "github.com/bnema/dumber/internal/ui/layout" | |
| 9 | - | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 6 | + | layout "github.com/bnema/dumber/internal/ui/layout" | |
| 7 | + | gtk "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 8 | + | ||
| 10 | 9 | mock "github.com/stretchr/testify/mock" | |
| 11 | 10 | ) | |
| 12 | 11 | ||
| 13 | - | // NewMockWidgetFactory creates a new instance of MockWidgetFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 14 | - | // The first argument is typically a *testing.T value. | |
| 15 | - | func NewMockWidgetFactory(t interface { | |
| 16 | - | mock.TestingT | |
| 17 | - | Cleanup(func()) | |
| 18 | - | }) *MockWidgetFactory { | |
| 19 | - | mock := &MockWidgetFactory{} | |
| 20 | - | mock.Mock.Test(t) | |
| 21 | - | ||
| 22 | - | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 23 | - | ||
| 24 | - | return mock | |
| 25 | - | } | |
| 26 | - | ||
| 27 | 12 | // MockWidgetFactory is an autogenerated mock type for the WidgetFactory type | |
| 28 | 13 | type MockWidgetFactory struct { | |
| 29 | 14 | mock.Mock | |
| @@ -37,22 +22,23 @@ func (_m *MockWidgetFactory) EXPECT() *MockWidgetFactory_Expecter { | |||
| 37 | 22 | return &MockWidgetFactory_Expecter{mock: &_m.Mock} | |
| 38 | 23 | } | |
| 39 | 24 | ||
| 40 | - | // NewBox provides a mock function for the type MockWidgetFactory | |
| 41 | - | func (_mock *MockWidgetFactory) NewBox(orientation layout.Orientation, spacing int) layout.BoxWidget { | |
| 42 | - | ret := _mock.Called(orientation, spacing) | |
| 25 | + | // NewBox provides a mock function with given fields: orientation, spacing | |
| 26 | + | func (_m *MockWidgetFactory) NewBox(orientation gtk.Orientation, spacing int) layout.BoxWidget { | |
| 27 | + | ret := _m.Called(orientation, spacing) | |
| 43 | 28 | ||
| 44 | 29 | if len(ret) == 0 { | |
| 45 | 30 | panic("no return value specified for NewBox") | |
| 46 | 31 | } | |
| 47 | 32 | ||
| 48 | 33 | var r0 layout.BoxWidget | |
| 49 | - | if returnFunc, ok := ret.Get(0).(func(layout.Orientation, int) layout.BoxWidget); ok { | |
| 50 | - | r0 = returnFunc(orientation, spacing) | |
| 34 | + | if rf, ok := ret.Get(0).(func(gtk.Orientation, int) layout.BoxWidget); ok { | |
| 35 | + | r0 = rf(orientation, spacing) | |
| 51 | 36 | } else { | |
| 52 | 37 | if ret.Get(0) != nil { | |
| 53 | 38 | r0 = ret.Get(0).(layout.BoxWidget) | |
| 54 | 39 | } | |
| 55 | 40 | } | |
| 41 | + | ||
| 56 | 42 | return r0 | |
| 57 | 43 | } | |
| 58 | 44 | ||
| @@ -62,56 +48,46 @@ type MockWidgetFactory_NewBox_Call struct { | |||
| 62 | 48 | } | |
| 63 | 49 | ||
| 64 | 50 | // NewBox is a helper method to define mock.On call | |
| 65 | - | // - orientation layout.Orientation | |
| 51 | + | // - orientation gtk.Orientation | |
| 66 | 52 | // - spacing int | |
| 67 | 53 | func (_e *MockWidgetFactory_Expecter) NewBox(orientation interface{}, spacing interface{}) *MockWidgetFactory_NewBox_Call { | |
| 68 | 54 | return &MockWidgetFactory_NewBox_Call{Call: _e.mock.On("NewBox", orientation, spacing)} | |
| 69 | 55 | } | |
| 70 | 56 | ||
| 71 | - | func (_c *MockWidgetFactory_NewBox_Call) Run(run func(orientation layout.Orientation, spacing int)) *MockWidgetFactory_NewBox_Call { | |
| 57 | + | func (_c *MockWidgetFactory_NewBox_Call) Run(run func(orientation gtk.Orientation, spacing int)) *MockWidgetFactory_NewBox_Call { | |
| 72 | 58 | _c.Call.Run(func(args mock.Arguments) { | |
| 73 | - | var arg0 layout.Orientation | |
| 74 | - | if args[0] != nil { | |
| 75 | - | arg0 = args[0].(layout.Orientation) | |
| 76 | - | } | |
| 77 | - | var arg1 int | |
| 78 | - | if args[1] != nil { | |
| 79 | - | arg1 = args[1].(int) | |
| 80 | - | } | |
| 81 | - | run( | |
| 82 | - | arg0, | |
| 83 | - | arg1, | |
| 84 | - | ) | |
| 59 | + | run(args[0].(gtk.Orientation), args[1].(int)) | |
| 85 | 60 | }) | |
| 86 | 61 | return _c | |
| 87 | 62 | } | |
| 88 | 63 | ||
| 89 | - | func (_c *MockWidgetFactory_NewBox_Call) Return(boxWidget layout.BoxWidget) *MockWidgetFactory_NewBox_Call { | |
| 90 | - | _c.Call.Return(boxWidget) | |
| 64 | + | func (_c *MockWidgetFactory_NewBox_Call) Return(_a0 layout.BoxWidget) *MockWidgetFactory_NewBox_Call { | |
| 65 | + | _c.Call.Return(_a0) | |
| 91 | 66 | return _c | |
| 92 | 67 | } | |
| 93 | 68 | ||
| 94 | - | func (_c *MockWidgetFactory_NewBox_Call) RunAndReturn(run func(orientation layout.Orientation, spacing int) layout.BoxWidget) *MockWidgetFactory_NewBox_Call { | |
| 69 | + | func (_c *MockWidgetFactory_NewBox_Call) RunAndReturn(run func(gtk.Orientation, int) layout.BoxWidget) *MockWidgetFactory_NewBox_Call { | |
| 95 | 70 | _c.Call.Return(run) | |
| 96 | 71 | return _c | |
| 97 | 72 | } | |
| 98 | 73 | ||
| 99 | - | // NewButton provides a mock function for the type MockWidgetFactory | |
| 100 | - | func (_mock *MockWidgetFactory) NewButton() layout.ButtonWidget { | |
| 101 | - | ret := _mock.Called() | |
| 74 | + | // NewButton provides a mock function with no fields | |
| 75 | + | func (_m *MockWidgetFactory) NewButton() layout.ButtonWidget { | |
| 76 | + | ret := _m.Called() | |
| 102 | 77 | ||
| 103 | 78 | if len(ret) == 0 { | |
| 104 | 79 | panic("no return value specified for NewButton") | |
| 105 | 80 | } | |
| 106 | 81 | ||
| 107 | 82 | var r0 layout.ButtonWidget | |
| 108 | - | if returnFunc, ok := ret.Get(0).(func() layout.ButtonWidget); ok { | |
| 109 | - | r0 = returnFunc() | |
| 83 | + | if rf, ok := ret.Get(0).(func() layout.ButtonWidget); ok { | |
| 84 | + | r0 = rf() | |
| 110 | 85 | } else { | |
| 111 | 86 | if ret.Get(0) != nil { | |
| 112 | 87 | r0 = ret.Get(0).(layout.ButtonWidget) | |
| 113 | 88 | } | |
| 114 | 89 | } | |
| 90 | + | ||
| 115 | 91 | return r0 | |
| 116 | 92 | } | |
| 117 | 93 | ||
| @@ -132,8 +108,8 @@ func (_c *MockWidgetFactory_NewButton_Call) Run(run func()) *MockWidgetFactory_N | |||
| 132 | 108 | return _c | |
| 133 | 109 | } | |
| 134 | 110 | ||
| 135 | - | func (_c *MockWidgetFactory_NewButton_Call) Return(buttonWidget layout.ButtonWidget) *MockWidgetFactory_NewButton_Call { | |
| 136 | - | _c.Call.Return(buttonWidget) | |
| 111 | + | func (_c *MockWidgetFactory_NewButton_Call) Return(_a0 layout.ButtonWidget) *MockWidgetFactory_NewButton_Call { | |
| 112 | + | _c.Call.Return(_a0) | |
| 137 | 113 | return _c | |
| 138 | 114 | } | |
| 139 | 115 | ||
| @@ -142,22 +118,23 @@ func (_c *MockWidgetFactory_NewButton_Call) RunAndReturn(run func() layout.Butto | |||
| 142 | 118 | return _c | |
| 143 | 119 | } | |
| 144 | 120 | ||
| 145 | - | // NewImage provides a mock function for the type MockWidgetFactory | |
| 146 | - | func (_mock *MockWidgetFactory) NewImage() layout.ImageWidget { | |
| 147 | - | ret := _mock.Called() | |
| 121 | + | // NewImage provides a mock function with no fields | |
| 122 | + | func (_m *MockWidgetFactory) NewImage() layout.ImageWidget { | |
| 123 | + | ret := _m.Called() | |
| 148 | 124 | ||
| 149 | 125 | if len(ret) == 0 { | |
| 150 | 126 | panic("no return value specified for NewImage") | |
| 151 | 127 | } | |
| 152 | 128 | ||
| 153 | 129 | var r0 layout.ImageWidget | |
| 154 | - | if returnFunc, ok := ret.Get(0).(func() layout.ImageWidget); ok { | |
| 155 | - | r0 = returnFunc() | |
| 130 | + | if rf, ok := ret.Get(0).(func() layout.ImageWidget); ok { | |
| 131 | + | r0 = rf() | |
| 156 | 132 | } else { | |
| 157 | 133 | if ret.Get(0) != nil { | |
| 158 | 134 | r0 = ret.Get(0).(layout.ImageWidget) | |
| 159 | 135 | } | |
| 160 | 136 | } | |
| 137 | + | ||
| 161 | 138 | return r0 | |
| 162 | 139 | } | |
| 163 | 140 | ||
| @@ -178,8 +155,8 @@ func (_c *MockWidgetFactory_NewImage_Call) Run(run func()) *MockWidgetFactory_Ne | |||
| 178 | 155 | return _c | |
| 179 | 156 | } | |
| 180 | 157 | ||
| 181 | - | func (_c *MockWidgetFactory_NewImage_Call) Return(imageWidget layout.ImageWidget) *MockWidgetFactory_NewImage_Call { | |
| 182 | - | _c.Call.Return(imageWidget) | |
| 158 | + | func (_c *MockWidgetFactory_NewImage_Call) Return(_a0 layout.ImageWidget) *MockWidgetFactory_NewImage_Call { | |
| 159 | + | _c.Call.Return(_a0) | |
| 183 | 160 | return _c | |
| 184 | 161 | } | |
| 185 | 162 | ||
| @@ -188,22 +165,23 @@ func (_c *MockWidgetFactory_NewImage_Call) RunAndReturn(run func() layout.ImageW | |||
| 188 | 165 | return _c | |
| 189 | 166 | } | |
| 190 | 167 | ||
| 191 | - | // NewLabel provides a mock function for the type MockWidgetFactory | |
| 192 | - | func (_mock *MockWidgetFactory) NewLabel(text string) layout.LabelWidget { | |
| 193 | - | ret := _mock.Called(text) | |
| 168 | + | // NewLabel provides a mock function with given fields: text | |
| 169 | + | func (_m *MockWidgetFactory) NewLabel(text string) layout.LabelWidget { | |
| 170 | + | ret := _m.Called(text) | |
| 194 | 171 | ||
| 195 | 172 | if len(ret) == 0 { | |
| 196 | 173 | panic("no return value specified for NewLabel") | |
| 197 | 174 | } | |
| 198 | 175 | ||
| 199 | 176 | var r0 layout.LabelWidget | |
| 200 | - | if returnFunc, ok := ret.Get(0).(func(string) layout.LabelWidget); ok { | |
| 201 | - | r0 = returnFunc(text) | |
| 177 | + | if rf, ok := ret.Get(0).(func(string) layout.LabelWidget); ok { | |
| 178 | + | r0 = rf(text) | |
| 202 | 179 | } else { | |
| 203 | 180 | if ret.Get(0) != nil { | |
| 204 | 181 | r0 = ret.Get(0).(layout.LabelWidget) | |
| 205 | 182 | } | |
| 206 | 183 | } | |
| 184 | + | ||
| 207 | 185 | return r0 | |
| 208 | 186 | } | |
| 209 | 187 | ||
| @@ -220,43 +198,38 @@ func (_e *MockWidgetFactory_Expecter) NewLabel(text interface{}) *MockWidgetFact | |||
| 220 | 198 | ||
| 221 | 199 | func (_c *MockWidgetFactory_NewLabel_Call) Run(run func(text string)) *MockWidgetFactory_NewLabel_Call { | |
| 222 | 200 | _c.Call.Run(func(args mock.Arguments) { | |
| 223 | - | var arg0 string | |
| 224 | - | if args[0] != nil { | |
| 225 | - | arg0 = args[0].(string) | |
| 226 | - | } | |
| 227 | - | run( | |
| 228 | - | arg0, | |
| 229 | - | ) | |
| 201 | + | run(args[0].(string)) | |
| 230 | 202 | }) | |
| 231 | 203 | return _c | |
| 232 | 204 | } | |
| 233 | 205 | ||
| 234 | - | func (_c *MockWidgetFactory_NewLabel_Call) Return(labelWidget layout.LabelWidget) *MockWidgetFactory_NewLabel_Call { | |
| 235 | - | _c.Call.Return(labelWidget) | |
| 206 | + | func (_c *MockWidgetFactory_NewLabel_Call) Return(_a0 layout.LabelWidget) *MockWidgetFactory_NewLabel_Call { | |
| 207 | + | _c.Call.Return(_a0) | |
| 236 | 208 | return _c | |
| 237 | 209 | } | |
| 238 | 210 | ||
| 239 | - | func (_c *MockWidgetFactory_NewLabel_Call) RunAndReturn(run func(text string) layout.LabelWidget) *MockWidgetFactory_NewLabel_Call { | |
| 211 | + | func (_c *MockWidgetFactory_NewLabel_Call) RunAndReturn(run func(string) layout.LabelWidget) *MockWidgetFactory_NewLabel_Call { | |
| 240 | 212 | _c.Call.Return(run) | |
| 241 | 213 | return _c | |
| 242 | 214 | } | |
| 243 | 215 | ||
| 244 | - | // NewOverlay provides a mock function for the type MockWidgetFactory | |
| 245 | - | func (_mock *MockWidgetFactory) NewOverlay() layout.OverlayWidget { | |
| 246 | - | ret := _mock.Called() | |
| 216 | + | // NewOverlay provides a mock function with no fields | |
| 217 | + | func (_m *MockWidgetFactory) NewOverlay() layout.OverlayWidget { | |
| 218 | + | ret := _m.Called() | |
| 247 | 219 | ||
| 248 | 220 | if len(ret) == 0 { | |
| 249 | 221 | panic("no return value specified for NewOverlay") | |
| 250 | 222 | } | |
| 251 | 223 | ||
| 252 | 224 | var r0 layout.OverlayWidget | |
| 253 | - | if returnFunc, ok := ret.Get(0).(func() layout.OverlayWidget); ok { | |
| 254 | - | r0 = returnFunc() | |
| 225 | + | if rf, ok := ret.Get(0).(func() layout.OverlayWidget); ok { | |
| 226 | + | r0 = rf() | |
| 255 | 227 | } else { | |
| 256 | 228 | if ret.Get(0) != nil { | |
| 257 | 229 | r0 = ret.Get(0).(layout.OverlayWidget) | |
| 258 | 230 | } | |
| 259 | 231 | } | |
| 232 | + | ||
| 260 | 233 | return r0 | |
| 261 | 234 | } | |
| 262 | 235 | ||
| @@ -277,8 +250,8 @@ func (_c *MockWidgetFactory_NewOverlay_Call) Run(run func()) *MockWidgetFactory_ | |||
| 277 | 250 | return _c | |
| 278 | 251 | } | |
| 279 | 252 | ||
| 280 | - | func (_c *MockWidgetFactory_NewOverlay_Call) Return(overlayWidget layout.OverlayWidget) *MockWidgetFactory_NewOverlay_Call { | |
| 281 | - | _c.Call.Return(overlayWidget) | |
| 253 | + | func (_c *MockWidgetFactory_NewOverlay_Call) Return(_a0 layout.OverlayWidget) *MockWidgetFactory_NewOverlay_Call { | |
| 254 | + | _c.Call.Return(_a0) | |
| 282 | 255 | return _c | |
| 283 | 256 | } | |
| 284 | 257 | ||
| @@ -287,22 +260,23 @@ func (_c *MockWidgetFactory_NewOverlay_Call) RunAndReturn(run func() layout.Over | |||
| 287 | 260 | return _c | |
| 288 | 261 | } | |
| 289 | 262 | ||
| 290 | - | // NewPaned provides a mock function for the type MockWidgetFactory | |
| 291 | - | func (_mock *MockWidgetFactory) NewPaned(orientation layout.Orientation) layout.PanedWidget { | |
| 292 | - | ret := _mock.Called(orientation) | |
| 263 | + | // NewPaned provides a mock function with given fields: orientation | |
| 264 | + | func (_m *MockWidgetFactory) NewPaned(orientation gtk.Orientation) layout.PanedWidget { | |
| 265 | + | ret := _m.Called(orientation) | |
| 293 | 266 | ||
| 294 | 267 | if len(ret) == 0 { | |
| 295 | 268 | panic("no return value specified for NewPaned") | |
| 296 | 269 | } | |
| 297 | 270 | ||
| 298 | 271 | var r0 layout.PanedWidget | |
| 299 | - | if returnFunc, ok := ret.Get(0).(func(layout.Orientation) layout.PanedWidget); ok { | |
| 300 | - | r0 = returnFunc(orientation) | |
| 272 | + | if rf, ok := ret.Get(0).(func(gtk.Orientation) layout.PanedWidget); ok { | |
| 273 | + | r0 = rf(orientation) | |
| 301 | 274 | } else { | |
| 302 | 275 | if ret.Get(0) != nil { | |
| 303 | 276 | r0 = ret.Get(0).(layout.PanedWidget) | |
| 304 | 277 | } | |
| 305 | 278 | } | |
| 279 | + | ||
| 306 | 280 | return r0 | |
| 307 | 281 | } | |
| 308 | 282 | ||
| @@ -312,50 +286,92 @@ type MockWidgetFactory_NewPaned_Call struct { | |||
| 312 | 286 | } | |
| 313 | 287 | ||
| 314 | 288 | // NewPaned is a helper method to define mock.On call | |
| 315 | - | // - orientation layout.Orientation | |
| 289 | + | // - orientation gtk.Orientation | |
| 316 | 290 | func (_e *MockWidgetFactory_Expecter) NewPaned(orientation interface{}) *MockWidgetFactory_NewPaned_Call { | |
| 317 | 291 | return &MockWidgetFactory_NewPaned_Call{Call: _e.mock.On("NewPaned", orientation)} | |
| 318 | 292 | } | |
| 319 | 293 | ||
| 320 | - | func (_c *MockWidgetFactory_NewPaned_Call) Run(run func(orientation layout.Orientation)) *MockWidgetFactory_NewPaned_Call { | |
| 294 | + | func (_c *MockWidgetFactory_NewPaned_Call) Run(run func(orientation gtk.Orientation)) *MockWidgetFactory_NewPaned_Call { | |
| 321 | 295 | _c.Call.Run(func(args mock.Arguments) { | |
| 322 | - | var arg0 layout.Orientation | |
| 323 | - | if args[0] != nil { | |
| 324 | - | arg0 = args[0].(layout.Orientation) | |
| 296 | + | run(args[0].(gtk.Orientation)) | |
| 297 | + | }) | |
| 298 | + | return _c | |
| 299 | + | } | |
| 300 | + | ||
| 301 | + | func (_c *MockWidgetFactory_NewPaned_Call) Return(_a0 layout.PanedWidget) *MockWidgetFactory_NewPaned_Call { | |
| 302 | + | _c.Call.Return(_a0) | |
| 303 | + | return _c | |
| 304 | + | } | |
| 305 | + | ||
| 306 | + | func (_c *MockWidgetFactory_NewPaned_Call) RunAndReturn(run func(gtk.Orientation) layout.PanedWidget) *MockWidgetFactory_NewPaned_Call { | |
| 307 | + | _c.Call.Return(run) | |
| 308 | + | return _c | |
| 309 | + | } | |
| 310 | + | ||
| 311 | + | // NewProgressBar provides a mock function with no fields | |
| 312 | + | func (_m *MockWidgetFactory) NewProgressBar() layout.ProgressBarWidget { | |
| 313 | + | ret := _m.Called() | |
| 314 | + | ||
| 315 | + | if len(ret) == 0 { | |
| 316 | + | panic("no return value specified for NewProgressBar") | |
| 317 | + | } | |
| 318 | + | ||
| 319 | + | var r0 layout.ProgressBarWidget | |
| 320 | + | if rf, ok := ret.Get(0).(func() layout.ProgressBarWidget); ok { | |
| 321 | + | r0 = rf() | |
| 322 | + | } else { | |
| 323 | + | if ret.Get(0) != nil { | |
| 324 | + | r0 = ret.Get(0).(layout.ProgressBarWidget) | |
| 325 | 325 | } | |
| 326 | - | run( | |
| 327 | - | arg0, | |
| 328 | - | ) | |
| 326 | + | } | |
| 327 | + | ||
| 328 | + | return r0 | |
| 329 | + | } | |
| 330 | + | ||
| 331 | + | // MockWidgetFactory_NewProgressBar_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewProgressBar' | |
| 332 | + | type MockWidgetFactory_NewProgressBar_Call struct { | |
| 333 | + | *mock.Call | |
| 334 | + | } | |
| 335 | + | ||
| 336 | + | // NewProgressBar is a helper method to define mock.On call | |
| 337 | + | func (_e *MockWidgetFactory_Expecter) NewProgressBar() *MockWidgetFactory_NewProgressBar_Call { | |
| 338 | + | return &MockWidgetFactory_NewProgressBar_Call{Call: _e.mock.On("NewProgressBar")} | |
| 339 | + | } | |
| 340 | + | ||
| 341 | + | func (_c *MockWidgetFactory_NewProgressBar_Call) Run(run func()) *MockWidgetFactory_NewProgressBar_Call { | |
| 342 | + | _c.Call.Run(func(args mock.Arguments) { | |
| 343 | + | run() | |
| 329 | 344 | }) | |
| 330 | 345 | return _c | |
| 331 | 346 | } | |
| 332 | 347 | ||
| 333 | - | func (_c *MockWidgetFactory_NewPaned_Call) Return(panedWidget layout.PanedWidget) *MockWidgetFactory_NewPaned_Call { | |
| 334 | - | _c.Call.Return(panedWidget) | |
| 348 | + | func (_c *MockWidgetFactory_NewProgressBar_Call) Return(_a0 layout.ProgressBarWidget) *MockWidgetFactory_NewProgressBar_Call { | |
| 349 | + | _c.Call.Return(_a0) | |
| 335 | 350 | return _c | |
| 336 | 351 | } | |
| 337 | 352 | ||
| 338 | - | func (_c *MockWidgetFactory_NewPaned_Call) RunAndReturn(run func(orientation layout.Orientation) layout.PanedWidget) *MockWidgetFactory_NewPaned_Call { | |
| 353 | + | func (_c *MockWidgetFactory_NewProgressBar_Call) RunAndReturn(run func() layout.ProgressBarWidget) *MockWidgetFactory_NewProgressBar_Call { | |
| 339 | 354 | _c.Call.Return(run) | |
| 340 | 355 | return _c | |
| 341 | 356 | } | |
| 342 | 357 | ||
| 343 | - | // WrapWidget provides a mock function for the type MockWidgetFactory | |
| 344 | - | func (_mock *MockWidgetFactory) WrapWidget(w *gtk.Widget) layout.Widget { | |
| 345 | - | ret := _mock.Called(w) | |
| 358 | + | // WrapWidget provides a mock function with given fields: w | |
| 359 | + | func (_m *MockWidgetFactory) WrapWidget(w *gtk.Widget) layout.Widget { | |
| 360 | + | ret := _m.Called(w) | |
| 346 | 361 | ||
| 347 | 362 | if len(ret) == 0 { | |
| 348 | 363 | panic("no return value specified for WrapWidget") | |
| 349 | 364 | } | |
| 350 | 365 | ||
| 351 | 366 | var r0 layout.Widget | |
| 352 | - | if returnFunc, ok := ret.Get(0).(func(*gtk.Widget) layout.Widget); ok { | |
| 353 | - | r0 = returnFunc(w) | |
| 367 | + | if rf, ok := ret.Get(0).(func(*gtk.Widget) layout.Widget); ok { | |
| 368 | + | r0 = rf(w) | |
| 354 | 369 | } else { | |
| 355 | 370 | if ret.Get(0) != nil { | |
| 356 | 371 | r0 = ret.Get(0).(layout.Widget) | |
| 357 | 372 | } | |
| 358 | 373 | } | |
| 374 | + | ||
| 359 | 375 | return r0 | |
| 360 | 376 | } | |
| 361 | 377 | ||
| @@ -372,23 +388,31 @@ func (_e *MockWidgetFactory_Expecter) WrapWidget(w interface{}) *MockWidgetFacto | |||
| 372 | 388 | ||
| 373 | 389 | func (_c *MockWidgetFactory_WrapWidget_Call) Run(run func(w *gtk.Widget)) *MockWidgetFactory_WrapWidget_Call { | |
| 374 | 390 | _c.Call.Run(func(args mock.Arguments) { | |
| 375 | - | var arg0 *gtk.Widget | |
| 376 | - | if args[0] != nil { | |
| 377 | - | arg0 = args[0].(*gtk.Widget) | |
| 378 | - | } | |
| 379 | - | run( | |
| 380 | - | arg0, | |
| 381 | - | ) | |
| 391 | + | run(args[0].(*gtk.Widget)) | |
| 382 | 392 | }) | |
| 383 | 393 | return _c | |
| 384 | 394 | } | |
| 385 | 395 | ||
| 386 | - | func (_c *MockWidgetFactory_WrapWidget_Call) Return(widget layout.Widget) *MockWidgetFactory_WrapWidget_Call { | |
| 387 | - | _c.Call.Return(widget) | |
| 396 | + | func (_c *MockWidgetFactory_WrapWidget_Call) Return(_a0 layout.Widget) *MockWidgetFactory_WrapWidget_Call { | |
| 397 | + | _c.Call.Return(_a0) | |
| 388 | 398 | return _c | |
| 389 | 399 | } | |
| 390 | 400 | ||
| 391 | - | func (_c *MockWidgetFactory_WrapWidget_Call) RunAndReturn(run func(w *gtk.Widget) layout.Widget) *MockWidgetFactory_WrapWidget_Call { | |
| 401 | + | func (_c *MockWidgetFactory_WrapWidget_Call) RunAndReturn(run func(*gtk.Widget) layout.Widget) *MockWidgetFactory_WrapWidget_Call { | |
| 392 | 402 | _c.Call.Return(run) | |
| 393 | 403 | return _c | |
| 394 | 404 | } | |
| 405 | + | ||
| 406 | + | // NewMockWidgetFactory creates a new instance of MockWidgetFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 407 | + | // The first argument is typically a *testing.T value. | |
| 408 | + | func NewMockWidgetFactory(t interface { | |
| 409 | + | mock.TestingT | |
| 410 | + | Cleanup(func()) | |
| 411 | + | }) *MockWidgetFactory { | |
| 412 | + | mock := &MockWidgetFactory{} | |
| 413 | + | mock.Mock.Test(t) | |
| 414 | + | ||
| 415 | + | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| 416 | + | ||
| 417 | + | return mock | |
| 418 | + | } | |