github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/identity_provider.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/onflow/flow-go/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 var r1 bool 23 if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Identity, bool)); ok { 24 return rf(_a0) 25 } 26 if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Identity); ok { 27 r0 = rf(_a0) 28 } else { 29 if ret.Get(0) != nil { 30 r0 = ret.Get(0).(*flow.Identity) 31 } 32 } 33 34 if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok { 35 r1 = rf(_a0) 36 } else { 37 r1 = ret.Get(1).(bool) 38 } 39 40 return r0, r1 41 } 42 43 // ByPeerID provides a mock function with given fields: _a0 44 func (_m *IdentityProvider) ByPeerID(_a0 peer.ID) (*flow.Identity, bool) { 45 ret := _m.Called(_a0) 46 47 var r0 *flow.Identity 48 var r1 bool 49 if rf, ok := ret.Get(0).(func(peer.ID) (*flow.Identity, bool)); ok { 50 return rf(_a0) 51 } 52 if rf, ok := ret.Get(0).(func(peer.ID) *flow.Identity); ok { 53 r0 = rf(_a0) 54 } else { 55 if ret.Get(0) != nil { 56 r0 = ret.Get(0).(*flow.Identity) 57 } 58 } 59 60 if rf, ok := ret.Get(1).(func(peer.ID) bool); ok { 61 r1 = rf(_a0) 62 } else { 63 r1 = ret.Get(1).(bool) 64 } 65 66 return r0, r1 67 } 68 69 // Identities provides a mock function with given fields: _a0 70 func (_m *IdentityProvider) Identities(_a0 flow.IdentityFilter[flow.Identity]) flow.GenericIdentityList[flow.Identity] { 71 ret := _m.Called(_a0) 72 73 var r0 flow.GenericIdentityList[flow.Identity] 74 if rf, ok := ret.Get(0).(func(flow.IdentityFilter[flow.Identity]) flow.GenericIdentityList[flow.Identity]); ok { 75 r0 = rf(_a0) 76 } else { 77 if ret.Get(0) != nil { 78 r0 = ret.Get(0).(flow.GenericIdentityList[flow.Identity]) 79 } 80 } 81 82 return r0 83 } 84 85 type mockConstructorTestingTNewIdentityProvider interface { 86 mock.TestingT 87 Cleanup(func()) 88 } 89 90 // 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. 91 func NewIdentityProvider(t mockConstructorTestingTNewIdentityProvider) *IdentityProvider { 92 mock := &IdentityProvider{} 93 mock.Mock.Test(t) 94 95 t.Cleanup(func() { mock.AssertExpectations(t) }) 96 97 return mock 98 }