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