github.com/observiq/bindplane-agent@v1.51.0/internal/service/mocks/mock_runnable_service.go (about) 1 // Code generated by mockery v2.42.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // MockRunnableService is an autogenerated mock type for the RunnableService type 12 type MockRunnableService struct { 13 mock.Mock 14 } 15 16 // Error provides a mock function with given fields: 17 func (_m *MockRunnableService) Error() <-chan error { 18 ret := _m.Called() 19 20 if len(ret) == 0 { 21 panic("no return value specified for Error") 22 } 23 24 var r0 <-chan error 25 if rf, ok := ret.Get(0).(func() <-chan error); ok { 26 r0 = rf() 27 } else { 28 if ret.Get(0) != nil { 29 r0 = ret.Get(0).(<-chan error) 30 } 31 } 32 33 return r0 34 } 35 36 // Start provides a mock function with given fields: ctx 37 func (_m *MockRunnableService) Start(ctx context.Context) error { 38 ret := _m.Called(ctx) 39 40 if len(ret) == 0 { 41 panic("no return value specified for Start") 42 } 43 44 var r0 error 45 if rf, ok := ret.Get(0).(func(context.Context) error); ok { 46 r0 = rf(ctx) 47 } else { 48 r0 = ret.Error(0) 49 } 50 51 return r0 52 } 53 54 // Stop provides a mock function with given fields: ctx 55 func (_m *MockRunnableService) Stop(ctx context.Context) error { 56 ret := _m.Called(ctx) 57 58 if len(ret) == 0 { 59 panic("no return value specified for Stop") 60 } 61 62 var r0 error 63 if rf, ok := ret.Get(0).(func(context.Context) error); ok { 64 r0 = rf(ctx) 65 } else { 66 r0 = ret.Error(0) 67 } 68 69 return r0 70 } 71 72 // NewMockRunnableService creates a new instance of MockRunnableService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 73 // The first argument is typically a *testing.T value. 74 func NewMockRunnableService(t interface { 75 mock.TestingT 76 Cleanup(func()) 77 }) *MockRunnableService { 78 mock := &MockRunnableService{} 79 mock.Mock.Test(t) 80 81 t.Cleanup(func() { mock.AssertExpectations(t) }) 82 83 return mock 84 }