github.com/iotexproject/iotex-core@v1.14.1-rc1/test/mock/mock_blockdao/mock_blockdao.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: ./blockchain/blockdao/blockdao.go 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 hash "github.com/iotexproject/go-pkgs/hash" 13 action "github.com/iotexproject/iotex-core/action" 14 block "github.com/iotexproject/iotex-core/blockchain/block" 15 iotextypes "github.com/iotexproject/iotex-proto/golang/iotextypes" 16 ) 17 18 // MockBlockDAO is a mock of BlockDAO interface. 19 type MockBlockDAO struct { 20 ctrl *gomock.Controller 21 recorder *MockBlockDAOMockRecorder 22 } 23 24 // MockBlockDAOMockRecorder is the mock recorder for MockBlockDAO. 25 type MockBlockDAOMockRecorder struct { 26 mock *MockBlockDAO 27 } 28 29 // NewMockBlockDAO creates a new mock instance. 30 func NewMockBlockDAO(ctrl *gomock.Controller) *MockBlockDAO { 31 mock := &MockBlockDAO{ctrl: ctrl} 32 mock.recorder = &MockBlockDAOMockRecorder{mock} 33 return mock 34 } 35 36 // EXPECT returns an object that allows the caller to indicate expected use. 37 func (m *MockBlockDAO) EXPECT() *MockBlockDAOMockRecorder { 38 return m.recorder 39 } 40 41 // ContainsTransactionLog mocks base method. 42 func (m *MockBlockDAO) ContainsTransactionLog() bool { 43 m.ctrl.T.Helper() 44 ret := m.ctrl.Call(m, "ContainsTransactionLog") 45 ret0, _ := ret[0].(bool) 46 return ret0 47 } 48 49 // ContainsTransactionLog indicates an expected call of ContainsTransactionLog. 50 func (mr *MockBlockDAOMockRecorder) ContainsTransactionLog() *gomock.Call { 51 mr.mock.ctrl.T.Helper() 52 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainsTransactionLog", reflect.TypeOf((*MockBlockDAO)(nil).ContainsTransactionLog)) 53 } 54 55 // FooterByHeight mocks base method. 56 func (m *MockBlockDAO) FooterByHeight(arg0 uint64) (*block.Footer, error) { 57 m.ctrl.T.Helper() 58 ret := m.ctrl.Call(m, "FooterByHeight", arg0) 59 ret0, _ := ret[0].(*block.Footer) 60 ret1, _ := ret[1].(error) 61 return ret0, ret1 62 } 63 64 // FooterByHeight indicates an expected call of FooterByHeight. 65 func (mr *MockBlockDAOMockRecorder) FooterByHeight(arg0 interface{}) *gomock.Call { 66 mr.mock.ctrl.T.Helper() 67 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FooterByHeight", reflect.TypeOf((*MockBlockDAO)(nil).FooterByHeight), arg0) 68 } 69 70 // GetBlock mocks base method. 71 func (m *MockBlockDAO) GetBlock(arg0 hash.Hash256) (*block.Block, error) { 72 m.ctrl.T.Helper() 73 ret := m.ctrl.Call(m, "GetBlock", arg0) 74 ret0, _ := ret[0].(*block.Block) 75 ret1, _ := ret[1].(error) 76 return ret0, ret1 77 } 78 79 // GetBlock indicates an expected call of GetBlock. 80 func (mr *MockBlockDAOMockRecorder) GetBlock(arg0 interface{}) *gomock.Call { 81 mr.mock.ctrl.T.Helper() 82 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockBlockDAO)(nil).GetBlock), arg0) 83 } 84 85 // GetBlockByHeight mocks base method. 86 func (m *MockBlockDAO) GetBlockByHeight(arg0 uint64) (*block.Block, error) { 87 m.ctrl.T.Helper() 88 ret := m.ctrl.Call(m, "GetBlockByHeight", arg0) 89 ret0, _ := ret[0].(*block.Block) 90 ret1, _ := ret[1].(error) 91 return ret0, ret1 92 } 93 94 // GetBlockByHeight indicates an expected call of GetBlockByHeight. 95 func (mr *MockBlockDAOMockRecorder) GetBlockByHeight(arg0 interface{}) *gomock.Call { 96 mr.mock.ctrl.T.Helper() 97 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockByHeight", reflect.TypeOf((*MockBlockDAO)(nil).GetBlockByHeight), arg0) 98 } 99 100 // GetBlockHash mocks base method. 101 func (m *MockBlockDAO) GetBlockHash(arg0 uint64) (hash.Hash256, error) { 102 m.ctrl.T.Helper() 103 ret := m.ctrl.Call(m, "GetBlockHash", arg0) 104 ret0, _ := ret[0].(hash.Hash256) 105 ret1, _ := ret[1].(error) 106 return ret0, ret1 107 } 108 109 // GetBlockHash indicates an expected call of GetBlockHash. 110 func (mr *MockBlockDAOMockRecorder) GetBlockHash(arg0 interface{}) *gomock.Call { 111 mr.mock.ctrl.T.Helper() 112 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockHash", reflect.TypeOf((*MockBlockDAO)(nil).GetBlockHash), arg0) 113 } 114 115 // GetBlockHeight mocks base method. 116 func (m *MockBlockDAO) GetBlockHeight(arg0 hash.Hash256) (uint64, error) { 117 m.ctrl.T.Helper() 118 ret := m.ctrl.Call(m, "GetBlockHeight", arg0) 119 ret0, _ := ret[0].(uint64) 120 ret1, _ := ret[1].(error) 121 return ret0, ret1 122 } 123 124 // GetBlockHeight indicates an expected call of GetBlockHeight. 125 func (mr *MockBlockDAOMockRecorder) GetBlockHeight(arg0 interface{}) *gomock.Call { 126 mr.mock.ctrl.T.Helper() 127 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockHeight", reflect.TypeOf((*MockBlockDAO)(nil).GetBlockHeight), arg0) 128 } 129 130 // GetReceipts mocks base method. 131 func (m *MockBlockDAO) GetReceipts(arg0 uint64) ([]*action.Receipt, error) { 132 m.ctrl.T.Helper() 133 ret := m.ctrl.Call(m, "GetReceipts", arg0) 134 ret0, _ := ret[0].([]*action.Receipt) 135 ret1, _ := ret[1].(error) 136 return ret0, ret1 137 } 138 139 // GetReceipts indicates an expected call of GetReceipts. 140 func (mr *MockBlockDAOMockRecorder) GetReceipts(arg0 interface{}) *gomock.Call { 141 mr.mock.ctrl.T.Helper() 142 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReceipts", reflect.TypeOf((*MockBlockDAO)(nil).GetReceipts), arg0) 143 } 144 145 // Header mocks base method. 146 func (m *MockBlockDAO) Header(arg0 hash.Hash256) (*block.Header, error) { 147 m.ctrl.T.Helper() 148 ret := m.ctrl.Call(m, "Header", arg0) 149 ret0, _ := ret[0].(*block.Header) 150 ret1, _ := ret[1].(error) 151 return ret0, ret1 152 } 153 154 // Header indicates an expected call of Header. 155 func (mr *MockBlockDAOMockRecorder) Header(arg0 interface{}) *gomock.Call { 156 mr.mock.ctrl.T.Helper() 157 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockBlockDAO)(nil).Header), arg0) 158 } 159 160 // HeaderByHeight mocks base method. 161 func (m *MockBlockDAO) HeaderByHeight(arg0 uint64) (*block.Header, error) { 162 m.ctrl.T.Helper() 163 ret := m.ctrl.Call(m, "HeaderByHeight", arg0) 164 ret0, _ := ret[0].(*block.Header) 165 ret1, _ := ret[1].(error) 166 return ret0, ret1 167 } 168 169 // HeaderByHeight indicates an expected call of HeaderByHeight. 170 func (mr *MockBlockDAOMockRecorder) HeaderByHeight(arg0 interface{}) *gomock.Call { 171 mr.mock.ctrl.T.Helper() 172 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeaderByHeight", reflect.TypeOf((*MockBlockDAO)(nil).HeaderByHeight), arg0) 173 } 174 175 // Height mocks base method. 176 func (m *MockBlockDAO) Height() (uint64, error) { 177 m.ctrl.T.Helper() 178 ret := m.ctrl.Call(m, "Height") 179 ret0, _ := ret[0].(uint64) 180 ret1, _ := ret[1].(error) 181 return ret0, ret1 182 } 183 184 // Height indicates an expected call of Height. 185 func (mr *MockBlockDAOMockRecorder) Height() *gomock.Call { 186 mr.mock.ctrl.T.Helper() 187 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Height", reflect.TypeOf((*MockBlockDAO)(nil).Height)) 188 } 189 190 // PutBlock mocks base method. 191 func (m *MockBlockDAO) PutBlock(arg0 context.Context, arg1 *block.Block) error { 192 m.ctrl.T.Helper() 193 ret := m.ctrl.Call(m, "PutBlock", arg0, arg1) 194 ret0, _ := ret[0].(error) 195 return ret0 196 } 197 198 // PutBlock indicates an expected call of PutBlock. 199 func (mr *MockBlockDAOMockRecorder) PutBlock(arg0, arg1 interface{}) *gomock.Call { 200 mr.mock.ctrl.T.Helper() 201 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutBlock", reflect.TypeOf((*MockBlockDAO)(nil).PutBlock), arg0, arg1) 202 } 203 204 // Start mocks base method. 205 func (m *MockBlockDAO) Start(ctx context.Context) error { 206 m.ctrl.T.Helper() 207 ret := m.ctrl.Call(m, "Start", ctx) 208 ret0, _ := ret[0].(error) 209 return ret0 210 } 211 212 // Start indicates an expected call of Start. 213 func (mr *MockBlockDAOMockRecorder) Start(ctx interface{}) *gomock.Call { 214 mr.mock.ctrl.T.Helper() 215 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockBlockDAO)(nil).Start), ctx) 216 } 217 218 // Stop mocks base method. 219 func (m *MockBlockDAO) Stop(ctx context.Context) error { 220 m.ctrl.T.Helper() 221 ret := m.ctrl.Call(m, "Stop", ctx) 222 ret0, _ := ret[0].(error) 223 return ret0 224 } 225 226 // Stop indicates an expected call of Stop. 227 func (mr *MockBlockDAOMockRecorder) Stop(ctx interface{}) *gomock.Call { 228 mr.mock.ctrl.T.Helper() 229 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockBlockDAO)(nil).Stop), ctx) 230 } 231 232 // TransactionLogs mocks base method. 233 func (m *MockBlockDAO) TransactionLogs(arg0 uint64) (*iotextypes.TransactionLogs, error) { 234 m.ctrl.T.Helper() 235 ret := m.ctrl.Call(m, "TransactionLogs", arg0) 236 ret0, _ := ret[0].(*iotextypes.TransactionLogs) 237 ret1, _ := ret[1].(error) 238 return ret0, ret1 239 } 240 241 // TransactionLogs indicates an expected call of TransactionLogs. 242 func (mr *MockBlockDAOMockRecorder) TransactionLogs(arg0 interface{}) *gomock.Call { 243 mr.mock.ctrl.T.Helper() 244 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionLogs", reflect.TypeOf((*MockBlockDAO)(nil).TransactionLogs), arg0) 245 }