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

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