// 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" ) // NewWorkflowTrigger creates a new instance of WorkflowTrigger. 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 NewWorkflowTrigger(t interface { mock.TestingT Cleanup(func()) }) *WorkflowTrigger { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &WorkflowTrigger{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // WorkflowTrigger is an autogenerated mock type for the WorkflowTrigger type type WorkflowTrigger struct { mock.Mock } type WorkflowTrigger_Expecter struct { mock *mock.Mock } func (_m *WorkflowTrigger) EXPECT() *WorkflowTrigger_Expecter { return &WorkflowTrigger_Expecter{mock: &_m.Mock} } // OnMerge provides a mock function for the type WorkflowTrigger func (_mock *WorkflowTrigger) OnMerge(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, merger domain.Principal) { _mock.Called(ctx, repo, updates, merger) return } // WorkflowTrigger_OnMerge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnMerge' type WorkflowTrigger_OnMerge_Call struct { *mock.Call } // OnMerge is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - updates []domain.RefUpdate // - merger domain.Principal func (_e *WorkflowTrigger_Expecter) OnMerge(ctx any, repo any, updates any, merger any) *WorkflowTrigger_OnMerge_Call { return &WorkflowTrigger_OnMerge_Call{Call: _e.mock.On("OnMerge", ctx, repo, updates, merger)} } func (_c *WorkflowTrigger_OnMerge_Call) Run(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, merger domain.Principal)) *WorkflowTrigger_OnMerge_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 []domain.RefUpdate if args[2] != nil { arg2 = args[2].([]domain.RefUpdate) } var arg3 domain.Principal if args[3] != nil { arg3 = args[3].(domain.Principal) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *WorkflowTrigger_OnMerge_Call) Return() *WorkflowTrigger_OnMerge_Call { _c.Call.Return() return _c } func (_c *WorkflowTrigger_OnMerge_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, merger domain.Principal)) *WorkflowTrigger_OnMerge_Call { _c.Run(run) return _c } // OnPush provides a mock function for the type WorkflowTrigger func (_mock *WorkflowTrigger) OnPush(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal) { _mock.Called(ctx, repo, updates, pusher) return } // WorkflowTrigger_OnPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnPush' type WorkflowTrigger_OnPush_Call struct { *mock.Call } // OnPush is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - updates []domain.RefUpdate // - pusher domain.Principal func (_e *WorkflowTrigger_Expecter) OnPush(ctx any, repo any, updates any, pusher any) *WorkflowTrigger_OnPush_Call { return &WorkflowTrigger_OnPush_Call{Call: _e.mock.On("OnPush", ctx, repo, updates, pusher)} } func (_c *WorkflowTrigger_OnPush_Call) Run(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal)) *WorkflowTrigger_OnPush_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 []domain.RefUpdate if args[2] != nil { arg2 = args[2].([]domain.RefUpdate) } var arg3 domain.Principal if args[3] != nil { arg3 = args[3].(domain.Principal) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *WorkflowTrigger_OnPush_Call) Return() *WorkflowTrigger_OnPush_Call { _c.Call.Return() return _c } func (_c *WorkflowTrigger_OnPush_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal)) *WorkflowTrigger_OnPush_Call { _c.Run(run) return _c }