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