github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/core_p2_p.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 component "github.com/onflow/flow-go/module/component" 8 9 irrecoverable "github.com/onflow/flow-go/module/irrecoverable" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // CoreP2P is an autogenerated mock type for the CoreP2P type 15 type CoreP2P struct { 16 mock.Mock 17 } 18 19 // GetIPPort provides a mock function with given fields: 20 func (_m *CoreP2P) GetIPPort() (string, string, error) { 21 ret := _m.Called() 22 23 var r0 string 24 var r1 string 25 var r2 error 26 if rf, ok := ret.Get(0).(func() (string, string, error)); ok { 27 return rf() 28 } 29 if rf, ok := ret.Get(0).(func() string); ok { 30 r0 = rf() 31 } else { 32 r0 = ret.Get(0).(string) 33 } 34 35 if rf, ok := ret.Get(1).(func() string); ok { 36 r1 = rf() 37 } else { 38 r1 = ret.Get(1).(string) 39 } 40 41 if rf, ok := ret.Get(2).(func() error); ok { 42 r2 = rf() 43 } else { 44 r2 = ret.Error(2) 45 } 46 47 return r0, r1, r2 48 } 49 50 // Host provides a mock function with given fields: 51 func (_m *CoreP2P) Host() host.Host { 52 ret := _m.Called() 53 54 var r0 host.Host 55 if rf, ok := ret.Get(0).(func() host.Host); ok { 56 r0 = rf() 57 } else { 58 if ret.Get(0) != nil { 59 r0 = ret.Get(0).(host.Host) 60 } 61 } 62 63 return r0 64 } 65 66 // SetComponentManager provides a mock function with given fields: cm 67 func (_m *CoreP2P) SetComponentManager(cm *component.ComponentManager) { 68 _m.Called(cm) 69 } 70 71 // Start provides a mock function with given fields: ctx 72 func (_m *CoreP2P) Start(ctx irrecoverable.SignalerContext) { 73 _m.Called(ctx) 74 } 75 76 // Stop provides a mock function with given fields: 77 func (_m *CoreP2P) Stop() error { 78 ret := _m.Called() 79 80 var r0 error 81 if rf, ok := ret.Get(0).(func() error); ok { 82 r0 = rf() 83 } else { 84 r0 = ret.Error(0) 85 } 86 87 return r0 88 } 89 90 type mockConstructorTestingTNewCoreP2P interface { 91 mock.TestingT 92 Cleanup(func()) 93 } 94 95 // NewCoreP2P creates a new instance of CoreP2P. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 96 func NewCoreP2P(t mockConstructorTestingTNewCoreP2P) *CoreP2P { 97 mock := &CoreP2P{} 98 mock.Mock.Test(t) 99 100 t.Cleanup(func() { mock.AssertExpectations(t) }) 101 102 return mock 103 }