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