// 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" ) // NewPullGit creates a new instance of PullGit. 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 NewPullGit(t interface { mock.TestingT Cleanup(func()) }) *PullGit { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &PullGit{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // PullGit is an autogenerated mock type for the PullGit type type PullGit struct { mock.Mock } type PullGit_Expecter struct { mock *mock.Mock } func (_m *PullGit) EXPECT() *PullGit_Expecter { return &PullGit_Expecter{mock: &_m.Mock} } // PullRef provides a mock function for the type PullGit func (_mock *PullGit) PullRef(ctx context.Context, repo domain.RepoName, ref string) (domain.ObjectID, error) { ret := _mock.Called(ctx, repo, ref) if len(ret) == 0 { panic("no return value specified for PullRef") } var r0 domain.ObjectID var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) (domain.ObjectID, error)); ok { return returnFunc(ctx, repo, ref) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) domain.ObjectID); ok { r0 = returnFunc(ctx, repo, ref) } else { r0 = ret.Get(0).(domain.ObjectID) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, string) error); ok { r1 = returnFunc(ctx, repo, ref) } else { r1 = ret.Error(1) } return r0, r1 } // PullGit_PullRef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PullRef' type PullGit_PullRef_Call struct { *mock.Call } // PullRef is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - ref string func (_e *PullGit_Expecter) PullRef(ctx any, repo any, ref any) *PullGit_PullRef_Call { return &PullGit_PullRef_Call{Call: _e.mock.On("PullRef", ctx, repo, ref)} } func (_c *PullGit_PullRef_Call) Run(run func(ctx context.Context, repo domain.RepoName, ref string)) *PullGit_PullRef_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 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *PullGit_PullRef_Call) Return(objectID domain.ObjectID, err error) *PullGit_PullRef_Call { _c.Call.Return(objectID, err) return _c } func (_c *PullGit_PullRef_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, ref string) (domain.ObjectID, error)) *PullGit_PullRef_Call { _c.Call.Return(run) return _c } // SetPullRef provides a mock function for the type PullGit func (_mock *PullGit) SetPullRef(ctx context.Context, repo domain.RepoName, ref string, id domain.ObjectID) error { ret := _mock.Called(ctx, repo, ref, id) if len(ret) == 0 { panic("no return value specified for SetPullRef") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, domain.ObjectID) error); ok { r0 = returnFunc(ctx, repo, ref, id) } else { r0 = ret.Error(0) } return r0 } // PullGit_SetPullRef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPullRef' type PullGit_SetPullRef_Call struct { *mock.Call } // SetPullRef is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - ref string // - id domain.ObjectID func (_e *PullGit_Expecter) SetPullRef(ctx any, repo any, ref any, id any) *PullGit_SetPullRef_Call { return &PullGit_SetPullRef_Call{Call: _e.mock.On("SetPullRef", ctx, repo, ref, id)} } func (_c *PullGit_SetPullRef_Call) Run(run func(ctx context.Context, repo domain.RepoName, ref string, id domain.ObjectID)) *PullGit_SetPullRef_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 string if args[2] != nil { arg2 = args[2].(string) } var arg3 domain.ObjectID if args[3] != nil { arg3 = args[3].(domain.ObjectID) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *PullGit_SetPullRef_Call) Return(err error) *PullGit_SetPullRef_Call { _c.Call.Return(err) return _c } func (_c *PullGit_SetPullRef_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, ref string, id domain.ObjectID) error) *PullGit_SetPullRef_Call { _c.Call.Return(run) return _c } // TestMerge provides a mock function for the type PullGit func (_mock *PullGit) TestMerge(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID) (domain.ObjectID, bool, error) { ret := _mock.Called(ctx, repo, base, head) if len(ret) == 0 { panic("no return value specified for TestMerge") } var r0 domain.ObjectID var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) (domain.ObjectID, bool, error)); ok { return returnFunc(ctx, repo, base, head) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) domain.ObjectID); ok { r0 = returnFunc(ctx, repo, base, head) } else { r0 = ret.Get(0).(domain.ObjectID) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) bool); ok { r1 = returnFunc(ctx, repo, base, head) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok { r2 = returnFunc(ctx, repo, base, head) } else { r2 = ret.Error(2) } return r0, r1, r2 } // PullGit_TestMerge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestMerge' type PullGit_TestMerge_Call struct { *mock.Call } // TestMerge is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - base domain.ObjectID // - head domain.ObjectID func (_e *PullGit_Expecter) TestMerge(ctx any, repo any, base any, head any) *PullGit_TestMerge_Call { return &PullGit_TestMerge_Call{Call: _e.mock.On("TestMerge", ctx, repo, base, head)} } func (_c *PullGit_TestMerge_Call) Run(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID)) *PullGit_TestMerge_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) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *PullGit_TestMerge_Call) Return(tree domain.ObjectID, clean bool, err error) *PullGit_TestMerge_Call { _c.Call.Return(tree, clean, err) return _c } func (_c *PullGit_TestMerge_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID) (domain.ObjectID, bool, error)) *PullGit_TestMerge_Call { _c.Call.Return(run) return _c }