// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewMaintenanceScheduler creates a new instance of MaintenanceScheduler. 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 NewMaintenanceScheduler(t interface { mock.TestingT Cleanup(func()) }) *MaintenanceScheduler { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MaintenanceScheduler{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MaintenanceScheduler is an autogenerated mock type for the MaintenanceScheduler type type MaintenanceScheduler struct { mock.Mock } type MaintenanceScheduler_Expecter struct { mock *mock.Mock } func (_m *MaintenanceScheduler) EXPECT() *MaintenanceScheduler_Expecter { return &MaintenanceScheduler_Expecter{mock: &_m.Mock} } // Schedule provides a mock function for the type MaintenanceScheduler func (_mock *MaintenanceScheduler) Schedule(ctx context.Context, name domain.RepoName) { _mock.Called(ctx, name) return } // MaintenanceScheduler_Schedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Schedule' type MaintenanceScheduler_Schedule_Call struct { *mock.Call } // Schedule is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName func (_e *MaintenanceScheduler_Expecter) Schedule(ctx any, name any) *MaintenanceScheduler_Schedule_Call { return &MaintenanceScheduler_Schedule_Call{Call: _e.mock.On("Schedule", ctx, name)} } func (_c *MaintenanceScheduler_Schedule_Call) Run(run func(ctx context.Context, name domain.RepoName)) *MaintenanceScheduler_Schedule_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } run( arg0, arg1, ) }) return _c } func (_c *MaintenanceScheduler_Schedule_Call) Return() *MaintenanceScheduler_Schedule_Call { _c.Call.Return() return _c } func (_c *MaintenanceScheduler_Schedule_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName)) *MaintenanceScheduler_Schedule_Call { _c.Run(run) return _c }