github.com/MerlinKodo/quic-go@v0.39.2/mock_raw_conn_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/MerlinKodo/quic-go (interfaces: RawConn)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -build_flags=-tags=gomock -package quic -self_package github.com/MerlinKodo/quic-go -destination mock_raw_conn_test.go github.com/MerlinKodo/quic-go RawConn
     7  //
     8  // Package quic is a generated GoMock package.
     9  package quic
    10  
    11  import (
    12  	net "net"
    13  	reflect "reflect"
    14  	time "time"
    15  
    16  	protocol "github.com/MerlinKodo/quic-go/internal/protocol"
    17  	gomock "go.uber.org/mock/gomock"
    18  )
    19  
    20  // MockRawConn is a mock of RawConn interface.
    21  type MockRawConn struct {
    22  	ctrl     *gomock.Controller
    23  	recorder *MockRawConnMockRecorder
    24  }
    25  
    26  // MockRawConnMockRecorder is the mock recorder for MockRawConn.
    27  type MockRawConnMockRecorder struct {
    28  	mock *MockRawConn
    29  }
    30  
    31  // NewMockRawConn creates a new mock instance.
    32  func NewMockRawConn(ctrl *gomock.Controller) *MockRawConn {
    33  	mock := &MockRawConn{ctrl: ctrl}
    34  	mock.recorder = &MockRawConnMockRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows the caller to indicate expected use.
    39  func (m *MockRawConn) EXPECT() *MockRawConnMockRecorder {
    40  	return m.recorder
    41  }
    42  
    43  // Close mocks base method.
    44  func (m *MockRawConn) Close() error {
    45  	m.ctrl.T.Helper()
    46  	ret := m.ctrl.Call(m, "Close")
    47  	ret0, _ := ret[0].(error)
    48  	return ret0
    49  }
    50  
    51  // Close indicates an expected call of Close.
    52  func (mr *MockRawConnMockRecorder) Close() *gomock.Call {
    53  	mr.mock.ctrl.T.Helper()
    54  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRawConn)(nil).Close))
    55  }
    56  
    57  // LocalAddr mocks base method.
    58  func (m *MockRawConn) LocalAddr() net.Addr {
    59  	m.ctrl.T.Helper()
    60  	ret := m.ctrl.Call(m, "LocalAddr")
    61  	ret0, _ := ret[0].(net.Addr)
    62  	return ret0
    63  }
    64  
    65  // LocalAddr indicates an expected call of LocalAddr.
    66  func (mr *MockRawConnMockRecorder) LocalAddr() *gomock.Call {
    67  	mr.mock.ctrl.T.Helper()
    68  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockRawConn)(nil).LocalAddr))
    69  }
    70  
    71  // ReadPacket mocks base method.
    72  func (m *MockRawConn) ReadPacket() (receivedPacket, error) {
    73  	m.ctrl.T.Helper()
    74  	ret := m.ctrl.Call(m, "ReadPacket")
    75  	ret0, _ := ret[0].(receivedPacket)
    76  	ret1, _ := ret[1].(error)
    77  	return ret0, ret1
    78  }
    79  
    80  // ReadPacket indicates an expected call of ReadPacket.
    81  func (mr *MockRawConnMockRecorder) ReadPacket() *gomock.Call {
    82  	mr.mock.ctrl.T.Helper()
    83  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadPacket", reflect.TypeOf((*MockRawConn)(nil).ReadPacket))
    84  }
    85  
    86  // SetReadDeadline mocks base method.
    87  func (m *MockRawConn) SetReadDeadline(arg0 time.Time) error {
    88  	m.ctrl.T.Helper()
    89  	ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
    90  	ret0, _ := ret[0].(error)
    91  	return ret0
    92  }
    93  
    94  // SetReadDeadline indicates an expected call of SetReadDeadline.
    95  func (mr *MockRawConnMockRecorder) SetReadDeadline(arg0 any) *gomock.Call {
    96  	mr.mock.ctrl.T.Helper()
    97  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockRawConn)(nil).SetReadDeadline), arg0)
    98  }
    99  
   100  // WritePacket mocks base method.
   101  func (m *MockRawConn) WritePacket(arg0 []byte, arg1 net.Addr, arg2 []byte, arg3 uint16, arg4 protocol.ECN) (int, error) {
   102  	m.ctrl.T.Helper()
   103  	ret := m.ctrl.Call(m, "WritePacket", arg0, arg1, arg2, arg3, arg4)
   104  	ret0, _ := ret[0].(int)
   105  	ret1, _ := ret[1].(error)
   106  	return ret0, ret1
   107  }
   108  
   109  // WritePacket indicates an expected call of WritePacket.
   110  func (mr *MockRawConnMockRecorder) WritePacket(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
   111  	mr.mock.ctrl.T.Helper()
   112  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritePacket", reflect.TypeOf((*MockRawConn)(nil).WritePacket), arg0, arg1, arg2, arg3, arg4)
   113  }
   114  
   115  // capabilities mocks base method.
   116  func (m *MockRawConn) capabilities() connCapabilities {
   117  	m.ctrl.T.Helper()
   118  	ret := m.ctrl.Call(m, "capabilities")
   119  	ret0, _ := ret[0].(connCapabilities)
   120  	return ret0
   121  }
   122  
   123  // capabilities indicates an expected call of capabilities.
   124  func (mr *MockRawConnMockRecorder) capabilities() *gomock.Call {
   125  	mr.mock.ctrl.T.Helper()
   126  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "capabilities", reflect.TypeOf((*MockRawConn)(nil).capabilities))
   127  }