github.com/iotexproject/iotex-core@v1.14.1-rc1/test/mock/mock_factory/mock_factory.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: ./state/factory/factory.go
     3  
     4  // Package mock_factory is a generated GoMock package.
     5  package mock_factory
     6  
     7  import (
     8  	context "context"
     9  	reflect "reflect"
    10  
    11  	gomock "github.com/golang/mock/gomock"
    12  	address "github.com/iotexproject/iotex-address/address"
    13  	action "github.com/iotexproject/iotex-core/action"
    14  	protocol "github.com/iotexproject/iotex-core/action/protocol"
    15  	actpool "github.com/iotexproject/iotex-core/actpool"
    16  	block "github.com/iotexproject/iotex-core/blockchain/block"
    17  	state "github.com/iotexproject/iotex-core/state"
    18  )
    19  
    20  // MockFactory is a mock of Factory interface.
    21  type MockFactory struct {
    22  	ctrl     *gomock.Controller
    23  	recorder *MockFactoryMockRecorder
    24  }
    25  
    26  // MockFactoryMockRecorder is the mock recorder for MockFactory.
    27  type MockFactoryMockRecorder struct {
    28  	mock *MockFactory
    29  }
    30  
    31  // NewMockFactory creates a new mock instance.
    32  func NewMockFactory(ctrl *gomock.Controller) *MockFactory {
    33  	mock := &MockFactory{ctrl: ctrl}
    34  	mock.recorder = &MockFactoryMockRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows the caller to indicate expected use.
    39  func (m *MockFactory) EXPECT() *MockFactoryMockRecorder {
    40  	return m.recorder
    41  }
    42  
    43  // DeleteTipBlock mocks base method.
    44  func (m *MockFactory) DeleteTipBlock(arg0 context.Context, arg1 *block.Block) error {
    45  	m.ctrl.T.Helper()
    46  	ret := m.ctrl.Call(m, "DeleteTipBlock", arg0, arg1)
    47  	ret0, _ := ret[0].(error)
    48  	return ret0
    49  }
    50  
    51  // DeleteTipBlock indicates an expected call of DeleteTipBlock.
    52  func (mr *MockFactoryMockRecorder) DeleteTipBlock(arg0, arg1 interface{}) *gomock.Call {
    53  	mr.mock.ctrl.T.Helper()
    54  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTipBlock", reflect.TypeOf((*MockFactory)(nil).DeleteTipBlock), arg0, arg1)
    55  }
    56  
    57  // Height mocks base method.
    58  func (m *MockFactory) Height() (uint64, error) {
    59  	m.ctrl.T.Helper()
    60  	ret := m.ctrl.Call(m, "Height")
    61  	ret0, _ := ret[0].(uint64)
    62  	ret1, _ := ret[1].(error)
    63  	return ret0, ret1
    64  }
    65  
    66  // Height indicates an expected call of Height.
    67  func (mr *MockFactoryMockRecorder) Height() *gomock.Call {
    68  	mr.mock.ctrl.T.Helper()
    69  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Height", reflect.TypeOf((*MockFactory)(nil).Height))
    70  }
    71  
    72  // NewBlockBuilder mocks base method.
    73  func (m *MockFactory) NewBlockBuilder(arg0 context.Context, arg1 actpool.ActPool, arg2 func(action.Envelope) (*action.SealedEnvelope, error)) (*block.Builder, error) {
    74  	m.ctrl.T.Helper()
    75  	ret := m.ctrl.Call(m, "NewBlockBuilder", arg0, arg1, arg2)
    76  	ret0, _ := ret[0].(*block.Builder)
    77  	ret1, _ := ret[1].(error)
    78  	return ret0, ret1
    79  }
    80  
    81  // NewBlockBuilder indicates an expected call of NewBlockBuilder.
    82  func (mr *MockFactoryMockRecorder) NewBlockBuilder(arg0, arg1, arg2 interface{}) *gomock.Call {
    83  	mr.mock.ctrl.T.Helper()
    84  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBlockBuilder", reflect.TypeOf((*MockFactory)(nil).NewBlockBuilder), arg0, arg1, arg2)
    85  }
    86  
    87  // PutBlock mocks base method.
    88  func (m *MockFactory) PutBlock(arg0 context.Context, arg1 *block.Block) error {
    89  	m.ctrl.T.Helper()
    90  	ret := m.ctrl.Call(m, "PutBlock", arg0, arg1)
    91  	ret0, _ := ret[0].(error)
    92  	return ret0
    93  }
    94  
    95  // PutBlock indicates an expected call of PutBlock.
    96  func (mr *MockFactoryMockRecorder) PutBlock(arg0, arg1 interface{}) *gomock.Call {
    97  	mr.mock.ctrl.T.Helper()
    98  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutBlock", reflect.TypeOf((*MockFactory)(nil).PutBlock), arg0, arg1)
    99  }
   100  
   101  // ReadContractStorage mocks base method.
   102  func (m *MockFactory) ReadContractStorage(arg0 context.Context, arg1 address.Address, arg2 []byte) ([]byte, error) {
   103  	m.ctrl.T.Helper()
   104  	ret := m.ctrl.Call(m, "ReadContractStorage", arg0, arg1, arg2)
   105  	ret0, _ := ret[0].([]byte)
   106  	ret1, _ := ret[1].(error)
   107  	return ret0, ret1
   108  }
   109  
   110  // ReadContractStorage indicates an expected call of ReadContractStorage.
   111  func (mr *MockFactoryMockRecorder) ReadContractStorage(arg0, arg1, arg2 interface{}) *gomock.Call {
   112  	mr.mock.ctrl.T.Helper()
   113  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadContractStorage", reflect.TypeOf((*MockFactory)(nil).ReadContractStorage), arg0, arg1, arg2)
   114  }
   115  
   116  // ReadView mocks base method.
   117  func (m *MockFactory) ReadView(arg0 string) (interface{}, error) {
   118  	m.ctrl.T.Helper()
   119  	ret := m.ctrl.Call(m, "ReadView", arg0)
   120  	ret0, _ := ret[0].(interface{})
   121  	ret1, _ := ret[1].(error)
   122  	return ret0, ret1
   123  }
   124  
   125  // ReadView indicates an expected call of ReadView.
   126  func (mr *MockFactoryMockRecorder) ReadView(arg0 interface{}) *gomock.Call {
   127  	mr.mock.ctrl.T.Helper()
   128  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadView", reflect.TypeOf((*MockFactory)(nil).ReadView), arg0)
   129  }
   130  
   131  // Register mocks base method.
   132  func (m *MockFactory) Register(arg0 protocol.Protocol) error {
   133  	m.ctrl.T.Helper()
   134  	ret := m.ctrl.Call(m, "Register", arg0)
   135  	ret0, _ := ret[0].(error)
   136  	return ret0
   137  }
   138  
   139  // Register indicates an expected call of Register.
   140  func (mr *MockFactoryMockRecorder) Register(arg0 interface{}) *gomock.Call {
   141  	mr.mock.ctrl.T.Helper()
   142  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockFactory)(nil).Register), arg0)
   143  }
   144  
   145  // SimulateExecution mocks base method.
   146  func (m *MockFactory) SimulateExecution(arg0 context.Context, arg1 address.Address, arg2 *action.Execution) ([]byte, *action.Receipt, error) {
   147  	m.ctrl.T.Helper()
   148  	ret := m.ctrl.Call(m, "SimulateExecution", arg0, arg1, arg2)
   149  	ret0, _ := ret[0].([]byte)
   150  	ret1, _ := ret[1].(*action.Receipt)
   151  	ret2, _ := ret[2].(error)
   152  	return ret0, ret1, ret2
   153  }
   154  
   155  // SimulateExecution indicates an expected call of SimulateExecution.
   156  func (mr *MockFactoryMockRecorder) SimulateExecution(arg0, arg1, arg2 interface{}) *gomock.Call {
   157  	mr.mock.ctrl.T.Helper()
   158  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SimulateExecution", reflect.TypeOf((*MockFactory)(nil).SimulateExecution), arg0, arg1, arg2)
   159  }
   160  
   161  // Start mocks base method.
   162  func (m *MockFactory) Start(arg0 context.Context) error {
   163  	m.ctrl.T.Helper()
   164  	ret := m.ctrl.Call(m, "Start", arg0)
   165  	ret0, _ := ret[0].(error)
   166  	return ret0
   167  }
   168  
   169  // Start indicates an expected call of Start.
   170  func (mr *MockFactoryMockRecorder) Start(arg0 interface{}) *gomock.Call {
   171  	mr.mock.ctrl.T.Helper()
   172  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockFactory)(nil).Start), arg0)
   173  }
   174  
   175  // State mocks base method.
   176  func (m *MockFactory) State(arg0 interface{}, arg1 ...protocol.StateOption) (uint64, error) {
   177  	m.ctrl.T.Helper()
   178  	varargs := []interface{}{arg0}
   179  	for _, a := range arg1 {
   180  		varargs = append(varargs, a)
   181  	}
   182  	ret := m.ctrl.Call(m, "State", varargs...)
   183  	ret0, _ := ret[0].(uint64)
   184  	ret1, _ := ret[1].(error)
   185  	return ret0, ret1
   186  }
   187  
   188  // State indicates an expected call of State.
   189  func (mr *MockFactoryMockRecorder) State(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
   190  	mr.mock.ctrl.T.Helper()
   191  	varargs := append([]interface{}{arg0}, arg1...)
   192  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockFactory)(nil).State), varargs...)
   193  }
   194  
   195  // StateAtHeight mocks base method.
   196  func (m *MockFactory) StateAtHeight(arg0 uint64, arg1 interface{}, arg2 ...protocol.StateOption) error {
   197  	m.ctrl.T.Helper()
   198  	varargs := []interface{}{arg0, arg1}
   199  	for _, a := range arg2 {
   200  		varargs = append(varargs, a)
   201  	}
   202  	ret := m.ctrl.Call(m, "StateAtHeight", varargs...)
   203  	ret0, _ := ret[0].(error)
   204  	return ret0
   205  }
   206  
   207  // StateAtHeight indicates an expected call of StateAtHeight.
   208  func (mr *MockFactoryMockRecorder) StateAtHeight(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
   209  	mr.mock.ctrl.T.Helper()
   210  	varargs := append([]interface{}{arg0, arg1}, arg2...)
   211  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateAtHeight", reflect.TypeOf((*MockFactory)(nil).StateAtHeight), varargs...)
   212  }
   213  
   214  // States mocks base method.
   215  func (m *MockFactory) States(arg0 ...protocol.StateOption) (uint64, state.Iterator, error) {
   216  	m.ctrl.T.Helper()
   217  	varargs := []interface{}{}
   218  	for _, a := range arg0 {
   219  		varargs = append(varargs, a)
   220  	}
   221  	ret := m.ctrl.Call(m, "States", varargs...)
   222  	ret0, _ := ret[0].(uint64)
   223  	ret1, _ := ret[1].(state.Iterator)
   224  	ret2, _ := ret[2].(error)
   225  	return ret0, ret1, ret2
   226  }
   227  
   228  // States indicates an expected call of States.
   229  func (mr *MockFactoryMockRecorder) States(arg0 ...interface{}) *gomock.Call {
   230  	mr.mock.ctrl.T.Helper()
   231  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "States", reflect.TypeOf((*MockFactory)(nil).States), arg0...)
   232  }
   233  
   234  // StatesAtHeight mocks base method.
   235  func (m *MockFactory) StatesAtHeight(arg0 uint64, arg1 ...protocol.StateOption) (state.Iterator, error) {
   236  	m.ctrl.T.Helper()
   237  	varargs := []interface{}{arg0}
   238  	for _, a := range arg1 {
   239  		varargs = append(varargs, a)
   240  	}
   241  	ret := m.ctrl.Call(m, "StatesAtHeight", varargs...)
   242  	ret0, _ := ret[0].(state.Iterator)
   243  	ret1, _ := ret[1].(error)
   244  	return ret0, ret1
   245  }
   246  
   247  // StatesAtHeight indicates an expected call of StatesAtHeight.
   248  func (mr *MockFactoryMockRecorder) StatesAtHeight(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
   249  	mr.mock.ctrl.T.Helper()
   250  	varargs := append([]interface{}{arg0}, arg1...)
   251  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatesAtHeight", reflect.TypeOf((*MockFactory)(nil).StatesAtHeight), varargs...)
   252  }
   253  
   254  // Stop mocks base method.
   255  func (m *MockFactory) Stop(arg0 context.Context) error {
   256  	m.ctrl.T.Helper()
   257  	ret := m.ctrl.Call(m, "Stop", arg0)
   258  	ret0, _ := ret[0].(error)
   259  	return ret0
   260  }
   261  
   262  // Stop indicates an expected call of Stop.
   263  func (mr *MockFactoryMockRecorder) Stop(arg0 interface{}) *gomock.Call {
   264  	mr.mock.ctrl.T.Helper()
   265  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockFactory)(nil).Stop), arg0)
   266  }
   267  
   268  // Validate mocks base method.
   269  func (m *MockFactory) Validate(arg0 context.Context, arg1 *block.Block) error {
   270  	m.ctrl.T.Helper()
   271  	ret := m.ctrl.Call(m, "Validate", arg0, arg1)
   272  	ret0, _ := ret[0].(error)
   273  	return ret0
   274  }
   275  
   276  // Validate indicates an expected call of Validate.
   277  func (mr *MockFactoryMockRecorder) Validate(arg0, arg1 interface{}) *gomock.Call {
   278  	mr.mock.ctrl.T.Helper()
   279  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockFactory)(nil).Validate), arg0, arg1)
   280  }