// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "io" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewGitArchive creates a new instance of GitArchive. 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 NewGitArchive(t interface { mock.TestingT Cleanup(func()) }) *GitArchive { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &GitArchive{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // GitArchive is an autogenerated mock type for the GitArchive type type GitArchive struct { mock.Mock } type GitArchive_Expecter struct { mock *mock.Mock } func (_m *GitArchive) EXPECT() *GitArchive_Expecter { return &GitArchive_Expecter{mock: &_m.Mock} } // Archive provides a mock function for the type GitArchive func (_mock *GitArchive) Archive(ctx context.Context, repo domain.RepoName, commit domain.ObjectID, prefix string, w io.Writer) error { ret := _mock.Called(ctx, repo, commit, prefix, w) if len(ret) == 0 { panic("no return value specified for Archive") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, string, io.Writer) error); ok { r0 = returnFunc(ctx, repo, commit, prefix, w) } else { r0 = ret.Error(0) } return r0 } // GitArchive_Archive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Archive' type GitArchive_Archive_Call struct { *mock.Call } // Archive is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - commit domain.ObjectID // - prefix string // - w io.Writer func (_e *GitArchive_Expecter) Archive(ctx any, repo any, commit any, prefix any, w any) *GitArchive_Archive_Call { return &GitArchive_Archive_Call{Call: _e.mock.On("Archive", ctx, repo, commit, prefix, w)} } func (_c *GitArchive_Archive_Call) Run(run func(ctx context.Context, repo domain.RepoName, commit domain.ObjectID, prefix string, w io.Writer)) *GitArchive_Archive_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 string if args[3] != nil { arg3 = args[3].(string) } var arg4 io.Writer if args[4] != nil { arg4 = args[4].(io.Writer) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *GitArchive_Archive_Call) Return(err error) *GitArchive_Archive_Call { _c.Call.Return(err) return _c } func (_c *GitArchive_Archive_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, commit domain.ObjectID, prefix string, w io.Writer) error) *GitArchive_Archive_Call { _c.Call.Return(run) return _c }