// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "time" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewCIWorkflowStore creates a new instance of CIWorkflowStore. 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 NewCIWorkflowStore(t interface { mock.TestingT Cleanup(func()) }) *CIWorkflowStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CIWorkflowStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CIWorkflowStore is an autogenerated mock type for the CIWorkflowStore type type CIWorkflowStore struct { mock.Mock } type CIWorkflowStore_Expecter struct { mock *mock.Mock } func (_m *CIWorkflowStore) EXPECT() *CIWorkflowStore_Expecter { return &CIWorkflowStore_Expecter{mock: &_m.Mock} } // DisableWorkflow provides a mock function for the type CIWorkflowStore func (_mock *CIWorkflowStore) DisableWorkflow(ctx context.Context, repo domain.RepoName, path string, at time.Time) error { ret := _mock.Called(ctx, repo, path, at) if len(ret) == 0 { panic("no return value specified for DisableWorkflow") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, time.Time) error); ok { r0 = returnFunc(ctx, repo, path, at) } else { r0 = ret.Error(0) } return r0 } // CIWorkflowStore_DisableWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableWorkflow' type CIWorkflowStore_DisableWorkflow_Call struct { *mock.Call } // DisableWorkflow is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - path string // - at time.Time func (_e *CIWorkflowStore_Expecter) DisableWorkflow(ctx any, repo any, path any, at any) *CIWorkflowStore_DisableWorkflow_Call { return &CIWorkflowStore_DisableWorkflow_Call{Call: _e.mock.On("DisableWorkflow", ctx, repo, path, at)} } func (_c *CIWorkflowStore_DisableWorkflow_Call) Run(run func(ctx context.Context, repo domain.RepoName, path string, at time.Time)) *CIWorkflowStore_DisableWorkflow_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) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 time.Time if args[3] != nil { arg3 = args[3].(time.Time) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *CIWorkflowStore_DisableWorkflow_Call) Return(err error) *CIWorkflowStore_DisableWorkflow_Call { _c.Call.Return(err) return _c } func (_c *CIWorkflowStore_DisableWorkflow_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, path string, at time.Time) error) *CIWorkflowStore_DisableWorkflow_Call { _c.Call.Return(run) return _c } // DisabledWorkflows provides a mock function for the type CIWorkflowStore func (_mock *CIWorkflowStore) DisabledWorkflows(ctx context.Context, repo domain.RepoName) ([]string, error) { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for DisabledWorkflows") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) ([]string, error)); ok { return returnFunc(ctx, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) []string); ok { r0 = returnFunc(ctx, repo) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, repo) } else { r1 = ret.Error(1) } return r0, r1 } // CIWorkflowStore_DisabledWorkflows_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisabledWorkflows' type CIWorkflowStore_DisabledWorkflows_Call struct { *mock.Call } // DisabledWorkflows is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *CIWorkflowStore_Expecter) DisabledWorkflows(ctx any, repo any) *CIWorkflowStore_DisabledWorkflows_Call { return &CIWorkflowStore_DisabledWorkflows_Call{Call: _e.mock.On("DisabledWorkflows", ctx, repo)} } func (_c *CIWorkflowStore_DisabledWorkflows_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *CIWorkflowStore_DisabledWorkflows_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 *CIWorkflowStore_DisabledWorkflows_Call) Return(strings []string, err error) *CIWorkflowStore_DisabledWorkflows_Call { _c.Call.Return(strings, err) return _c } func (_c *CIWorkflowStore_DisabledWorkflows_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) ([]string, error)) *CIWorkflowStore_DisabledWorkflows_Call { _c.Call.Return(run) return _c } // EnableWorkflow provides a mock function for the type CIWorkflowStore func (_mock *CIWorkflowStore) EnableWorkflow(ctx context.Context, repo domain.RepoName, path string) error { ret := _mock.Called(ctx, repo, path) if len(ret) == 0 { panic("no return value specified for EnableWorkflow") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) error); ok { r0 = returnFunc(ctx, repo, path) } else { r0 = ret.Error(0) } return r0 } // CIWorkflowStore_EnableWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableWorkflow' type CIWorkflowStore_EnableWorkflow_Call struct { *mock.Call } // EnableWorkflow is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - path string func (_e *CIWorkflowStore_Expecter) EnableWorkflow(ctx any, repo any, path any) *CIWorkflowStore_EnableWorkflow_Call { return &CIWorkflowStore_EnableWorkflow_Call{Call: _e.mock.On("EnableWorkflow", ctx, repo, path)} } func (_c *CIWorkflowStore_EnableWorkflow_Call) Run(run func(ctx context.Context, repo domain.RepoName, path string)) *CIWorkflowStore_EnableWorkflow_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) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CIWorkflowStore_EnableWorkflow_Call) Return(err error) *CIWorkflowStore_EnableWorkflow_Call { _c.Call.Return(err) return _c } func (_c *CIWorkflowStore_EnableWorkflow_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, path string) error) *CIWorkflowStore_EnableWorkflow_Call { _c.Call.Return(run) return _c }