github.com/koko1123/flow-go-1@v0.29.6/module/component/mock/component.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package component 4 5 import ( 6 irrecoverable "github.com/koko1123/flow-go-1/module/irrecoverable" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // Component is an autogenerated mock type for the Component type 11 type Component struct { 12 mock.Mock 13 } 14 15 // Done provides a mock function with given fields: 16 func (_m *Component) Done() <-chan struct{} { 17 ret := _m.Called() 18 19 var r0 <-chan struct{} 20 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 21 r0 = rf() 22 } else { 23 if ret.Get(0) != nil { 24 r0 = ret.Get(0).(<-chan struct{}) 25 } 26 } 27 28 return r0 29 } 30 31 // Ready provides a mock function with given fields: 32 func (_m *Component) Ready() <-chan struct{} { 33 ret := _m.Called() 34 35 var r0 <-chan struct{} 36 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 37 r0 = rf() 38 } else { 39 if ret.Get(0) != nil { 40 r0 = ret.Get(0).(<-chan struct{}) 41 } 42 } 43 44 return r0 45 } 46 47 // Start provides a mock function with given fields: _a0 48 func (_m *Component) Start(_a0 irrecoverable.SignalerContext) { 49 _m.Called(_a0) 50 } 51 52 type mockConstructorTestingTNewComponent interface { 53 mock.TestingT 54 Cleanup(func()) 55 } 56 57 // NewComponent creates a new instance of Component. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 58 func NewComponent(t mockConstructorTestingTNewComponent) *Component { 59 mock := &Component{} 60 mock.Mock.Test(t) 61 62 t.Cleanup(func() { mock.AssertExpectations(t) }) 63 64 return mock 65 }