github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/peers_provider.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 peer "github.com/libp2p/go-libp2p/core/peer" 9 ) 10 11 // PeersProvider is an autogenerated mock type for the PeersProvider type 12 type PeersProvider struct { 13 mock.Mock 14 } 15 16 // Execute provides a mock function with given fields: 17 func (_m *PeersProvider) Execute() peer.IDSlice { 18 ret := _m.Called() 19 20 var r0 peer.IDSlice 21 if rf, ok := ret.Get(0).(func() peer.IDSlice); ok { 22 r0 = rf() 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(peer.IDSlice) 26 } 27 } 28 29 return r0 30 } 31 32 type mockConstructorTestingTNewPeersProvider interface { 33 mock.TestingT 34 Cleanup(func()) 35 } 36 37 // NewPeersProvider creates a new instance of PeersProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 38 func NewPeersProvider(t mockConstructorTestingTNewPeersProvider) *PeersProvider { 39 mock := &PeersProvider{} 40 mock.Mock.Test(t) 41 42 t.Cleanup(func() { mock.AssertExpectations(t) }) 43 44 return mock 45 }