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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: ./consensus/consensus.go
     3  
     4  // Package mock_consensus is a generated GoMock package.
     5  package mock_consensus
     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  	scheme "github.com/iotexproject/iotex-core/consensus/scheme"
    14  	iotextypes "github.com/iotexproject/iotex-proto/golang/iotextypes"
    15  )
    16  
    17  // MockConsensus is a mock of Consensus interface.
    18  type MockConsensus struct {
    19  	ctrl     *gomock.Controller
    20  	recorder *MockConsensusMockRecorder
    21  }
    22  
    23  // MockConsensusMockRecorder is the mock recorder for MockConsensus.
    24  type MockConsensusMockRecorder struct {
    25  	mock *MockConsensus
    26  }
    27  
    28  // NewMockConsensus creates a new mock instance.
    29  func NewMockConsensus(ctrl *gomock.Controller) *MockConsensus {
    30  	mock := &MockConsensus{ctrl: ctrl}
    31  	mock.recorder = &MockConsensusMockRecorder{mock}
    32  	return mock
    33  }
    34  
    35  // EXPECT returns an object that allows the caller to indicate expected use.
    36  func (m *MockConsensus) EXPECT() *MockConsensusMockRecorder {
    37  	return m.recorder
    38  }
    39  
    40  // Activate mocks base method.
    41  func (m *MockConsensus) Activate(arg0 bool) {
    42  	m.ctrl.T.Helper()
    43  	m.ctrl.Call(m, "Activate", arg0)
    44  }
    45  
    46  // Activate indicates an expected call of Activate.
    47  func (mr *MockConsensusMockRecorder) Activate(arg0 interface{}) *gomock.Call {
    48  	mr.mock.ctrl.T.Helper()
    49  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Activate", reflect.TypeOf((*MockConsensus)(nil).Activate), arg0)
    50  }
    51  
    52  // Active mocks base method.
    53  func (m *MockConsensus) Active() bool {
    54  	m.ctrl.T.Helper()
    55  	ret := m.ctrl.Call(m, "Active")
    56  	ret0, _ := ret[0].(bool)
    57  	return ret0
    58  }
    59  
    60  // Active indicates an expected call of Active.
    61  func (mr *MockConsensusMockRecorder) Active() *gomock.Call {
    62  	mr.mock.ctrl.T.Helper()
    63  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Active", reflect.TypeOf((*MockConsensus)(nil).Active))
    64  }
    65  
    66  // Calibrate mocks base method.
    67  func (m *MockConsensus) Calibrate(arg0 uint64) {
    68  	m.ctrl.T.Helper()
    69  	m.ctrl.Call(m, "Calibrate", arg0)
    70  }
    71  
    72  // Calibrate indicates an expected call of Calibrate.
    73  func (mr *MockConsensusMockRecorder) Calibrate(arg0 interface{}) *gomock.Call {
    74  	mr.mock.ctrl.T.Helper()
    75  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Calibrate", reflect.TypeOf((*MockConsensus)(nil).Calibrate), arg0)
    76  }
    77  
    78  // HandleConsensusMsg mocks base method.
    79  func (m *MockConsensus) HandleConsensusMsg(arg0 *iotextypes.ConsensusMessage) error {
    80  	m.ctrl.T.Helper()
    81  	ret := m.ctrl.Call(m, "HandleConsensusMsg", arg0)
    82  	ret0, _ := ret[0].(error)
    83  	return ret0
    84  }
    85  
    86  // HandleConsensusMsg indicates an expected call of HandleConsensusMsg.
    87  func (mr *MockConsensusMockRecorder) HandleConsensusMsg(arg0 interface{}) *gomock.Call {
    88  	mr.mock.ctrl.T.Helper()
    89  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleConsensusMsg", reflect.TypeOf((*MockConsensus)(nil).HandleConsensusMsg), arg0)
    90  }
    91  
    92  // Metrics mocks base method.
    93  func (m *MockConsensus) Metrics() (scheme.ConsensusMetrics, error) {
    94  	m.ctrl.T.Helper()
    95  	ret := m.ctrl.Call(m, "Metrics")
    96  	ret0, _ := ret[0].(scheme.ConsensusMetrics)
    97  	ret1, _ := ret[1].(error)
    98  	return ret0, ret1
    99  }
   100  
   101  // Metrics indicates an expected call of Metrics.
   102  func (mr *MockConsensusMockRecorder) Metrics() *gomock.Call {
   103  	mr.mock.ctrl.T.Helper()
   104  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metrics", reflect.TypeOf((*MockConsensus)(nil).Metrics))
   105  }
   106  
   107  // Start mocks base method.
   108  func (m *MockConsensus) Start(arg0 context.Context) error {
   109  	m.ctrl.T.Helper()
   110  	ret := m.ctrl.Call(m, "Start", arg0)
   111  	ret0, _ := ret[0].(error)
   112  	return ret0
   113  }
   114  
   115  // Start indicates an expected call of Start.
   116  func (mr *MockConsensusMockRecorder) Start(arg0 interface{}) *gomock.Call {
   117  	mr.mock.ctrl.T.Helper()
   118  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockConsensus)(nil).Start), arg0)
   119  }
   120  
   121  // Stop mocks base method.
   122  func (m *MockConsensus) Stop(arg0 context.Context) error {
   123  	m.ctrl.T.Helper()
   124  	ret := m.ctrl.Call(m, "Stop", arg0)
   125  	ret0, _ := ret[0].(error)
   126  	return ret0
   127  }
   128  
   129  // Stop indicates an expected call of Stop.
   130  func (mr *MockConsensusMockRecorder) Stop(arg0 interface{}) *gomock.Call {
   131  	mr.mock.ctrl.T.Helper()
   132  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockConsensus)(nil).Stop), arg0)
   133  }
   134  
   135  // ValidateBlockFooter mocks base method.
   136  func (m *MockConsensus) ValidateBlockFooter(arg0 *block.Block) error {
   137  	m.ctrl.T.Helper()
   138  	ret := m.ctrl.Call(m, "ValidateBlockFooter", arg0)
   139  	ret0, _ := ret[0].(error)
   140  	return ret0
   141  }
   142  
   143  // ValidateBlockFooter indicates an expected call of ValidateBlockFooter.
   144  func (mr *MockConsensusMockRecorder) ValidateBlockFooter(arg0 interface{}) *gomock.Call {
   145  	mr.mock.ctrl.T.Helper()
   146  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateBlockFooter", reflect.TypeOf((*MockConsensus)(nil).ValidateBlockFooter), arg0)
   147  }