github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/connector.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 10 peer "github.com/libp2p/go-libp2p/core/peer" 11 ) 12 13 // Connector is an autogenerated mock type for the Connector type 14 type Connector struct { 15 mock.Mock 16 } 17 18 // Connect provides a mock function with given fields: ctx, peerChan 19 func (_m *Connector) Connect(ctx context.Context, peerChan <-chan peer.AddrInfo) { 20 _m.Called(ctx, peerChan) 21 } 22 23 type mockConstructorTestingTNewConnector interface { 24 mock.TestingT 25 Cleanup(func()) 26 } 27 28 // NewConnector creates a new instance of Connector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 29 func NewConnector(t mockConstructorTestingTNewConnector) *Connector { 30 mock := &Connector{} 31 mock.Mock.Test(t) 32 33 t.Cleanup(func() { mock.AssertExpectations(t) }) 34 35 return mock 36 }