// 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" ) // NewMirrorWarner creates a new instance of MirrorWarner. 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 NewMirrorWarner(t interface { mock.TestingT Cleanup(func()) }) *MirrorWarner { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MirrorWarner{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MirrorWarner is an autogenerated mock type for the MirrorWarner type type MirrorWarner struct { mock.Mock } type MirrorWarner_Expecter struct { mock *mock.Mock } func (_m *MirrorWarner) EXPECT() *MirrorWarner_Expecter { return &MirrorWarner_Expecter{mock: &_m.Mock} } // Badge provides a mock function for the type MirrorWarner func (_mock *MirrorWarner) Badge(ctx context.Context, p domain.Principal, repo domain.RepoName) (domain.MirrorState, string) { ret := _mock.Called(ctx, p, repo) if len(ret) == 0 { panic("no return value specified for Badge") } var r0 domain.MirrorState var r1 string if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) (domain.MirrorState, string)); ok { return returnFunc(ctx, p, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) domain.MirrorState); ok { r0 = returnFunc(ctx, p, repo) } else { r0 = ret.Get(0).(domain.MirrorState) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName) string); ok { r1 = returnFunc(ctx, p, repo) } else { r1 = ret.Get(1).(string) } return r0, r1 } // MirrorWarner_Badge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Badge' type MirrorWarner_Badge_Call struct { *mock.Call } // Badge is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName func (_e *MirrorWarner_Expecter) Badge(ctx any, p any, repo any) *MirrorWarner_Badge_Call { return &MirrorWarner_Badge_Call{Call: _e.mock.On("Badge", ctx, p, repo)} } func (_c *MirrorWarner_Badge_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName)) *MirrorWarner_Badge_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MirrorWarner_Badge_Call) Return(mirrorState domain.MirrorState, s string) *MirrorWarner_Badge_Call { _c.Call.Return(mirrorState, s) return _c } func (_c *MirrorWarner_Badge_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName) (domain.MirrorState, string)) *MirrorWarner_Badge_Call { _c.Call.Return(run) return _c } // Warning provides a mock function for the type MirrorWarner func (_mock *MirrorWarner) Warning(ctx context.Context, p domain.Principal, repo domain.RepoName) string { ret := _mock.Called(ctx, p, repo) if len(ret) == 0 { panic("no return value specified for Warning") } var r0 string if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName) string); ok { r0 = returnFunc(ctx, p, repo) } else { r0 = ret.Get(0).(string) } return r0 } // MirrorWarner_Warning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Warning' type MirrorWarner_Warning_Call struct { *mock.Call } // Warning is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName func (_e *MirrorWarner_Expecter) Warning(ctx any, p any, repo any) *MirrorWarner_Warning_Call { return &MirrorWarner_Warning_Call{Call: _e.mock.On("Warning", ctx, p, repo)} } func (_c *MirrorWarner_Warning_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName)) *MirrorWarner_Warning_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MirrorWarner_Warning_Call) Return(s string) *MirrorWarner_Warning_Call { _c.Call.Return(s) return _c } func (_c *MirrorWarner_Warning_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName) string) *MirrorWarner_Warning_Call { _c.Call.Return(run) return _c }