github.com/koko1123/flow-go-1@v0.29.6/network/p2p/mock/peer_manager_factory_func.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	host "github.com/libp2p/go-libp2p/core/host"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	p2p "github.com/koko1123/flow-go-1/network/p2p"
    10  
    11  	zerolog "github.com/rs/zerolog"
    12  )
    13  
    14  // PeerManagerFactoryFunc is an autogenerated mock type for the PeerManagerFactoryFunc type
    15  type PeerManagerFactoryFunc struct {
    16  	mock.Mock
    17  }
    18  
    19  // Execute provides a mock function with given fields: _a0, peersProvider, logger
    20  func (_m *PeerManagerFactoryFunc) Execute(_a0 host.Host, peersProvider p2p.PeersProvider, logger zerolog.Logger) (p2p.PeerManager, error) {
    21  	ret := _m.Called(_a0, peersProvider, logger)
    22  
    23  	var r0 p2p.PeerManager
    24  	if rf, ok := ret.Get(0).(func(host.Host, p2p.PeersProvider, zerolog.Logger) p2p.PeerManager); ok {
    25  		r0 = rf(_a0, peersProvider, logger)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(p2p.PeerManager)
    29  		}
    30  	}
    31  
    32  	var r1 error
    33  	if rf, ok := ret.Get(1).(func(host.Host, p2p.PeersProvider, zerolog.Logger) error); ok {
    34  		r1 = rf(_a0, peersProvider, logger)
    35  	} else {
    36  		r1 = ret.Error(1)
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  type mockConstructorTestingTNewPeerManagerFactoryFunc interface {
    43  	mock.TestingT
    44  	Cleanup(func())
    45  }
    46  
    47  // NewPeerManagerFactoryFunc creates a new instance of PeerManagerFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    48  func NewPeerManagerFactoryFunc(t mockConstructorTestingTNewPeerManagerFactoryFunc) *PeerManagerFactoryFunc {
    49  	mock := &PeerManagerFactoryFunc{}
    50  	mock.Mock.Test(t)
    51  
    52  	t.Cleanup(func() { mock.AssertExpectations(t) })
    53  
    54  	return mock
    55  }