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