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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: ./action/protocol/poll/protocol.go
     3  
     4  // Package mock_poll is a generated GoMock package.
     5  package mock_poll
     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  	protocol "github.com/iotexproject/iotex-core/action/protocol"
    14  	state "github.com/iotexproject/iotex-core/state"
    15  )
    16  
    17  // MockProtocol is a mock of Protocol interface.
    18  type MockProtocol struct {
    19  	ctrl     *gomock.Controller
    20  	recorder *MockProtocolMockRecorder
    21  }
    22  
    23  // MockProtocolMockRecorder is the mock recorder for MockProtocol.
    24  type MockProtocolMockRecorder struct {
    25  	mock *MockProtocol
    26  }
    27  
    28  // NewMockProtocol creates a new mock instance.
    29  func NewMockProtocol(ctrl *gomock.Controller) *MockProtocol {
    30  	mock := &MockProtocol{ctrl: ctrl}
    31  	mock.recorder = &MockProtocolMockRecorder{mock}
    32  	return mock
    33  }
    34  
    35  // EXPECT returns an object that allows the caller to indicate expected use.
    36  func (m *MockProtocol) EXPECT() *MockProtocolMockRecorder {
    37  	return m.recorder
    38  }
    39  
    40  // CalculateCandidatesByHeight mocks base method.
    41  func (m *MockProtocol) CalculateCandidatesByHeight(arg0 context.Context, arg1 protocol.StateReader, arg2 uint64) (state.CandidateList, error) {
    42  	m.ctrl.T.Helper()
    43  	ret := m.ctrl.Call(m, "CalculateCandidatesByHeight", arg0, arg1, arg2)
    44  	ret0, _ := ret[0].(state.CandidateList)
    45  	ret1, _ := ret[1].(error)
    46  	return ret0, ret1
    47  }
    48  
    49  // CalculateCandidatesByHeight indicates an expected call of CalculateCandidatesByHeight.
    50  func (mr *MockProtocolMockRecorder) CalculateCandidatesByHeight(arg0, arg1, arg2 interface{}) *gomock.Call {
    51  	mr.mock.ctrl.T.Helper()
    52  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateCandidatesByHeight", reflect.TypeOf((*MockProtocol)(nil).CalculateCandidatesByHeight), arg0, arg1, arg2)
    53  }
    54  
    55  // CalculateUnproductiveDelegates mocks base method.
    56  func (m *MockProtocol) CalculateUnproductiveDelegates(arg0 context.Context, arg1 protocol.StateReader) ([]string, error) {
    57  	m.ctrl.T.Helper()
    58  	ret := m.ctrl.Call(m, "CalculateUnproductiveDelegates", arg0, arg1)
    59  	ret0, _ := ret[0].([]string)
    60  	ret1, _ := ret[1].(error)
    61  	return ret0, ret1
    62  }
    63  
    64  // CalculateUnproductiveDelegates indicates an expected call of CalculateUnproductiveDelegates.
    65  func (mr *MockProtocolMockRecorder) CalculateUnproductiveDelegates(arg0, arg1 interface{}) *gomock.Call {
    66  	mr.mock.ctrl.T.Helper()
    67  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateUnproductiveDelegates", reflect.TypeOf((*MockProtocol)(nil).CalculateUnproductiveDelegates), arg0, arg1)
    68  }
    69  
    70  // Candidates mocks base method.
    71  func (m *MockProtocol) Candidates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
    72  	m.ctrl.T.Helper()
    73  	ret := m.ctrl.Call(m, "Candidates", arg0, arg1)
    74  	ret0, _ := ret[0].(state.CandidateList)
    75  	ret1, _ := ret[1].(error)
    76  	return ret0, ret1
    77  }
    78  
    79  // Candidates indicates an expected call of Candidates.
    80  func (mr *MockProtocolMockRecorder) Candidates(arg0, arg1 interface{}) *gomock.Call {
    81  	mr.mock.ctrl.T.Helper()
    82  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Candidates", reflect.TypeOf((*MockProtocol)(nil).Candidates), arg0, arg1)
    83  }
    84  
    85  // CreateGenesisStates mocks base method.
    86  func (m *MockProtocol) CreateGenesisStates(arg0 context.Context, arg1 protocol.StateManager) error {
    87  	m.ctrl.T.Helper()
    88  	ret := m.ctrl.Call(m, "CreateGenesisStates", arg0, arg1)
    89  	ret0, _ := ret[0].(error)
    90  	return ret0
    91  }
    92  
    93  // CreateGenesisStates indicates an expected call of CreateGenesisStates.
    94  func (mr *MockProtocolMockRecorder) CreateGenesisStates(arg0, arg1 interface{}) *gomock.Call {
    95  	mr.mock.ctrl.T.Helper()
    96  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGenesisStates", reflect.TypeOf((*MockProtocol)(nil).CreateGenesisStates), arg0, arg1)
    97  }
    98  
    99  // Delegates mocks base method.
   100  func (m *MockProtocol) Delegates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
   101  	m.ctrl.T.Helper()
   102  	ret := m.ctrl.Call(m, "Delegates", arg0, arg1)
   103  	ret0, _ := ret[0].(state.CandidateList)
   104  	ret1, _ := ret[1].(error)
   105  	return ret0, ret1
   106  }
   107  
   108  // Delegates indicates an expected call of Delegates.
   109  func (mr *MockProtocolMockRecorder) Delegates(arg0, arg1 interface{}) *gomock.Call {
   110  	mr.mock.ctrl.T.Helper()
   111  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegates", reflect.TypeOf((*MockProtocol)(nil).Delegates), arg0, arg1)
   112  }
   113  
   114  // ForceRegister mocks base method.
   115  func (m *MockProtocol) ForceRegister(arg0 *protocol.Registry) error {
   116  	m.ctrl.T.Helper()
   117  	ret := m.ctrl.Call(m, "ForceRegister", arg0)
   118  	ret0, _ := ret[0].(error)
   119  	return ret0
   120  }
   121  
   122  // ForceRegister indicates an expected call of ForceRegister.
   123  func (mr *MockProtocolMockRecorder) ForceRegister(arg0 interface{}) *gomock.Call {
   124  	mr.mock.ctrl.T.Helper()
   125  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceRegister", reflect.TypeOf((*MockProtocol)(nil).ForceRegister), arg0)
   126  }
   127  
   128  // Handle mocks base method.
   129  func (m *MockProtocol) Handle(arg0 context.Context, arg1 action.Action, arg2 protocol.StateManager) (*action.Receipt, error) {
   130  	m.ctrl.T.Helper()
   131  	ret := m.ctrl.Call(m, "Handle", arg0, arg1, arg2)
   132  	ret0, _ := ret[0].(*action.Receipt)
   133  	ret1, _ := ret[1].(error)
   134  	return ret0, ret1
   135  }
   136  
   137  // Handle indicates an expected call of Handle.
   138  func (mr *MockProtocolMockRecorder) Handle(arg0, arg1, arg2 interface{}) *gomock.Call {
   139  	mr.mock.ctrl.T.Helper()
   140  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockProtocol)(nil).Handle), arg0, arg1, arg2)
   141  }
   142  
   143  // Name mocks base method.
   144  func (m *MockProtocol) Name() string {
   145  	m.ctrl.T.Helper()
   146  	ret := m.ctrl.Call(m, "Name")
   147  	ret0, _ := ret[0].(string)
   148  	return ret0
   149  }
   150  
   151  // Name indicates an expected call of Name.
   152  func (mr *MockProtocolMockRecorder) Name() *gomock.Call {
   153  	mr.mock.ctrl.T.Helper()
   154  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockProtocol)(nil).Name))
   155  }
   156  
   157  // NextCandidates mocks base method.
   158  func (m *MockProtocol) NextCandidates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
   159  	m.ctrl.T.Helper()
   160  	ret := m.ctrl.Call(m, "NextCandidates", arg0, arg1)
   161  	ret0, _ := ret[0].(state.CandidateList)
   162  	ret1, _ := ret[1].(error)
   163  	return ret0, ret1
   164  }
   165  
   166  // NextCandidates indicates an expected call of NextCandidates.
   167  func (mr *MockProtocolMockRecorder) NextCandidates(arg0, arg1 interface{}) *gomock.Call {
   168  	mr.mock.ctrl.T.Helper()
   169  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextCandidates", reflect.TypeOf((*MockProtocol)(nil).NextCandidates), arg0, arg1)
   170  }
   171  
   172  // NextDelegates mocks base method.
   173  func (m *MockProtocol) NextDelegates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
   174  	m.ctrl.T.Helper()
   175  	ret := m.ctrl.Call(m, "NextDelegates", arg0, arg1)
   176  	ret0, _ := ret[0].(state.CandidateList)
   177  	ret1, _ := ret[1].(error)
   178  	return ret0, ret1
   179  }
   180  
   181  // NextDelegates indicates an expected call of NextDelegates.
   182  func (mr *MockProtocolMockRecorder) NextDelegates(arg0, arg1 interface{}) *gomock.Call {
   183  	mr.mock.ctrl.T.Helper()
   184  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextDelegates", reflect.TypeOf((*MockProtocol)(nil).NextDelegates), arg0, arg1)
   185  }
   186  
   187  // ReadState mocks base method.
   188  func (m *MockProtocol) ReadState(arg0 context.Context, arg1 protocol.StateReader, arg2 []byte, arg3 ...[]byte) ([]byte, uint64, error) {
   189  	m.ctrl.T.Helper()
   190  	varargs := []interface{}{arg0, arg1, arg2}
   191  	for _, a := range arg3 {
   192  		varargs = append(varargs, a)
   193  	}
   194  	ret := m.ctrl.Call(m, "ReadState", varargs...)
   195  	ret0, _ := ret[0].([]byte)
   196  	ret1, _ := ret[1].(uint64)
   197  	ret2, _ := ret[2].(error)
   198  	return ret0, ret1, ret2
   199  }
   200  
   201  // ReadState indicates an expected call of ReadState.
   202  func (mr *MockProtocolMockRecorder) ReadState(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
   203  	mr.mock.ctrl.T.Helper()
   204  	varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
   205  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadState", reflect.TypeOf((*MockProtocol)(nil).ReadState), varargs...)
   206  }
   207  
   208  // Register mocks base method.
   209  func (m *MockProtocol) Register(arg0 *protocol.Registry) error {
   210  	m.ctrl.T.Helper()
   211  	ret := m.ctrl.Call(m, "Register", arg0)
   212  	ret0, _ := ret[0].(error)
   213  	return ret0
   214  }
   215  
   216  // Register indicates an expected call of Register.
   217  func (mr *MockProtocolMockRecorder) Register(arg0 interface{}) *gomock.Call {
   218  	mr.mock.ctrl.T.Helper()
   219  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockProtocol)(nil).Register), arg0)
   220  }
   221  
   222  // Validate mocks base method.
   223  func (m *MockProtocol) Validate(arg0 context.Context, arg1 action.Action, arg2 protocol.StateReader) error {
   224  	m.ctrl.T.Helper()
   225  	ret := m.ctrl.Call(m, "Validate", arg0, arg1, arg2)
   226  	ret0, _ := ret[0].(error)
   227  	return ret0
   228  }
   229  
   230  // Validate indicates an expected call of Validate.
   231  func (mr *MockProtocolMockRecorder) Validate(arg0, arg1, arg2 interface{}) *gomock.Call {
   232  	mr.mock.ctrl.T.Helper()
   233  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockProtocol)(nil).Validate), arg0, arg1, arg2)
   234  }