github.com/koko1123/flow-go-1@v0.29.6/module/mock/identity_provider.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 9 peer "github.com/libp2p/go-libp2p/core/peer" 10 ) 11 12 // IdentityProvider is an autogenerated mock type for the IdentityProvider type 13 type IdentityProvider struct { 14 mock.Mock 15 } 16 17 // ByNodeID provides a mock function with given fields: _a0 18 func (_m *IdentityProvider) ByNodeID(_a0 flow.Identifier) (*flow.Identity, bool) { 19 ret := _m.Called(_a0) 20 21 var r0 *flow.Identity 22 if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Identity); ok { 23 r0 = rf(_a0) 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(*flow.Identity) 27 } 28 } 29 30 var r1 bool 31 if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok { 32 r1 = rf(_a0) 33 } else { 34 r1 = ret.Get(1).(bool) 35 } 36 37 return r0, r1 38 } 39 40 // ByPeerID provides a mock function with given fields: _a0 41 func (_m *IdentityProvider) ByPeerID(_a0 peer.ID) (*flow.Identity, bool) { 42 ret := _m.Called(_a0) 43 44 var r0 *flow.Identity 45 if rf, ok := ret.Get(0).(func(peer.ID) *flow.Identity); ok { 46 r0 = rf(_a0) 47 } else { 48 if ret.Get(0) != nil { 49 r0 = ret.Get(0).(*flow.Identity) 50 } 51 } 52 53 var r1 bool 54 if rf, ok := ret.Get(1).(func(peer.ID) bool); ok { 55 r1 = rf(_a0) 56 } else { 57 r1 = ret.Get(1).(bool) 58 } 59 60 return r0, r1 61 } 62 63 // Identities provides a mock function with given fields: _a0 64 func (_m *IdentityProvider) Identities(_a0 flow.IdentityFilter) flow.IdentityList { 65 ret := _m.Called(_a0) 66 67 var r0 flow.IdentityList 68 if rf, ok := ret.Get(0).(func(flow.IdentityFilter) flow.IdentityList); ok { 69 r0 = rf(_a0) 70 } else { 71 if ret.Get(0) != nil { 72 r0 = ret.Get(0).(flow.IdentityList) 73 } 74 } 75 76 return r0 77 } 78 79 type mockConstructorTestingTNewIdentityProvider interface { 80 mock.TestingT 81 Cleanup(func()) 82 } 83 84 // NewIdentityProvider creates a new instance of IdentityProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 85 func NewIdentityProvider(t mockConstructorTestingTNewIdentityProvider) *IdentityProvider { 86 mock := &IdentityProvider{} 87 mock.Mock.Test(t) 88 89 t.Cleanup(func() { mock.AssertExpectations(t) }) 90 91 return mock 92 }