github.com/iotexproject/iotex-core@v1.14.1-rc1/test/mock/mock_blockdao/mock_blockindexer.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/iotexproject/iotex-core/blockchain/blockdao (interfaces: BlockIndexer) 3 4 // Package mock_blockdao is a generated GoMock package. 5 package mock_blockdao 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 block "github.com/iotexproject/iotex-core/blockchain/block" 13 ) 14 15 // MockBlockIndexer is a mock of BlockIndexer interface. 16 type MockBlockIndexer struct { 17 ctrl *gomock.Controller 18 recorder *MockBlockIndexerMockRecorder 19 } 20 21 // MockBlockIndexerMockRecorder is the mock recorder for MockBlockIndexer. 22 type MockBlockIndexerMockRecorder struct { 23 mock *MockBlockIndexer 24 } 25 26 // NewMockBlockIndexer creates a new mock instance. 27 func NewMockBlockIndexer(ctrl *gomock.Controller) *MockBlockIndexer { 28 mock := &MockBlockIndexer{ctrl: ctrl} 29 mock.recorder = &MockBlockIndexerMockRecorder{mock} 30 return mock 31 } 32 33 // EXPECT returns an object that allows the caller to indicate expected use. 34 func (m *MockBlockIndexer) EXPECT() *MockBlockIndexerMockRecorder { 35 return m.recorder 36 } 37 38 // DeleteTipBlock mocks base method. 39 func (m *MockBlockIndexer) DeleteTipBlock(arg0 context.Context, arg1 *block.Block) error { 40 m.ctrl.T.Helper() 41 ret := m.ctrl.Call(m, "DeleteTipBlock", arg0, arg1) 42 ret0, _ := ret[0].(error) 43 return ret0 44 } 45 46 // DeleteTipBlock indicates an expected call of DeleteTipBlock. 47 func (mr *MockBlockIndexerMockRecorder) DeleteTipBlock(arg0, arg1 interface{}) *gomock.Call { 48 mr.mock.ctrl.T.Helper() 49 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTipBlock", reflect.TypeOf((*MockBlockIndexer)(nil).DeleteTipBlock), arg0, arg1) 50 } 51 52 // Height mocks base method. 53 func (m *MockBlockIndexer) Height() (uint64, error) { 54 m.ctrl.T.Helper() 55 ret := m.ctrl.Call(m, "Height") 56 ret0, _ := ret[0].(uint64) 57 ret1, _ := ret[1].(error) 58 return ret0, ret1 59 } 60 61 // Height indicates an expected call of Height. 62 func (mr *MockBlockIndexerMockRecorder) Height() *gomock.Call { 63 mr.mock.ctrl.T.Helper() 64 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Height", reflect.TypeOf((*MockBlockIndexer)(nil).Height)) 65 } 66 67 // PutBlock mocks base method. 68 func (m *MockBlockIndexer) PutBlock(arg0 context.Context, arg1 *block.Block) error { 69 m.ctrl.T.Helper() 70 ret := m.ctrl.Call(m, "PutBlock", arg0, arg1) 71 ret0, _ := ret[0].(error) 72 return ret0 73 } 74 75 // PutBlock indicates an expected call of PutBlock. 76 func (mr *MockBlockIndexerMockRecorder) PutBlock(arg0, arg1 interface{}) *gomock.Call { 77 mr.mock.ctrl.T.Helper() 78 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutBlock", reflect.TypeOf((*MockBlockIndexer)(nil).PutBlock), arg0, arg1) 79 } 80 81 // Start mocks base method. 82 func (m *MockBlockIndexer) Start(arg0 context.Context) error { 83 m.ctrl.T.Helper() 84 ret := m.ctrl.Call(m, "Start", arg0) 85 ret0, _ := ret[0].(error) 86 return ret0 87 } 88 89 // Start indicates an expected call of Start. 90 func (mr *MockBlockIndexerMockRecorder) Start(arg0 interface{}) *gomock.Call { 91 mr.mock.ctrl.T.Helper() 92 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockBlockIndexer)(nil).Start), arg0) 93 } 94 95 // Stop mocks base method. 96 func (m *MockBlockIndexer) Stop(arg0 context.Context) error { 97 m.ctrl.T.Helper() 98 ret := m.ctrl.Call(m, "Stop", arg0) 99 ret0, _ := ret[0].(error) 100 return ret0 101 } 102 103 // Stop indicates an expected call of Stop. 104 func (mr *MockBlockIndexerMockRecorder) Stop(arg0 interface{}) *gomock.Call { 105 mr.mock.ctrl.T.Helper() 106 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockBlockIndexer)(nil).Stop), arg0) 107 }