// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewGitRemote creates a new instance of GitRemote. 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 NewGitRemote(t interface { mock.TestingT Cleanup(func()) }) *GitRemote { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &GitRemote{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // GitRemote is an autogenerated mock type for the GitRemote type type GitRemote struct { mock.Mock } type GitRemote_Expecter struct { mock *mock.Mock } func (_m *GitRemote) EXPECT() *GitRemote_Expecter { return &GitRemote_Expecter{mock: &_m.Mock} } // ListRefs provides a mock function for the type GitRemote func (_mock *GitRemote) ListRefs(ctx context.Context, owner string, repo string) ([]ports.RemoteRef, error) { ret := _mock.Called(ctx, owner, repo) if len(ret) == 0 { panic("no return value specified for ListRefs") } var r0 []ports.RemoteRef var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]ports.RemoteRef, error)); ok { return returnFunc(ctx, owner, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []ports.RemoteRef); ok { r0 = returnFunc(ctx, owner, repo) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]ports.RemoteRef) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, owner, repo) } else { r1 = ret.Error(1) } return r0, r1 } // GitRemote_ListRefs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRefs' type GitRemote_ListRefs_Call struct { *mock.Call } // ListRefs is a helper method to define mock.On call // - ctx context.Context // - owner string // - repo string func (_e *GitRemote_Expecter) ListRefs(ctx any, owner any, repo any) *GitRemote_ListRefs_Call { return &GitRemote_ListRefs_Call{Call: _e.mock.On("ListRefs", ctx, owner, repo)} } func (_c *GitRemote_ListRefs_Call) Run(run func(ctx context.Context, owner string, repo string)) *GitRemote_ListRefs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *GitRemote_ListRefs_Call) Return(remoteRefs []ports.RemoteRef, err error) *GitRemote_ListRefs_Call { _c.Call.Return(remoteRefs, err) return _c } func (_c *GitRemote_ListRefs_Call) RunAndReturn(run func(ctx context.Context, owner string, repo string) ([]ports.RemoteRef, error)) *GitRemote_ListRefs_Call { _c.Call.Return(run) return _c }