// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewGitRepos creates a new instance of GitRepos. 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 NewGitRepos(t interface { mock.TestingT Cleanup(func()) }) *GitRepos { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &GitRepos{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // GitRepos is an autogenerated mock type for the GitRepos type type GitRepos struct { mock.Mock } type GitRepos_Expecter struct { mock *mock.Mock } func (_m *GitRepos) EXPECT() *GitRepos_Expecter { return &GitRepos_Expecter{mock: &_m.Mock} } // DefaultBranch provides a mock function for the type GitRepos func (_mock *GitRepos) DefaultBranch(ctx context.Context, name domain.RepoName) (string, bool, error) { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for DefaultBranch") } var r0 string var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) (string, bool, error)); ok { return returnFunc(ctx, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) string); ok { r0 = returnFunc(ctx, name) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) bool); ok { r1 = returnFunc(ctx, name) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName) error); ok { r2 = returnFunc(ctx, name) } else { r2 = ret.Error(2) } return r0, r1, r2 } // GitRepos_DefaultBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DefaultBranch' type GitRepos_DefaultBranch_Call struct { *mock.Call } // DefaultBranch is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName func (_e *GitRepos_Expecter) DefaultBranch(ctx any, name any) *GitRepos_DefaultBranch_Call { return &GitRepos_DefaultBranch_Call{Call: _e.mock.On("DefaultBranch", ctx, name)} } func (_c *GitRepos_DefaultBranch_Call) Run(run func(ctx context.Context, name domain.RepoName)) *GitRepos_DefaultBranch_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) } run( arg0, arg1, ) }) return _c } func (_c *GitRepos_DefaultBranch_Call) Return(branch string, exists bool, err error) *GitRepos_DefaultBranch_Call { _c.Call.Return(branch, exists, err) return _c } func (_c *GitRepos_DefaultBranch_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName) (string, bool, error)) *GitRepos_DefaultBranch_Call { _c.Call.Return(run) return _c } // Discard provides a mock function for the type GitRepos func (_mock *GitRepos) Discard(ctx context.Context, id ports.StagedID) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for Discard") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.StagedID) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // GitRepos_Discard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Discard' type GitRepos_Discard_Call struct { *mock.Call } // Discard is a helper method to define mock.On call // - ctx context.Context // - id ports.StagedID func (_e *GitRepos_Expecter) Discard(ctx any, id any) *GitRepos_Discard_Call { return &GitRepos_Discard_Call{Call: _e.mock.On("Discard", ctx, id)} } func (_c *GitRepos_Discard_Call) Run(run func(ctx context.Context, id ports.StagedID)) *GitRepos_Discard_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.StagedID if args[1] != nil { arg1 = args[1].(ports.StagedID) } run( arg0, arg1, ) }) return _c } func (_c *GitRepos_Discard_Call) Return(err error) *GitRepos_Discard_Call { _c.Call.Return(err) return _c } func (_c *GitRepos_Discard_Call) RunAndReturn(run func(ctx context.Context, id ports.StagedID) error) *GitRepos_Discard_Call { _c.Call.Return(run) return _c } // HasBranch provides a mock function for the type GitRepos func (_mock *GitRepos) HasBranch(ctx context.Context, name domain.RepoName, branch string) (bool, error) { ret := _mock.Called(ctx, name, branch) if len(ret) == 0 { panic("no return value specified for HasBranch") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) (bool, error)); ok { return returnFunc(ctx, name, branch) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) bool); ok { r0 = returnFunc(ctx, name, branch) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, string) error); ok { r1 = returnFunc(ctx, name, branch) } else { r1 = ret.Error(1) } return r0, r1 } // GitRepos_HasBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasBranch' type GitRepos_HasBranch_Call struct { *mock.Call } // HasBranch is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName // - branch string func (_e *GitRepos_Expecter) HasBranch(ctx any, name any, branch any) *GitRepos_HasBranch_Call { return &GitRepos_HasBranch_Call{Call: _e.mock.On("HasBranch", ctx, name, branch)} } func (_c *GitRepos_HasBranch_Call) Run(run func(ctx context.Context, name domain.RepoName, branch string)) *GitRepos_HasBranch_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 *GitRepos_HasBranch_Call) Return(b bool, err error) *GitRepos_HasBranch_Call { _c.Call.Return(b, err) return _c } func (_c *GitRepos_HasBranch_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName, branch string) (bool, error)) *GitRepos_HasBranch_Call { _c.Call.Return(run) return _c } // HeadBranch provides a mock function for the type GitRepos func (_mock *GitRepos) HeadBranch(ctx context.Context, name domain.RepoName) (string, error) { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for HeadBranch") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) (string, error)); ok { return returnFunc(ctx, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) string); ok { r0 = returnFunc(ctx, name) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, name) } else { r1 = ret.Error(1) } return r0, r1 } // GitRepos_HeadBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeadBranch' type GitRepos_HeadBranch_Call struct { *mock.Call } // HeadBranch is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName func (_e *GitRepos_Expecter) HeadBranch(ctx any, name any) *GitRepos_HeadBranch_Call { return &GitRepos_HeadBranch_Call{Call: _e.mock.On("HeadBranch", ctx, name)} } func (_c *GitRepos_HeadBranch_Call) Run(run func(ctx context.Context, name domain.RepoName)) *GitRepos_HeadBranch_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) } run( arg0, arg1, ) }) return _c } func (_c *GitRepos_HeadBranch_Call) Return(s string, err error) *GitRepos_HeadBranch_Call { _c.Call.Return(s, err) return _c } func (_c *GitRepos_HeadBranch_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName) (string, error)) *GitRepos_HeadBranch_Call { _c.Call.Return(run) return _c } // List provides a mock function for the type GitRepos func (_mock *GitRepos) List(ctx context.Context) (ports.RepoDirs, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for List") } var r0 ports.RepoDirs var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (ports.RepoDirs, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) ports.RepoDirs); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(ports.RepoDirs) } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // GitRepos_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' type GitRepos_List_Call struct { *mock.Call } // List is a helper method to define mock.On call // - ctx context.Context func (_e *GitRepos_Expecter) List(ctx any) *GitRepos_List_Call { return &GitRepos_List_Call{Call: _e.mock.On("List", ctx)} } func (_c *GitRepos_List_Call) Run(run func(ctx context.Context)) *GitRepos_List_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *GitRepos_List_Call) Return(repoDirs ports.RepoDirs, err error) *GitRepos_List_Call { _c.Call.Return(repoDirs, err) return _c } func (_c *GitRepos_List_Call) RunAndReturn(run func(ctx context.Context) (ports.RepoDirs, error)) *GitRepos_List_Call { _c.Call.Return(run) return _c } // Maintain provides a mock function for the type GitRepos func (_mock *GitRepos) Maintain(ctx context.Context, name domain.RepoName) error { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for Maintain") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) error); ok { r0 = returnFunc(ctx, name) } else { r0 = ret.Error(0) } return r0 } // GitRepos_Maintain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Maintain' type GitRepos_Maintain_Call struct { *mock.Call } // Maintain is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName func (_e *GitRepos_Expecter) Maintain(ctx any, name any) *GitRepos_Maintain_Call { return &GitRepos_Maintain_Call{Call: _e.mock.On("Maintain", ctx, name)} } func (_c *GitRepos_Maintain_Call) Run(run func(ctx context.Context, name domain.RepoName)) *GitRepos_Maintain_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) } run( arg0, arg1, ) }) return _c } func (_c *GitRepos_Maintain_Call) Return(err error) *GitRepos_Maintain_Call { _c.Call.Return(err) return _c } func (_c *GitRepos_Maintain_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName) error) *GitRepos_Maintain_Call { _c.Call.Return(run) return _c } // Publish provides a mock function for the type GitRepos func (_mock *GitRepos) Publish(ctx context.Context, id ports.StagedID, name domain.RepoName) error { ret := _mock.Called(ctx, id, name) if len(ret) == 0 { panic("no return value specified for Publish") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.StagedID, domain.RepoName) error); ok { r0 = returnFunc(ctx, id, name) } else { r0 = ret.Error(0) } return r0 } // GitRepos_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish' type GitRepos_Publish_Call struct { *mock.Call } // Publish is a helper method to define mock.On call // - ctx context.Context // - id ports.StagedID // - name domain.RepoName func (_e *GitRepos_Expecter) Publish(ctx any, id any, name any) *GitRepos_Publish_Call { return &GitRepos_Publish_Call{Call: _e.mock.On("Publish", ctx, id, name)} } func (_c *GitRepos_Publish_Call) Run(run func(ctx context.Context, id ports.StagedID, name domain.RepoName)) *GitRepos_Publish_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.StagedID if args[1] != nil { arg1 = args[1].(ports.StagedID) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } run( arg0, arg1, arg2, ) }) return _c } func (_c *GitRepos_Publish_Call) Return(err error) *GitRepos_Publish_Call { _c.Call.Return(err) return _c } func (_c *GitRepos_Publish_Call) RunAndReturn(run func(ctx context.Context, id ports.StagedID, name domain.RepoName) error) *GitRepos_Publish_Call { _c.Call.Return(run) return _c } // PurgeStaging provides a mock function for the type GitRepos func (_mock *GitRepos) PurgeStaging(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for PurgeStaging") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // GitRepos_PurgeStaging_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeStaging' type GitRepos_PurgeStaging_Call struct { *mock.Call } // PurgeStaging is a helper method to define mock.On call // - ctx context.Context func (_e *GitRepos_Expecter) PurgeStaging(ctx any) *GitRepos_PurgeStaging_Call { return &GitRepos_PurgeStaging_Call{Call: _e.mock.On("PurgeStaging", ctx)} } func (_c *GitRepos_PurgeStaging_Call) Run(run func(ctx context.Context)) *GitRepos_PurgeStaging_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *GitRepos_PurgeStaging_Call) Return(err error) *GitRepos_PurgeStaging_Call { _c.Call.Return(err) return _c } func (_c *GitRepos_PurgeStaging_Call) RunAndReturn(run func(ctx context.Context) error) *GitRepos_PurgeStaging_Call { _c.Call.Return(run) return _c } // SetDefaultBranch provides a mock function for the type GitRepos func (_mock *GitRepos) SetDefaultBranch(ctx context.Context, name domain.RepoName, branch string) error { ret := _mock.Called(ctx, name, branch) if len(ret) == 0 { panic("no return value specified for SetDefaultBranch") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) error); ok { r0 = returnFunc(ctx, name, branch) } else { r0 = ret.Error(0) } return r0 } // GitRepos_SetDefaultBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDefaultBranch' type GitRepos_SetDefaultBranch_Call struct { *mock.Call } // SetDefaultBranch is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName // - branch string func (_e *GitRepos_Expecter) SetDefaultBranch(ctx any, name any, branch any) *GitRepos_SetDefaultBranch_Call { return &GitRepos_SetDefaultBranch_Call{Call: _e.mock.On("SetDefaultBranch", ctx, name, branch)} } func (_c *GitRepos_SetDefaultBranch_Call) Run(run func(ctx context.Context, name domain.RepoName, branch string)) *GitRepos_SetDefaultBranch_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 *GitRepos_SetDefaultBranch_Call) Return(err error) *GitRepos_SetDefaultBranch_Call { _c.Call.Return(err) return _c } func (_c *GitRepos_SetDefaultBranch_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName, branch string) error) *GitRepos_SetDefaultBranch_Call { _c.Call.Return(run) return _c } // Stage provides a mock function for the type GitRepos func (_mock *GitRepos) Stage(ctx context.Context) (ports.StagedID, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Stage") } var r0 ports.StagedID var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (ports.StagedID, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) ports.StagedID); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(ports.StagedID) } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // GitRepos_Stage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stage' type GitRepos_Stage_Call struct { *mock.Call } // Stage is a helper method to define mock.On call // - ctx context.Context func (_e *GitRepos_Expecter) Stage(ctx any) *GitRepos_Stage_Call { return &GitRepos_Stage_Call{Call: _e.mock.On("Stage", ctx)} } func (_c *GitRepos_Stage_Call) Run(run func(ctx context.Context)) *GitRepos_Stage_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *GitRepos_Stage_Call) Return(stagedID ports.StagedID, err error) *GitRepos_Stage_Call { _c.Call.Return(stagedID, err) return _c } func (_c *GitRepos_Stage_Call) RunAndReturn(run func(ctx context.Context) (ports.StagedID, error)) *GitRepos_Stage_Call { _c.Call.Return(run) return _c } // Trash provides a mock function for the type GitRepos func (_mock *GitRepos) Trash(ctx context.Context, name domain.RepoName) error { ret := _mock.Called(ctx, name) if len(ret) == 0 { panic("no return value specified for Trash") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) error); ok { r0 = returnFunc(ctx, name) } else { r0 = ret.Error(0) } return r0 } // GitRepos_Trash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trash' type GitRepos_Trash_Call struct { *mock.Call } // Trash is a helper method to define mock.On call // - ctx context.Context // - name domain.RepoName func (_e *GitRepos_Expecter) Trash(ctx any, name any) *GitRepos_Trash_Call { return &GitRepos_Trash_Call{Call: _e.mock.On("Trash", ctx, name)} } func (_c *GitRepos_Trash_Call) Run(run func(ctx context.Context, name domain.RepoName)) *GitRepos_Trash_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) } run( arg0, arg1, ) }) return _c } func (_c *GitRepos_Trash_Call) Return(err error) *GitRepos_Trash_Call { _c.Call.Return(err) return _c } func (_c *GitRepos_Trash_Call) RunAndReturn(run func(ctx context.Context, name domain.RepoName) error) *GitRepos_Trash_Call { _c.Call.Return(run) return _c }