github.com/iotexproject/iotex-core@v1.14.1-rc1/test/mock/mock_trie/mock_trie.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: ./db/trie/trie.go 3 4 // Package mock_trie is a generated GoMock package. 5 package mock_trie 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 trie "github.com/iotexproject/iotex-core/db/trie" 13 ) 14 15 // MockIterator is a mock of Iterator interface. 16 type MockIterator struct { 17 ctrl *gomock.Controller 18 recorder *MockIteratorMockRecorder 19 } 20 21 // MockIteratorMockRecorder is the mock recorder for MockIterator. 22 type MockIteratorMockRecorder struct { 23 mock *MockIterator 24 } 25 26 // NewMockIterator creates a new mock instance. 27 func NewMockIterator(ctrl *gomock.Controller) *MockIterator { 28 mock := &MockIterator{ctrl: ctrl} 29 mock.recorder = &MockIteratorMockRecorder{mock} 30 return mock 31 } 32 33 // EXPECT returns an object that allows the caller to indicate expected use. 34 func (m *MockIterator) EXPECT() *MockIteratorMockRecorder { 35 return m.recorder 36 } 37 38 // Next mocks base method. 39 func (m *MockIterator) Next() ([]byte, []byte, error) { 40 m.ctrl.T.Helper() 41 ret := m.ctrl.Call(m, "Next") 42 ret0, _ := ret[0].([]byte) 43 ret1, _ := ret[1].([]byte) 44 ret2, _ := ret[2].(error) 45 return ret0, ret1, ret2 46 } 47 48 // Next indicates an expected call of Next. 49 func (mr *MockIteratorMockRecorder) Next() *gomock.Call { 50 mr.mock.ctrl.T.Helper() 51 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockIterator)(nil).Next)) 52 } 53 54 // MockTrie is a mock of Trie interface. 55 type MockTrie struct { 56 ctrl *gomock.Controller 57 recorder *MockTrieMockRecorder 58 } 59 60 // MockTrieMockRecorder is the mock recorder for MockTrie. 61 type MockTrieMockRecorder struct { 62 mock *MockTrie 63 } 64 65 // NewMockTrie creates a new mock instance. 66 func NewMockTrie(ctrl *gomock.Controller) *MockTrie { 67 mock := &MockTrie{ctrl: ctrl} 68 mock.recorder = &MockTrieMockRecorder{mock} 69 return mock 70 } 71 72 // EXPECT returns an object that allows the caller to indicate expected use. 73 func (m *MockTrie) EXPECT() *MockTrieMockRecorder { 74 return m.recorder 75 } 76 77 // Clone mocks base method. 78 func (m *MockTrie) Clone(arg0 trie.KVStore) (trie.Trie, error) { 79 m.ctrl.T.Helper() 80 ret := m.ctrl.Call(m, "Clone", arg0) 81 ret0, _ := ret[0].(trie.Trie) 82 ret1, _ := ret[1].(error) 83 return ret0, ret1 84 } 85 86 // Clone indicates an expected call of Clone. 87 func (mr *MockTrieMockRecorder) Clone(arg0 interface{}) *gomock.Call { 88 mr.mock.ctrl.T.Helper() 89 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockTrie)(nil).Clone), arg0) 90 } 91 92 // Delete mocks base method. 93 func (m *MockTrie) Delete(arg0 []byte) error { 94 m.ctrl.T.Helper() 95 ret := m.ctrl.Call(m, "Delete", arg0) 96 ret0, _ := ret[0].(error) 97 return ret0 98 } 99 100 // Delete indicates an expected call of Delete. 101 func (mr *MockTrieMockRecorder) Delete(arg0 interface{}) *gomock.Call { 102 mr.mock.ctrl.T.Helper() 103 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTrie)(nil).Delete), arg0) 104 } 105 106 // Get mocks base method. 107 func (m *MockTrie) Get(arg0 []byte) ([]byte, error) { 108 m.ctrl.T.Helper() 109 ret := m.ctrl.Call(m, "Get", arg0) 110 ret0, _ := ret[0].([]byte) 111 ret1, _ := ret[1].(error) 112 return ret0, ret1 113 } 114 115 // Get indicates an expected call of Get. 116 func (mr *MockTrieMockRecorder) Get(arg0 interface{}) *gomock.Call { 117 mr.mock.ctrl.T.Helper() 118 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTrie)(nil).Get), arg0) 119 } 120 121 // IsEmpty mocks base method. 122 func (m *MockTrie) IsEmpty() bool { 123 m.ctrl.T.Helper() 124 ret := m.ctrl.Call(m, "IsEmpty") 125 ret0, _ := ret[0].(bool) 126 return ret0 127 } 128 129 // IsEmpty indicates an expected call of IsEmpty. 130 func (mr *MockTrieMockRecorder) IsEmpty() *gomock.Call { 131 mr.mock.ctrl.T.Helper() 132 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsEmpty", reflect.TypeOf((*MockTrie)(nil).IsEmpty)) 133 } 134 135 // RootHash mocks base method. 136 func (m *MockTrie) RootHash() ([]byte, error) { 137 m.ctrl.T.Helper() 138 ret := m.ctrl.Call(m, "RootHash") 139 ret0, _ := ret[0].([]byte) 140 ret1, _ := ret[1].(error) 141 return ret0, ret1 142 } 143 144 // RootHash indicates an expected call of RootHash. 145 func (mr *MockTrieMockRecorder) RootHash() *gomock.Call { 146 mr.mock.ctrl.T.Helper() 147 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHash", reflect.TypeOf((*MockTrie)(nil).RootHash)) 148 } 149 150 // SetRootHash mocks base method. 151 func (m *MockTrie) SetRootHash(arg0 []byte) error { 152 m.ctrl.T.Helper() 153 ret := m.ctrl.Call(m, "SetRootHash", arg0) 154 ret0, _ := ret[0].(error) 155 return ret0 156 } 157 158 // SetRootHash indicates an expected call of SetRootHash. 159 func (mr *MockTrieMockRecorder) SetRootHash(arg0 interface{}) *gomock.Call { 160 mr.mock.ctrl.T.Helper() 161 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRootHash", reflect.TypeOf((*MockTrie)(nil).SetRootHash), arg0) 162 } 163 164 // Start mocks base method. 165 func (m *MockTrie) Start(arg0 context.Context) error { 166 m.ctrl.T.Helper() 167 ret := m.ctrl.Call(m, "Start", arg0) 168 ret0, _ := ret[0].(error) 169 return ret0 170 } 171 172 // Start indicates an expected call of Start. 173 func (mr *MockTrieMockRecorder) Start(arg0 interface{}) *gomock.Call { 174 mr.mock.ctrl.T.Helper() 175 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockTrie)(nil).Start), arg0) 176 } 177 178 // Stop mocks base method. 179 func (m *MockTrie) Stop(arg0 context.Context) error { 180 m.ctrl.T.Helper() 181 ret := m.ctrl.Call(m, "Stop", arg0) 182 ret0, _ := ret[0].(error) 183 return ret0 184 } 185 186 // Stop indicates an expected call of Stop. 187 func (mr *MockTrieMockRecorder) Stop(arg0 interface{}) *gomock.Call { 188 mr.mock.ctrl.T.Helper() 189 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTrie)(nil).Stop), arg0) 190 } 191 192 // Upsert mocks base method. 193 func (m *MockTrie) Upsert(arg0, arg1 []byte) error { 194 m.ctrl.T.Helper() 195 ret := m.ctrl.Call(m, "Upsert", arg0, arg1) 196 ret0, _ := ret[0].(error) 197 return ret0 198 } 199 200 // Upsert indicates an expected call of Upsert. 201 func (mr *MockTrieMockRecorder) Upsert(arg0, arg1 interface{}) *gomock.Call { 202 mr.mock.ctrl.T.Helper() 203 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upsert", reflect.TypeOf((*MockTrie)(nil).Upsert), arg0, arg1) 204 } 205 206 // MockTwoLayerTrie is a mock of TwoLayerTrie interface. 207 type MockTwoLayerTrie struct { 208 ctrl *gomock.Controller 209 recorder *MockTwoLayerTrieMockRecorder 210 } 211 212 // MockTwoLayerTrieMockRecorder is the mock recorder for MockTwoLayerTrie. 213 type MockTwoLayerTrieMockRecorder struct { 214 mock *MockTwoLayerTrie 215 } 216 217 // NewMockTwoLayerTrie creates a new mock instance. 218 func NewMockTwoLayerTrie(ctrl *gomock.Controller) *MockTwoLayerTrie { 219 mock := &MockTwoLayerTrie{ctrl: ctrl} 220 mock.recorder = &MockTwoLayerTrieMockRecorder{mock} 221 return mock 222 } 223 224 // EXPECT returns an object that allows the caller to indicate expected use. 225 func (m *MockTwoLayerTrie) EXPECT() *MockTwoLayerTrieMockRecorder { 226 return m.recorder 227 } 228 229 // Delete mocks base method. 230 func (m *MockTwoLayerTrie) Delete(arg0, arg1 []byte) error { 231 m.ctrl.T.Helper() 232 ret := m.ctrl.Call(m, "Delete", arg0, arg1) 233 ret0, _ := ret[0].(error) 234 return ret0 235 } 236 237 // Delete indicates an expected call of Delete. 238 func (mr *MockTwoLayerTrieMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { 239 mr.mock.ctrl.T.Helper() 240 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTwoLayerTrie)(nil).Delete), arg0, arg1) 241 } 242 243 // Get mocks base method. 244 func (m *MockTwoLayerTrie) Get(arg0, arg1 []byte) ([]byte, error) { 245 m.ctrl.T.Helper() 246 ret := m.ctrl.Call(m, "Get", arg0, arg1) 247 ret0, _ := ret[0].([]byte) 248 ret1, _ := ret[1].(error) 249 return ret0, ret1 250 } 251 252 // Get indicates an expected call of Get. 253 func (mr *MockTwoLayerTrieMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { 254 mr.mock.ctrl.T.Helper() 255 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTwoLayerTrie)(nil).Get), arg0, arg1) 256 } 257 258 // RootHash mocks base method. 259 func (m *MockTwoLayerTrie) RootHash() ([]byte, error) { 260 m.ctrl.T.Helper() 261 ret := m.ctrl.Call(m, "RootHash") 262 ret0, _ := ret[0].([]byte) 263 ret1, _ := ret[1].(error) 264 return ret0, ret1 265 } 266 267 // RootHash indicates an expected call of RootHash. 268 func (mr *MockTwoLayerTrieMockRecorder) RootHash() *gomock.Call { 269 mr.mock.ctrl.T.Helper() 270 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHash", reflect.TypeOf((*MockTwoLayerTrie)(nil).RootHash)) 271 } 272 273 // SetRootHash mocks base method. 274 func (m *MockTwoLayerTrie) SetRootHash(arg0 []byte) error { 275 m.ctrl.T.Helper() 276 ret := m.ctrl.Call(m, "SetRootHash", arg0) 277 ret0, _ := ret[0].(error) 278 return ret0 279 } 280 281 // SetRootHash indicates an expected call of SetRootHash. 282 func (mr *MockTwoLayerTrieMockRecorder) SetRootHash(arg0 interface{}) *gomock.Call { 283 mr.mock.ctrl.T.Helper() 284 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRootHash", reflect.TypeOf((*MockTwoLayerTrie)(nil).SetRootHash), arg0) 285 } 286 287 // Start mocks base method. 288 func (m *MockTwoLayerTrie) Start(arg0 context.Context) error { 289 m.ctrl.T.Helper() 290 ret := m.ctrl.Call(m, "Start", arg0) 291 ret0, _ := ret[0].(error) 292 return ret0 293 } 294 295 // Start indicates an expected call of Start. 296 func (mr *MockTwoLayerTrieMockRecorder) Start(arg0 interface{}) *gomock.Call { 297 mr.mock.ctrl.T.Helper() 298 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockTwoLayerTrie)(nil).Start), arg0) 299 } 300 301 // Stop mocks base method. 302 func (m *MockTwoLayerTrie) Stop(arg0 context.Context) error { 303 m.ctrl.T.Helper() 304 ret := m.ctrl.Call(m, "Stop", arg0) 305 ret0, _ := ret[0].(error) 306 return ret0 307 } 308 309 // Stop indicates an expected call of Stop. 310 func (mr *MockTwoLayerTrieMockRecorder) Stop(arg0 interface{}) *gomock.Call { 311 mr.mock.ctrl.T.Helper() 312 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTwoLayerTrie)(nil).Stop), arg0) 313 } 314 315 // Upsert mocks base method. 316 func (m *MockTwoLayerTrie) Upsert(arg0, arg1, arg2 []byte) error { 317 m.ctrl.T.Helper() 318 ret := m.ctrl.Call(m, "Upsert", arg0, arg1, arg2) 319 ret0, _ := ret[0].(error) 320 return ret0 321 } 322 323 // Upsert indicates an expected call of Upsert. 324 func (mr *MockTwoLayerTrieMockRecorder) Upsert(arg0, arg1, arg2 interface{}) *gomock.Call { 325 mr.mock.ctrl.T.Helper() 326 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upsert", reflect.TypeOf((*MockTwoLayerTrie)(nil).Upsert), arg0, arg1, arg2) 327 }