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// NewCIGit creates a new instance of CIGit. 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 NewCIGit(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *CIGit {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &CIGit{}
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// CIGit is an autogenerated mock type for the CIGit type
38type CIGit struct {
39 mock.Mock
40}
41
42type CIGit_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *CIGit) EXPECT() *CIGit_Expecter {
47 return &CIGit_Expecter{mock: &_m.Mock}
48}
49
50// ChangedPaths provides a mock function for the type CIGit
51func (_mock *CIGit) ChangedPaths(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int) ([]string, bool, error) {
52 ret := _mock.Called(ctx, repo, base, head, max)
53
54 if len(ret) == 0 {
55 panic("no return value specified for ChangedPaths")
56 }
57
58 var r0 []string
59 var r1 bool
60 var r2 error
61 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) ([]string, bool, error)); ok {
62 return returnFunc(ctx, repo, base, head, max)
63 }
64 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) []string); ok {
65 r0 = returnFunc(ctx, repo, base, head, max)
66 } else {
67 if ret.Get(0) != nil {
68 r0 = ret.Get(0).([]string)
69 }
70 }
71 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) bool); ok {
72 r1 = returnFunc(ctx, repo, base, head, max)
73 } else {
74 r1 = ret.Get(1).(bool)
75 }
76 if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) error); ok {
77 r2 = returnFunc(ctx, repo, base, head, max)
78 } else {
79 r2 = ret.Error(2)
80 }
81 return r0, r1, r2
82}
83
84// CIGit_ChangedPaths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangedPaths'
85type CIGit_ChangedPaths_Call struct {
86 *mock.Call
87}
88
89// ChangedPaths is a helper method to define mock.On call
90// - ctx context.Context
91// - repo domain.RepoName
92// - base domain.ObjectID
93// - head domain.ObjectID
94// - max int
95func (_e *CIGit_Expecter) ChangedPaths(ctx any, repo any, base any, head any, max any) *CIGit_ChangedPaths_Call {
96 return &CIGit_ChangedPaths_Call{Call: _e.mock.On("ChangedPaths", ctx, repo, base, head, max)}
97}
98
99func (_c *CIGit_ChangedPaths_Call) Run(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int)) *CIGit_ChangedPaths_Call {
100 _c.Call.Run(func(args mock.Arguments) {
101 var arg0 context.Context
102 if args[0] != nil {
103 arg0 = args[0].(context.Context)
104 }
105 var arg1 domain.RepoName
106 if args[1] != nil {
107 arg1 = args[1].(domain.RepoName)
108 }
109 var arg2 domain.ObjectID
110 if args[2] != nil {
111 arg2 = args[2].(domain.ObjectID)
112 }
113 var arg3 domain.ObjectID
114 if args[3] != nil {
115 arg3 = args[3].(domain.ObjectID)
116 }
117 var arg4 int
118 if args[4] != nil {
119 arg4 = args[4].(int)
120 }
121 run(
122 arg0,
123 arg1,
124 arg2,
125 arg3,
126 arg4,
127 )
128 })
129 return _c
130}
131
132func (_c *CIGit_ChangedPaths_Call) Return(paths []string, truncated bool, err error) *CIGit_ChangedPaths_Call {
133 _c.Call.Return(paths, truncated, err)
134 return _c
135}
136
137func (_c *CIGit_ChangedPaths_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int) ([]string, bool, error)) *CIGit_ChangedPaths_Call {
138 _c.Call.Return(run)
139 return _c
140}