github.com/mailru/activerecord@v1.12.2/pkg/activerecord/mock_config.go (about) 1 // Code generated by mockery v2.20.0. DO NOT EDIT. 2 3 package activerecord 4 5 import ( 6 context "context" 7 time "time" 8 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // MockConfig is an autogenerated mock type for the ConfigInterface type 13 type MockConfig struct { 14 mock.Mock 15 } 16 17 type MockConfig_Expecter struct { 18 mock *mock.Mock 19 } 20 21 func (_m *MockConfig) EXPECT() *MockConfig_Expecter { 22 return &MockConfig_Expecter{mock: &_m.Mock} 23 } 24 25 // GetBool provides a mock function with given fields: ctx, confPath, dfl 26 func (_m *MockConfig) GetBool(ctx context.Context, confPath string, dfl ...bool) bool { 27 _va := make([]interface{}, len(dfl)) 28 for _i := range dfl { 29 _va[_i] = dfl[_i] 30 } 31 var _ca []interface{} 32 _ca = append(_ca, ctx, confPath) 33 _ca = append(_ca, _va...) 34 ret := _m.Called(_ca...) 35 36 var r0 bool 37 if rf, ok := ret.Get(0).(func(context.Context, string, ...bool) bool); ok { 38 r0 = rf(ctx, confPath, dfl...) 39 } else { 40 r0 = ret.Get(0).(bool) 41 } 42 43 return r0 44 } 45 46 // MockConfig_GetBool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBool' 47 type MockConfig_GetBool_Call struct { 48 *mock.Call 49 } 50 51 // GetBool is a helper method to define mock.On call 52 // - ctx context.Context 53 // - confPath string 54 // - dfl ...bool 55 func (_e *MockConfig_Expecter) GetBool(ctx interface{}, confPath interface{}, dfl ...interface{}) *MockConfig_GetBool_Call { 56 return &MockConfig_GetBool_Call{Call: _e.mock.On("GetBool", 57 append([]interface{}{ctx, confPath}, dfl...)...)} 58 } 59 60 func (_c *MockConfig_GetBool_Call) Run(run func(ctx context.Context, confPath string, dfl ...bool)) *MockConfig_GetBool_Call { 61 _c.Call.Run(func(args mock.Arguments) { 62 variadicArgs := make([]bool, len(args)-2) 63 for i, a := range args[2:] { 64 if a != nil { 65 variadicArgs[i] = a.(bool) 66 } 67 } 68 run(args[0].(context.Context), args[1].(string), variadicArgs...) 69 }) 70 return _c 71 } 72 73 func (_c *MockConfig_GetBool_Call) Return(_a0 bool) *MockConfig_GetBool_Call { 74 _c.Call.Return(_a0) 75 return _c 76 } 77 78 func (_c *MockConfig_GetBool_Call) RunAndReturn(run func(context.Context, string, ...bool) bool) *MockConfig_GetBool_Call { 79 _c.Call.Return(run) 80 return _c 81 } 82 83 // GetBoolIfExists provides a mock function with given fields: ctx, confPath 84 func (_m *MockConfig) GetBoolIfExists(ctx context.Context, confPath string) (bool, bool) { 85 ret := _m.Called(ctx, confPath) 86 87 var r0 bool 88 var r1 bool 89 if rf, ok := ret.Get(0).(func(context.Context, string) (bool, bool)); ok { 90 return rf(ctx, confPath) 91 } 92 if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { 93 r0 = rf(ctx, confPath) 94 } else { 95 r0 = ret.Get(0).(bool) 96 } 97 98 if rf, ok := ret.Get(1).(func(context.Context, string) bool); ok { 99 r1 = rf(ctx, confPath) 100 } else { 101 r1 = ret.Get(1).(bool) 102 } 103 104 return r0, r1 105 } 106 107 // MockConfig_GetBoolIfExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBoolIfExists' 108 type MockConfig_GetBoolIfExists_Call struct { 109 *mock.Call 110 } 111 112 // GetBoolIfExists is a helper method to define mock.On call 113 // - ctx context.Context 114 // - confPath string 115 func (_e *MockConfig_Expecter) GetBoolIfExists(ctx interface{}, confPath interface{}) *MockConfig_GetBoolIfExists_Call { 116 return &MockConfig_GetBoolIfExists_Call{Call: _e.mock.On("GetBoolIfExists", ctx, confPath)} 117 } 118 119 func (_c *MockConfig_GetBoolIfExists_Call) Run(run func(ctx context.Context, confPath string)) *MockConfig_GetBoolIfExists_Call { 120 _c.Call.Run(func(args mock.Arguments) { 121 run(args[0].(context.Context), args[1].(string)) 122 }) 123 return _c 124 } 125 126 func (_c *MockConfig_GetBoolIfExists_Call) Return(value bool, ok bool) *MockConfig_GetBoolIfExists_Call { 127 _c.Call.Return(value, ok) 128 return _c 129 } 130 131 func (_c *MockConfig_GetBoolIfExists_Call) RunAndReturn(run func(context.Context, string) (bool, bool)) *MockConfig_GetBoolIfExists_Call { 132 _c.Call.Return(run) 133 return _c 134 } 135 136 // GetDuration provides a mock function with given fields: ctx, confPath, dfl 137 func (_m *MockConfig) GetDuration(ctx context.Context, confPath string, dfl ...time.Duration) time.Duration { 138 _va := make([]interface{}, len(dfl)) 139 for _i := range dfl { 140 _va[_i] = dfl[_i] 141 } 142 var _ca []interface{} 143 _ca = append(_ca, ctx, confPath) 144 _ca = append(_ca, _va...) 145 ret := _m.Called(_ca...) 146 147 var r0 time.Duration 148 if rf, ok := ret.Get(0).(func(context.Context, string, ...time.Duration) time.Duration); ok { 149 r0 = rf(ctx, confPath, dfl...) 150 } else { 151 r0 = ret.Get(0).(time.Duration) 152 } 153 154 return r0 155 } 156 157 // MockConfig_GetDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDuration' 158 type MockConfig_GetDuration_Call struct { 159 *mock.Call 160 } 161 162 // GetDuration is a helper method to define mock.On call 163 // - ctx context.Context 164 // - confPath string 165 // - dfl ...time.Duration 166 func (_e *MockConfig_Expecter) GetDuration(ctx interface{}, confPath interface{}, dfl ...interface{}) *MockConfig_GetDuration_Call { 167 return &MockConfig_GetDuration_Call{Call: _e.mock.On("GetDuration", 168 append([]interface{}{ctx, confPath}, dfl...)...)} 169 } 170 171 func (_c *MockConfig_GetDuration_Call) Run(run func(ctx context.Context, confPath string, dfl ...time.Duration)) *MockConfig_GetDuration_Call { 172 _c.Call.Run(func(args mock.Arguments) { 173 variadicArgs := make([]time.Duration, len(args)-2) 174 for i, a := range args[2:] { 175 if a != nil { 176 variadicArgs[i] = a.(time.Duration) 177 } 178 } 179 run(args[0].(context.Context), args[1].(string), variadicArgs...) 180 }) 181 return _c 182 } 183 184 func (_c *MockConfig_GetDuration_Call) Return(_a0 time.Duration) *MockConfig_GetDuration_Call { 185 _c.Call.Return(_a0) 186 return _c 187 } 188 189 func (_c *MockConfig_GetDuration_Call) RunAndReturn(run func(context.Context, string, ...time.Duration) time.Duration) *MockConfig_GetDuration_Call { 190 _c.Call.Return(run) 191 return _c 192 } 193 194 // GetDurationIfExists provides a mock function with given fields: ctx, confPath 195 func (_m *MockConfig) GetDurationIfExists(ctx context.Context, confPath string) (time.Duration, bool) { 196 ret := _m.Called(ctx, confPath) 197 198 var r0 time.Duration 199 var r1 bool 200 if rf, ok := ret.Get(0).(func(context.Context, string) (time.Duration, bool)); ok { 201 return rf(ctx, confPath) 202 } 203 if rf, ok := ret.Get(0).(func(context.Context, string) time.Duration); ok { 204 r0 = rf(ctx, confPath) 205 } else { 206 r0 = ret.Get(0).(time.Duration) 207 } 208 209 if rf, ok := ret.Get(1).(func(context.Context, string) bool); ok { 210 r1 = rf(ctx, confPath) 211 } else { 212 r1 = ret.Get(1).(bool) 213 } 214 215 return r0, r1 216 } 217 218 // MockConfig_GetDurationIfExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDurationIfExists' 219 type MockConfig_GetDurationIfExists_Call struct { 220 *mock.Call 221 } 222 223 // GetDurationIfExists is a helper method to define mock.On call 224 // - ctx context.Context 225 // - confPath string 226 func (_e *MockConfig_Expecter) GetDurationIfExists(ctx interface{}, confPath interface{}) *MockConfig_GetDurationIfExists_Call { 227 return &MockConfig_GetDurationIfExists_Call{Call: _e.mock.On("GetDurationIfExists", ctx, confPath)} 228 } 229 230 func (_c *MockConfig_GetDurationIfExists_Call) Run(run func(ctx context.Context, confPath string)) *MockConfig_GetDurationIfExists_Call { 231 _c.Call.Run(func(args mock.Arguments) { 232 run(args[0].(context.Context), args[1].(string)) 233 }) 234 return _c 235 } 236 237 func (_c *MockConfig_GetDurationIfExists_Call) Return(_a0 time.Duration, _a1 bool) *MockConfig_GetDurationIfExists_Call { 238 _c.Call.Return(_a0, _a1) 239 return _c 240 } 241 242 func (_c *MockConfig_GetDurationIfExists_Call) RunAndReturn(run func(context.Context, string) (time.Duration, bool)) *MockConfig_GetDurationIfExists_Call { 243 _c.Call.Return(run) 244 return _c 245 } 246 247 // GetInt provides a mock function with given fields: ctx, confPath, dfl 248 func (_m *MockConfig) GetInt(ctx context.Context, confPath string, dfl ...int) int { 249 _va := make([]interface{}, len(dfl)) 250 for _i := range dfl { 251 _va[_i] = dfl[_i] 252 } 253 var _ca []interface{} 254 _ca = append(_ca, ctx, confPath) 255 _ca = append(_ca, _va...) 256 ret := _m.Called(_ca...) 257 258 var r0 int 259 if rf, ok := ret.Get(0).(func(context.Context, string, ...int) int); ok { 260 r0 = rf(ctx, confPath, dfl...) 261 } else { 262 r0 = ret.Get(0).(int) 263 } 264 265 return r0 266 } 267 268 // MockConfig_GetInt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInt' 269 type MockConfig_GetInt_Call struct { 270 *mock.Call 271 } 272 273 // GetInt is a helper method to define mock.On call 274 // - ctx context.Context 275 // - confPath string 276 // - dfl ...int 277 func (_e *MockConfig_Expecter) GetInt(ctx interface{}, confPath interface{}, dfl ...interface{}) *MockConfig_GetInt_Call { 278 return &MockConfig_GetInt_Call{Call: _e.mock.On("GetInt", 279 append([]interface{}{ctx, confPath}, dfl...)...)} 280 } 281 282 func (_c *MockConfig_GetInt_Call) Run(run func(ctx context.Context, confPath string, dfl ...int)) *MockConfig_GetInt_Call { 283 _c.Call.Run(func(args mock.Arguments) { 284 variadicArgs := make([]int, len(args)-2) 285 for i, a := range args[2:] { 286 if a != nil { 287 variadicArgs[i] = a.(int) 288 } 289 } 290 run(args[0].(context.Context), args[1].(string), variadicArgs...) 291 }) 292 return _c 293 } 294 295 func (_c *MockConfig_GetInt_Call) Return(_a0 int) *MockConfig_GetInt_Call { 296 _c.Call.Return(_a0) 297 return _c 298 } 299 300 func (_c *MockConfig_GetInt_Call) RunAndReturn(run func(context.Context, string, ...int) int) *MockConfig_GetInt_Call { 301 _c.Call.Return(run) 302 return _c 303 } 304 305 // GetIntIfExists provides a mock function with given fields: ctx, confPath 306 func (_m *MockConfig) GetIntIfExists(ctx context.Context, confPath string) (int, bool) { 307 ret := _m.Called(ctx, confPath) 308 309 var r0 int 310 var r1 bool 311 if rf, ok := ret.Get(0).(func(context.Context, string) (int, bool)); ok { 312 return rf(ctx, confPath) 313 } 314 if rf, ok := ret.Get(0).(func(context.Context, string) int); ok { 315 r0 = rf(ctx, confPath) 316 } else { 317 r0 = ret.Get(0).(int) 318 } 319 320 if rf, ok := ret.Get(1).(func(context.Context, string) bool); ok { 321 r1 = rf(ctx, confPath) 322 } else { 323 r1 = ret.Get(1).(bool) 324 } 325 326 return r0, r1 327 } 328 329 // MockConfig_GetIntIfExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIntIfExists' 330 type MockConfig_GetIntIfExists_Call struct { 331 *mock.Call 332 } 333 334 // GetIntIfExists is a helper method to define mock.On call 335 // - ctx context.Context 336 // - confPath string 337 func (_e *MockConfig_Expecter) GetIntIfExists(ctx interface{}, confPath interface{}) *MockConfig_GetIntIfExists_Call { 338 return &MockConfig_GetIntIfExists_Call{Call: _e.mock.On("GetIntIfExists", ctx, confPath)} 339 } 340 341 func (_c *MockConfig_GetIntIfExists_Call) Run(run func(ctx context.Context, confPath string)) *MockConfig_GetIntIfExists_Call { 342 _c.Call.Run(func(args mock.Arguments) { 343 run(args[0].(context.Context), args[1].(string)) 344 }) 345 return _c 346 } 347 348 func (_c *MockConfig_GetIntIfExists_Call) Return(_a0 int, _a1 bool) *MockConfig_GetIntIfExists_Call { 349 _c.Call.Return(_a0, _a1) 350 return _c 351 } 352 353 func (_c *MockConfig_GetIntIfExists_Call) RunAndReturn(run func(context.Context, string) (int, bool)) *MockConfig_GetIntIfExists_Call { 354 _c.Call.Return(run) 355 return _c 356 } 357 358 // GetLastUpdateTime provides a mock function with given fields: 359 func (_m *MockConfig) GetLastUpdateTime() time.Time { 360 ret := _m.Called() 361 362 var r0 time.Time 363 if rf, ok := ret.Get(0).(func() time.Time); ok { 364 r0 = rf() 365 } else { 366 r0 = ret.Get(0).(time.Time) 367 } 368 369 return r0 370 } 371 372 // MockConfig_GetLastUpdateTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastUpdateTime' 373 type MockConfig_GetLastUpdateTime_Call struct { 374 *mock.Call 375 } 376 377 // GetLastUpdateTime is a helper method to define mock.On call 378 func (_e *MockConfig_Expecter) GetLastUpdateTime() *MockConfig_GetLastUpdateTime_Call { 379 return &MockConfig_GetLastUpdateTime_Call{Call: _e.mock.On("GetLastUpdateTime")} 380 } 381 382 func (_c *MockConfig_GetLastUpdateTime_Call) Run(run func()) *MockConfig_GetLastUpdateTime_Call { 383 _c.Call.Run(func(args mock.Arguments) { 384 run() 385 }) 386 return _c 387 } 388 389 func (_c *MockConfig_GetLastUpdateTime_Call) Return(_a0 time.Time) *MockConfig_GetLastUpdateTime_Call { 390 _c.Call.Return(_a0) 391 return _c 392 } 393 394 func (_c *MockConfig_GetLastUpdateTime_Call) RunAndReturn(run func() time.Time) *MockConfig_GetLastUpdateTime_Call { 395 _c.Call.Return(run) 396 return _c 397 } 398 399 // GetString provides a mock function with given fields: ctx, confPath, dfl 400 func (_m *MockConfig) GetString(ctx context.Context, confPath string, dfl ...string) string { 401 _va := make([]interface{}, len(dfl)) 402 for _i := range dfl { 403 _va[_i] = dfl[_i] 404 } 405 var _ca []interface{} 406 _ca = append(_ca, ctx, confPath) 407 _ca = append(_ca, _va...) 408 ret := _m.Called(_ca...) 409 410 var r0 string 411 if rf, ok := ret.Get(0).(func(context.Context, string, ...string) string); ok { 412 r0 = rf(ctx, confPath, dfl...) 413 } else { 414 r0 = ret.Get(0).(string) 415 } 416 417 return r0 418 } 419 420 // MockConfig_GetString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetString' 421 type MockConfig_GetString_Call struct { 422 *mock.Call 423 } 424 425 // GetString is a helper method to define mock.On call 426 // - ctx context.Context 427 // - confPath string 428 // - dfl ...string 429 func (_e *MockConfig_Expecter) GetString(ctx interface{}, confPath interface{}, dfl ...interface{}) *MockConfig_GetString_Call { 430 return &MockConfig_GetString_Call{Call: _e.mock.On("GetString", 431 append([]interface{}{ctx, confPath}, dfl...)...)} 432 } 433 434 func (_c *MockConfig_GetString_Call) Run(run func(ctx context.Context, confPath string, dfl ...string)) *MockConfig_GetString_Call { 435 _c.Call.Run(func(args mock.Arguments) { 436 variadicArgs := make([]string, len(args)-2) 437 for i, a := range args[2:] { 438 if a != nil { 439 variadicArgs[i] = a.(string) 440 } 441 } 442 run(args[0].(context.Context), args[1].(string), variadicArgs...) 443 }) 444 return _c 445 } 446 447 func (_c *MockConfig_GetString_Call) Return(_a0 string) *MockConfig_GetString_Call { 448 _c.Call.Return(_a0) 449 return _c 450 } 451 452 func (_c *MockConfig_GetString_Call) RunAndReturn(run func(context.Context, string, ...string) string) *MockConfig_GetString_Call { 453 _c.Call.Return(run) 454 return _c 455 } 456 457 // GetStringIfExists provides a mock function with given fields: ctx, confPath 458 func (_m *MockConfig) GetStringIfExists(ctx context.Context, confPath string) (string, bool) { 459 ret := _m.Called(ctx, confPath) 460 461 var r0 string 462 var r1 bool 463 if rf, ok := ret.Get(0).(func(context.Context, string) (string, bool)); ok { 464 return rf(ctx, confPath) 465 } 466 if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { 467 r0 = rf(ctx, confPath) 468 } else { 469 r0 = ret.Get(0).(string) 470 } 471 472 if rf, ok := ret.Get(1).(func(context.Context, string) bool); ok { 473 r1 = rf(ctx, confPath) 474 } else { 475 r1 = ret.Get(1).(bool) 476 } 477 478 return r0, r1 479 } 480 481 // MockConfig_GetStringIfExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStringIfExists' 482 type MockConfig_GetStringIfExists_Call struct { 483 *mock.Call 484 } 485 486 // GetStringIfExists is a helper method to define mock.On call 487 // - ctx context.Context 488 // - confPath string 489 func (_e *MockConfig_Expecter) GetStringIfExists(ctx interface{}, confPath interface{}) *MockConfig_GetStringIfExists_Call { 490 return &MockConfig_GetStringIfExists_Call{Call: _e.mock.On("GetStringIfExists", ctx, confPath)} 491 } 492 493 func (_c *MockConfig_GetStringIfExists_Call) Run(run func(ctx context.Context, confPath string)) *MockConfig_GetStringIfExists_Call { 494 _c.Call.Run(func(args mock.Arguments) { 495 run(args[0].(context.Context), args[1].(string)) 496 }) 497 return _c 498 } 499 500 func (_c *MockConfig_GetStringIfExists_Call) Return(_a0 string, _a1 bool) *MockConfig_GetStringIfExists_Call { 501 _c.Call.Return(_a0, _a1) 502 return _c 503 } 504 505 func (_c *MockConfig_GetStringIfExists_Call) RunAndReturn(run func(context.Context, string) (string, bool)) *MockConfig_GetStringIfExists_Call { 506 _c.Call.Return(run) 507 return _c 508 } 509 510 // GetStrings provides a mock function with given fields: ctx, confPath, dfl 511 func (_m *MockConfig) GetStrings(ctx context.Context, confPath string, dfl []string) []string { 512 ret := _m.Called(ctx, confPath, dfl) 513 514 var r0 []string 515 if rf, ok := ret.Get(0).(func(context.Context, string, []string) []string); ok { 516 r0 = rf(ctx, confPath, dfl) 517 } else { 518 if ret.Get(0) != nil { 519 r0 = ret.Get(0).([]string) 520 } 521 } 522 523 return r0 524 } 525 526 // MockConfig_GetStrings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStrings' 527 type MockConfig_GetStrings_Call struct { 528 *mock.Call 529 } 530 531 // GetStrings is a helper method to define mock.On call 532 // - ctx context.Context 533 // - confPath string 534 // - dfl []string 535 func (_e *MockConfig_Expecter) GetStrings(ctx interface{}, confPath interface{}, dfl interface{}) *MockConfig_GetStrings_Call { 536 return &MockConfig_GetStrings_Call{Call: _e.mock.On("GetStrings", ctx, confPath, dfl)} 537 } 538 539 func (_c *MockConfig_GetStrings_Call) Run(run func(ctx context.Context, confPath string, dfl []string)) *MockConfig_GetStrings_Call { 540 _c.Call.Run(func(args mock.Arguments) { 541 run(args[0].(context.Context), args[1].(string), args[2].([]string)) 542 }) 543 return _c 544 } 545 546 func (_c *MockConfig_GetStrings_Call) Return(_a0 []string) *MockConfig_GetStrings_Call { 547 _c.Call.Return(_a0) 548 return _c 549 } 550 551 func (_c *MockConfig_GetStrings_Call) RunAndReturn(run func(context.Context, string, []string) []string) *MockConfig_GetStrings_Call { 552 _c.Call.Return(run) 553 return _c 554 } 555 556 // GetStruct provides a mock function with given fields: ctx, confPath, valuePtr 557 func (_m *MockConfig) GetStruct(ctx context.Context, confPath string, valuePtr interface{}) (bool, error) { 558 ret := _m.Called(ctx, confPath, valuePtr) 559 560 var r0 bool 561 var r1 error 562 if rf, ok := ret.Get(0).(func(context.Context, string, interface{}) (bool, error)); ok { 563 return rf(ctx, confPath, valuePtr) 564 } 565 if rf, ok := ret.Get(0).(func(context.Context, string, interface{}) bool); ok { 566 r0 = rf(ctx, confPath, valuePtr) 567 } else { 568 r0 = ret.Get(0).(bool) 569 } 570 571 if rf, ok := ret.Get(1).(func(context.Context, string, interface{}) error); ok { 572 r1 = rf(ctx, confPath, valuePtr) 573 } else { 574 r1 = ret.Error(1) 575 } 576 577 return r0, r1 578 } 579 580 // MockConfig_GetStruct_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStruct' 581 type MockConfig_GetStruct_Call struct { 582 *mock.Call 583 } 584 585 // GetStruct is a helper method to define mock.On call 586 // - ctx context.Context 587 // - confPath string 588 // - valuePtr interface{} 589 func (_e *MockConfig_Expecter) GetStruct(ctx interface{}, confPath interface{}, valuePtr interface{}) *MockConfig_GetStruct_Call { 590 return &MockConfig_GetStruct_Call{Call: _e.mock.On("GetStruct", ctx, confPath, valuePtr)} 591 } 592 593 func (_c *MockConfig_GetStruct_Call) Run(run func(ctx context.Context, confPath string, valuePtr interface{})) *MockConfig_GetStruct_Call { 594 _c.Call.Run(func(args mock.Arguments) { 595 run(args[0].(context.Context), args[1].(string), args[2].(interface{})) 596 }) 597 return _c 598 } 599 600 func (_c *MockConfig_GetStruct_Call) Return(_a0 bool, _a1 error) *MockConfig_GetStruct_Call { 601 _c.Call.Return(_a0, _a1) 602 return _c 603 } 604 605 func (_c *MockConfig_GetStruct_Call) RunAndReturn(run func(context.Context, string, interface{}) (bool, error)) *MockConfig_GetStruct_Call { 606 _c.Call.Return(run) 607 return _c 608 } 609 610 type mockConstructorTestingTNewMockConfig interface { 611 mock.TestingT 612 Cleanup(func()) 613 } 614 615 // NewMockConfig creates a new instance of MockConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 616 func NewMockConfig(t mockConstructorTestingTNewMockConfig) *MockConfig { 617 mock := &MockConfig{} 618 mock.Mock.Test(t) 619 620 t.Cleanup(func() { mock.AssertExpectations(t) }) 621 622 return mock 623 }