// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package portsmocks import ( "time" "github.com/bnema/neferwl/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewMockClock creates a new instance of MockClock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockClock(t interface { mock.TestingT Cleanup(func()) }) *MockClock { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockClock{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockClock is an autogenerated mock type for the Clock type type MockClock struct { mock.Mock } type MockClock_Expecter struct { mock *mock.Mock } func (_m *MockClock) EXPECT() *MockClock_Expecter { return &MockClock_Expecter{mock: &_m.Mock} } // AfterFunc provides a mock function for the type MockClock func (_mock *MockClock) AfterFunc(d time.Duration, f func()) ports.Timer { ret := _mock.Called(d, f) if len(ret) == 0 { panic("no return value specified for AfterFunc") } var r0 ports.Timer if returnFunc, ok := ret.Get(0).(func(time.Duration, func()) ports.Timer); ok { r0 = returnFunc(d, f) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ports.Timer) } } return r0 } // MockClock_AfterFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterFunc' type MockClock_AfterFunc_Call struct { *mock.Call } // AfterFunc is a helper method to define mock.On call // - d time.Duration // - f func() func (_e *MockClock_Expecter) AfterFunc(d any, f any) *MockClock_AfterFunc_Call { return &MockClock_AfterFunc_Call{Call: _e.mock.On("AfterFunc", d, f)} } func (_c *MockClock_AfterFunc_Call) Run(run func(d time.Duration, f func())) *MockClock_AfterFunc_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 time.Duration if args[0] != nil { arg0 = args[0].(time.Duration) } var arg1 func() if args[1] != nil { arg1 = args[1].(func()) } run( arg0, arg1, ) }) return _c } func (_c *MockClock_AfterFunc_Call) Return(timer ports.Timer) *MockClock_AfterFunc_Call { _c.Call.Return(timer) return _c } func (_c *MockClock_AfterFunc_Call) RunAndReturn(run func(d time.Duration, f func()) ports.Timer) *MockClock_AfterFunc_Call { _c.Call.Return(run) return _c } // NewTicker provides a mock function for the type MockClock func (_mock *MockClock) NewTicker(d time.Duration) ports.Ticker { ret := _mock.Called(d) if len(ret) == 0 { panic("no return value specified for NewTicker") } var r0 ports.Ticker if returnFunc, ok := ret.Get(0).(func(time.Duration) ports.Ticker); ok { r0 = returnFunc(d) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ports.Ticker) } } return r0 } // MockClock_NewTicker_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTicker' type MockClock_NewTicker_Call struct { *mock.Call } // NewTicker is a helper method to define mock.On call // - d time.Duration func (_e *MockClock_Expecter) NewTicker(d any) *MockClock_NewTicker_Call { return &MockClock_NewTicker_Call{Call: _e.mock.On("NewTicker", d)} } func (_c *MockClock_NewTicker_Call) Run(run func(d time.Duration)) *MockClock_NewTicker_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 time.Duration if args[0] != nil { arg0 = args[0].(time.Duration) } run( arg0, ) }) return _c } func (_c *MockClock_NewTicker_Call) Return(ticker ports.Ticker) *MockClock_NewTicker_Call { _c.Call.Return(ticker) return _c } func (_c *MockClock_NewTicker_Call) RunAndReturn(run func(d time.Duration) ports.Ticker) *MockClock_NewTicker_Call { _c.Call.Return(run) return _c } // NewTimer provides a mock function for the type MockClock func (_mock *MockClock) NewTimer(d time.Duration) ports.Timer { ret := _mock.Called(d) if len(ret) == 0 { panic("no return value specified for NewTimer") } var r0 ports.Timer if returnFunc, ok := ret.Get(0).(func(time.Duration) ports.Timer); ok { r0 = returnFunc(d) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ports.Timer) } } return r0 } // MockClock_NewTimer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTimer' type MockClock_NewTimer_Call struct { *mock.Call } // NewTimer is a helper method to define mock.On call // - d time.Duration func (_e *MockClock_Expecter) NewTimer(d any) *MockClock_NewTimer_Call { return &MockClock_NewTimer_Call{Call: _e.mock.On("NewTimer", d)} } func (_c *MockClock_NewTimer_Call) Run(run func(d time.Duration)) *MockClock_NewTimer_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 time.Duration if args[0] != nil { arg0 = args[0].(time.Duration) } run( arg0, ) }) return _c } func (_c *MockClock_NewTimer_Call) Return(timer ports.Timer) *MockClock_NewTimer_Call { _c.Call.Return(timer) return _c } func (_c *MockClock_NewTimer_Call) RunAndReturn(run func(d time.Duration) ports.Timer) *MockClock_NewTimer_Call { _c.Call.Return(run) return _c } // Now provides a mock function for the type MockClock func (_mock *MockClock) Now() time.Time { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Now") } var r0 time.Time if returnFunc, ok := ret.Get(0).(func() time.Time); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(time.Time) } return r0 } // MockClock_Now_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Now' type MockClock_Now_Call struct { *mock.Call } // Now is a helper method to define mock.On call func (_e *MockClock_Expecter) Now() *MockClock_Now_Call { return &MockClock_Now_Call{Call: _e.mock.On("Now")} } func (_c *MockClock_Now_Call) Run(run func()) *MockClock_Now_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockClock_Now_Call) Return(time1 time.Time) *MockClock_Now_Call { _c.Call.Return(time1) return _c } func (_c *MockClock_Now_Call) RunAndReturn(run func() time.Time) *MockClock_Now_Call { _c.Call.Return(run) return _c } // NewMockTimer creates a new instance of MockTimer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockTimer(t interface { mock.TestingT Cleanup(func()) }) *MockTimer { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockTimer{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockTimer is an autogenerated mock type for the Timer type type MockTimer struct { mock.Mock } type MockTimer_Expecter struct { mock *mock.Mock } func (_m *MockTimer) EXPECT() *MockTimer_Expecter { return &MockTimer_Expecter{mock: &_m.Mock} } // C provides a mock function for the type MockTimer func (_mock *MockTimer) C() <-chan time.Time { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for C") } var r0 <-chan time.Time if returnFunc, ok := ret.Get(0).(func() <-chan time.Time); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(<-chan time.Time) } } return r0 } // MockTimer_C_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'C' type MockTimer_C_Call struct { *mock.Call } // C is a helper method to define mock.On call func (_e *MockTimer_Expecter) C() *MockTimer_C_Call { return &MockTimer_C_Call{Call: _e.mock.On("C")} } func (_c *MockTimer_C_Call) Run(run func()) *MockTimer_C_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockTimer_C_Call) Return(timeCh <-chan time.Time) *MockTimer_C_Call { _c.Call.Return(timeCh) return _c } func (_c *MockTimer_C_Call) RunAndReturn(run func() <-chan time.Time) *MockTimer_C_Call { _c.Call.Return(run) return _c } // Reset provides a mock function for the type MockTimer func (_mock *MockTimer) Reset(d time.Duration) bool { ret := _mock.Called(d) if len(ret) == 0 { panic("no return value specified for Reset") } var r0 bool if returnFunc, ok := ret.Get(0).(func(time.Duration) bool); ok { r0 = returnFunc(d) } else { r0 = ret.Get(0).(bool) } return r0 } // MockTimer_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' type MockTimer_Reset_Call struct { *mock.Call } // Reset is a helper method to define mock.On call // - d time.Duration func (_e *MockTimer_Expecter) Reset(d any) *MockTimer_Reset_Call { return &MockTimer_Reset_Call{Call: _e.mock.On("Reset", d)} } func (_c *MockTimer_Reset_Call) Run(run func(d time.Duration)) *MockTimer_Reset_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 time.Duration if args[0] != nil { arg0 = args[0].(time.Duration) } run( arg0, ) }) return _c } func (_c *MockTimer_Reset_Call) Return(b bool) *MockTimer_Reset_Call { _c.Call.Return(b) return _c } func (_c *MockTimer_Reset_Call) RunAndReturn(run func(d time.Duration) bool) *MockTimer_Reset_Call { _c.Call.Return(run) return _c } // Stop provides a mock function for the type MockTimer func (_mock *MockTimer) Stop() bool { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Stop") } var r0 bool if returnFunc, ok := ret.Get(0).(func() bool); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } return r0 } // MockTimer_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' type MockTimer_Stop_Call struct { *mock.Call } // Stop is a helper method to define mock.On call func (_e *MockTimer_Expecter) Stop() *MockTimer_Stop_Call { return &MockTimer_Stop_Call{Call: _e.mock.On("Stop")} } func (_c *MockTimer_Stop_Call) Run(run func()) *MockTimer_Stop_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockTimer_Stop_Call) Return(b bool) *MockTimer_Stop_Call { _c.Call.Return(b) return _c } func (_c *MockTimer_Stop_Call) RunAndReturn(run func() bool) *MockTimer_Stop_Call { _c.Call.Return(run) return _c } // NewMockTicker creates a new instance of MockTicker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockTicker(t interface { mock.TestingT Cleanup(func()) }) *MockTicker { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockTicker{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockTicker is an autogenerated mock type for the Ticker type type MockTicker struct { mock.Mock } type MockTicker_Expecter struct { mock *mock.Mock } func (_m *MockTicker) EXPECT() *MockTicker_Expecter { return &MockTicker_Expecter{mock: &_m.Mock} } // C provides a mock function for the type MockTicker func (_mock *MockTicker) C() <-chan time.Time { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for C") } var r0 <-chan time.Time if returnFunc, ok := ret.Get(0).(func() <-chan time.Time); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(<-chan time.Time) } } return r0 } // MockTicker_C_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'C' type MockTicker_C_Call struct { *mock.Call } // C is a helper method to define mock.On call func (_e *MockTicker_Expecter) C() *MockTicker_C_Call { return &MockTicker_C_Call{Call: _e.mock.On("C")} } func (_c *MockTicker_C_Call) Run(run func()) *MockTicker_C_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockTicker_C_Call) Return(timeCh <-chan time.Time) *MockTicker_C_Call { _c.Call.Return(timeCh) return _c } func (_c *MockTicker_C_Call) RunAndReturn(run func() <-chan time.Time) *MockTicker_C_Call { _c.Call.Return(run) return _c } // Stop provides a mock function for the type MockTicker func (_mock *MockTicker) Stop() { _mock.Called() return } // MockTicker_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' type MockTicker_Stop_Call struct { *mock.Call } // Stop is a helper method to define mock.On call func (_e *MockTicker_Expecter) Stop() *MockTicker_Stop_Call { return &MockTicker_Stop_Call{Call: _e.mock.On("Stop")} } func (_c *MockTicker_Stop_Call) Run(run func()) *MockTicker_Stop_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockTicker_Stop_Call) Return() *MockTicker_Stop_Call { _c.Call.Return() return _c } func (_c *MockTicker_Stop_Call) RunAndReturn(run func()) *MockTicker_Stop_Call { _c.Run(run) return _c }