github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/subscriptions.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 channels "github.com/onflow/flow-go/network/channels" 7 mock "github.com/stretchr/testify/mock" 8 9 p2p "github.com/onflow/flow-go/network/p2p" 10 ) 11 12 // Subscriptions is an autogenerated mock type for the Subscriptions type 13 type Subscriptions struct { 14 mock.Mock 15 } 16 17 // HasSubscription provides a mock function with given fields: topic 18 func (_m *Subscriptions) HasSubscription(topic channels.Topic) bool { 19 ret := _m.Called(topic) 20 21 var r0 bool 22 if rf, ok := ret.Get(0).(func(channels.Topic) bool); ok { 23 r0 = rf(topic) 24 } else { 25 r0 = ret.Get(0).(bool) 26 } 27 28 return r0 29 } 30 31 // SetUnicastManager provides a mock function with given fields: uniMgr 32 func (_m *Subscriptions) SetUnicastManager(uniMgr p2p.UnicastManager) { 33 _m.Called(uniMgr) 34 } 35 36 type mockConstructorTestingTNewSubscriptions interface { 37 mock.TestingT 38 Cleanup(func()) 39 } 40 41 // NewSubscriptions creates a new instance of Subscriptions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 42 func NewSubscriptions(t mockConstructorTestingTNewSubscriptions) *Subscriptions { 43 mock := &Subscriptions{} 44 mock.Mock.Test(t) 45 46 t.Cleanup(func() { mock.AssertExpectations(t) }) 47 48 return mock 49 }