github.com/Finschia/ostracon@v1.1.5/p2p/mocks/node_info.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 p2p "github.com/Finschia/ostracon/p2p" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // NodeInfo is an autogenerated mock type for the NodeInfo type 11 type NodeInfo struct { 12 mock.Mock 13 } 14 15 // CompatibleWith provides a mock function with given fields: other 16 func (_m *NodeInfo) CompatibleWith(other p2p.NodeInfo) error { 17 ret := _m.Called(other) 18 19 var r0 error 20 if rf, ok := ret.Get(0).(func(p2p.NodeInfo) error); ok { 21 r0 = rf(other) 22 } else { 23 r0 = ret.Error(0) 24 } 25 26 return r0 27 } 28 29 // ID provides a mock function with given fields: 30 func (_m *NodeInfo) ID() p2p.ID { 31 ret := _m.Called() 32 33 var r0 p2p.ID 34 if rf, ok := ret.Get(0).(func() p2p.ID); ok { 35 r0 = rf() 36 } else { 37 r0 = ret.Get(0).(p2p.ID) 38 } 39 40 return r0 41 } 42 43 // NetAddress provides a mock function with given fields: 44 func (_m *NodeInfo) NetAddress() (*p2p.NetAddress, error) { 45 ret := _m.Called() 46 47 var r0 *p2p.NetAddress 48 var r1 error 49 if rf, ok := ret.Get(0).(func() (*p2p.NetAddress, error)); ok { 50 return rf() 51 } 52 if rf, ok := ret.Get(0).(func() *p2p.NetAddress); ok { 53 r0 = rf() 54 } else { 55 if ret.Get(0) != nil { 56 r0 = ret.Get(0).(*p2p.NetAddress) 57 } 58 } 59 60 if rf, ok := ret.Get(1).(func() error); ok { 61 r1 = rf() 62 } else { 63 r1 = ret.Error(1) 64 } 65 66 return r0, r1 67 } 68 69 // Validate provides a mock function with given fields: 70 func (_m *NodeInfo) Validate() error { 71 ret := _m.Called() 72 73 var r0 error 74 if rf, ok := ret.Get(0).(func() error); ok { 75 r0 = rf() 76 } else { 77 r0 = ret.Error(0) 78 } 79 80 return r0 81 } 82 83 // NewNodeInfo creates a new instance of NodeInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 84 // The first argument is typically a *testing.T value. 85 func NewNodeInfo(t interface { 86 mock.TestingT 87 Cleanup(func()) 88 }) *NodeInfo { 89 mock := &NodeInfo{} 90 mock.Mock.Test(t) 91 92 t.Cleanup(func() { mock.AssertExpectations(t) }) 93 94 return mock 95 }