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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/apernet/quic-go (interfaces: Unpacker)
     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_unpacker_test.go github.com/apernet/quic-go Unpacker
     7  //
     8  
     9  // Package quic is a generated GoMock package.
    10  package quic
    11  
    12  import (
    13  	reflect "reflect"
    14  	time "time"
    15  
    16  	protocol "github.com/apernet/quic-go/internal/protocol"
    17  	wire "github.com/apernet/quic-go/internal/wire"
    18  	gomock "go.uber.org/mock/gomock"
    19  )
    20  
    21  // MockUnpacker is a mock of Unpacker interface.
    22  type MockUnpacker struct {
    23  	ctrl     *gomock.Controller
    24  	recorder *MockUnpackerMockRecorder
    25  }
    26  
    27  // MockUnpackerMockRecorder is the mock recorder for MockUnpacker.
    28  type MockUnpackerMockRecorder struct {
    29  	mock *MockUnpacker
    30  }
    31  
    32  // NewMockUnpacker creates a new mock instance.
    33  func NewMockUnpacker(ctrl *gomock.Controller) *MockUnpacker {
    34  	mock := &MockUnpacker{ctrl: ctrl}
    35  	mock.recorder = &MockUnpackerMockRecorder{mock}
    36  	return mock
    37  }
    38  
    39  // EXPECT returns an object that allows the caller to indicate expected use.
    40  func (m *MockUnpacker) EXPECT() *MockUnpackerMockRecorder {
    41  	return m.recorder
    42  }
    43  
    44  // UnpackLongHeader mocks base method.
    45  func (m *MockUnpacker) UnpackLongHeader(arg0 *wire.Header, arg1 time.Time, arg2 []byte, arg3 protocol.Version) (*unpackedPacket, error) {
    46  	m.ctrl.T.Helper()
    47  	ret := m.ctrl.Call(m, "UnpackLongHeader", arg0, arg1, arg2, arg3)
    48  	ret0, _ := ret[0].(*unpackedPacket)
    49  	ret1, _ := ret[1].(error)
    50  	return ret0, ret1
    51  }
    52  
    53  // UnpackLongHeader indicates an expected call of UnpackLongHeader.
    54  func (mr *MockUnpackerMockRecorder) UnpackLongHeader(arg0, arg1, arg2, arg3 any) *MockUnpackerUnpackLongHeaderCall {
    55  	mr.mock.ctrl.T.Helper()
    56  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackLongHeader", reflect.TypeOf((*MockUnpacker)(nil).UnpackLongHeader), arg0, arg1, arg2, arg3)
    57  	return &MockUnpackerUnpackLongHeaderCall{Call: call}
    58  }
    59  
    60  // MockUnpackerUnpackLongHeaderCall wrap *gomock.Call
    61  type MockUnpackerUnpackLongHeaderCall struct {
    62  	*gomock.Call
    63  }
    64  
    65  // Return rewrite *gomock.Call.Return
    66  func (c *MockUnpackerUnpackLongHeaderCall) Return(arg0 *unpackedPacket, arg1 error) *MockUnpackerUnpackLongHeaderCall {
    67  	c.Call = c.Call.Return(arg0, arg1)
    68  	return c
    69  }
    70  
    71  // Do rewrite *gomock.Call.Do
    72  func (c *MockUnpackerUnpackLongHeaderCall) Do(f func(*wire.Header, time.Time, []byte, protocol.Version) (*unpackedPacket, error)) *MockUnpackerUnpackLongHeaderCall {
    73  	c.Call = c.Call.Do(f)
    74  	return c
    75  }
    76  
    77  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    78  func (c *MockUnpackerUnpackLongHeaderCall) DoAndReturn(f func(*wire.Header, time.Time, []byte, protocol.Version) (*unpackedPacket, error)) *MockUnpackerUnpackLongHeaderCall {
    79  	c.Call = c.Call.DoAndReturn(f)
    80  	return c
    81  }
    82  
    83  // UnpackShortHeader mocks base method.
    84  func (m *MockUnpacker) UnpackShortHeader(arg0 time.Time, arg1 []byte) (protocol.PacketNumber, protocol.PacketNumberLen, protocol.KeyPhaseBit, []byte, error) {
    85  	m.ctrl.T.Helper()
    86  	ret := m.ctrl.Call(m, "UnpackShortHeader", arg0, arg1)
    87  	ret0, _ := ret[0].(protocol.PacketNumber)
    88  	ret1, _ := ret[1].(protocol.PacketNumberLen)
    89  	ret2, _ := ret[2].(protocol.KeyPhaseBit)
    90  	ret3, _ := ret[3].([]byte)
    91  	ret4, _ := ret[4].(error)
    92  	return ret0, ret1, ret2, ret3, ret4
    93  }
    94  
    95  // UnpackShortHeader indicates an expected call of UnpackShortHeader.
    96  func (mr *MockUnpackerMockRecorder) UnpackShortHeader(arg0, arg1 any) *MockUnpackerUnpackShortHeaderCall {
    97  	mr.mock.ctrl.T.Helper()
    98  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackShortHeader", reflect.TypeOf((*MockUnpacker)(nil).UnpackShortHeader), arg0, arg1)
    99  	return &MockUnpackerUnpackShortHeaderCall{Call: call}
   100  }
   101  
   102  // MockUnpackerUnpackShortHeaderCall wrap *gomock.Call
   103  type MockUnpackerUnpackShortHeaderCall struct {
   104  	*gomock.Call
   105  }
   106  
   107  // Return rewrite *gomock.Call.Return
   108  func (c *MockUnpackerUnpackShortHeaderCall) Return(arg0 protocol.PacketNumber, arg1 protocol.PacketNumberLen, arg2 protocol.KeyPhaseBit, arg3 []byte, arg4 error) *MockUnpackerUnpackShortHeaderCall {
   109  	c.Call = c.Call.Return(arg0, arg1, arg2, arg3, arg4)
   110  	return c
   111  }
   112  
   113  // Do rewrite *gomock.Call.Do
   114  func (c *MockUnpackerUnpackShortHeaderCall) Do(f func(time.Time, []byte) (protocol.PacketNumber, protocol.PacketNumberLen, protocol.KeyPhaseBit, []byte, error)) *MockUnpackerUnpackShortHeaderCall {
   115  	c.Call = c.Call.Do(f)
   116  	return c
   117  }
   118  
   119  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   120  func (c *MockUnpackerUnpackShortHeaderCall) DoAndReturn(f func(time.Time, []byte) (protocol.PacketNumber, protocol.PacketNumberLen, protocol.KeyPhaseBit, []byte, error)) *MockUnpackerUnpackShortHeaderCall {
   121  	c.Call = c.Call.DoAndReturn(f)
   122  	return c
   123  }