// 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" ) // 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. // The first argument is typically a *testing.T value. func NewCIGit(t interface { mock.TestingT Cleanup(func()) }) *CIGit { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CIGit{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CIGit is an autogenerated mock type for the CIGit type type CIGit struct { mock.Mock } type CIGit_Expecter struct { mock *mock.Mock } func (_m *CIGit) EXPECT() *CIGit_Expecter { return &CIGit_Expecter{mock: &_m.Mock} } // ChangedPaths provides a mock function for the type CIGit func (_mock *CIGit) ChangedPaths(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int) ([]string, bool, error) { ret := _mock.Called(ctx, repo, base, head, max) if len(ret) == 0 { panic("no return value specified for ChangedPaths") } var r0 []string var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) ([]string, bool, error)); ok { return returnFunc(ctx, repo, base, head, max) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) []string); ok { r0 = returnFunc(ctx, repo, base, head, max) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) bool); ok { r1 = returnFunc(ctx, repo, base, head, max) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) error); ok { r2 = returnFunc(ctx, repo, base, head, max) } else { r2 = ret.Error(2) } return r0, r1, r2 } // CIGit_ChangedPaths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangedPaths' type CIGit_ChangedPaths_Call struct { *mock.Call } // ChangedPaths is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - base domain.ObjectID // - head domain.ObjectID // - max int func (_e *CIGit_Expecter) ChangedPaths(ctx any, repo any, base any, head any, max any) *CIGit_ChangedPaths_Call { return &CIGit_ChangedPaths_Call{Call: _e.mock.On("ChangedPaths", ctx, repo, base, head, max)} } func (_c *CIGit_ChangedPaths_Call) Run(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, max int)) *CIGit_ChangedPaths_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.ObjectID if args[2] != nil { arg2 = args[2].(domain.ObjectID) } var arg3 domain.ObjectID if args[3] != nil { arg3 = args[3].(domain.ObjectID) } var arg4 int if args[4] != nil { arg4 = args[4].(int) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *CIGit_ChangedPaths_Call) Return(paths []string, truncated bool, err error) *CIGit_ChangedPaths_Call { _c.Call.Return(paths, truncated, err) return _c } func (_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 { _c.Call.Return(run) return _c } // CommitsOffBranches provides a mock function for the type CIGit func (_mock *CIGit) CommitsOffBranches(ctx context.Context, repo domain.RepoName, head domain.ObjectID, limit int) ([]domain.Commit, bool, error) { ret := _mock.Called(ctx, repo, head, limit) if len(ret) == 0 { panic("no return value specified for CommitsOffBranches") } var r0 []domain.Commit var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, int) ([]domain.Commit, bool, error)); ok { return returnFunc(ctx, repo, head, limit) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, int) []domain.Commit); ok { r0 = returnFunc(ctx, repo, head, limit) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.Commit) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, int) bool); ok { r1 = returnFunc(ctx, repo, head, limit) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, int) error); ok { r2 = returnFunc(ctx, repo, head, limit) } else { r2 = ret.Error(2) } return r0, r1, r2 } // CIGit_CommitsOffBranches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitsOffBranches' type CIGit_CommitsOffBranches_Call struct { *mock.Call } // CommitsOffBranches is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - head domain.ObjectID // - limit int func (_e *CIGit_Expecter) CommitsOffBranches(ctx any, repo any, head any, limit any) *CIGit_CommitsOffBranches_Call { return &CIGit_CommitsOffBranches_Call{Call: _e.mock.On("CommitsOffBranches", ctx, repo, head, limit)} } func (_c *CIGit_CommitsOffBranches_Call) Run(run func(ctx context.Context, repo domain.RepoName, head domain.ObjectID, limit int)) *CIGit_CommitsOffBranches_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.ObjectID if args[2] != nil { arg2 = args[2].(domain.ObjectID) } var arg3 int if args[3] != nil { arg3 = args[3].(int) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *CIGit_CommitsOffBranches_Call) Return(commits []domain.Commit, more bool, err error) *CIGit_CommitsOffBranches_Call { _c.Call.Return(commits, more, err) return _c } func (_c *CIGit_CommitsOffBranches_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, head domain.ObjectID, limit int) ([]domain.Commit, bool, error)) *CIGit_CommitsOffBranches_Call { _c.Call.Return(run) return _c }