github.com/apernet/quic-go@v0.43.1-0.20240515053213-5e9e635fd9f0/mock_packet_handler_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/apernet/quic-go (interfaces: PacketHandler)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/apernet/quic-go -destination mock_packet_handler_test.go github.com/apernet/quic-go PacketHandler
     7  //
     8  
     9  // Package quic is a generated GoMock package.
    10  package quic
    11  
    12  import (
    13  	reflect "reflect"
    14  
    15  	qerr "github.com/apernet/quic-go/internal/qerr"
    16  	gomock "go.uber.org/mock/gomock"
    17  )
    18  
    19  // MockPacketHandler is a mock of PacketHandler interface.
    20  type MockPacketHandler struct {
    21  	ctrl     *gomock.Controller
    22  	recorder *MockPacketHandlerMockRecorder
    23  }
    24  
    25  // MockPacketHandlerMockRecorder is the mock recorder for MockPacketHandler.
    26  type MockPacketHandlerMockRecorder struct {
    27  	mock *MockPacketHandler
    28  }
    29  
    30  // NewMockPacketHandler creates a new mock instance.
    31  func NewMockPacketHandler(ctrl *gomock.Controller) *MockPacketHandler {
    32  	mock := &MockPacketHandler{ctrl: ctrl}
    33  	mock.recorder = &MockPacketHandlerMockRecorder{mock}
    34  	return mock
    35  }
    36  
    37  // EXPECT returns an object that allows the caller to indicate expected use.
    38  func (m *MockPacketHandler) EXPECT() *MockPacketHandlerMockRecorder {
    39  	return m.recorder
    40  }
    41  
    42  // closeWithTransportError mocks base method.
    43  func (m *MockPacketHandler) closeWithTransportError(arg0 qerr.TransportErrorCode) {
    44  	m.ctrl.T.Helper()
    45  	m.ctrl.Call(m, "closeWithTransportError", arg0)
    46  }
    47  
    48  // closeWithTransportError indicates an expected call of closeWithTransportError.
    49  func (mr *MockPacketHandlerMockRecorder) closeWithTransportError(arg0 any) *MockPacketHandlercloseWithTransportErrorCall {
    50  	mr.mock.ctrl.T.Helper()
    51  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeWithTransportError", reflect.TypeOf((*MockPacketHandler)(nil).closeWithTransportError), arg0)
    52  	return &MockPacketHandlercloseWithTransportErrorCall{Call: call}
    53  }
    54  
    55  // MockPacketHandlercloseWithTransportErrorCall wrap *gomock.Call
    56  type MockPacketHandlercloseWithTransportErrorCall struct {
    57  	*gomock.Call
    58  }
    59  
    60  // Return rewrite *gomock.Call.Return
    61  func (c *MockPacketHandlercloseWithTransportErrorCall) Return() *MockPacketHandlercloseWithTransportErrorCall {
    62  	c.Call = c.Call.Return()
    63  	return c
    64  }
    65  
    66  // Do rewrite *gomock.Call.Do
    67  func (c *MockPacketHandlercloseWithTransportErrorCall) Do(f func(qerr.TransportErrorCode)) *MockPacketHandlercloseWithTransportErrorCall {
    68  	c.Call = c.Call.Do(f)
    69  	return c
    70  }
    71  
    72  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    73  func (c *MockPacketHandlercloseWithTransportErrorCall) DoAndReturn(f func(qerr.TransportErrorCode)) *MockPacketHandlercloseWithTransportErrorCall {
    74  	c.Call = c.Call.DoAndReturn(f)
    75  	return c
    76  }
    77  
    78  // destroy mocks base method.
    79  func (m *MockPacketHandler) destroy(arg0 error) {
    80  	m.ctrl.T.Helper()
    81  	m.ctrl.Call(m, "destroy", arg0)
    82  }
    83  
    84  // destroy indicates an expected call of destroy.
    85  func (mr *MockPacketHandlerMockRecorder) destroy(arg0 any) *MockPacketHandlerdestroyCall {
    86  	mr.mock.ctrl.T.Helper()
    87  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockPacketHandler)(nil).destroy), arg0)
    88  	return &MockPacketHandlerdestroyCall{Call: call}
    89  }
    90  
    91  // MockPacketHandlerdestroyCall wrap *gomock.Call
    92  type MockPacketHandlerdestroyCall struct {
    93  	*gomock.Call
    94  }
    95  
    96  // Return rewrite *gomock.Call.Return
    97  func (c *MockPacketHandlerdestroyCall) Return() *MockPacketHandlerdestroyCall {
    98  	c.Call = c.Call.Return()
    99  	return c
   100  }
   101  
   102  // Do rewrite *gomock.Call.Do
   103  func (c *MockPacketHandlerdestroyCall) Do(f func(error)) *MockPacketHandlerdestroyCall {
   104  	c.Call = c.Call.Do(f)
   105  	return c
   106  }
   107  
   108  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   109  func (c *MockPacketHandlerdestroyCall) DoAndReturn(f func(error)) *MockPacketHandlerdestroyCall {
   110  	c.Call = c.Call.DoAndReturn(f)
   111  	return c
   112  }
   113  
   114  // handlePacket mocks base method.
   115  func (m *MockPacketHandler) handlePacket(arg0 receivedPacket) {
   116  	m.ctrl.T.Helper()
   117  	m.ctrl.Call(m, "handlePacket", arg0)
   118  }
   119  
   120  // handlePacket indicates an expected call of handlePacket.
   121  func (mr *MockPacketHandlerMockRecorder) handlePacket(arg0 any) *MockPacketHandlerhandlePacketCall {
   122  	mr.mock.ctrl.T.Helper()
   123  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockPacketHandler)(nil).handlePacket), arg0)
   124  	return &MockPacketHandlerhandlePacketCall{Call: call}
   125  }
   126  
   127  // MockPacketHandlerhandlePacketCall wrap *gomock.Call
   128  type MockPacketHandlerhandlePacketCall struct {
   129  	*gomock.Call
   130  }
   131  
   132  // Return rewrite *gomock.Call.Return
   133  func (c *MockPacketHandlerhandlePacketCall) Return() *MockPacketHandlerhandlePacketCall {
   134  	c.Call = c.Call.Return()
   135  	return c
   136  }
   137  
   138  // Do rewrite *gomock.Call.Do
   139  func (c *MockPacketHandlerhandlePacketCall) Do(f func(receivedPacket)) *MockPacketHandlerhandlePacketCall {
   140  	c.Call = c.Call.Do(f)
   141  	return c
   142  }
   143  
   144  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   145  func (c *MockPacketHandlerhandlePacketCall) DoAndReturn(f func(receivedPacket)) *MockPacketHandlerhandlePacketCall {
   146  	c.Call = c.Call.DoAndReturn(f)
   147  	return c
   148  }