// 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" ) // NewMirrorPusher creates a new instance of MirrorPusher. 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 NewMirrorPusher(t interface { mock.TestingT Cleanup(func()) }) *MirrorPusher { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MirrorPusher{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MirrorPusher is an autogenerated mock type for the MirrorPusher type type MirrorPusher struct { mock.Mock } type MirrorPusher_Expecter struct { mock *mock.Mock } func (_m *MirrorPusher) EXPECT() *MirrorPusher_Expecter { return &MirrorPusher_Expecter{mock: &_m.Mock} } // Push provides a mock function for the type MirrorPusher func (_mock *MirrorPusher) Push(ctx context.Context, req ports.MirrorPush) (ports.MirrorPushResult, error) { ret := _mock.Called(ctx, req) if len(ret) == 0 { panic("no return value specified for Push") } var r0 ports.MirrorPushResult var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, ports.MirrorPush) (ports.MirrorPushResult, error)); ok { return returnFunc(ctx, req) } if returnFunc, ok := ret.Get(0).(func(context.Context, ports.MirrorPush) ports.MirrorPushResult); ok { r0 = returnFunc(ctx, req) } else { r0 = ret.Get(0).(ports.MirrorPushResult) } if returnFunc, ok := ret.Get(1).(func(context.Context, ports.MirrorPush) error); ok { r1 = returnFunc(ctx, req) } else { r1 = ret.Error(1) } return r0, r1 } // MirrorPusher_Push_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Push' type MirrorPusher_Push_Call struct { *mock.Call } // Push is a helper method to define mock.On call // - ctx context.Context // - req ports.MirrorPush func (_e *MirrorPusher_Expecter) Push(ctx any, req any) *MirrorPusher_Push_Call { return &MirrorPusher_Push_Call{Call: _e.mock.On("Push", ctx, req)} } func (_c *MirrorPusher_Push_Call) Run(run func(ctx context.Context, req ports.MirrorPush)) *MirrorPusher_Push_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 ports.MirrorPush if args[1] != nil { arg1 = args[1].(ports.MirrorPush) } run( arg0, arg1, ) }) return _c } func (_c *MirrorPusher_Push_Call) Return(mirrorPushResult ports.MirrorPushResult, err error) *MirrorPusher_Push_Call { _c.Call.Return(mirrorPushResult, err) return _c } func (_c *MirrorPusher_Push_Call) RunAndReturn(run func(ctx context.Context, req ports.MirrorPush) (ports.MirrorPushResult, error)) *MirrorPusher_Push_Call { _c.Call.Return(run) return _c }