remote_runtime_mock.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8 "context"
9
10 "github.com/bnema/vev/internal/ports"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockRemoteRuntime creates a new instance of MockRemoteRuntime. 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 NewMockRemoteRuntime(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MockRemoteRuntime {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &MockRemoteRuntime{}
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// MockRemoteRuntime is an autogenerated mock type for the RemoteRuntime type
38type MockRemoteRuntime struct {
39 mock.Mock
40}
41
42type MockRemoteRuntime_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *MockRemoteRuntime) EXPECT() *MockRemoteRuntime_Expecter {
47 return &MockRemoteRuntime_Expecter{mock: &_m.Mock}
48}
49
50// Run provides a mock function for the type MockRemoteRuntime
51func (_mock *MockRemoteRuntime) Run(ctx context.Context, jobs <-chan ports.RemoteJob, results chan<- ports.RemoteJobResult) error {
52 ret := _mock.Called(ctx, jobs, results)
53
54 if len(ret) == 0 {
55 panic("no return value specified for Run")
56 }
57
58 var r0 error
59 if returnFunc, ok := ret.Get(0).(func(context.Context, <-chan ports.RemoteJob, chan<- ports.RemoteJobResult) error); ok {
60 r0 = returnFunc(ctx, jobs, results)
61 } else {
62 r0 = ret.Error(0)
63 }
64 return r0
65}
66
67// MockRemoteRuntime_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
68type MockRemoteRuntime_Run_Call struct {
69 *mock.Call
70}
71
72// Run is a helper method to define mock.On call
73// - ctx context.Context
74// - jobs <-chan ports.RemoteJob
75// - results chan<- ports.RemoteJobResult
76func (_e *MockRemoteRuntime_Expecter) Run(ctx any, jobs any, results any) *MockRemoteRuntime_Run_Call {
77 return &MockRemoteRuntime_Run_Call{Call: _e.mock.On("Run", ctx, jobs, results)}
78}
79
80func (_c *MockRemoteRuntime_Run_Call) Run(run func(ctx context.Context, jobs <-chan ports.RemoteJob, results chan<- ports.RemoteJobResult)) *MockRemoteRuntime_Run_Call {
81 _c.Call.Run(func(args mock.Arguments) {
82 var arg0 context.Context
83 if args[0] != nil {
84 arg0 = args[0].(context.Context)
85 }
86 var arg1 <-chan ports.RemoteJob
87 if args[1] != nil {
88 arg1 = args[1].(<-chan ports.RemoteJob)
89 }
90 var arg2 chan<- ports.RemoteJobResult
91 if args[2] != nil {
92 arg2 = args[2].(chan<- ports.RemoteJobResult)
93 }
94 run(
95 arg0,
96 arg1,
97 arg2,
98 )
99 })
100 return _c
101}
102
103func (_c *MockRemoteRuntime_Run_Call) Return(err error) *MockRemoteRuntime_Run_Call {
104 _c.Call.Return(err)
105 return _c
106}
107
108func (_c *MockRemoteRuntime_Run_Call) RunAndReturn(run func(ctx context.Context, jobs <-chan ports.RemoteJob, results chan<- ports.RemoteJobResult) error) *MockRemoteRuntime_Run_Call {
109 _c.Call.Return(run)
110 return _c
111}