github.com/aergoio/aergo@v1.3.1/p2p/p2pmock/mock_msgorder.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: internalmsg.go
     3  
     4  // Package p2pmock is a generated GoMock package.
     5  package p2pmock
     6  
     7  import (
     8  	p2pcommon "github.com/aergoio/aergo/p2p/p2pcommon"
     9  	types "github.com/aergoio/aergo/types"
    10  	raftpb "github.com/aergoio/etcd/raft/raftpb"
    11  	gomock "github.com/golang/mock/gomock"
    12  	reflect "reflect"
    13  )
    14  
    15  // MockMsgOrder is a mock of MsgOrder interface
    16  type MockMsgOrder struct {
    17  	ctrl     *gomock.Controller
    18  	recorder *MockMsgOrderMockRecorder
    19  }
    20  
    21  // MockMsgOrderMockRecorder is the mock recorder for MockMsgOrder
    22  type MockMsgOrderMockRecorder struct {
    23  	mock *MockMsgOrder
    24  }
    25  
    26  // NewMockMsgOrder creates a new mock instance
    27  func NewMockMsgOrder(ctrl *gomock.Controller) *MockMsgOrder {
    28  	mock := &MockMsgOrder{ctrl: ctrl}
    29  	mock.recorder = &MockMsgOrderMockRecorder{mock}
    30  	return mock
    31  }
    32  
    33  // EXPECT returns an object that allows the caller to indicate expected use
    34  func (m *MockMsgOrder) EXPECT() *MockMsgOrderMockRecorder {
    35  	return m.recorder
    36  }
    37  
    38  // GetMsgID mocks base method
    39  func (m *MockMsgOrder) GetMsgID() p2pcommon.MsgID {
    40  	m.ctrl.T.Helper()
    41  	ret := m.ctrl.Call(m, "GetMsgID")
    42  	ret0, _ := ret[0].(p2pcommon.MsgID)
    43  	return ret0
    44  }
    45  
    46  // GetMsgID indicates an expected call of GetMsgID
    47  func (mr *MockMsgOrderMockRecorder) GetMsgID() *gomock.Call {
    48  	mr.mock.ctrl.T.Helper()
    49  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMsgID", reflect.TypeOf((*MockMsgOrder)(nil).GetMsgID))
    50  }
    51  
    52  // Timestamp mocks base method
    53  func (m *MockMsgOrder) Timestamp() int64 {
    54  	m.ctrl.T.Helper()
    55  	ret := m.ctrl.Call(m, "Timestamp")
    56  	ret0, _ := ret[0].(int64)
    57  	return ret0
    58  }
    59  
    60  // Timestamp indicates an expected call of Timestamp
    61  func (mr *MockMsgOrderMockRecorder) Timestamp() *gomock.Call {
    62  	mr.mock.ctrl.T.Helper()
    63  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Timestamp", reflect.TypeOf((*MockMsgOrder)(nil).Timestamp))
    64  }
    65  
    66  // IsRequest mocks base method
    67  func (m *MockMsgOrder) IsRequest() bool {
    68  	m.ctrl.T.Helper()
    69  	ret := m.ctrl.Call(m, "IsRequest")
    70  	ret0, _ := ret[0].(bool)
    71  	return ret0
    72  }
    73  
    74  // IsRequest indicates an expected call of IsRequest
    75  func (mr *MockMsgOrderMockRecorder) IsRequest() *gomock.Call {
    76  	mr.mock.ctrl.T.Helper()
    77  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRequest", reflect.TypeOf((*MockMsgOrder)(nil).IsRequest))
    78  }
    79  
    80  // IsNeedSign mocks base method
    81  func (m *MockMsgOrder) IsNeedSign() bool {
    82  	m.ctrl.T.Helper()
    83  	ret := m.ctrl.Call(m, "IsNeedSign")
    84  	ret0, _ := ret[0].(bool)
    85  	return ret0
    86  }
    87  
    88  // IsNeedSign indicates an expected call of IsNeedSign
    89  func (mr *MockMsgOrderMockRecorder) IsNeedSign() *gomock.Call {
    90  	mr.mock.ctrl.T.Helper()
    91  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNeedSign", reflect.TypeOf((*MockMsgOrder)(nil).IsNeedSign))
    92  }
    93  
    94  // GetProtocolID mocks base method
    95  func (m *MockMsgOrder) GetProtocolID() p2pcommon.SubProtocol {
    96  	m.ctrl.T.Helper()
    97  	ret := m.ctrl.Call(m, "GetProtocolID")
    98  	ret0, _ := ret[0].(p2pcommon.SubProtocol)
    99  	return ret0
   100  }
   101  
   102  // GetProtocolID indicates an expected call of GetProtocolID
   103  func (mr *MockMsgOrderMockRecorder) GetProtocolID() *gomock.Call {
   104  	mr.mock.ctrl.T.Helper()
   105  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProtocolID", reflect.TypeOf((*MockMsgOrder)(nil).GetProtocolID))
   106  }
   107  
   108  // SendTo mocks base method
   109  func (m *MockMsgOrder) SendTo(p p2pcommon.RemotePeer) error {
   110  	m.ctrl.T.Helper()
   111  	ret := m.ctrl.Call(m, "SendTo", p)
   112  	ret0, _ := ret[0].(error)
   113  	return ret0
   114  }
   115  
   116  // SendTo indicates an expected call of SendTo
   117  func (mr *MockMsgOrderMockRecorder) SendTo(p interface{}) *gomock.Call {
   118  	mr.mock.ctrl.T.Helper()
   119  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTo", reflect.TypeOf((*MockMsgOrder)(nil).SendTo), p)
   120  }
   121  
   122  // CancelSend mocks base method
   123  func (m *MockMsgOrder) CancelSend(pi p2pcommon.RemotePeer) {
   124  	m.ctrl.T.Helper()
   125  	m.ctrl.Call(m, "CancelSend", pi)
   126  }
   127  
   128  // CancelSend indicates an expected call of CancelSend
   129  func (mr *MockMsgOrderMockRecorder) CancelSend(pi interface{}) *gomock.Call {
   130  	mr.mock.ctrl.T.Helper()
   131  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelSend", reflect.TypeOf((*MockMsgOrder)(nil).CancelSend), pi)
   132  }
   133  
   134  // MockMoFactory is a mock of MoFactory interface
   135  type MockMoFactory struct {
   136  	ctrl     *gomock.Controller
   137  	recorder *MockMoFactoryMockRecorder
   138  }
   139  
   140  // MockMoFactoryMockRecorder is the mock recorder for MockMoFactory
   141  type MockMoFactoryMockRecorder struct {
   142  	mock *MockMoFactory
   143  }
   144  
   145  // NewMockMoFactory creates a new mock instance
   146  func NewMockMoFactory(ctrl *gomock.Controller) *MockMoFactory {
   147  	mock := &MockMoFactory{ctrl: ctrl}
   148  	mock.recorder = &MockMoFactoryMockRecorder{mock}
   149  	return mock
   150  }
   151  
   152  // EXPECT returns an object that allows the caller to indicate expected use
   153  func (m *MockMoFactory) EXPECT() *MockMoFactoryMockRecorder {
   154  	return m.recorder
   155  }
   156  
   157  // NewMsgRequestOrder mocks base method
   158  func (m *MockMoFactory) NewMsgRequestOrder(expectResponse bool, protocolID p2pcommon.SubProtocol, message p2pcommon.MessageBody) p2pcommon.MsgOrder {
   159  	m.ctrl.T.Helper()
   160  	ret := m.ctrl.Call(m, "NewMsgRequestOrder", expectResponse, protocolID, message)
   161  	ret0, _ := ret[0].(p2pcommon.MsgOrder)
   162  	return ret0
   163  }
   164  
   165  // NewMsgRequestOrder indicates an expected call of NewMsgRequestOrder
   166  func (mr *MockMoFactoryMockRecorder) NewMsgRequestOrder(expectResponse, protocolID, message interface{}) *gomock.Call {
   167  	mr.mock.ctrl.T.Helper()
   168  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMsgRequestOrder", reflect.TypeOf((*MockMoFactory)(nil).NewMsgRequestOrder), expectResponse, protocolID, message)
   169  }
   170  
   171  // NewMsgBlockRequestOrder mocks base method
   172  func (m *MockMoFactory) NewMsgBlockRequestOrder(respReceiver p2pcommon.ResponseReceiver, protocolID p2pcommon.SubProtocol, message p2pcommon.MessageBody) p2pcommon.MsgOrder {
   173  	m.ctrl.T.Helper()
   174  	ret := m.ctrl.Call(m, "NewMsgBlockRequestOrder", respReceiver, protocolID, message)
   175  	ret0, _ := ret[0].(p2pcommon.MsgOrder)
   176  	return ret0
   177  }
   178  
   179  // NewMsgBlockRequestOrder indicates an expected call of NewMsgBlockRequestOrder
   180  func (mr *MockMoFactoryMockRecorder) NewMsgBlockRequestOrder(respReceiver, protocolID, message interface{}) *gomock.Call {
   181  	mr.mock.ctrl.T.Helper()
   182  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMsgBlockRequestOrder", reflect.TypeOf((*MockMoFactory)(nil).NewMsgBlockRequestOrder), respReceiver, protocolID, message)
   183  }
   184  
   185  // NewMsgResponseOrder mocks base method
   186  func (m *MockMoFactory) NewMsgResponseOrder(reqID p2pcommon.MsgID, protocolID p2pcommon.SubProtocol, message p2pcommon.MessageBody) p2pcommon.MsgOrder {
   187  	m.ctrl.T.Helper()
   188  	ret := m.ctrl.Call(m, "NewMsgResponseOrder", reqID, protocolID, message)
   189  	ret0, _ := ret[0].(p2pcommon.MsgOrder)
   190  	return ret0
   191  }
   192  
   193  // NewMsgResponseOrder indicates an expected call of NewMsgResponseOrder
   194  func (mr *MockMoFactoryMockRecorder) NewMsgResponseOrder(reqID, protocolID, message interface{}) *gomock.Call {
   195  	mr.mock.ctrl.T.Helper()
   196  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMsgResponseOrder", reflect.TypeOf((*MockMoFactory)(nil).NewMsgResponseOrder), reqID, protocolID, message)
   197  }
   198  
   199  // NewMsgBlkBroadcastOrder mocks base method
   200  func (m *MockMoFactory) NewMsgBlkBroadcastOrder(noticeMsg *types.NewBlockNotice) p2pcommon.MsgOrder {
   201  	m.ctrl.T.Helper()
   202  	ret := m.ctrl.Call(m, "NewMsgBlkBroadcastOrder", noticeMsg)
   203  	ret0, _ := ret[0].(p2pcommon.MsgOrder)
   204  	return ret0
   205  }
   206  
   207  // NewMsgBlkBroadcastOrder indicates an expected call of NewMsgBlkBroadcastOrder
   208  func (mr *MockMoFactoryMockRecorder) NewMsgBlkBroadcastOrder(noticeMsg interface{}) *gomock.Call {
   209  	mr.mock.ctrl.T.Helper()
   210  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMsgBlkBroadcastOrder", reflect.TypeOf((*MockMoFactory)(nil).NewMsgBlkBroadcastOrder), noticeMsg)
   211  }
   212  
   213  // NewMsgTxBroadcastOrder mocks base method
   214  func (m *MockMoFactory) NewMsgTxBroadcastOrder(noticeMsg *types.NewTransactionsNotice) p2pcommon.MsgOrder {
   215  	m.ctrl.T.Helper()
   216  	ret := m.ctrl.Call(m, "NewMsgTxBroadcastOrder", noticeMsg)
   217  	ret0, _ := ret[0].(p2pcommon.MsgOrder)
   218  	return ret0
   219  }
   220  
   221  // NewMsgTxBroadcastOrder indicates an expected call of NewMsgTxBroadcastOrder
   222  func (mr *MockMoFactoryMockRecorder) NewMsgTxBroadcastOrder(noticeMsg interface{}) *gomock.Call {
   223  	mr.mock.ctrl.T.Helper()
   224  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMsgTxBroadcastOrder", reflect.TypeOf((*MockMoFactory)(nil).NewMsgTxBroadcastOrder), noticeMsg)
   225  }
   226  
   227  // NewMsgBPBroadcastOrder mocks base method
   228  func (m *MockMoFactory) NewMsgBPBroadcastOrder(noticeMsg *types.BlockProducedNotice) p2pcommon.MsgOrder {
   229  	m.ctrl.T.Helper()
   230  	ret := m.ctrl.Call(m, "NewMsgBPBroadcastOrder", noticeMsg)
   231  	ret0, _ := ret[0].(p2pcommon.MsgOrder)
   232  	return ret0
   233  }
   234  
   235  // NewMsgBPBroadcastOrder indicates an expected call of NewMsgBPBroadcastOrder
   236  func (mr *MockMoFactoryMockRecorder) NewMsgBPBroadcastOrder(noticeMsg interface{}) *gomock.Call {
   237  	mr.mock.ctrl.T.Helper()
   238  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMsgBPBroadcastOrder", reflect.TypeOf((*MockMoFactory)(nil).NewMsgBPBroadcastOrder), noticeMsg)
   239  }
   240  
   241  // NewRaftMsgOrder mocks base method
   242  func (m *MockMoFactory) NewRaftMsgOrder(msgType raftpb.MessageType, raftMsg *raftpb.Message) p2pcommon.MsgOrder {
   243  	m.ctrl.T.Helper()
   244  	ret := m.ctrl.Call(m, "NewRaftMsgOrder", msgType, raftMsg)
   245  	ret0, _ := ret[0].(p2pcommon.MsgOrder)
   246  	return ret0
   247  }
   248  
   249  // NewRaftMsgOrder indicates an expected call of NewRaftMsgOrder
   250  func (mr *MockMoFactoryMockRecorder) NewRaftMsgOrder(msgType, raftMsg interface{}) *gomock.Call {
   251  	mr.mock.ctrl.T.Helper()
   252  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewRaftMsgOrder", reflect.TypeOf((*MockMoFactory)(nil).NewRaftMsgOrder), msgType, raftMsg)
   253  }