github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/unicast_manager_factory_func.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 flow "github.com/onflow/flow-go/model/flow" 9 10 module "github.com/onflow/flow-go/module" 11 12 p2p "github.com/onflow/flow-go/network/p2p" 13 14 time "time" 15 16 zerolog "github.com/rs/zerolog" 17 ) 18 19 // UnicastManagerFactoryFunc is an autogenerated mock type for the UnicastManagerFactoryFunc type 20 type UnicastManagerFactoryFunc struct { 21 mock.Mock 22 } 23 24 // Execute provides a mock function with given fields: logger, streamFactory, sporkId, createStreamRetryDelay, connStatus, metrics 25 func (_m *UnicastManagerFactoryFunc) Execute(logger zerolog.Logger, streamFactory p2p.StreamFactory, sporkId flow.Identifier, createStreamRetryDelay time.Duration, connStatus p2p.PeerConnections, metrics module.UnicastManagerMetrics) p2p.UnicastManager { 26 ret := _m.Called(logger, streamFactory, sporkId, createStreamRetryDelay, connStatus, metrics) 27 28 var r0 p2p.UnicastManager 29 if rf, ok := ret.Get(0).(func(zerolog.Logger, p2p.StreamFactory, flow.Identifier, time.Duration, p2p.PeerConnections, module.UnicastManagerMetrics) p2p.UnicastManager); ok { 30 r0 = rf(logger, streamFactory, sporkId, createStreamRetryDelay, connStatus, metrics) 31 } else { 32 if ret.Get(0) != nil { 33 r0 = ret.Get(0).(p2p.UnicastManager) 34 } 35 } 36 37 return r0 38 } 39 40 type mockConstructorTestingTNewUnicastManagerFactoryFunc interface { 41 mock.TestingT 42 Cleanup(func()) 43 } 44 45 // NewUnicastManagerFactoryFunc creates a new instance of UnicastManagerFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 46 func NewUnicastManagerFactoryFunc(t mockConstructorTestingTNewUnicastManagerFactoryFunc) *UnicastManagerFactoryFunc { 47 mock := &UnicastManagerFactoryFunc{} 48 mock.Mock.Test(t) 49 50 t.Cleanup(func() { mock.AssertExpectations(t) }) 51 52 return mock 53 }