// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package portsmocks import ( "context" "github.com/bnema/vev/internal/ports" mock "github.com/stretchr/testify/mock" ) // 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. // The first argument is typically a *testing.T value. func NewMockRemoteRuntime(t interface { mock.TestingT Cleanup(func()) }) *MockRemoteRuntime { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockRemoteRuntime{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockRemoteRuntime is an autogenerated mock type for the RemoteRuntime type type MockRemoteRuntime struct { mock.Mock } type MockRemoteRuntime_Expecter struct { mock *mock.Mock } func (_m *MockRemoteRuntime) EXPECT() *MockRemoteRuntime_Expecter { return &MockRemoteRuntime_Expecter{mock: &_m.Mock} } // Run provides a mock function for the type MockRemoteRuntime func (_mock *MockRemoteRuntime) Run(ctx context.Context, jobs <-chan ports.RemoteJob, results chan<- ports.RemoteJobResult) error { ret := _mock.Called(ctx, jobs, results) if len(ret) == 0 { panic("no return value specified for Run") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, <-chan ports.RemoteJob, chan<- ports.RemoteJobResult) error); ok { r0 = returnFunc(ctx, jobs, results) } else { r0 = ret.Error(0) } return r0 } // MockRemoteRuntime_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' type MockRemoteRuntime_Run_Call struct { *mock.Call } // Run is a helper method to define mock.On call // - ctx context.Context // - jobs <-chan ports.RemoteJob // - results chan<- ports.RemoteJobResult func (_e *MockRemoteRuntime_Expecter) Run(ctx any, jobs any, results any) *MockRemoteRuntime_Run_Call { return &MockRemoteRuntime_Run_Call{Call: _e.mock.On("Run", ctx, jobs, results)} } func (_c *MockRemoteRuntime_Run_Call) Run(run func(ctx context.Context, jobs <-chan ports.RemoteJob, results chan<- ports.RemoteJobResult)) *MockRemoteRuntime_Run_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 <-chan ports.RemoteJob if args[1] != nil { arg1 = args[1].(<-chan ports.RemoteJob) } var arg2 chan<- ports.RemoteJobResult if args[2] != nil { arg2 = args[2].(chan<- ports.RemoteJobResult) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockRemoteRuntime_Run_Call) Return(err error) *MockRemoteRuntime_Run_Call { _c.Call.Return(err) return _c } func (_c *MockRemoteRuntime_Run_Call) RunAndReturn(run func(ctx context.Context, jobs <-chan ports.RemoteJob, results chan<- ports.RemoteJobResult) error) *MockRemoteRuntime_Run_Call { _c.Call.Return(run) return _c }