github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/peer_manager_factory_func.go (about)

     1  // Code generated by mockery v2.21.4. 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/onflow/flow-go/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  	var r1 error
    25  	if rf, ok := ret.Get(0).(func(host.Host, p2p.PeersProvider, zerolog.Logger) (p2p.PeerManager, error)); ok {
    26  		return rf(_a0, peersProvider, logger)
    27  	}
    28  	if rf, ok := ret.Get(0).(func(host.Host, p2p.PeersProvider, zerolog.Logger) p2p.PeerManager); ok {
    29  		r0 = rf(_a0, peersProvider, logger)
    30  	} else {
    31  		if ret.Get(0) != nil {
    32  			r0 = ret.Get(0).(p2p.PeerManager)
    33  		}
    34  	}
    35  
    36  	if rf, ok := ret.Get(1).(func(host.Host, p2p.PeersProvider, zerolog.Logger) error); ok {
    37  		r1 = rf(_a0, peersProvider, logger)
    38  	} else {
    39  		r1 = ret.Error(1)
    40  	}
    41  
    42  	return r0, r1
    43  }
    44  
    45  type mockConstructorTestingTNewPeerManagerFactoryFunc interface {
    46  	mock.TestingT
    47  	Cleanup(func())
    48  }
    49  
    50  // 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.
    51  func NewPeerManagerFactoryFunc(t mockConstructorTestingTNewPeerManagerFactoryFunc) *PeerManagerFactoryFunc {
    52  	mock := &PeerManagerFactoryFunc{}
    53  	mock.Mock.Test(t)
    54  
    55  	t.Cleanup(func() { mock.AssertExpectations(t) })
    56  
    57  	return mock
    58  }