github.com/koko1123/flow-go-1@v0.29.6/module/mempool/mock/identifier_map.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mempool 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/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 if rf, ok := ret.Get(0).(func(flow.Identifier) []flow.Identifier); ok { 36 r0 = rf(key) 37 } else { 38 if ret.Get(0) != nil { 39 r0 = ret.Get(0).([]flow.Identifier) 40 } 41 } 42 43 var r1 bool 44 if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok { 45 r1 = rf(key) 46 } else { 47 r1 = ret.Get(1).(bool) 48 } 49 50 return r0, r1 51 } 52 53 // Has provides a mock function with given fields: key 54 func (_m *IdentifierMap) Has(key flow.Identifier) bool { 55 ret := _m.Called(key) 56 57 var r0 bool 58 if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { 59 r0 = rf(key) 60 } else { 61 r0 = ret.Get(0).(bool) 62 } 63 64 return r0 65 } 66 67 // Keys provides a mock function with given fields: 68 func (_m *IdentifierMap) Keys() ([]flow.Identifier, bool) { 69 ret := _m.Called() 70 71 var r0 []flow.Identifier 72 if rf, ok := ret.Get(0).(func() []flow.Identifier); ok { 73 r0 = rf() 74 } else { 75 if ret.Get(0) != nil { 76 r0 = ret.Get(0).([]flow.Identifier) 77 } 78 } 79 80 var r1 bool 81 if rf, ok := ret.Get(1).(func() bool); ok { 82 r1 = rf() 83 } else { 84 r1 = ret.Get(1).(bool) 85 } 86 87 return r0, r1 88 } 89 90 // Remove provides a mock function with given fields: key 91 func (_m *IdentifierMap) Remove(key flow.Identifier) bool { 92 ret := _m.Called(key) 93 94 var r0 bool 95 if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { 96 r0 = rf(key) 97 } else { 98 r0 = ret.Get(0).(bool) 99 } 100 101 return r0 102 } 103 104 // RemoveIdFromKey provides a mock function with given fields: key, id 105 func (_m *IdentifierMap) RemoveIdFromKey(key flow.Identifier, id flow.Identifier) error { 106 ret := _m.Called(key, id) 107 108 var r0 error 109 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { 110 r0 = rf(key, id) 111 } else { 112 r0 = ret.Error(0) 113 } 114 115 return r0 116 } 117 118 // Size provides a mock function with given fields: 119 func (_m *IdentifierMap) Size() uint { 120 ret := _m.Called() 121 122 var r0 uint 123 if rf, ok := ret.Get(0).(func() uint); ok { 124 r0 = rf() 125 } else { 126 r0 = ret.Get(0).(uint) 127 } 128 129 return r0 130 } 131 132 type mockConstructorTestingTNewIdentifierMap interface { 133 mock.TestingT 134 Cleanup(func()) 135 } 136 137 // 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. 138 func NewIdentifierMap(t mockConstructorTestingTNewIdentifierMap) *IdentifierMap { 139 mock := &IdentifierMap{} 140 mock.Mock.Test(t) 141 142 t.Cleanup(func() { mock.AssertExpectations(t) }) 143 144 return mock 145 }