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