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 "bnema.dev/ermite/internal/ports"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// NewMergeRequestService creates a new instance of MergeRequestService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMergeRequestService(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *MergeRequestService {
21 if helper, ok := t.(interface{ Helper() }); ok {
22 helper.Helper()
23 }
24
25 mock := &MergeRequestService{}
26 mock.Mock.Test(t)
27
28 t.Cleanup(func() {
29 if helper, ok := t.(interface{ Helper() }); ok {
30 helper.Helper()
31 }
32 mock.AssertExpectations(t)
33 })
34
35 return mock
36}
37
38// MergeRequestService is an autogenerated mock type for the MergeRequestService type
39type MergeRequestService struct {
40 mock.Mock
41}
42
43type MergeRequestService_Expecter struct {
44 mock *mock.Mock
45}
46
47func (_m *MergeRequestService) EXPECT() *MergeRequestService_Expecter {
48 return &MergeRequestService_Expecter{mock: &_m.Mock}
49}
50
51// AddComment provides a mock function for the type MergeRequestService
52func (_mock *MergeRequestService) AddComment(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.AddCommentParams) (domain.Comment, error) {
53 ret := _mock.Called(ctx, p, name, number, params)
54
55 if len(ret) == 0 {
56 panic("no return value specified for AddComment")
57 }
58
59 var r0 domain.Comment
60 var r1 error
61 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.AddCommentParams) (domain.Comment, error)); ok {
62 return returnFunc(ctx, p, name, number, params)
63 }
64 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.AddCommentParams) domain.Comment); ok {
65 r0 = returnFunc(ctx, p, name, number, params)
66 } else {
67 r0 = ret.Get(0).(domain.Comment)
68 }
69 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.AddCommentParams) error); ok {
70 r1 = returnFunc(ctx, p, name, number, params)
71 } else {
72 r1 = ret.Error(1)
73 }
74 return r0, r1
75}
76
77// MergeRequestService_AddComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddComment'
78type MergeRequestService_AddComment_Call struct {
79 *mock.Call
80}
81
82// AddComment is a helper method to define mock.On call
83// - ctx context.Context
84// - p domain.Principal
85// - name domain.RepoName
86// - number int64
87// - params ports.AddCommentParams
88func (_e *MergeRequestService_Expecter) AddComment(ctx any, p any, name any, number any, params any) *MergeRequestService_AddComment_Call {
89 return &MergeRequestService_AddComment_Call{Call: _e.mock.On("AddComment", ctx, p, name, number, params)}
90}
91
92func (_c *MergeRequestService_AddComment_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.AddCommentParams)) *MergeRequestService_AddComment_Call {
93 _c.Call.Run(func(args mock.Arguments) {
94 var arg0 context.Context
95 if args[0] != nil {
96 arg0 = args[0].(context.Context)
97 }
98 var arg1 domain.Principal
99 if args[1] != nil {
100 arg1 = args[1].(domain.Principal)
101 }
102 var arg2 domain.RepoName
103 if args[2] != nil {
104 arg2 = args[2].(domain.RepoName)
105 }
106 var arg3 int64
107 if args[3] != nil {
108 arg3 = args[3].(int64)
109 }
110 var arg4 ports.AddCommentParams
111 if args[4] != nil {
112 arg4 = args[4].(ports.AddCommentParams)
113 }
114 run(
115 arg0,
116 arg1,
117 arg2,
118 arg3,
119 arg4,
120 )
121 })
122 return _c
123}
124
125func (_c *MergeRequestService_AddComment_Call) Return(comment domain.Comment, err error) *MergeRequestService_AddComment_Call {
126 _c.Call.Return(comment, err)
127 return _c
128}
129
130func (_c *MergeRequestService_AddComment_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.AddCommentParams) (domain.Comment, error)) *MergeRequestService_AddComment_Call {
131 _c.Call.Return(run)
132 return _c
133}
134
135// CancelAutoMerge provides a mock function for the type MergeRequestService
136func (_mock *MergeRequestService) CancelAutoMerge(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.MergeRequest, error) {
137 ret := _mock.Called(ctx, p, name, number)
138
139 if len(ret) == 0 {
140 panic("no return value specified for CancelAutoMerge")
141 }
142
143 var r0 domain.MergeRequest
144 var r1 error
145 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) (domain.MergeRequest, error)); ok {
146 return returnFunc(ctx, p, name, number)
147 }
148 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) domain.MergeRequest); ok {
149 r0 = returnFunc(ctx, p, name, number)
150 } else {
151 r0 = ret.Get(0).(domain.MergeRequest)
152 }
153 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok {
154 r1 = returnFunc(ctx, p, name, number)
155 } else {
156 r1 = ret.Error(1)
157 }
158 return r0, r1
159}
160
161// MergeRequestService_CancelAutoMerge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelAutoMerge'
162type MergeRequestService_CancelAutoMerge_Call struct {
163 *mock.Call
164}
165
166// CancelAutoMerge is a helper method to define mock.On call
167// - ctx context.Context
168// - p domain.Principal
169// - name domain.RepoName
170// - number int64
171func (_e *MergeRequestService_Expecter) CancelAutoMerge(ctx any, p any, name any, number any) *MergeRequestService_CancelAutoMerge_Call {
172 return &MergeRequestService_CancelAutoMerge_Call{Call: _e.mock.On("CancelAutoMerge", ctx, p, name, number)}
173}
174
175func (_c *MergeRequestService_CancelAutoMerge_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64)) *MergeRequestService_CancelAutoMerge_Call {
176 _c.Call.Run(func(args mock.Arguments) {
177 var arg0 context.Context
178 if args[0] != nil {
179 arg0 = args[0].(context.Context)
180 }
181 var arg1 domain.Principal
182 if args[1] != nil {
183 arg1 = args[1].(domain.Principal)
184 }
185 var arg2 domain.RepoName
186 if args[2] != nil {
187 arg2 = args[2].(domain.RepoName)
188 }
189 var arg3 int64
190 if args[3] != nil {
191 arg3 = args[3].(int64)
192 }
193 run(
194 arg0,
195 arg1,
196 arg2,
197 arg3,
198 )
199 })
200 return _c
201}
202
203func (_c *MergeRequestService_CancelAutoMerge_Call) Return(mergeRequest domain.MergeRequest, err error) *MergeRequestService_CancelAutoMerge_Call {
204 _c.Call.Return(mergeRequest, err)
205 return _c
206}
207
208func (_c *MergeRequestService_CancelAutoMerge_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.MergeRequest, error)) *MergeRequestService_CancelAutoMerge_Call {
209 _c.Call.Return(run)
210 return _c
211}
212
213// Close provides a mock function for the type MergeRequestService
214func (_mock *MergeRequestService) Close(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.MergeRequest, error) {
215 ret := _mock.Called(ctx, p, name, number)
216
217 if len(ret) == 0 {
218 panic("no return value specified for Close")
219 }
220
221 var r0 domain.MergeRequest
222 var r1 error
223 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) (domain.MergeRequest, error)); ok {
224 return returnFunc(ctx, p, name, number)
225 }
226 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) domain.MergeRequest); ok {
227 r0 = returnFunc(ctx, p, name, number)
228 } else {
229 r0 = ret.Get(0).(domain.MergeRequest)
230 }
231 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok {
232 r1 = returnFunc(ctx, p, name, number)
233 } else {
234 r1 = ret.Error(1)
235 }
236 return r0, r1
237}
238
239// MergeRequestService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
240type MergeRequestService_Close_Call struct {
241 *mock.Call
242}
243
244// Close is a helper method to define mock.On call
245// - ctx context.Context
246// - p domain.Principal
247// - name domain.RepoName
248// - number int64
249func (_e *MergeRequestService_Expecter) Close(ctx any, p any, name any, number any) *MergeRequestService_Close_Call {
250 return &MergeRequestService_Close_Call{Call: _e.mock.On("Close", ctx, p, name, number)}
251}
252
253func (_c *MergeRequestService_Close_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64)) *MergeRequestService_Close_Call {
254 _c.Call.Run(func(args mock.Arguments) {
255 var arg0 context.Context
256 if args[0] != nil {
257 arg0 = args[0].(context.Context)
258 }
259 var arg1 domain.Principal
260 if args[1] != nil {
261 arg1 = args[1].(domain.Principal)
262 }
263 var arg2 domain.RepoName
264 if args[2] != nil {
265 arg2 = args[2].(domain.RepoName)
266 }
267 var arg3 int64
268 if args[3] != nil {
269 arg3 = args[3].(int64)
270 }
271 run(
272 arg0,
273 arg1,
274 arg2,
275 arg3,
276 )
277 })
278 return _c
279}
280
281func (_c *MergeRequestService_Close_Call) Return(mergeRequest domain.MergeRequest, err error) *MergeRequestService_Close_Call {
282 _c.Call.Return(mergeRequest, err)
283 return _c
284}
285
286func (_c *MergeRequestService_Close_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.MergeRequest, error)) *MergeRequestService_Close_Call {
287 _c.Call.Return(run)
288 return _c
289}
290
291// Compare provides a mock function for the type MergeRequestService
292func (_mock *MergeRequestService) Compare(ctx context.Context, p domain.Principal, repo domain.RepoName, target domain.ObjectID, source domain.ObjectID) (ports.CompareResult, error) {
293 ret := _mock.Called(ctx, p, repo, target, source)
294
295 if len(ret) == 0 {
296 panic("no return value specified for Compare")
297 }
298
299 var r0 ports.CompareResult
300 var r1 error
301 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, domain.ObjectID, domain.ObjectID) (ports.CompareResult, error)); ok {
302 return returnFunc(ctx, p, repo, target, source)
303 }
304 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, domain.ObjectID, domain.ObjectID) ports.CompareResult); ok {
305 r0 = returnFunc(ctx, p, repo, target, source)
306 } else {
307 r0 = ret.Get(0).(ports.CompareResult)
308 }
309 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok {
310 r1 = returnFunc(ctx, p, repo, target, source)
311 } else {
312 r1 = ret.Error(1)
313 }
314 return r0, r1
315}
316
317// MergeRequestService_Compare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compare'
318type MergeRequestService_Compare_Call struct {
319 *mock.Call
320}
321
322// Compare is a helper method to define mock.On call
323// - ctx context.Context
324// - p domain.Principal
325// - repo domain.RepoName
326// - target domain.ObjectID
327// - source domain.ObjectID
328func (_e *MergeRequestService_Expecter) Compare(ctx any, p any, repo any, target any, source any) *MergeRequestService_Compare_Call {
329 return &MergeRequestService_Compare_Call{Call: _e.mock.On("Compare", ctx, p, repo, target, source)}
330}
331
332func (_c *MergeRequestService_Compare_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, target domain.ObjectID, source domain.ObjectID)) *MergeRequestService_Compare_Call {
333 _c.Call.Run(func(args mock.Arguments) {
334 var arg0 context.Context
335 if args[0] != nil {
336 arg0 = args[0].(context.Context)
337 }
338 var arg1 domain.Principal
339 if args[1] != nil {
340 arg1 = args[1].(domain.Principal)
341 }
342 var arg2 domain.RepoName
343 if args[2] != nil {
344 arg2 = args[2].(domain.RepoName)
345 }
346 var arg3 domain.ObjectID
347 if args[3] != nil {
348 arg3 = args[3].(domain.ObjectID)
349 }
350 var arg4 domain.ObjectID
351 if args[4] != nil {
352 arg4 = args[4].(domain.ObjectID)
353 }
354 run(
355 arg0,
356 arg1,
357 arg2,
358 arg3,
359 arg4,
360 )
361 })
362 return _c
363}
364
365func (_c *MergeRequestService_Compare_Call) Return(compareResult ports.CompareResult, err error) *MergeRequestService_Compare_Call {
366 _c.Call.Return(compareResult, err)
367 return _c
368}
369
370func (_c *MergeRequestService_Compare_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, target domain.ObjectID, source domain.ObjectID) (ports.CompareResult, error)) *MergeRequestService_Compare_Call {
371 _c.Call.Return(run)
372 return _c
373}
374
375// CountOpen provides a mock function for the type MergeRequestService
376func (_mock *MergeRequestService) CountOpen(ctx context.Context, p domain.Principal, name domain.RepoName) (int, error) {
377 ret := _mock.Called(ctx, p, name)
378
379 if len(ret) == 0 {
380 panic("no return value specified for CountOpen")
381 }
382
383 var r0 int
384 var r1 error
385 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) (int, error)); ok {
386 return returnFunc(ctx, p, name)
387 }
388 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) int); ok {
389 r0 = returnFunc(ctx, p, name)
390 } else {
391 r0 = ret.Get(0).(int)
392 }
393 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName) error); ok {
394 r1 = returnFunc(ctx, p, name)
395 } else {
396 r1 = ret.Error(1)
397 }
398 return r0, r1
399}
400
401// MergeRequestService_CountOpen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountOpen'
402type MergeRequestService_CountOpen_Call struct {
403 *mock.Call
404}
405
406// CountOpen is a helper method to define mock.On call
407// - ctx context.Context
408// - p domain.Principal
409// - name domain.RepoName
410func (_e *MergeRequestService_Expecter) CountOpen(ctx any, p any, name any) *MergeRequestService_CountOpen_Call {
411 return &MergeRequestService_CountOpen_Call{Call: _e.mock.On("CountOpen", ctx, p, name)}
412}
413
414func (_c *MergeRequestService_CountOpen_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName)) *MergeRequestService_CountOpen_Call {
415 _c.Call.Run(func(args mock.Arguments) {
416 var arg0 context.Context
417 if args[0] != nil {
418 arg0 = args[0].(context.Context)
419 }
420 var arg1 domain.Principal
421 if args[1] != nil {
422 arg1 = args[1].(domain.Principal)
423 }
424 var arg2 domain.RepoName
425 if args[2] != nil {
426 arg2 = args[2].(domain.RepoName)
427 }
428 run(
429 arg0,
430 arg1,
431 arg2,
432 )
433 })
434 return _c
435}
436
437func (_c *MergeRequestService_CountOpen_Call) Return(n int, err error) *MergeRequestService_CountOpen_Call {
438 _c.Call.Return(n, err)
439 return _c
440}
441
442func (_c *MergeRequestService_CountOpen_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName) (int, error)) *MergeRequestService_CountOpen_Call {
443 _c.Call.Return(run)
444 return _c
445}
446
447// Create provides a mock function for the type MergeRequestService
448func (_mock *MergeRequestService) Create(ctx context.Context, p domain.Principal, name domain.RepoName, params ports.CreateMergeRequestParams) (domain.MergeRequest, error) {
449 ret := _mock.Called(ctx, p, name, params)
450
451 if len(ret) == 0 {
452 panic("no return value specified for Create")
453 }
454
455 var r0 domain.MergeRequest
456 var r1 error
457 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.CreateMergeRequestParams) (domain.MergeRequest, error)); ok {
458 return returnFunc(ctx, p, name, params)
459 }
460 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.CreateMergeRequestParams) domain.MergeRequest); ok {
461 r0 = returnFunc(ctx, p, name, params)
462 } else {
463 r0 = ret.Get(0).(domain.MergeRequest)
464 }
465 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.CreateMergeRequestParams) error); ok {
466 r1 = returnFunc(ctx, p, name, params)
467 } else {
468 r1 = ret.Error(1)
469 }
470 return r0, r1
471}
472
473// MergeRequestService_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
474type MergeRequestService_Create_Call struct {
475 *mock.Call
476}
477
478// Create is a helper method to define mock.On call
479// - ctx context.Context
480// - p domain.Principal
481// - name domain.RepoName
482// - params ports.CreateMergeRequestParams
483func (_e *MergeRequestService_Expecter) Create(ctx any, p any, name any, params any) *MergeRequestService_Create_Call {
484 return &MergeRequestService_Create_Call{Call: _e.mock.On("Create", ctx, p, name, params)}
485}
486
487func (_c *MergeRequestService_Create_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, params ports.CreateMergeRequestParams)) *MergeRequestService_Create_Call {
488 _c.Call.Run(func(args mock.Arguments) {
489 var arg0 context.Context
490 if args[0] != nil {
491 arg0 = args[0].(context.Context)
492 }
493 var arg1 domain.Principal
494 if args[1] != nil {
495 arg1 = args[1].(domain.Principal)
496 }
497 var arg2 domain.RepoName
498 if args[2] != nil {
499 arg2 = args[2].(domain.RepoName)
500 }
501 var arg3 ports.CreateMergeRequestParams
502 if args[3] != nil {
503 arg3 = args[3].(ports.CreateMergeRequestParams)
504 }
505 run(
506 arg0,
507 arg1,
508 arg2,
509 arg3,
510 )
511 })
512 return _c
513}
514
515func (_c *MergeRequestService_Create_Call) Return(mergeRequest domain.MergeRequest, err error) *MergeRequestService_Create_Call {
516 _c.Call.Return(mergeRequest, err)
517 return _c
518}
519
520func (_c *MergeRequestService_Create_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, params ports.CreateMergeRequestParams) (domain.MergeRequest, error)) *MergeRequestService_Create_Call {
521 _c.Call.Return(run)
522 return _c
523}
524
525// DeleteComment provides a mock function for the type MergeRequestService
526func (_mock *MergeRequestService) DeleteComment(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64) (domain.Comment, error) {
527 ret := _mock.Called(ctx, p, name, number, commentID)
528
529 if len(ret) == 0 {
530 panic("no return value specified for DeleteComment")
531 }
532
533 var r0 domain.Comment
534 var r1 error
535 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int64) (domain.Comment, error)); ok {
536 return returnFunc(ctx, p, name, number, commentID)
537 }
538 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int64) domain.Comment); ok {
539 r0 = returnFunc(ctx, p, name, number, commentID)
540 } else {
541 r0 = ret.Get(0).(domain.Comment)
542 }
543 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int64) error); ok {
544 r1 = returnFunc(ctx, p, name, number, commentID)
545 } else {
546 r1 = ret.Error(1)
547 }
548 return r0, r1
549}
550
551// MergeRequestService_DeleteComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteComment'
552type MergeRequestService_DeleteComment_Call struct {
553 *mock.Call
554}
555
556// DeleteComment is a helper method to define mock.On call
557// - ctx context.Context
558// - p domain.Principal
559// - name domain.RepoName
560// - number int64
561// - commentID int64
562func (_e *MergeRequestService_Expecter) DeleteComment(ctx any, p any, name any, number any, commentID any) *MergeRequestService_DeleteComment_Call {
563 return &MergeRequestService_DeleteComment_Call{Call: _e.mock.On("DeleteComment", ctx, p, name, number, commentID)}
564}
565
566func (_c *MergeRequestService_DeleteComment_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64)) *MergeRequestService_DeleteComment_Call {
567 _c.Call.Run(func(args mock.Arguments) {
568 var arg0 context.Context
569 if args[0] != nil {
570 arg0 = args[0].(context.Context)
571 }
572 var arg1 domain.Principal
573 if args[1] != nil {
574 arg1 = args[1].(domain.Principal)
575 }
576 var arg2 domain.RepoName
577 if args[2] != nil {
578 arg2 = args[2].(domain.RepoName)
579 }
580 var arg3 int64
581 if args[3] != nil {
582 arg3 = args[3].(int64)
583 }
584 var arg4 int64
585 if args[4] != nil {
586 arg4 = args[4].(int64)
587 }
588 run(
589 arg0,
590 arg1,
591 arg2,
592 arg3,
593 arg4,
594 )
595 })
596 return _c
597}
598
599func (_c *MergeRequestService_DeleteComment_Call) Return(comment domain.Comment, err error) *MergeRequestService_DeleteComment_Call {
600 _c.Call.Return(comment, err)
601 return _c
602}
603
604func (_c *MergeRequestService_DeleteComment_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64) (domain.Comment, error)) *MergeRequestService_DeleteComment_Call {
605 _c.Call.Return(run)
606 return _c
607}
608
609// EditComment provides a mock function for the type MergeRequestService
610func (_mock *MergeRequestService) EditComment(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64, text string) (domain.Comment, error) {
611 ret := _mock.Called(ctx, p, name, number, commentID, text)
612
613 if len(ret) == 0 {
614 panic("no return value specified for EditComment")
615 }
616
617 var r0 domain.Comment
618 var r1 error
619 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int64, string) (domain.Comment, error)); ok {
620 return returnFunc(ctx, p, name, number, commentID, text)
621 }
622 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int64, string) domain.Comment); ok {
623 r0 = returnFunc(ctx, p, name, number, commentID, text)
624 } else {
625 r0 = ret.Get(0).(domain.Comment)
626 }
627 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int64, string) error); ok {
628 r1 = returnFunc(ctx, p, name, number, commentID, text)
629 } else {
630 r1 = ret.Error(1)
631 }
632 return r0, r1
633}
634
635// MergeRequestService_EditComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EditComment'
636type MergeRequestService_EditComment_Call struct {
637 *mock.Call
638}
639
640// EditComment is a helper method to define mock.On call
641// - ctx context.Context
642// - p domain.Principal
643// - name domain.RepoName
644// - number int64
645// - commentID int64
646// - text string
647func (_e *MergeRequestService_Expecter) EditComment(ctx any, p any, name any, number any, commentID any, text any) *MergeRequestService_EditComment_Call {
648 return &MergeRequestService_EditComment_Call{Call: _e.mock.On("EditComment", ctx, p, name, number, commentID, text)}
649}
650
651func (_c *MergeRequestService_EditComment_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64, text string)) *MergeRequestService_EditComment_Call {
652 _c.Call.Run(func(args mock.Arguments) {
653 var arg0 context.Context
654 if args[0] != nil {
655 arg0 = args[0].(context.Context)
656 }
657 var arg1 domain.Principal
658 if args[1] != nil {
659 arg1 = args[1].(domain.Principal)
660 }
661 var arg2 domain.RepoName
662 if args[2] != nil {
663 arg2 = args[2].(domain.RepoName)
664 }
665 var arg3 int64
666 if args[3] != nil {
667 arg3 = args[3].(int64)
668 }
669 var arg4 int64
670 if args[4] != nil {
671 arg4 = args[4].(int64)
672 }
673 var arg5 string
674 if args[5] != nil {
675 arg5 = args[5].(string)
676 }
677 run(
678 arg0,
679 arg1,
680 arg2,
681 arg3,
682 arg4,
683 arg5,
684 )
685 })
686 return _c
687}
688
689func (_c *MergeRequestService_EditComment_Call) Return(comment domain.Comment, err error) *MergeRequestService_EditComment_Call {
690 _c.Call.Return(comment, err)
691 return _c
692}
693
694func (_c *MergeRequestService_EditComment_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64, text string) (domain.Comment, error)) *MergeRequestService_EditComment_Call {
695 _c.Call.Return(run)
696 return _c
697}
698
699// EnableAutoMerge provides a mock function for the type MergeRequestService
700func (_mock *MergeRequestService) EnableAutoMerge(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.EnableAutoMergeParams) (domain.MergeRequest, error) {
701 ret := _mock.Called(ctx, p, name, number, params)
702
703 if len(ret) == 0 {
704 panic("no return value specified for EnableAutoMerge")
705 }
706
707 var r0 domain.MergeRequest
708 var r1 error
709 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.EnableAutoMergeParams) (domain.MergeRequest, error)); ok {
710 return returnFunc(ctx, p, name, number, params)
711 }
712 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.EnableAutoMergeParams) domain.MergeRequest); ok {
713 r0 = returnFunc(ctx, p, name, number, params)
714 } else {
715 r0 = ret.Get(0).(domain.MergeRequest)
716 }
717 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.EnableAutoMergeParams) error); ok {
718 r1 = returnFunc(ctx, p, name, number, params)
719 } else {
720 r1 = ret.Error(1)
721 }
722 return r0, r1
723}
724
725// MergeRequestService_EnableAutoMerge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableAutoMerge'
726type MergeRequestService_EnableAutoMerge_Call struct {
727 *mock.Call
728}
729
730// EnableAutoMerge is a helper method to define mock.On call
731// - ctx context.Context
732// - p domain.Principal
733// - name domain.RepoName
734// - number int64
735// - params ports.EnableAutoMergeParams
736func (_e *MergeRequestService_Expecter) EnableAutoMerge(ctx any, p any, name any, number any, params any) *MergeRequestService_EnableAutoMerge_Call {
737 return &MergeRequestService_EnableAutoMerge_Call{Call: _e.mock.On("EnableAutoMerge", ctx, p, name, number, params)}
738}
739
740func (_c *MergeRequestService_EnableAutoMerge_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.EnableAutoMergeParams)) *MergeRequestService_EnableAutoMerge_Call {
741 _c.Call.Run(func(args mock.Arguments) {
742 var arg0 context.Context
743 if args[0] != nil {
744 arg0 = args[0].(context.Context)
745 }
746 var arg1 domain.Principal
747 if args[1] != nil {
748 arg1 = args[1].(domain.Principal)
749 }
750 var arg2 domain.RepoName
751 if args[2] != nil {
752 arg2 = args[2].(domain.RepoName)
753 }
754 var arg3 int64
755 if args[3] != nil {
756 arg3 = args[3].(int64)
757 }
758 var arg4 ports.EnableAutoMergeParams
759 if args[4] != nil {
760 arg4 = args[4].(ports.EnableAutoMergeParams)
761 }
762 run(
763 arg0,
764 arg1,
765 arg2,
766 arg3,
767 arg4,
768 )
769 })
770 return _c
771}
772
773func (_c *MergeRequestService_EnableAutoMerge_Call) Return(mergeRequest domain.MergeRequest, err error) *MergeRequestService_EnableAutoMerge_Call {
774 _c.Call.Return(mergeRequest, err)
775 return _c
776}
777
778func (_c *MergeRequestService_EnableAutoMerge_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.EnableAutoMergeParams) (domain.MergeRequest, error)) *MergeRequestService_EnableAutoMerge_Call {
779 _c.Call.Return(run)
780 return _c
781}
782
783// Get provides a mock function for the type MergeRequestService
784func (_mock *MergeRequestService) Get(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, opts ports.GetMergeRequestOptions) (ports.MergeRequestDetail, error) {
785 ret := _mock.Called(ctx, p, name, number, opts)
786
787 if len(ret) == 0 {
788 panic("no return value specified for Get")
789 }
790
791 var r0 ports.MergeRequestDetail
792 var r1 error
793 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.GetMergeRequestOptions) (ports.MergeRequestDetail, error)); ok {
794 return returnFunc(ctx, p, name, number, opts)
795 }
796 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.GetMergeRequestOptions) ports.MergeRequestDetail); ok {
797 r0 = returnFunc(ctx, p, name, number, opts)
798 } else {
799 r0 = ret.Get(0).(ports.MergeRequestDetail)
800 }
801 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.GetMergeRequestOptions) error); ok {
802 r1 = returnFunc(ctx, p, name, number, opts)
803 } else {
804 r1 = ret.Error(1)
805 }
806 return r0, r1
807}
808
809// MergeRequestService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
810type MergeRequestService_Get_Call struct {
811 *mock.Call
812}
813
814// Get is a helper method to define mock.On call
815// - ctx context.Context
816// - p domain.Principal
817// - name domain.RepoName
818// - number int64
819// - opts ports.GetMergeRequestOptions
820func (_e *MergeRequestService_Expecter) Get(ctx any, p any, name any, number any, opts any) *MergeRequestService_Get_Call {
821 return &MergeRequestService_Get_Call{Call: _e.mock.On("Get", ctx, p, name, number, opts)}
822}
823
824func (_c *MergeRequestService_Get_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, opts ports.GetMergeRequestOptions)) *MergeRequestService_Get_Call {
825 _c.Call.Run(func(args mock.Arguments) {
826 var arg0 context.Context
827 if args[0] != nil {
828 arg0 = args[0].(context.Context)
829 }
830 var arg1 domain.Principal
831 if args[1] != nil {
832 arg1 = args[1].(domain.Principal)
833 }
834 var arg2 domain.RepoName
835 if args[2] != nil {
836 arg2 = args[2].(domain.RepoName)
837 }
838 var arg3 int64
839 if args[3] != nil {
840 arg3 = args[3].(int64)
841 }
842 var arg4 ports.GetMergeRequestOptions
843 if args[4] != nil {
844 arg4 = args[4].(ports.GetMergeRequestOptions)
845 }
846 run(
847 arg0,
848 arg1,
849 arg2,
850 arg3,
851 arg4,
852 )
853 })
854 return _c
855}
856
857func (_c *MergeRequestService_Get_Call) Return(mergeRequestDetail ports.MergeRequestDetail, err error) *MergeRequestService_Get_Call {
858 _c.Call.Return(mergeRequestDetail, err)
859 return _c
860}
861
862func (_c *MergeRequestService_Get_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, opts ports.GetMergeRequestOptions) (ports.MergeRequestDetail, error)) *MergeRequestService_Get_Call {
863 _c.Call.Return(run)
864 return _c
865}
866
867// List provides a mock function for the type MergeRequestService
868func (_mock *MergeRequestService) List(ctx context.Context, p domain.Principal, name domain.RepoName, params ports.ListMergeRequestsParams) (ports.MergeRequestPage, error) {
869 ret := _mock.Called(ctx, p, name, params)
870
871 if len(ret) == 0 {
872 panic("no return value specified for List")
873 }
874
875 var r0 ports.MergeRequestPage
876 var r1 error
877 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListMergeRequestsParams) (ports.MergeRequestPage, error)); ok {
878 return returnFunc(ctx, p, name, params)
879 }
880 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListMergeRequestsParams) ports.MergeRequestPage); ok {
881 r0 = returnFunc(ctx, p, name, params)
882 } else {
883 r0 = ret.Get(0).(ports.MergeRequestPage)
884 }
885 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.ListMergeRequestsParams) error); ok {
886 r1 = returnFunc(ctx, p, name, params)
887 } else {
888 r1 = ret.Error(1)
889 }
890 return r0, r1
891}
892
893// MergeRequestService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
894type MergeRequestService_List_Call struct {
895 *mock.Call
896}
897
898// List is a helper method to define mock.On call
899// - ctx context.Context
900// - p domain.Principal
901// - name domain.RepoName
902// - params ports.ListMergeRequestsParams
903func (_e *MergeRequestService_Expecter) List(ctx any, p any, name any, params any) *MergeRequestService_List_Call {
904 return &MergeRequestService_List_Call{Call: _e.mock.On("List", ctx, p, name, params)}
905}
906
907func (_c *MergeRequestService_List_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, params ports.ListMergeRequestsParams)) *MergeRequestService_List_Call {
908 _c.Call.Run(func(args mock.Arguments) {
909 var arg0 context.Context
910 if args[0] != nil {
911 arg0 = args[0].(context.Context)
912 }
913 var arg1 domain.Principal
914 if args[1] != nil {
915 arg1 = args[1].(domain.Principal)
916 }
917 var arg2 domain.RepoName
918 if args[2] != nil {
919 arg2 = args[2].(domain.RepoName)
920 }
921 var arg3 ports.ListMergeRequestsParams
922 if args[3] != nil {
923 arg3 = args[3].(ports.ListMergeRequestsParams)
924 }
925 run(
926 arg0,
927 arg1,
928 arg2,
929 arg3,
930 )
931 })
932 return _c
933}
934
935func (_c *MergeRequestService_List_Call) Return(mergeRequestPage ports.MergeRequestPage, err error) *MergeRequestService_List_Call {
936 _c.Call.Return(mergeRequestPage, err)
937 return _c
938}
939
940func (_c *MergeRequestService_List_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, params ports.ListMergeRequestsParams) (ports.MergeRequestPage, error)) *MergeRequestService_List_Call {
941 _c.Call.Return(run)
942 return _c
943}
944
945// MarkRead provides a mock function for the type MergeRequestService
946func (_mock *MergeRequestService) MarkRead(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, head domain.ObjectID) (domain.ObjectID, error) {
947 ret := _mock.Called(ctx, p, name, number, head)
948
949 if len(ret) == 0 {
950 panic("no return value specified for MarkRead")
951 }
952
953 var r0 domain.ObjectID
954 var r1 error
955 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, domain.ObjectID) (domain.ObjectID, error)); ok {
956 return returnFunc(ctx, p, name, number, head)
957 }
958 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, domain.ObjectID) domain.ObjectID); ok {
959 r0 = returnFunc(ctx, p, name, number, head)
960 } else {
961 r0 = ret.Get(0).(domain.ObjectID)
962 }
963 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, domain.ObjectID) error); ok {
964 r1 = returnFunc(ctx, p, name, number, head)
965 } else {
966 r1 = ret.Error(1)
967 }
968 return r0, r1
969}
970
971// MergeRequestService_MarkRead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkRead'
972type MergeRequestService_MarkRead_Call struct {
973 *mock.Call
974}
975
976// MarkRead is a helper method to define mock.On call
977// - ctx context.Context
978// - p domain.Principal
979// - name domain.RepoName
980// - number int64
981// - head domain.ObjectID
982func (_e *MergeRequestService_Expecter) MarkRead(ctx any, p any, name any, number any, head any) *MergeRequestService_MarkRead_Call {
983 return &MergeRequestService_MarkRead_Call{Call: _e.mock.On("MarkRead", ctx, p, name, number, head)}
984}
985
986func (_c *MergeRequestService_MarkRead_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, head domain.ObjectID)) *MergeRequestService_MarkRead_Call {
987 _c.Call.Run(func(args mock.Arguments) {
988 var arg0 context.Context
989 if args[0] != nil {
990 arg0 = args[0].(context.Context)
991 }
992 var arg1 domain.Principal
993 if args[1] != nil {
994 arg1 = args[1].(domain.Principal)
995 }
996 var arg2 domain.RepoName
997 if args[2] != nil {
998 arg2 = args[2].(domain.RepoName)
999 }
1000 var arg3 int64
1001 if args[3] != nil {
1002 arg3 = args[3].(int64)
1003 }
1004 var arg4 domain.ObjectID
1005 if args[4] != nil {
1006 arg4 = args[4].(domain.ObjectID)
1007 }
1008 run(
1009 arg0,
1010 arg1,
1011 arg2,
1012 arg3,
1013 arg4,
1014 )
1015 })
1016 return _c
1017}
1018
1019func (_c *MergeRequestService_MarkRead_Call) Return(objectID domain.ObjectID, err error) *MergeRequestService_MarkRead_Call {
1020 _c.Call.Return(objectID, err)
1021 return _c
1022}
1023
1024func (_c *MergeRequestService_MarkRead_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, head domain.ObjectID) (domain.ObjectID, error)) *MergeRequestService_MarkRead_Call {
1025 _c.Call.Return(run)
1026 return _c
1027}
1028
1029// MarkReady provides a mock function for the type MergeRequestService
1030func (_mock *MergeRequestService) MarkReady(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.MergeRequest, error) {
1031 ret := _mock.Called(ctx, p, name, number)
1032
1033 if len(ret) == 0 {
1034 panic("no return value specified for MarkReady")
1035 }
1036
1037 var r0 domain.MergeRequest
1038 var r1 error
1039 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) (domain.MergeRequest, error)); ok {
1040 return returnFunc(ctx, p, name, number)
1041 }
1042 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) domain.MergeRequest); ok {
1043 r0 = returnFunc(ctx, p, name, number)
1044 } else {
1045 r0 = ret.Get(0).(domain.MergeRequest)
1046 }
1047 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok {
1048 r1 = returnFunc(ctx, p, name, number)
1049 } else {
1050 r1 = ret.Error(1)
1051 }
1052 return r0, r1
1053}
1054
1055// MergeRequestService_MarkReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkReady'
1056type MergeRequestService_MarkReady_Call struct {
1057 *mock.Call
1058}
1059
1060// MarkReady is a helper method to define mock.On call
1061// - ctx context.Context
1062// - p domain.Principal
1063// - name domain.RepoName
1064// - number int64
1065func (_e *MergeRequestService_Expecter) MarkReady(ctx any, p any, name any, number any) *MergeRequestService_MarkReady_Call {
1066 return &MergeRequestService_MarkReady_Call{Call: _e.mock.On("MarkReady", ctx, p, name, number)}
1067}
1068
1069func (_c *MergeRequestService_MarkReady_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64)) *MergeRequestService_MarkReady_Call {
1070 _c.Call.Run(func(args mock.Arguments) {
1071 var arg0 context.Context
1072 if args[0] != nil {
1073 arg0 = args[0].(context.Context)
1074 }
1075 var arg1 domain.Principal
1076 if args[1] != nil {
1077 arg1 = args[1].(domain.Principal)
1078 }
1079 var arg2 domain.RepoName
1080 if args[2] != nil {
1081 arg2 = args[2].(domain.RepoName)
1082 }
1083 var arg3 int64
1084 if args[3] != nil {
1085 arg3 = args[3].(int64)
1086 }
1087 run(
1088 arg0,
1089 arg1,
1090 arg2,
1091 arg3,
1092 )
1093 })
1094 return _c
1095}
1096
1097func (_c *MergeRequestService_MarkReady_Call) Return(mergeRequest domain.MergeRequest, err error) *MergeRequestService_MarkReady_Call {
1098 _c.Call.Return(mergeRequest, err)
1099 return _c
1100}
1101
1102func (_c *MergeRequestService_MarkReady_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.MergeRequest, error)) *MergeRequestService_MarkReady_Call {
1103 _c.Call.Return(run)
1104 return _c
1105}
1106
1107// Merge provides a mock function for the type MergeRequestService
1108func (_mock *MergeRequestService) Merge(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.MergeParams) (ports.MergeResult, error) {
1109 ret := _mock.Called(ctx, p, name, number, params)
1110
1111 if len(ret) == 0 {
1112 panic("no return value specified for Merge")
1113 }
1114
1115 var r0 ports.MergeResult
1116 var r1 error
1117 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.MergeParams) (ports.MergeResult, error)); ok {
1118 return returnFunc(ctx, p, name, number, params)
1119 }
1120 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.MergeParams) ports.MergeResult); ok {
1121 r0 = returnFunc(ctx, p, name, number, params)
1122 } else {
1123 r0 = ret.Get(0).(ports.MergeResult)
1124 }
1125 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, ports.MergeParams) error); ok {
1126 r1 = returnFunc(ctx, p, name, number, params)
1127 } else {
1128 r1 = ret.Error(1)
1129 }
1130 return r0, r1
1131}
1132
1133// MergeRequestService_Merge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Merge'
1134type MergeRequestService_Merge_Call struct {
1135 *mock.Call
1136}
1137
1138// Merge is a helper method to define mock.On call
1139// - ctx context.Context
1140// - p domain.Principal
1141// - name domain.RepoName
1142// - number int64
1143// - params ports.MergeParams
1144func (_e *MergeRequestService_Expecter) Merge(ctx any, p any, name any, number any, params any) *MergeRequestService_Merge_Call {
1145 return &MergeRequestService_Merge_Call{Call: _e.mock.On("Merge", ctx, p, name, number, params)}
1146}
1147
1148func (_c *MergeRequestService_Merge_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.MergeParams)) *MergeRequestService_Merge_Call {
1149 _c.Call.Run(func(args mock.Arguments) {
1150 var arg0 context.Context
1151 if args[0] != nil {
1152 arg0 = args[0].(context.Context)
1153 }
1154 var arg1 domain.Principal
1155 if args[1] != nil {
1156 arg1 = args[1].(domain.Principal)
1157 }
1158 var arg2 domain.RepoName
1159 if args[2] != nil {
1160 arg2 = args[2].(domain.RepoName)
1161 }
1162 var arg3 int64
1163 if args[3] != nil {
1164 arg3 = args[3].(int64)
1165 }
1166 var arg4 ports.MergeParams
1167 if args[4] != nil {
1168 arg4 = args[4].(ports.MergeParams)
1169 }
1170 run(
1171 arg0,
1172 arg1,
1173 arg2,
1174 arg3,
1175 arg4,
1176 )
1177 })
1178 return _c
1179}
1180
1181func (_c *MergeRequestService_Merge_Call) Return(mergeResult ports.MergeResult, err error) *MergeRequestService_Merge_Call {
1182 _c.Call.Return(mergeResult, err)
1183 return _c
1184}
1185
1186func (_c *MergeRequestService_Merge_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, params ports.MergeParams) (ports.MergeResult, error)) *MergeRequestService_Merge_Call {
1187 _c.Call.Return(run)
1188 return _c
1189}
1190
1191// Mergeability provides a mock function for the type MergeRequestService
1192func (_mock *MergeRequestService) Mergeability(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.Mergeability, error) {
1193 ret := _mock.Called(ctx, p, name, number)
1194
1195 if len(ret) == 0 {
1196 panic("no return value specified for Mergeability")
1197 }
1198
1199 var r0 domain.Mergeability
1200 var r1 error
1201 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) (domain.Mergeability, error)); ok {
1202 return returnFunc(ctx, p, name, number)
1203 }
1204 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) domain.Mergeability); ok {
1205 r0 = returnFunc(ctx, p, name, number)
1206 } else {
1207 r0 = ret.Get(0).(domain.Mergeability)
1208 }
1209 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok {
1210 r1 = returnFunc(ctx, p, name, number)
1211 } else {
1212 r1 = ret.Error(1)
1213 }
1214 return r0, r1
1215}
1216
1217// MergeRequestService_Mergeability_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mergeability'
1218type MergeRequestService_Mergeability_Call struct {
1219 *mock.Call
1220}
1221
1222// Mergeability is a helper method to define mock.On call
1223// - ctx context.Context
1224// - p domain.Principal
1225// - name domain.RepoName
1226// - number int64
1227func (_e *MergeRequestService_Expecter) Mergeability(ctx any, p any, name any, number any) *MergeRequestService_Mergeability_Call {
1228 return &MergeRequestService_Mergeability_Call{Call: _e.mock.On("Mergeability", ctx, p, name, number)}
1229}
1230
1231func (_c *MergeRequestService_Mergeability_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64)) *MergeRequestService_Mergeability_Call {
1232 _c.Call.Run(func(args mock.Arguments) {
1233 var arg0 context.Context
1234 if args[0] != nil {
1235 arg0 = args[0].(context.Context)
1236 }
1237 var arg1 domain.Principal
1238 if args[1] != nil {
1239 arg1 = args[1].(domain.Principal)
1240 }
1241 var arg2 domain.RepoName
1242 if args[2] != nil {
1243 arg2 = args[2].(domain.RepoName)
1244 }
1245 var arg3 int64
1246 if args[3] != nil {
1247 arg3 = args[3].(int64)
1248 }
1249 run(
1250 arg0,
1251 arg1,
1252 arg2,
1253 arg3,
1254 )
1255 })
1256 return _c
1257}
1258
1259func (_c *MergeRequestService_Mergeability_Call) Return(mergeability domain.Mergeability, err error) *MergeRequestService_Mergeability_Call {
1260 _c.Call.Return(mergeability, err)
1261 return _c
1262}
1263
1264func (_c *MergeRequestService_Mergeability_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64) (domain.Mergeability, error)) *MergeRequestService_Mergeability_Call {
1265 _c.Call.Return(run)
1266 return _c
1267}
1268
1269// PushSummary provides a mock function for the type MergeRequestService
1270func (_mock *MergeRequestService) PushSummary(ctx context.Context, p domain.Principal, repo domain.RepoName, oldHead domain.ObjectID, newTip domain.ObjectID) (ports.PushSummary, error) {
1271 ret := _mock.Called(ctx, p, repo, oldHead, newTip)
1272
1273 if len(ret) == 0 {
1274 panic("no return value specified for PushSummary")
1275 }
1276
1277 var r0 ports.PushSummary
1278 var r1 error
1279 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, domain.ObjectID, domain.ObjectID) (ports.PushSummary, error)); ok {
1280 return returnFunc(ctx, p, repo, oldHead, newTip)
1281 }
1282 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, domain.ObjectID, domain.ObjectID) ports.PushSummary); ok {
1283 r0 = returnFunc(ctx, p, repo, oldHead, newTip)
1284 } else {
1285 r0 = ret.Get(0).(ports.PushSummary)
1286 }
1287 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok {
1288 r1 = returnFunc(ctx, p, repo, oldHead, newTip)
1289 } else {
1290 r1 = ret.Error(1)
1291 }
1292 return r0, r1
1293}
1294
1295// MergeRequestService_PushSummary_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PushSummary'
1296type MergeRequestService_PushSummary_Call struct {
1297 *mock.Call
1298}
1299
1300// PushSummary is a helper method to define mock.On call
1301// - ctx context.Context
1302// - p domain.Principal
1303// - repo domain.RepoName
1304// - oldHead domain.ObjectID
1305// - newTip domain.ObjectID
1306func (_e *MergeRequestService_Expecter) PushSummary(ctx any, p any, repo any, oldHead any, newTip any) *MergeRequestService_PushSummary_Call {
1307 return &MergeRequestService_PushSummary_Call{Call: _e.mock.On("PushSummary", ctx, p, repo, oldHead, newTip)}
1308}
1309
1310func (_c *MergeRequestService_PushSummary_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, oldHead domain.ObjectID, newTip domain.ObjectID)) *MergeRequestService_PushSummary_Call {
1311 _c.Call.Run(func(args mock.Arguments) {
1312 var arg0 context.Context
1313 if args[0] != nil {
1314 arg0 = args[0].(context.Context)
1315 }
1316 var arg1 domain.Principal
1317 if args[1] != nil {
1318 arg1 = args[1].(domain.Principal)
1319 }
1320 var arg2 domain.RepoName
1321 if args[2] != nil {
1322 arg2 = args[2].(domain.RepoName)
1323 }
1324 var arg3 domain.ObjectID
1325 if args[3] != nil {
1326 arg3 = args[3].(domain.ObjectID)
1327 }
1328 var arg4 domain.ObjectID
1329 if args[4] != nil {
1330 arg4 = args[4].(domain.ObjectID)
1331 }
1332 run(
1333 arg0,
1334 arg1,
1335 arg2,
1336 arg3,
1337 arg4,
1338 )
1339 })
1340 return _c
1341}
1342
1343func (_c *MergeRequestService_PushSummary_Call) Return(pushSummary ports.PushSummary, err error) *MergeRequestService_PushSummary_Call {
1344 _c.Call.Return(pushSummary, err)
1345 return _c
1346}
1347
1348func (_c *MergeRequestService_PushSummary_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, oldHead domain.ObjectID, newTip domain.ObjectID) (ports.PushSummary, error)) *MergeRequestService_PushSummary_Call {
1349 _c.Call.Return(run)
1350 return _c
1351}
1352
1353// ResolveComment provides a mock function for the type MergeRequestService
1354func (_mock *MergeRequestService) ResolveComment(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64, resolved bool) (domain.Comment, error) {
1355 ret := _mock.Called(ctx, p, name, number, commentID, resolved)
1356
1357 if len(ret) == 0 {
1358 panic("no return value specified for ResolveComment")
1359 }
1360
1361 var r0 domain.Comment
1362 var r1 error
1363 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int64, bool) (domain.Comment, error)); ok {
1364 return returnFunc(ctx, p, name, number, commentID, resolved)
1365 }
1366 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int64, bool) domain.Comment); ok {
1367 r0 = returnFunc(ctx, p, name, number, commentID, resolved)
1368 } else {
1369 r0 = ret.Get(0).(domain.Comment)
1370 }
1371 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int64, bool) error); ok {
1372 r1 = returnFunc(ctx, p, name, number, commentID, resolved)
1373 } else {
1374 r1 = ret.Error(1)
1375 }
1376 return r0, r1
1377}
1378
1379// MergeRequestService_ResolveComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveComment'
1380type MergeRequestService_ResolveComment_Call struct {
1381 *mock.Call
1382}
1383
1384// ResolveComment is a helper method to define mock.On call
1385// - ctx context.Context
1386// - p domain.Principal
1387// - name domain.RepoName
1388// - number int64
1389// - commentID int64
1390// - resolved bool
1391func (_e *MergeRequestService_Expecter) ResolveComment(ctx any, p any, name any, number any, commentID any, resolved any) *MergeRequestService_ResolveComment_Call {
1392 return &MergeRequestService_ResolveComment_Call{Call: _e.mock.On("ResolveComment", ctx, p, name, number, commentID, resolved)}
1393}
1394
1395func (_c *MergeRequestService_ResolveComment_Call) Run(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64, resolved bool)) *MergeRequestService_ResolveComment_Call {
1396 _c.Call.Run(func(args mock.Arguments) {
1397 var arg0 context.Context
1398 if args[0] != nil {
1399 arg0 = args[0].(context.Context)
1400 }
1401 var arg1 domain.Principal
1402 if args[1] != nil {
1403 arg1 = args[1].(domain.Principal)
1404 }
1405 var arg2 domain.RepoName
1406 if args[2] != nil {
1407 arg2 = args[2].(domain.RepoName)
1408 }
1409 var arg3 int64
1410 if args[3] != nil {
1411 arg3 = args[3].(int64)
1412 }
1413 var arg4 int64
1414 if args[4] != nil {
1415 arg4 = args[4].(int64)
1416 }
1417 var arg5 bool
1418 if args[5] != nil {
1419 arg5 = args[5].(bool)
1420 }
1421 run(
1422 arg0,
1423 arg1,
1424 arg2,
1425 arg3,
1426 arg4,
1427 arg5,
1428 )
1429 })
1430 return _c
1431}
1432
1433func (_c *MergeRequestService_ResolveComment_Call) Return(comment domain.Comment, err error) *MergeRequestService_ResolveComment_Call {
1434 _c.Call.Return(comment, err)
1435 return _c
1436}
1437
1438func (_c *MergeRequestService_ResolveComment_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name domain.RepoName, number int64, commentID int64, resolved bool) (domain.Comment, error)) *MergeRequestService_ResolveComment_Call {
1439 _c.Call.Return(run)
1440 return _c
1441}