github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mempool/mock/identifier_map.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mempool 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // IdentifierMap is an autogenerated mock type for the IdentifierMap type 12 type IdentifierMap struct { 13 mock.Mock 14 } 15 16 // Append provides a mock function with given fields: key, id 17 func (_m *IdentifierMap) Append(key flow.Identifier, id flow.Identifier) error { 18 ret := _m.Called(key, id) 19 20 var r0 error 21 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { 22 r0 = rf(key, id) 23 } else { 24 r0 = ret.Error(0) 25 } 26 27 return r0 28 } 29 30 // Get provides a mock function with given fields: key 31 func (_m *IdentifierMap) Get(key flow.Identifier) ([]flow.Identifier, bool) { 32 ret := _m.Called(key) 33 34 var r0 []flow.Identifier 35 var r1 bool 36 if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.Identifier, bool)); ok { 37 return rf(key) 38 } 39 if rf, ok := ret.Get(0).(func(flow.Identifier) []flow.Identifier); ok { 40 r0 = rf(key) 41 } else { 42 if ret.Get(0) != nil { 43 r0 = ret.Get(0).([]flow.Identifier) 44 } 45 } 46 47 if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok { 48 r1 = rf(key) 49 } else { 50 r1 = ret.Get(1).(bool) 51 } 52 53 return r0, r1 54 } 55 56 // Has provides a mock function with given fields: key 57 func (_m *IdentifierMap) Has(key flow.Identifier) bool { 58 ret := _m.Called(key) 59 60 var r0 bool 61 if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { 62 r0 = rf(key) 63 } else { 64 r0 = ret.Get(0).(bool) 65 } 66 67 return r0 68 } 69 70 // Keys provides a mock function with given fields: 71 func (_m *IdentifierMap) Keys() ([]flow.Identifier, bool) { 72 ret := _m.Called() 73 74 var r0 []flow.Identifier 75 var r1 bool 76 if rf, ok := ret.Get(0).(func() ([]flow.Identifier, bool)); ok { 77 return rf() 78 } 79 if rf, ok := ret.Get(0).(func() []flow.Identifier); ok { 80 r0 = rf() 81 } else { 82 if ret.Get(0) != nil { 83 r0 = ret.Get(0).([]flow.Identifier) 84 } 85 } 86 87 if rf, ok := ret.Get(1).(func() bool); ok { 88 r1 = rf() 89 } else { 90 r1 = ret.Get(1).(bool) 91 } 92 93 return r0, r1 94 } 95 96 // Remove provides a mock function with given fields: key 97 func (_m *IdentifierMap) Remove(key flow.Identifier) bool { 98 ret := _m.Called(key) 99 100 var r0 bool 101 if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { 102 r0 = rf(key) 103 } else { 104 r0 = ret.Get(0).(bool) 105 } 106 107 return r0 108 } 109 110 // RemoveIdFromKey provides a mock function with given fields: key, id 111 func (_m *IdentifierMap) RemoveIdFromKey(key flow.Identifier, id flow.Identifier) error { 112 ret := _m.Called(key, id) 113 114 var r0 error 115 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { 116 r0 = rf(key, id) 117 } else { 118 r0 = ret.Error(0) 119 } 120 121 return r0 122 } 123 124 // Size provides a mock function with given fields: 125 func (_m *IdentifierMap) Size() uint { 126 ret := _m.Called() 127 128 var r0 uint 129 if rf, ok := ret.Get(0).(func() uint); ok { 130 r0 = rf() 131 } else { 132 r0 = ret.Get(0).(uint) 133 } 134 135 return r0 136 } 137 138 type mockConstructorTestingTNewIdentifierMap interface { 139 mock.TestingT 140 Cleanup(func()) 141 } 142 143 // NewIdentifierMap creates a new instance of IdentifierMap. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 144 func NewIdentifierMap(t mockConstructorTestingTNewIdentifierMap) *IdentifierMap { 145 mock := &IdentifierMap{} 146 mock.Mock.Test(t) 147 148 t.Cleanup(func() { mock.AssertExpectations(t) }) 149 150 return mock 151 }