github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/mock_protocol_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: ./action/protocol/protocol.go 3 4 // Package protocol is a generated GoMock package. 5 package protocol 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 action "github.com/iotexproject/iotex-core/action" 13 ) 14 15 // MockProtocol is a mock of Protocol interface. 16 type MockProtocol struct { 17 ctrl *gomock.Controller 18 recorder *MockProtocolMockRecorder 19 } 20 21 // MockProtocolMockRecorder is the mock recorder for MockProtocol. 22 type MockProtocolMockRecorder struct { 23 mock *MockProtocol 24 } 25 26 // NewMockProtocol creates a new mock instance. 27 func NewMockProtocol(ctrl *gomock.Controller) *MockProtocol { 28 mock := &MockProtocol{ctrl: ctrl} 29 mock.recorder = &MockProtocolMockRecorder{mock} 30 return mock 31 } 32 33 // EXPECT returns an object that allows the caller to indicate expected use. 34 func (m *MockProtocol) EXPECT() *MockProtocolMockRecorder { 35 return m.recorder 36 } 37 38 // ForceRegister mocks base method. 39 func (m *MockProtocol) ForceRegister(arg0 *Registry) error { 40 m.ctrl.T.Helper() 41 ret := m.ctrl.Call(m, "ForceRegister", arg0) 42 ret0, _ := ret[0].(error) 43 return ret0 44 } 45 46 // ForceRegister indicates an expected call of ForceRegister. 47 func (mr *MockProtocolMockRecorder) ForceRegister(arg0 interface{}) *gomock.Call { 48 mr.mock.ctrl.T.Helper() 49 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceRegister", reflect.TypeOf((*MockProtocol)(nil).ForceRegister), arg0) 50 } 51 52 // Handle mocks base method. 53 func (m *MockProtocol) Handle(arg0 context.Context, arg1 action.Action, arg2 StateManager) (*action.Receipt, error) { 54 m.ctrl.T.Helper() 55 ret := m.ctrl.Call(m, "Handle", arg0, arg1, arg2) 56 ret0, _ := ret[0].(*action.Receipt) 57 ret1, _ := ret[1].(error) 58 return ret0, ret1 59 } 60 61 // Handle indicates an expected call of Handle. 62 func (mr *MockProtocolMockRecorder) Handle(arg0, arg1, arg2 interface{}) *gomock.Call { 63 mr.mock.ctrl.T.Helper() 64 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockProtocol)(nil).Handle), arg0, arg1, arg2) 65 } 66 67 // Name mocks base method. 68 func (m *MockProtocol) Name() string { 69 m.ctrl.T.Helper() 70 ret := m.ctrl.Call(m, "Name") 71 ret0, _ := ret[0].(string) 72 return ret0 73 } 74 75 // Name indicates an expected call of Name. 76 func (mr *MockProtocolMockRecorder) Name() *gomock.Call { 77 mr.mock.ctrl.T.Helper() 78 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockProtocol)(nil).Name)) 79 } 80 81 // ReadState mocks base method. 82 func (m *MockProtocol) ReadState(arg0 context.Context, arg1 StateReader, arg2 []byte, arg3 ...[]byte) ([]byte, uint64, error) { 83 m.ctrl.T.Helper() 84 varargs := []interface{}{arg0, arg1, arg2} 85 for _, a := range arg3 { 86 varargs = append(varargs, a) 87 } 88 ret := m.ctrl.Call(m, "ReadState", varargs...) 89 ret0, _ := ret[0].([]byte) 90 ret1, _ := ret[1].(uint64) 91 ret2, _ := ret[2].(error) 92 return ret0, ret1, ret2 93 } 94 95 // ReadState indicates an expected call of ReadState. 96 func (mr *MockProtocolMockRecorder) ReadState(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { 97 mr.mock.ctrl.T.Helper() 98 varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) 99 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadState", reflect.TypeOf((*MockProtocol)(nil).ReadState), varargs...) 100 } 101 102 // Register mocks base method. 103 func (m *MockProtocol) Register(arg0 *Registry) error { 104 m.ctrl.T.Helper() 105 ret := m.ctrl.Call(m, "Register", arg0) 106 ret0, _ := ret[0].(error) 107 return ret0 108 } 109 110 // Register indicates an expected call of Register. 111 func (mr *MockProtocolMockRecorder) Register(arg0 interface{}) *gomock.Call { 112 mr.mock.ctrl.T.Helper() 113 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockProtocol)(nil).Register), arg0) 114 } 115 116 // MockStarter is a mock of Starter interface. 117 type MockStarter struct { 118 ctrl *gomock.Controller 119 recorder *MockStarterMockRecorder 120 } 121 122 // MockStarterMockRecorder is the mock recorder for MockStarter. 123 type MockStarterMockRecorder struct { 124 mock *MockStarter 125 } 126 127 // NewMockStarter creates a new mock instance. 128 func NewMockStarter(ctrl *gomock.Controller) *MockStarter { 129 mock := &MockStarter{ctrl: ctrl} 130 mock.recorder = &MockStarterMockRecorder{mock} 131 return mock 132 } 133 134 // EXPECT returns an object that allows the caller to indicate expected use. 135 func (m *MockStarter) EXPECT() *MockStarterMockRecorder { 136 return m.recorder 137 } 138 139 // Start mocks base method. 140 func (m *MockStarter) Start(arg0 context.Context, arg1 StateReader) (interface{}, error) { 141 m.ctrl.T.Helper() 142 ret := m.ctrl.Call(m, "Start", arg0, arg1) 143 ret0, _ := ret[0].(interface{}) 144 ret1, _ := ret[1].(error) 145 return ret0, ret1 146 } 147 148 // Start indicates an expected call of Start. 149 func (mr *MockStarterMockRecorder) Start(arg0, arg1 interface{}) *gomock.Call { 150 mr.mock.ctrl.T.Helper() 151 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockStarter)(nil).Start), arg0, arg1) 152 } 153 154 // MockGenesisStateCreator is a mock of GenesisStateCreator interface. 155 type MockGenesisStateCreator struct { 156 ctrl *gomock.Controller 157 recorder *MockGenesisStateCreatorMockRecorder 158 } 159 160 // MockGenesisStateCreatorMockRecorder is the mock recorder for MockGenesisStateCreator. 161 type MockGenesisStateCreatorMockRecorder struct { 162 mock *MockGenesisStateCreator 163 } 164 165 // NewMockGenesisStateCreator creates a new mock instance. 166 func NewMockGenesisStateCreator(ctrl *gomock.Controller) *MockGenesisStateCreator { 167 mock := &MockGenesisStateCreator{ctrl: ctrl} 168 mock.recorder = &MockGenesisStateCreatorMockRecorder{mock} 169 return mock 170 } 171 172 // EXPECT returns an object that allows the caller to indicate expected use. 173 func (m *MockGenesisStateCreator) EXPECT() *MockGenesisStateCreatorMockRecorder { 174 return m.recorder 175 } 176 177 // CreateGenesisStates mocks base method. 178 func (m *MockGenesisStateCreator) CreateGenesisStates(arg0 context.Context, arg1 StateManager) error { 179 m.ctrl.T.Helper() 180 ret := m.ctrl.Call(m, "CreateGenesisStates", arg0, arg1) 181 ret0, _ := ret[0].(error) 182 return ret0 183 } 184 185 // CreateGenesisStates indicates an expected call of CreateGenesisStates. 186 func (mr *MockGenesisStateCreatorMockRecorder) CreateGenesisStates(arg0, arg1 interface{}) *gomock.Call { 187 mr.mock.ctrl.T.Helper() 188 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGenesisStates", reflect.TypeOf((*MockGenesisStateCreator)(nil).CreateGenesisStates), arg0, arg1) 189 } 190 191 // MockPreStatesCreator is a mock of PreStatesCreator interface. 192 type MockPreStatesCreator struct { 193 ctrl *gomock.Controller 194 recorder *MockPreStatesCreatorMockRecorder 195 } 196 197 // MockPreStatesCreatorMockRecorder is the mock recorder for MockPreStatesCreator. 198 type MockPreStatesCreatorMockRecorder struct { 199 mock *MockPreStatesCreator 200 } 201 202 // NewMockPreStatesCreator creates a new mock instance. 203 func NewMockPreStatesCreator(ctrl *gomock.Controller) *MockPreStatesCreator { 204 mock := &MockPreStatesCreator{ctrl: ctrl} 205 mock.recorder = &MockPreStatesCreatorMockRecorder{mock} 206 return mock 207 } 208 209 // EXPECT returns an object that allows the caller to indicate expected use. 210 func (m *MockPreStatesCreator) EXPECT() *MockPreStatesCreatorMockRecorder { 211 return m.recorder 212 } 213 214 // CreatePreStates mocks base method. 215 func (m *MockPreStatesCreator) CreatePreStates(arg0 context.Context, arg1 StateManager) error { 216 m.ctrl.T.Helper() 217 ret := m.ctrl.Call(m, "CreatePreStates", arg0, arg1) 218 ret0, _ := ret[0].(error) 219 return ret0 220 } 221 222 // CreatePreStates indicates an expected call of CreatePreStates. 223 func (mr *MockPreStatesCreatorMockRecorder) CreatePreStates(arg0, arg1 interface{}) *gomock.Call { 224 mr.mock.ctrl.T.Helper() 225 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePreStates", reflect.TypeOf((*MockPreStatesCreator)(nil).CreatePreStates), arg0, arg1) 226 } 227 228 // MockPreCommitter is a mock of PreCommitter interface. 229 type MockPreCommitter struct { 230 ctrl *gomock.Controller 231 recorder *MockPreCommitterMockRecorder 232 } 233 234 // MockPreCommitterMockRecorder is the mock recorder for MockPreCommitter. 235 type MockPreCommitterMockRecorder struct { 236 mock *MockPreCommitter 237 } 238 239 // NewMockPreCommitter creates a new mock instance. 240 func NewMockPreCommitter(ctrl *gomock.Controller) *MockPreCommitter { 241 mock := &MockPreCommitter{ctrl: ctrl} 242 mock.recorder = &MockPreCommitterMockRecorder{mock} 243 return mock 244 } 245 246 // EXPECT returns an object that allows the caller to indicate expected use. 247 func (m *MockPreCommitter) EXPECT() *MockPreCommitterMockRecorder { 248 return m.recorder 249 } 250 251 // PreCommit mocks base method. 252 func (m *MockPreCommitter) PreCommit(arg0 context.Context, arg1 StateManager) error { 253 m.ctrl.T.Helper() 254 ret := m.ctrl.Call(m, "PreCommit", arg0, arg1) 255 ret0, _ := ret[0].(error) 256 return ret0 257 } 258 259 // PreCommit indicates an expected call of PreCommit. 260 func (mr *MockPreCommitterMockRecorder) PreCommit(arg0, arg1 interface{}) *gomock.Call { 261 mr.mock.ctrl.T.Helper() 262 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreCommit", reflect.TypeOf((*MockPreCommitter)(nil).PreCommit), arg0, arg1) 263 } 264 265 // MockCommitter is a mock of Committer interface. 266 type MockCommitter struct { 267 ctrl *gomock.Controller 268 recorder *MockCommitterMockRecorder 269 } 270 271 // MockCommitterMockRecorder is the mock recorder for MockCommitter. 272 type MockCommitterMockRecorder struct { 273 mock *MockCommitter 274 } 275 276 // NewMockCommitter creates a new mock instance. 277 func NewMockCommitter(ctrl *gomock.Controller) *MockCommitter { 278 mock := &MockCommitter{ctrl: ctrl} 279 mock.recorder = &MockCommitterMockRecorder{mock} 280 return mock 281 } 282 283 // EXPECT returns an object that allows the caller to indicate expected use. 284 func (m *MockCommitter) EXPECT() *MockCommitterMockRecorder { 285 return m.recorder 286 } 287 288 // Commit mocks base method. 289 func (m *MockCommitter) Commit(arg0 context.Context, arg1 StateManager) error { 290 m.ctrl.T.Helper() 291 ret := m.ctrl.Call(m, "Commit", arg0, arg1) 292 ret0, _ := ret[0].(error) 293 return ret0 294 } 295 296 // Commit indicates an expected call of Commit. 297 func (mr *MockCommitterMockRecorder) Commit(arg0, arg1 interface{}) *gomock.Call { 298 mr.mock.ctrl.T.Helper() 299 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockCommitter)(nil).Commit), arg0, arg1) 300 } 301 302 // MockPostSystemActionsCreator is a mock of PostSystemActionsCreator interface. 303 type MockPostSystemActionsCreator struct { 304 ctrl *gomock.Controller 305 recorder *MockPostSystemActionsCreatorMockRecorder 306 } 307 308 // MockPostSystemActionsCreatorMockRecorder is the mock recorder for MockPostSystemActionsCreator. 309 type MockPostSystemActionsCreatorMockRecorder struct { 310 mock *MockPostSystemActionsCreator 311 } 312 313 // NewMockPostSystemActionsCreator creates a new mock instance. 314 func NewMockPostSystemActionsCreator(ctrl *gomock.Controller) *MockPostSystemActionsCreator { 315 mock := &MockPostSystemActionsCreator{ctrl: ctrl} 316 mock.recorder = &MockPostSystemActionsCreatorMockRecorder{mock} 317 return mock 318 } 319 320 // EXPECT returns an object that allows the caller to indicate expected use. 321 func (m *MockPostSystemActionsCreator) EXPECT() *MockPostSystemActionsCreatorMockRecorder { 322 return m.recorder 323 } 324 325 // CreatePostSystemActions mocks base method. 326 func (m *MockPostSystemActionsCreator) CreatePostSystemActions(arg0 context.Context, arg1 StateReader) ([]action.Envelope, error) { 327 m.ctrl.T.Helper() 328 ret := m.ctrl.Call(m, "CreatePostSystemActions", arg0, arg1) 329 ret0, _ := ret[0].([]action.Envelope) 330 ret1, _ := ret[1].(error) 331 return ret0, ret1 332 } 333 334 // CreatePostSystemActions indicates an expected call of CreatePostSystemActions. 335 func (mr *MockPostSystemActionsCreatorMockRecorder) CreatePostSystemActions(arg0, arg1 interface{}) *gomock.Call { 336 mr.mock.ctrl.T.Helper() 337 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePostSystemActions", reflect.TypeOf((*MockPostSystemActionsCreator)(nil).CreatePostSystemActions), arg0, arg1) 338 } 339 340 // MockActionValidator is a mock of ActionValidator interface. 341 type MockActionValidator struct { 342 ctrl *gomock.Controller 343 recorder *MockActionValidatorMockRecorder 344 } 345 346 // MockActionValidatorMockRecorder is the mock recorder for MockActionValidator. 347 type MockActionValidatorMockRecorder struct { 348 mock *MockActionValidator 349 } 350 351 // NewMockActionValidator creates a new mock instance. 352 func NewMockActionValidator(ctrl *gomock.Controller) *MockActionValidator { 353 mock := &MockActionValidator{ctrl: ctrl} 354 mock.recorder = &MockActionValidatorMockRecorder{mock} 355 return mock 356 } 357 358 // EXPECT returns an object that allows the caller to indicate expected use. 359 func (m *MockActionValidator) EXPECT() *MockActionValidatorMockRecorder { 360 return m.recorder 361 } 362 363 // Validate mocks base method. 364 func (m *MockActionValidator) Validate(arg0 context.Context, arg1 action.Action, arg2 StateReader) error { 365 m.ctrl.T.Helper() 366 ret := m.ctrl.Call(m, "Validate", arg0, arg1, arg2) 367 ret0, _ := ret[0].(error) 368 return ret0 369 } 370 371 // Validate indicates an expected call of Validate. 372 func (mr *MockActionValidatorMockRecorder) Validate(arg0, arg1, arg2 interface{}) *gomock.Call { 373 mr.mock.ctrl.T.Helper() 374 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockActionValidator)(nil).Validate), arg0, arg1, arg2) 375 } 376 377 // MockActionHandler is a mock of ActionHandler interface. 378 type MockActionHandler struct { 379 ctrl *gomock.Controller 380 recorder *MockActionHandlerMockRecorder 381 } 382 383 // MockActionHandlerMockRecorder is the mock recorder for MockActionHandler. 384 type MockActionHandlerMockRecorder struct { 385 mock *MockActionHandler 386 } 387 388 // NewMockActionHandler creates a new mock instance. 389 func NewMockActionHandler(ctrl *gomock.Controller) *MockActionHandler { 390 mock := &MockActionHandler{ctrl: ctrl} 391 mock.recorder = &MockActionHandlerMockRecorder{mock} 392 return mock 393 } 394 395 // EXPECT returns an object that allows the caller to indicate expected use. 396 func (m *MockActionHandler) EXPECT() *MockActionHandlerMockRecorder { 397 return m.recorder 398 } 399 400 // Handle mocks base method. 401 func (m *MockActionHandler) Handle(arg0 context.Context, arg1 action.Action, arg2 StateManager) (*action.Receipt, error) { 402 m.ctrl.T.Helper() 403 ret := m.ctrl.Call(m, "Handle", arg0, arg1, arg2) 404 ret0, _ := ret[0].(*action.Receipt) 405 ret1, _ := ret[1].(error) 406 return ret0, ret1 407 } 408 409 // Handle indicates an expected call of Handle. 410 func (mr *MockActionHandlerMockRecorder) Handle(arg0, arg1, arg2 interface{}) *gomock.Call { 411 mr.mock.ctrl.T.Helper() 412 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockActionHandler)(nil).Handle), arg0, arg1, arg2) 413 }