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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: msgio.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  	gomock "github.com/golang/mock/gomock"
    10  	reflect "reflect"
    11  )
    12  
    13  // MockMsgReadWriter is a mock of MsgReadWriter interface
    14  type MockMsgReadWriter struct {
    15  	ctrl     *gomock.Controller
    16  	recorder *MockMsgReadWriterMockRecorder
    17  }
    18  
    19  // MockMsgReadWriterMockRecorder is the mock recorder for MockMsgReadWriter
    20  type MockMsgReadWriterMockRecorder struct {
    21  	mock *MockMsgReadWriter
    22  }
    23  
    24  // NewMockMsgReadWriter creates a new mock instance
    25  func NewMockMsgReadWriter(ctrl *gomock.Controller) *MockMsgReadWriter {
    26  	mock := &MockMsgReadWriter{ctrl: ctrl}
    27  	mock.recorder = &MockMsgReadWriterMockRecorder{mock}
    28  	return mock
    29  }
    30  
    31  // EXPECT returns an object that allows the caller to indicate expected use
    32  func (m *MockMsgReadWriter) EXPECT() *MockMsgReadWriterMockRecorder {
    33  	return m.recorder
    34  }
    35  
    36  // ReadMsg mocks base method
    37  func (m *MockMsgReadWriter) ReadMsg() (p2pcommon.Message, error) {
    38  	m.ctrl.T.Helper()
    39  	ret := m.ctrl.Call(m, "ReadMsg")
    40  	ret0, _ := ret[0].(p2pcommon.Message)
    41  	ret1, _ := ret[1].(error)
    42  	return ret0, ret1
    43  }
    44  
    45  // ReadMsg indicates an expected call of ReadMsg
    46  func (mr *MockMsgReadWriterMockRecorder) ReadMsg() *gomock.Call {
    47  	mr.mock.ctrl.T.Helper()
    48  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMsg", reflect.TypeOf((*MockMsgReadWriter)(nil).ReadMsg))
    49  }
    50  
    51  // WriteMsg mocks base method
    52  func (m *MockMsgReadWriter) WriteMsg(msg p2pcommon.Message) error {
    53  	m.ctrl.T.Helper()
    54  	ret := m.ctrl.Call(m, "WriteMsg", msg)
    55  	ret0, _ := ret[0].(error)
    56  	return ret0
    57  }
    58  
    59  // WriteMsg indicates an expected call of WriteMsg
    60  func (mr *MockMsgReadWriterMockRecorder) WriteMsg(msg interface{}) *gomock.Call {
    61  	mr.mock.ctrl.T.Helper()
    62  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteMsg", reflect.TypeOf((*MockMsgReadWriter)(nil).WriteMsg), msg)
    63  }
    64  
    65  // Close mocks base method
    66  func (m *MockMsgReadWriter) Close() error {
    67  	m.ctrl.T.Helper()
    68  	ret := m.ctrl.Call(m, "Close")
    69  	ret0, _ := ret[0].(error)
    70  	return ret0
    71  }
    72  
    73  // Close indicates an expected call of Close
    74  func (mr *MockMsgReadWriterMockRecorder) Close() *gomock.Call {
    75  	mr.mock.ctrl.T.Helper()
    76  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockMsgReadWriter)(nil).Close))
    77  }
    78  
    79  // AddIOListener mocks base method
    80  func (m *MockMsgReadWriter) AddIOListener(l p2pcommon.MsgIOListener) {
    81  	m.ctrl.T.Helper()
    82  	m.ctrl.Call(m, "AddIOListener", l)
    83  }
    84  
    85  // AddIOListener indicates an expected call of AddIOListener
    86  func (mr *MockMsgReadWriterMockRecorder) AddIOListener(l interface{}) *gomock.Call {
    87  	mr.mock.ctrl.T.Helper()
    88  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIOListener", reflect.TypeOf((*MockMsgReadWriter)(nil).AddIOListener), l)
    89  }
    90  
    91  // MockMsgIOListener is a mock of MsgIOListener interface
    92  type MockMsgIOListener struct {
    93  	ctrl     *gomock.Controller
    94  	recorder *MockMsgIOListenerMockRecorder
    95  }
    96  
    97  // MockMsgIOListenerMockRecorder is the mock recorder for MockMsgIOListener
    98  type MockMsgIOListenerMockRecorder struct {
    99  	mock *MockMsgIOListener
   100  }
   101  
   102  // NewMockMsgIOListener creates a new mock instance
   103  func NewMockMsgIOListener(ctrl *gomock.Controller) *MockMsgIOListener {
   104  	mock := &MockMsgIOListener{ctrl: ctrl}
   105  	mock.recorder = &MockMsgIOListenerMockRecorder{mock}
   106  	return mock
   107  }
   108  
   109  // EXPECT returns an object that allows the caller to indicate expected use
   110  func (m *MockMsgIOListener) EXPECT() *MockMsgIOListenerMockRecorder {
   111  	return m.recorder
   112  }
   113  
   114  // OnRead mocks base method
   115  func (m *MockMsgIOListener) OnRead(protocol p2pcommon.SubProtocol, read int) {
   116  	m.ctrl.T.Helper()
   117  	m.ctrl.Call(m, "OnRead", protocol, read)
   118  }
   119  
   120  // OnRead indicates an expected call of OnRead
   121  func (mr *MockMsgIOListenerMockRecorder) OnRead(protocol, read interface{}) *gomock.Call {
   122  	mr.mock.ctrl.T.Helper()
   123  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnRead", reflect.TypeOf((*MockMsgIOListener)(nil).OnRead), protocol, read)
   124  }
   125  
   126  // OnWrite mocks base method
   127  func (m *MockMsgIOListener) OnWrite(protocol p2pcommon.SubProtocol, write int) {
   128  	m.ctrl.T.Helper()
   129  	m.ctrl.Call(m, "OnWrite", protocol, write)
   130  }
   131  
   132  // OnWrite indicates an expected call of OnWrite
   133  func (mr *MockMsgIOListenerMockRecorder) OnWrite(protocol, write interface{}) *gomock.Call {
   134  	mr.mock.ctrl.T.Helper()
   135  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnWrite", reflect.TypeOf((*MockMsgIOListener)(nil).OnWrite), protocol, write)
   136  }