1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "bnema.dev/ermite/internal/domain"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// 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.
15// The first argument is typically a *testing.T value.
16func NewWorkflowTrigger(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *WorkflowTrigger {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &WorkflowTrigger{}
25 mock.Mock.Test(t)
26
27 t.Cleanup(func() {
28 if helper, ok := t.(interface{ Helper() }); ok {
29 helper.Helper()
30 }
31 mock.AssertExpectations(t)
32 })
33
34 return mock
35}
36
37// WorkflowTrigger is an autogenerated mock type for the WorkflowTrigger type
38type WorkflowTrigger struct {
39 mock.Mock
40}
41
42type WorkflowTrigger_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *WorkflowTrigger) EXPECT() *WorkflowTrigger_Expecter {
47 return &WorkflowTrigger_Expecter{mock: &_m.Mock}
48}
49
50// OnMerge provides a mock function for the type WorkflowTrigger
51func (_mock *WorkflowTrigger) OnMerge(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, merger domain.Principal) {
52 _mock.Called(ctx, repo, updates, merger)
53 return
54}
55
56// WorkflowTrigger_OnMerge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnMerge'
57type WorkflowTrigger_OnMerge_Call struct {
58 *mock.Call
59}
60
61// OnMerge is a helper method to define mock.On call
62// - ctx context.Context
63// - repo domain.RepoName
64// - updates []domain.RefUpdate
65// - merger domain.Principal
66func (_e *WorkflowTrigger_Expecter) OnMerge(ctx any, repo any, updates any, merger any) *WorkflowTrigger_OnMerge_Call {
67 return &WorkflowTrigger_OnMerge_Call{Call: _e.mock.On("OnMerge", ctx, repo, updates, merger)}
68}
69
70func (_c *WorkflowTrigger_OnMerge_Call) Run(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, merger domain.Principal)) *WorkflowTrigger_OnMerge_Call {
71 _c.Call.Run(func(args mock.Arguments) {
72 var arg0 context.Context
73 if args[0] != nil {
74 arg0 = args[0].(context.Context)
75 }
76 var arg1 domain.RepoName
77 if args[1] != nil {
78 arg1 = args[1].(domain.RepoName)
79 }
80 var arg2 []domain.RefUpdate
81 if args[2] != nil {
82 arg2 = args[2].([]domain.RefUpdate)
83 }
84 var arg3 domain.Principal
85 if args[3] != nil {
86 arg3 = args[3].(domain.Principal)
87 }
88 run(
89 arg0,
90 arg1,
91 arg2,
92 arg3,
93 )
94 })
95 return _c
96}
97
98func (_c *WorkflowTrigger_OnMerge_Call) Return() *WorkflowTrigger_OnMerge_Call {
99 _c.Call.Return()
100 return _c
101}
102
103func (_c *WorkflowTrigger_OnMerge_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, merger domain.Principal)) *WorkflowTrigger_OnMerge_Call {
104 _c.Run(run)
105 return _c
106}
107
108// OnPush provides a mock function for the type WorkflowTrigger
109func (_mock *WorkflowTrigger) OnPush(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal) {
110 _mock.Called(ctx, repo, updates, pusher)
111 return
112}
113
114// WorkflowTrigger_OnPush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnPush'
115type WorkflowTrigger_OnPush_Call struct {
116 *mock.Call
117}
118
119// OnPush is a helper method to define mock.On call
120// - ctx context.Context
121// - repo domain.RepoName
122// - updates []domain.RefUpdate
123// - pusher domain.Principal
124func (_e *WorkflowTrigger_Expecter) OnPush(ctx any, repo any, updates any, pusher any) *WorkflowTrigger_OnPush_Call {
125 return &WorkflowTrigger_OnPush_Call{Call: _e.mock.On("OnPush", ctx, repo, updates, pusher)}
126}
127
128func (_c *WorkflowTrigger_OnPush_Call) Run(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal)) *WorkflowTrigger_OnPush_Call {
129 _c.Call.Run(func(args mock.Arguments) {
130 var arg0 context.Context
131 if args[0] != nil {
132 arg0 = args[0].(context.Context)
133 }
134 var arg1 domain.RepoName
135 if args[1] != nil {
136 arg1 = args[1].(domain.RepoName)
137 }
138 var arg2 []domain.RefUpdate
139 if args[2] != nil {
140 arg2 = args[2].([]domain.RefUpdate)
141 }
142 var arg3 domain.Principal
143 if args[3] != nil {
144 arg3 = args[3].(domain.Principal)
145 }
146 run(
147 arg0,
148 arg1,
149 arg2,
150 arg3,
151 )
152 })
153 return _c
154}
155
156func (_c *WorkflowTrigger_OnPush_Call) Return() *WorkflowTrigger_OnPush_Call {
157 _c.Call.Return()
158 return _c
159}
160
161func (_c *WorkflowTrigger_OnPush_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, pusher domain.Principal)) *WorkflowTrigger_OnPush_Call {
162 _c.Run(run)
163 return _c
164}