// 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" ) // NewReleaseTagWriter creates a new instance of ReleaseTagWriter. 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 NewReleaseTagWriter(t interface { mock.TestingT Cleanup(func()) }) *ReleaseTagWriter { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &ReleaseTagWriter{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // ReleaseTagWriter is an autogenerated mock type for the ReleaseTagWriter type type ReleaseTagWriter struct { mock.Mock } type ReleaseTagWriter_Expecter struct { mock *mock.Mock } func (_m *ReleaseTagWriter) EXPECT() *ReleaseTagWriter_Expecter { return &ReleaseTagWriter_Expecter{mock: &_m.Mock} } // CreateTag provides a mock function for the type ReleaseTagWriter func (_mock *ReleaseTagWriter) CreateTag(ctx context.Context, repo domain.RepoName, tag string, target domain.ObjectID) error { ret := _mock.Called(ctx, repo, tag, target) if len(ret) == 0 { panic("no return value specified for CreateTag") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, domain.ObjectID) error); ok { r0 = returnFunc(ctx, repo, tag, target) } else { r0 = ret.Error(0) } return r0 } // ReleaseTagWriter_CreateTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTag' type ReleaseTagWriter_CreateTag_Call struct { *mock.Call } // CreateTag is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - tag string // - target domain.ObjectID func (_e *ReleaseTagWriter_Expecter) CreateTag(ctx any, repo any, tag any, target any) *ReleaseTagWriter_CreateTag_Call { return &ReleaseTagWriter_CreateTag_Call{Call: _e.mock.On("CreateTag", ctx, repo, tag, target)} } func (_c *ReleaseTagWriter_CreateTag_Call) Run(run func(ctx context.Context, repo domain.RepoName, tag string, target domain.ObjectID)) *ReleaseTagWriter_CreateTag_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 *ReleaseTagWriter_CreateTag_Call) Return(err error) *ReleaseTagWriter_CreateTag_Call { _c.Call.Return(err) return _c } func (_c *ReleaseTagWriter_CreateTag_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, tag string, target domain.ObjectID) error) *ReleaseTagWriter_CreateTag_Call { _c.Call.Return(run) return _c }