github.com/iotexproject/iotex-core@v1.14.1-rc1/db/batch/mock_batch_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: ./db/batch/batch.go 3 4 // Package batch is a generated GoMock package. 5 package batch 6 7 import ( 8 gomock "github.com/golang/mock/gomock" 9 reflect "reflect" 10 ) 11 12 // MockKVStoreBatch is a mock of KVStoreBatch interface 13 type MockKVStoreBatch struct { 14 ctrl *gomock.Controller 15 recorder *MockKVStoreBatchMockRecorder 16 } 17 18 // MockKVStoreBatchMockRecorder is the mock recorder for MockKVStoreBatch 19 type MockKVStoreBatchMockRecorder struct { 20 mock *MockKVStoreBatch 21 } 22 23 // NewMockKVStoreBatch creates a new mock instance 24 func NewMockKVStoreBatch(ctrl *gomock.Controller) *MockKVStoreBatch { 25 mock := &MockKVStoreBatch{ctrl: ctrl} 26 mock.recorder = &MockKVStoreBatchMockRecorder{mock} 27 return mock 28 } 29 30 // EXPECT returns an object that allows the caller to indicate expected use 31 func (m *MockKVStoreBatch) EXPECT() *MockKVStoreBatchMockRecorder { 32 return m.recorder 33 } 34 35 // Lock mocks base method 36 func (m *MockKVStoreBatch) Lock() { 37 m.ctrl.T.Helper() 38 m.ctrl.Call(m, "Lock") 39 } 40 41 // Lock indicates an expected call of Lock 42 func (mr *MockKVStoreBatchMockRecorder) Lock() *gomock.Call { 43 mr.mock.ctrl.T.Helper() 44 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lock", reflect.TypeOf((*MockKVStoreBatch)(nil).Lock)) 45 } 46 47 // Unlock mocks base method 48 func (m *MockKVStoreBatch) Unlock() { 49 m.ctrl.T.Helper() 50 m.ctrl.Call(m, "Unlock") 51 } 52 53 // Unlock indicates an expected call of Unlock 54 func (mr *MockKVStoreBatchMockRecorder) Unlock() *gomock.Call { 55 mr.mock.ctrl.T.Helper() 56 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockKVStoreBatch)(nil).Unlock)) 57 } 58 59 // ClearAndUnlock mocks base method 60 func (m *MockKVStoreBatch) ClearAndUnlock() { 61 m.ctrl.T.Helper() 62 m.ctrl.Call(m, "ClearAndUnlock") 63 } 64 65 // ClearAndUnlock indicates an expected call of ClearAndUnlock 66 func (mr *MockKVStoreBatchMockRecorder) ClearAndUnlock() *gomock.Call { 67 mr.mock.ctrl.T.Helper() 68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearAndUnlock", reflect.TypeOf((*MockKVStoreBatch)(nil).ClearAndUnlock)) 69 } 70 71 // Put mocks base method 72 func (m *MockKVStoreBatch) Put(arg0 string, arg1, arg2 []byte, arg3 string, arg4 ...interface{}) { 73 m.ctrl.T.Helper() 74 varargs := []interface{}{arg0, arg1, arg2, arg3} 75 for _, a := range arg4 { 76 varargs = append(varargs, a) 77 } 78 m.ctrl.Call(m, "Put", varargs...) 79 } 80 81 // Put indicates an expected call of Put 82 func (mr *MockKVStoreBatchMockRecorder) Put(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call { 83 mr.mock.ctrl.T.Helper() 84 varargs := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...) 85 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockKVStoreBatch)(nil).Put), varargs...) 86 } 87 88 // Delete mocks base method 89 func (m *MockKVStoreBatch) Delete(arg0 string, arg1 []byte, arg2 string, arg3 ...interface{}) { 90 m.ctrl.T.Helper() 91 varargs := []interface{}{arg0, arg1, arg2} 92 for _, a := range arg3 { 93 varargs = append(varargs, a) 94 } 95 m.ctrl.Call(m, "Delete", varargs...) 96 } 97 98 // Delete indicates an expected call of Delete 99 func (mr *MockKVStoreBatchMockRecorder) Delete(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { 100 mr.mock.ctrl.T.Helper() 101 varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) 102 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockKVStoreBatch)(nil).Delete), varargs...) 103 } 104 105 // Size mocks base method 106 func (m *MockKVStoreBatch) Size() int { 107 m.ctrl.T.Helper() 108 ret := m.ctrl.Call(m, "Size") 109 ret0, _ := ret[0].(int) 110 return ret0 111 } 112 113 // Size indicates an expected call of Size 114 func (mr *MockKVStoreBatchMockRecorder) Size() *gomock.Call { 115 mr.mock.ctrl.T.Helper() 116 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Size", reflect.TypeOf((*MockKVStoreBatch)(nil).Size)) 117 } 118 119 // Entry mocks base method 120 func (m *MockKVStoreBatch) Entry(arg0 int) (*WriteInfo, error) { 121 m.ctrl.T.Helper() 122 ret := m.ctrl.Call(m, "Entry", arg0) 123 ret0, _ := ret[0].(*WriteInfo) 124 ret1, _ := ret[1].(error) 125 return ret0, ret1 126 } 127 128 // Entry indicates an expected call of Entry 129 func (mr *MockKVStoreBatchMockRecorder) Entry(arg0 interface{}) *gomock.Call { 130 mr.mock.ctrl.T.Helper() 131 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Entry", reflect.TypeOf((*MockKVStoreBatch)(nil).Entry), arg0) 132 } 133 134 // SerializeQueue mocks base method 135 func (m *MockKVStoreBatch) SerializeQueue() []byte { 136 m.ctrl.T.Helper() 137 ret := m.ctrl.Call(m, "SerializeQueue") 138 ret0, _ := ret[0].([]byte) 139 return ret0 140 } 141 142 // SerializeQueue indicates an expected call of SerializeQueue 143 func (mr *MockKVStoreBatchMockRecorder) SerializeQueue() *gomock.Call { 144 mr.mock.ctrl.T.Helper() 145 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SerializeQueue", reflect.TypeOf((*MockKVStoreBatch)(nil).SerializeQueue)) 146 } 147 148 // ExcludeEntries mocks base method 149 func (m *MockKVStoreBatch) ExcludeEntries(arg0 string, arg1 WriteType) KVStoreBatch { 150 m.ctrl.T.Helper() 151 ret := m.ctrl.Call(m, "ExcludeEntries", arg0, arg1) 152 ret0, _ := ret[0].(KVStoreBatch) 153 return ret0 154 } 155 156 // ExcludeEntries indicates an expected call of ExcludeEntries 157 func (mr *MockKVStoreBatchMockRecorder) ExcludeEntries(arg0, arg1 interface{}) *gomock.Call { 158 mr.mock.ctrl.T.Helper() 159 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExcludeEntries", reflect.TypeOf((*MockKVStoreBatch)(nil).ExcludeEntries), arg0, arg1) 160 } 161 162 // Clear mocks base method 163 func (m *MockKVStoreBatch) Clear() { 164 m.ctrl.T.Helper() 165 m.ctrl.Call(m, "Clear") 166 } 167 168 // Clear indicates an expected call of Clear 169 func (mr *MockKVStoreBatchMockRecorder) Clear() *gomock.Call { 170 mr.mock.ctrl.T.Helper() 171 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clear", reflect.TypeOf((*MockKVStoreBatch)(nil).Clear)) 172 } 173 174 // CloneBatch mocks base method 175 func (m *MockKVStoreBatch) CloneBatch() KVStoreBatch { 176 m.ctrl.T.Helper() 177 ret := m.ctrl.Call(m, "CloneBatch") 178 ret0, _ := ret[0].(KVStoreBatch) 179 return ret0 180 } 181 182 // CloneBatch indicates an expected call of CloneBatch 183 func (mr *MockKVStoreBatchMockRecorder) CloneBatch() *gomock.Call { 184 mr.mock.ctrl.T.Helper() 185 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloneBatch", reflect.TypeOf((*MockKVStoreBatch)(nil).CloneBatch)) 186 } 187 188 // batch mocks base method 189 func (m *MockKVStoreBatch) batch(op WriteType, namespace string, key, value []byte, errorFormat string, errorArgs ...interface{}) { 190 m.ctrl.T.Helper() 191 varargs := []interface{}{op, namespace, key, value, errorFormat} 192 for _, a := range errorArgs { 193 varargs = append(varargs, a) 194 } 195 m.ctrl.Call(m, "batch", varargs...) 196 } 197 198 // batch indicates an expected call of batch 199 func (mr *MockKVStoreBatchMockRecorder) batch(op, namespace, key, value, errorFormat interface{}, errorArgs ...interface{}) *gomock.Call { 200 mr.mock.ctrl.T.Helper() 201 varargs := append([]interface{}{op, namespace, key, value, errorFormat}, errorArgs...) 202 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "batch", reflect.TypeOf((*MockKVStoreBatch)(nil).batch), varargs...) 203 } 204 205 // truncate mocks base method 206 func (m *MockKVStoreBatch) truncate(arg0 int) { 207 m.ctrl.T.Helper() 208 m.ctrl.Call(m, "truncate", arg0) 209 } 210 211 // truncate indicates an expected call of truncate 212 func (mr *MockKVStoreBatchMockRecorder) truncate(arg0 interface{}) *gomock.Call { 213 mr.mock.ctrl.T.Helper() 214 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "truncate", reflect.TypeOf((*MockKVStoreBatch)(nil).truncate), arg0) 215 } 216 217 // MockCachedBatch is a mock of CachedBatch interface 218 type MockCachedBatch struct { 219 ctrl *gomock.Controller 220 recorder *MockCachedBatchMockRecorder 221 } 222 223 // MockCachedBatchMockRecorder is the mock recorder for MockCachedBatch 224 type MockCachedBatchMockRecorder struct { 225 mock *MockCachedBatch 226 } 227 228 // NewMockCachedBatch creates a new mock instance 229 func NewMockCachedBatch(ctrl *gomock.Controller) *MockCachedBatch { 230 mock := &MockCachedBatch{ctrl: ctrl} 231 mock.recorder = &MockCachedBatchMockRecorder{mock} 232 return mock 233 } 234 235 // EXPECT returns an object that allows the caller to indicate expected use 236 func (m *MockCachedBatch) EXPECT() *MockCachedBatchMockRecorder { 237 return m.recorder 238 } 239 240 // Lock mocks base method 241 func (m *MockCachedBatch) Lock() { 242 m.ctrl.T.Helper() 243 m.ctrl.Call(m, "Lock") 244 } 245 246 // Lock indicates an expected call of Lock 247 func (mr *MockCachedBatchMockRecorder) Lock() *gomock.Call { 248 mr.mock.ctrl.T.Helper() 249 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lock", reflect.TypeOf((*MockCachedBatch)(nil).Lock)) 250 } 251 252 // Unlock mocks base method 253 func (m *MockCachedBatch) Unlock() { 254 m.ctrl.T.Helper() 255 m.ctrl.Call(m, "Unlock") 256 } 257 258 // Unlock indicates an expected call of Unlock 259 func (mr *MockCachedBatchMockRecorder) Unlock() *gomock.Call { 260 mr.mock.ctrl.T.Helper() 261 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockCachedBatch)(nil).Unlock)) 262 } 263 264 // ClearAndUnlock mocks base method 265 func (m *MockCachedBatch) ClearAndUnlock() { 266 m.ctrl.T.Helper() 267 m.ctrl.Call(m, "ClearAndUnlock") 268 } 269 270 // ClearAndUnlock indicates an expected call of ClearAndUnlock 271 func (mr *MockCachedBatchMockRecorder) ClearAndUnlock() *gomock.Call { 272 mr.mock.ctrl.T.Helper() 273 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearAndUnlock", reflect.TypeOf((*MockCachedBatch)(nil).ClearAndUnlock)) 274 } 275 276 // Put mocks base method 277 func (m *MockCachedBatch) Put(arg0 string, arg1, arg2 []byte, arg3 string, arg4 ...interface{}) { 278 m.ctrl.T.Helper() 279 varargs := []interface{}{arg0, arg1, arg2, arg3} 280 for _, a := range arg4 { 281 varargs = append(varargs, a) 282 } 283 m.ctrl.Call(m, "Put", varargs...) 284 } 285 286 // Put indicates an expected call of Put 287 func (mr *MockCachedBatchMockRecorder) Put(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call { 288 mr.mock.ctrl.T.Helper() 289 varargs := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...) 290 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockCachedBatch)(nil).Put), varargs...) 291 } 292 293 // Delete mocks base method 294 func (m *MockCachedBatch) Delete(arg0 string, arg1 []byte, arg2 string, arg3 ...interface{}) { 295 m.ctrl.T.Helper() 296 varargs := []interface{}{arg0, arg1, arg2} 297 for _, a := range arg3 { 298 varargs = append(varargs, a) 299 } 300 m.ctrl.Call(m, "Delete", varargs...) 301 } 302 303 // Delete indicates an expected call of Delete 304 func (mr *MockCachedBatchMockRecorder) Delete(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { 305 mr.mock.ctrl.T.Helper() 306 varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) 307 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCachedBatch)(nil).Delete), varargs...) 308 } 309 310 // Size mocks base method 311 func (m *MockCachedBatch) Size() int { 312 m.ctrl.T.Helper() 313 ret := m.ctrl.Call(m, "Size") 314 ret0, _ := ret[0].(int) 315 return ret0 316 } 317 318 // Size indicates an expected call of Size 319 func (mr *MockCachedBatchMockRecorder) Size() *gomock.Call { 320 mr.mock.ctrl.T.Helper() 321 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Size", reflect.TypeOf((*MockCachedBatch)(nil).Size)) 322 } 323 324 // Entry mocks base method 325 func (m *MockCachedBatch) Entry(arg0 int) (*WriteInfo, error) { 326 m.ctrl.T.Helper() 327 ret := m.ctrl.Call(m, "Entry", arg0) 328 ret0, _ := ret[0].(*WriteInfo) 329 ret1, _ := ret[1].(error) 330 return ret0, ret1 331 } 332 333 // Entry indicates an expected call of Entry 334 func (mr *MockCachedBatchMockRecorder) Entry(arg0 interface{}) *gomock.Call { 335 mr.mock.ctrl.T.Helper() 336 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Entry", reflect.TypeOf((*MockCachedBatch)(nil).Entry), arg0) 337 } 338 339 // SerializeQueue mocks base method 340 func (m *MockCachedBatch) SerializeQueue() []byte { 341 m.ctrl.T.Helper() 342 ret := m.ctrl.Call(m, "SerializeQueue") 343 ret0, _ := ret[0].([]byte) 344 return ret0 345 } 346 347 // SerializeQueue indicates an expected call of SerializeQueue 348 func (mr *MockCachedBatchMockRecorder) SerializeQueue() *gomock.Call { 349 mr.mock.ctrl.T.Helper() 350 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SerializeQueue", reflect.TypeOf((*MockCachedBatch)(nil).SerializeQueue)) 351 } 352 353 // ExcludeEntries mocks base method 354 func (m *MockCachedBatch) ExcludeEntries(arg0 string, arg1 WriteType) KVStoreBatch { 355 m.ctrl.T.Helper() 356 ret := m.ctrl.Call(m, "ExcludeEntries", arg0, arg1) 357 ret0, _ := ret[0].(KVStoreBatch) 358 return ret0 359 } 360 361 // ExcludeEntries indicates an expected call of ExcludeEntries 362 func (mr *MockCachedBatchMockRecorder) ExcludeEntries(arg0, arg1 interface{}) *gomock.Call { 363 mr.mock.ctrl.T.Helper() 364 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExcludeEntries", reflect.TypeOf((*MockCachedBatch)(nil).ExcludeEntries), arg0, arg1) 365 } 366 367 // Clear mocks base method 368 func (m *MockCachedBatch) Clear() { 369 m.ctrl.T.Helper() 370 m.ctrl.Call(m, "Clear") 371 } 372 373 // Clear indicates an expected call of Clear 374 func (mr *MockCachedBatchMockRecorder) Clear() *gomock.Call { 375 mr.mock.ctrl.T.Helper() 376 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clear", reflect.TypeOf((*MockCachedBatch)(nil).Clear)) 377 } 378 379 // CloneBatch mocks base method 380 func (m *MockCachedBatch) CloneBatch() KVStoreBatch { 381 m.ctrl.T.Helper() 382 ret := m.ctrl.Call(m, "CloneBatch") 383 ret0, _ := ret[0].(KVStoreBatch) 384 return ret0 385 } 386 387 // CloneBatch indicates an expected call of CloneBatch 388 func (mr *MockCachedBatchMockRecorder) CloneBatch() *gomock.Call { 389 mr.mock.ctrl.T.Helper() 390 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloneBatch", reflect.TypeOf((*MockCachedBatch)(nil).CloneBatch)) 391 } 392 393 // batch mocks base method 394 func (m *MockCachedBatch) batch(op WriteType, namespace string, key, value []byte, errorFormat string, errorArgs ...interface{}) { 395 m.ctrl.T.Helper() 396 varargs := []interface{}{op, namespace, key, value, errorFormat} 397 for _, a := range errorArgs { 398 varargs = append(varargs, a) 399 } 400 m.ctrl.Call(m, "batch", varargs...) 401 } 402 403 // batch indicates an expected call of batch 404 func (mr *MockCachedBatchMockRecorder) batch(op, namespace, key, value, errorFormat interface{}, errorArgs ...interface{}) *gomock.Call { 405 mr.mock.ctrl.T.Helper() 406 varargs := append([]interface{}{op, namespace, key, value, errorFormat}, errorArgs...) 407 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "batch", reflect.TypeOf((*MockCachedBatch)(nil).batch), varargs...) 408 } 409 410 // truncate mocks base method 411 func (m *MockCachedBatch) truncate(arg0 int) { 412 m.ctrl.T.Helper() 413 m.ctrl.Call(m, "truncate", arg0) 414 } 415 416 // truncate indicates an expected call of truncate 417 func (mr *MockCachedBatchMockRecorder) truncate(arg0 interface{}) *gomock.Call { 418 mr.mock.ctrl.T.Helper() 419 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "truncate", reflect.TypeOf((*MockCachedBatch)(nil).truncate), arg0) 420 } 421 422 // Get mocks base method 423 func (m *MockCachedBatch) Get(arg0 string, arg1 []byte) ([]byte, error) { 424 m.ctrl.T.Helper() 425 ret := m.ctrl.Call(m, "Get", arg0, arg1) 426 ret0, _ := ret[0].([]byte) 427 ret1, _ := ret[1].(error) 428 return ret0, ret1 429 } 430 431 // Get indicates an expected call of Get 432 func (mr *MockCachedBatchMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { 433 mr.mock.ctrl.T.Helper() 434 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCachedBatch)(nil).Get), arg0, arg1) 435 } 436 437 // Snapshot mocks base method 438 func (m *MockCachedBatch) Snapshot() int { 439 m.ctrl.T.Helper() 440 ret := m.ctrl.Call(m, "Snapshot") 441 ret0, _ := ret[0].(int) 442 return ret0 443 } 444 445 // Snapshot indicates an expected call of Snapshot 446 func (mr *MockCachedBatchMockRecorder) Snapshot() *gomock.Call { 447 mr.mock.ctrl.T.Helper() 448 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Snapshot", reflect.TypeOf((*MockCachedBatch)(nil).Snapshot)) 449 } 450 451 // Revert mocks base method 452 func (m *MockCachedBatch) Revert(arg0 int) error { 453 m.ctrl.T.Helper() 454 ret := m.ctrl.Call(m, "Revert", arg0) 455 ret0, _ := ret[0].(error) 456 return ret0 457 } 458 459 // Revert indicates an expected call of Revert 460 func (mr *MockCachedBatchMockRecorder) Revert(arg0 interface{}) *gomock.Call { 461 mr.mock.ctrl.T.Helper() 462 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revert", reflect.TypeOf((*MockCachedBatch)(nil).Revert), arg0) 463 }