github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/mock_packet_handler_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/TugasAkhir-QUIC/quic-go (interfaces: PacketHandler)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen.exe -typed -build_flags=-tags=gomock -package quic -self_package github.com/TugasAkhir-QUIC/quic-go -destination mock_packet_handler_test.go github.com/TugasAkhir-QUIC/quic-go PacketHandler
     7  //
     8  // Package quic is a generated GoMock package.
     9  package quic
    10  
    11  import (
    12  	reflect "reflect"
    13  
    14  	protocol "github.com/TugasAkhir-QUIC/quic-go/internal/protocol"
    15  	qerr "github.com/TugasAkhir-QUIC/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) *PacketHandlercloseWithTransportErrorCall {
    50  	mr.mock.ctrl.T.Helper()
    51  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeWithTransportError", reflect.TypeOf((*MockPacketHandler)(nil).closeWithTransportError), arg0)
    52  	return &PacketHandlercloseWithTransportErrorCall{Call: call}
    53  }
    54  
    55  // PacketHandlercloseWithTransportErrorCall wrap *gomock.Call
    56  type PacketHandlercloseWithTransportErrorCall struct {
    57  	*gomock.Call
    58  }
    59  
    60  // Return rewrite *gomock.Call.Return
    61  func (c *PacketHandlercloseWithTransportErrorCall) Return() *PacketHandlercloseWithTransportErrorCall {
    62  	c.Call = c.Call.Return()
    63  	return c
    64  }
    65  
    66  // Do rewrite *gomock.Call.Do
    67  func (c *PacketHandlercloseWithTransportErrorCall) Do(f func(qerr.TransportErrorCode)) *PacketHandlercloseWithTransportErrorCall {
    68  	c.Call = c.Call.Do(f)
    69  	return c
    70  }
    71  
    72  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    73  func (c *PacketHandlercloseWithTransportErrorCall) DoAndReturn(f func(qerr.TransportErrorCode)) *PacketHandlercloseWithTransportErrorCall {
    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) *PacketHandlerdestroyCall {
    86  	mr.mock.ctrl.T.Helper()
    87  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockPacketHandler)(nil).destroy), arg0)
    88  	return &PacketHandlerdestroyCall{Call: call}
    89  }
    90  
    91  // PacketHandlerdestroyCall wrap *gomock.Call
    92  type PacketHandlerdestroyCall struct {
    93  	*gomock.Call
    94  }
    95  
    96  // Return rewrite *gomock.Call.Return
    97  func (c *PacketHandlerdestroyCall) Return() *PacketHandlerdestroyCall {
    98  	c.Call = c.Call.Return()
    99  	return c
   100  }
   101  
   102  // Do rewrite *gomock.Call.Do
   103  func (c *PacketHandlerdestroyCall) Do(f func(error)) *PacketHandlerdestroyCall {
   104  	c.Call = c.Call.Do(f)
   105  	return c
   106  }
   107  
   108  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   109  func (c *PacketHandlerdestroyCall) DoAndReturn(f func(error)) *PacketHandlerdestroyCall {
   110  	c.Call = c.Call.DoAndReturn(f)
   111  	return c
   112  }
   113  
   114  // getPerspective mocks base method.
   115  func (m *MockPacketHandler) getPerspective() protocol.Perspective {
   116  	m.ctrl.T.Helper()
   117  	ret := m.ctrl.Call(m, "getPerspective")
   118  	ret0, _ := ret[0].(protocol.Perspective)
   119  	return ret0
   120  }
   121  
   122  // getPerspective indicates an expected call of getPerspective.
   123  func (mr *MockPacketHandlerMockRecorder) getPerspective() *PacketHandlergetPerspectiveCall {
   124  	mr.mock.ctrl.T.Helper()
   125  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockPacketHandler)(nil).getPerspective))
   126  	return &PacketHandlergetPerspectiveCall{Call: call}
   127  }
   128  
   129  // PacketHandlergetPerspectiveCall wrap *gomock.Call
   130  type PacketHandlergetPerspectiveCall struct {
   131  	*gomock.Call
   132  }
   133  
   134  // Return rewrite *gomock.Call.Return
   135  func (c *PacketHandlergetPerspectiveCall) Return(arg0 protocol.Perspective) *PacketHandlergetPerspectiveCall {
   136  	c.Call = c.Call.Return(arg0)
   137  	return c
   138  }
   139  
   140  // Do rewrite *gomock.Call.Do
   141  func (c *PacketHandlergetPerspectiveCall) Do(f func() protocol.Perspective) *PacketHandlergetPerspectiveCall {
   142  	c.Call = c.Call.Do(f)
   143  	return c
   144  }
   145  
   146  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   147  func (c *PacketHandlergetPerspectiveCall) DoAndReturn(f func() protocol.Perspective) *PacketHandlergetPerspectiveCall {
   148  	c.Call = c.Call.DoAndReturn(f)
   149  	return c
   150  }
   151  
   152  // handlePacket mocks base method.
   153  func (m *MockPacketHandler) handlePacket(arg0 receivedPacket) {
   154  	m.ctrl.T.Helper()
   155  	m.ctrl.Call(m, "handlePacket", arg0)
   156  }
   157  
   158  // handlePacket indicates an expected call of handlePacket.
   159  func (mr *MockPacketHandlerMockRecorder) handlePacket(arg0 any) *PacketHandlerhandlePacketCall {
   160  	mr.mock.ctrl.T.Helper()
   161  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockPacketHandler)(nil).handlePacket), arg0)
   162  	return &PacketHandlerhandlePacketCall{Call: call}
   163  }
   164  
   165  // PacketHandlerhandlePacketCall wrap *gomock.Call
   166  type PacketHandlerhandlePacketCall struct {
   167  	*gomock.Call
   168  }
   169  
   170  // Return rewrite *gomock.Call.Return
   171  func (c *PacketHandlerhandlePacketCall) Return() *PacketHandlerhandlePacketCall {
   172  	c.Call = c.Call.Return()
   173  	return c
   174  }
   175  
   176  // Do rewrite *gomock.Call.Do
   177  func (c *PacketHandlerhandlePacketCall) Do(f func(receivedPacket)) *PacketHandlerhandlePacketCall {
   178  	c.Call = c.Call.Do(f)
   179  	return c
   180  }
   181  
   182  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   183  func (c *PacketHandlerhandlePacketCall) DoAndReturn(f func(receivedPacket)) *PacketHandlerhandlePacketCall {
   184  	c.Call = c.Call.DoAndReturn(f)
   185  	return c
   186  }