github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/conduit.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocknetwork 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 9 network "github.com/onflow/flow-go/network" 10 ) 11 12 // Conduit is an autogenerated mock type for the Conduit type 13 type Conduit struct { 14 mock.Mock 15 } 16 17 // Close provides a mock function with given fields: 18 func (_m *Conduit) Close() error { 19 ret := _m.Called() 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func() error); ok { 23 r0 = rf() 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 // Multicast provides a mock function with given fields: event, num, targetIDs 32 func (_m *Conduit) Multicast(event interface{}, num uint, targetIDs ...flow.Identifier) error { 33 _va := make([]interface{}, len(targetIDs)) 34 for _i := range targetIDs { 35 _va[_i] = targetIDs[_i] 36 } 37 var _ca []interface{} 38 _ca = append(_ca, event, num) 39 _ca = append(_ca, _va...) 40 ret := _m.Called(_ca...) 41 42 var r0 error 43 if rf, ok := ret.Get(0).(func(interface{}, uint, ...flow.Identifier) error); ok { 44 r0 = rf(event, num, targetIDs...) 45 } else { 46 r0 = ret.Error(0) 47 } 48 49 return r0 50 } 51 52 // Publish provides a mock function with given fields: event, targetIDs 53 func (_m *Conduit) Publish(event interface{}, targetIDs ...flow.Identifier) error { 54 _va := make([]interface{}, len(targetIDs)) 55 for _i := range targetIDs { 56 _va[_i] = targetIDs[_i] 57 } 58 var _ca []interface{} 59 _ca = append(_ca, event) 60 _ca = append(_ca, _va...) 61 ret := _m.Called(_ca...) 62 63 var r0 error 64 if rf, ok := ret.Get(0).(func(interface{}, ...flow.Identifier) error); ok { 65 r0 = rf(event, targetIDs...) 66 } else { 67 r0 = ret.Error(0) 68 } 69 70 return r0 71 } 72 73 // ReportMisbehavior provides a mock function with given fields: _a0 74 func (_m *Conduit) ReportMisbehavior(_a0 network.MisbehaviorReport) { 75 _m.Called(_a0) 76 } 77 78 // Unicast provides a mock function with given fields: event, targetID 79 func (_m *Conduit) Unicast(event interface{}, targetID flow.Identifier) error { 80 ret := _m.Called(event, targetID) 81 82 var r0 error 83 if rf, ok := ret.Get(0).(func(interface{}, flow.Identifier) error); ok { 84 r0 = rf(event, targetID) 85 } else { 86 r0 = ret.Error(0) 87 } 88 89 return r0 90 } 91 92 type mockConstructorTestingTNewConduit interface { 93 mock.TestingT 94 Cleanup(func()) 95 } 96 97 // NewConduit creates a new instance of Conduit. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 98 func NewConduit(t mockConstructorTestingTNewConduit) *Conduit { 99 mock := &Conduit{} 100 mock.Mock.Test(t) 101 102 t.Cleanup(func() { mock.AssertExpectations(t) }) 103 104 return mock 105 }