| 1 | // Code generated by mockery; DO NOT EDIT. |
| 2 | // github.com/vektra/mockery |
| 3 | // template: testify |
| 4 | |
| 5 | package mocks |
| 6 | |
| 7 | import ( |
| 8 | "time" |
| 9 | |
| 10 | mock "github.com/stretchr/testify/mock" |
| 11 | ) |
| 12 | |
| 13 | // NewMockSleeper creates a new instance of MockSleeper. 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 NewMockSleeper(t interface { |
| 16 | mock.TestingT |
| 17 | Cleanup(func()) |
| 18 | }) *MockSleeper { |
| 19 | mock := &MockSleeper{} |
| 20 | mock.Mock.Test(t) |
| 21 | |
| 22 | t.Cleanup(func() { mock.AssertExpectations(t) }) |
| 23 | |
| 24 | return mock |
| 25 | } |
| 26 | |
| 27 | // MockSleeper is an autogenerated mock type for the Sleeper type |
| 28 | type MockSleeper struct { |
| 29 | mock.Mock |
| 30 | } |
| 31 | |
| 32 | type MockSleeper_Expecter struct { |
| 33 | mock *mock.Mock |
| 34 | } |
| 35 | |
| 36 | func (_m *MockSleeper) EXPECT() *MockSleeper_Expecter { |
| 37 | return &MockSleeper_Expecter{mock: &_m.Mock} |
| 38 | } |
| 39 | |
| 40 | // Sleep provides a mock function for the type MockSleeper |
| 41 | func (_mock *MockSleeper) Sleep(d time.Duration) { |
| 42 | _mock.Called(d) |
| 43 | return |
| 44 | } |
| 45 | |
| 46 | // MockSleeper_Sleep_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sleep' |
| 47 | type MockSleeper_Sleep_Call struct { |
| 48 | *mock.Call |
| 49 | } |
| 50 | |
| 51 | // Sleep is a helper method to define mock.On call |
| 52 | // - d time.Duration |
| 53 | func (_e *MockSleeper_Expecter) Sleep(d any) *MockSleeper_Sleep_Call { |
| 54 | return &MockSleeper_Sleep_Call{Call: _e.mock.On("Sleep", d)} |
| 55 | } |
| 56 | |
| 57 | func (_c *MockSleeper_Sleep_Call) Run(run func(d time.Duration)) *MockSleeper_Sleep_Call { |
| 58 | _c.Call.Run(func(args mock.Arguments) { |
| 59 | var arg0 time.Duration |
| 60 | if args[0] != nil { |
| 61 | arg0 = args[0].(time.Duration) |
| 62 | } |
| 63 | run( |
| 64 | arg0, |
| 65 | ) |
| 66 | }) |
| 67 | return _c |
| 68 | } |
| 69 | |
| 70 | func (_c *MockSleeper_Sleep_Call) Return() *MockSleeper_Sleep_Call { |
| 71 | _c.Call.Return() |
| 72 | return _c |
| 73 | } |
| 74 | |
| 75 | func (_c *MockSleeper_Sleep_Call) RunAndReturn(run func(d time.Duration)) *MockSleeper_Sleep_Call { |
| 76 | _c.Run(run) |
| 77 | return _c |
| 78 | } |