MirrorPusher.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "bnema.dev/ermite/internal/ports"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// 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.
15// The first argument is typically a *testing.T value.
16func NewMirrorPusher(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MirrorPusher {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &MirrorPusher{}
25 mock.Mock.Test(t)
26
27 t.Cleanup(func() {
28 if helper, ok := t.(interface{ Helper() }); ok {
29 helper.Helper()
30 }
31 mock.AssertExpectations(t)
32 })
33
34 return mock
35}
36
37// MirrorPusher is an autogenerated mock type for the MirrorPusher type
38type MirrorPusher struct {
39 mock.Mock
40}
41
42type MirrorPusher_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *MirrorPusher) EXPECT() *MirrorPusher_Expecter {
47 return &MirrorPusher_Expecter{mock: &_m.Mock}
48}
49
50// Push provides a mock function for the type MirrorPusher
51func (_mock *MirrorPusher) Push(ctx context.Context, req ports.MirrorPush) (ports.MirrorPushResult, error) {
52 ret := _mock.Called(ctx, req)
53
54 if len(ret) == 0 {
55 panic("no return value specified for Push")
56 }
57
58 var r0 ports.MirrorPushResult
59 var r1 error
60 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.MirrorPush) (ports.MirrorPushResult, error)); ok {
61 return returnFunc(ctx, req)
62 }
63 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.MirrorPush) ports.MirrorPushResult); ok {
64 r0 = returnFunc(ctx, req)
65 } else {
66 r0 = ret.Get(0).(ports.MirrorPushResult)
67 }
68 if returnFunc, ok := ret.Get(1).(func(context.Context, ports.MirrorPush) error); ok {
69 r1 = returnFunc(ctx, req)
70 } else {
71 r1 = ret.Error(1)
72 }
73 return r0, r1
74}
75
76// MirrorPusher_Push_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Push'
77type MirrorPusher_Push_Call struct {
78 *mock.Call
79}
80
81// Push is a helper method to define mock.On call
82// - ctx context.Context
83// - req ports.MirrorPush
84func (_e *MirrorPusher_Expecter) Push(ctx any, req any) *MirrorPusher_Push_Call {
85 return &MirrorPusher_Push_Call{Call: _e.mock.On("Push", ctx, req)}
86}
87
88func (_c *MirrorPusher_Push_Call) Run(run func(ctx context.Context, req ports.MirrorPush)) *MirrorPusher_Push_Call {
89 _c.Call.Run(func(args mock.Arguments) {
90 var arg0 context.Context
91 if args[0] != nil {
92 arg0 = args[0].(context.Context)
93 }
94 var arg1 ports.MirrorPush
95 if args[1] != nil {
96 arg1 = args[1].(ports.MirrorPush)
97 }
98 run(
99 arg0,
100 arg1,
101 )
102 })
103 return _c
104}
105
106func (_c *MirrorPusher_Push_Call) Return(mirrorPushResult ports.MirrorPushResult, err error) *MirrorPusher_Push_Call {
107 _c.Call.Return(mirrorPushResult, err)
108 return _c
109}
110
111func (_c *MirrorPusher_Push_Call) RunAndReturn(run func(ctx context.Context, req ports.MirrorPush) (ports.MirrorPushResult, error)) *MirrorPusher_Push_Call {
112 _c.Call.Return(run)
113 return _c
114}